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,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>