diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-06 10:54:31 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-06 10:54:31 +0000 |
commit | 6bc2ed8d726d40e06198a96719d0b7457c53a284 (patch) | |
tree | d03858a788b00109c78a4782eb1caafdd29a2a27 /crawl-ref/source/monstuff.cc | |
parent | 7281e182f7ade312409dee7b007188906169918e (diff) | |
download | crawl-ref-6bc2ed8d726d40e06198a96719d0b7457c53a284.tar.gz crawl-ref-6bc2ed8d726d40e06198a96719d0b7457c53a284.zip |
Change conducts of Zin and TSO (!)
Zin:
- DID_UNDEAD_KILLED_BY_SERVANT
- DID_DEMON_KILLED_BY_SERVANT
+ DID_KILL_MUTATOR_OR_ROTTER
(shapeshifters and monsters that have an attack AF_MUTATE or AF_ROT)
TSO:
+ DID_KILL_NATURAL_EVIL
+ DID_NATURAL_EVIL_KILLED_BY_SERVANT
Removed M_EVIL flag from a number of early monsters such as goblins
and hobgoblins, and also from orcs, ogres, trolls and big kobold.
Reasoning: The corresponding species are not considered evil
themselves and are allowed to worship the good gods).
Note that this weakens all forms of holy attacks!
Any attempt to charm evil, undead or demonic monsters will fail
(no effect) for worshippers of TSO.
Like Makhleb, TSO now gets returning power (arguable) and hp from
killing evil, undead and demonic monsters.
Zin's piety pool (from donations) is drained much quicker now, on
average once every 5 turns.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3213 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index b4b1f789b6..8ea1230d67 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -469,6 +469,22 @@ static bool monster_avoided_death(monsters *monster, killer_type killer, int i) return (false); } +bool is_mons_evil_demonic_or_undead(monsters *mons) +{ + return (mons_holiness(mons) == MH_UNDEAD + || mons_holiness(mons) == MH_DEMONIC + || mons_is_evil(mons)); +} + +static bool is_mons_mutator_or_rotter(monsters *mons) +{ + if (mons->has_ench(ENCH_GLOWING_SHAPESHIFTER, ENCH_SHAPESHIFTER)) + return true; + + const int attk_flavour = mons_attack_spec(mons, 0).flavour; + return (attk_flavour == AF_MUTATE || attk_flavour == AF_ROT); +} + void monster_die(monsters *monster, killer_type killer, int i, bool silent) { if (monster->type == -1) @@ -640,9 +656,16 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) did_god_conduct(DID_KILL_DEMON, monster->hit_dice, true, monster); - if (mons_class_flag(monster->type, M_EVIL)) + if (mons_class_flag(monster->type, M_EVIL) + && mons_holiness(monster) == MH_NATURAL) + { did_god_conduct(DID_KILL_NATURAL_EVIL, monster->hit_dice, true, monster); + } + + if (is_mons_mutator_or_rotter(monster)) + did_god_conduct(DID_KILL_MUTATOR_OR_ROTTER, + monster->hit_dice, true, monster); // jmf: Trog hates wizards if (mons_is_magic_user(monster)) @@ -663,7 +686,9 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) // born-friendly monsters. The mutation still applies, however. if (you.mutation[MUT_DEATH_STRENGTH] || (!created_friendly - && you.religion == GOD_MAKHLEB + && (you.religion == GOD_MAKHLEB + || you.religion == GOD_SHINING_ONE + && is_mons_evil_demonic_or_undead(monster)) && (!player_under_penance() && random2(you.piety) >= 30))) { if (you.hp < you.hp_max) @@ -675,7 +700,9 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) } if (!created_friendly - && (you.religion == GOD_MAKHLEB || you.religion == GOD_VEHUMET) + && (you.religion == GOD_MAKHLEB || you.religion == GOD_VEHUMET + || you.religion == GOD_SHINING_ONE + && is_mons_evil_demonic_or_undead(monster)) && (!player_under_penance() && random2(you.piety) >= 30)) { if (you.magic_points < you.max_magic_points) @@ -790,6 +817,20 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) inc_mp( 1 + random2(monster->hit_dice / 2), false ); } } + + if (you.religion == GOD_SHINING_ONE + && is_mons_evil_demonic_or_undead(monster) + && (!player_under_penance() && random2(you.piety) >= 30)) + { + monsters *mon = &menv[i]; + if (mon->hit_points < mon->max_hit_points) + { + simple_monster_message(mon, " looks healthier."); + mon->hit_points += 1 + random2(monster->hit_dice / 4); + if (mon->hit_points > mon->max_hit_points) + mon->hit_points = mon->max_hit_points; + } + } } break; |