Lot more tests!

- Tests for converting legacy terrain types
- Tests for initialization to sane values

Fixes:
- cCreature no longer initializes spec1 and spec2 to 0. This probably didn't cause bugs, but who knows...
- In fact, cCreature no longer explicitly initializes anything in its cTownperson superclass. That's what the superclass constructor is for after all.
- Relatedly, cTownperson now defaults to a facial graphic of -1. Also a docile attitude.
- iLiving defaults to ap 0, direction here.
- Fix Change When Step terrains to properly support not having a sound while still allowing an arbitrary number of custom sounds.
- Add support for a lack of sound to Change When Used terrains, including at conversion time (original game supported it but OBoE was forcing the sound to a door sound).
- Fix conversion of crumbling terrain types (old conversion was allowing quickfire to destroy them)

Other:
- New addAttack method in cMonster.
- Change snd_num_t to signed, because it's been getting annoying that I can't easily use -1 to mean "no sound".
This commit is contained in:
2015-10-04 18:44:58 -04:00
parent d178dcea63
commit 96229d1f40
12 changed files with 489 additions and 27 deletions

View File

@@ -136,7 +136,7 @@ different properties but the same appearance.)</li>
<li><b>Change When Walk -</b> The terrain type changes to another when the party tries to
walk into it. This happens even if the terrain is blocked to travel. Extra 1 is the number
of the terrain type the terrain changes into. Extra 2 is the number of the sound that
plays when this happens. If Extra 2 is left at 0, no sound plays.</li>
plays when this happens. If Extra 2 is left at -1, no sound plays.</li>
<li><b>Does Damage -</b> When someone walks on this space, some type of damage is
inflicted. Damaged inflicted is inflicted using a dice roll, with the number of dice in
Extra 2 and the sides per die in Extra 1. The type of damage to inflict is in Extra 3.