summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-09 15:38:21 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-09 15:38:21 +0000
commit3fcc28592001fa644a08d88517d15380de417107 (patch)
treed4b19c1730d9c92fccff13f080386a508ba32a72 /crawl-ref/source/tags.cc
parenteb847d5f2f0331435f6bc081d1009bdf3982fd31 (diff)
downloadcrawl-ref-3fcc28592001fa644a08d88517d15380de417107.tar.gz
crawl-ref-3fcc28592001fa644a08d88517d15380de417107.zip
Nemelex now remembers what you've sacrificed and gifts decks accordingly.
High-value sacrifices can reduce the gift countdown. Nemelex is easier to please. Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1821 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r--crawl-ref/source/tags.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 41de4143fc..8b779c0995 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -793,6 +793,11 @@ static void tag_construct_you(struct tagHeader &th)
for (j = 0; j < NUM_ATTRIBUTES; ++j)
marshallByte(th,you.attribute[j]);
+ // sacrifice values
+ marshallByte(th, NUM_OBJECT_CLASSES);
+ for (j = 0; j < NUM_OBJECT_CLASSES; ++j)
+ marshallLong(th, you.sacrifice_value[j]);
+
// how many mutations/demon powers?
marshallShort(th, NUM_MUTATIONS);
for (j = 0; j < NUM_MUTATIONS; ++j)
@@ -1096,6 +1101,10 @@ static void tag_read_you(struct tagHeader &th, char minorVersion)
for (j = 0; j < count_c; ++j)
you.attribute[j] = unmarshallByte(th);
+ count_c = unmarshallByte(th);
+ for (j = 0; j < count_c; ++j)
+ you.sacrifice_value[j] = unmarshallLong(th);
+
// how many mutations/demon powers?
count_s = unmarshallShort(th);
for (j = 0; j < count_s; ++j)