Merge pull request #531 from ennorehling/bug-1859-maxsize

bugfix 2221 (maxsize) and 2227 (wisps)
This commit is contained in:
Enno Rehling 2016-08-06 14:49:02 +02:00 committed by GitHub
commit be54c60a34
83 changed files with 184 additions and 157 deletions

26
.editorconfig Normal file
View File

@ -0,0 +1,26 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# 4 space indentation
[*.{c,h,lua}]
indent_style = space
indent_size = 4
[*.{xml,json}]
charset = utf-8
# Tab indentation (no size specified)
[Makefile]
indent_style = tab
# Matches exact files
[.travis.yml]
indent_style = space
indent_size = 2

View File

@ -3,7 +3,7 @@
<resource name="adamantium" limited="yes" material="rm_adamantium"> <resource name="adamantium" limited="yes" material="rm_adamantium">
<item weight="200" score="200"> <item weight="200" score="200">
<construction skill="mining" minskill="8" reqsize="1"/> <construction skill="mining" minskill="8"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier type="require" building="mine"/> <modifier type="require" building="mine"/>
@ -13,7 +13,7 @@
<resource name="adamantiumaxe"> <resource name="adamantiumaxe">
<item weight="100" score="500"> <item weight="100" score="500">
<construction skill="weaponsmithing" minskill="8" reqsize="1"> <construction skill="weaponsmithing" minskill="8">
<requirement type="adamantium" quantity="1"/> <requirement type="adamantium" quantity="1"/>
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
@ -26,7 +26,7 @@
<resource name="adamantiumplate"> <resource name="adamantiumplate">
<item weight="100" score="2000"> <item weight="100" score="2000">
<construction skill="armorer" minskill="10" reqsize="1"> <construction skill="armorer" minskill="10">
<requirement type="adamantium" quantity="3"/> <requirement type="adamantium" quantity="3"/>
</construction> </construction>
<armor ac="7" penalty="0.1"/> <armor ac="7" penalty="0.1"/>

View File

@ -3,22 +3,22 @@
<function name="name" value="castle_name_2"/> <function name="name" value="castle_name_2"/>
<function name="protection" value="building_protection"/> <function name="protection" value="building_protection"/>
<function name="taxes" value="lua_building_taxes"/> <function name="taxes" value="lua_building_taxes"/>
<construction skill="building" minskill="1" maxsize="10" reqsize="1" defense_bonus="0"> <construction skill="building" minskill="1" maxsize="10" defense_bonus="0">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="2" maxsize="40" reqsize="1" defense_bonus="1"> <construction skill="building" minskill="2" maxsize="40" defense_bonus="1">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="3" maxsize="200" reqsize="1" defense_bonus="3"> <construction skill="building" minskill="3" maxsize="200" defense_bonus="3">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="4" maxsize="1000" reqsize="1" defense_bonus="5"> <construction skill="building" minskill="4" maxsize="1000" defense_bonus="5">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="5" maxsize="5000" reqsize="1" defense_bonus="8"> <construction skill="building" minskill="5" maxsize="5000" defense_bonus="8">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="6" reqsize="1" defense_bonus="12"> <construction skill="building" minskill="6" defense_bonus="12">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
</building> </building>

View File

@ -2,25 +2,25 @@
<building name="castle" capacity="1" fort="yes"> <building name="castle" capacity="1" fort="yes">
<function name="name" value="castle_name"/> <function name="name" value="castle_name"/>
<function name="protection" value="building_protection"/> <function name="protection" value="building_protection"/>
<construction skill="building" minskill="1" maxsize="2" reqsize="1" defense_bonus="0"> <construction skill="building" minskill="1" maxsize="2" defense_bonus="0">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="1" maxsize="8" reqsize="1" defense_bonus="0"> <construction skill="building" minskill="1" maxsize="8" defense_bonus="0">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="2" maxsize="40" reqsize="1" defense_bonus="1"> <construction skill="building" minskill="2" maxsize="40" defense_bonus="1">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="3" maxsize="200" reqsize="1" defense_bonus="3"> <construction skill="building" minskill="3" maxsize="200" defense_bonus="3">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="4" maxsize="1000" reqsize="1" defense_bonus="5"> <construction skill="building" minskill="4" maxsize="1000" defense_bonus="5">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="5" maxsize="5000" reqsize="1" defense_bonus="8"> <construction skill="building" minskill="5" maxsize="5000" defense_bonus="8">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="6" reqsize="1" defense_bonus="12"> <construction skill="building" minskill="6" defense_bonus="12">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
</building> </building>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="chainmail"> <resource name="chainmail">
<item weight="200" score="90"> <item weight="200" score="90">
<construction skill="armorer" minskill="3" reqsize="1"> <construction skill="armorer" minskill="3">
<requirement type="iron" quantity="3"/> <requirement type="iron" quantity="3"/>
</construction> </construction>
<armor ac="3" penalty="0.15" magres="0.0"/> <armor ac="3" penalty="0.15" magres="0.0"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="laenmail"> <resource name="laenmail">
<item weight="100" score="1000"> <item weight="100" score="1000">
<construction skill="armorer" minskill="9" reqsize="1"> <construction skill="armorer" minskill="9">
<requirement type="laen" quantity="3"/> <requirement type="laen" quantity="3"/>
</construction> </construction>
<armor ac="6" penalty="0.0" magres="0.3" laen="yes" /> <armor ac="6" penalty="0.0" magres="0.3" laen="yes" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="laenshield"> <resource name="laenshield">
<item weight="0" score="1000"> <item weight="0" score="1000">
<construction skill="armorer" minskill="7" reqsize="1"> <construction skill="armorer" minskill="7">
<requirement type="laen" quantity="1"/> <requirement type="laen" quantity="1"/>
</construction> </construction>
<armor ac="2" penalty="-0.25" magres="0.3" laen="yes" shield="yes" /> <armor ac="2" penalty="-0.25" magres="0.3" laen="yes" shield="yes" />

View File

@ -2,7 +2,7 @@
<resource name="plate"> <resource name="plate">
<item weight="400" score="150"> <item weight="400" score="150">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="armorer" minskill="4" reqsize="1"> <construction skill="armorer" minskill="4">
<requirement type="iron" quantity="5"/> <requirement type="iron" quantity="5"/>
</construction> </construction>
<armor ac="5" penalty="0.30" magres="0.0"/> <armor ac="5" penalty="0.30" magres="0.0"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="rustychainmail"> <resource name="rustychainmail">
<item weight="200" score="30"> <item weight="200" score="30">
<construction skill="armorer" minskill="3" reqsize="1"> <construction skill="armorer" minskill="3">
<requirement type="iron" quantity="3"/> <requirement type="iron" quantity="3"/>
</construction> </construction>
<armor ac="2" penalty="0.30" magres="0.0"/> <armor ac="2" penalty="0.30" magres="0.0"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="rustyshield"> <resource name="rustyshield">
<item weight="100" score="10"> <item weight="100" score="10">
<construction skill="armorer" minskill="2" reqsize="1"> <construction skill="armorer" minskill="2">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<armor ac="1" penalty="0.0" magres="0.0" shield="yes"/> <armor ac="1" penalty="0.0" magres="0.0" shield="yes"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="shield"> <resource name="shield">
<item weight="100" score="30"> <item weight="100" score="30">
<construction skill="armorer" minskill="2" reqsize="1"> <construction skill="armorer" minskill="2">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<armor ac="1" penalty="-0.15" magres="0.0" shield="yes"/> <armor ac="1" penalty="-0.15" magres="0.0" shield="yes"/>

