fix stamina and hp bug

This commit is contained in:
ntr 2019-03-14 16:36:58 +11:00
parent 2eae21f12f
commit 61a2a7500b
2 changed files with 5 additions and 3 deletions

View File

@ -20,7 +20,7 @@ class Header extends Phaser.Scene {
}
create() {
this.add.text(0, 0, 'CRYPS.GG', TEXT.HEADER);
this.add.text(0, 0, 'cryps.gg', TEXT.HEADER);
}
}

View File

@ -270,8 +270,6 @@ impl Cryp {
fn recalculate_stats(&mut self) -> &mut Cryp {
self.stamina.recalculate(&self.specs);
self.hp.recalculate(&self.specs);
self.red_damage.recalculate(&self.specs);
self.red_shield.recalculate(&self.specs);
self.blue_damage.recalculate(&self.specs);
@ -279,6 +277,10 @@ impl Cryp {
self.evasion.recalculate(&self.specs);
self.speed.recalculate(&self.specs);
// special case where hp is tied to stam
self.stamina.recalculate(&self.specs);
self.hp.set(self.stamina.value, &self.specs);
self
}