Check win and loss states
This commit is contained in:
parent
adc84f9aba
commit
8c641f5524
8 changed files with 69 additions and 7 deletions
|
|
@ -47,11 +47,14 @@ public class BattleParticipant
|
|||
}
|
||||
damage = Math.Min(this.hp, damage);
|
||||
this.hp -= damage;
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void CheckState() {
|
||||
if (this.hp <= 0) {
|
||||
this.dead = true;
|
||||
TriggerOnDeath();
|
||||
}
|
||||
return damage;
|
||||
}
|
||||
|
||||
public int Heal(int amount) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue