Skip to content

Commit

Permalink
Award VITALITY points every round a human player defeats an AI
Browse files Browse the repository at this point in the history
  • Loading branch information
Nopey committed Jan 13, 2025
1 parent 37c089f commit 1c9714f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/game/scenes/arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 1c9714f

Please sign in to comment.