summaryrefslogtreecommitdiff
path: root/src/componentwrapper.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-23 22:12:21 +0100
committertroido <troido@protonmail.com>2020-02-23 22:12:21 +0100
commitf422238d7aaae0ff1b2d560a71a99b0a881ad338 (patch)
treec335cb8eee47d34953f7d4cd96c195958d223202 /src/componentwrapper.rs
parent613952f918b8d72a3e397dc46be309b2320c6ad0 (diff)
players can get damage from traps
Diffstat (limited to 'src/componentwrapper.rs')
-rw-r--r--src/componentwrapper.rs4
1 files changed, 3 insertions, 1 deletions
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)}};
);