When there's actions in the arena the camera moves.

This commit is contained in:
Zed A. Shaw 2025-11-22 14:53:52 -05:00
parent 63a17d7efa
commit d244106981
4 changed files with 52 additions and 14 deletions

View file

@ -14,11 +14,8 @@ namespace boss {
void System::initialize_boss_ai(DinkyECS::World& world, DinkyECS::Entity boss_id) {
dbc::check(world.has<EnemyConfig>(boss_id), "boss doesn't have an AI EnemyConfig");
auto& config = world.get<EnemyConfig>(boss_id);
auto ai_start = ai::load_state(config.ai_start_name);
auto ai_goal = ai::load_state(config.ai_goal_name);
ai::EntityAI boss_ai(config.ai_script, ai_start, ai_goal);
@ -65,8 +62,6 @@ namespace boss {
battle.set_all("in_combat", true);
battle.plan();
battle.dump();
while(auto act = battle.next()) {
auto [enemy, enemy_action] = *act;
@ -78,12 +73,10 @@ namespace boss {
auto& the_belt = world->get_the<ritual::Belt>();
dbc::check(the_belt.has(attack_id), "STOP passing invalid attack IDs to the system.");
fmt::println("player did damage");
}
if(enemy_action == combat::BattleAction::ATTACK) {
result.enemy_did = enemy.combat.attack(player_combat);
fmt::println("enemy did damage");
}
// need to replicate this in the boss UI