diff options
-rw-r--r-- | crawl-ref/source/abl-show.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/beam.cc | 21 |
2 files changed, 21 insertions, 9 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index 446709cbfe..2559e76713 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -1478,6 +1478,9 @@ static bool _do_ability(const ability_def& abil) break; case ABIL_KIKU_ENSLAVE_UNDEAD: + { + god_acting gdact; + if (!spell_direction(spd, beam)) return (false); @@ -1486,8 +1489,10 @@ static bool _do_ability(const ability_def& abil) { return (false); } + exercise(SK_INVOCATIONS, 5 + random2(5)); break; + } case ABIL_KIKU_INVOKE_DEATH: summon_demon_type(MONS_REAPER, @@ -1516,12 +1521,12 @@ static bool _do_ability(const ability_def& abil) break; case ABIL_YRED_DRAIN_LIFE: - drain_life( you.skills[SK_INVOCATIONS] ); + drain_life(you.skills[SK_INVOCATIONS]); exercise(SK_INVOCATIONS, 2 + random2(4)); break; case ABIL_YRED_CONTROL_UNDEAD: - mass_enchantment( ENCH_CHARM, you.skills[SK_INVOCATIONS] * 8, MHITYOU ); + mass_enchantment(ENCH_CHARM, you.skills[SK_INVOCATIONS] * 8, MHITYOU); exercise(SK_INVOCATIONS, 3 + random2(4)); break; diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 85577e91f4..d5324c22fd 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3339,12 +3339,12 @@ static void _affect_place_explosion_clouds(bolt &beam, const coord_def& p) const god_type god = (crawl_state.is_god_acting()) ? crawl_state.which_god_acting() : GOD_NO_GOD; - const beh_type att = - _whose_kill(beam) == KC_OTHER? BEH_HOSTILE : BEH_FRIENDLY; + _whose_kill(beam) == KC_OTHER ? BEH_HOSTILE : BEH_FRIENDLY; + mons_place( mgen_data(MONS_FIRE_VORTEX, att, 2, p, - MHITNOT, 0, god) ); + MHITNOT, 0, god)); } } } @@ -4757,15 +4757,19 @@ static int _affect_monster_enchantment(bolt &beam, monsters *mon) if (beam.flavour == BEAM_ENSLAVE_UNDEAD && mons_holiness(mon) == MH_UNDEAD) { + const god_type god = + (crawl_state.is_god_acting()) ? crawl_state.which_god_acting() + : GOD_NO_GOD; + #if DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, - "HD: %d; pow: %d", mon->hit_dice, beam.ench_power ); + "HD: %d; pow: %d", mon->hit_dice, beam.ench_power); #endif if (mon->attitude == ATT_FRIENDLY) return (MON_UNAFFECTED); - if (check_mons_resist_magic( mon, beam.ench_power )) + if (check_mons_resist_magic(mon, beam.ench_power)) return mons_immune_magic(mon) ? MON_UNAFFECTED : MON_RESIST; beam.obvious_effect = true; @@ -4779,6 +4783,10 @@ static int _affect_monster_enchantment(bolt &beam, monsters *mon) // Wow, permanent enslaving! mon->attitude = ATT_FRIENDLY; + behaviour_event(mon, ME_ALERT, MHITNOT); + + mons_make_god_gift(mon, god); + return (MON_AFFECTED); } @@ -4814,9 +4822,8 @@ static int _affect_monster_enchantment(bolt &beam, monsters *mon) mon->attitude = ATT_FRIENDLY; else mon->add_ench(ENCH_CHARM); + behaviour_event(mon, ME_ALERT, MHITNOT); - // Break fleeing and suchlike. - mon->behaviour = BEH_SEEK; return (MON_AFFECTED); } |