summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-18 06:52:42 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-18 06:52:42 +0000
commit9f751c796fa4ca1c22e66d4f31f293c0ea1955b6 (patch)
tree4d300ceda8beba72814a2de26bc723a911e67391 /crawl-ref/source/tags.cc
parenta06edf5979429958d25705d9ea9a93e8a97da45d (diff)
downloadcrawl-ref-9f751c796fa4ca1c22e66d4f31f293c0ea1955b6.tar.gz
crawl-ref-9f751c796fa4ca1c22e66d4f31f293c0ea1955b6.zip
Implement part of [2837033]: Randomize colors, resistances, and attack
types/flavors for ugly things. They now use the ghost_demon struct, expanded to account for these characteristics. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10709 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r--crawl-ref/source/tags.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 5db90d707d..4d133247f1 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -2453,11 +2453,14 @@ static void marshallGhost(writer &th, const ghost_demon &ghost)
marshallShort(th, ghost.speed);
marshallByte(th, ghost.see_invis);
marshallShort(th, ghost.brand);
+ marshallShort(th, ghost.att_type);
+ marshallShort(th, ghost.att_flav);
marshallResists(th, ghost.resists);
marshallByte(th, ghost.spellcaster);
marshallByte(th, ghost.cycle_colours);
+ marshallByte(th, ghost.colour);
marshallShort(th, ghost.fly);
marshallSpells(th, ghost.spells);
@@ -2486,10 +2489,20 @@ static ghost_demon unmarshallGhost(reader &th, char minorVersion)
ghost.see_invis = unmarshallByte(th);
ghost.brand = static_cast<brand_type>( unmarshallShort(th) );
+ if (minorVersion >= TAG_MINOR_UGLY)
+ {
+ ghost.att_type = static_cast<mon_attack_type>( unmarshallShort(th) );
+ ghost.att_flav = static_cast<mon_attack_flavour>( unmarshallShort(th) );
+ }
+
unmarshallResists(th, ghost.resists);
ghost.spellcaster = unmarshallByte(th);
ghost.cycle_colours = unmarshallByte(th);
+
+ if (minorVersion >= TAG_MINOR_UGLY)
+ ghost.colour = unmarshallByte(th);
+
ghost.fly = static_cast<flight_type>( unmarshallShort(th) );
unmarshallSpells(th, ghost.spells);