From e864f4d3b84c1efe09175652a9830dddbc0bd6a5 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 30 Dec 2007 20:31:38 +0000 Subject: A completely reworked version of Zin as per the lengthy discussion in October/November. Zin effects: - protection from harm (like all good gods) - feeding when starving (as before) - mutation resistance (chance of piety/200) Zin restrictions: - no cannibalism (like all good gods) - no attacking friends - no eating of intelligent beings' corpses - no deliberate mutating Zin invocations: - Smiting (general priestly ability?) - Revitalisation (Minor Healing + 5 mp) - Sanctuary (protection from attacks) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3164 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index bd6ffba766..fd38a1aa4c 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3692,6 +3692,12 @@ static int affect_monster(bolt &beam, monsters *mon) { if (YOU_KILL( beam.thrower )) { + if (is_sanctuary(mon->x, mon->y) + || is_sanctuary(you.x_pos, you.y_pos)) + { + remove_sanctuary(true); + } + if (mons_friendly( mon )) did_god_conduct( DID_ATTACK_FRIEND, 5, true, mon ); @@ -3855,6 +3861,12 @@ static int affect_monster(bolt &beam, monsters *mon) beam.aux_source == "reading a scroll of immolation" && !beam.effect_known; + if (is_sanctuary(mon->x, mon->y) + || is_sanctuary(you.x_pos, you.y_pos)) + { + remove_sanctuary(true); + } + if (mons_friendly(mon)) conduct.set( DID_ATTACK_FRIEND, 5, !okay, mon ); -- cgit v1.2.3-54-g00ecf