Everyone has different animations, but they tend to cancel each other out. Need to refine it next.

This commit is contained in:
Zed A. Shaw 2026-02-13 23:57:16 -05:00
parent 458bf7e25e
commit ba91929bfd
5 changed files with 19 additions and 11 deletions

View file

@ -149,10 +149,12 @@ namespace boss {
std::string player_move = Random::uniform(0, 1) == 0 ? "player1" : "player3";
$ui.move_actor("player", player_move);
if(result.player_did > 0) {
$ui.animate_actor("player");
$ui.animate_actor("player", "attack");
$ui.animate_actor("boss", "hurt");
} else {
// NO need a no animation event
$ui.animate_actor("player");
$ui.animate_actor("player", "idle");
$ui.animate_actor("boss", "idle");
}
$ui.damage("player", "boss", result.player_did);
} break;
@ -161,16 +163,18 @@ namespace boss {
$ui.move_actor("boss", boss_move);
if(result.enemy_did > 0) {
$ui.animate_actor("boss");
$ui.animate_actor("boss", "attack");
$ui.animate_actor("player", "hurt");
} else {
// NO need a no animation event
$ui.animate_actor("boss");
$ui.animate_actor("boss", "idle");
$ui.animate_actor("player", "idle");
}
$ui.damage("boss", "player", result.enemy_did);
} break;
case BattleHostState::out_of_ap:
// NO need an out of AP animation
$ui.animate_actor("player");
$ui.animate_actor("player", "idle");
break;
}
}