Test cases for reading terrain, monster, and item definitions

- For monster attacks, 'd4' now means '1d4' instead of '0d4', and simple numbers without a 'd' are not accepted
- Pop string path after pushing it in the shop test cases
This commit is contained in:
2015-07-29 15:25:19 -04:00
parent e9381f194e
commit 7719d62773
56 changed files with 659 additions and 14 deletions

View File

@@ -0,0 +1,7 @@
<items boes="2.0.0">
<item id='0'>
<ability>
<type>bad</type>
</ability>
</item>
</items>

View File

@@ -0,0 +1,7 @@
<items boes="2.0.0">
<item id='0'>
<ability>
<bad></bad>
</ability>
</item>
</items>

View File

@@ -0,0 +1,7 @@
<items boes="2.0.0">
<item id='0'>
<properties>
<bad></bad>
</properties>
</item>
</items>

View File

@@ -0,0 +1 @@
<items vers="2.0.0"></items>

View File

@@ -0,0 +1,5 @@
<items boes="2.0.0">
<item id='0'>
<bad></bad>>
</item>
</items>

View File

@@ -0,0 +1 @@
<items boes="2.0.0"><obj></obj></items>

View File

@@ -0,0 +1,5 @@
<items boes="2.0.0">
<item id='0'>
<variety>bad</variety>
</item>
</items>

View File

@@ -0,0 +1,7 @@
<items boes="2.0.0">
<item id='0'>
<ability>
<use-flag>bad</use-flag>
</ability>
</item>
</items>

View File

@@ -0,0 +1,5 @@
<items boes="2.0.0">
<item id='0'>
<weapon-type>bad</weapon-type>
</item>
</items>

View File

@@ -0,0 +1,11 @@
<items boes="2.0.0">
<item id='0'>
<variety>weapon-1hand</variety>
<level>3</level>
<pic>0</pic>
<value>100</value>
<weight>10</weight>
<full-name>Test Sword</full-name>
<name>Sword</name>
</item>
</items>

View File

@@ -0,0 +1,5 @@
<items boes="2.0.0">
<item id='0'>
<ability></ability>
</item>
</items>

View File

@@ -0,0 +1 @@
<items boes="2.0.0"><item></item></items>

View File

@@ -0,0 +1 @@
<items boes="2.0.0"><item id='0'></item></items>

View File

@@ -0,0 +1 @@
<items></items>

View File

@@ -0,0 +1,19 @@
<monsters boes="2.0.0">
<monster id='1'>
<name>Test Monster</name>
<level>1</level>
<armor>0</armor>
<skill>1</skill>
<hp>10</hp>
<speed>4</speed>
<race>humanoid</race>
<attacks>
<attack type='swing'>d10</attack>
<attack type='punch'>2d4</attack>
<attack type='burn'>1d8</attack>
</attacks>
<pic h='1' w='1'>0</pic>
<attitude>hostile-a</attitude>
<immunity/>
</monster>
</monsters>

View File

@@ -0,0 +1,7 @@
<monsters boes="2.0.0">
<monster id='1'>
<attacks>
<attack type='swing'>bad</attack>
</attacks>
</monster>
</monsters>

View File

@@ -0,0 +1,7 @@
<monsters boes="2.0.0">
<monster id='1'>
<attacks>
<attack type='swing'>100</attack>
</attacks>
</monster>
</monsters>

View File

@@ -0,0 +1,7 @@
<monsters boes="2.0.0">
<monster id='1'>
<attacks>
<attack kind='bad'>1d4</attack>
</attacks>
</monster>
</monsters>

View File

@@ -0,0 +1,7 @@
<monsters boes="2.0.0">
<monster id='1'>
<attacks>
<bad/>
</attacks>
</monster>
</monsters>

View File

@@ -0,0 +1,7 @@
<monsters boes="2.0.0">
<monster id='1'>
<attacks>
<attack type='bad'>1d4</attack>
</attacks>
</monster>
</monsters>

View File

@@ -0,0 +1 @@
<monsters boes="2.0.0"><monster id='0'></monster></monsters>

View File

@@ -0,0 +1,7 @@
<monsters boes="2.0.0">
<monster id='1'>
<immunity>
<unholy>50</unholy>
</immunity>
</monster>
</monsters>

View File

