summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-15 17:02:02 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-15 17:02:02 +0000
commit5ec81a1f6695b9253b85ada7fa8a4eb7a51f7209 (patch)
tree149223ecd8469ed3a69e97383268747587d879df /crawl-ref/source
parentb0e7dda3593b5e6022799727f3eb177fae3a5987 (diff)
downloadcrawl-ref-5ec81a1f6695b9253b85ada7fa8a4eb7a51f7209.tar.gz
crawl-ref-5ec81a1f6695b9253b85ada7fa8a4eb7a51f7209.zip
Per jpeg's suggestion, add a "desecrate orcish remains" conduct for
Beogh. This will cause a small piety hit, but no penance, for butchering orc corpses, or for using non-area necromantic spells on orcish remains which can (a) destroy them without creating zombified orcs, or (b) turn them non-orcish (Fulsome Distillation, Sublimation of Blood, Bone Shards, and Twisted Resurrection). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9498 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/delay.cc15
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/religion.cc36
-rw-r--r--crawl-ref/source/spells3.cc25
-rw-r--r--crawl-ref/source/spells4.cc5
5 files changed, 74 insertions, 8 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 4da64e1076..d94aab9e5c 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1101,6 +1101,8 @@ static void _finish_delay(const delay_queue_item &delay)
item_def &item = (delay.parm1 ? you.inv[delay.parm2]
: mitm[delay.parm2]);
+ const bool was_orc = (mons_species(item.plus) == MONS_ORC);
+
vampire_nutrition_per_turn(item, 1);
if (mons_skeleton(item.plus) && one_chance_in(3))
@@ -1112,6 +1114,9 @@ static void _finish_delay(const delay_queue_item &delay)
else
dec_mitm_item_quantity(delay.parm2, 1);
}
+
+ if (was_orc)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2);
break;
}
case DELAY_MEMORISE:
@@ -1191,10 +1196,15 @@ static void _finish_delay(const delay_queue_item &delay)
{
mpr("You finish bottling this corpse's blood.");
+ const bool was_orc = (mons_species(item.plus) == MONS_ORC);
+
if (mons_skeleton(item.plus) && one_chance_in(3))
turn_corpse_into_skeleton_and_blood_potions(item);
else
turn_corpse_into_blood_potions(item);
+
+ if (was_orc)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2);
}
else
{
@@ -1227,6 +1237,8 @@ static void _finish_delay(const delay_queue_item &delay)
mpr("What a waste.");
}
+ const bool was_orc = (mons_species(item.plus) == MONS_ORC);
+
if (mons_skeleton(item.plus) && one_chance_in(3))
turn_corpse_into_skeleton_and_chunks(item);
else
@@ -1238,6 +1250,9 @@ static void _finish_delay(const delay_queue_item &delay)
mpr("You enjoyed that.");
you.berserk_penalty = 0;
}
+
+ if (was_orc)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2);
}
// Don't autopickup chunks/potions if there's still another
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 439313189f..478b36d1ad 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -719,6 +719,7 @@ enum conduct_type
DID_DELIBERATE_MUTATING, // Zin
DID_CAUSE_GLOWING, // Zin
DID_CHAOS, // Zin (used weapon/magic of chaos)
+ DID_DESECRATE_ORCISH_REMAINS, // Beogh
DID_DESTROY_ORCISH_IDOL, // Beogh
DID_CREATE_LIFE, // unused
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 0021621001..b701b4a786 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -530,7 +530,7 @@ std::string get_god_likes(god_type which_god, bool verbose)
case GOD_BEOGH:
snprintf(info, INFO_SIZE, "you bless dead orcs%s",
- verbose ? " (by standing over their corpses and <w>p</w>raying)" : "");
+ verbose ? " (by standing over their remains and <w>p</w>raying)" : "");
likes.push_back(info);
break;
@@ -784,6 +784,7 @@ std::string get_god_dislikes(god_type which_god, bool /*verbose*/)
break;
case GOD_BEOGH:
+ dislikes.push_back("you desecrate orcish remains");
dislikes.push_back("you destroy orcish idols");
break;
@@ -3074,6 +3075,14 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
}
break;
+ case DID_DESECRATE_ORCISH_REMAINS:
+ if (you.religion == GOD_BEOGH)
+ {
+ piety_change = -level;
+ retval = true;
+ }
+ break;
+
case DID_DESTROY_ORCISH_IDOL:
if (you.religion == GOD_BEOGH)
{
@@ -3116,7 +3125,8 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
"Spell Practise", "Spell Nonutility", "Cards", "Stimulants",
"Drink Blood", "Cannibalism", "Eat Meat", "Eat Souled Being",
"Deliberate Mutation", "Cause Glowing", "Use Chaos",
- "Destroy Orcish Idol", "Create Life"
+ "Desecrate Orcish Remains", "Destroy Orcish Idol",
+ "Create Life"
};
COMPILE_CHECK(ARRAYSZ(conducts) == NUM_CONDUCTS, c1);
@@ -6230,7 +6240,6 @@ static bool _god_likes_item(god_type god, const item_def& item)
case GOD_BEOGH:
return (item.base_type == OBJ_CORPSES
- && item.sub_type == CORPSE_BODY
&& mons_species(item.plus) == MONS_ORC);
case GOD_NEMELEX_XOBEH:
@@ -6286,10 +6295,21 @@ static piety_gain_t _sacrifice_one_item_noncount(const item_def& item)
{
const int item_orig = item.orig_monnum - 1;
- if ((item_orig == MONS_SAINT_ROKA && !one_chance_in(5))
- || (item_orig == MONS_ORC_HIGH_PRIEST && x_chance_in_y(3, 5))
- || (item_orig == MONS_ORC_PRIEST && x_chance_in_y(2, 5))
- || one_chance_in(5))
+ int chance = 4;
+
+ if (item_orig == MONS_SAINT_ROKA)
+ chance += 12;
+ else if (item_orig == MONS_ORC_HIGH_PRIEST)
+ chance += 8;
+ else if (item_orig == MONS_ORC_PRIEST)
+ chance += 4;
+
+ if (food_is_rotten(item))
+ chance--;
+ else if (item.sub_type == CORPSE_SKELETON)
+ chance -= 2;
+
+ if (x_chance_in_y(chance, 20))
{
gain_piety(1);
relative_piety_gain = PIETY_SOME;
@@ -6525,7 +6545,7 @@ void offer_items()
if (you.religion == GOD_SHINING_ONE)
simple_god_message(" only cares about evil items!");
else if (you.religion == GOD_BEOGH)
- simple_god_message(" only cares about orc corpses!");
+ simple_god_message(" only cares about orcish remains!");
else if (you.religion == GOD_NEMELEX_XOBEH)
simple_god_message(" expects you to use your decks, not offer them!");
}
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 0b4ce3865c..ccbb018590 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -291,11 +291,16 @@ bool cast_bone_shards(int power, bolt &beam)
bool success = false;
+ const bool was_orc = (mons_species(you.weapon()->plus) == MONS_ORC);
+
if (you.weapon()->sub_type != CORPSE_SKELETON)
{
mpr("The corpse collapses into a pulpy mess.");
dec_inv_item_quantity(you.equip[EQ_WEAPON], 1);
+
+ if (was_orc)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2);
}
else
{
@@ -311,6 +316,9 @@ bool cast_bone_shards(int power, bolt &beam)
dec_inv_item_quantity(you.equip[EQ_WEAPON], 1);
+ if (was_orc)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2);
+
zapping(ZAP_BONE_SHARDS, power, beam);
success = true;
@@ -337,6 +345,9 @@ bool cast_sublimation_of_blood(int pow)
inc_mp(7 + random2(7), false);
dec_inv_item_quantity(wielded, 1);
+
+ if (mons_species(you.inv[wielded].plus) == MONS_ORC)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2);
}
else if (is_blood_potion(you.inv[wielded]))
{
@@ -1039,6 +1050,7 @@ bool cast_simulacrum(int pow, god_type god)
bool cast_twisted_resurrection(int pow, god_type god)
{
int how_many_corpses = 0;
+ int how_many_orcs = 0;
int total_mass = 0;
int rotted = 0;
@@ -1048,6 +1060,8 @@ bool cast_twisted_resurrection(int pow, god_type god)
{
total_mass += mons_weight(si->plus);
how_many_corpses++;
+ if (mons_species(si->plus) == MONS_ORC)
+ how_many_orcs++;
if (food_is_rotten(*si))
rotted++;
destroy_item(si->index());
@@ -1080,6 +1094,10 @@ bool cast_twisted_resurrection(int pow, god_type god)
{
mprf("The corpse%s collapse%s into a pulpy mess.",
how_many_corpses > 1 ? "s": "", how_many_corpses > 1 ? "": "s");
+
+ if (how_many_orcs > 0)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2 * how_many_orcs);
+
return (false);
}
@@ -1102,6 +1120,10 @@ bool cast_twisted_resurrection(int pow, god_type god)
if (monster == -1)
{
mpr("The corpses collapse into a pulpy mess.");
+
+ if (how_many_orcs > 0)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2 * how_many_orcs);
+
return (false);
}
@@ -1110,6 +1132,9 @@ bool cast_twisted_resurrection(int pow, god_type god)
mpr("The heap of corpses melds into an agglomeration of writhing flesh!");
+ if (how_many_orcs > 0)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2 * how_many_orcs);
+
if (mon == MONS_ABOMINATION_LARGE)
{
menv[monster].hit_dice = 8 + total_mass / ((colour == LIGHTRED) ? 500 :
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 0121d43739..8b9a271d50 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -1324,6 +1324,8 @@ void cast_fulsome_distillation(int pow)
}
}
+ const bool was_orc = (mons_species(mitm[corpse].plus) == MONS_ORC);
+
// We borrow the corpse's object to make our potion.
mitm[corpse].base_type = OBJ_POTIONS;
mitm[corpse].sub_type = pot_type;
@@ -1340,6 +1342,9 @@ void cast_fulsome_distillation(int pow)
// Try to move the potion to the player (for convenience).
if (move_item_to_player(corpse, 1) != 1)
mpr("Unfortunately, you can't carry it right now!");
+
+ if (was_orc)
+ did_god_conduct(DID_DESECRATE_ORCISH_REMAINS, 2);
}
bool cast_fragmentation(int pow, const dist& spd)