public void playerAttack(Ability attack) { char_1.Attack(attack, char_2); if (char_2.currentHealth == 0) { endBattle(); return; } beginTurn(); }
public void Attack(Ability move, Entity enemy) { uint damage = move.attack(this, enemy); if ((int)(this.currentHealth - damage) <= 0) enemy.currentHealth = 0; this.currentHealth -= (int)damage; }