diff options
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index a95a26a04f..5e21057810 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -990,19 +990,23 @@ static int _place_monster_aux( const mgen_data &mg, menv[id].flags |= MF_JUST_SUMMONED; + // dur should always be 1-6 for monsters that can be abjured. + const bool summoned = mg.abjuration_duration >= 1 + && mg.abjuration_duration <= 6; + if (mg.cls == MONS_DANCING_WEAPON && mg.number != 1) // ie not from spell { - give_item(id, mg.power); + give_item(id, mg.power, summoned); if (menv[id].inv[MSLOT_WEAPON] != NON_ITEM) menv[id].colour = mitm[menv[id].inv[MSLOT_WEAPON]].colour; } else if (mons_class_itemuse(mg.cls) >= MONUSE_STARTING_EQUIPMENT) { - give_item(id, mg.power); + give_item(id, mg.power, summoned); // Give these monsters a second weapon -- bwr if (mons_class_wields_two_weapons(mg.cls)) - give_item(id, mg.power); + give_item(id, mg.power, summoned); unwind_var<int> save_speedinc(menv[id].speed_increment); menv[id].wield_melee_weapon(false); @@ -1038,8 +1042,7 @@ static int _place_monster_aux( const mgen_data &mg, menv[id].behaviour = BEH_WANDER; } - // dur should always be 1-6 for monsters that can be abjured. - if (mg.abjuration_duration >= 1 && mg.abjuration_duration <= 6) + if (summoned) menv[id].mark_summoned( mg.abjuration_duration, true, mg.summon_type ); |