Implement GolemFist

This commit is contained in:
henriquenakashima 2020-09-20 15:45:59 -04:00
parent 4ca7b7537a
commit d1af817bc6
11 changed files with 106 additions and 19 deletions

View file

@ -31,6 +31,10 @@ public class BattleParticipant
return this.maxHP;
}
public bool IsAlive() {
return this.hp > 0;
}
public int DealDamage(int damage) {
int blockedDamage = Math.Min(damage, this.block);
if (blockedDamage > 0) {
@ -43,6 +47,10 @@ public class BattleParticipant
}
public int Heal(int amount) {
if (!IsAlive()) {
return 0;
}
amount = Math.Min(this.maxHP - this.hp, amount);
this.hp += amount;
return amount;