summaryrefslogtreecommitdiff
path: root/src/playerstate.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-24 12:38:23 +0100
committertroido <troido@protonmail.com>2020-02-24 12:38:23 +0100
commit715c9106dbff4524f3fdf5d23f762e5e6518e0cb (patch)
treecf5dc0c5d30fc9ba7e38bdff40907fe4a96261a2 /src/playerstate.rs
parent4718cfdc7c2bf67d2389ca18ab035fe5a0887ff0 (diff)
healing works now too, the first time based system
Diffstat (limited to 'src/playerstate.rs')
-rw-r--r--src/playerstate.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/playerstate.rs b/src/playerstate.rs
index 3339dd1..4117bad 100644
--- a/src/playerstate.rs
+++ b/src/playerstate.rs
@@ -6,7 +6,7 @@ use crate::{
componentwrapper::{ComponentWrapper, PreEntity},
PlayerId,
RoomId,
- components::{Visible, Player, Inventory, Health, Fighter},
+ components::{Visible, Player, Inventory, Health, Fighter, Healing},
attack::Attack,
Result,
aerr,
@@ -116,7 +116,8 @@ impl PlayerState {
capacity: self.inventory_capacity
}),
ComponentWrapper::Health(Health{health: self.health, maxhealth: self.maximum_health}),
- ComponentWrapper::Fighter(Fighter{attack: Attack::new(5)})
+ ComponentWrapper::Fighter(Fighter{attack: Attack::new(5)}),
+ ComponentWrapper::Healing(Healing{delay: 50, health: 1, next_heal: None})
]
}
}