diff options
| author | troido <troido@protonmail.com> | 2020-02-23 22:12:21 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-23 22:12:21 +0100 |
| commit | f422238d7aaae0ff1b2d560a71a99b0a881ad338 (patch) | |
| tree | c335cb8eee47d34953f7d4cd96c195958d223202 /src/componentwrapper.rs | |
| parent | 613952f918b8d72a3e397dc46be309b2320c6ad0 (diff) | |
players can get damage from traps
Diffstat (limited to 'src/componentwrapper.rs')
| -rw-r--r-- | src/componentwrapper.rs | 4 |
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)}}; ); |
