From 1c9714f380d4a583910e1b5546a3f07bdefea395 Mon Sep 17 00:00:00 2001 From: Magnus Larsen Date: Tue, 5 Nov 2024 15:33:46 -0800 Subject: [PATCH] Award VITALITY points every round a human player defeats an AI --- src/game/scenes/arena.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/scenes/arena.c b/src/game/scenes/arena.c index 991b0faee..09d2370e6 100644 --- a/src/game/scenes/arena.c +++ b/src/game/scenes/arena.c @@ -554,9 +554,11 @@ void arena_har_defeat_hook(int player_id, scene *scene) { object_set_sprite_override(round_token, 1); } score->rounds++; + if(player_winner->ctrl->type != CTRL_TYPE_AI && player_loser->ctrl->type == CTRL_TYPE_AI) { + chr_score_victory(score, har_health_percent(winner_har)); + } if(score->rounds >= ceilf(local->rounds / 2.0f)) { har_set_ani(winner, ANIM_VICTORY, 0); - chr_score_victory(score, har_health_percent(winner_har)); winner_har->state = STATE_VICTORY; local->over = 1; if(is_singleplayer(gs)) {