summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorwheals <shm.mark@gmail.com>2014-01-24 12:31:59 -0500
committerAdam Borowski <kilobyte@angband.pl>2014-01-27 14:10:52 +0100
commit41b145a6ef686d77476b803599eac9f66adc145d (patch)
tree57c1b5cfa46c940566ba112db0a7967e22600f3e /crawl-ref
parent1b0a30413292505ca6ec914dfe5dbcd3e789a21e (diff)
downloadcrawl-ref-41b145a6ef686d77476b803599eac9f66adc145d.tar.gz
crawl-ref-41b145a6ef686d77476b803599eac9f66adc145d.zip
Remove decks of dungeons from Nemelex's gifting.
Not every deck has to be gifted by Nemelex, and while dungeons did have a coherent flavour it did not have an obvious use, at least compared to the other four. In particular, it was never well differentiated from wonders, and neither were the items that increased its weight vis-a-vis the items that increased wonders'. Trowel, the one memorable thing about the deck, is added to wonders. Dungeons is made more common as a random spawn to compensate for not being a gift. Minor save bump.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/decks.cc1
-rw-r--r--crawl-ref/source/describe.cc9
-rw-r--r--crawl-ref/source/godprayer.cc12
-rw-r--r--crawl-ref/source/makeitem.cc3
-rw-r--r--crawl-ref/source/religion-enum.h1
-rw-r--r--crawl-ref/source/religion.cc35
-rw-r--r--crawl-ref/source/tag-version.h1
-rw-r--r--crawl-ref/source/tags.cc15
8 files changed, 42 insertions, 35 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index ac4a83808a..d6d9ac2f83 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -169,6 +169,7 @@ const deck_archetype deck_of_wonders[] =
{ CARD_HELIX, {5, 5, 5} },
{ CARD_SAGE, {5, 5, 5} },
{ CARD_ALCHEMIST, {5, 5, 5} },
+ { CARD_TROWEL, {5, 5, 3} },
END_OF_DECK
};
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 2dedddb997..daef52d072 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -4363,16 +4363,13 @@ static void _detailed_god_description(god_type which_god)
case NEM_GIFT_DESTRUCTION:
desc = "decks of Destruction -- weapons and ammunition";
break;
- case NEM_GIFT_DUNGEONS:
- desc = "decks of Dungeons -- jewellery, books, "
- "miscellaneous items";
- break;
case NEM_GIFT_SUMMONING:
desc = "decks of Summoning -- corpses, chunks, blood";
break;
case NEM_GIFT_WONDERS:
- desc = "decks of Wonders -- consumables: food, potions, "
- "scrolls, wands";
+ desc = "decks of Wonders -- Other items: food, potions, "
+ "scrolls, wands, jewellery, books, "
+ "miscellaneous items";
break;
}
broken += make_stringf(" <white>%c</white> %s%s%s\n",
diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc
index aa2cf28312..daa721a6da 100644
--- a/crawl-ref/source/godprayer.cc
+++ b/crawl-ref/source/godprayer.cc
@@ -487,10 +487,10 @@ static bool _zin_donate_gold()
static int _leading_sacrifice_group()
{
- int weights[5];
+ int weights[4];
get_pure_deck_weights(weights);
int best_i = -1, maxweight = -1;
- for (int i = 0; i < 5; ++i)
+ for (int i = 0; i < 4; ++i)
{
if (best_i == -1 || weights[i] > maxweight)
{
@@ -503,10 +503,10 @@ static int _leading_sacrifice_group()
static void _give_sac_group_feedback(int which)
{
- ASSERT_RANGE(which, 0, 5);
+ ASSERT_RANGE(which, 0, 4);
const char* names[] =
{
- "Escape", "Destruction", "Dungeons", "Summoning", "Wonder",
+ "Escape", "Destruction", "Summoning", "Wonder",
};
mprf(MSGCH_GOD, "A symbol of %s coalesces before you, then vanishes.",
names[which]);
@@ -780,12 +780,10 @@ bool check_nemelex_sacrificing_item_type(const item_def& item)
// else fall through
case OBJ_WANDS:
case OBJ_SCROLLS:
- return you.nemelex_sacrificing[NEM_GIFT_WONDERS];
-
case OBJ_JEWELLERY:
case OBJ_BOOKS:
case OBJ_MISCELLANY:
- return you.nemelex_sacrificing[NEM_GIFT_DUNGEONS];
+ return you.nemelex_sacrificing[NEM_GIFT_WONDERS];
default:
return false;
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 262b88f780..173b0e41f5 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -3104,10 +3104,9 @@ static void _generate_misc_item(item_def& item, int force_type, int force_ego)
|| item.sub_type == MISC_BUGGY_EBONY_CASKET
|| item.sub_type == MISC_BOTTLED_EFREET
#endif
- // Pure decks are rare in the dungeon.
+ // Nemelex' decks are rare in the dungeon.
|| (item.sub_type == MISC_DECK_OF_ESCAPE
|| item.sub_type == MISC_DECK_OF_DESTRUCTION
- || item.sub_type == MISC_DECK_OF_DUNGEONS
|| item.sub_type == MISC_DECK_OF_SUMMONING
|| item.sub_type == MISC_DECK_OF_WONDERS)
&& !one_chance_in(5));
diff --git a/crawl-ref/source/religion-enum.h b/crawl-ref/source/religion-enum.h
index 525d8f7265..c0e5ec6fb2 100644
--- a/crawl-ref/source/religion-enum.h
+++ b/crawl-ref/source/religion-enum.h
@@ -11,7 +11,6 @@ enum nemelex_gift_types
{
NEM_GIFT_ESCAPE = 0,
NEM_GIFT_DESTRUCTION,
- NEM_GIFT_DUNGEONS,
NEM_GIFT_SUMMONING,
NEM_GIFT_WONDERS,
NUM_NEMELEX_GIFT_TYPES,
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 62b1a95c8a..90699eacd5 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1324,15 +1324,15 @@ void get_pure_deck_weights(int weights[])
+ you.sacrifice_value[OBJ_STAVES]
+ you.sacrifice_value[OBJ_RODS]
+ you.sacrifice_value[OBJ_MISSILES] + 1;
- weights[NEM_GIFT_DUNGEONS] = you.sacrifice_value[OBJ_MISCELLANY]
- + you.sacrifice_value[OBJ_JEWELLERY]
- + you.sacrifice_value[OBJ_BOOKS];
weights[NEM_GIFT_SUMMONING] = you.sacrifice_value[OBJ_CORPSES] / 2;
weights[NEM_GIFT_WONDERS] = you.sacrifice_value[OBJ_POTIONS]
+ you.sacrifice_value[OBJ_SCROLLS]
+ you.sacrifice_value[OBJ_WANDS]
- + you.sacrifice_value[OBJ_FOOD];
-}
+ + you.sacrifice_value[OBJ_FOOD]
+ + you.sacrifice_value[OBJ_MISCELLANY]
+ + you.sacrifice_value[OBJ_JEWELLERY]
+ + you.sacrifice_value[OBJ_BOOKS];
+ }
static void _update_sacrifice_weights(int which)
{
@@ -1352,13 +1352,6 @@ static void _update_sacrifice_weights(int which)
you.sacrifice_value[OBJ_RODS] *= 4;
you.sacrifice_value[OBJ_MISSILES] *= 4;
break;
- case NEM_GIFT_DUNGEONS:
- you.sacrifice_value[OBJ_MISCELLANY] /= 5;
- you.sacrifice_value[OBJ_JEWELLERY] /= 5;
- you.sacrifice_value[OBJ_BOOKS] /= 5;
- you.sacrifice_value[OBJ_MISCELLANY] *= 4;
- you.sacrifice_value[OBJ_JEWELLERY] *= 4;
- you.sacrifice_value[OBJ_BOOKS] *= 4;
case NEM_GIFT_SUMMONING:
you.sacrifice_value[OBJ_CORPSES] /= 5;
you.sacrifice_value[OBJ_CORPSES] *= 4;
@@ -1372,6 +1365,12 @@ static void _update_sacrifice_weights(int which)
you.sacrifice_value[OBJ_SCROLLS] *= 4;
you.sacrifice_value[OBJ_WANDS] *= 4;
you.sacrifice_value[OBJ_FOOD] *= 4;
+ you.sacrifice_value[OBJ_MISCELLANY] /= 5;
+ you.sacrifice_value[OBJ_JEWELLERY] /= 5;
+ you.sacrifice_value[OBJ_BOOKS] /= 5;
+ you.sacrifice_value[OBJ_MISCELLANY] *= 4;
+ you.sacrifice_value[OBJ_JEWELLERY] *= 4;
+ you.sacrifice_value[OBJ_BOOKS] *= 4;
break;
}
}
@@ -1379,7 +1378,7 @@ static void _update_sacrifice_weights(int which)
#if defined(DEBUG_GIFTS) || defined(DEBUG_CARDS)
static void _show_pure_deck_chances()
{
- int weights[5];
+ int weights[4];
get_pure_deck_weights(weights);
@@ -1388,13 +1387,12 @@ static void _show_pure_deck_chances()
total += (float) weights[i];
mprf(MSGCH_DIAGNOSTICS, "Pure cards chances: "
- "escape %0.2f%%, destruction %0.2f%%, dungeons %0.2f%%,"
+ "escape %0.2f%%, destruction %0.2f%%, "
"summoning %0.2f%%, wonders %0.2f%%",
(float)weights[0] / total * 100.0,
(float)weights[1] / total * 100.0,
(float)weights[2] / total * 100.0,
- (float)weights[3] / total * 100.0,
- (float)weights[4] / total * 100.0);
+ (float)weights[3] / total * 100.0);
}
#endif
@@ -1404,7 +1402,6 @@ static misc_item_type _gift_type_to_deck(int gift)
{
case NEM_GIFT_ESCAPE: return MISC_DECK_OF_ESCAPE;
case NEM_GIFT_DESTRUCTION: return MISC_DECK_OF_DESTRUCTION;
- case NEM_GIFT_DUNGEONS: return MISC_DECK_OF_DUNGEONS;
case NEM_GIFT_SUMMONING: return MISC_DECK_OF_SUMMONING;
case NEM_GIFT_WONDERS: return MISC_DECK_OF_WONDERS;
}
@@ -1430,9 +1427,9 @@ static bool _give_nemelex_gift(bool forced = false)
misc_item_type gift_type;
// Make a pure deck.
- int weights[5];
+ int weights[4];
get_pure_deck_weights(weights);
- const int choice = choose_random_weighted(weights, weights+5);
+ const int choice = choose_random_weighted(weights, weights+4);
gift_type = _gift_type_to_deck(choice);
#if defined(DEBUG_GIFTS) || defined(DEBUG_CARDS)
_show_pure_deck_chances();
diff --git a/crawl-ref/source/tag-version.h b/crawl-ref/source/tag-version.h
index 931e0c69a4..ee0a6dcade 100644
--- a/crawl-ref/source/tag-version.h
+++ b/crawl-ref/source/tag-version.h
@@ -75,6 +75,7 @@ enum tag_minor_version
TAG_MINOR_CLASS_HP_0, // Base class maxhp at 0.
TAG_MINOR_NOISES, // Save incompat recovery wrt ATTR_NOISES.
TAG_MINOR_ABIL_GOD_FIXUP, // Movement of some non-god-specific abils.
+ TAG_MINOR_NEMELEX_DUNGEONS, // Make nemelex not give/track decks of dungeons.
#endif
NUM_TAG_MINORS,
TAG_MINOR_VERSION = NUM_TAG_MINORS - 1
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 0e1b926844..c6cdd3c5c5 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -2568,9 +2568,24 @@ static void tag_read_you(reader &th)
for (i = 0; i < count; i++)
you.piety_max[i] = unmarshallByte(th);
count = unmarshallByte(th);
+#if TAG_MAJOR_VERSION == 34
+ if (th.getMinorVersion() < TAG_MINOR_NEMELEX_DUNGEONS)
+ {
+ for (i = 0; i < NEM_GIFT_SUMMONING; i++)
+ you.nemelex_sacrificing.set(i, unmarshallBoolean(th));
+ unmarshallBoolean(th); // dungeons weight
+ for (i = NEM_GIFT_SUMMONING; i < NUM_NEMELEX_GIFT_TYPES; i++)
+ you.nemelex_sacrificing.set(i, unmarshallBoolean(th));
+ }
+ else
+ {
+#endif
ASSERT(count == NUM_NEMELEX_GIFT_TYPES);
for (i = 0; i < count; i++)
you.nemelex_sacrificing.set(i, unmarshallBoolean(th));
+#if TAG_MAJOR_VERSION == 34
+ }
+#endif
you.gift_timeout = unmarshallByte(th);