Boss fight working better now, but I need to fix the events.
This commit is contained in:
parent
fe76196f83
commit
6c34fea64a
3 changed files with 46 additions and 38 deletions
17
boss/ui.cpp
17
boss/ui.cpp
|
|
@ -68,23 +68,6 @@ namespace boss {
|
|||
boss_combat.hp, boss_combat.max_hp,
|
||||
boss_combat.ap, boss_combat.max_ap);
|
||||
|
||||
if($world->has_event<Events::GUI>()) {
|
||||
auto [evt, entity, data] = $world->recv<Events::GUI>();
|
||||
auto result = std::any_cast<Events::Combat>(data);
|
||||
|
||||
if(result.player_did > 0) {
|
||||
status += L"\nYOU HIT!";
|
||||
} else {
|
||||
status += L"\nYOU MISSED!";
|
||||
}
|
||||
|
||||
if(result.enemy_did > 0) {
|
||||
status += L"\nBOSS HIT!";
|
||||
} else {
|
||||
status += L"\nBOSS MISSED!";
|
||||
}
|
||||
}
|
||||
|
||||
$actions.show_text("stats", status);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue