Refactored boss fight to pull out the FSM code into boss::Fight.

This commit is contained in:
Zed A. Shaw 2025-09-29 13:19:59 -04:00
parent 3b11ed0a75
commit 61a40ae7cd
11 changed files with 127 additions and 94 deletions

View file

@ -7,7 +7,7 @@
#include "gui/combat_ui.hpp"
#include "gui/status_ui.hpp"
#include "gui/loot_ui.hpp"
#include "boss/ui.hpp"
#include "boss/fight.hpp"
#include "gui/map_view.hpp"
#include "events.hpp"
#include "gui/event_router.hpp"
@ -33,10 +33,9 @@ namespace gui {
bool $draw_stats = false;
bool autowalking = false;
bool $map_open = false;
int $temp_attack_id = 0;
DebugUI $debug_ui;
MainUI $main_ui;
std::shared_ptr<boss::UI> $boss_fight_ui = nullptr;
std::shared_ptr<boss::Fight> $boss_fight = nullptr;
CombatUI $combat_ui;
StatusUI $status_ui;
MapViewUI $map_ui;
@ -51,11 +50,11 @@ namespace gui {
void autowalk();
void start_autowalk(double rot_speed);
void START(Event );
void MOVING(Event );
void ATTACKING(Event );
void MAPPING(Event);
void ROTATING(Event );
void START(Event ev);
void MOVING(Event ev);
void ATTACKING(Event ev, std::any data);
void MAPPING(Event ev);
void ROTATING(Event ev);
void IDLE(Event ev, std::any data);
void IN_COMBAT(Event ev);
void COMBAT_ROTATE(Event ev);