forked from github/server
Some test requires that a cart exists.
Meropis gets its own list of items.
This commit is contained in:
parent
611fe8e2a1
commit
c810b72845
5 changed files with 22 additions and 12 deletions
|
@ -121,14 +121,6 @@
|
|||
</resource>
|
||||
|
||||
<!-- items -->
|
||||
<resource name="cart" big="true">
|
||||
<item capacity="14000" weight="4000" score="60" vehicle="yes">
|
||||
<construction skill="cartmaking" minskill="1" reqsize="1">
|
||||
<requirement type="log" quantity="5"/>
|
||||
</construction>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="antimagic" appearance="amulet">
|
||||
<item weight="0" score="2000">
|
||||
<function name="use" value="use_antimagiccrystal"/>
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<resources xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<!-- this file contains resources that can be mined in some way (anything with a resourcelimit) -->
|
||||
<!--
|
||||
this file contains the most important items and resources any game will
|
||||
want to use. Or maybe you just have to roll your own file.
|
||||
-->
|
||||
|
||||
<xi:include href="../resources/cart.xml"/>
|
||||
<xi:include href="../resources/horse.xml"/>
|
||||
<xi:include href="../resources/hp.xml"/>
|
||||
<xi:include href="../resources/iron.xml"/>
|
||||
|
|
8
res/resources/cart.xml
Normal file
8
res/resources/cart.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<resource name="cart" big="true">
|
||||
<item capacity="14000" weight="4000" score="60" vehicle="yes">
|
||||
<construction skill="cartmaking" minskill="1" reqsize="1">
|
||||
<requirement type="log" quantity="5"/>
|
||||
</construction>
|
||||
</item>
|
||||
</resource>
|
|
@ -22,13 +22,15 @@ function test_illegal_arg()
|
|||
end
|
||||
|
||||
function test_bson_readwrite()
|
||||
local r = region.create(0, 0, "mountain")
|
||||
local i, r = region.create(0, 0, "mountain")
|
||||
attrib.create(r, 42)
|
||||
write_game("test_read_write.dat")
|
||||
i = write_game("test_read_write.dat")
|
||||
assert_equal(0, i)
|
||||
free_game()
|
||||
r = get_region(0, 0)
|
||||
assert_equal(nil, r)
|
||||
read_game("test_read_write.dat")
|
||||
i = read_game("test_read_write.dat")
|
||||
assert_equal(0, i)
|
||||
r = get_region(0, 0)
|
||||
assert_not_equal(nil, r)
|
||||
for a in attrib.get(r) do
|
||||
|
|
|
@ -717,8 +717,11 @@ function test_ride_with_horses_and_cart()
|
|||
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
u:add_item("cart", 1)
|
||||
assert_equal(1, u:get_item("cart")) -- every game has a cart, right? right?
|
||||
u:add_item("horse", 2)
|
||||
assert_equal(2, u:get_item("horse")) -- every game has a horse, right? right?
|
||||
u:add_item("sword", 120)
|
||||
assert_equal(120, u:get_item("sword")) -- every game has a sword, right? and it weighs 1 unit?
|
||||
u:set_skill("riding", 3)
|
||||
|
||||
-- ride
|
||||
|
@ -824,6 +827,7 @@ module("tests.parser", package.seeall, lunit.testcase)
|
|||
|
||||
function setup()
|
||||
free_game()
|
||||
settings.set("rules.economy.food", "4") -- FOOD_IS_FREE
|
||||
end
|
||||
|
||||
function test_parser()
|
||||
|
|
Loading…
Reference in a new issue