summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/beam.cc3
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/religion.cc29
-rw-r--r--crawl-ref/source/spells4.cc4
4 files changed, 19 insertions, 18 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 7421c0ec11..c4ae949a47 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3029,8 +3029,9 @@ static int _affect_wall(bolt &beam, const coord_def& p)
if (targ_grid == DNGN_ORCISH_IDOL
&& beam.beam_source == NON_MONSTER)
{
- beogh_idol_revenge();
+ did_god_conduct(DID_DESTROY_ORCISH_IDOL, 4);
}
+
beam.obvious_effect = true;
}
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 173eb2b675..a95fe77591 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -674,6 +674,7 @@ enum conduct_type
DID_EAT_SOULED_BEING, // Zin
DID_DELIBERATE_MUTATING, // Zin
DID_CAUSE_GLOWING, // Zin
+ DID_DESTROY_ORCISH_IDOL, // Beogh
DID_CREATE_LIFE, // unused
NUM_CONDUCTS
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index a6c770d4f7..a275fef8a8 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2590,6 +2590,8 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
// blame.
case DID_KILL_HOLY:
case DID_HOLY_KILLED_BY_SERVANT:
+ tso_holy_revenge();
+
switch (you.religion)
{
case GOD_ZIN:
@@ -2838,6 +2840,17 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
}
break;
+ case DID_DESTROY_ORCISH_IDOL:
+ beogh_idol_revenge();
+
+ if (you.religion == GOD_BEOGH)
+ {
+ piety_change = -level * 2;
+ penance = level * 6;
+ ret = true;
+ }
+ break;
+
case DID_STABBING: // unused
case DID_STIMULANTS: // unused
case DID_EAT_MEAT: // unused
@@ -2869,7 +2882,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
"Spell Cast", "Spell Practise", "Spell Nonutility", "Cards",
"Stimulants", "Drink Blood", "Cannibalism", "Eat Meat",
"Eat Souled Being", "Deliberate Mutation", "Cause Glowing",
- "Create Life"
+ "Destroy Orcish Idol", "Create Life"
};
COMPILE_CHECK(ARRAYSZ(conducts) == NUM_CONDUCTS, c1);
@@ -2881,9 +2894,6 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
}
#endif
- if (thing_done == DID_KILL_HOLY || thing_done == DID_HOLY_KILLED_BY_SERVANT)
- tso_holy_revenge();
-
return (ret);
}
@@ -4930,17 +4940,6 @@ void beogh_idol_revenge()
revenge = _get_beogh_speech("idol other").c_str();
god_smites_you(GOD_BEOGH, revenge);
-
- if (you.religion == GOD_BEOGH)
- {
- // count this as an attack on a fellow orc; it comes closest
- // and gives the same result (penance + piety loss)
- monsters dummy;
- dummy.type = MONS_ORC;
- dummy.attitude = ATT_FRIENDLY;
-
- did_god_conduct(DID_ATTACK_FRIEND, 8, true, &dummy);
- }
}
}
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 9b972a24f5..af2acc4cf8 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -270,7 +270,7 @@ static int _shatter_walls(coord_def where, int pow, int garbage)
grd(where) = DNGN_FLOOR;
if (grid == DNGN_ORCISH_IDOL)
- beogh_idol_revenge();
+ did_god_conduct(DID_DESTROY_ORCISH_IDOL, 4);
return (1);
}
@@ -2029,7 +2029,7 @@ bool cast_fragmentation(int pow, const dist& spd)
explosion(beam, hole, true);
if (grid == DNGN_ORCISH_IDOL)
- beogh_idol_revenge();
+ did_god_conduct(DID_DESTROY_ORCISH_IDOL, 4);
}
else if (beam.damage.num == 0)
{