Implement GolemFist
This commit is contained in:
parent
4ca7b7537a
commit
d1af817bc6
11 changed files with 106 additions and 19 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue