summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorAlex MacDonald <alex@alexjmacdonald.com>2009-11-13 16:13:41 -0500
committerAdam Borowski <kilobyte@angband.pl>2009-11-14 01:21:47 +0100
commit8784d423f3ba3834d8d75310dc06202f458fa3f9 (patch)
treecf2806fd93ce5d8b7e3a6ddeffc5db1a7a022f72 /crawl-ref
parente7d868d98dd3553a0bf6ed9fa68d36b99391b1bb (diff)
downloadcrawl-ref-8784d423f3ba3834d8d75310dc06202f458fa3f9.tar.gz
crawl-ref-8784d423f3ba3834d8d75310dc06202f458fa3f9.zip
Tied up loose ends regarding prayer to offer corpses to gods. Kiku now invokes torment when corpses are offered via prayer, in the same way that other gods accept corpses for piety. god_likes_butchery() has been removed and tutorial messages referencing the old style of offering corpses have been updated.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/food.cc65
-rw-r--r--crawl-ref/source/l_you.cc5
-rw-r--r--crawl-ref/source/religion.cc29
-rw-r--r--crawl-ref/source/tutorial.cc43
4 files changed, 44 insertions, 98 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 45cabbb224..0be46caba1 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -356,43 +356,21 @@ static bool _butcher_corpse(int corpse_id, bool first_corpse = true,
const bool rotten = food_is_rotten(mitm[corpse_id]);
- if (you.duration[DUR_PRAYER] && god_likes_butchery(you.religion))
- {
- if (!rotten)
- {
- offer_and_butcher_corpse(corpse_id);
+ // Start work on the first corpse we butcher.
+ if (first_corpse)
+ mitm[corpse_id].plus2++;
- // Kikubaaqudgha torments if you butcher a fresh corpse
- // while praying.
- if (you.religion == GOD_KIKUBAAQUDGHA
- && you.piety >= piety_breakpoint(4))
- {
- simple_god_message(" inflicts torment against the living!");
- torment(TORMENT_KIKUBAAQUDGHA, you.pos());
- you.piety -= 8 + random2(4); // 8 to 12
- }
- }
- else
- simple_god_message(" refuses to accept that mouldy sacrifice!");
- }
- else
- {
- // Start work on the first corpse we butcher.
- if (first_corpse)
- mitm[corpse_id].plus2++;
+ int work_req = std::max(0, 4 - mitm[corpse_id].plus2);
- int work_req = std::max(0, 4 - mitm[corpse_id].plus2);
-
- delay_type dtype = DELAY_BUTCHER;
- if (!force_butcher && !rotten
- && can_bottle_blood_from_corpse(mitm[corpse_id].plus))
- {
- dtype = DELAY_BOTTLE_BLOOD;
- }
-
- start_delay(dtype, work_req, corpse_id, mitm[corpse_id].special);
+ delay_type dtype = DELAY_BUTCHER;
+ if (!force_butcher && !rotten
+ && can_bottle_blood_from_corpse(mitm[corpse_id].plus))
+ {
+ dtype = DELAY_BOTTLE_BLOOD;
}
+ start_delay(dtype, work_req, corpse_id, mitm[corpse_id].special);
+
you.turn_is_over = true;
return (true);
}
@@ -414,10 +392,7 @@ static void _terminate_butchery(bool wpn_switch, bool removed_gloves,
static bool _have_corpses_in_pack(bool remind)
{
- const bool sacrifice = (you.duration[DUR_PRAYER]
- && god_likes_butchery(you.religion));
-
- const bool can_bottle = (!sacrifice && you.species == SP_VAMPIRE
+ const bool can_bottle = (you.species == SP_VAMPIRE
&& you.experience_level > 5);
int num = 0;
@@ -435,9 +410,7 @@ static bool _have_corpses_in_pack(bool remind)
continue;
// Only saprovorous characters care about rotten food.
- // Also, rotten corpses can't be sacrificed.
- if (food_is_rotten(obj) && (sacrifice
- || !player_mutation_level(MUT_SAPROVOROUS)))
+ if (food_is_rotten(obj) && (!player_mutation_level(MUT_SAPROVOROUS)))
{
continue;
}
@@ -623,15 +596,11 @@ bool butchery(int which_corpse)
std::string corpse_name = si->name(DESC_NOCAP_A);
- const bool sacrifice = (you.duration[DUR_PRAYER]
- && god_likes_butchery(you.religion));
-
// We don't need to check for undead because
// * Mummies can't eat.
// * Ghouls relish the bad things.
// * Vampires won't bottle bad corpses.
- // Also, don't bother colouring if it's only for sacrificing.
- if (!sacrifice && !you.is_undead)
+ if (!you.is_undead)
{
corpse_name = get_message_colour_tags(*si, DESC_NOCAP_A,
MSGCH_PROMPT);
@@ -641,7 +610,7 @@ bool butchery(int which_corpse)
do
{
mprf(MSGCH_PROMPT, "%s %s? (yc/n/a/q/?)",
- (sacrifice || !can_bottle_blood_from_corpse(si->plus)) ?
+ (!can_bottle_blood_from_corpse(si->plus)) ?
"Butcher" : "Bottle",
corpse_name.c_str());
repeat_prompt = false;
@@ -671,9 +640,7 @@ bool butchery(int which_corpse)
if (keyin == 'a')
{
if (!force_butcher
- && can_bottle_blood_from_corpse(si->plus)
- && (!you.duration[DUR_PRAYER]
- || !god_likes_butchery(you.religion)))
+ && can_bottle_blood_from_corpse(si->plus))
{
bottle_all = true;
}
diff --git a/crawl-ref/source/l_you.cc b/crawl-ref/source/l_you.cc
index 7288d85408..a41c25c87f 100644
--- a/crawl-ref/source/l_you.cc
+++ b/crawl-ref/source/l_you.cc
@@ -70,10 +70,6 @@ LUARET1(you_god_likes_fresh_corpses, boolean,
lua_isstring(ls, 1) ?
god_likes_fresh_corpses(str_to_god(lua_tostring(ls, 1))) :
god_likes_fresh_corpses(you.religion))
-LUARET1(you_god_likes_butchery, boolean,
- lua_isstring(ls, 1) ?
- god_likes_butchery(str_to_god(lua_tostring(ls, 1))) :
- god_likes_butchery(you.religion))
LUARET2(you_hp, number, you.hp, you.hp_max)
LUARET2(you_mp, number, you.magic_points, you.max_magic_points)
LUARET1(you_hunger, string, hunger_level())
@@ -192,7 +188,6 @@ static const struct luaL_reg you_clib[] =
{ "transform", you_transform },
{ "god_likes_fresh_corpses", you_god_likes_fresh_corpses },
- { "god_likes_butchery", you_god_likes_butchery },
{ "can_consume_corpses", you_can_consume_corpses },
{ "stop_activity", you_stop_activity },
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index e51a7a9a5a..d73c96a309 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2338,7 +2338,7 @@ static bool _god_accepts_prayer(god_type god)
return (true);
}
- if (god_likes_fresh_corpses(god) || god_likes_butchery(god))
+ if (god_likes_fresh_corpses(god))
return (true);
switch (god)
@@ -2346,6 +2346,9 @@ static bool _god_accepts_prayer(god_type god)
case GOD_ZIN:
return (zin_sustenance(false));
+ case GOD_KIKUBAAQUDGHA:
+ return (you.piety >= piety_breakpoint(4));
+
case GOD_YREDELEMNUL:
return (yred_injury_mirror(false));
@@ -2457,11 +2460,11 @@ void pray()
// Assume for now that gods who like fresh corpses and/or butchery
// don't use prayer for anything else.
if (you.religion == GOD_ZIN
+ || you.religion == GOD_KIKUBAAQUDGHA
|| you.religion == GOD_BEOGH
|| you.religion == GOD_NEMELEX_XOBEH
|| you.religion == GOD_JIYVA
- || god_likes_fresh_corpses(you.religion)
- || god_likes_butchery(you.religion))
+ || god_likes_fresh_corpses(you.religion))
{
you.duration[DUR_PRAYER] = 1;
}
@@ -2471,8 +2474,8 @@ void pray()
you.duration[DUR_PRAYER] = 20;
}
- // Gods who like fresh corpses, Beoghites and Nemelexites offer the
- // items they're standing on.
+ // Gods who like fresh corpses, Kikuites, Beoghites and
+ // Nemelexites offer the items they're standing on.
if (altar_god == GOD_NO_GOD
&& (god_likes_fresh_corpses(you.religion)
|| you.religion == GOD_BEOGH || you.religion == GOD_NEMELEX_XOBEH))
@@ -4861,6 +4864,14 @@ void offer_items()
_show_pure_deck_chances();
#endif
}
+
+ if (num_sacced > 0 && you.religion == GOD_KIKUBAAQUDGHA)
+ {
+ simple_god_message(" torments the living!");
+ torment(TORMENT_KIKUBAAQUDGHA, you.pos());
+ you.piety -= 8 + random2(4); // costs 8 - 12 piety
+ }
+
// Explanatory messages if nothing the god likes is sacrificed.
else if (num_sacced == 0 && num_disliked > 0)
{
@@ -5144,12 +5155,8 @@ bool god_likes_fresh_corpses(god_type god)
return (god == GOD_OKAWARU
|| god == GOD_MAKHLEB
|| god == GOD_TROG
- || god == GOD_LUGONU);
-}
-
-bool god_likes_butchery(god_type god)
-{
- return (god == GOD_KIKUBAAQUDGHA && you.piety >= piety_breakpoint(4));
+ || god == GOD_LUGONU
+ || (god == GOD_KIKUBAAQUDGHA && you.piety >= piety_breakpoint(4)));
}
bool god_hates_butchery(god_type god)
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 6414ca1548..8ff6ca998d 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -981,7 +981,7 @@ void tutorial_dissection_reminder(bool healthy)
return;
}
- if (!god_likes_butchery(you.religion))
+ if (!god_likes_fresh_corpses(you.religion))
return;
if (Options.tutorial_events[TUT_OFFER_CORPSE])
@@ -991,7 +991,7 @@ void tutorial_dissection_reminder(bool healthy)
Options.tut_just_triggered = true;
std::string text;
- text += "If you don't want to eat it, consider <w>c</w>hopping this "
+ text += "If you don't want to eat it, consider offering this "
"corpse up under <w>p</w>rayer as a sacrifice to ";
text += god_name(you.religion);
#ifdef USE_TILE
@@ -1947,11 +1947,11 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"click</w>.";
#endif
- if (god_likes_butchery(you.religion))
+ if (god_likes_fresh_corpses(you.religion))
{
- text << " During prayer you can offer corpses to "
+ text << " You can offer corpses to "
<< god_name(you.religion)
- << " by chopping them up, as well. Note that the gods will "
+ << " by praying over them to offer them. Note that the gods will "
<< "not accept rotting flesh.";
}
text << "\nDuring the tutorial you can reread this information at "
@@ -2655,20 +2655,10 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"<w>v</w>iewing a corpse or chunk on the floor or by having a "
"look at it in your <w>i</w>nventory.";
#endif
-
- if (you.duration[DUR_PRAYER]
- && (god_likes_butchery(you.religion)
- || god_hates_butchery(you.religion)))
- {
- text << "\nRemember, though, to wait until your prayer is over, "
- "or the corpse will instead be sacrificed to "
- << god_name(you.religion)
- << ".";
- }
break;
case TUT_OFFER_CORPSE:
- if (!god_likes_butchery(you.religion)
+ if (!god_likes_fresh_corpses(you.religion)
|| you.hunger_state < HS_SATIATED)
{
return;
@@ -2677,21 +2667,8 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
text << "Hey, that monster left a corpse! If you don't need it for "
"food or other purposes, you can sacrifice it to "
<< god_name(you.religion)
- << " by <w>c</w>hopping it while <w>p</w>raying. ";
+ << " by <w>p</w>raying over it to offer it. ";
- if (_cant_butcher())
- {
- text << "(Or you <w>could</w> sacrifice it if it weren't for "
- "the fact that you can't let go of your cursed "
- "non-chopping weapon)";
- }
- else if (_num_butchery_tools() == 0)
- {
- text << "(Or you <w>could</w> sacrifice it if you had a "
- "chopping weapon; you should pick up the first knife, "
- "dagger, sword or axe you find if you want to be able "
- "to chop up corpses)";
- }
break;
case TUT_SHIFT_RUN:
@@ -4023,11 +4000,11 @@ void tutorial_describe_item(const item_def &item)
"a sharp implement to produce chunks for food (though they "
"may not be healthy)";
- if (!food_is_rotten(item) && god_likes_butchery(you.religion))
+ if (!food_is_rotten(item) && god_likes_fresh_corpses(you.religion))
{
- ostr << ", or as a sacrifice to "
+ ostr << ", or offered as a sacrifice by "
<< god_name(you.religion)
- << " (while <w>p</w>raying)";
+ << " <w>p</w>raying over them.";
}
ostr << ". ";