diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-19 05:55:49 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-19 06:31:39 -0600 |
commit | ad599ad1c85be1ffba72f5aacacf869fa85010ca (patch) | |
tree | 40ee99cb940687ed21de444be1bbf78003b3316f /crawl-ref/source/monster.cc | |
parent | b1aaf507f2ecb50a7792037b1f9894e06591ce3d (diff) | |
download | crawl-ref-ad599ad1c85be1ffba72f5aacacf869fa85010ca.tar.gz crawl-ref-ad599ad1c85be1ffba72f5aacacf869fa85010ca.zip |
Split chaotic things into unclean and chaotic things.
Chaotic things are now shapeshifters, mutators, etc., while unclean
things are diseasing things, rotting things, etc.
Zin still hates both. As good gods treat both unholy and evil monsters
as evil, he'll treat both unclean and chaotic monsters as chaotic.
Note that silver will only do extra damage to chaotics, as before.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r-- | crawl-ref/source/monster.cc | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 0d6e8d0fe2..ccbdceabc1 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -2766,6 +2766,15 @@ bool monsters::has_evil_spell() const return (false); } +bool monsters::has_unclean_spell() const +{ + for (int i = 0; i < NUM_MONSTER_SPELL_SLOTS; ++i) + if (is_unclean_spell(spells[i])) + return (true); + + return (false); +} + bool monsters::has_chaotic_spell() const { for (int i = 0; i < NUM_MONSTER_SPELL_SLOTS; ++i) @@ -3037,6 +3046,23 @@ bool monsters::is_evil() const return (false); } +bool monsters::is_unclean() const +{ + if (has_unclean_spell()) + return (true); + + if (has_attack_flavour(AF_DISEASE) + || has_attack_flavour(AF_HUNGER) + || has_attack_flavour(AF_ROT) + || has_attack_flavour(AF_STEAL) + || has_attack_flavour(AF_STEAL_FOOD)) + { + return (true); + } + + return (false); +} + bool monsters::is_chaotic() const { if (type == MONS_UGLY_THING || type == MONS_VERY_UGLY_THING) @@ -3052,14 +3078,9 @@ bool monsters::is_chaotic() const if (has_chaotic_spell()) return (true); - if (has_attack_flavour(AF_DISEASE) - || has_attack_flavour(AF_HUNGER) - || has_attack_flavour(AF_MUTATE) - || has_attack_flavour(AF_ROT) + if (has_attack_flavour(AF_MUTATE) || has_attack_flavour(AF_KLOWN) - || has_attack_flavour(AF_CHAOS) - || has_attack_flavour(AF_STEAL) - || has_attack_flavour(AF_STEAL_FOOD)) + || has_attack_flavour(AF_CHAOS)) { return (true); } |