diff options
-rw-r--r-- | crawl-ref/source/fight.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/mon-data.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/spells4.cc | 34 |
3 files changed, 18 insertions, 21 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index e3086a1f90..39439c841d 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2256,8 +2256,7 @@ bool melee_attack::distortion_affects_defender() //jmf: blink frogs *like* distortion // I think could be amended to let blink frogs "grow" like // jellies do {dlb} - if (defender->id() == MONS_BLINK_FROG - || defender->id() == MONS_PRINCE_RIBBIT) + if (mons_genus(defender_as_monster()->type) == MONS_BLINK_FROG) { if (one_chance_in(5)) { diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 63d9c21185..6e2a784afe 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -2040,7 +2040,7 @@ static monsterentry mondata[] = { MONS_BLINK_FROG, 'F', LIGHTGREEN, "blink frog", M_COLD_BLOOD | M_SPECIAL_ABILITY, MR_NO_FLAGS, - 800, 12, MONS_GIANT_FROG, MONS_BLINK_FROG, MH_NATURAL, -5, + 800, 12, MONS_BLINK_FROG, MONS_BLINK_FROG, MH_NATURAL, -5, { {AT_HIT, AF_BLINK, 20}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 6, 3, 5, 0 }, 3, 12, MST_NO_SPELLS, CE_CLEAN, Z_SMALL, S_CROAK, I_ANIMAL, diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index c560435d5e..44db4ff667 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -854,39 +854,37 @@ void cast_discharge(int pow) // Really this is just applying the best of Band/Warp weapon/Warp field // into a spell that gives the "make monsters go away" benefit without -// the insane damage potential. -- bwr +// the insane damage potential. - bwr int disperse_monsters(coord_def where, int pow, int, actor *) { - monsters *defender = monster_at(where); - if (defender == NULL) - return 0; + monsters *mon = monster_at(where); + if (!mon) + return (0); - if (defender->type == MONS_BLINK_FROG - || defender->type == MONS_PRINCE_RIBBIT) + if (mons_genus(mon->type) == MONS_BLINK_FROG) { - simple_monster_message(defender, " resists."); - return 1; + simple_monster_message(mon, " resists."); + return (1); } - else if (defender->check_res_magic(pow)) + else if (mon->check_res_magic(pow)) { - // XXX Note that this might affect magic-immunes! + // XXX: Note that this might affect magic-immunes! if (coinflip()) { - simple_monster_message(defender, " partially resists."); - monster_blink(defender); + simple_monster_message(mon, " partially resists."); + monster_blink(mon); } else - simple_monster_message(defender, " resists."); - - return 1; + simple_monster_message(mon, " resists."); + return (1); } else { - monster_teleport( defender, true ); - return 1; + monster_teleport(mon, true); + return (1); } - return 0; + return (0); } void cast_dispersal(int pow) |