diff options
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r-- | crawl-ref/source/spells1.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 81abfc781b..f4697c7e52 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -654,30 +654,18 @@ void abjuration(int pow) { monster = &menv[ab]; - int abjLevel; - if (monster->type == -1 || !mons_near(monster)) continue; if (mons_friendly(monster)) continue; - abjLevel = mons_del_ench(monster, ENCH_ABJ_I, ENCH_ABJ_VI); - if (abjLevel != ENCH_NONE) - { - abjLevel -= 1 + (random2(pow) / 8); - - if (abjLevel < ENCH_ABJ_I) - { - mons_add_ench(monster, ENCH_ABJ_I); - monster_die(monster, KILL_RESET, 0); - } - else - { - simple_monster_message(monster, " shudders."); - mons_add_ench(monster, abjLevel); - } - } + mon_enchant abj = monster->get_ench(ENCH_ABJ); + if (abj.ench != ENCH_NONE) + monster->lose_ench_levels(abj, 1 + (random2(pow) / 8)); + + if (monster->has_ench(ENCH_ABJ)) + simple_monster_message(monster, " shudders."); } } // end abjuration() |