View File

@ -66,7 +66,7 @@
</building> </building>
<building name="monument" namechange="no" capacity="1"> <building name="monument" namechange="no" capacity="1">
<construction skill="building" minskill="4" reqsize="1"> <construction skill="building" minskill="4">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
@ -76,7 +76,7 @@
<building name="stables" capacity="1"> <building name="stables" capacity="1">
<maintenance type="money" amount="150" vital="yes"/> <maintenance type="money" amount="150" vital="yes"/>
<construction skill="building" minskill="2" reqsize="1"> <construction skill="building" minskill="2">
<requirement type="log" quantity="4"/> <requirement type="log" quantity="4"/>
<requirement type="stone" quantity="2"/> <requirement type="stone" quantity="2"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
@ -86,7 +86,7 @@
<building name="sawmill" capacity="1"> <building name="sawmill" capacity="1">
<maintenance type="money" amount="250" vital="yes"/> <maintenance type="money" amount="250" vital="yes"/>
<construction skill="building" minskill="3" reqsize="1"> <construction skill="building" minskill="3">
<requirement type="log" quantity="5"/> <requirement type="log" quantity="5"/>
<requirement type="stone" quantity="5"/> <requirement type="stone" quantity="5"/>
<requirement type="iron" quantity="3"/> <requirement type="iron" quantity="3"/>
@ -98,7 +98,7 @@
<function name="init" value="init_smithy"/> <function name="init" value="init_smithy"/>
<maintenance type="money" amount="300" vital="yes"/> <maintenance type="money" amount="300" vital="yes"/>
<maintenance type="log" amount="1"/> <maintenance type="log" amount="1"/>
<construction skill="building" minskill="3" reqsize="1"> <construction skill="building" minskill="3">
<requirement type="log" quantity="5"/> <requirement type="log" quantity="5"/>
<requirement type="stone" quantity="5"/> <requirement type="stone" quantity="5"/>
<requirement type="iron" quantity="2"/> <requirement type="iron" quantity="2"/>
@ -139,7 +139,7 @@
<building name="quarry" capacity="1"> <building name="quarry" capacity="1">
<maintenance type="money" amount="250" vital="yes"/> <maintenance type="money" amount="250" vital="yes"/>
<construction skill="building" minskill="2" reqsize="1"> <construction skill="building" minskill="2">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
<requirement type="log" quantity="5"/> <requirement type="log" quantity="5"/>
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
@ -149,7 +149,7 @@
<building name="mine" capacity="1"> <building name="mine" capacity="1">
<maintenance type="money" amount="500" vital="yes"/> <maintenance type="money" amount="500" vital="yes"/>
<construction skill="building" minskill="4" reqsize="1"> <construction skill="building" minskill="4">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
<requirement type="log" quantity="10"/> <requirement type="log" quantity="10"/>
<requirement type="stone" quantity="5"/> <requirement type="stone" quantity="5"/>
@ -159,7 +159,7 @@
<building name="lighthouse" capacity="1" maxcapacity="4"> <building name="lighthouse" capacity="1" maxcapacity="4">
<maintenance type="money" amount="100" vital="yes"/> <maintenance type="money" amount="100" vital="yes"/>
<construction skill="building" minskill="3" reqsize="1"> <construction skill="building" minskill="3">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="stone" quantity="2"/> <requirement type="stone" quantity="2"/>

View File

@ -1,10 +1,10 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- TODO: this does not work yet --> <!-- TODO: this does not work yet -->
<production> <production>
<construction resource="laenshield" skill="armorer" minskill="7" reqsize="1"> <construction resource="laenshield" skill="armorer" minskill="7">
<requirement type="laen" quantity="1"/> <requirement type="laen" quantity="1"/>
</construction> </construction>
<construction resource="laenmail" skill="armorer" minskill="9" reqsize="1"> <construction resource="laenmail" skill="armorer" minskill="9">
<requirement type="laen" quantity="3"/> <requirement type="laen" quantity="3"/>
</construction> </construction>
</production> </production>

View File

@ -143,7 +143,7 @@
<resource name="catapultammo"> <resource name="catapultammo">
<item weight="1000"> <item weight="1000">
<construction skill="quarrying" minskill="3" reqsize="1"> <construction skill="quarrying" minskill="3">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
</item> </item>

View File

