From f422238d7aaae0ff1b2d560a71a99b0a881ad338 Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 23 Feb 2020 22:12:21 +0100 Subject: players can get damage from traps --- src/componentwrapper.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/componentwrapper.rs') diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index 8ab991a..1a61728 100644 --- a/src/componentwrapper.rs +++ b/src/componentwrapper.rs @@ -7,7 +7,8 @@ use crate::{ RoomId, Sprite, playerstate::RoomPos, - components::{Visible, Blocking, Player, Floor, Item, Inventory, Health, Serialise, RoomExit}, + attack::Attack, + components::{Visible, Blocking, Player, Floor, Item, Inventory, Health, Serialise, RoomExit, Trap}, parameter::{Parameter, ParameterType} }; @@ -113,6 +114,7 @@ components!( } } }; + Trap (damage: Int) {Trap{attack: Attack::new(damage)}}; ); -- cgit