@@ -0,0 +1,7 @@
<monsters boes="2.0.0">
<monster id='1'>
<loot>
<bad/>
</loot>
</monster>
</monsters>

View File

@@ -0,0 +1,5 @@
<monsters boes="2.0.0">
<monster id='1'>
<loot/>
</monster>
</monsters>

View File

@@ -0,0 +1,5 @@
<monsters boes="2.0.0">
<monster id='1'>
<pic>5</pic>
</monster>
</monsters>

View File

@@ -0,0 +1,5 @@
<monsters boes="2.0.0">
<monster id='1'>
<pic h='1' v='1'>5</pic>
</monster>
</monsters>

View File

@@ -0,0 +1 @@
<monsters vers="2.0.0"></monsters>

View File

@@ -0,0 +1,5 @@
<monsters boes="2.0.0">
<monster id='1'>
<bad></bad>>
</monster>
</monsters>

View File

@@ -0,0 +1 @@
<monsters boes="2.0.0"><monst></monst></monsters>

View File

@@ -0,0 +1,15 @@
<monsters boes="2.0.0">
<monster id='1'>
<name>Test Monster</name>
<level>1</level>
<armor>0</armor>
<skill>2</skill>
<hp>10</hp>
<speed>4</speed>
<race>humanoid</race>
<attacks/>
<pic h='1' w='1'>5</pic>
<attitude>hostile-a</attitude>
<immunity/>
</monster>
</monsters>

View File

@@ -0,0 +1,7 @@
<monsters boes="2.0.0">
<monster id='1'>
<attacks>
<attack>1d4</attack>
</attacks>
</monster>
</monsters>

View File

@@ -0,0 +1 @@
<monsters boes="2.0.0"><monster></monster></monsters>

View File

@@ -0,0 +1 @@
<monsters boes="2.0.0"><monster id='1'></monster></monsters>

View File

@@ -0,0 +1 @@
<monsters></monsters>

View File

@@ -0,0 +1,10 @@
<monsters boes="2.0.0">
<monster id='1'>
<attacks>
<attack type='swing'>1d4</attack>
<attack type='swing'>1d4</attack>
<attack type='swing'>1d4</attack>
<attack type='swing'>1d4</attack>
</attacks>
</monster>
</monsters>

View File

@@ -0,0 +1,7 @@
<terrains boes="2.0.0">
<terrain id='0'>
<special>
<type>bad</type>
</special>
</terrain>
</terrains>

View File

@@ -0,0 +1,7 @@
<terrains boes="2.0.0">
<terrain id='0'>
<special>
<bad></bad>
</special>
</terrain>
</terrains>

View File

@@ -0,0 +1,5 @@
<terrains boes="2.0.0">
<terrain id='0'>
<blockage>bad</blockage>
</terrain>
</terrains>

View File

@@ -0,0 +1 @@
<terrains vers="2.0.0"></terrains>

View File

@@ -0,0 +1,5 @@
<terrains boes="2.0.0">
<terrain id='0'>
<bad></bad>
</terrain>
</terrains>

View File

@@ -0,0 +1 @@
<terrains boes="2.0.0"><ter></ter></terrains>

View File

@@ -0,0 +1,5 @@
<terrains boes="2.0.0">
<terrain id='0'>
<trim>bad</trim>
</terrain>
</terrains>

View File

@@ -0,0 +1,13 @@
<terrains boes="2.0.0">
<terrain id='0'>
<name>Test Terrain</name>
<pic>0</pic>
<map>0</map>
<blockage>move</blockage>
<trim>none</trim>
<arena>0</arena>
<special>
<type>none</type>
</special>
</terrain>
</terrains>

View File

@@ -0,0 +1,5 @@
<terrains boes="2.0.0">
<terrain id='0'>
<special></special>
</terrain>
</terrains>

View File

@@ -0,0 +1 @@
<terrains boes="2.0.0"><terrain></terrain></terrains>

View File

@@ -0,0 +1 @@
<terrains boes="2.0.0"><terrain id='0'></terrain></terrains>

View File

@@ -0,0 +1 @@
<terrains></terrains>

View File

@@ -0,0 +1,11 @@
<terrains boes="2.0.0">
<terrain id='0'>
<special>
<type>none</type>
<flag>0</flag>
<flag>0</flag>
<flag>0</flag>
<flag>0</flag>
</special>
</terrain>
</terrains>