@ -7,7 +7,7 @@
<item weight="0" score="30"> <item weight="0" score="30">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="1"/> <potion level="1"/>
<construction skill="alchemy" minskill="2" reqsize="1"> <construction skill="alchemy" minskill="2">
<requirement type="h4"/> <requirement type="h4"/>
<requirement type="h12"/> <requirement type="h12"/>
</construction> </construction>
@ -18,7 +18,7 @@
<item weight="0" score="30"> <item weight="0" score="30">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="1"/> <potion level="1"/>
<construction skill="alchemy" minskill="2" reqsize="1"> <construction skill="alchemy" minskill="2">
<requirement type="h6"/> <requirement type="h6"/>
<requirement type="h13"/> <requirement type="h13"/>
</construction> </construction>
@ -29,7 +29,7 @@
<item weight="0" score="30"> <item weight="0" score="30">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="1"/> <potion level="1"/>
<construction skill="alchemy" minskill="2" reqsize="1"> <construction skill="alchemy" minskill="2">
<requirement type="h0"/> <requirement type="h0"/>
<requirement type="h13"/> <requirement type="h13"/>
</construction> </construction>
@ -40,7 +40,7 @@
<item weight="0" score="30"> <item weight="0" score="30">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="1"/> <potion level="1"/>
<construction skill="alchemy" minskill="2" reqsize="1"> <construction skill="alchemy" minskill="2">
<requirement type="h5"/> <requirement type="h5"/>
<requirement type="h7"/> <requirement type="h7"/>
</construction> </construction>
@ -51,7 +51,7 @@
<item weight="0" score="60"> <item weight="0" score="60">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="2"/> <potion level="2"/>
<construction skill="alchemy" minskill="4" reqsize="1"> <construction skill="alchemy" minskill="4">
<requirement type="h14"/> <requirement type="h14"/>
<requirement type="h16"/> <requirement type="h16"/>
<requirement type="h1"/> <requirement type="h1"/>
@ -64,7 +64,7 @@
<item weight="0" score="60"> <item weight="0" score="60">
<function name="use" value="usehealingpotion"/> <function name="use" value="usehealingpotion"/>
<potion level="2"/> <potion level="2"/>
<construction skill="alchemy" minskill="4" reqsize="1"> <construction skill="alchemy" minskill="4">
<requirement type="h19"/> <requirement type="h19"/>
<requirement type="h4"/> <requirement type="h4"/>
<requirement type="h1"/> <requirement type="h1"/>
@ -77,7 +77,7 @@
<item weight="0" score="60"> <item weight="0" score="60">
<function name="use" value="usebloodpotion"/> <function name="use" value="usebloodpotion"/>
<potion level="2"/> <potion level="2"/>
<construction skill="alchemy" minskill="4" reqsize="1"> <construction skill="alchemy" minskill="4">
<requirement type="h17"/> <requirement type="h17"/>
<requirement type="h13"/> <requirement type="h13"/>
<requirement type="h4"/> <requirement type="h4"/>
@ -90,7 +90,7 @@
<item weight="0" score="90"> <item weight="0" score="90">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="3"/> <potion level="3"/>
<construction skill="alchemy" minskill="6" reqsize="1"> <construction skill="alchemy" minskill="6">
<requirement type="h9"/> <requirement type="h9"/>
<requirement type="h15"/> <requirement type="h15"/>
<requirement type="h12"/> <requirement type="h12"/>
@ -103,7 +103,7 @@
<item weight="0" score="90"> <item weight="0" score="90">
<function name="useonother" value="usefoolpotion"/> <function name="useonother" value="usefoolpotion"/>
<potion level="3"/> <potion level="3"/>
<construction skill="alchemy" minskill="6" reqsize="1"> <construction skill="alchemy" minskill="6">
<requirement type="h2"/> <requirement type="h2"/>
<requirement type="h3"/> <requirement type="h3"/>
<requirement type="h17"/> <requirement type="h17"/>
@ -116,7 +116,7 @@
<item weight="0" score="90"> <item weight="0" score="90">
<function name="use" value="usewarmthpotion"/> <function name="use" value="usewarmthpotion"/>
<potion level="3"/> <potion level="3"/>
<construction skill="alchemy" minskill="6" reqsize="1"> <construction skill="alchemy" minskill="6">
<requirement type="h18"/> <requirement type="h18"/>
<requirement type="h3"/> <requirement type="h3"/>
<requirement type="h16"/> <requirement type="h16"/>
@ -129,7 +129,7 @@
<item weight="0" score="90"> <item weight="0" score="90">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="3"/> <potion level="3"/>
<construction skill="alchemy" minskill="6" reqsize="1"> <construction skill="alchemy" minskill="6">
<requirement type="h4"/> <requirement type="h4"/>
<requirement type="h11"/> <requirement type="h11"/>
<requirement type="h10"/> <requirement type="h10"/>
@ -142,7 +142,7 @@
<item weight="0" score="90"> <item weight="0" score="90">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="3"/> <potion level="3"/>
<construction skill="alchemy" minskill="6" reqsize="1"> <construction skill="alchemy" minskill="6">
<requirement type="h19"/> <requirement type="h19"/>
<requirement type="h14"/> <requirement type="h14"/>
<requirement type="h0"/> <requirement type="h0"/>
@ -155,7 +155,7 @@
<item weight="0" score="120"> <item weight="0" score="120">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="4"/> <potion level="4"/>
<construction skill="alchemy" minskill="8" reqsize="1"> <construction skill="alchemy" minskill="8">
<requirement type="h14"/> <requirement type="h14"/>
<requirement type="h20"/> <requirement type="h20"/>
<requirement type="h15"/> <requirement type="h15"/>
@ -169,7 +169,7 @@
<item weight="0" score="120"> <item weight="0" score="120">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="4"/> <potion level="4"/>
<construction skill="alchemy" minskill="8" reqsize="1"> <construction skill="alchemy" minskill="8">
<requirement type="h5"/> <requirement type="h5"/>
<requirement type="h9"/> <requirement type="h9"/>
<requirement type="h12"/> <requirement type="h12"/>
@ -184,7 +184,7 @@
<item weight="0" score="120"> <item weight="0" score="120">
<function name="use" value="usepotion"/> <function name="use" value="usepotion"/>
<potion level="4"/> <potion level="4"/>
<construction skill="alchemy" minskill="8" reqsize="1"> <construction skill="alchemy" minskill="8">
<requirement type="h6"/> <requirement type="h6"/>
<requirement type="h12"/> <requirement type="h12"/>
<requirement type="h18"/> <requirement type="h18"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="cart"> <resource name="cart">
<item capacity="14000" weight="4000" score="60" vehicle="yes" big="yes"> <item capacity="14000" weight="4000" score="60" vehicle="yes" big="yes">
<construction skill="cartmaking" minskill="1" reqsize="1"> <construction skill="cartmaking" minskill="1">
<requirement type="log" quantity="5"/> <requirement type="log" quantity="5"/>
</construction> </construction>
</item> </item>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="horse" limited="yes" material="rm_horse"> <resource name="horse" limited="yes" material="rm_horse">
<item big="yes" weight="5000" score="10" capacity="7000" animal="yes"> <item big="yes" weight="5000" score="10" capacity="7000" animal="yes">
<construction skill="training" minskill="1" reqsize="1"/> <construction skill="training" minskill="1"/>
<function name="give" value="givehorses"/> <function name="give" value="givehorses"/>
</item> </item>
<resourcelimit> <resourcelimit>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="iron" limited="yes" material="rm_iron"> <resource name="iron" limited="yes" material="rm_iron">
<item weight="500" score="10"> <item weight="500" score="10">
<construction skill="mining" minskill="1" reqsize="1"/> <construction skill="mining" minskill="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="mine" type="skill" value="1"/> <modifier building="mine" type="skill" value="1"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="laen" limited="yes" material="rm_laen"> <resource name="laen" limited="yes" material="rm_laen">
<item weight="200" score="100"> <item weight="200" score="100">
<construction skill="mining" minskill="7" reqsize="1"/> <construction skill="mining" minskill="7"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier type="require" building="mine"/> <modifier type="require" building="mine"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="log" material="rm_tree"> <resource name="log" material="rm_tree">
<item weight="500" score="10"> <item weight="500" score="10">
<construction skill="forestry" minskill="1" reqsize="1"/> <construction skill="forestry" minskill="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="sawmill" type="skill" value="1"/> <modifier building="sawmill" type="skill" value="1"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="mallorn" material="rm_mallorn"> <resource name="mallorn" material="rm_mallorn">
<item weight="500" score="30"> <item weight="500" score="30">
<construction skill="forestry" minskill="2" reqsize="1"/> <construction skill="forestry" minskill="2"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="sawmill" type="skill" value="1"/> <modifier building="sawmill" type="skill" value="1"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="mallornseed" limited="yes"> <resource name="mallornseed" limited="yes">
<item weight="10" score="100"> <item weight="10" score="100">
<construction skill="herbalism" minskill="4" reqsize="1"/> <construction skill="herbalism" minskill="4"/>
</item> </item>
</resource> </resource>

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="seed" limited="yes"> <resource name="seed" limited="yes">
<item weight="10" score="50"> <item weight="10" score="50">
<construction skill="herbalism" minskill="3" reqsize="1"/> <construction skill="herbalism" minskill="3"/>
</item> </item>
</resource> </resource>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="stone" limited="yes" material="rm_stone"> <resource name="stone" limited="yes" material="rm_stone">
<item weight="6000" score="10" big="yes"> <item weight="6000" score="10" big="yes">
<construction skill="quarrying" minskill="1" reqsize="1"/> <construction skill="quarrying" minskill="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="quarry" type="skill" value="1"/> <modifier building="quarry" type="skill" value="1"/>

View File

@ -2,28 +2,28 @@
<ships> <ships>
<ship name="trireme" range="7" storm="1.00" damage="1.00" cargo="200000" cptskill="4" minskill="1" sumskill="120" opensea="yes"> <ship name="trireme" range="7" storm="1.00" damage="1.00" cargo="200000" cptskill="4" minskill="1" sumskill="120" opensea="yes">
<coast terrain="plain"/> <coast terrain="plain"/>
<construction skill="shipcraft" minskill="4" maxsize="200" reqsize="1"> <construction skill="shipcraft" minskill="4" maxsize="200">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
<ship name="caravel" range="5" storm="1.00" damage="1.00" cargo="300000" cptskill="3" minskill="1" sumskill="30" opensea="yes"> <ship name="caravel" range="5" storm="1.00" damage="1.00" cargo="300000" cptskill="3" minskill="1" sumskill="30" opensea="yes">
<coast terrain="plain"/> <coast terrain="plain"/>
<construction skill="shipcraft" minskill="3" maxsize="250" reqsize="1"> <construction skill="shipcraft" minskill="3" maxsize="250">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
<ship name="dragonship" range="5" storm="1.00" damage="1.00" cargo="100000" cptskill="2" minskill="1" sumskill="50" opensea="yes"> <ship name="dragonship" range="5" storm="1.00" damage="1.00" cargo="100000" cptskill="2" minskill="1" sumskill="50" opensea="yes">
<coast terrain="plain"/> <coast terrain="plain"/>
<construction skill="shipcraft" minskill="2" maxsize="100" reqsize="1"> <construction skill="shipcraft" minskill="2" maxsize="100">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
<ship name="longboat" range="3" storm="1.00" damage="1.00" cargo="50000" cptskill="1" minskill="1" sumskill="10" opensea="yes"> <ship name="longboat" range="3" storm="1.00" damage="1.00" cargo="50000" cptskill="1" minskill="1" sumskill="10" opensea="yes">
<coast terrain="plain"/> <coast terrain="plain"/>
<construction skill="shipcraft" minskill="1" maxsize="50" reqsize="1"> <construction skill="shipcraft" minskill="1" maxsize="50">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
@ -39,7 +39,7 @@
<coast terrain="activevolcano"/> <coast terrain="activevolcano"/>
<coast terrain="iceberg_sleep"/> <coast terrain="iceberg_sleep"/>
<coast terrain="iceberg"/> <coast terrain="iceberg"/>
<construction skill="shipcraft" minskill="100" maxsize="5" reqsize="1"/> <construction skill="shipcraft" minskill="100" maxsize="5"/>
</ship> </ship>
<ship name="boat" range="2" storm="1.00" damage="1.00" cargo="5000" cptskill="1" minskill="1" sumskill="2" opensea="yes"> <ship name="boat" range="2" storm="1.00" damage="1.00" cargo="5000" cptskill="1" minskill="1" sumskill="2" opensea="yes">
@ -53,7 +53,7 @@
<coast terrain="activevolcano"/> <coast terrain="activevolcano"/>
<coast terrain="iceberg_sleep"/> <coast terrain="iceberg_sleep"/>
<coast terrain="iceberg"/> <coast terrain="iceberg"/>
<construction skill="shipcraft" minskill="1" maxsize="5" reqsize="1"> <construction skill="shipcraft" minskill="1" maxsize="5">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
@ -69,7 +69,7 @@
<coast terrain="activevolcano"/> <coast terrain="activevolcano"/>
<coast terrain="iceberg_sleep"/> <coast terrain="iceberg_sleep"/>
<coast terrain="iceberg"/> <coast terrain="iceberg"/>
<construction skill="shipcraft" minskill="100" maxsize="50" reqsize="1"/> <construction skill="shipcraft" minskill="100" maxsize="50"/>
</ship> </ship>
</ships> </ships>

View File

@ -2,7 +2,7 @@
<resource name="axe"> <resource name="axe">
<item weight="200"> <item weight="200">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="bow"> <resource name="bow">
<item weight="100"> <item weight="100">
<construction skill="weaponsmithing" minskill="2" reqsize="1"> <construction skill="weaponsmithing" minskill="2">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0"> <weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="catapult"> <resource name="catapult">
<item weight="10000" big="yes"> <item weight="10000" big="yes">
<construction skill="cartmaking" minskill="5" reqsize="1"> <construction skill="cartmaking" minskill="5">
<requirement type="log" quantity="10"/> <requirement type="log" quantity="10"/>
</construction> </construction>
<weapon siege="true" bash="true" missile="true" skill="catapult" offmod="0" defmod="0" reload="5"> <weapon siege="true" bash="true" missile="true" skill="catapult" offmod="0" defmod="0" reload="5">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="crossbow"> <resource name="crossbow">
<item weight="100"> <item weight="100">
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2"> <weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2">

View File

@ -2,7 +2,7 @@
<resource name="greatbow"> <resource name="greatbow">
<item weight="100"> <item weight="100">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="5" reqsize="1"> <construction skill="weaponsmithing" minskill="5">
<modifier function="mod_elves_only"/> <modifier function="mod_elves_only"/>
<requirement type="mallorn" quantity="2"/> <requirement type="mallorn" quantity="2"/>
</construction> </construction>

View File

@ -2,7 +2,7 @@
<resource name="greatsword"> <resource name="greatsword">
<item weight="200" score="30"> <item weight="200" score="30">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="4" reqsize="1"> <construction skill="weaponsmithing" minskill="4">
<requirement type="iron" quantity="2"/> <requirement type="iron" quantity="2"/>
</construction> </construction>
<weapon cut="true" skill="melee" offmod="-1" defmod="-2"> <weapon cut="true" skill="melee" offmod="-1" defmod="-2">

View File

@ -2,7 +2,7 @@
<resource name="halberd"> <resource name="halberd">
<item weight="200"> <item weight="200">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="log" quantity="2"/> <requirement type="log" quantity="2"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="laensword"> <resource name="laensword">
<item weight="100" score="400"> <item weight="100" score="400">
<construction skill="weaponsmithing" minskill="8" reqsize="1"> <construction skill="weaponsmithing" minskill="8">
<requirement type="laen" quantity="1"/> <requirement type="laen" quantity="1"/>
</construction> </construction>
<weapon cut="true" skill="melee" offmod="1" defmod="1" magres="0.30"> <weapon cut="true" skill="melee" offmod="1" defmod="1" magres="0.30">

View File

@ -2,7 +2,7 @@
<resource name="lance"> <resource name="lance">
<item weight="200"> <item weight="200">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="2" reqsize="1"> <construction skill="weaponsmithing" minskill="2">
<requirement type="log" quantity="2"/> <requirement type="log" quantity="2"/>
</construction> </construction>
<weapon pierce="true" skill="polearm" offmod="0" defmod="-2"> <weapon pierce="true" skill="polearm" offmod="0" defmod="-2">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="mallornbow"> <resource name="mallornbow">
<item weight="100"> <item weight="100">
<construction skill="weaponsmithing" minskill="5" reqsize="1"> <construction skill="weaponsmithing" minskill="5">
<requirement type="mallorn" quantity="1"/> <requirement type="mallorn" quantity="1"/>
</construction> </construction>
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.15"> <weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.15">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="mallorncrossbow"> <resource name="mallorncrossbow">
<item weight="100"> <item weight="100">
<construction skill="weaponsmithing" minskill="5" reqsize="1"> <construction skill="weaponsmithing" minskill="5">
<requirement type="mallorn" quantity="1"/> <requirement type="mallorn" quantity="1"/>
</construction> </construction>
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2" magres="0.15"> <weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2" magres="0.15">

View File

@ -2,7 +2,7 @@
<resource name="mallornlance"> <resource name="mallornlance">
<item weight="100"> <item weight="100">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="5" reqsize="1"> <construction skill="weaponsmithing" minskill="5">
<requirement type="mallorn" quantity="2"/> <requirement type="mallorn" quantity="2"/>
</construction> </construction>
<weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15"> <weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="mallornspear"> <resource name="mallornspear">
<item weight="100"> <item weight="100">
<construction skill="weaponsmithing" minskill="5" reqsize="1"> <construction skill="weaponsmithing" minskill="5">
<requirement type="mallorn" quantity="1"/> <requirement type="mallorn" quantity="1"/>
</construction> </construction>
<weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15"> <weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15">

View File

@ -2,7 +2,7 @@
<resource name="rep_crossbow"> <resource name="rep_crossbow">
<item weight="100"> <item weight="100">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="5" reqsize="1"> <construction skill="weaponsmithing" minskill="5">
<modifier function="mod_dwarves_only"/> <modifier function="mod_dwarves_only"/>
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>

View File

@ -2,7 +2,7 @@
<resource name="rustyaxe"> <resource name="rustyaxe">
<item weight="200"> <item weight="200">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="rustygreatsword"> <resource name="rustygreatsword">
<item weight="200" score="20"> <item weight="200" score="20">
<construction skill="weaponsmithing" minskill="4" reqsize="1"> <construction skill="weaponsmithing" minskill="4">
<requirement type="iron" quantity="2"/> <requirement type="iron" quantity="2"/>
</construction> </construction>
<weapon cut="true" skill="melee" offmod="-2" defmod="-3"> <weapon cut="true" skill="melee" offmod="-2" defmod="-3">

View File

@ -2,7 +2,7 @@
<resource name="rustyhalberd"> <resource name="rustyhalberd">
<item weight="200" score="20"> <item weight="200" score="20">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="rustysword"> <resource name="rustysword">
<item weight="100" score="10"> <item weight="100" score="10">
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<weapon cut="true" skill="melee" offmod="-1" defmod="-1"> <weapon cut="true" skill="melee" offmod="-1" defmod="-1">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="spear"> <resource name="spear">
<item weight="100"> <item weight="100">
<construction skill="weaponsmithing" minskill="2" reqsize="1"> <construction skill="weaponsmithing" minskill="2">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
<weapon pierce="true" skill="polearm" offmod="0" defmod="0"> <weapon pierce="true" skill="polearm" offmod="0" defmod="0">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="sword"> <resource name="sword">
<item weight="100" score="30"> <item weight="100" score="30">
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<weapon cut="true" skill="melee"> <weapon cut="true" skill="melee">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="chainmail"> <resource name="chainmail">
<item weight="200" score="90"> <item weight="200" score="90">
<construction skill="armorer" minskill="3" reqsize="1"> <construction skill="armorer" minskill="3">
<requirement type="iron" quantity="2"/> <requirement type="iron" quantity="2"/>
</construction> </construction>
<armor ac="2" penalty="0.10" projectile="0.0" magres="0.0"/> <armor ac="2" penalty="0.10" projectile="0.0" magres="0.0"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="laenmail"> <resource name="laenmail">
<item weight="100" score="1000"> <item weight="100" score="1000">
<construction skill="armorer" minskill="9" reqsize="1"> <construction skill="armorer" minskill="9">
<requirement type="laen" quantity="2"/> <requirement type="laen" quantity="2"/>
</construction> </construction>
<armor ac="3" penalty="0.0" projectile="0.10" magres="0.3" laen="yes" /> <armor ac="3" penalty="0.0" projectile="0.10" magres="0.3" laen="yes" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="laenshield"> <resource name="laenshield">
<item weight="0" score="1000"> <item weight="0" score="1000">
<construction skill="armorer" minskill="7" reqsize="1"> <construction skill="armorer" minskill="7">
<requirement type="laen" quantity="1"/> <requirement type="laen" quantity="1"/>
</construction> </construction>
<armor ac="1" penalty="-0.10" magres="0.3" laen="yes" shield="yes" /> <armor ac="1" penalty="-0.10" magres="0.3" laen="yes" shield="yes" />

View File

@ -2,7 +2,7 @@
<resource name="plate"> <resource name="plate">
<item weight="400" score="150"> <item weight="400" score="150">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="armorer" minskill="4" reqsize="1"> <construction skill="armorer" minskill="4">
<requirement type="iron" quantity="4"/> <requirement type="iron" quantity="4"/>
</construction> </construction>
<armor ac="3" penalty="0.15" projectile="0.10" magres="0.0"/> <armor ac="3" penalty="0.15" projectile="0.10" magres="0.0"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="rustychainmail"> <resource name="rustychainmail">
<item weight="200" score="30"> <item weight="200" score="30">
<construction skill="armorer" minskill="3" reqsize="1"> <construction skill="armorer" minskill="3">
<requirement type="iron" quantity="3"/> <requirement type="iron" quantity="3"/>
</construction> </construction>
<armor ac="1" penalty="0.20" magres="0.0"/> <armor ac="1" penalty="0.20" magres="0.0"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="rustyshield"> <resource name="rustyshield">
<item weight="100" score="10"> <item weight="100" score="10">
<construction skill="armorer" minskill="2" reqsize="1"> <construction skill="armorer" minskill="2">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<armor ac="0" penalty="-0.05" magres="0.0" shield="yes"/> <armor ac="0" penalty="-0.05" magres="0.0" shield="yes"/>

View File

@ -2,7 +2,7 @@
<resource name="scale"> <resource name="scale">
<item weight="300" score="150"> <item weight="300" score="150">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="armorer" minskill="5" reqsize="1"> <construction skill="armorer" minskill="5">
<modifier function="mod_dwarves_only"/> <modifier function="mod_dwarves_only"/>
<requirement type="iron" quantity="2"/> <requirement type="iron" quantity="2"/>
</construction> </construction>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="shield"> <resource name="shield">
<item weight="100" score="30"> <item weight="100" score="30">
<construction skill="armorer" minskill="2" reqsize="1"> <construction skill="armorer" minskill="2">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<armor ac="0" penalty="-0.10" magres="0.0" shield="yes"/> <armor ac="0" penalty="-0.10" magres="0.0" shield="yes"/>

View File

@ -2,7 +2,7 @@
<resource name="towershield"> <resource name="towershield">
<item weight="200" score="60"> <item weight="200" score="60">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="armorer" minskill="4" reqsize="1"> <construction skill="armorer" minskill="4">
<modifier function="mod_dwarves_only"/> <modifier function="mod_dwarves_only"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>

View File

@ -3,24 +3,24 @@
<xi:include href="config://default/buildings/castle-2.xml" /> <xi:include href="config://default/buildings/castle-2.xml" />
<building name="watch" capacity="1" maxsize="10" fort="yes"> <building name="watch" capacity="1" fort="yes">
<function name="name" value="fort_name"/> <function name="name" value="fort_name"/>
<function name="protection" value="building_protection"/> <function name="protection" value="building_protection"/>
<function name="taxes" value="lua_building_taxes"/> <function name="taxes" value="lua_building_taxes"/>
<construction skill="building" minskill="1" maxsize="5" reqsize="1" defense_bonus="0"> <construction skill="building" minskill="1" maxsize="5" defense_bonus="0">
<requirement type="log" quantity="1"/>
</construction>
<construction skill="building" minskill="2" maxsize="5" defense_bonus="1">
<requirement type="log" quantity="1"/>
</construction>
<construction skill="building" minskill="2" defense_bonus="2">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
<construction skill="building" minskill="2" maxsize="5" reqsize="1" defense_bonus="1">
<requirement type="log" quantity="1"/>
</construction>
<construction skill="building" minskill="2" reqsize="1" defense_bonus="2">
<requirement type="log" quantity="1"/>
</construction>
</building> </building>
<building name="market" capacity="1" maxsize="10"> <building name="market" capacity="1" maxsize="10">
<maintenance type="money" amount="200" vital="yes"/> <maintenance type="money" amount="200" vital="yes"/>
<construction skill="building" minskill="3" reqsize="1"> <construction skill="building" minskill="3">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>

View File

@ -71,7 +71,7 @@
<resource name="charger"> <resource name="charger">
<item big="yes" weight="5000" score="10" capacity="7000" animal="yes"> <item big="yes" weight="5000" score="10" capacity="7000" animal="yes">
<construction skill="training" minskill="4" reqsize="1"> <construction skill="training" minskill="4">
<requirement type="money" quantity="200"/> <requirement type="money" quantity="200"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
<requirement type="horse" quantity="1"/> <requirement type="horse" quantity="1"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="iron" limited="yes" material="rm_iron"> <resource name="iron" limited="yes" material="rm_iron">
<item weight="500" score="10"> <item weight="500" score="10">
<construction skill="mining" minskill="1" reqsize="1"/> <construction skill="mining" minskill="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="mine" type="skill" value="1"/> <modifier building="mine" type="skill" value="1"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="stone" limited="yes" material="rm_stone"> <resource name="stone" limited="yes" material="rm_stone">
<item weight="6000" score="10" big="yes"> <item weight="6000" score="10" big="yes">
<construction skill="quarrying" minskill="1" reqsize="1"/> <construction skill="quarrying" minskill="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="quarry" type="skill" value="1"/> <modifier building="quarry" type="skill" value="1"/>

View File

@ -10,7 +10,7 @@
<coast terrain="glacier"/> <coast terrain="glacier"/>
<coast terrain="volcano"/> <coast terrain="volcano"/>
<coast terrain="activevolcano"/> <coast terrain="activevolcano"/>
<construction skill="shipcraft" minskill="1" maxsize="3" reqsize="1"> <construction skill="shipcraft" minskill="1" maxsize="3">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
@ -20,7 +20,7 @@
<coast terrain="packice"/> <coast terrain="packice"/>
<coast terrain="swamp"/> <coast terrain="swamp"/>
<coast terrain="desert"/> <coast terrain="desert"/>
<construction skill="shipcraft" minskill="1" maxsize="10" reqsize="1"> <construction skill="shipcraft" minskill="1" maxsize="10">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
@ -35,7 +35,7 @@
<coast terrain="glacier"/> <coast terrain="glacier"/>
<coast terrain="volcano"/> <coast terrain="volcano"/>
<coast terrain="activevolcano"/> <coast terrain="activevolcano"/>
<construction skill="shipcraft" minskill="2" maxsize="10" reqsize="1"> <construction skill="shipcraft" minskill="2" maxsize="10">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
@ -50,7 +50,7 @@
<coast terrain="glacier"/> <coast terrain="glacier"/>
<coast terrain="volcano"/> <coast terrain="volcano"/>
<coast terrain="activevolcano"/> <coast terrain="activevolcano"/>
<construction skill="shipcraft" minskill="2" maxsize="10" reqsize="1"> <construction skill="shipcraft" minskill="2" maxsize="10">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
@ -66,7 +66,7 @@
<coast terrain="glacier"/> <coast terrain="glacier"/>
<coast terrain="volcano"/> <coast terrain="volcano"/>
<coast terrain="activevolcano"/> <coast terrain="activevolcano"/>
<construction skill="shipcraft" minskill="6" maxsize="10" reqsize="1"> <construction skill="shipcraft" minskill="6" maxsize="10">
<requirement type="mallorn" quantity="1"/> <requirement type="mallorn" quantity="1"/>
<requirement type="money" quantity="100"/> <requirement type="money" quantity="100"/>
</construction> </construction>
@ -75,7 +75,7 @@
<ship name="catamaran" range="7" storm="0.25" damage="1.00" cabins="22" cargo="10000" cptskill="7" minskill="1" sumskill="20" opensea="yes"> <ship name="catamaran" range="7" storm="0.25" damage="1.00" cabins="22" cargo="10000" cptskill="7" minskill="1" sumskill="20" opensea="yes">
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="packice"/> <coast terrain="packice"/>
<construction skill="shipcraft" minskill="8" maxsize="30" reqsize="1"> <construction skill="shipcraft" minskill="8" maxsize="30">
<requirement type="mallorn" quantity="1"/> <requirement type="mallorn" quantity="1"/>
<requirement type="money" quantity="100"/> <requirement type="money" quantity="100"/>
</construction> </construction>
@ -85,7 +85,7 @@
<ship name="cog" range="4" storm="0.50" damage="1.00" cabins="50" cargo="200000" cptskill="4" minskill="1" sumskill="20" opensea="yes"> <ship name="cog" range="4" storm="0.50" damage="1.00" cabins="50" cargo="200000" cptskill="4" minskill="1" sumskill="20" opensea="yes">
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="packice"/> <coast terrain="packice"/>
<construction skill="shipcraft" minskill="4" maxsize="100" reqsize="1"> <construction skill="shipcraft" minskill="4" maxsize="100">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
@ -93,7 +93,7 @@
<ship name="caravel" range="4" storm="0.50" damage="1.00" cabins="150" cargo="600000" cptskill="6" minskill="1" sumskill="30" opensea="yes"> <ship name="caravel" range="4" storm="0.50" damage="1.00" cabins="150" cargo="600000" cptskill="6" minskill="1" sumskill="30" opensea="yes">
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="packice"/> <coast terrain="packice"/>
<construction skill="shipcraft" minskill="6" maxsize="300" reqsize="1"> <construction skill="shipcraft" minskill="6" maxsize="300">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
@ -103,7 +103,7 @@
<modifier type="defense" value="+2"/> <modifier type="defense" value="+2"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="packice"/> <coast terrain="packice"/>
<construction skill="shipcraft" minskill="5" maxsize="100" reqsize="1"> <construction skill="shipcraft" minskill="5" maxsize="100">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="money" quantity="10"/> <requirement type="money" quantity="10"/>
</construction> </construction>
@ -113,7 +113,7 @@
<modifier type="defense" value="+2"/> <modifier type="defense" value="+2"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="packice"/> <coast terrain="packice"/>
<construction skill="shipcraft" minskill="7" maxsize="300" reqsize="1"> <construction skill="shipcraft" minskill="7" maxsize="300">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="money" quantity="10"/> <requirement type="money" quantity="10"/>
</construction> </construction>
@ -125,7 +125,7 @@
<modifier type="tactics" factor="2.00"/> <modifier type="tactics" factor="2.00"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="packice"/> <coast terrain="packice"/>
<construction skill="shipcraft" minskill="5" maxsize="100" reqsize="1"> <construction skill="shipcraft" minskill="5" maxsize="100">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="money" quantity="10"/> <requirement type="money" quantity="10"/>
</construction> </construction>
@ -136,7 +136,7 @@
<modifier type="tactics" factor="2.00"/> <modifier type="tactics" factor="2.00"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="packice"/> <coast terrain="packice"/>
<construction skill="shipcraft" minskill="7" maxsize="300" reqsize="1"> <construction skill="shipcraft" minskill="7" maxsize="300">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="money" quantity="10"/> <requirement type="money" quantity="10"/>
</construction> </construction>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="crossbow"> <resource name="crossbow">
<item weight="100"> <item weight="100">
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2"> <weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2">

View File

@ -6,7 +6,7 @@
<resource name="greatbow"> <resource name="greatbow">
<item weight="100"> <item weight="100">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="5" reqsize="1"> <construction skill="weaponsmithing" minskill="5">
<modifier function="mod_elves_only"/> <modifier function="mod_elves_only"/>
<requirement type="mallorn" quantity="2"/> <requirement type="mallorn" quantity="2"/>
</construction> </construction>

View File

@ -4,7 +4,7 @@
--> -->
<resource name="greatsword"> <resource name="greatsword">
<item weight="200" score="30"> <item weight="200" score="30">
<construction skill="weaponsmithing" minskill="4" reqsize="1"> <construction skill="weaponsmithing" minskill="4">
<requirement type="iron" quantity="2"/> <requirement type="iron" quantity="2"/>
</construction> </construction>
<weapon useshield="false" cut="true" skill="melee" offmod="-1" defmod="-2" horse="false"> <weapon useshield="false" cut="true" skill="melee" offmod="-1" defmod="-2" horse="false">

View File

@ -5,7 +5,7 @@
<resource name="halberd"> <resource name="halberd">
<item weight="200"> <item weight="200">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="log" quantity="2"/> <requirement type="log" quantity="2"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>

View File

@ -4,7 +4,7 @@
--> -->
<resource name="laensword"> <resource name="laensword">
<item weight="100" score="400"> <item weight="100" score="400">
<construction skill="weaponsmithing" minskill="8" reqsize="1"> <construction skill="weaponsmithing" minskill="8">
<requirement type="laen" quantity="1"/> <requirement type="laen" quantity="1"/>
</construction> </construction>
<weapon cut="true" skill="melee" offmod="1" defmod="1" magres="0.30"> <weapon cut="true" skill="melee" offmod="1" defmod="1" magres="0.30">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="mallorncrossbow"> <resource name="mallorncrossbow">
<item weight="100"> <item weight="100">
<construction skill="weaponsmithing" minskill="5" reqsize="1"> <construction skill="weaponsmithing" minskill="5">
<requirement type="mallorn" quantity="1"/> <requirement type="mallorn" quantity="1"/>
</construction> </construction>
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2" magres="0.15"> <weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2" magres="0.15">

View File

@ -2,7 +2,7 @@
<resource name="mallornlance"> <resource name="mallornlance">
<item weight="100"> <item weight="100">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="5" reqsize="1"> <construction skill="weaponsmithing" minskill="5">
<requirement type="mallorn" quantity="2"/> <requirement type="mallorn" quantity="2"/>
</construction> </construction>
<weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15"> <weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15">

View File

@ -4,7 +4,7 @@
--> -->
<resource name="rustygreatsword"> <resource name="rustygreatsword">
<item weight="200" score="20"> <item weight="200" score="20">
<construction skill="weaponsmithing" minskill="4" reqsize="1"> <construction skill="weaponsmithing" minskill="4">
<requirement type="iron" quantity="2"/> <requirement type="iron" quantity="2"/>
</construction> </construction>
<weapon useshield="false" cut="true" skill="melee" offmod="-2" defmod="-3" horse="false"> <weapon useshield="false" cut="true" skill="melee" offmod="-2" defmod="-3" horse="false">

View File

@ -5,7 +5,7 @@
<resource name="rustyhalberd"> <resource name="rustyhalberd">
<item weight="200" score="20"> <item weight="200" score="20">
<function name="canuse" value="lua_canuse_item"/> <function name="canuse" value="lua_canuse_item"/>
<construction skill="weaponsmithing" minskill="3" reqsize="1"> <construction skill="weaponsmithing" minskill="3">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>

View File

@ -10,7 +10,7 @@
<coast terrain="activevolcano"/> <coast terrain="activevolcano"/>
<coast terrain="iceberg_sleep"/> <coast terrain="iceberg_sleep"/>
<coast terrain="iceberg"/> <coast terrain="iceberg"/>
<construction skill="shipcraft" minskill="1" maxsize="5" reqsize="1"> <construction skill="shipcraft" minskill="1" maxsize="5">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>

View File

@ -1160,7 +1160,8 @@ int seemode, FILE * F)
} }
} }
if (cs) { if (cs) {
const char *bname = mkname("border", b->type->name(b, r, f, GF_PURE)); const char *bname = border_name(b, r, f, GF_PURE);
bname = mkname("border", bname);
fprintf(F, "GRENZE %d\n", ++g); fprintf(F, "GRENZE %d\n", ++g);
fprintf(F, "\"%s\";typ\n", LOC(default_locale, bname)); fprintf(F, "\"%s\";typ\n", LOC(default_locale, bname));
fprintf(F, "%d;richtung\n", d); fprintf(F, "%d;richtung\n", d);

View File

@ -849,7 +849,6 @@ build_building(unit * u, const building_type * btype, int id, int want, order *
b->size += built; b->size += built;
if (b->type->maxsize > 0 && b->size > b->type->maxsize) { if (b->type->maxsize > 0 && b->size > b->type->maxsize) {
// this seems to be okay for a watch, but is not okay for an academy or harbour
log_error("build: %s has size=%d, maxsize=%d", buildingname(b), b->size, b->type->maxsize); log_error("build: %s has size=%d, maxsize=%d", buildingname(b), b->size, b->type->maxsize);
} }
fset(b, BLD_EXPANDED); fset(b, BLD_EXPANDED);

View File

@ -132,7 +132,7 @@ int buildingcapacity(const building * b)
} }
return b->size * b->type->capacity; return b->size * b->type->capacity;
} }
if (b->size >= b->type->maxsize) { if (building_finished(b)) {
if (b->type->maxcapacity >= 0) { if (b->type->maxcapacity >= 0) {
return b->type->maxcapacity; return b->type->maxcapacity;
} }
@ -648,15 +648,20 @@ buildingtype_exists(const region * r, const building_type * bt, bool working)
building *b; building *b;
for (b = rbuildings(r); b; b = b->next) { for (b = rbuildings(r); b; b = b->next) {
if (b->type == bt && b->size >= bt->maxsize && (!working || fval(b, BLD_WORKING))) if (b->type == bt && (!working || fval(b, BLD_WORKING)) && building_finished(b)) {
return true; return true;
}
} }
return false; return false;
} }
bool building_finished(const struct building *b) {
return b->size >= b->type->maxsize;
}
bool building_is_active(const struct building *b) { bool building_is_active(const struct building *b) {
return b && fval(b, BLD_WORKING) && b->size >= b->type->maxsize; return b && fval(b, BLD_WORKING) && building_finished(b);
} }
building *active_building(const unit *u, const struct building_type *btype) { building *active_building(const unit *u, const struct building_type *btype) {

View File

@ -92,15 +92,7 @@ extern "C" {
const struct building *b, int bsize); const struct building *b, int bsize);
bool in_safe_building(struct unit *u1, struct unit *u2); bool in_safe_building(struct unit *u1, struct unit *u2);
/* buildingt => building_type
* Name => locale_string(name)
* MaxGroesse => levels
* MinBauTalent => construction->minskill
* Kapazitaet => capacity, maxcapacity
* Materialien => construction->materials
* UnterSilber, UnterSpezialTyp, UnterSpezial => maintenance
* per_size => !maintenance->fixed
*/
#define BFL_NONE 0x00 #define BFL_NONE 0x00
#define BLD_MAINTAINED 0x01 /* vital maintenance paid for */ #define BLD_MAINTAINED 0x01 /* vital maintenance paid for */
#define BLD_WORKING 0x02 /* full maintenance paid, it works */ #define BLD_WORKING 0x02 /* full maintenance paid, it works */
@ -138,6 +130,7 @@ extern "C" {
struct region *r, const struct locale *lang); struct region *r, const struct locale *lang);
int build_building(struct unit *u, const struct building_type *typ, int build_building(struct unit *u, const struct building_type *typ,
int id, int size, struct order *ord); int id, int size, struct order *ord);
bool building_finished(const struct building *b);
/* Alte Gebäudetypen: */ /* Alte Gebäudetypen: */
@ -173,10 +166,6 @@ extern "C" {
bool building_is_active(const struct building *b); bool building_is_active(const struct building *b);
struct building *active_building(const struct unit *u, const struct building_type *btype); struct building *active_building(const struct unit *u, const struct building_type *btype);
#ifdef WDW_PYRAMID
extern int wdw_pyramid_level(const struct building *b);
#endif
extern const char *buildingname(const struct building *b); extern const char *buildingname(const struct building *b);
extern const char *building_getname(const struct building *b); extern const char *building_getname(const struct building *b);

View File

@ -677,3 +677,7 @@ int read_borders(gamedata *data)
} }
return 0; return 0;
} }
const char * border_name(const connection *co, const struct region * r, const struct faction * f, int flags) {
return (co->type->name) ? co->type->name(co, r, f, flags) : co->type->__name;
}

