Skip to content

Commit 1c9714f

Browse files
committed
Award VITALITY points every round a human player defeats an AI
1 parent 37c089f commit 1c9714f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/game/scenes/arena.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,11 @@ void arena_har_defeat_hook(int player_id, scene *scene) {
554554
object_set_sprite_override(round_token, 1);
555555
}
556556
score->rounds++;
557+
if(player_winner->ctrl->type != CTRL_TYPE_AI && player_loser->ctrl->type == CTRL_TYPE_AI) {
558+
chr_score_victory(score, har_health_percent(winner_har));
559+
}
557560
if(score->rounds >= ceilf(local->rounds / 2.0f)) {
558561
har_set_ani(winner, ANIM_VICTORY, 0);
559-
chr_score_victory(score, har_health_percent(winner_har));
560562
winner_har->state = STATE_VICTORY;
561563
local->over = 1;
562564
if(is_singleplayer(gs)) {

0 commit comments

Comments
 (0)