littlemight/Avatar-Duel

Player Health Decrease Condition

Closed this issue · 1 comments

Lacking condition when the card is Powered Up, it should also decrease the player health

if (enemy_player_card.getPosition()==Position.ATTACK){
this.players[(cur_player+1)%2].decreaseHealth(cur_player_card.getCombatValue()-enemy_player_card.getCombatValue());
if (this.players[(cur_player+1)%2].getHealth()==0){
// TODO: publish player win
}