diff options
author | DracoOmega <draco_omega@live.com> | 2014-03-10 21:03:37 -0230 |
---|---|---|
committer | DracoOmega <draco_omega@live.com> | 2014-03-11 20:08:07 -0230 |
commit | ee5dbbc4b769eb9a340a41f3105f31dae84712ce (patch) | |
tree | 60163f65592d33162716f5e7ac1f1f274b0eba2e /crawl-ref/source/mon-act.cc | |
parent | 6ace9f69827c41a67f709e591cf24dd771189481 (diff) | |
download | crawl-ref-ee5dbbc4b769eb9a340a41f3105f31dae84712ce.tar.gz crawl-ref-ee5dbbc4b769eb9a340a41f3105f31dae84712ce.zip |
Revamp Rakshasa
Rakshasa were a monster that seemed to have little purpose. They
couldn't really hurt you (barring picking up a rod or something),
yet would duplicate in large numbers and make it rather hard to
make them go away. This is aimed at turning their basic behavior
into something that can present an actual threat, while
simultaneously being less obtrusive.
Rakshasa's new spellset consists of Phantom Mirror, IMB, and (less)
blink. Phantom Mirror can be used only on other monsters - not
themselves - allowing them to perform a support role by duplicating
other threats. When they are reduced to 50% hp, as a one-time effect
they will split into 3, but cannot otherwise copy themselves or do
so continuously (they only regain this ability after recovering to
full hp, which probably means you ran away and rested for a while).
This commit also gives them actual equipment.
Diffstat (limited to 'crawl-ref/source/mon-act.cc')
-rw-r--r-- | crawl-ref/source/mon-act.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index fa9946b37a..abea14b995 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -2475,6 +2475,20 @@ static void _post_monster_move(monster* mons) if (mons->type == MONS_GUARDIAN_GOLEM) guardian_golem_bond(mons); + // A rakshasa that has regained full health dismisses its emergency clones + // (if they're somehow still alive) and regains the ability to summon new ones. + if (mons->type == MONS_RAKSHASA && mons->hit_points == mons->max_hit_points + && !mons->has_ench(ENCH_PHANTOM_MIRROR) + && mons->props.exists("emergency_clone")) + { + mons->props.erase("emergency_clone"); + for (monster_iterator mi; mi; ++mi) + { + if (mi->type == MONS_RAKSHASA && mi->summoner == mons->mid) + mi->del_ench(ENCH_ABJ); + } + } + if (mons->type != MONS_NO_MONSTER && mons->hit_points < 1) monster_die(mons, KILL_MISC, NON_MONSTER); } |