diff options
author | Shmuale Mark <shm.mark@gmail.com> | 2014-06-08 13:41:30 -0400 |
---|---|---|
committer | Shmuale Mark <shm.mark@gmail.com> | 2014-06-08 14:51:57 -0400 |
commit | 54474545af334334c39059844e4a81b7db0f2b5e (patch) | |
tree | 4c416d94a5ccd7790209af6bfa2af37b00dfb9b8 /crawl-ref/source/mon-abil.cc | |
parent | e4778d96ac65ee7d72e96f9b7fac15d933b0c0c7 (diff) | |
download | crawl-ref-54474545af334334c39059844e4a81b7db0f2b5e.tar.gz crawl-ref-54474545af334334c39059844e4a81b7db0f2b5e.zip |
Change a hardcoded list to a monster flag.
This also adds a line to the description of monsters with the M_BLINKER
flag. It reuses the spot that M_VIGILANT was at, but I don't think
that should cause any problems.
Diffstat (limited to 'crawl-ref/source/mon-abil.cc')
-rw-r--r-- | crawl-ref/source/mon-abil.cc | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index 831cd52a15..d0ac0fb2ec 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -3633,20 +3633,6 @@ bool mon_special_ability(monster* mons, bolt & beem) mons->go_berserk(true); break; - case MONS_CRIMSON_IMP: - case MONS_PHANTOM: - case MONS_INSUBSTANTIAL_WISP: - case MONS_BLINK_FROG: - case MONS_KILLER_KLOWN: - case MONS_PRINCE_RIBBIT: - case MONS_MARA: - case MONS_GOLDEN_EYE: - if (mons->no_tele(true, false)) - break; - if (one_chance_in(7) || mons->caught() && one_chance_in(3)) - used = monster_blink(mons); - break; - case MONS_PHANTASMAL_WARRIOR: { actor *foe = mons->get_foe(); @@ -4434,6 +4420,13 @@ bool mon_special_ability(monster* mons, bolt & beem) break; default: + if (mons_class_flag(mclass, M_BLINKER) + && !mons->no_tele(true, false) + && one_chance_in(7) + || mons->caught() && one_chance_in(3)) + { + used = monster_blink(mons); + } break; } |