diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-08 05:13:41 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-08 05:14:12 -0800 |
commit | 5562dfc2a3dd500be1a98a02703eb37496b5fb8e (patch) | |
tree | 9d77c45ff9b2c0040d8c669bfff05a86966b29d7 /crawl-ref/source/tags.cc | |
parent | 5d78f4fbac5120ebee12c73624ded022abc3c933 (diff) | |
download | crawl-ref-5562dfc2a3dd500be1a98a02703eb37496b5fb8e.tar.gz crawl-ref-5562dfc2a3dd500be1a98a02703eb37496b5fb8e.zip |
Relax the one mutation per level rule for DS
Breaks saves.
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r-- | crawl-ref/source/tags.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 0d140664e5..7ba129ed01 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -949,10 +949,11 @@ static void tag_construct_you(writer &th) marshallByte(th, you.demon_pow[j]); } - marshallByte(th, 26); - for (j = 0; j < 26; j++) + marshallByte(th, you.demonic_traits.size()); + for (j = 0; j < int(you.demonic_traits.size()); ++j) { - marshallShort(th, you.demon_trait[j]); + marshallByte(th, you.demonic_traits[j].level_gained); + marshallShort(th, you.demonic_traits[j].mutation); } // how many penances? @@ -1403,8 +1404,14 @@ static void tag_read_you(reader &th, char minorVersion) if (minorVersion >= TAG_MINOR_DSTRAITS) { count_c = unmarshallByte(th); + you.demonic_traits.clear(); for (j = 0; j < count_c; ++j) - you.demon_trait[j] = static_cast<mutation_type>(unmarshallShort(th)); + { + player::demon_trait dt; + dt.level_gained = unmarshallByte(th); + dt.mutation = static_cast<mutation_type>(unmarshallShort(th)); + you.demonic_traits.push_back(dt); + } } // how many penances? |