diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-10-24 22:12:10 -0700 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-10-24 22:38:26 -0700 |
commit | e5c35dd08e149f985c77be908cfc3e9c69f2d13e (patch) | |
tree | 67adba7b180a1908c7d960e97861740af162f8d3 /crawl-ref/source/tags.cc | |
parent | 5bae81aab842d440e045a1fa061a9553589d9616 (diff) | |
download | crawl-ref-e5c35dd08e149f985c77be908cfc3e9c69f2d13e.tar.gz crawl-ref-e5c35dd08e149f985c77be908cfc3e9c69f2d13e.zip |
Roll demonspawn mutations at the start of the game.
All demonspawn mutations are now stored in the player data, and are
determined at the same time. This makes a lot of things a lot simpler.
On the other hand, it means that the influence of skills and gods on
demonspawn mutations is now broken.
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r-- | crawl-ref/source/tags.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 23b42b61da..91fe0c0643 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -944,6 +944,12 @@ static void tag_construct_you(writer &th) marshallByte(th, you.demon_pow[j]); } + marshallByte(th, 26); + for (j = 0; j < 26; j++) + { + marshallShort(th, you.demon_trait[j]); + } + // how many penances? marshallByte(th, MAX_NUM_GODS); for (i = 0; i < MAX_NUM_GODS; i++) @@ -1387,6 +1393,13 @@ static void tag_read_you(reader &th, char minorVersion) you.demon_pow[j] = unmarshallByte(th); } + if (minorVersion >= TAG_MINOR_DSTRAITS) + { + count_c = unmarshallByte(th); + for (j = 0; j < count_c; ++j) + you.demon_trait[j] = static_cast<mutation_type>(unmarshallShort(th)); + } + // how many penances? count_c = unmarshallByte(th); for (i = 0; i < count_c; i++) |