Boss fight now has combat stats and damage so I can now have a boss fight.

This commit is contained in:
Zed A. Shaw 2025-11-22 00:50:47 -05:00
parent 8ee3e8736f
commit 63a17d7efa
7 changed files with 58 additions and 9 deletions

View file

@ -3,10 +3,10 @@
#include "animation.hpp"
namespace boss {
Fight::Fight(shared_ptr<World> world, Entity boss_id) :
Fight::Fight(shared_ptr<World> world, Entity boss_id, Entity player_id) :
$world(world),
$boss_id(boss_id),
$ui(world->get<components::AnimatedScene>($boss_id), boss_id)
$ui(world, boss_id, player_id)
{
$ui.init();
}
@ -88,6 +88,7 @@ namespace boss {
$ui.move_actor("player", player_pos);
int attack_id = std::any_cast<int>(data);
boss::System::combat($world, $boss_id, attack_id);
$ui.update_stats();
state(State::PLAYER_TURN);
} break;
default: