halfling bonus removed

new e3 rule for dwarven castles
This commit is contained in:
Enno Rehling 2010-03-24 23:14:46 -07:00
parent 8a3d1cd219
commit 20b915151d
5 changed files with 30 additions and 2 deletions

View File

@ -160,6 +160,7 @@
<param name="rules.economy.wages" value="1"/>
<param name="rules.economy.roqf" value="5"/>
<param name="rules.economy.herbrot" value="0"/>
<param name="rules.dwarf_castles" value="1"/>
<!-- param name="rules.nmr.destroy" value="1"/ -->
<param name="rules.limit.faction" value="250"/>
<!--param name="rules.give" value="15"/ --> <!-- self + peasants + herbs + lux - goods -->

View File

@ -57,7 +57,6 @@
<function name="itemdrop" value="defaultdrops"/>
<param name="other_race" value="dwarf"/>
<param name="other_cost" value="500"/>
<param name="morale" value="3"/>
<param name="luxury_trade" value="600"/>
<skill name="bow" modifier="-1"/>
<skill name="building" modifier="1"/>

View File

@ -4,6 +4,7 @@ require "e3a.rules"
local srcpath = config.source_dir
tests = {
srcpath .. '/eressea/scripts/tests/castles.lua',
srcpath .. '/eressea/scripts/tests/morale.lua',
srcpath .. '/server/scripts/tests/common.lua',
srcpath .. '/eressea/scripts/tests/e3a.lua',

27
scripts/tests/castles.lua Normal file
View File

@ -0,0 +1,27 @@
require "lunit"
module( "castles", package.seeall, lunit.testcase )
function setup()
free_game()
end
function test_small_castles()
local r = region.create(0, 0, "plain")
local f1 = faction.create("noreply@eressea.de", "human", "de")
local u1 = unit.create(f1, r, 1)
local f2 = faction.create("noreply@eressea.de", "halfling", "de")
local u2 = unit.create(f2, r, 1)
u1:add_item("money", 10000)
local b = building.create(r, "castle")
u2.building = b
u1.building = b
b.owner = u2
assert_equal("site", b:get_typename(7))
assert_equal("fortification", b:get_typename(8))
b.owner = u1
assert_equal("site", b:get_typename(9))
assert_equal("fortification", b:get_typename(10))
end

View File

@ -1,6 +1,6 @@
require "lunit"
module( "e3", package.seeall, lunit.testcase )
module( "morale", package.seeall, lunit.testcase )
function setup()
free_game()