Attached Files |
0001-Change-Nemelex-piety-gain-to-piety-from-exploration.patch [^] (11,261 bytes) 2014-05-09 22:48 [Show Content] [Hide Content]From 68b840e8c3123da63daa9b0660afacdc95f28f03 Mon Sep 17 00:00:00 2001
From: Shayne Halvorson <N78291@gmail.com>
Date: Fri, 9 May 2014 15:43:17 -0500
Subject: [PATCH] Change Nemelex piety gain to piety from exploration.
Nemelex no longer accepts sacrifices or grants piety for using
decks.
---
crawl-ref/source/dat/descript/gods.txt | 4 ++--
crawl-ref/source/decks.cc | 13 -----------
crawl-ref/source/describe.cc | 16 +------------
crawl-ref/source/godconduct.cc | 40 ++++++--------------------------
crawl-ref/source/godprayer.cc | 27 ---------------------
crawl-ref/source/religion.cc | 19 ++++-----------
6 files changed, 14 insertions(+), 105 deletions(-)
diff --git a/crawl-ref/source/dat/descript/gods.txt b/crawl-ref/source/dat/descript/gods.txt
index 726e02f..4d592aa 100644
--- a/crawl-ref/source/dat/descript/gods.txt
+++ b/crawl-ref/source/dat/descript/gods.txt
@@ -84,8 +84,8 @@ Nemelex Xobeh
Nemelex is a strange and unpredictable trickster God, whose powers are invoked
through magical packs of cards painted in the ichor of demons. Followers are
-expected to sedulously sacrifice valuable items, and will recieve decks of
-cards in return. Followers encouraged to trust in the cards and use them as
+expected to explore the world, and will recieve decks of cards in return.
+Followers are encouraged to trust in the cards and use them as
much as possible. However, the Trickster can ensure that fortune favours the
bold.
%%%%
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index a2f3346..f3d7a69 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -646,7 +646,6 @@ static bool _check_buggy_deck(item_def& deck)
unwield_item();
dec_inv_item_quantity(deck.link, 1);
- did_god_conduct(DID_CARDS, 1);
return true;
}
@@ -706,7 +705,6 @@ static bool _check_buggy_deck(item_def& deck)
unwield_item();
dec_inv_item_quantity(deck.link, 1);
- did_god_conduct(DID_CARDS, 1);
return true;
}
@@ -1476,7 +1474,6 @@ void evoke_deck(item_def& deck)
if (_check_buggy_deck(deck))
return;
- int brownie_points = 0;
bool allow_id = in_inventory(deck) && !item_ident(deck, ISFLAG_KNOW_TYPE);
const deck_rarity_type rarity = deck_rarity(deck);
@@ -1538,7 +1535,6 @@ void evoke_deck(item_def& deck)
dec_inv_item_quantity(deck.link, 1);
// Finishing the deck will earn a point, even if it
// was marked or stacked.
- brownie_points++;
}
card_effect(card, rarity, flags, false);
@@ -1548,17 +1544,8 @@ void evoke_deck(item_def& deck)
// Could a Xom worshipper ever get a stacked deck in the first
// place?
xom_is_stimulated(amusement);
-
- // Nemelex likes gamblers.
- brownie_points++;
- if (one_chance_in(3))
- brownie_points++;
}
- // No piety from Deal Four.
- if (!(flags & CFLAG_DEALT))
- did_god_conduct(DID_CARDS, brownie_points);
-
// Always wield change, since the number of cards used/left has
// changed.
you.wield_change = true;
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index c944c1f..bc51892 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -4281,12 +4281,6 @@ static string _religion_help(god_type god)
"square.";
break;
- case GOD_NEMELEX_XOBEH:
- result += "You can pray to sacrifice all items on your square. "
- "Inscribe items with !p, !* or =p to avoid sacrificing "
- "them accidentally.";
- break;
-
case GOD_FEDHAS:
if (you.piety >= piety_breakpoint(0))
{
@@ -4588,15 +4582,7 @@ static void _detailed_god_description(god_type which_god)
case GOD_NEMELEX_XOBEH:
if (which_god == you.religion)
{
- broken = "The piety increase when sacrificing mostly depends "
- "on the value of the item. To prevent items from "
- "being accidentally sacrificed, you can "
- "<w>i</w>nscribe them with <w>!p</w> (protects the "
- "whole stack), with <w>=p</w> (protects only the "
- "item), or with <w>!D</w> (causes item to be ignored "
- "in sacrifices)."
- "\n\n"
- "The power of Nemelex Xobeh's abilities and of the "
+ broken = "The power of Nemelex Xobeh's abilities and of the "
"cards' effects is governed by Evocations skill "
"instead of Invocations.";
}
diff --git a/crawl-ref/source/godconduct.cc b/crawl-ref/source/godconduct.cc
index 972ffab..4b637b0 100644
--- a/crawl-ref/source/godconduct.cc
+++ b/crawl-ref/source/godconduct.cc
@@ -830,39 +830,6 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
}
break;
- case DID_CARDS:
- if (you_worship(GOD_NEMELEX_XOBEH))
- {
- piety_change = level;
- retval = true;
-
- // level == 0: stacked, deck not used up
- // level == 1: used up or nonstacked
- // level == 2: used up and nonstacked
- // and there's a 1/3 chance of an additional bonus point
- // for nonstacked cards.
- int chance = 0;
- switch (level)
- {
- case 0: chance = 0; break;
- case 1: chance = 40; break;
- case 2: chance = 70; break;
- default:
- case 3: chance = 100; break;
- }
-
- if (x_chance_in_y(chance, 100)
- && you.attribute[ATTR_CARD_COUNTDOWN])
- {
- you.attribute[ATTR_CARD_COUNTDOWN]--;
-#if defined(DEBUG_DIAGNOSTICS) || defined(DEBUG_CARDS) || defined(DEBUG_GIFTS)
- mprf(MSGCH_DIAGNOSTICS, "Countdown down to %d",
- you.attribute[ATTR_CARD_COUNTDOWN]);
-#endif
- }
- }
- break;
-
case DID_DELIBERATE_MUTATING:
case DID_CAUSE_GLOWING:
if (you_worship(GOD_ZIN))
@@ -997,6 +964,12 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
piety_denom = level;
retval = true;
}
+ else if (you_worship(GOD_NEMELEX_XOBEH))
+ {
+ piety_change = 12;
+ piety_denom = level;
+ retval = true;
+ }
break;
case DID_SEE_MONSTER:
@@ -1070,6 +1043,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
}
break;
+ case DID_CARDS: // unused
case DID_NOTHING:
case NUM_CONDUCTS:
break;
diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc
index 0bc3e46..b5f91f3 100644
--- a/crawl-ref/source/godprayer.cc
+++ b/crawl-ref/source/godprayer.cc
@@ -751,33 +751,6 @@ static piety_gain_t _sacrifice_one_item_noncount(const item_def& item,
break;
}
- case GOD_NEMELEX_XOBEH:
- {
- if (you.attribute[ATTR_CARD_COUNTDOWN] && x_chance_in_y(value, 800))
- {
- you.attribute[ATTR_CARD_COUNTDOWN]--;
-#if defined(DEBUG_DIAGNOSTICS) || defined(DEBUG_CARDS) || defined(DEBUG_SACRIFICE)
- mprf(MSGCH_DIAGNOSTICS, "Countdown down to %d",
- you.attribute[ATTR_CARD_COUNTDOWN]);
-#endif
- }
- // Nemelex piety gain is fairly fast... at least when you
- // have low piety.
- int piety_change = value/2 + 1;
- if (is_artefact(item))
- piety_change *= 2;
- int piety_denom = 30 + you.piety/2;
-
- gain_piety(piety_change, piety_denom);
-
- // Preserving the old behaviour of giving the big message for
- // artefacts and artefacts only.
- relative_piety_gain = x_chance_in_y(piety_change, piety_denom) ?
- is_artefact(item) ?
- PIETY_LOTS : PIETY_SOME : PIETY_NONE;
- break;
- }
-
case GOD_JIYVA:
{
// compress into range 0..250
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 0da3758..59bf26a 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -613,14 +613,6 @@ string get_god_likes(god_type which_god, bool verbose)
likes.push_back(info);
break;
- case GOD_NEMELEX_XOBEH:
- snprintf(info, INFO_SIZE, "you draw unmarked cards and use up decks%s",
- verbose ? " (by <w>w</w>ielding and e<w>v</w>oking them)"
- : "");
-
- likes.push_back(info);
- break;
-
case GOD_ELYVILON:
snprintf(info, INFO_SIZE, "you destroy weapons (especially unholy and "
"evil ones)%s",
@@ -682,8 +674,7 @@ string get_god_likes(god_type which_god, bool verbose)
break;
case GOD_NEMELEX_XOBEH:
- snprintf(info, INFO_SIZE, "you sacrifice items%s",
- verbose ? " (by standing over them and <w>p</w>raying)" : "");
+ snprintf(info, INFO_SIZE, "you explore the world");
likes.push_back(info);
break;
@@ -1507,8 +1498,7 @@ static bool _give_nemelex_gift(bool forced = false)
if (forced
|| !you.num_total_gifts[GOD_NEMELEX_XOBEH]
&& x_chance_in_y(you.piety + 1, piety_breakpoint(1))
- || one_chance_in(3) && x_chance_in_y(you.piety + 1, MAX_PIETY)
- && !you.attribute[ATTR_CARD_COUNTDOWN])
+ || one_chance_in(3) && x_chance_in_y(you.piety + 1, MAX_PIETY))
{
misc_item_type gift_type = random_choose_weighted(
8, MISC_DECK_OF_DESTRUCTION,
@@ -1556,7 +1546,6 @@ static bool _give_nemelex_gift(bool forced = false)
more();
canned_msg(MSG_SOMETHING_APPEARS);
- you.attribute[ATTR_CARD_COUNTDOWN] = 5;
_inc_gift_timeout(5 + random2avg(9, 2));
you.num_current_gifts[you.religion]++;
you.num_total_gifts[you.religion]++;
@@ -2816,7 +2805,8 @@ static void _gain_piety_point()
// no longer have a piety cost for getting them.
// Jiyva is an exception because there's usually a time-out and
// the gifts aren't that precious.
- if (!one_chance_in(4) && !you_worship(GOD_JIYVA))
+ if (!one_chance_in(4) && !you_worship(GOD_JIYVA)
+ && !you_worship(GOD_NEMELEX_XOBEH))
{
#ifdef DEBUG_PIETY
mprf(MSGCH_DIAGNOSTICS, "Piety slowdown due to gift timeout.");
@@ -3590,7 +3580,6 @@ bool god_likes_items(god_type god, bool greedy_explore)
switch (god)
{
case GOD_BEOGH:
- case GOD_NEMELEX_XOBEH:
case GOD_ASHENZARI:
case GOD_ELYVILON:
return true;
--
1.7.9.5
|