Fixed the boss::UI::damage so it says who hit who.

This commit is contained in:
Zed A. Shaw 2025-12-30 01:11:08 -05:00
parent 5676382fbb
commit 6dc9d564c6
4 changed files with 11 additions and 7 deletions

View file

@ -106,11 +106,12 @@ namespace boss {
$arena.play_animations();
}
void UI::damage(const std::string& actor, int amount) {
$arena.attach_text(actor, fmt::format("{}", amount));
void UI::damage(const std::string& actor, const std::string& target, int amount) {
if(amount > 0) {
$arena.attach_text(target, fmt::format("{}", amount));
$arena.apply_effect(actor, "flame");
} else {
$arena.attach_text(actor, "MISSED");
}
}
}