View File

@ -148,6 +148,9 @@ extern "C" {
/* game-specific callbacks */ /* game-specific callbacks */
void(*border_convert_cb) (struct connection * con, struct attrib * attr); void(*border_convert_cb) (struct connection * con, struct attrib * attr);
const char * border_name(const struct connection *co,
const struct region * r, const struct faction * f, int flags);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -1676,6 +1676,7 @@ int read_game(gamedata *data) {
if (b->type == bt_lighthouse) { if (b->type == bt_lighthouse) {
r->flags |= RF_LIGHTHOUSE; r->flags |= RF_LIGHTHOUSE;
} }
// repairs, bug 2221: // repairs, bug 2221:
if (b->type->maxsize>0 && b->size>b->type->maxsize) { if (b->type->maxsize>0 && b->size>b->type->maxsize) {
log_error("building too big: %s (%s size %d of %d), fixing.", buildingname(b), b->type->_name, b->size, b->type->maxsize); log_error("building too big: %s (%s size %d of %d), fixing.", buildingname(b), b->type->_name, b->size, b->type->maxsize);

View File

@ -1044,7 +1044,7 @@ struct building *inside_building(const struct unit *u)
if (!u->building) { if (!u->building) {
return NULL; return NULL;
} }
else if (u->building->size < u->building->type->maxsize) { else if (!building_finished(u->building)) {
/* Gebaeude noch nicht fertig */ /* Gebaeude noch nicht fertig */
return NULL; return NULL;
} }

View File

@ -10,7 +10,7 @@
without prior permission by the authors of Eressea. without prior permission by the authors of Eressea.
*/ */
#define INTPAK_VERSION 329 /* in binary, ints can get packed */ #define INTPAK_VERSION 329 /* in binary, ints can get packed. starting with E2/572 */
#define NOZEROIDS_VERSION 330 /* 2008-05-16 zero is not a valid ID for anything (including factions) */ #define NOZEROIDS_VERSION 330 /* 2008-05-16 zero is not a valid ID for anything (including factions) */
#define NOBORDERATTRIBS_VERSION 331 /* 2008-05-17 connection::attribs has been moved to userdata */ #define NOBORDERATTRIBS_VERSION 331 /* 2008-05-17 connection::attribs has been moved to userdata */
#define UIDHASH_VERSION 332 /* 2008-05-22 borders use the region.uid to store */ #define UIDHASH_VERSION 332 /* 2008-05-22 borders use the region.uid to store */

View File

@ -169,7 +169,7 @@ construction ** consPtr)
con->skill = sk; con->skill = sk;
con->maxsize = xml_ivalue(node, "maxsize", -1); con->maxsize = xml_ivalue(node, "maxsize", -1);
con->minskill = xml_ivalue(node, "minskill", -1); con->minskill = xml_ivalue(node, "minskill", -1);
con->reqsize = xml_ivalue(node, "reqsize", -1); con->reqsize = xml_ivalue(node, "reqsize", 1);
con->defense_bonus = xml_ivalue(node, "defense_bonus", 0); con->defense_bonus = xml_ivalue(node, "defense_bonus", 0);
con->close_combat_bonus = xml_ivalue(node, "close_combat_bonus", 0); con->close_combat_bonus = xml_ivalue(node, "close_combat_bonus", 0);
con->ranged_bonus = xml_ivalue(node, "ranged_bonus", 0); con->ranged_bonus = xml_ivalue(node, "ranged_bonus", 0);

View File

@ -1758,7 +1758,7 @@ unit *owner_buildingtyp(const region * r, const building_type * bt)
for (b = rbuildings(r); b; b = b->next) { for (b = rbuildings(r); b; b = b->next) {
owner = building_owner(b); owner = building_owner(b);
if (b->type == bt && owner != NULL) { if (b->type == bt && owner != NULL) {
if (b->size >= bt->maxsize) { if (building_finished(b)) {
return owner; return owner;
} }
} }

View File

@ -915,7 +915,7 @@ static void describe(stream *out, const seen_region * sr, faction * f)
for (b = get_borders(r, r2); b;) { for (b = get_borders(r, r2); b;) {
struct edge *e = edges; struct edge *e = edges;
bool transparent = b->type->transparent(b, f); bool transparent = b->type->transparent(b, f);
const char *name = b->type->name(b, r, f, GF_DETAILED | GF_ARTICLE); const char *name = border_name(b, r, f, GF_DETAILED | GF_ARTICLE);
if (!transparent) if (!transparent)
see[d] = false; see[d] = false;
@ -1898,7 +1898,7 @@ const faction * f)
} }
} }
if (b->size < b->type->maxsize) { if (!building_finished(b)) {
bytes = (int)strlcpy(bufp, LOC(lang, "nr_building_inprogress"), size); bytes = (int)strlcpy(bufp, LOC(lang, "nr_building_inprogress"), size);
if (wrptr(&bufp, &size, bytes) != 0) if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER(); WARN_STATIC_BUFFER();

View File

@ -975,7 +975,7 @@ static int sp_blessstonecircle(castorder * co)
return 0; return 0;
} }
if (b->size < b->type->maxsize) { if (!building_finished(b)) {
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order,
"error_notcomplete", "building", b)); "error_notcomplete", "building", b));
return 0; return 0;
@ -4502,11 +4502,11 @@ int sp_icastle(castorder * co)
if (type == bt_illusion) { if (type == bt_illusion) {
b->size = (rng_int() % (int)((power * power) + 1) * 10); b->size = (rng_int() % (int)((power * power) + 1) * 10);
} }
else if (type->maxsize == -1) { else if (type->maxsize >0) {
b->size = ((rng_int() % (int)(power)) + 1) * 5; b->size = type->maxsize;
} }
else { else {
b->size = type->maxsize; b->size = ((rng_int() % (int)(power)) + 1) * 5;
} }
if (type->name == NULL) { if (type->name == NULL) {

View File

@ -149,8 +149,7 @@ make_wormhole(const building_type * bt_wormhole, region * r1, region * r2)
attrib *a2 = a_add(&b2->attribs, a_new(&at_wormhole)); attrib *a2 = a_add(&b2->attribs, a_new(&at_wormhole));
a1->data.v = b2->region; a1->data.v = b2->region;
a2->data.v = b1->region; a2->data.v = b1->region;
b1->size = bt_wormhole->maxsize; b1->size = b2->size = bt_wormhole->maxcapacity * bt_wormhole->capacity;
b2->size = bt_wormhole->maxsize;
ADDMSG(&r1->msgs, msg_message("wormhole_appear", "region", r1)); ADDMSG(&r1->msgs, msg_message("wormhole_appear", "region", r1));
ADDMSG(&r2->msgs, msg_message("wormhole_appear", "region", r2)); ADDMSG(&r2->msgs, msg_message("wormhole_appear", "region", r2));
} }