witch now tells you what potion it used
This commit is contained in:
@ -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<potion_type>(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;
|
||||
|
Reference in New Issue
Block a user