From f6dbf6ee410a189a5556d82525cfcc028f69fdc9 Mon Sep 17 00:00:00 2001 From: a25liang Date: Sat, 20 Jul 2024 15:29:28 -0400 Subject: [PATCH] witch now tells you what potion it used --- src/enemies/witch.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/enemies/witch.cc b/src/enemies/witch.cc index 559dd6f..8fe0315 100644 --- a/src/enemies/witch.cc +++ b/src/enemies/witch.cc @@ -14,13 +14,15 @@ long_result witch::attack(character *ch) { auto res = ch->get_hit(this, ATK, base_hit_rate); if (res.res == HIT && rng->trial(POTION_RATE)) { - res.msg += "W's potion spilled onto PC. "; potion_type type = static_cast(rng->rand_under( (enabled_features & FEATURE_EXTRA_STUFF) ? POTION_TYPE_CNT : DEFAULT_POTION_TYPE_CNT)); - ch->apply_effect(new_potion(type, {0, 0})); + auto npotion = new_potion(type, {0, 0}); + res.msg += std::string("Z's potion of ") + + npotion->get_name() + " spilled onto PC. "; + ch->apply_effect(std::move(npotion)); } return res;