Fix up the main game based on arena changes.

This commit is contained in:
Zed A. Shaw 2025-12-05 11:20:35 -05:00
parent f839edcd56
commit 94b46a2f95
5 changed files with 9 additions and 10 deletions

View file

@ -234,6 +234,7 @@ void System::combat(int attack_id) {
auto& world = *level.world;
const auto& player_pos = GameDB::player_position();
auto& player_combat = world.get<Combat>(level.player);
auto& player_ai = world.get<ai::EntityAI>(level.player);
// this is guaranteed to not return the given position
auto [found, nearby] = collider.neighbors(player_pos.location);
@ -248,6 +249,7 @@ void System::combat(int attack_id) {
}
}
battle.add_enemy({level.player, &player_ai, &player_combat, true});
battle.set_all("enemy_found", true);
battle.set_all("in_combat", true);
battle.player_request("kill_enemy");