From 90b272a317a96b72679acd8bd21f5ac9af77d000 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 29 Oct 2007 12:30:20 +0000 Subject: Beogh conversion fixes for trunk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2660 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index abbcefe830..2f4543b9f6 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3648,6 +3648,7 @@ static int affect_monster(bolt &beam, monsters *mon) return (BEAM_STOP); } + bool hit_woke_orc = false; if (beam.name[0] == '0') { if (beam.is_tracer) @@ -3684,6 +3685,14 @@ static int affect_monster(bolt &beam, monsters *mon) if (mons_holiness( mon ) == MH_HOLY) did_god_conduct( DID_ATTACK_HOLY, mon->hit_dice, mon ); + + if (you.religion == GOD_BEOGH && mons_species(mon->type) == MONS_ORC + && mon->behaviour == BEH_SLEEP && you.species == SP_HILL_ORC + && !player_under_penance() && you.piety >= 75) + { + hit_woke_orc = true; + } + } behaviour_event( mon, ME_ANNOY, beam_source(beam) ); @@ -3721,6 +3730,8 @@ static int affect_monster(bolt &beam, monsters *mon) break; } } + if (hit_woke_orc) + beogh_follower_convert(mon, true); return (rangeUsed); // END non-tracer enchantment @@ -3832,6 +3843,14 @@ static int affect_monster(bolt &beam, monsters *mon) did_god_conduct( DID_ATTACK_HOLY, mon->hit_dice, mon ); } + if (you.religion == GOD_BEOGH && mons_species(mon->type) == MONS_ORC + && mon->behaviour == BEH_SLEEP && you.species == SP_HILL_ORC + && YOU_KILL(beam.thrower) && !player_under_penance() + && you.piety >= 75) + { + hit_woke_orc = true; + } + // Don't annoy friendlies if the player's beam did no damage. // Hostiles will still take umbrage. if (hurt_final > 0 || !mons_friendly(mon) || !YOU_KILL(beam.thrower)) @@ -3961,6 +3980,8 @@ static int affect_monster(bolt &beam, monsters *mon) if (wake_mimic && mons_is_mimic( mon->type )) mimic_alert(mon); + else if (hit_woke_orc) + beogh_follower_convert(mon, true); } return (range_used_on_hit(beam)); -- cgit v1.2.3-54-g00ecf