From 3fcc28592001fa644a08d88517d15380de417107 Mon Sep 17 00:00:00 2001 From: haranp Date: Mon, 9 Jul 2007 15:38:21 +0000 Subject: 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 --- crawl-ref/source/tags.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crawl-ref/source/tags.cc') 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) -- cgit v1.2.3-54-g00ecf