undo more CRLF screwups.

This commit is contained in:
Enno Rehling 2010-08-08 01:06:34 -07:00
parent 14b3ed309f
commit a5e712580f
413 changed files with 105706 additions and 105752 deletions

View file

@ -1,9 +1,9 @@
<?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" reqsize="1">
<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"/>
</item> </item>
</resource> </resource>

View file

@ -1,9 +1,9 @@
<?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" reqsize="1">
<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" />
</item> </item>
</resource> </resource>

View file

@ -1,9 +1,9 @@
<?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" reqsize="1">
<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" />
</item> </item>
</resource> </resource>

View file

@ -1,10 +1,10 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<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"/>
</item> </item>
</resource> </resource>

View file

@ -1,10 +1,10 @@
<?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" reqsize="1">
<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"/>
</item> </item>
</resource> </resource>

View file

@ -1,9 +1,9 @@
<?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" reqsize="1">
<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"/>
</item> </item>
</resource> </resource>

View file

@ -1,9 +1,9 @@
<?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" reqsize="1">
<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"/>
</item> </item>
</resource> </resource>

View file

@ -1,23 +1,23 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<calendar name="secondage" newyear="month_1" start="0"> <calendar name="secondage" newyear="month_1" start="0">
<season name="winter"> <season name="winter">
<month name="month_4" storm="50" /> <month name="month_4" storm="50" />
<month name="month_5" storm="30" /> <month name="month_5" storm="30" />
<month name="month_6" storm="60" /> <month name="month_6" storm="60" />
</season> </season>
<season name="spring"> <season name="spring">
<month name="month_7" storm="60" /> <month name="month_7" storm="60" />
<month name="month_8" storm="10" /> <month name="month_8" storm="10" />
</season> </season>
<season name="summer"> <season name="summer">
<month name="month_9" storm="60" /> <month name="month_9" storm="60" />
<month name="month_1" storm="10" /> <month name="month_1" storm="10" />
</season> </season>
<season name="fall"> <season name="fall">
<month name="month_2" storm="60" /> <month name="month_2" storm="60" />
<month name="month_3" storm="80" /> <month name="month_3" storm="80" />
</season> </season>
<week name="firstweek" /> <week name="firstweek" />
<week name="secondweek" /> <week name="secondweek" />
<week name="thirdweek" /> <week name="thirdweek" />
</calendar> </calendar>

View file

@ -1,10 +1,10 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources xmlns:xi="http://www.w3.org/2001/XInclude"> <resources xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="../armor/chainmail.xml"/> <xi:include href="../armor/chainmail.xml"/>
<xi:include href="../armor/laenmail.xml"/> <xi:include href="../armor/laenmail.xml"/>
<xi:include href="../armor/laenshield.xml"/> <xi:include href="../armor/laenshield.xml"/>
<xi:include href="../armor/plate.xml"/> <xi:include href="../armor/plate.xml"/>
<xi:include href="../armor/rustychainmail.xml"/> <xi:include href="../armor/rustychainmail.xml"/>
<xi:include href="../armor/rustyshield.xml"/> <xi:include href="../armor/rustyshield.xml"/>
<xi:include href="../armor/shield.xml"/> <xi:include href="../armor/shield.xml"/>
</resources> </resources>

View file

@ -1,171 +1,171 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<buildings> <buildings>
<building name="wormhole" maxsize="4" capacity="1" maxcapacity="4" nobuild="yes" nodestroy="yes" unique="yes" /> <building name="wormhole" maxsize="4" capacity="1" maxcapacity="4" nobuild="yes" nodestroy="yes" unique="yes" />
<building name="illusioncastle" capacity="0" maxcapacity="0" maxsize="0" nobuild="yes"/> <building name="illusioncastle" capacity="0" maxcapacity="0" maxsize="0" nobuild="yes"/>
<building name="xmas_exit" maxsize="10" maxcapacity="2" nobuild="yes" nodestroy="yes" unique="yes"/> <building name="xmas_exit" maxsize="10" maxcapacity="2" nobuild="yes" nodestroy="yes" unique="yes"/>
<building name="caldera" capacity="1" nodestroy="yes" nobuild="yes"/> <building name="caldera" capacity="1" nodestroy="yes" nobuild="yes"/>
<building name="genericbuilding" namechange="no" maxsize="1" nobuild="yes"/> <building name="genericbuilding" namechange="no" maxsize="1" nobuild="yes"/>
<building name="artacademy" maxsize="100" nobuild="yes" nodestroy="yes" unique="yes"/> <building name="artacademy" maxsize="100" nobuild="yes" nodestroy="yes" unique="yes"/>
<building name="artsculpture" namechange="no" maxsize="100" nobuild="yes" nodestroy="yes" unique="yes"/> <building name="artsculpture" namechange="no" maxsize="100" nobuild="yes" nodestroy="yes" unique="yes"/>
<building name="blessedstonecircle" maxcapacity="3" maxsize="100" nobuild="yes" magic="yes" magres="60" magresbonus="30" auraregen="1.50"> <building name="blessedstonecircle" maxcapacity="3" maxsize="100" nobuild="yes" magic="yes" magres="60" magresbonus="30" auraregen="1.50">
<construction skill="building" minskill="2" reqsize="100" maxsize="100"> <construction skill="building" minskill="2" reqsize="100" maxsize="100">
<requirement type="log" quantity="500"/> <requirement type="log" quantity="500"/>
<requirement type="stone" quantity="500"/> <requirement type="stone" quantity="500"/>
</construction> </construction>
</building> </building>
<building name="stonecircle" maxsize="100"> <building name="stonecircle" maxsize="100">
<construction skill="building" minskill="2" reqsize="100" maxsize="100"> <construction skill="building" minskill="2" reqsize="100" maxsize="100">
<requirement type="log" quantity="500"/> <requirement type="log" quantity="500"/>
<requirement type="stone" quantity="500"/> <requirement type="stone" quantity="500"/>
</construction> </construction>
</building> </building>
<building name="inn" capacity="1"> <building name="inn" capacity="1">
<maintenance type="money" amount="5" variable="yes" vital="yes"/> <maintenance type="money" amount="5" variable="yes" vital="yes"/>
<construction skill="building" minskill="2" reqsize="10"> <construction skill="building" minskill="2" reqsize="10">
<requirement type="iron" quantity="10"/> <requirement type="iron" quantity="10"/>
<requirement type="log" quantity="30"/> <requirement type="log" quantity="30"/>
<requirement type="stone" quantity="40"/> <requirement type="stone" quantity="40"/>
<requirement type="money" quantity="2000"/> <requirement type="money" quantity="2000"/>
</construction> </construction>
</building> </building>
<building name="tunnel" capacity="1" maxsize="100"> <building name="tunnel" capacity="1" maxsize="100">
<maintenance type="stone" amount="2"/> <maintenance type="stone" amount="2"/>
<maintenance type="money" amount="100" vital="yes"/> <maintenance type="money" amount="100" vital="yes"/>
<construction skill="building" minskill="6" reqsize="100" maxsize="100"> <construction skill="building" minskill="6" reqsize="100" maxsize="100">
<requirement type="iron" quantity="100"/> <requirement type="iron" quantity="100"/>
<requirement type="log" quantity="500"/> <requirement type="log" quantity="500"/>
<requirement type="stone" quantity="1000"/> <requirement type="stone" quantity="1000"/>
<requirement type="money" quantity="30000"/> <requirement type="money" quantity="30000"/>
</construction> </construction>
</building> </building>
<building name="caravan" capacity="1" maxsize="10"> <building name="caravan" capacity="1" maxsize="10">
<maintenance type="horse" amount="2"/> <maintenance type="horse" amount="2"/>
<maintenance type="money" amount="3000" vital="yes"/> <maintenance type="money" amount="3000" vital="yes"/>
<construction skill="building" minskill="2" reqsize="10" maxsize="10"> <construction skill="building" minskill="2" reqsize="10" maxsize="10">
<requirement type="iron" quantity="10"/> <requirement type="iron" quantity="10"/>
<requirement type="log" quantity="50"/> <requirement type="log" quantity="50"/>
<requirement type="stone" quantity="10"/> <requirement type="stone" quantity="10"/>
<requirement type="money" quantity="5000"/> <requirement type="money" quantity="5000"/>
</construction> </construction>
</building> </building>
<building name="dam" capacity="1" maxsize="50"> <building name="dam" capacity="1" maxsize="50">
<maintenance type="log" amount="3"/> <maintenance type="log" amount="3"/>
<maintenance type="money" amount="1000" vital="yes"/> <maintenance type="money" amount="1000" vital="yes"/>
<construction skill="building" minskill="4" reqsize="50" maxsize="50"> <construction skill="building" minskill="4" reqsize="50" maxsize="50">
<requirement type="iron" quantity="50"/> <requirement type="iron" quantity="50"/>
<requirement type="log" quantity="500"/> <requirement type="log" quantity="500"/>
<requirement type="stone" quantity="250"/> <requirement type="stone" quantity="250"/>
<requirement type="money" quantity="25000"/> <requirement type="money" quantity="25000"/>
</construction> </construction>
</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" reqsize="1">
<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"/>
<requirement type="money" quantity="400"/> <requirement type="money" quantity="400"/>
</construction> </construction>
</building> </building>
<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" reqsize="1">
<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"/>
<requirement type="money" quantity="100"/> <requirement type="money" quantity="100"/>
</construction> </construction>
</building> </building>
<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" reqsize="1">
<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"/>
<requirement type="money" quantity="200"/> <requirement type="money" quantity="200"/>
</construction> </construction>
</building> </building>
<building name="smithy" capacity="1"> <building name="smithy" capacity="1">
<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" reqsize="1">
<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"/>
<requirement type="money" quantity="200"/> <requirement type="money" quantity="200"/>
</construction> </construction>
</building> </building>
<building name="magictower" maxcapacity="2" maxsize="50" magic="yes" magres="40" fumblebonus="10" auraregen="1.75"> <building name="magictower" maxcapacity="2" maxsize="50" magic="yes" magres="40" fumblebonus="10" auraregen="1.75">
<maintenance type="money" amount="1000" vital="yes"/> <maintenance type="money" amount="1000" vital="yes"/>
<construction skill="building" minskill="5" reqsize="50" maxsize="50"> <construction skill="building" minskill="5" reqsize="50" maxsize="50">
<requirement type="log" quantity="150"/> <requirement type="log" quantity="150"/>
<requirement type="stone" quantity="250"/> <requirement type="stone" quantity="250"/>
<requirement type="mallorn" quantity="100"/> <requirement type="mallorn" quantity="100"/>
<requirement type="iron" quantity="150"/> <requirement type="iron" quantity="150"/>
<requirement type="laen" quantity="100"/> <requirement type="laen" quantity="100"/>
<requirement type="money" quantity="25000"/> <requirement type="money" quantity="25000"/>
</construction> </construction>
</building> </building>
<building name="academy" maxcapacity="25" maxsize="25"> <building name="academy" maxcapacity="25" maxsize="25">
<maintenance type="money" amount="1000" vital="yes"/> <maintenance type="money" amount="1000" vital="yes"/>
<construction skill="building" minskill="3" reqsize="25" maxsize="25"> <construction skill="building" minskill="3" reqsize="25" maxsize="25">
<requirement type="log" quantity="125"/> <requirement type="log" quantity="125"/>
<requirement type="stone" quantity="125"/> <requirement type="stone" quantity="125"/>
<requirement type="iron" quantity="25"/> <requirement type="iron" quantity="25"/>
<requirement type="money" quantity="12500"/> <requirement type="money" quantity="12500"/>
</construction> </construction>
</building> </building>
<building name="harbour" capacity="1" maxcapacity="25" maxsize="25"> <building name="harbour" capacity="1" maxcapacity="25" maxsize="25">
<maintenance type="money" amount="250" vital="yes"/> <maintenance type="money" amount="250" vital="yes"/>
<construction skill="building" minskill="3" reqsize="25" maxsize="25"> <construction skill="building" minskill="3" reqsize="25" maxsize="25">
<requirement type="log" quantity="125"/> <requirement type="log" quantity="125"/>
<requirement type="stone" quantity="125"/> <requirement type="stone" quantity="125"/>
<requirement type="money" quantity="6250"/> <requirement type="money" quantity="6250"/>
</construction> </construction>
</building> </building>
<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" reqsize="1">
<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"/>
<requirement type="money" quantity="250"/> <requirement type="money" quantity="250"/>
</construction> </construction>
</building> </building>
<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" reqsize="1">
<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"/>
<requirement type="money" quantity="250"/> <requirement type="money" quantity="250"/>
</construction> </construction>
</building> </building>
<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" reqsize="1">
<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"/>
<requirement type="money" quantity="100"/> <requirement type="money" quantity="100"/>
</construction> </construction>
</building> </building>
</buildings> </buildings>

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" reqsize="1">
<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" reqsize="1">
<requirement type="laen" quantity="3"/> <requirement type="laen" quantity="3"/>
</construction> </construction>
</production> </production>

View file

@ -1,89 +1,89 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources> <resources>
<!-- this file contains herbs that are part of the alchemy system --> <!-- this file contains herbs that are part of the alchemy system -->
<resource name="h0" appearance="herbbag"><!-- Flachwurz --> <resource name="h0" appearance="herbbag"><!-- Flachwurz -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h1" appearance="herbbag"><!-- Würziger Wagemut --> <resource name="h1" appearance="herbbag"><!-- Würziger Wagemut -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h2" appearance="herbbag"><!-- Eulenauge --> <resource name="h2" appearance="herbbag"><!-- Eulenauge -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h3" appearance="herbbag"><!-- Grüner Spinnerich --> <resource name="h3" appearance="herbbag"><!-- Grüner Spinnerich -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h4" appearance="herbbag"><!-- Blauer Baumringel --> <resource name="h4" appearance="herbbag"><!-- Blauer Baumringel -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h5" appearance="herbbag"><!-- Elfenlieb --> <resource name="h5" appearance="herbbag"><!-- Elfenlieb -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h6" appearance="herbbag"><!-- Gurgelkraut --> <resource name="h6" appearance="herbbag"><!-- Gurgelkraut -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h7" appearance="herbbag"><!-- Knotiger Saugwurz --> <resource name="h7" appearance="herbbag"><!-- Knotiger Saugwurz -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h8" appearance="herbbag"><!-- Blasenmorchel --> <resource name="h8" appearance="herbbag"><!-- Blasenmorchel -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h9" appearance="herbbag"><!-- Wasserfinder --> <resource name="h9" appearance="herbbag"><!-- Wasserfinder -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h10" appearance="herbbag"> <resource name="h10" appearance="herbbag">
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h11" appearance="herbbag"> <resource name="h11" appearance="herbbag">
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h12" appearance="herbbag"><!-- Windbeutel --> <resource name="h12" appearance="herbbag"><!-- Windbeutel -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h13" appearance="herbbag"> <resource name="h13" appearance="herbbag">
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h14" appearance="herbbag"><!-- Alraune --> <resource name="h14" appearance="herbbag"><!-- Alraune -->
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h15" appearance="herbbag"> <resource name="h15" appearance="herbbag">
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h16" appearance="herbbag"> <resource name="h16" appearance="herbbag">
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h17" appearance="herbbag"> <resource name="h17" appearance="herbbag">
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h18" appearance="herbbag"> <resource name="h18" appearance="herbbag">
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h19" appearance="herbbag"> <resource name="h19" appearance="herbbag">
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
<resource name="h20" appearance="herbbag"> <resource name="h20" appearance="herbbag">
<item weight="0" score="10" herb="yes"/> <item weight="0" score="10" herb="yes"/>
</resource> </resource>
</resources> </resources>

View file

@ -1,156 +1,156 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources> <resources>
<resource name="ao_healing" appearance="amulet"> <resource name="ao_healing" appearance="amulet">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>
<resource name="aots" appearance="amulet"> <resource name="aots" appearance="amulet">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>
<resource name="roi" appearance=""> <resource name="roi" appearance="">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>
<resource name="rop" appearance=""> <resource name="rop" appearance="">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>
<resource name="roqf" appearance=""> <resource name="roqf" appearance="">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>
<resource name="trollbelt"> <resource name="trollbelt">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>
<resource name="presspass" cursed="yes"> <resource name="presspass" cursed="yes">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>
<resource name="aurafocus"> <resource name="aurafocus">
<item weight="100" score="6000"/> <item weight="100" score="6000"/>
</resource> </resource>
<resource name="sphereofinv" appearance=""> <resource name="sphereofinv" appearance="">
<item weight="100" score="6000"/> <item weight="100" score="6000"/>
</resource> </resource>
<resource name="magicbag"> <resource name="magicbag">
<item big="yes" notlost="yes" weight="100" score="6000"/> <item big="yes" notlost="yes" weight="100" score="6000"/>
</resource> </resource>
<resource name="magicherbbag" appearance=""> <resource name="magicherbbag" appearance="">
<item weight="100" score="6000"/> <item weight="100" score="6000"/>
</resource> </resource>
<resource name="ao_chastity" appearance="amulet"> <resource name="ao_chastity" appearance="amulet">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>
<resource name="fairyboot"> <resource name="fairyboot">
<item weight="0" score="6000"/> <item weight="0" score="6000"/>
</resource> </resource>
<resource name="aoc" appearance="amulet"> <resource name="aoc" appearance="amulet">
<item weight="100"> <item weight="100">
<function name="use" value="use_birthdayamulet"/> <function name="use" value="use_birthdayamulet"/>
</item> </item>
</resource> </resource>
<resource name="dreameye"> <resource name="dreameye">
<item weight="100"> <item weight="100">
<function name="use" value="use_tacticcrystal"/> <function name="use" value="use_tacticcrystal"/>
</item> </item>
</resource> </resource>
<resource name="pegasus"> <resource name="pegasus">
<item weight="5000" notlost="yes" big="yes" score="6000" capacity="7000" animal="yes"/> <item weight="5000" notlost="yes" big="yes" score="6000" capacity="7000" animal="yes"/>
</resource> </resource>
<resource name="elvenhorse"> <resource name="elvenhorse">
<item weight="5000" notlost="yes" big="yes" score="6000" capacity="7000" animal="yes"> <item weight="5000" notlost="yes" big="yes" score="6000" capacity="7000" animal="yes">
<function name="give" value="givehorses"/> <function name="give" value="givehorses"/>
</item> </item>
</resource> </resource>
<resource name="dolphin"> <resource name="dolphin">
<item weight="5000" notlost="yes" big="yes" score="6000" capacity="7000" animal="yes"/> <item weight="5000" notlost="yes" big="yes" score="6000" capacity="7000" animal="yes"/>
</resource> </resource>
<resource name="seaserpenthead"> <resource name="seaserpenthead">
<item weight="500" score="400"/> <item weight="500" score="400"/>
</resource> </resource>
<resource name="dragonblood"> <resource name="dragonblood">
<item weight="100" score="100"/> <item weight="100" score="100"/>
</resource> </resource>
<resource name="dragonhead"> <resource name="dragonhead">
<item weight="500" score="300"/> <item weight="500" score="300"/>
</resource> </resource>
<!-- XE items --> <!-- XE items -->
<resource name="skillpotion"> <resource name="skillpotion">
<!-- gives user one free learning attempt --> <!-- gives user one free learning attempt -->
<item weight="0"> <item weight="0">
<function name="use" value="use_skillpotion"/> <function name="use" value="use_skillpotion"/>
</item> </item>
</resource> </resource>
<resource name="manacrystal"> <resource name="manacrystal">
<!-- gives user free aura --> <!-- gives user free aura -->
<item weight="0"> <item weight="0">
<function name="use" value="use_manacrystal"/> <function name="use" value="use_manacrystal"/>
</item> </item>
</resource> </resource>
<!-- xmas items --> <!-- xmas items -->
<resource name="mistletoe"> <resource name="mistletoe">
<!-- Sets the chance of escape in a fight to 100 percent --> <!-- Sets the chance of escape in a fight to 100 percent -->
<item notlost="yes" weight="0"> <item notlost="yes" weight="0">
<function name="use" value="usemistletoe"/> <function name="use" value="usemistletoe"/>
</item> </item>
</resource> </resource>
<resource name="speedsail"> <resource name="speedsail">
<item weight="0"> <item weight="0">
<function name="use" value="use_speedsail"/> <function name="use" value="use_speedsail"/>
</item> </item>
</resource> </resource>
<!-- items --> <!-- items -->
<resource name="cart" big="true"> <resource name="cart" big="true">
<item capacity="14000" weight="4000" score="60" vehicle="yes"> <item capacity="14000" weight="4000" score="60" vehicle="yes">
<construction skill="cartmaking" minskill="1" reqsize="1"> <construction skill="cartmaking" minskill="1" reqsize="1">
<requirement type="log" quantity="5"/> <requirement type="log" quantity="5"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="antimagic" appearance="amulet"> <resource name="antimagic" appearance="amulet">
<item weight="0" score="2000"> <item weight="0" score="2000">
<function name="use" value="use_antimagiccrystal"/> <function name="use" value="use_antimagiccrystal"/>
</item> </item>
</resource> </resource>
<resource name="wand_of_tears"> <resource name="wand_of_tears">
<item notlost="yes" weight="0"> <item notlost="yes" weight="0">
<function name="use" value="use_wand_of_tears"/> <function name="use" value="use_wand_of_tears"/>
</item> </item>
</resource> </resource>
<resource name="catapultammo"> <resource name="catapultammo">
<item weight="1000"> <item weight="1000">
<construction skill="quarrying" minskill="3" reqsize="1"> <construction skill="quarrying" minskill="3" reqsize="1">
<requirement type="stone" quantity="1"/> <requirement type="stone" quantity="1"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="toadslime" appearance="vial"> <resource name="toadslime" appearance="vial">
<item weight="100" score="0"/> <item weight="100" score="0"/>
</resource> </resource>
</resources> </resources>

View file

@ -1,26 +1,26 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources> <resources>
<!-- this file contains luxury items that are part of the trade system --> <!-- this file contains luxury items that are part of the trade system -->
<resource name="balm"> <resource name="balm">
<item weight="200"><luxury price="4"/></item> <item weight="200"><luxury price="4"/></item>
</resource> </resource>
<resource name="spice"> <resource name="spice">
<item weight="200"><luxury price="5"/></item> <item weight="200"><luxury price="5"/></item>
</resource> </resource>
<resource name="jewel"> <resource name="jewel">
<item weight="100"><luxury price="7"/></item> <item weight="100"><luxury price="7"/></item>
</resource> </resource>
<resource name="myrrh"> <resource name="myrrh">
<item weight="200"><luxury price="5"/></item> <item weight="200"><luxury price="5"/></item>
</resource> </resource>
<resource name="oil"> <resource name="oil">
<item weight="300"><luxury price="3"/></item> <item weight="300"><luxury price="3"/></item>
</resource> </resource>
<resource name="silk"> <resource name="silk">
<item weight="300"><luxury price="6"/></item> <item weight="300"><luxury price="6"/></item>
</resource> </resource>
<resource name="incense"> <resource name="incense">
<item weight="200"><luxury price="4"/></item> <item weight="200"><luxury price="4"/></item>
</resource> </resource>
</resources> </resources>

View file

@ -1,197 +1,197 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources> <resources>
<!-- this file contains potions that are part of the alchemy system --> <!-- this file contains potions that are part of the alchemy system -->
<!-- potions --> <!-- potions -->
<resource name="p0" appearance="vial"> <resource name="p0" appearance="vial">
<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" reqsize="1">
<requirement type="h4"/> <requirement type="h4"/>
<requirement type="h12"/> <requirement type="h12"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="goliathwater" appearance="vial"> <resource name="goliathwater" appearance="vial">
<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" reqsize="1">
<requirement type="h6"/> <requirement type="h6"/>
<requirement type="h13"/> <requirement type="h13"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="truthpotion" appearance="vial"> <resource name="truthpotion" appearance="vial">
<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" reqsize="1">
<requirement type="h0"/> <requirement type="h0"/>
<requirement type="h13"/> <requirement type="h13"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="p2" appearance="vial"> <resource name="p2" appearance="vial">
<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" reqsize="1">
<requirement type="h5"/> <requirement type="h5"/>
<requirement type="h7"/> <requirement type="h7"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="p3" appearance="vial"> <resource name="p3" appearance="vial">
<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" reqsize="1">
<requirement type="h14"/> <requirement type="h14"/>
<requirement type="h16"/> <requirement type="h16"/>
<requirement type="h1"/> <requirement type="h1"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="ointment" appearance="vial"> <resource name="ointment" appearance="vial">
<!-- Wundsalbe --> <!-- Wundsalbe -->
<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" reqsize="1">
<requirement type="h19"/> <requirement type="h19"/>
<requirement type="h4"/> <requirement type="h4"/>
<requirement type="h1"/> <requirement type="h1"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="peasantblood" appearance="vial"> <resource name="peasantblood" appearance="vial">
<!-- Bauernblut --> <!-- Bauernblut -->
<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" reqsize="1">
<requirement type="h17"/> <requirement type="h17"/>
<requirement type="h13"/> <requirement type="h13"/>
<requirement type="h4"/> <requirement type="h4"/>
<requirement type="peasant"/> <requirement type="peasant"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="p6" appearance="vial"> <resource name="p6" appearance="vial">
<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" reqsize="1">
<requirement type="h9"/> <requirement type="h9"/>
<requirement type="h15"/> <requirement type="h15"/>
<requirement type="h12"/> <requirement type="h12"/>
<requirement type="h6"/> <requirement type="h6"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="p7" appearance="vial"> <resource name="p7" appearance="vial">
<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" reqsize="1">
<requirement type="h2"/> <requirement type="h2"/>
<requirement type="h3"/> <requirement type="h3"/>
<requirement type="h17"/> <requirement type="h17"/>
<requirement type="h13"/> <requirement type="h13"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="nestwarmth" appearance="vial"> <resource name="nestwarmth" appearance="vial">
<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" reqsize="1">
<requirement type="h18"/> <requirement type="h18"/>
<requirement type="h3"/> <requirement type="h3"/>
<requirement type="h16"/> <requirement type="h16"/>
<requirement type="h10"/> <requirement type="h10"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="p9" appearance="vial"> <resource name="p9" appearance="vial">
<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" reqsize="1">
<requirement type="h4"/> <requirement type="h4"/>
<requirement type="h11"/> <requirement type="h11"/>
<requirement type="h10"/> <requirement type="h10"/>
<requirement type="h7"/> <requirement type="h7"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="p10" appearance="vial"> <resource name="p10" appearance="vial">
<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" reqsize="1">
<requirement type="h19"/> <requirement type="h19"/>
<requirement type="h14"/> <requirement type="h14"/>
<requirement type="h0"/> <requirement type="h0"/>
<requirement type="h11"/> <requirement type="h11"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="p11" appearance="vial"> <resource name="p11" appearance="vial">
<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" reqsize="1">
<requirement type="h14"/> <requirement type="h14"/>
<requirement type="h20"/> <requirement type="h20"/>
<requirement type="h15"/> <requirement type="h15"/>
<requirement type="h8"/> <requirement type="h8"/>
<requirement type="h5"/> <requirement type="h5"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="p13" appearance="vial"> <resource name="p13" appearance="vial">
<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" reqsize="1">
<requirement type="h5"/> <requirement type="h5"/>
<requirement type="h9"/> <requirement type="h9"/>
<requirement type="h12"/> <requirement type="h12"/>
<requirement type="h3"/> <requirement type="h3"/>
<requirement type="h8"/> <requirement type="h8"/>
<requirement type="dragonblood"/> <requirement type="dragonblood"/>
</construction> </construction>
</item> </item>
</resource> </resource>
<resource name="p14" appearance="vial"> <resource name="p14" appearance="vial">
<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" reqsize="1">
<requirement type="h6"/> <requirement type="h6"/>
<requirement type="h12"/> <requirement type="h12"/>
<requirement type="h18"/> <requirement type="h18"/>
<requirement type="h5"/> <requirement type="h5"/>
<requirement type="h16"/> <requirement type="h16"/>
</construction> </construction>
</item> </item>
</resource> </resource>
</resources> </resources>

View file

@ -1,15 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources xmlns:xi="http://www.w3.org/2001/XInclude"> <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 resources that can be mined in some way (anything with a resourcelimit) -->
<xi:include href="../resources/horse.xml"/> <xi:include href="../resources/horse.xml"/>
<xi:include href="../resources/hp.xml"/> <xi:include href="../resources/hp.xml"/>
<xi:include href="../resources/iron.xml"/> <xi:include href="../resources/iron.xml"/>
<xi:include href="../resources/laen.xml"/> <xi:include href="../resources/laen.xml"/>
<xi:include href="../resources/log.xml"/> <xi:include href="../resources/log.xml"/>
<xi:include href="../resources/mallorn.xml"/> <xi:include href="../resources/mallorn.xml"/>
<xi:include href="../resources/mallornseed.xml"/> <xi:include href="../resources/mallornseed.xml"/>
<xi:include href="../resources/seed.xml"/> <xi:include href="../resources/seed.xml"/>
<xi:include href="../resources/peasant.xml"/> <xi:include href="../resources/peasant.xml"/>
<xi:include href="../resources/stone.xml"/> <xi:include href="../resources/stone.xml"/>
</resources> </resources>

View file

@ -1,24 +1,24 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources xmlns:xi="http://www.w3.org/2001/XInclude"> <resources xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="../weapons/axe.xml"/> <xi:include href="../weapons/axe.xml"/>
<xi:include href="../weapons/bow.xml"/> <xi:include href="../weapons/bow.xml"/>
<xi:include href="../weapons/catapult.xml"/> <xi:include href="../weapons/catapult.xml"/>
<xi:include href="../weapons/crossbow.xml"/> <xi:include href="../weapons/crossbow.xml"/>
<xi:include href="../weapons/firesword.xml"/> <xi:include href="../weapons/firesword.xml"/>
<xi:include href="../weapons/greatbow.xml"/> <xi:include href="../weapons/greatbow.xml"/>
<xi:include href="../weapons/greatsword.xml"/> <xi:include href="../weapons/greatsword.xml"/>
<xi:include href="../weapons/halberd.xml"/> <xi:include href="../weapons/halberd.xml"/>
<xi:include href="../weapons/laensword.xml"/> <xi:include href="../weapons/laensword.xml"/>
<xi:include href="../weapons/lance.xml"/> <xi:include href="../weapons/lance.xml"/>
<xi:include href="../weapons/mallornbow.xml"/> <xi:include href="../weapons/mallornbow.xml"/>
<xi:include href="../weapons/mallorncrossbow.xml"/> <xi:include href="../weapons/mallorncrossbow.xml"/>
<xi:include href="../weapons/mallornlance.xml"/> <xi:include href="../weapons/mallornlance.xml"/>
<xi:include href="../weapons/mallornspear.xml"/> <xi:include href="../weapons/mallornspear.xml"/>
<xi:include href="../weapons/runesword.xml"/> <xi:include href="../weapons/runesword.xml"/>
<xi:include href="../weapons/rustyaxe.xml"/> <xi:include href="../weapons/rustyaxe.xml"/>
<xi:include href="../weapons/rustygreatsword.xml"/> <xi:include href="../weapons/rustygreatsword.xml"/>
<xi:include href="../weapons/rustyhalberd.xml"/> <xi:include href="../weapons/rustyhalberd.xml"/>
<xi:include href="../weapons/rustysword.xml"/> <xi:include href="../weapons/rustysword.xml"/>
<xi:include href="../weapons/spear.xml"/> <xi:include href="../weapons/spear.xml"/>
<xi:include href="../weapons/sword.xml"/> <xi:include href="../weapons/sword.xml"/>
</resources> </resources>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,399 +1,399 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<equipment> <equipment>
<!-- equipment given to familiars --> <!-- equipment given to familiars -->
<set name="lynx_familiar"> <set name="lynx_familiar">
<skill name="espionage" level="1"/> <skill name="espionage" level="1"/>
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="stealth" level="1"/> <skill name="stealth" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
</set> </set>
<set name="tunnelworm_familiar"> <set name="tunnelworm_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="mining" level="1"/> <skill name="mining" level="1"/>
<skill name="forestry" level="1"/> <skill name="forestry" level="1"/>
<skill name="stamina" level="1"/> <skill name="stamina" level="1"/>
</set> </set>
<set name="eagle_familiar"> <set name="eagle_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
</set> </set>
<set name="rat_familiar"> <set name="rat_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="espionage" level="1"/> <skill name="espionage" level="1"/>
<skill name="stealth" level="1"/> <skill name="stealth" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
<skill name="stamina" level="6"/> <skill name="stamina" level="6"/>
</set> </set>
<set name="songdragon_familiar"> <set name="songdragon_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<!-- spells --> <!-- spells -->
<spell name="flee" school="gray"/> <spell name="flee" school="gray"/>
<spell name="sleep" school="gray"/> <spell name="sleep" school="gray"/>
<spell name="frighten" school="gray"/> <spell name="frighten" school="gray"/>
</set> </set>
<set name="nymph_familiar"> <set name="nymph_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="bow" level="1"/> <skill name="bow" level="1"/>
<skill name="herbalism" level="1"/> <skill name="herbalism" level="1"/>
<skill name="training" level="1"/> <skill name="training" level="1"/>
<skill name="riding" level="1"/> <skill name="riding" level="1"/>
<skill name="espionage" level="1"/> <skill name="espionage" level="1"/>
<skill name="stealth" level="1"/> <skill name="stealth" level="1"/>
<skill name="entertainment" level="1"/> <skill name="entertainment" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
<!-- spells --> <!-- spells -->
<spell name="seduction" school="gray"/> <spell name="seduction" school="gray"/>
<spell name="calm_monster" school="gray"/> <spell name="calm_monster" school="gray"/>
<spell name="song_of_confusion" school="gray"/> <spell name="song_of_confusion" school="gray"/>
<spell name="appeasement" school="gray"/> <spell name="appeasement" school="gray"/>
</set> </set>
<set name="unicorn_familiar"> <set name="unicorn_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="stealth" level="1"/> <skill name="stealth" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
<!-- spells --> <!-- spells -->
<spell name="resist_magic" school="gray"/> <spell name="resist_magic" school="gray"/>
<spell name="song_of_peace" school="gray"/> <spell name="song_of_peace" school="gray"/>
<spell name="calm_monster" school="gray"/> <spell name="calm_monster" school="gray"/>
<spell name="heroic_song" school="gray"/> <spell name="heroic_song" school="gray"/>
<spell name="song_of_healing" school="gray"/> <spell name="song_of_healing" school="gray"/>
<spell name="appeasement" school="gray"/> <spell name="appeasement" school="gray"/>
</set> </set>
<set name="direwolf_familiar"> <set name="direwolf_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
</set> </set>
<set name="ghost_familiar"> <set name="ghost_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<!-- spells --> <!-- spells -->
<spell name="steal_aura" school="gray"/> <spell name="steal_aura" school="gray"/>
<spell name="frighten" school="gray"/> <spell name="frighten" school="gray"/>
<spell name="summonundead" school="gray"/> <spell name="summonundead" school="gray"/>
</set> </set>
<set name="imp_familiar"> <set name="imp_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="espionage" level="1"/> <skill name="espionage" level="1"/>
<skill name="stealth" level="1"/> <skill name="stealth" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
<skill name="taxation" level="1"/> <skill name="taxation" level="1"/>
<!-- spells --> <!-- spells -->
<spell name="steal_aura" school="gray"/> <spell name="steal_aura" school="gray"/>
<spell name="shapeshift" school="gray"/> <spell name="shapeshift" school="gray"/>
<spell name="seduction" school="gray"/> <spell name="seduction" school="gray"/>
</set> </set>
<set name="dreamcat_familiar"> <set name="dreamcat_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="espionage" level="1"/> <skill name="espionage" level="1"/>
<skill name="stealth" level="1"/> <skill name="stealth" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
<skill name="taxation" level="1"/> <skill name="taxation" level="1"/>
<!-- spells --> <!-- spells -->
<spell name="shapeshift" school="gray"/> <spell name="shapeshift" school="gray"/>
<spell name="transferauratraum" school="gray"/> <spell name="transferauratraum" school="gray"/>
</set> </set>
<set name="fairy_familiar"> <set name="fairy_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<!-- spells --> <!-- spells -->
<spell name="appeasement" school="gray"/> <spell name="appeasement" school="gray"/>
<spell name="calm_monster" school="gray"/> <spell name="calm_monster" school="gray"/>
<spell name="seduction" school="gray"/> <spell name="seduction" school="gray"/>
</set> </set>
<set name="owl_familiar"> <set name="owl_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="espionage" level="1"/> <skill name="espionage" level="1"/>
<skill name="stealth" level="1"/> <skill name="stealth" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
</set> </set>
<set name="hellcat_familiar"> <set name="hellcat_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
</set> </set>
<set name="tiger_familiar"> <set name="tiger_familiar">
<skill name="magic" level="1"/> <skill name="magic" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
</set> </set>
<!-- one equipment-set per player-race for the first unit in a faction --> <!-- one equipment-set per player-race for the first unit in a faction -->
<set name="first_dwarf"> <set name="first_dwarf">
<item name="axe" amount="1"/> <item name="axe" amount="1"/>
<item name="chainmail" amount="1"/> <item name="chainmail" amount="1"/>
<skill name="melee" level="1"/> <skill name="melee" level="1"/>
</set> </set>
<set name="first_elf"> <set name="first_elf">
<item name="fairyboot" amount="1"/> <item name="fairyboot" amount="1"/>
<callback name="equip_newunits"/> <callback name="equip_newunits"/>
</set> </set>
<set name="first_orc"> <set name="first_orc">
<skill name="polearm" level="4"/> <skill name="polearm" level="4"/>
<skill name="melee" level="4"/> <skill name="melee" level="4"/>
<skill name="crossbow" level="4"/> <skill name="crossbow" level="4"/>
<skill name="catapult" level="4"/> <skill name="catapult" level="4"/>
<skill name="bow" level="4"/> <skill name="bow" level="4"/>
</set> </set>
<set name="first_goblin"> <set name="first_goblin">
<item name="roi" amount="1"/> <item name="roi" amount="1"/>
<callback name="equip_newunits"/> <callback name="equip_newunits"/>
</set> </set>
<set name="first_human"> <set name="first_human">
<callback name="equip_newunits"/> <callback name="equip_newunits"/>
</set> </set>
<set name="first_troll"> <set name="first_troll">
<skill name="building" level="1"/> <skill name="building" level="1"/>
<skill name="perception" level="3"/> <skill name="perception" level="3"/>
<item name="stone" amount="50"/> <item name="stone" amount="50"/>
</set> </set>
<set name="first_demon"> <set name="first_demon">
<skill name="stamina" level="15"/> <skill name="stamina" level="15"/>
</set> </set>
<set name="first_insect"> <set name="first_insect">
<item name="nestwarmth" amount="9"/> <item name="nestwarmth" amount="9"/>
</set> </set>
<set name="first_halfling"> <set name="first_halfling">
<skill name="trade" level="1"/> <skill name="trade" level="1"/>
<skill name="riding" level="2"/> <skill name="riding" level="2"/>
<item name="horse" amount="2"/> <item name="horse" amount="2"/>
<item name="cart" amount="1"/> <item name="cart" amount="1"/>
<item name="balm" amount="5"/> <item name="balm" amount="5"/>
<item name="spice" amount="5"/> <item name="spice" amount="5"/>
<item name="myrrh" amount="5"/> <item name="myrrh" amount="5"/>
<item name="jewel" amount="5"/> <item name="jewel" amount="5"/>
<item name="oil" amount="5"/> <item name="oil" amount="5"/>
<item name="silk" amount="5"/> <item name="silk" amount="5"/>
<item name="incense" amount="5"/> <item name="incense" amount="5"/>
</set> </set>
<set name="first_cat"> <set name="first_cat">
<item name="roi" amount="1"/> <item name="roi" amount="1"/>
<callback name="equip_newunits"/> <callback name="equip_newunits"/>
</set> </set>
<set name="first_aquarian"> <set name="first_aquarian">
<skill name="sailing" level="1"/> <skill name="sailing" level="1"/>
<callback name="equip_newunits"/> <callback name="equip_newunits"/>
</set> </set>
<set name="first_centaur"> <set name="first_centaur">
<callback name="equip_newunits"/> <callback name="equip_newunits"/>
</set> </set>
<!-- equipment-sets for random encounters --> <!-- equipment-sets for random encounters -->
<set name="random_desert"> <set name="random_desert">
<skill name="melee" level="d2"/> <skill name="melee" level="d2"/>
<skill name="trade" level="d3"/> <skill name="trade" level="d3"/>
<skill name="riding" level="d2+1"/> <skill name="riding" level="d2+1"/>
<skill name="training" level="d2+1"/> <skill name="training" level="d2+1"/>
<item name="horse" amount="1"/> <item name="horse" amount="1"/>
<item name="sword" amount="1"/> <item name="sword" amount="1"/>
<item name="money" amount="d30+19"/> <item name="money" amount="d30+19"/>
</set> </set>
<set name="random_swamp"> <set name="random_swamp">
<skill name="stealth" level="d3+1"/> <skill name="stealth" level="d3+1"/>
<skill name="polearm" level="d3+1"/> <skill name="polearm" level="d3+1"/>
<item name="spear" amount="1"/> <item name="spear" amount="1"/>
<item name="money" amount="d20+9"/> <item name="money" amount="d20+9"/>
</set> </set>
<set name="random_glacier"> <set name="random_glacier">
<skill name="armorer" level="d2+1"/> <skill name="armorer" level="d2+1"/>
<skill name="melee" level="d2+1"/> <skill name="melee" level="d2+1"/>
<item name="sword" amount="1"/> <item name="sword" amount="1"/>
<item name="money" amount="d20+19"/> <item name="money" amount="d20+19"/>
</set> </set>
<set name="random_mountain"> <set name="random_mountain">
<skill name="armorer" level="d2+1"/> <skill name="armorer" level="d2+1"/>
<skill name="melee" level="d2+1"/> <skill name="melee" level="d2+1"/>
<skill name="trade" level="d3"/> <skill name="trade" level="d3"/>
<item name="sword" amount="1"/> <item name="sword" amount="1"/>
<item name="money" amount="d40+59"/> <item name="money" amount="d40+59"/>
<subset chance="0.6"> <subset chance="0.6">
<set name="item_plate"/> <set name="item_plate"/>
</subset> </subset>
</set> </set>
<set name="random_highland"> <set name="random_highland">
<skill name="melee" level="d2"/> <skill name="melee" level="d2"/>
<item name="sword" amount="1"/> <item name="sword" amount="1"/>
<item name="money" amount="d10+19"/> <item name="money" amount="d10+19"/>
</set> </set>
<set name="random_forest"> <set name="random_forest">
<skill name="stealth" level="d2"/> <skill name="stealth" level="d2"/>
<skill name="perception" level="d2+1"/> <skill name="perception" level="d2+1"/>
<skill name="bow" level="d3+1"/> <skill name="bow" level="d3+1"/>
<item name="bow" amount="1"/> <item name="bow" amount="1"/>
<item name="money" amount="d20+9"/> <item name="money" amount="d20+9"/>
<subset chance="0.2"> <subset chance="0.2">
<set name="random_herbalist"/> <set name="random_herbalist"/>
</subset> </subset>
</set> </set>
<set name="random_herbalist"> <set name="random_herbalist">
<skill name="herbalism" level="d2"/> <skill name="herbalism" level="d2"/>
</set> </set>
<set name="random_villagers"> <set name="random_villagers">
<item name="money" amount="d80+19"/> <item name="money" amount="d80+19"/>
<skill name="cartmaking" level="d2-1"/> <skill name="cartmaking" level="d2-1"/>
<skill name="mining" level="d2-1"/> <skill name="mining" level="d2-1"/>
<skill name="quarrying" level="d2-1"/> <skill name="quarrying" level="d2-1"/>
<skill name="forestry" level="d2-1"/> <skill name="forestry" level="d2-1"/>
<item name="horse" amount="2"/> <item name="horse" amount="2"/>
<item name="wagon" amount="d2-1"/> <item name="wagon" amount="d2-1"/>
<item name="money" amount="d30+10"/> <item name="money" amount="d30+10"/>
</set> </set>
<set name="random_plain"> <set name="random_plain">
<item name="money" amount="d80+19"/> <item name="money" amount="d80+19"/>
<subset> <subset>
<set name="random_sword" chance="0.25"/> <set name="random_sword" chance="0.25"/>
<set name="random_spear" chance="0.25"/> <set name="random_spear" chance="0.25"/>
<set name="random_crossbow" chance="0.25"/> <set name="random_crossbow" chance="0.25"/>
<set name="random_bow" chance="0.25"/> <set name="random_bow" chance="0.25"/>
</subset> </subset>
<subset chance="0.4"> <subset chance="0.4">
<set name="item_chain"/> <set name="item_chain"/>
</subset> </subset>
<subset chance="0.3"> <subset chance="0.3">
<set name="random_rider"/> <set name="random_rider"/>
</subset> </subset>
</set> </set>
<set name="random_spear"> <set name="random_spear">
<skill name="polearm" level="d3"/> <skill name="polearm" level="d3"/>
<item name="spear" amount="1"/> <item name="spear" amount="1"/>
</set> </set>
<set name="random_sword"> <set name="random_sword">
<skill name="sword" level="d3"/> <skill name="sword" level="d3"/>
<item name="sword" amount="1"/> <item name="sword" amount="1"/>
</set> </set>
<set name="random_crossbow"> <set name="random_crossbow">
<skill name="crossbow" level="d3"/> <skill name="crossbow" level="d3"/>
<item name="crossbow" amount="1"/> <item name="crossbow" amount="1"/>
</set> </set>
<set name="random_bow"> <set name="random_bow">
<skill name="bow" level="d3"/> <skill name="bow" level="d3"/>
<item name="bow" amount="1"/> <item name="bow" amount="1"/>
</set> </set>
<set name="random_rider"> <set name="random_rider">
<item name="horse" amount="1"/> <item name="horse" amount="1"/>
<skill name="riding" level="d3"/> <skill name="riding" level="d3"/>
</set> </set>
<set name="recruited_dracoid"> <set name="recruited_dracoid">
<!-- dracoiden, von drachen rekrutiert --> <!-- dracoiden, von drachen rekrutiert -->
<skill name="polearm" level="d4+2"/> <skill name="polearm" level="d4+2"/>
<skill name="melee" level="d4+2"/> <skill name="melee" level="d4+2"/>
<skill name="bow" level="d3+1"/> <skill name="bow" level="d3+1"/>
<subset> <subset>
<!-- dracoiden haben immer eine von drei waffen --> <!-- dracoiden haben immer eine von drei waffen -->
<set name="item_sword" chance="0.33"/> <set name="item_sword" chance="0.33"/>
<set name="item_spear" chance="0.33"/> <set name="item_spear" chance="0.33"/>
<set name="item_bow" chance="0.34"/> <set name="item_bow" chance="0.34"/>
</subset> </subset>
</set> </set>
<set name="rising_undead"> <set name="rising_undead">
<!-- untote, von den graebern auferstanden --> <!-- untote, von den graebern auferstanden -->
<item name="rustysword" amount="1"/> <item name="rustysword" amount="1"/>
<item name="rustychainmail" amount="d2-1"/> <item name="rustychainmail" amount="d2-1"/>
<subset chance="0.3"> <subset chance="0.3">
<set name="item_rustyshield"/> <set name="item_rustyshield"/>
</subset> </subset>
</set> </set>
<!-- single-item sets (that can be given a percentage-chance in a subset) --> <!-- single-item sets (that can be given a percentage-chance in a subset) -->
<set name="item_plate"> <set name="item_plate">
<item name="plate" amount="1"/> <item name="plate" amount="1"/>
</set> </set>
<set name="item_spear"> <set name="item_spear">
<item name="spear" amount="1"/> <item name="spear" amount="1"/>
</set> </set>
<set name="item_bow"> <set name="item_bow">
<item name="bow" amount="1"/> <item name="bow" amount="1"/>
</set> </set>
<set name="item_sword"> <set name="item_sword">
<item name="sword" amount="1"/> <item name="sword" amount="1"/>
</set> </set>
<set name="item_chain"> <set name="item_chain">
<item name="chainmail" amount="1"/> <item name="chainmail" amount="1"/>
</set> </set>
<set name="item_log"> <set name="item_log">
<item name="log" amount="1"/> <item name="log" amount="1"/>
</set> </set>
<set name="item_rustychain"> <set name="item_rustychain">
<item name="rustychainmail" amount="1"/> <item name="rustychainmail" amount="1"/>
</set> </set>
<set name="dragon_spoils"> <set name="dragon_spoils">
<item name="dragonblood" amount="4"/> <item name="dragonblood" amount="4"/>
<item name="dragonhead" amount="1"/> <item name="dragonhead" amount="1"/>
</set> </set>
<set name="youngdragon_spoils"> <set name="youngdragon_spoils">
<item name="dragonblood" amount="1"/> <item name="dragonblood" amount="1"/>
</set> </set>
<set name="wyrm_spoils"> <set name="wyrm_spoils">
<item name="dragonblood" amount="10"/> <item name="dragonblood" amount="10"/>
<item name="dragonhead" amount="1"/> <item name="dragonhead" amount="1"/>
</set> </set>
<!-- sets that are used by the monster-spawning code --> <!-- sets that are used by the monster-spawning code -->
<set name="monster_dragon"> <set name="monster_dragon">
<skill name="magic" level="4"/> <skill name="magic" level="4"/>
<skill name="stealth" level="1"/> <skill name="stealth" level="1"/>
<skill name="stamina" level="1"/> <skill name="stamina" level="1"/>
<skill name="perception" level="d3"/> <skill name="perception" level="d3"/>
<item name="money" amount="d500+99"/> <item name="money" amount="d500+99"/>
</set> </set>
<set name="monster_braineater"> <set name="monster_braineater">
<skill name="stealth" level="1"/> <skill name="stealth" level="1"/>
<skill name="perception" level="1"/> <skill name="perception" level="1"/>
</set> </set>
<set name="monster_seaserpent"> <set name="monster_seaserpent">
<skill name="magic" level="4"/> <skill name="magic" level="4"/>
<skill name="stealth" level="2"/> <skill name="stealth" level="2"/>
<skill name="stamina" level="1"/> <skill name="stamina" level="1"/>
<skill name="perception" level="3"/> <skill name="perception" level="3"/>
</set> </set>
</equipment> </equipment>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,31 +1,31 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<prefixes> <prefixes>
<prefix>Dunkel</prefix> <prefix>Dunkel</prefix>
<prefix>Licht</prefix> <prefix>Licht</prefix>
<prefix>Klein</prefix> <prefix>Klein</prefix>
<prefix>Hoch</prefix> <prefix>Hoch</prefix>
<prefix>Huegel</prefix> <prefix>Huegel</prefix>
<prefix>Berg</prefix> <prefix>Berg</prefix>
<prefix>Wald</prefix> <prefix>Wald</prefix>
<prefix>Sumpf</prefix> <prefix>Sumpf</prefix>
<prefix>Schnee</prefix> <prefix>Schnee</prefix>
<prefix>Sonnen</prefix> <prefix>Sonnen</prefix>
<prefix>Mond</prefix> <prefix>Mond</prefix>
<prefix>See</prefix> <prefix>See</prefix>
<prefix>Tal</prefix> <prefix>Tal</prefix>
<prefix>Schatten</prefix> <prefix>Schatten</prefix>
<prefix>Hoehlen</prefix> <prefix>Hoehlen</prefix>
<prefix>Blut</prefix> <prefix>Blut</prefix>
<prefix>Wild</prefix> <prefix>Wild</prefix>
<prefix>Chaos</prefix> <prefix>Chaos</prefix>
<prefix>Nacht</prefix> <prefix>Nacht</prefix>
<prefix>Nebel</prefix> <prefix>Nebel</prefix>
<prefix>Grau</prefix> <prefix>Grau</prefix>
<prefix>Frost</prefix> <prefix>Frost</prefix>
<prefix>Finster</prefix> <prefix>Finster</prefix>
<prefix>Duester</prefix> <prefix>Duester</prefix>
<prefix>flame</prefix> <prefix>flame</prefix>
<prefix>ice</prefix> <prefix>ice</prefix>
<prefix>star</prefix> <prefix>star</prefix>
<prefix>black</prefix> <prefix>black</prefix>
</prefixes> </prefixes>

View file

@ -1,11 +1,11 @@
<?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" reqsize="1"/>
<function name="give" value="givehorses"/> <function name="give" value="givehorses"/>
</item> </item>
<resourcelimit> <resourcelimit>
<function name="produce" value="lua_produceresource"/> <function name="produce" value="lua_produceresource"/>
<function name="limit" value="lua_limitresource"/> <function name="limit" value="lua_limitresource"/>
</resourcelimit> </resourcelimit>
</resource> </resource>

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="hp" pooled="false"> <resource name="hp" pooled="false">
<function name="change" value="lua_changeresource"/> <function name="change" value="lua_changeresource"/>
<function name="get" value="lua_getresource"/> <function name="get" value="lua_getresource"/>
</resource> </resource>

View file

@ -1,12 +1,12 @@
<?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" reqsize="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="mine" type="skill" value="1"/> <modifier building="mine" type="skill" value="1"/>
<modifier building="mine" type="material" value="0.5"/> <modifier building="mine" type="material" value="0.5"/>
<modifier race="dwarf" type="material" value="0.60"/> <modifier race="dwarf" type="material" value="0.60"/>
<guard flag="mining"/> <guard flag="mining"/>
</resourcelimit> </resourcelimit>
</resource> </resource>

View file

@ -1,10 +1,10 @@
<?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" reqsize="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier type="require" building="mine"/> <modifier type="require" building="mine"/>
<guard flag="mining"/> <guard flag="mining"/>
</resourcelimit> </resourcelimit>
</resource> </resource>

View file

@ -1,13 +1,13 @@
<?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" reqsize="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="sawmill" type="skill" value="1"/> <modifier building="sawmill" type="skill" value="1"/>
<modifier building="sawmill" type="material" value="0.5"/> <modifier building="sawmill" type="material" value="0.5"/>
<guard flag="logging"/> <guard flag="logging"/>
<function name="produce" value="lua_produceresource"/> <function name="produce" value="lua_produceresource"/>
<function name="limit" value="lua_limitresource"/> <function name="limit" value="lua_limitresource"/>
</resourcelimit> </resourcelimit>
</resource> </resource>

View file

@ -1,13 +1,13 @@
<?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" reqsize="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="sawmill" type="skill" value="1"/> <modifier building="sawmill" type="skill" value="1"/>
<modifier building="sawmill" type="material" value="0.5"/> <modifier building="sawmill" type="material" value="0.5"/>
<guard flag="logging"/> <guard flag="logging"/>
<function name="produce" value="lua_produceresource"/> <function name="produce" value="lua_produceresource"/>
<function name="limit" value="lua_limitresource"/> <function name="limit" value="lua_limitresource"/>
</resourcelimit> </resourcelimit>
</resource> </resource>

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" reqsize="1"/>
</item> </item>
</resource> </resource>

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="peasant" pooled="false"> <resource name="peasant" pooled="false">
<function name="change" value="lua_changeresource"/> <function name="change" value="lua_changeresource"/>
<function name="get" value="lua_getresource"/> <function name="get" value="lua_getresource"/>
</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" reqsize="1"/>
</item> </item>
</resource> </resource>

View file

@ -1,11 +1,11 @@
<?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" reqsize="1"/>
</item> </item>
<resourcelimit> <resourcelimit>
<modifier building="quarry" type="skill" value="1"/> <modifier building="quarry" type="skill" value="1"/>
<modifier building="quarry" type="material" value="0.5"/> <modifier building="quarry" type="material" value="0.5"/>
<modifier race="troll" type="material" value="0.75"/> <modifier race="troll" type="material" value="0.75"/>
</resourcelimit> </resourcelimit>
</resource> </resource>

View file

@ -1,83 +1,83 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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="ocean"/> <coast terrain="ocean"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<construction skill="shipcraft" minskill="4" maxsize="200" reqsize="1"> <construction skill="shipcraft" minskill="4" maxsize="200" reqsize="1">
<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="ocean"/> <coast terrain="ocean"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<construction skill="shipcraft" minskill="3" maxsize="250" reqsize="1"> <construction skill="shipcraft" minskill="3" maxsize="250" reqsize="1">
<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="ocean"/> <coast terrain="ocean"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<construction skill="shipcraft" minskill="2" maxsize="100" reqsize="1"> <construction skill="shipcraft" minskill="2" maxsize="100" reqsize="1">
<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="ocean"/> <coast terrain="ocean"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<construction skill="shipcraft" minskill="1" maxsize="50" reqsize="1"> <construction skill="shipcraft" minskill="1" maxsize="50" reqsize="1">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
<ship name="balloon" range="2" storm="1.00" damage="1.00" cargo="5000" cptskill="6" minskill="6" sumskill="6" opensea="yes" fly="yes"> <ship name="balloon" range="2" storm="1.00" damage="1.00" cargo="5000" cptskill="6" minskill="6" sumskill="6" opensea="yes" fly="yes">
<coast terrain="ocean"/> <coast terrain="ocean"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="swamp"/> <coast terrain="swamp"/>
<coast terrain="desert"/> <coast terrain="desert"/>
<coast terrain="highland"/> <coast terrain="highland"/>
<coast terrain="mountain"/> <coast terrain="mountain"/>
<coast terrain="glacier"/> <coast terrain="glacier"/>
<coast terrain="volcano"/> <coast terrain="volcano"/>
<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" reqsize="1"/>
</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">
<coast terrain="ocean"/> <coast terrain="ocean"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="swamp"/> <coast terrain="swamp"/>
<coast terrain="desert"/> <coast terrain="desert"/>
<coast terrain="highland"/> <coast terrain="highland"/>
<coast terrain="mountain"/> <coast terrain="mountain"/>
<coast terrain="glacier"/> <coast terrain="glacier"/>
<coast terrain="volcano"/> <coast terrain="volcano"/>
<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" reqsize="1">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
</ship> </ship>
<ship name="flyingcarpet" range="3" storm="1.00" damage="1.00" cargo="50000" cptskill="6" minskill="6" sumskill="10" opensea="yes" fly="yes"> <ship name="flyingcarpet" range="3" storm="1.00" damage="1.00" cargo="50000" cptskill="6" minskill="6" sumskill="10" opensea="yes" fly="yes">
<coast terrain="ocean"/> <coast terrain="ocean"/>
<coast terrain="plain"/> <coast terrain="plain"/>
<coast terrain="swamp"/> <coast terrain="swamp"/>
<coast terrain="desert"/> <coast terrain="desert"/>
<coast terrain="highland"/> <coast terrain="highland"/>
<coast terrain="mountain"/> <coast terrain="mountain"/>
<coast terrain="glacier"/> <coast terrain="glacier"/>
<coast terrain="volcano"/> <coast terrain="volcano"/>
<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" reqsize="1"/>
</ship> </ship>
</ships> </ships>

View file

@ -1,204 +1,204 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<spells> <spells>
<!-- draig spells --> <!-- draig spells -->
<spell name="create_roi" type="draig" ship="true" rank="5" level="6" index="130"> <spell name="create_roi" type="draig" ship="true" rank="5" level="6" index="130">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="earn_silver#draig" type="draig" ship="true" variable="true" rank="5" level="1" index="159"> <spell name="earn_silver#draig" type="draig" ship="true" variable="true" rank="5" level="1" index="159">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="1" cost="level"/> <resource name="aura" amount="1" cost="level"/>
</spell> </spell>
<spell name="create_aots" type="draig" ship="true" rank="5" level="6" index="125"> <spell name="create_aots" type="draig" ship="true" rank="5" level="6" index="125">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_firesword" type="draig" ship="true" rank="5" level="12" index="148"> <spell name="create_firesword" type="draig" ship="true" rank="5" level="12" index="148">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="p10" amount="1" cost="fixed"/> <resource name="p10" amount="1" cost="fixed"/>
<resource name="sword" amount="1" cost="fixed"/> <resource name="sword" amount="1" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_trollbelt" type="draig" ship="true" rank="5" level="9" index="48"> <spell name="create_trollbelt" type="draig" ship="true" rank="5" level="9" index="48">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="20" cost="fixed"/> <resource name="aura" amount="20" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<!-- gwyrrd spells --> <!-- gwyrrd spells -->
<spell name="create_roi" type="gwyrrd" ship="true" rank="5" level="6" index="129"> <spell name="create_roi" type="gwyrrd" ship="true" rank="5" level="6" index="129">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="earn_silver#gwyrrd" type="gwyrrd" ship="true" variable="true" rank="5" level="1" index="159"> <spell name="earn_silver#gwyrrd" type="gwyrrd" ship="true" variable="true" rank="5" level="1" index="159">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="1" cost="level"/> <resource name="aura" amount="1" cost="level"/>
</spell> </spell>
<spell name="create_aots" type="gwyrrd" ship="true" rank="5" level="6" index="124"> <spell name="create_aots" type="gwyrrd" ship="true" rank="5" level="6" index="124">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_magicherbbag" type="gwyrrd" ship="true" rank="5" level="5" index="165"> <spell name="create_magicherbbag" type="gwyrrd" ship="true" rank="5" level="5" index="165">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="30" cost="fixed"/> <resource name="aura" amount="30" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
<resource name="p2" amount="1" cost="fixed"/> <resource name="p2" amount="1" cost="fixed"/>
</spell> </spell>
<!-- illaun spells --> <!-- illaun spells -->
<spell name="create_roi" type="illaun" ship="true" rank="5" level="6" index="131"> <spell name="create_roi" type="illaun" ship="true" rank="5" level="6" index="131">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="earn_silver#illaun" type="illaun" ship="true" variable="true" rank="5" level="1" index="159"> <spell name="earn_silver#illaun" type="illaun" ship="true" variable="true" rank="5" level="1" index="159">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="1" cost="level"/> <resource name="aura" amount="1" cost="level"/>
</spell> </spell>
<spell name="create_aots" type="illaun" ship="true" rank="5" level="6" index="126"> <spell name="create_aots" type="illaun" ship="true" rank="5" level="6" index="126">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_dreameye" type="illaun" ship="true" rank="5" level="14" index="149"> <spell name="create_dreameye" type="illaun" ship="true" rank="5" level="14" index="149">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="dragonhead" amount="1" cost="fixed"/> <resource name="dragonhead" amount="1" cost="fixed"/>
<resource name="permaura" amount="5" cost="fixed"/> <resource name="permaura" amount="5" cost="fixed"/>
</spell> </spell>
<spell name="create_invisibility_sphere" type="illaun" ship="true" rank="5" level="13" index="178"> <spell name="create_invisibility_sphere" type="illaun" ship="true" rank="5" level="13" index="178">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="150" cost="fixed"/> <resource name="aura" amount="150" cost="fixed"/>
<resource name="money" amount="30000" cost="fixed"/> <resource name="money" amount="30000" cost="fixed"/>
<resource name="permaura" amount="3" cost="fixed"/> <resource name="permaura" amount="3" cost="fixed"/>
</spell> </spell>
<!-- cerddor spells --> <!-- cerddor spells -->
<spell name="create_roi" type="cerddor" ship="true" rank="5" level="6" index="132"> <spell name="create_roi" type="cerddor" ship="true" rank="5" level="6" index="132">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="earn_silver#cerddor" type="cerddor" ship="true" variable="true" rank="5" level="1" index="159"> <spell name="earn_silver#cerddor" type="cerddor" ship="true" variable="true" rank="5" level="1" index="159">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="1" cost="level"/> <resource name="aura" amount="1" cost="level"/>
</spell> </spell>
<spell name="create_aots" type="cerddor" ship="true" rank="5" level="6" index="127"> <spell name="create_aots" type="cerddor" ship="true" rank="5" level="6" index="127">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_roqf" type="cerddor" ship="true" rank="5" level="11" index="63"> <spell name="create_roqf" type="cerddor" ship="true" rank="5" level="11" index="63">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="20" cost="fixed"/> <resource name="aura" amount="20" cost="fixed"/>
<resource name="money" amount="1000" cost="fixed"/> <resource name="money" amount="1000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="blabbermouth" parameters="u" type="cerddor" ship="false" los="true" rank="5" level="4" index="115"> <spell name="blabbermouth" parameters="u" type="cerddor" ship="false" los="true" rank="5" level="4" index="115">
<function name="cast" value="cast_babbler"/> <function name="cast" value="cast_babbler"/>
<resource name="aura" amount="10" cost="fixed"/> <resource name="aura" amount="10" cost="fixed"/>
<!-- missing syntactical info: ONETARGET | UNITSPELL --> <!-- missing syntactical info: ONETARGET | UNITSPELL -->
</spell> </spell>
<spell name="readmind" parameters="u" type="illaun" ship="false" rank="5" level="7" index="114"> <spell name="readmind" parameters="u" type="illaun" ship="false" rank="5" level="7" index="114">
<function name="cast" value="cast_readmind"/> <function name="cast" value="cast_readmind"/>
<resource name="aura" amount="20" cost="fixed"/> <resource name="aura" amount="20" cost="fixed"/>
<!-- missing syntactical info: ONETARGET | UNITSPELL --> <!-- missing syntactical info: ONETARGET | UNITSPELL -->
</spell> </spell>
<!-- tybied spells --> <!-- tybied spells -->
<spell name="create_roi" type="tybied" ship="true" rank="5" level="6" index="133"> <spell name="create_roi" type="tybied" ship="true" rank="5" level="6" index="133">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="earn_silver#tybied" type="tybied" ship="true" variable="true" rank="5" level="1" index="159"> <spell name="earn_silver#tybied" type="tybied" ship="true" variable="true" rank="5" level="1" index="159">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="1" cost="level"/> <resource name="aura" amount="1" cost="level"/>
</spell> </spell>
<spell name="create_aots" type="tybied" ship="true" rank="5" level="6" index="128"> <spell name="create_aots" type="tybied" ship="true" rank="5" level="6" index="128">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_antimagic" type="tybied" ship="true" rank="5" level="7" index="38"> <spell name="create_antimagic" type="tybied" ship="true" rank="5" level="7" index="38">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
</spell> </spell>
<spell name="create_rop" type="tybied" ship="true" rank="5" level="9" index="1"> <spell name="create_rop" type="tybied" ship="true" rank="5" level="9" index="1">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
<resource name="money" amount="4000" cost="fixed"/> <resource name="money" amount="4000" cost="fixed"/>
</spell> </spell>
<spell name="create_bagofholding" type="tybied" ship="true" rank="5" level="10" index="155"> <spell name="create_bagofholding" type="tybied" ship="true" rank="5" level="10" index="155">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="30" cost="fixed"/> <resource name="aura" amount="30" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
<resource name="money" amount="5000" cost="fixed"/> <resource name="money" amount="5000" cost="fixed"/>
</spell> </spell>
<!-- gray magic --> <!-- gray magic -->
<spell name="create_runesword" type="gray" ship="true" rank="5" level="6" index="135"> <spell name="create_runesword" type="gray" ship="true" rank="5" level="6" index="135">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
<resource name="money" amount="1000" cost="fixed"/> <resource name="money" amount="1000" cost="fixed"/>
<resource name="laensword" amount="1" cost="fixed"/> <resource name="laensword" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_chastitybelt" type="gray" ship="true" rank="5" level="7" index="134"> <spell name="create_chastitybelt" type="gray" ship="true" rank="5" level="7" index="134">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="50" cost="fixed"/> <resource name="aura" amount="50" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
<resource name="money" amount="3000" cost="fixed"/> <resource name="money" amount="3000" cost="fixed"/>
</spell> </spell>
<spell name="create_focus" type="gray" ship="true" rank="5" level="9" index="2"> <spell name="create_focus" type="gray" ship="true" rank="5" level="9" index="2">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
<spell name="create_ror" type="gray" ship="true" rank="5" level="9" index="3"> <spell name="create_ror" type="gray" ship="true" rank="5" level="9" index="3">
<function name="cast" value="lua_castspell"/> <function name="cast" value="lua_castspell"/>
<resource name="aura" amount="100" cost="fixed"/> <resource name="aura" amount="100" cost="fixed"/>
<resource name="permaura" amount="1" cost="fixed"/> <resource name="permaura" amount="1" cost="fixed"/>
</spell> </spell>
</spells> </spells>

View file

@ -1,59 +1,59 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resources> <resources>
<resource name="elfspoil"> <resource name="elfspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="demonspoil"> <resource name="demonspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="goblinspoil"> <resource name="goblinspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="dwarfspoil"> <resource name="dwarfspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="halflingspoil"> <resource name="halflingspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="humanspoil"> <resource name="humanspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="aquarianspoil"> <resource name="aquarianspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="insectspoil"> <resource name="insectspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="catspoil"> <resource name="catspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="orcspoil"> <resource name="orcspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
<resource name="trollspoil"> <resource name="trollspoil">
<function name="change" value="changeitem"/> <function name="change" value="changeitem"/>
<item weight="1"/> <item weight="1"/>
</resource> </resource>
</resources> </resources>

View file

@ -1,84 +1,84 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<terrains> <terrains>
<!-- defaults: walk="yes" sail="yes" fly="yes" shallow="yes" swim="no" forest="no" sea="no" land="yes" forbidden="no" arctic="no" cavalry="no" --> <!-- defaults: walk="yes" sail="yes" fly="yes" shallow="yes" swim="no" forest="no" sea="no" land="yes" forbidden="no" arctic="no" cavalry="no" -->
<terrain name="ocean" size="100" shallow="no" walk="no" swim="yes" land="no" sea="yes" /> <terrain name="ocean" size="100" shallow="no" walk="no" swim="yes" land="no" sea="yes" />
<terrain name="plain" size="10000" road="50" shallow="no" forest="yes" cavalry="yes" seed="3"> <terrain name="plain" size="10000" road="50" shallow="no" forest="yes" cavalry="yes" seed="3">
<herb name="h0" /> <herb name="h0" />
<herb name="h1" /> <herb name="h1" />
<herb name="h2" /> <herb name="h2" />
<herb name="h3" /> <herb name="h3" />
<herb name="h4" /> <herb name="h4" />
<herb name="h5" /> <herb name="h5" />
<resource name="iron" chance="0.1" level="2d4-1" base="5d8" div="2d20+10" /> <resource name="iron" chance="0.1" level="2d4-1" base="5d8" div="2d20+10" />
<resource name="stone" chance="0.15" level="1d4" base="5d8" div="2d30+20" /> <resource name="stone" chance="0.15" level="1d4" base="5d8" div="2d30+20" />
<resource name="laen" chance="0.01" level="1d4" base="1d4" div="2d20+50" /> <resource name="laen" chance="0.01" level="1d4" base="1d4" div="2d20+50" />
</terrain> </terrain>
<terrain name="swamp" size="2000" road="75" seed="2"> <terrain name="swamp" size="2000" road="75" seed="2">
<herb name="h6" /> <herb name="h6" />
<herb name="h7" /> <herb name="h7" />
<herb name="h8" /> <herb name="h8" />
<resource name="iron" chance="0.02" level="2d4-1" base="5d8" div="2d20+10" /> <resource name="iron" chance="0.02" level="2d4-1" base="5d8" div="2d20+10" />
<resource name="stone" chance="0.02" level="1d4" base="5d8" div="2d30+20" /> <resource name="stone" chance="0.02" level="1d4" base="5d8" div="2d30+20" />
<resource name="laen" chance="0.02" level="1d4" base="1d4" div="2d20+50" /> <resource name="laen" chance="0.02" level="1d4" base="1d4" div="2d20+50" />
</terrain> </terrain>
<terrain name="desert" size="500" road="100" cavalry="yes" seed="2"> <terrain name="desert" size="500" road="100" cavalry="yes" seed="2">
<herb name="h9" /> <herb name="h9" />
<herb name="h10" /> <herb name="h10" />
<herb name="h11" /> <herb name="h11" />
<resource name="iron" chance="0.15" level="2d4-1" base="5d8" div="2d20+10" /> <resource name="iron" chance="0.15" level="2d4-1" base="5d8" div="2d20+10" />
<resource name="stone" chance="0.25" level="1d4" base="5d8" div="2d30+20" /> <resource name="stone" chance="0.25" level="1d4" base="5d8" div="2d30+20" />
<resource name="laen" chance="0.025" level="1d4" base="1d4" div="2d20+50" /> <resource name="laen" chance="0.025" level="1d4" base="1d4" div="2d20+50" />
</terrain> </terrain>
<terrain name="highland" size="4000" road="100" cavalry="yes" seed="2"> <terrain name="highland" size="4000" road="100" cavalry="yes" seed="2">
<herb name="h12" /> <herb name="h12" />
<herb name="h13" /> <herb name="h13" />
<herb name="h14" /> <herb name="h14" />
<resource name="iron" chance="0.15" level="2d4-1" base="5d8" div="2d20+10" /> <resource name="iron" chance="0.15" level="2d4-1" base="5d8" div="2d20+10" />
<resource name="stone" chance="0.25" level="1d4" base="5d8" div="2d30+20" /> <resource name="stone" chance="0.25" level="1d4" base="5d8" div="2d30+20" />
<resource name="laen" chance="0.025" level="1d4" base="1d4" div="2d20+50" /> <resource name="laen" chance="0.025" level="1d4" base="1d4" div="2d20+50" />
</terrain> </terrain>
<terrain name="mountain" size="1000" road="250" seed="2"> <terrain name="mountain" size="1000" road="250" seed="2">
<herb name="h15" /> <herb name="h15" />
<herb name="h16" /> <herb name="h16" />
<herb name="h17" /> <herb name="h17" />
<resource name="iron" chance="1.0" level="1" base="50" div="50" /> <resource name="iron" chance="1.0" level="1" base="50" div="50" />
<resource name="stone" chance="1.0" level="1" base="100" div="100" /> <resource name="stone" chance="1.0" level="1" base="100" div="100" />
<resource name="laen" chance="0.05" level="1" base="4" div="100" /> <resource name="laen" chance="0.05" level="1" base="4" div="100" />
</terrain> </terrain>
<terrain name="glacier" size="100" road="250" arctic="yes" seed="2"> <terrain name="glacier" size="100" road="250" arctic="yes" seed="2">
<herb name="h18" /> <herb name="h18" />
<herb name="h19" /> <herb name="h19" />
<herb name="h20" /> <herb name="h20" />
<resource name="iron" chance="1.0" level="1" base="3" div="50" /> <resource name="iron" chance="1.0" level="1" base="3" div="50" />
<resource name="stone" chance="1.0" level="1" base="2" div="100" /> <resource name="stone" chance="1.0" level="1" base="2" div="100" />
<resource name="laen" chance="0.05" level="1" base="4" div="100" /> <resource name="laen" chance="0.05" level="1" base="4" div="100" />
</terrain> </terrain>
<terrain name="iceberg_sleep" size="100" road="250" arctic="yes"> <terrain name="iceberg_sleep" size="100" road="250" arctic="yes">
<herb name="h18" /> <herb name="h18" />
<herb name="h19" /> <herb name="h19" />
<herb name="h20" /> <herb name="h20" />
<resource name="iron" chance="0.9" level="1" base="3" div="50" /> <resource name="iron" chance="0.9" level="1" base="3" div="50" />
<resource name="stone" chance="0.9" level="1" base="2" div="100" /> <resource name="stone" chance="0.9" level="1" base="2" div="100" />
<resource name="laen" chance="0.05" level="1" base="4" div="100" /> <resource name="laen" chance="0.05" level="1" base="4" div="100" />
</terrain> </terrain>
<terrain name="iceberg" size="100" arctic="yes"> <terrain name="iceberg" size="100" arctic="yes">
<herb name="h18" /> <herb name="h18" />
<herb name="h19" /> <herb name="h19" />
<herb name="h20" /> <herb name="h20" />
<resource name="iron" chance="0.9" level="1" base="3" div="50" /> <resource name="iron" chance="0.9" level="1" base="3" div="50" />
<resource name="stone" chance="0.9" level="1" base="2" div="100" /> <resource name="stone" chance="0.9" level="1" base="2" div="100" />
</terrain> </terrain>
<terrain name="firewall" size="100" road="250" land="no" walk="no" sail="no" fly="no" forbidden="yes" /> <terrain name="firewall" size="100" road="250" land="no" walk="no" sail="no" fly="no" forbidden="yes" />
<terrain name="fog" sail="no" land="no" size="0" /> <terrain name="fog" sail="no" land="no" size="0" />
<terrain name="thickfog" forbidden="yes" sail="no" walk="no" fly="no" land="no" size="0" /> <terrain name="thickfog" forbidden="yes" sail="no" walk="no" fly="no" land="no" size="0" />
<terrain name="volcano" size="500" road="250" seed="1"> <terrain name="volcano" size="500" road="250" seed="1">
<resource name="iron" chance="0.5" level="1" base="50" div="50" /> <resource name="iron" chance="0.5" level="1" base="50" div="50" />
<resource name="stone" chance="0.5" level="1" base="100" div="100" /> <resource name="stone" chance="0.5" level="1" base="100" div="100" />
<resource name="laen" chance="0.075" level="1" base="4" div="100" /> <resource name="laen" chance="0.075" level="1" base="4" div="100" />
</terrain> </terrain>
<terrain name="activevolcano" size="500" road="250"> <terrain name="activevolcano" size="500" road="250">
<resource name="iron" chance="0.5" level="1" base="50" div="50" /> <resource name="iron" chance="0.5" level="1" base="50" div="50" />
<resource name="stone" chance="0.5" level="1" base="100" div="100" /> <resource name="stone" chance="0.5" level="1" base="100" div="100" />
<resource name="laen" chance="0.075" level="1" base="4" div="100" /> <resource name="laen" chance="0.075" level="1" base="4" div="100" />
</terrain> </terrain>
</terrains> </terrains>

View file

@ -1,14 +1,14 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<weapon cut="true" skill="melee" offmod="1" defmod="-2"> <weapon cut="true" skill="melee" offmod="1" defmod="-2">
<damage type="rider" value="2d6+4"/> <damage type="rider" value="2d6+4"/>
<damage type="footman" value="2d6+4"/> <damage type="footman" value="2d6+4"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,13 +1,13 @@
<?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" reqsize="1">
<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">
<damage type="rider" value="1d11+1"/> <damage type="rider" value="1d11+1"/>
<damage type="footman" value="1d11+1"/> <damage type="footman" value="1d11+1"/>
<modifier type="missile_target" value="2"/> <modifier type="missile_target" value="2"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,14 +1,14 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="catapult"> <resource name="catapult">
<item weight="10000"> <item weight="10000">
<construction skill="cartmaking" minskill="5" reqsize="1"> <construction skill="cartmaking" minskill="5" reqsize="1">
<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">
<damage type="rider" value="3d10+5"/> <damage type="rider" value="3d10+5"/>
<damage type="footman" value="3d10+5"/> <damage type="footman" value="3d10+5"/>
<modifier type="missile_target" value="4"/> <modifier type="missile_target" value="4"/>
<function name="attack" value="attack_catapult"/> <function name="attack" value="attack_catapult"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,13 +1,13 @@
<?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" reqsize="1">
<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">
<damage type="rider" value="3d3+5"/> <damage type="rider" value="3d3+5"/>
<damage type="footman" value="3d3+5"/> <damage type="footman" value="3d3+5"/>
<modifier type="missile_target" value="0"/> <modifier type="missile_target" value="0"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,10 +1,10 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="firesword"> <resource name="firesword">
<item weight="100"> <item weight="100">
<weapon minskill="7" magres="0.3" cut="true" skill="melee" offmod="1" defmod="1"> <weapon minskill="7" magres="0.3" cut="true" skill="melee" offmod="1" defmod="1">
<function name="attack" value="attack_firesword"/> <function name="attack" value="attack_firesword"/>
<damage type="rider" value="3d6+10"/> <damage type="rider" value="3d6+10"/>
<damage type="footman" value="3d6+10"/> <damage type="footman" value="3d6+10"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,18 +1,18 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<modifier function="mod_elves_only"/> <modifier function="mod_elves_only"/>
<requirement type="mallorn" quantity="2"/> <requirement type="mallorn" quantity="2"/>
</construction> </construction>
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.0"> <weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.0">
<damage type="rider" value="2d6+4"/> <damage type="rider" value="2d6+4"/>
<damage type="footman" value="2d6+4"/> <damage type="footman" value="2d6+4"/>
<modifier type="missile_target" value="2"/> <modifier type="missile_target" value="2"/>
<modifier type="damage" value="1"> <modifier type="damage" value="1">
<race name="elf"/> <race name="elf"/>
</modifier> </modifier>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,13 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<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">
<damage type="rider" value="2d8+3"/> <damage type="rider" value="2d8+3"/>
<damage type="footman" value="2d8+3"/> <damage type="footman" value="2d8+3"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,15 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<requirement type="log" quantity="2"/> <requirement type="log" quantity="2"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<weapon cut="true" skill="polearm" offmod="-1" defmod="2" magres="0.0"> <weapon cut="true" skill="polearm" offmod="-1" defmod="2" magres="0.0">
<damage type="rider" value="2d6+3"/> <damage type="rider" value="2d6+3"/>
<damage type="footman" value="2d6+3"/> <damage type="footman" value="2d6+3"/>
<modifier type="skill" value="1" walking="true" against_riding="true" defensive="true"/> <modifier type="skill" value="1" walking="true" against_riding="true" defensive="true"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,12 +1,12 @@
<?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" reqsize="1">
<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">
<damage type="rider" value="3d6+10"/> <damage type="rider" value="3d6+10"/>
<damage type="footman" value="3d6+10"/> <damage type="footman" value="3d6+10"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,13 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<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">
<damage type="footman" value="1d5"/> <damage type="footman" value="1d5"/>
<damage type="rider" value="2d6+5"/> <damage type="rider" value="2d6+5"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,16 +1,16 @@
<?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" reqsize="1">
<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">
<damage type="rider" value="1d11+2"/> <damage type="rider" value="1d11+2"/>
<damage type="footman" value="1d11+2"/> <damage type="footman" value="1d11+2"/>
<modifier type="missile_target" value="2"/> <modifier type="missile_target" value="2"/>
<modifier type="damage" value="1"> <modifier type="damage" value="1">
<race name="elf"/> <race name="elf"/>
</modifier> </modifier>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,13 +1,13 @@
<?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" reqsize="1">
<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">
<damage type="rider" value="3d3+5"/> <damage type="rider" value="3d3+5"/>
<damage type="footman" value="3d3+5"/> <damage type="footman" value="3d3+5"/>
<modifier type="missile_target" value="0"/> <modifier type="missile_target" value="0"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,13 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<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">
<damage type="footman" value="1d5+1"/> <damage type="footman" value="1d5+1"/>
<damage type="rider" value="2d6+6"/> <damage type="rider" value="2d6+6"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,14 +1,14 @@
<?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" reqsize="1">
<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">
<damage type="footman" value="1d10+1"/> <damage type="footman" value="1d10+1"/>
<damage type="rider" value="1d12+3"/> <damage type="rider" value="1d12+3"/>
<modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/> <modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/>
<modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/> <modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,16 +1,16 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<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"/>
</construction> </construction>
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="1"> <weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="1">
<damage type="rider" value="3d4+5"/> <damage type="rider" value="3d4+5"/>
<damage type="footman" value="3d4+5"/> <damage type="footman" value="3d4+5"/>
<modifier type="missile_target" value="0"/> <modifier type="missile_target" value="0"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,10 +1,10 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<resource name="runesword"> <resource name="runesword">
<item weight="100" score="2000"> <item weight="100" score="2000">
<weapon minskill="7" cut="true" magical="yes" skill="melee" offmod="2" defmod="2"> <weapon minskill="7" cut="true" magical="yes" skill="melee" offmod="2" defmod="2">
<function name="attack" value="attack_firesword"/> <function name="attack" value="attack_firesword"/>
<damage type="rider" value="3d10+10"/> <damage type="rider" value="3d10+10"/>
<damage type="footman" value="3d10+10"/> <damage type="footman" value="3d10+10"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,14 +1,14 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<weapon cut="true" skill="melee" offmod="0" defmod="-3"> <weapon cut="true" skill="melee" offmod="0" defmod="-3">
<damage type="rider" value="2d6"/> <damage type="rider" value="2d6"/>
<damage type="footman" value="2d6"/> <damage type="footman" value="2d6"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,12 +1,12 @@
<?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" reqsize="1">
<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">
<damage type="rider" value="2d8"/> <damage type="rider" value="2d8"/>
<damage type="footman" value="2d8"/> <damage type="footman" value="2d8"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,15 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<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" reqsize="1">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
<requirement type="log" quantity="1"/> <requirement type="log" quantity="1"/>
</construction> </construction>
<weapon cut="true" skill="polearm" offmod="-2" defmod="-1"> <weapon cut="true" skill="polearm" offmod="-2" defmod="-1">
<damage type="rider" value="2d6"/> <damage type="rider" value="2d6"/>
<damage type="footman" value="2d6"/> <damage type="footman" value="2d6"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,12 +1,12 @@
<?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" reqsize="1">
<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">
<damage type="rider" value="1d9"/> <damage type="rider" value="1d9"/>
<damage type="footman" value="1d9"/> <damage type="footman" value="1d9"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,14 +1,14 @@
<?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" reqsize="1">
<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">
<damage type="footman" value="1d10"/> <damage type="footman" value="1d10"/>
<damage type="rider" value="1d12+2"/> <damage type="rider" value="1d12+2"/>
<modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/> <modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/>
<modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/> <modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,12 +1,12 @@
<?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" reqsize="1">
<requirement type="iron" quantity="1"/> <requirement type="iron" quantity="1"/>
</construction> </construction>
<weapon cut="true" skill="melee"> <weapon cut="true" skill="melee">
<damage type="rider" value="1d9+2"/> <damage type="rider" value="1d9+2"/>
<damage type="footman" value="1d9+2"/> <damage type="footman" value="1d9+2"/>
</weapon> </weapon>
</item> </item>
</resource> </resource>

View file

@ -1,11 +1,11 @@
callbacks = {} callbacks = {}
callbacks["attrib_init"] = function(attr) callbacks["attrib_init"] = function(attr)
if attr.name ~= nil then if attr.name ~= nil then
local init = callbacks["init_" .. attr.name] local init = callbacks["init_" .. attr.name]
if init ~=nil then if init ~=nil then
init(attr) init(attr)
end end
end end
end end

View file

@ -1,121 +1,121 @@
function change_locales(localechange) function change_locales(localechange)
for loc, flist in pairs(localechange) do for loc, flist in pairs(localechange) do
for index, name in pairs(flist) do for index, name in pairs(flist) do
f = get_faction(atoi36(name)) f = get_faction(atoi36(name))
if f ~= nil then if f ~= nil then
f.locale = loc f.locale = loc
print("LOCALECHANGE ", f, loc) print("LOCALECHANGE ", f, loc)
end end
end end
end end
end end
function dbupdate() function dbupdate()
update_scores() update_scores()
edb = db.open(config.basepath.."/eressea.db") edb = db.open(config.basepath.."/eressea.db")
if edb~=nil then if edb~=nil then
edb:update_factions() edb:update_factions()
edb:update_scores() edb:update_scores()
else else
print("could no open "..config.basepath.."/eressea.db") print("could no open "..config.basepath.."/eressea.db")
end end
end end
function nmr_check(maxnmrs) function nmr_check(maxnmrs)
local nmrs = get_nmrs(1) local nmrs = get_nmrs(1)
if nmrs >= maxnmrs then if nmrs >= maxnmrs then
print("Shit. More than " .. maxnmrs .. " factions with 1 NMR (" .. nmrs .. ")") print("Shit. More than " .. maxnmrs .. " factions with 1 NMR (" .. nmrs .. ")")
write_summary() write_summary()
write_game("aborted.dat") write_game("aborted.dat")
return -1 return -1
end end
print (nmrs .. " Factions with 1 NMR") print (nmrs .. " Factions with 1 NMR")
return 0 return 0
end end
function open_game(turn) function open_game(turn)
file = "" .. get_turn() file = "" .. get_turn()
if read_game(file .. ".dat", "binary")~=0 then if read_game(file .. ".dat", "binary")~=0 then
return read_game(file, "text") return read_game(file, "text")
end end
return 0 return 0
end end
function write_emails(locales) function write_emails(locales)
local files = {} local files = {}
local key local key
local locale local locale
local file local file
for key, locale in pairs(locales) do for key, locale in pairs(locales) do
files[locale] = io.open(config.basepath .. "/emails." .. locale, "w") files[locale] = io.open(config.basepath .. "/emails." .. locale, "w")
end end
local faction local faction
for faction in factions() do for faction in factions() do
if faction.email~="" then if faction.email~="" then
files[faction.locale]:write(faction.email .. "\n") files[faction.locale]:write(faction.email .. "\n")
end end
end end
for key, file in pairs(files) do for key, file in pairs(files) do
file:close() file:close()
end end
end end
function write_addresses() function write_addresses()
local file local file
local faction local faction
file = io.open(config.basepath .. "/adressen", "w") file = io.open(config.basepath .. "/adressen", "w")
for faction in factions() do for faction in factions() do
-- print(faction.id .. " - " .. faction.locale) -- print(faction.id .. " - " .. faction.locale)
file:write(tostring(faction) .. ":" .. faction.email .. ":" .. faction.info .. "\n") file:write(tostring(faction) .. ":" .. faction.email .. ":" .. faction.info .. "\n")
end end
file:close() file:close()
end end
function write_aliases() function write_aliases()
local file local file
local faction local faction
file = io.open(config.basepath .. "/aliases", "w") file = io.open(config.basepath .. "/aliases", "w")
for faction in factions() do for faction in factions() do
local unit local unit
if faction.email ~= "" then if faction.email ~= "" then
file:write("partei-" .. itoa36(faction.id) .. ": " .. faction.email .. "\n") file:write("partei-" .. itoa36(faction.id) .. ": " .. faction.email .. "\n")
for unit in faction.units do for unit in faction.units do
file:write("einheit-" .. itoa36(unit.id) .. ": " .. faction.email .. "\n") file:write("einheit-" .. itoa36(unit.id) .. ": " .. faction.email .. "\n")
end end
end end
end end
file:close() file:close()
end end
function write_files(locales) function write_files(locales)
write_passwords() write_passwords()
write_reports() write_reports()
write_summary() write_summary()
-- write_emails(locales) -- write_emails(locales)
-- write_aliases() -- write_aliases()
-- write_addresses() -- write_addresses()
end end
function write_scores() function write_scores()
scores = {} scores = {}
for r in regions() do for r in regions() do
f = r.owner f = r.owner
if f~=nil then if f~=nil then
value = scores[f.id] value = scores[f.id]
if value==nil then value=0 end if value==nil then value=0 end
value = value + r:get_resource("money")/100 value = value + r:get_resource("money")/100
scores[f.id] = value scores[f.id] = value
end end
end end
for f in factions() do for f in factions() do
score=scores[f.id] score=scores[f.id]
if score==nil then score=0 end if score==nil then score=0 end
print(math.floor(score)..":"..f.name..":"..itoa36(f.id)) print(math.floor(score)..":"..f.name..":"..itoa36(f.id))
end end
end end

View file

@ -1,95 +1,95 @@
--------------------------------------------- ---------------------------------------------
-- Return indentation string for passed level -- Return indentation string for passed level
--------------------------------------------- ---------------------------------------------
local function tabs(i) local function tabs(i)
return string.rep(".",i).." " -- Dots followed by a space return string.rep(".",i).." " -- Dots followed by a space
end end
----------------------------------------------------------- -----------------------------------------------------------
-- Return string representation of parameter's value & type -- Return string representation of parameter's value & type
----------------------------------------------------------- -----------------------------------------------------------
local function toStrType(t) local function toStrType(t)
local function fttu2hex(t) -- Grab hex value from tostring() output local function fttu2hex(t) -- Grab hex value from tostring() output
local str = tostring(t); local str = tostring(t);
if str == nil then if str == nil then
return "tostring() failure! \n" return "tostring() failure! \n"
else else
local str2 = string.match(str,"[ :][ (](%x+)") local str2 = string.match(str,"[ :][ (](%x+)")
if str2 == nil then if str2 == nil then
return "string.match() failure: "..str.."\n" return "string.match() failure: "..str.."\n"
else else
return "0x"..str2 return "0x"..str2
end end
end end
end end
-- Stringify a value of a given type using a table of functions keyed -- Stringify a value of a given type using a table of functions keyed
-- by the name of the type (Lua's version of C's switch() statement). -- by the name of the type (Lua's version of C's switch() statement).
local stringify = { local stringify = {
-- Keys are all possible strings that type() may return, -- Keys are all possible strings that type() may return,
-- per http://www.lua.org/manual/5.1/manual.html#pdf-type. -- per http://www.lua.org/manual/5.1/manual.html#pdf-type.
["nil"] = function(v) return "nil (nil)" end, ["nil"] = function(v) return "nil (nil)" end,
["string"] = function(v) return '"'..v..'" (string)' end, ["string"] = function(v) return '"'..v..'" (string)' end,
["number"] = function(v) return v.." (number)" end, ["number"] = function(v) return v.." (number)" end,
["boolean"] = function(v) return tostring(v).." (boolean)" end, ["boolean"] = function(v) return tostring(v).." (boolean)" end,
["function"] = function(v) return fttu2hex(v).." (function)" end, ["function"] = function(v) return fttu2hex(v).." (function)" end,
["table"] = function(v) return fttu2hex(v).." (table)" end, ["table"] = function(v) return fttu2hex(v).." (table)" end,
["thread"] = function(v) return fttu2hex(v).." (thread)" end, ["thread"] = function(v) return fttu2hex(v).." (thread)" end,
["userdata"] = function(v) return fttu2hex(v).." (userdata)" end ["userdata"] = function(v) return fttu2hex(v).." (userdata)" end
} }
return stringify[type(t)](t) return stringify[type(t)](t)
end end
------------------------------------- -------------------------------------
-- Count elements in the passed table -- Count elements in the passed table
------------------------------------- -------------------------------------
local function lenTable(t) -- What Lua builtin does this simple thing? local function lenTable(t) -- What Lua builtin does this simple thing?
local n=0 -- '#' doesn't work with mixed key types local n=0 -- '#' doesn't work with mixed key types
if ("table" == type(t)) then if ("table" == type(t)) then
for key in pairs(t) do -- Just count 'em for key in pairs(t) do -- Just count 'em
n = n + 1 n = n + 1
end end
return n return n
else else
return nil return nil
end end
end end
-------------------------------- --------------------------------
-- Pretty-print the passed table -- Pretty-print the passed table
-------------------------------- --------------------------------
local function do_dumptable(t, indent, seen) local function do_dumptable(t, indent, seen)
-- "seen" is an initially empty table used to track all tables -- "seen" is an initially empty table used to track all tables
-- that have been dumped so far. No table is dumped twice. -- that have been dumped so far. No table is dumped twice.
-- This also keeps the code from following self-referential loops, -- This also keeps the code from following self-referential loops,
-- the need for which was found when first dumping "_G". -- the need for which was found when first dumping "_G".
if ("table" == type(t)) then -- Dump passed table if ("table" == type(t)) then -- Dump passed table
seen[t] = 1 seen[t] = 1
if (indent == 0) then if (indent == 0) then
print ("The passed table has "..lenTable(t).." entries:") print ("The passed table has "..lenTable(t).." entries:")
indent = 1 indent = 1
end end
for f,v in pairsByKeys(t) do for f,v in pairsByKeys(t) do
if ("table" == type(v)) and (seen[v] == nil) then -- Recurse if ("table" == type(v)) and (seen[v] == nil) then -- Recurse
print( tabs(indent)..toStrType(f).." has "..lenTable(v).." entries: {") print( tabs(indent)..toStrType(f).." has "..lenTable(v).." entries: {")
do_dumptable(v, indent+1, seen) do_dumptable(v, indent+1, seen)
print( tabs(indent).."}" ) print( tabs(indent).."}" )
else else
print( tabs(indent)..toStrType(f).." = "..toStrType(v)) print( tabs(indent)..toStrType(f).." = "..toStrType(v))
end end
end end
else else
print (tabs(indent).."Not a table!") print (tabs(indent).."Not a table!")
end end
end end
-------------------------------- --------------------------------
-- Wrapper to handle persistence -- Wrapper to handle persistence
-------------------------------- --------------------------------
function dumptable(t) -- Only global declaration in the package function dumptable(t) -- Only global declaration in the package
-- This wrapper exists only to set the environment for the first run: -- This wrapper exists only to set the environment for the first run:
-- The second param is the indentation level. -- The second param is the indentation level.
-- The third param is the list of tables dumped during this call. -- The third param is the list of tables dumped during this call.
-- Getting this list allocated and freed was a pain, and this -- Getting this list allocated and freed was a pain, and this
-- wrapper was the best solution I came up with... -- wrapper was the best solution I came up with...
return do_dumptable(t, 0, {}) return do_dumptable(t, 0, {})
end end

View file

@ -1,25 +1,25 @@
-- implements gates and travel between them -- implements gates and travel between them
-- used in HSE and Eressea -- used in HSE and Eressea
function gate_travel(b, units) function gate_travel(b, units)
-- we've found which units we want to exchange, now swap them: -- we've found which units we want to exchange, now swap them:
local u local u
for key, u in pairs(units) do for key, u in pairs(units) do
u.region = b.region u.region = b.region
u.building = b u.building = b
end end
end end
function gate_units(b, maxsize) function gate_units(b, maxsize)
local size = maxsize local size = maxsize
local units = {} local units = {}
local u local u
for u in b.units do for u in b.units do
if u.number<=size and u.weight<=u.capacity then if u.number<=size and u.weight<=u.capacity then
units[u] = u units[u] = u
size = size - u.number size = size - u.number
end end
end end
return units return units
end end

View file

@ -1,43 +1,43 @@
require(config.game .. ".modules") require(config.game .. ".modules")
require "default" require "default"
require "resources" require "resources"
function run_editor() function run_editor()
local turn = get_turn() local turn = get_turn()
if turn==0 then if turn==0 then
turn = read_turn() turn = read_turn()
set_turn(turn) set_turn(turn)
end end
read_game(turn .. ".dat") read_game(turn .. ".dat")
gmtool.editor() gmtool.editor()
end end
function run_tests() function run_tests()
print("running tests") print("running tests")
require "lunit" require "lunit"
lunit.clearstats() lunit.clearstats()
local argv = tests or {} local argv = tests or {}
local stats = lunit.main(argv) local stats = lunit.main(argv)
if stats.errors > 0 or stats.failed > 0 then if stats.errors > 0 or stats.failed > 0 then
return 1 return 1
end end
return 0 return 0
end end
function run_turn() function run_turn()
require(config.game .. ".main") require(config.game .. ".main")
local turn = get_turn() local turn = get_turn()
if turn==0 then if turn==0 then
turn = read_turn() turn = read_turn()
set_turn(turn) set_turn(turn)
end end
orderfile = orderfile or config.basepath .. '/orders.' .. turn orderfile = orderfile or config.basepath .. '/orders.' .. turn
print("executing turn " .. get_turn() .. " with " .. orderfile) print("executing turn " .. get_turn() .. " with " .. orderfile)
local result = process(orderfile) local result = process(orderfile)
if result==0 then if result==0 then
dbupdate() dbupdate()
end end
return result return result
end end

View file

@ -1,101 +1,101 @@
function kill_nonstarters() function kill_nonstarters()
for f in factions() do for f in factions() do
if f.lastturn==1 then if f.lastturn==1 then
kill_faction(f, true) kill_faction(f, true)
end end
end end
end end
function kill_multis(multis, destructive) function kill_multis(multis, destructive)
for idx, fno in ipairs(multis) do for idx, fno in ipairs(multis) do
local f = get_faction(fno) local f = get_faction(fno)
if f~=nil and f.email=="doppelspieler@eressea.de" then if f~=nil and f.email=="doppelspieler@eressea.de" then
kill_faction(f, destructive) kill_faction(f, destructive)
end end
end end
end end
function mark_multis(multis, block) function mark_multis(multis, block)
if multis~=nil then if multis~=nil then
for idx, fno in ipairs(multis) do for idx, fno in ipairs(multis) do
local f = get_faction(fno) local f = get_faction(fno)
if f~=nil and f.email~="doppelspieler@eressea.de" then if f~=nil and f.email~="doppelspieler@eressea.de" then
print("* multi-player " .. tostring(f)) print("* multi-player " .. tostring(f))
mark_multi(f, block) mark_multi(f, block)
end end
end end
end end
end end
-- destroy a faction -- destroy a faction
-- destructive: kill all of its buildings and the home region, too. -- destructive: kill all of its buildings and the home region, too.
function kill_faction(f, destructive) function kill_faction(f, destructive)
for u in f.units do for u in f.units do
local r = u.region local r = u.region
local b = u.building local b = u.building
unit.destroy(u) unit.destroy(u)
if destructive and b~=nil then if destructive and b~=nil then
building.destroy(b) building.destroy(b)
local nuke = true local nuke = true
for v in r.units do for v in r.units do
if v.faction.id~=f.id then if v.faction.id~=f.id then
-- print("cannot nuke: " .. tostring(v.faction)) -- print("cannot nuke: " .. tostring(v.faction))
nuke = false nuke = false
break break
end end
end end
r.terrain_name = nil r.terrain_name = nil
if nuke and num_oceans(r)<=1 then if nuke and num_oceans(r)<=1 then
-- print("nuke!") -- print("nuke!")
r.terrain = "ocean" r.terrain = "ocean"
else else
-- print("cannot nuke: > 1 oceans") -- print("cannot nuke: > 1 oceans")
r.terrain = "glacier" r.terrain = "glacier"
r.peasants = 10 r.peasants = 10
r:set_resource("money", 100) r:set_resource("money", 100)
b = building.create(r, "monument") b = building.create(r, "monument")
b.size = 1 b.size = 1
b.name = "Memento Mori" b.name = "Memento Mori"
b.info = "Eine kleine " .. translate("race::" .. f.race .."_x") .. "-Statue erinnert hier an ein verschwundenes Volk" b.info = "Eine kleine " .. translate("race::" .. f.race .."_x") .. "-Statue erinnert hier an ein verschwundenes Volk"
end end
end end
end end
faction.destroy(f) faction.destroy(f)
end end
local function mark_multi(f, block) local function mark_multi(f, block)
f.password = "doppelspieler" f.password = "doppelspieler"
f.email = "doppelspieler@eressea.de" f.email = "doppelspieler@eressea.de"
f.banner = "Diese Partei steht wegen vermuteten Doppelspiels unter Beobachtung." f.banner = "Diese Partei steht wegen vermuteten Doppelspiels unter Beobachtung."
for u in f.units do for u in f.units do
u.race_name = "toad" u.race_name = "toad"
if block and u.building~=nil then if block and u.building~=nil then
local found = false local found = false
for u2 in u.region.units do for u2 in u.region.units do
if u2.faction.id~=u.faction.id then if u2.faction.id~=u.faction.id then
found = true found = true
break break
end end
end end
if not found then if not found then
u.region.terrain_name = "firewall" u.region.terrain_name = "firewall"
u.region:set_flag(2) -- RF_BLOCKED u.region:set_flag(2) -- RF_BLOCKED
end end
end end
end end
end end
local function num_oceans(r) local function num_oceans(r)
local oceans = 0 local oceans = 0
local p = r:next(5) local p = r:next(5)
for d = 0,5 do for d = 0,5 do
local n = r:next(d) local n = r:next(d)
if p.terrain~="ocean" and n.terrain=="ocean" then if p.terrain~="ocean" and n.terrain=="ocean" then
oceans = oceans +1 oceans = oceans +1
end end
p = n p = n
end end
return oceans return oceans
end end

View file

@ -1,89 +1,89 @@
function peasant_getresource(u) function peasant_getresource(u)
return u.region:get_resource("peasant") return u.region:get_resource("peasant")
end end
function peasant_changeresource(u, delta) function peasant_changeresource(u, delta)
local p = u.region:get_resource("peasant") local p = u.region:get_resource("peasant")
p = p + delta p = p + delta
if p < 0 then if p < 0 then
p = 0 p = 0
end end
u.region:set_resource("peasant", p) u.region:set_resource("peasant", p)
return p return p
end end
function hp_getresource(u) function hp_getresource(u)
return u.hp return u.hp
end end
function hp_changeresource(u, delta) function hp_changeresource(u, delta)
local hp = u.hp + delta local hp = u.hp + delta
if hp < u.number then if hp < u.number then
if hp < 0 then if hp < 0 then
hp = 0 hp = 0
end end
u.number = hp u.number = hp
end end
u.hp = hp u.hp = hp
return hp return hp
end end
function horse_limit(r) function horse_limit(r)
return r:get_resource("horse") return r:get_resource("horse")
end end
function horse_produce(r, n) function horse_produce(r, n)
local horses = r:get_resource("horse") local horses = r:get_resource("horse")
if horses>=n then if horses>=n then
r:set_resource("horse", horses-n) r:set_resource("horse", horses-n)
else else
r:set_resource("horse", 0) r:set_resource("horse", 0)
end end
end end
function log_limit(r) function log_limit(r)
-- if r:get_flag(1) then -- RF_MALLORN -- if r:get_flag(1) then -- RF_MALLORN
-- return 0 -- return 0
-- end -- end
return r:get_resource("tree") + r:get_resource("sapling") return r:get_resource("tree") + r:get_resource("sapling")
end end
function log_produce(r, n) function log_produce(r, n)
local trees = r:get_resource("tree") local trees = r:get_resource("tree")
if trees>=n then if trees>=n then
r:set_resource("tree", trees-n) r:set_resource("tree", trees-n)
else else
r:set_resource("tree", 0) r:set_resource("tree", 0)
n = n - trees n = n - trees
trees = r:get_resource("sapling") trees = r:get_resource("sapling")
if trees>=n then if trees>=n then
r:set_resource("sapling", trees-n) r:set_resource("sapling", trees-n)
else else
r:set_resource("sapling", 0) r:set_resource("sapling", 0)
end end
end end
end end
function mallorn_limit(r) function mallorn_limit(r)
if not r:get_flag(1) then -- RF_MALLORN if not r:get_flag(1) then -- RF_MALLORN
return 0 return 0
end end
return r:get_resource("tree") + r:get_resource("sapling") return r:get_resource("tree") + r:get_resource("sapling")
end end
function mallorn_produce(r, n) function mallorn_produce(r, n)
local trees = r:get_resource("tree") local trees = r:get_resource("tree")
if trees>=n then if trees>=n then
r:set_resource("tree", trees-n) r:set_resource("tree", trees-n)
else else
r:set_resource("tree", 0) r:set_resource("tree", 0)
n = n - trees n = n - trees
trees = r:get_resource("sapling") trees = r:get_resource("sapling")
if trees>=n then if trees>=n then
r:set_resource("sapling", trees-n) r:set_resource("sapling", trees-n)
else else
r:set_resource("sapling", 0) r:set_resource("sapling", 0)
end end
end end
end end

View file

@ -1,6 +1,6 @@
CREATE TABLE email(id INTEGER PRIMARY KEY, md5 VARCHAR(32) UNIQUE NOT NULL, email VARCHAR(32), bounces INT DEFAULT 0, confirmed TIMESTAMP DEFAULT NULL); CREATE TABLE email(id INTEGER PRIMARY KEY, md5 VARCHAR(32) UNIQUE NOT NULL, email VARCHAR(32), bounces INT DEFAULT 0, confirmed TIMESTAMP DEFAULT NULL);
CREATE TABLE faction (id INTEGER PRIMARY KEY, user_id INTEGER REFERENCES user(id), no INTEGER, name VARCHAR(64), game_id INTEGER REFERENCES game(id), race VARCHAR(10), lang CHAR(2)); CREATE TABLE faction (id INTEGER PRIMARY KEY, user_id INTEGER REFERENCES user(id), no INTEGER, name VARCHAR(64), game_id INTEGER REFERENCES game(id), race VARCHAR(10), lang CHAR(2));
CREATE TABLE faction_email (faction_id INTEGER REFERENCES faction(id), email_id INTEGER REFERENCES email(id)); CREATE TABLE faction_email (faction_id INTEGER REFERENCES faction(id), email_id INTEGER REFERENCES email(id));
CREATE TABLE game (id INTEGER PRIMARY KEY, name VARCHAR(20), last_turn INTEGER); CREATE TABLE game (id INTEGER PRIMARY KEY, name VARCHAR(20), last_turn INTEGER);
CREATE TABLE score (turn INTEGER, faction_id INTEGER REFERENCES faction(id), value INTEGER, UNIQUE(turn, faction_id)); CREATE TABLE score (turn INTEGER, faction_id INTEGER REFERENCES faction(id), value INTEGER, UNIQUE(turn, faction_id));
CREATE TABLE user(id INTEGER PRIMARY KEY, email_id INTEGER REFERENCES email(id), creation TIMESTAMP DEFAULT CURRENT_TIMESTAMP); CREATE TABLE user(id INTEGER PRIMARY KEY, email_id INTEGER REFERENCES email(id), creation TIMESTAMP DEFAULT CURRENT_TIMESTAMP);

View file

@ -1,16 +1,16 @@
local srcpath = config.source_dir local srcpath = config.source_dir
local respath = srcpath .. '/' .. config.game .. '/res/' local respath = srcpath .. '/' .. config.game .. '/res/'
local paths = { config.game..'/scripts/?.lua';'lunit/?.lua','external/lunit/?.lua','scripts/?.lua';'scripts/?' } local paths = { config.game..'/scripts/?.lua';'lunit/?.lua','external/lunit/?.lua','scripts/?.lua';'scripts/?' }
tests = {'common'} tests = {'common'}
for idx, test in pairs(tests) do for idx, test in pairs(tests) do
tests[idx] = srcpath .. '/scripts/tests/' .. test .. '.lua' tests[idx] = srcpath .. '/scripts/tests/' .. test .. '.lua'
end end
for idx, path in pairs(paths) do for idx, path in pairs(paths) do
package.path = srcpath .. '/' .. path .. ';' .. package.path package.path = srcpath .. '/' .. path .. ';' .. package.path
end end
read_xml(respath..'config-'..config.game..'.xml', respath..'catalog-'..config.game..'.xml') read_xml(respath..'config-'..config.game..'.xml', respath..'catalog-'..config.game..'.xml')
require "init" require "init"

View file

@ -1,151 +1,151 @@
function creation_message(mage, type, number) function creation_message(mage, type, number)
local msg = message.create("item_create_spell") local msg = message.create("item_create_spell")
msg:set_unit("mage", mage) msg:set_unit("mage", mage)
msg:set_int("number", number) msg:set_int("number", number)
msg:set_resource("item", type) msg:set_resource("item", type)
return msg return msg
end end
local function create_item(mage, level, name, number) local function create_item(mage, level, name, number)
local count = number or 1 local count = number or 1
mage:add_item(name, count); mage:add_item(name, count);
local msg = creation_message(mage, name, count) local msg = creation_message(mage, name, count)
msg:send_faction(mage.faction) msg:send_faction(mage.faction)
return level return level
end end
-- Wasser des Lebens -- Wasser des Lebens
function create_potion_p2(r, mage, level, force) function create_potion_p2(r, mage, level, force)
return create_item(mage, level, "p2", level) return create_item(mage, level, "p2", level)
end end
-- Siebenmeilentee -- Siebenmeilentee
function create_potion_p0(r, mage, level, force) function create_potion_p0(r, mage, level, force)
return create_item(mage, level, "p0", level) return create_item(mage, level, "p0", level)
end end
-- Wundsalbe -- Wundsalbe
function create_potion_ointment(r, mage, level, force) function create_potion_ointment(r, mage, level, force)
return create_item(mage, level, "ointment", level) return create_item(mage, level, "ointment", level)
end end
-- Bauernblut -- Bauernblut
function create_potion_peasantblood(r, mage, level, force) function create_potion_peasantblood(r, mage, level, force)
return create_item(mage, level, "peasantblood", level) return create_item(mage, level, "peasantblood", level)
end end
-- Pferdeglück -- Pferdeglück
function create_potion_p9(r, mage, level, force) function create_potion_p9(r, mage, level, force)
return create_item(mage, level, "p9", level) return create_item(mage, level, "p9", level)
end end
-- Schaffenstrunk -- Schaffenstrunk
function create_potion_p3(r, mage, level, force) function create_potion_p3(r, mage, level, force)
return create_item(mage, level, "p3", level) return create_item(mage, level, "p3", level)
end end
-- Heiltrank -- Heiltrank
function create_potion_p14(r, mage, level, force) function create_potion_p14(r, mage, level, force)
return create_item(mage, level, "p14", level) return create_item(mage, level, "p14", level)
end end
-- Elixier der Macht -- Elixier der Macht
function create_potion_p13(r, mage, level, force) function create_potion_p13(r, mage, level, force)
return create_item(mage, level, "p13", level) return create_item(mage, level, "p13", level)
end end
-- Erschaffe ein Flammenschwert -- Erschaffe ein Flammenschwert
function create_firesword(r, mage, level, force) function create_firesword(r, mage, level, force)
return create_item(mage, level, "firesword") return create_item(mage, level, "firesword")
end end
-- Erschaffe einen Gürtel der Trollstärke -- Erschaffe einen Gürtel der Trollstärke
function create_trollbelt(r, mage, level, force) function create_trollbelt(r, mage, level, force)
return create_item(mage, level, "trollbelt") return create_item(mage, level, "trollbelt")
end end
-- Erschaffe einen Ring der Unsichtbarkeit -- Erschaffe einen Ring der Unsichtbarkeit
function create_roi(r, mage, level, force) function create_roi(r, mage, level, force)
return create_item(mage, level, "roi") return create_item(mage, level, "roi")
end end
-- Erschaffe einen Ring der flinken Finger -- Erschaffe einen Ring der flinken Finger
function create_roqf(r, mage, level, force) function create_roqf(r, mage, level, force)
return create_item(mage, level, "roqf") return create_item(mage, level, "roqf")
end end
-- Erschaffe ein Amulett des wahren Sehens -- Erschaffe ein Amulett des wahren Sehens
function create_aots(r, mage, level, force) function create_aots(r, mage, level, force)
return create_item(mage, level, "aots") return create_item(mage, level, "aots")
end end
-- Erschaffe einen magischen Kräuterbeutel -- Erschaffe einen magischen Kräuterbeutel
function create_magicherbbag(r, mage, level, force) function create_magicherbbag(r, mage, level, force)
return create_item(mage, level, "magicherbbag") return create_item(mage, level, "magicherbbag")
end end
-- Erschaffe einen Taktikkristal -- Erschaffe einen Taktikkristal
function create_dreameye(r, mage, level, force) function create_dreameye(r, mage, level, force)
return create_item(mage, level, "dreameye") return create_item(mage, level, "dreameye")
end end
-- Erschaffe einen Antimagiekristall -- Erschaffe einen Antimagiekristall
function create_antimagic(r, mage, level, force) function create_antimagic(r, mage, level, force)
return create_item(mage, level, "antimagic") return create_item(mage, level, "antimagic")
end end
-- Erschaffe eine Sphäre der Unsichtbarkeit -- Erschaffe eine Sphäre der Unsichtbarkeit
function create_invisibility_sphere(r, mage, level, force) function create_invisibility_sphere(r, mage, level, force)
return create_item(mage, level, "sphereofinv") return create_item(mage, level, "sphereofinv")
end end
-- Erschaffe einen Gürtel der Keuschheit -- Erschaffe einen Gürtel der Keuschheit
function create_chastitybelt(r, mage, level, force) function create_chastitybelt(r, mage, level, force)
return create_item(mage, level, "ao_chastity") return create_item(mage, level, "ao_chastity")
end end
-- Erschaffe ein Runenschwert -- Erschaffe ein Runenschwert
function create_runesword(r, mage, level, force) function create_runesword(r, mage, level, force)
return create_item(mage, level, "runesword") return create_item(mage, level, "runesword")
end end
-- Erschaffe ein Aurafokus -- Erschaffe ein Aurafokus
function create_focus(r, mage, level, force) function create_focus(r, mage, level, force)
return create_item(mage, level, "aurafocus") return create_item(mage, level, "aurafocus")
end end
-- Erschaffe einen Ring der Macht -- Erschaffe einen Ring der Macht
function create_rop(r, mage, level, force) function create_rop(r, mage, level, force)
return create_item(mage, level, "rop") return create_item(mage, level, "rop")
end end
-- Erschaffe einen Ring der Regeneration -- Erschaffe einen Ring der Regeneration
function create_ror(r, mage, level, force) function create_ror(r, mage, level, force)
return create_item(mage, level, "ror") return create_item(mage, level, "ror")
end end
-- Erschaffe einen Zauberbeutel -- Erschaffe einen Zauberbeutel
function create_bagofholding(r, mage, level, force) function create_bagofholding(r, mage, level, force)
return create_item(mage, level, "magicbag") return create_item(mage, level, "magicbag")
end end
-- TODO: -- TODO:
function earn_silver(r, mage, level, force) function earn_silver(r, mage, level, force)
local money = r:get_resource("money") local money = r:get_resource("money")
local wanted = 50 * force local wanted = 50 * force
local amount = wanted local amount = wanted
if wanted > money then if wanted > money then
amount = money amount = money
end end
r:set_resource("money", money - amount) r:set_resource("money", money - amount)
mage:add_item("money", amount) mage:add_item("money", amount)
local msg = message.create("income") local msg = message.create("income")
msg:set_unit("unit", mage) msg:set_unit("unit", mage)
msg:set_region("region", r) msg:set_region("region", r)
msg:set_int("mode", 6) msg:set_int("mode", 6)
msg:set_int("wanted", wanted) msg:set_int("wanted", wanted)
msg:set_int("amount", amount) msg:set_int("amount", amount)
msg:send_faction(mage.faction) msg:send_faction(mage.faction)
return level return level
end end

File diff suppressed because it is too large Load diff

View file

@ -1,64 +1,64 @@
require "lunit" require "lunit"
module( "spells", package.seeall, lunit.testcase ) module( "spells", package.seeall, lunit.testcase )
function setup() function setup()
free_game() free_game()
end end
function test_roi() function test_roi()
local r = region.create(0,0, "plain") local r = region.create(0,0, "plain")
local f = faction.create("noreply@eressea.de", "human", "de") local f = faction.create("noreply@eressea.de", "human", "de")
local u = unit.create(f, r, 1) local u = unit.create(f, r, 1)
u.race = "elf" u.race = "elf"
u:set_skill("magic", 10) u:set_skill("magic", 10)
u:add_item("money", 3010) u:add_item("money", 3010)
u.magic = "tybied" u.magic = "tybied"
u.aura = 200 u.aura = 200
u.ship = s1 u.ship = s1
u:add_spell("create_roi") u:add_spell("create_roi")
u:clear_orders() u:clear_orders()
u:add_order("ZAUBERE 'Erschaffe einen Ring der Unsichtbarkeit' ") u:add_order("ZAUBERE 'Erschaffe einen Ring der Unsichtbarkeit' ")
process_orders() process_orders()
write_reports() write_reports()
assert_equal(1, u:get_item("roi")) assert_equal(1, u:get_item("roi"))
end end
function test_blessedharvest_lasts_n_turn() function test_blessedharvest_lasts_n_turn()
free_game() free_game()
local r = region.create(0, 0, "plain") local r = region.create(0, 0, "plain")
local f = faction.create("noreply@eressea.de", "halfling", "de") local f = faction.create("noreply@eressea.de", "halfling", "de")
local u = unit.create(f, r) local u = unit.create(f, r)
r:set_resource("peasant", 100) r:set_resource("peasant", 100)
r:set_resource("money", 0) r:set_resource("money", 0)
u:add_item("money", 1000) u:add_item("money", 1000)
u.magic = "gwyrrd" u.magic = "gwyrrd"
u.race = "dwarf" u.race = "dwarf"
u:set_skill("magic", 20) u:set_skill("magic", 20)
u.aura = 200 u.aura = 200
u:add_spell("raindance") u:add_spell("raindance")
u:add_spell("blessedharvest") u:add_spell("blessedharvest")
u:clear_orders() u:clear_orders()
local level = 5 local level = 5
u:add_order("ZAUBERE STUFE " .. level .. " Regentanz") u:add_order("ZAUBERE STUFE " .. level .. " Regentanz")
assert_equal(0, r:get_resource("money"), 0) assert_equal(0, r:get_resource("money"), 0)
local m = 0 local m = 0
local p = 100 local p = 100
for i=1,level+2 do for i=1,level+2 do
process_orders() process_orders()
local income = p * 12 local income = p * 12
p = r:get_resource("peasant") p = r:get_resource("peasant")
income = income - p * 10 income = income - p * 10
m = m + income m = m + income
-- print(i, m, p, r:get_resource("money")) -- print(i, m, p, r:get_resource("money"))
if (i>level+1) then if (i>level+1) then
assert_not_equal(m, r:get_resource("money")) assert_not_equal(m, r:get_resource("money"))
else else
assert_equal(m, r:get_resource("money")) assert_equal(m, r:get_resource("money"))
end end
u:clear_orders() u:clear_orders()
u:add_order("ARBEITEN") u:add_order("ARBEITEN")
-- u:add_spell("raindance") -- u:add_spell("raindance")
end end
end end

View file

@ -1,33 +1,33 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_AGGRESSIVE #ifndef H_ATTRIBUTE_AGGRESSIVE
#define H_ATTRIBUTE_AGGRESSIVE #define H_ATTRIBUTE_AGGRESSIVE
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern struct attrib_type at_aggressive; extern struct attrib_type at_aggressive;
extern struct attrib * make_aggressive(double probability); extern struct attrib * make_aggressive(double probability);
extern void init_aggressive(void); extern void init_aggressive(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,34 +1,34 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/types.h> #include <kernel/types.h>
#include "alliance.h" #include "alliance.h"
#include <kernel/save.h> #include <kernel/save.h>
#include <util/attrib.h> #include <util/attrib.h>
attrib_type at_alliance = { attrib_type at_alliance = {
"alliance", "alliance",
NULL, NULL,
NULL, NULL,
NULL, NULL,
a_writeint, a_writeint,
a_readint, a_readint,
ATF_UNIQUE ATF_UNIQUE
}; };

View file

@ -1,31 +1,31 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_ALLIANCE #ifndef H_ATTRIBUTE_ALLIANCE
#define H_ATTRIBUTE_ALLIANCE #define H_ATTRIBUTE_ALLIANCE
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern struct attrib_type at_alliance; extern struct attrib_type at_alliance;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,81 +1,81 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include "attributes.h" #include "attributes.h"
/* attributes includes */ /* attributes includes */
#include "follow.h" #include "follow.h"
#include "gm.h" #include "gm.h"
#include "hate.h" #include "hate.h"
#include "iceberg.h" #include "iceberg.h"
#include "key.h" #include "key.h"
#include "moved.h" #include "moved.h"
#include "movement.h" #include "movement.h"
#include "object.h" #include "object.h"
#include "orcification.h" #include "orcification.h"
#include "otherfaction.h" #include "otherfaction.h"
#include "overrideroads.h" #include "overrideroads.h"
#include "racename.h" #include "racename.h"
#include "raceprefix.h" #include "raceprefix.h"
#include "reduceproduction.h" #include "reduceproduction.h"
#include "targetregion.h" #include "targetregion.h"
#ifdef WDW_PYRAMID #ifdef WDW_PYRAMID
# include "alliance.h" # include "alliance.h"
#endif #endif
/* kernel includes */ /* kernel includes */
#include <kernel/unit.h> #include <kernel/unit.h>
#include <kernel/faction.h> #include <kernel/faction.h>
#include <kernel/region.h> #include <kernel/region.h>
#include <kernel/save.h> #include <kernel/save.h>
#include <kernel/ship.h> #include <kernel/ship.h>
#include <kernel/building.h> #include <kernel/building.h>
/* util includes */ /* util includes */
#include <util/attrib.h> #include <util/attrib.h>
attrib_type at_unitdissolve = { attrib_type at_unitdissolve = {
"unitdissolve", NULL, NULL, NULL, a_writechars, a_readchars "unitdissolve", NULL, NULL, NULL, a_writechars, a_readchars
}; };
void void
register_attributes(void) register_attributes(void)
{ {
at_register(&at_object); at_register(&at_object);
at_register(&at_unitdissolve); at_register(&at_unitdissolve);
at_register(&at_overrideroads); at_register(&at_overrideroads);
at_register(&at_raceprefix); at_register(&at_raceprefix);
at_register(&at_iceberg); at_register(&at_iceberg);
at_register(&at_key); at_register(&at_key);
at_register(&at_gm); at_register(&at_gm);
at_register(&at_follow); at_register(&at_follow);
at_register(&at_targetregion); at_register(&at_targetregion);
at_register(&at_orcification); at_register(&at_orcification);
at_register(&at_hate); at_register(&at_hate);
at_register(&at_reduceproduction); at_register(&at_reduceproduction);
at_register(&at_otherfaction); at_register(&at_otherfaction);
at_register(&at_racename); at_register(&at_racename);
at_register(&at_movement); at_register(&at_movement);
at_register(&at_moved); at_register(&at_moved);
#ifdef WDW_PYRAMID #ifdef WDW_PYRAMID
at_register(&at_alliance); at_register(&at_alliance);
#endif /* WDW_PYRAMID */ #endif /* WDW_PYRAMID */
} }

View file

@ -1,31 +1,31 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_ATTRIBUTES #ifndef H_ATTRIBUTE_ATTRIBUTES
#define H_ATTRIBUTE_ATTRIBUTES #define H_ATTRIBUTE_ATTRIBUTES
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern void register_attributes(void); extern void register_attributes(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,45 +1,45 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include "fleechance.h" #include "fleechance.h"
#include <util/attrib.h> #include <util/attrib.h>
attrib_type at_fleechance = { attrib_type at_fleechance = {
"fleechance", "fleechance",
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
}; };
attrib * attrib *
make_fleechance(float fleechance) make_fleechance(float fleechance)
{ {
attrib * a = a_new(&at_fleechance); attrib * a = a_new(&at_fleechance);
a->data.flt = fleechance; a->data.flt = fleechance;
return a; return a;
} }
void void
init_fleechance(void) init_fleechance(void)
{ {
at_register(&at_fleechance); at_register(&at_fleechance);
} }

View file

@ -1,33 +1,33 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_FLEECHANCE #ifndef H_ATTRIBUTE_FLEECHANCE
#define H_ATTRIBUTE_FLEECHANCE #define H_ATTRIBUTE_FLEECHANCE
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern struct attrib_type at_fleechance; extern struct attrib_type at_fleechance;
extern struct attrib * make_fleechance(float fleechance); extern struct attrib * make_fleechance(float fleechance);
extern void init_fleechance(void); extern void init_fleechance(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,46 +1,46 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include "follow.h" #include "follow.h"
#include <kernel/config.h> #include <kernel/config.h>
#include <kernel/unit.h> #include <kernel/unit.h>
#include <util/attrib.h> #include <util/attrib.h>
#include <util/storage.h> #include <util/storage.h>
#include <util/variant.h> #include <util/variant.h>
static int static int
read_follow(attrib * a, void * owner, struct storage * store) read_follow(attrib * a, void * owner, struct storage * store)
{ {
read_unit_reference(store); /* skip it */ read_unit_reference(store); /* skip it */
return AT_READ_FAIL; return AT_READ_FAIL;
} }
attrib_type at_follow = { attrib_type at_follow = {
"follow", NULL, NULL, NULL, NULL, read_follow "follow", NULL, NULL, NULL, NULL, read_follow
}; };
attrib * attrib *
make_follow(struct unit * u) make_follow(struct unit * u)
{ {
attrib * a = a_new(&at_follow); attrib * a = a_new(&at_follow);
a->data.v = u; a->data.v = u;
return a; return a;
} }

View file

@ -1,35 +1,35 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_FOLLOW #ifndef H_ATTRIBUTE_FOLLOW
#define H_ATTRIBUTE_FOLLOW #define H_ATTRIBUTE_FOLLOW
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern struct attrib_type at_follow; extern struct attrib_type at_follow;
struct unit; struct unit;
extern struct attrib * make_follow(struct unit * u); extern struct attrib * make_follow(struct unit * u);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,135 +1,135 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include "giveitem.h" #include "giveitem.h"
#include <kernel/config.h> #include <kernel/config.h>
/* kernel includes */ /* kernel includes */
#include <kernel/building.h> #include <kernel/building.h>
#include <kernel/region.h> #include <kernel/region.h>
#include <kernel/unit.h> #include <kernel/unit.h>
#include <kernel/item.h> #include <kernel/item.h>
/* util includes */ /* util includes */
#include <util/attrib.h> #include <util/attrib.h>
#include <util/base36.h> #include <util/base36.h>
#include <util/resolve.h> #include <util/resolve.h>
#include <util/storage.h> #include <util/storage.h>
#include <util/goodies.h> #include <util/goodies.h>
/* libc includes */ /* libc includes */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
typedef struct give_data { typedef struct give_data {
struct building * building; struct building * building;
struct item * items; struct item * items;
} give_data; } give_data;
static void static void
a_writegive(const attrib * a, const void * owner, struct storage * store) a_writegive(const attrib * a, const void * owner, struct storage * store)
{ {
give_data * gdata = (give_data*)a->data.v; give_data * gdata = (give_data*)a->data.v;
item * itm; item * itm;
write_building_reference(gdata->building, store); write_building_reference(gdata->building, store);
for (itm=gdata->items;itm;itm=itm->next) { for (itm=gdata->items;itm;itm=itm->next) {
store->w_tok(store, resourcename(itm->type->rtype, 0)); store->w_tok(store, resourcename(itm->type->rtype, 0));
store->w_int(store, itm->number); store->w_int(store, itm->number);
} }
store->w_tok(store, "end"); store->w_tok(store, "end");
} }
static int static int
a_readgive(attrib * a, void * owner, struct storage * store) a_readgive(attrib * a, void * owner, struct storage * store)
{ {
give_data * gdata = (give_data*)a->data.v; give_data * gdata = (give_data*)a->data.v;
variant var; variant var;
char zText[32]; char zText[32];
var.i = store->r_id(store); var.i = store->r_id(store);
if (var.i>0) { if (var.i>0) {
gdata->building = findbuilding(var.i); gdata->building = findbuilding(var.i);
if (gdata->building==NULL) { if (gdata->building==NULL) {
ur_add(var, &gdata->building, resolve_building); ur_add(var, &gdata->building, resolve_building);
} }
} else { } else {
gdata->building=NULL; gdata->building=NULL;
} }
for (;;) { for (;;) {
int i; int i;
store->r_tok_buf(store, zText, sizeof(zText)); store->r_tok_buf(store, zText, sizeof(zText));
if (!strcmp("end", zText)) break; if (!strcmp("end", zText)) break;
i = store->r_int(store); i = store->r_int(store);
if (i==0) i_add(&gdata->items, i_new(it_find(zText), i)); if (i==0) i_add(&gdata->items, i_new(it_find(zText), i));
} }
return AT_READ_OK; return AT_READ_OK;
} }
static void static void
a_initgive(struct attrib * a) a_initgive(struct attrib * a)
{ {
a->data.v = calloc(sizeof(give_data), 1); a->data.v = calloc(sizeof(give_data), 1);
} }
static void static void
a_finalizegive(struct attrib * a) a_finalizegive(struct attrib * a)
{ {
free(a->data.v); free(a->data.v);
} }
static int static int
a_giveitem(attrib * a) a_giveitem(attrib * a)
{ {
give_data * gdata = (give_data*)a->data.v; give_data * gdata = (give_data*)a->data.v;
region * r; region * r;
unit * u; unit * u;
if (gdata->building==NULL || gdata->items==NULL) return 0; if (gdata->building==NULL || gdata->items==NULL) return 0;
r = gdata->building->region; r = gdata->building->region;
u = building_owner(gdata->building); u = building_owner(gdata->building);
if (u==NULL) return 1; if (u==NULL) return 1;
while (gdata->items) { while (gdata->items) {
item * itm = gdata->items; item * itm = gdata->items;
i_change(&u->items, itm->type, itm->number); i_change(&u->items, itm->type, itm->number);
i_free(i_remove(&gdata->items, itm)); i_free(i_remove(&gdata->items, itm));
} }
return 0; return 0;
} }
attrib_type at_giveitem = { attrib_type at_giveitem = {
"giveitem", "giveitem",
a_initgive, a_finalizegive, a_initgive, a_finalizegive,
a_giveitem, a_giveitem,
a_writegive, a_readgive a_writegive, a_readgive
}; };
attrib * attrib *
make_giveitem(struct building * b, struct item * ip) make_giveitem(struct building * b, struct item * ip)
{ {
attrib * a = a_new(&at_giveitem); attrib * a = a_new(&at_giveitem);
give_data * gd = (give_data*)a->data.v; give_data * gd = (give_data*)a->data.v;
gd->building = b; gd->building = b;
gd->items = ip; gd->items = ip;
return a; return a;
} }
void void
init_giveitem(void) init_giveitem(void)
{ {
at_register(&at_giveitem); at_register(&at_giveitem);
} }

View file

@ -1,36 +1,36 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_GIVEITEM #ifndef H_ATTRIBUTE_GIVEITEM
#define H_ATTRIBUTE_GIVEITEM #define H_ATTRIBUTE_GIVEITEM
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct building; struct building;
struct item; struct item;
extern struct attrib_type at_giveitem; extern struct attrib_type at_giveitem;
extern struct attrib * make_giveitem(struct building * b, struct item * items); extern struct attrib * make_giveitem(struct building * b, struct item * items);
extern void init_giveitem(void); extern void init_giveitem(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,61 +1,61 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include "gm.h" #include "gm.h"
/* kernel includes */ /* kernel includes */
#include <kernel/plane.h> #include <kernel/plane.h>
/* util includes */ /* util includes */
#include <util/attrib.h> #include <util/attrib.h>
#include <util/storage.h> #include <util/storage.h>
static void static void
write_gm(const attrib * a, const void * owner, struct storage * store) write_gm(const attrib * a, const void * owner, struct storage * store)
{ {
write_plane_reference((plane*)a->data.v, store); write_plane_reference((plane*)a->data.v, store);
} }
static int static int
read_gm(attrib * a, void * owner, struct storage * store) read_gm(attrib * a, void * owner, struct storage * store)
{ {
plane * pl; plane * pl;
int result = read_plane_reference(&pl, store); int result = read_plane_reference(&pl, store);
a->data.v = pl; a->data.v = pl;
return result; return result;
} }
attrib_type at_gm = { attrib_type at_gm = {
"gm", "gm",
NULL, NULL,
NULL, NULL,
NULL, NULL,
write_gm, write_gm,
read_gm, read_gm,
}; };
attrib * attrib *
make_gm(const struct plane * pl) make_gm(const struct plane * pl)
{ {
attrib * a = a_new(&at_gm); attrib * a = a_new(&at_gm);
a->data.v = (void*)pl; a->data.v = (void*)pl;
return a; return a;
} }

View file

@ -1,36 +1,36 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_GM #ifndef H_ATTRIBUTE_GM
#define H_ATTRIBUTE_GM #define H_ATTRIBUTE_GM
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* this is an attribute used by the kernel (isallied) */ /* this is an attribute used by the kernel (isallied) */
struct plane; struct plane;
extern struct attrib_type at_gm; extern struct attrib_type at_gm;
extern struct attrib * make_gm(const struct plane *pl); extern struct attrib * make_gm(const struct plane *pl);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,70 +1,70 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include "hate.h" #include "hate.h"
#include <kernel/unit.h> #include <kernel/unit.h>
#include <kernel/version.h> #include <kernel/version.h>
#include <util/attrib.h> #include <util/attrib.h>
#include <util/resolve.h> #include <util/resolve.h>
#include <util/storage.h> #include <util/storage.h>
static int static int
verify_hate(attrib * a) verify_hate(attrib * a)
{ {
if (a->data.v==NULL) { if (a->data.v==NULL) {
return 0; return 0;
} }
return 1; return 1;
} }
static void static void
write_hate(const attrib * a, const void * owner, struct storage * store) write_hate(const attrib * a, const void * owner, struct storage * store)
{ {
write_unit_reference((unit*)a->data.v, store); write_unit_reference((unit*)a->data.v, store);
} }
static int static int
read_hate(attrib * a, void * owner, struct storage * store) read_hate(attrib * a, void * owner, struct storage * store)
{ {
int result = read_reference(&a->data.v, store, read_unit_reference, resolve_unit); int result = read_reference(&a->data.v, store, read_unit_reference, resolve_unit);
if (result==0 && !a->data.v) { if (result==0 && !a->data.v) {
return AT_READ_FAIL; return AT_READ_FAIL;
} }
return AT_READ_OK; return AT_READ_OK;
} }
attrib_type at_hate = { attrib_type at_hate = {
"hates", "hates",
NULL, NULL,
NULL, NULL,
verify_hate, verify_hate,
write_hate, write_hate,
read_hate, read_hate,
}; };
attrib * attrib *
make_hate(struct unit * u) make_hate(struct unit * u)
{ {
attrib * a = a_new(&at_hate); attrib * a = a_new(&at_hate);
a->data.v = u; a->data.v = u;
return a; return a;
} }

View file

@ -1,35 +1,35 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_HATE #ifndef H_ATTRIBUTE_HATE
#define H_ATTRIBUTE_HATE #define H_ATTRIBUTE_HATE
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern struct attrib_type at_hate; extern struct attrib_type at_hate;
struct unit; struct unit;
extern struct attrib * make_hate(struct unit * u); extern struct attrib * make_hate(struct unit * u);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,42 +1,42 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include "iceberg.h" #include "iceberg.h"
#include <kernel/save.h> #include <kernel/save.h>
#include <util/attrib.h> #include <util/attrib.h>
attrib_type at_iceberg = { attrib_type at_iceberg = {
"iceberg_drift", "iceberg_drift",
NULL, NULL,
NULL, NULL,
NULL, NULL,
a_writeint, a_writeint,
a_readint, a_readint,
ATF_UNIQUE ATF_UNIQUE
}; };
attrib * attrib *
make_iceberg(direction_t dir) make_iceberg(direction_t dir)
{ {
attrib * a = a_new(&at_iceberg); attrib * a = a_new(&at_iceberg);
a->data.i = (int)dir; a->data.i = (int)dir;
return a; return a;
} }

View file

@ -1,33 +1,33 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_ICEBERG #ifndef H_ATTRIBUTE_ICEBERG
#define H_ATTRIBUTE_ICEBERG #define H_ATTRIBUTE_ICEBERG
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern struct attrib_type at_iceberg; extern struct attrib_type at_iceberg;
extern struct attrib * make_iceberg(direction_t dir); extern struct attrib * make_iceberg(direction_t dir);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,59 +1,59 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include "key.h" #include "key.h"
#include <kernel/save.h> #include <kernel/save.h>
#include <util/attrib.h> #include <util/attrib.h>
attrib_type at_key = { attrib_type at_key = {
"key", "key",
NULL, NULL,
NULL, NULL,
NULL, NULL,
a_writeint, a_writeint,
a_readint, a_readint,
}; };
attrib * attrib *
add_key(attrib ** alist, int key) add_key(attrib ** alist, int key)
{ {
attrib * a = find_key(*alist, key); attrib * a = find_key(*alist, key);
if (a==NULL) a = a_add(alist, make_key(key)); if (a==NULL) a = a_add(alist, make_key(key));
return a; return a;
} }
attrib * attrib *
make_key(int key) make_key(int key)
{ {
attrib * a = a_new(&at_key); attrib * a = a_new(&at_key);
a->data.i = key; a->data.i = key;
return a; return a;
} }
attrib * attrib *
find_key(attrib * alist, int key) find_key(attrib * alist, int key)
{ {
attrib * a = a_find(alist, &at_key); attrib * a = a_find(alist, &at_key);
while (a && a->type==&at_key && a->data.i != key) { while (a && a->type==&at_key && a->data.i != key) {
a = a->next; a = a->next;
} }
return (a && a->type==&at_key)?a:NULL; return (a && a->type==&at_key)?a:NULL;
} }

View file

@ -1,35 +1,35 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_KEY #ifndef H_ATTRIBUTE_KEY
#define H_ATTRIBUTE_KEY #define H_ATTRIBUTE_KEY
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern struct attrib_type at_key; extern struct attrib_type at_key;
extern struct attrib * make_key(int key); extern struct attrib * make_key(int key);
extern struct attrib * find_key(struct attrib * alist, int key); extern struct attrib * find_key(struct attrib * alist, int key);
extern struct attrib * add_key(struct attrib ** alist, int key); extern struct attrib * add_key(struct attrib ** alist, int key);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,40 +1,40 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include "matmod.h" #include "matmod.h"
#include <util/attrib.h> #include <util/attrib.h>
attrib_type at_matmod = { attrib_type at_matmod = {
"matmod", "matmod",
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
ATF_PRESERVE ATF_PRESERVE
}; };
attrib * attrib *
make_matmod(mm_fun function) make_matmod(mm_fun function)
{ {
attrib * a = a_new(&at_matmod); attrib * a = a_new(&at_matmod);
a->data.f = (void(*)(void))function; a->data.f = (void(*)(void))function;
return a; return a;
} }

View file

@ -1,37 +1,37 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_MATMOD #ifndef H_ATTRIBUTE_MATMOD
#define H_ATTRIBUTE_MATMOD #define H_ATTRIBUTE_MATMOD
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct resource_type; struct resource_type;
struct unit; struct unit;
typedef int (*mm_fun)(const struct unit * u, const struct resource_type * rtype, int value); typedef int (*mm_fun)(const struct unit * u, const struct resource_type * rtype, int value);
extern struct attrib_type at_matmod; extern struct attrib_type at_matmod;
extern struct attrib * make_matmod(mm_fun function); extern struct attrib * make_matmod(mm_fun function);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,63 +1,63 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include "moved.h" #include "moved.h"
#include <util/attrib.h> #include <util/attrib.h>
#include <util/storage.h> #include <util/storage.h>
static int static int
age_moved(attrib * a) age_moved(attrib * a)
{ {
--a->data.i; --a->data.i;
return a->data.i > 0; return a->data.i > 0;
} }
static void static void
write_moved(const attrib * a, const void * owner, struct storage * store) write_moved(const attrib * a, const void * owner, struct storage * store)
{ {
store->w_int(store, a->data.i); store->w_int(store, a->data.i);
} }
static int static int
read_moved(attrib * a, void * owner, struct storage * store) read_moved(attrib * a, void * owner, struct storage * store)
{ {
a->data.i = store->r_int(store); a->data.i = store->r_int(store);
if (a->data.i !=0 ) return AT_READ_OK; if (a->data.i !=0 ) return AT_READ_OK;
else return AT_READ_FAIL; else return AT_READ_FAIL;
} }
attrib_type at_moved = { attrib_type at_moved = {
"moved", NULL, NULL, age_moved, write_moved, read_moved "moved", NULL, NULL, age_moved, write_moved, read_moved
}; };
boolean boolean
get_moved(attrib ** alist) get_moved(attrib ** alist)
{ {
return a_find(*alist, &at_moved) ? true : false; return a_find(*alist, &at_moved) ? true : false;
} }
void void
set_moved(attrib ** alist) set_moved(attrib ** alist)
{ {
attrib * a = a_find(*alist, &at_moved); attrib * a = a_find(*alist, &at_moved);
if (a==NULL) a = a_add(alist, a_new(&at_moved)); if (a==NULL) a = a_add(alist, a_new(&at_moved));
a->data.i = 2; a->data.i = 2;
} }

View file

@ -1,37 +1,37 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_MOVED #ifndef H_ATTRIBUTE_MOVED
#define H_ATTRIBUTE_MOVED #define H_ATTRIBUTE_MOVED
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct attrib; struct attrib;
struct attrib_type; struct attrib_type;
extern boolean get_moved(struct attrib ** alist); extern boolean get_moved(struct attrib ** alist);
extern void set_moved(struct attrib ** alist); extern void set_moved(struct attrib ** alist);
extern struct attrib_type at_moved; extern struct attrib_type at_moved;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,59 +1,59 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include "movement.h" #include "movement.h"
#include <util/attrib.h> #include <util/attrib.h>
#include <util/storage.h> #include <util/storage.h>
static void static void
write_movement(const attrib * a, const void * owner, struct storage * store) write_movement(const attrib * a, const void * owner, struct storage * store)
{ {
store->w_int(store, a->data.i); store->w_int(store, a->data.i);
} }
static int static int
read_movement(attrib * a, void * owner, struct storage * store) read_movement(attrib * a, void * owner, struct storage * store)
{ {
a->data.i = store->r_int(store); a->data.i = store->r_int(store);
if (a->data.i !=0 ) return AT_READ_OK; if (a->data.i !=0 ) return AT_READ_OK;
else return AT_READ_FAIL; else return AT_READ_FAIL;
} }
attrib_type at_movement = { attrib_type at_movement = {
"movement", NULL, NULL, NULL, write_movement, read_movement "movement", NULL, NULL, NULL, write_movement, read_movement
}; };
boolean boolean
get_movement(attrib * const * alist, int type) get_movement(attrib * const * alist, int type)
{ {
const attrib * a = a_findc(*alist, &at_movement); const attrib * a = a_findc(*alist, &at_movement);
if (a==NULL) return false; if (a==NULL) return false;
if (a->data.i & type) return true; if (a->data.i & type) return true;
return false; return false;
} }
void void
set_movement(attrib ** alist, int type) set_movement(attrib ** alist, int type)
{ {
attrib * a = a_find(*alist, &at_movement); attrib * a = a_find(*alist, &at_movement);
if (a==NULL) a = a_add(alist, a_new(&at_movement)); if (a==NULL) a = a_add(alist, a_new(&at_movement));
a->data.i |= type; a->data.i |= type;
} }

View file

@ -1,33 +1,33 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifndef H_ATTRIBUTE_MOVEMENT #ifndef H_ATTRIBUTE_MOVEMENT
#define H_ATTRIBUTE_MOVEMENT #define H_ATTRIBUTE_MOVEMENT
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern boolean get_movement(struct attrib * const * alist, int type); extern boolean get_movement(struct attrib * const * alist, int type);
extern void set_movement(struct attrib ** alist, int type); extern void set_movement(struct attrib ** alist, int type);
extern struct attrib_type at_movement; extern struct attrib_type at_movement;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,267 +1,267 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include "object.h" #include "object.h"
/* kernel includes */ /* kernel includes */
#include <kernel/building.h> #include <kernel/building.h>
#include <kernel/faction.h> #include <kernel/faction.h>
#include <kernel/region.h> #include <kernel/region.h>
#include <kernel/save.h> #include <kernel/save.h>
#include <kernel/ship.h> #include <kernel/ship.h>
#include <kernel/unit.h> #include <kernel/unit.h>
#include <kernel/version.h> #include <kernel/version.h>
/* util includes */ /* util includes */
#include <util/attrib.h> #include <util/attrib.h>
#include <util/resolve.h> #include <util/resolve.h>
#include <util/storage.h> #include <util/storage.h>
/* stdc includes */ /* stdc includes */
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
typedef struct object_data { typedef struct object_data {
object_type type; object_type type;
char * name; char * name;
union { union {
int i; int i;
char * str; char * str;
double real; double real;
struct unit * u; struct unit * u;
struct region * r; struct region * r;
struct building * b; struct building * b;
struct ship * sh; struct ship * sh;
struct faction * f; struct faction * f;
} data; } data;
} object_data; } object_data;
static void static void
object_write(const attrib * a, const void * owner, struct storage * store) object_write(const attrib * a, const void * owner, struct storage * store)
{ {
const object_data * data = (object_data *)a->data.v; const object_data * data = (object_data *)a->data.v;
int type = (int)data->type; int type = (int)data->type;
store->w_tok(store, data->name); store->w_tok(store, data->name);
store->w_int(store, type); store->w_int(store, type);
switch (data->type) { switch (data->type) {
case TINTEGER: case TINTEGER:
store->w_int(store, data->data.i); store->w_int(store, data->data.i);
break; break;
case TREAL: case TREAL:
store->w_flt(store, (float)data->data.real); store->w_flt(store, (float)data->data.real);
break; break;
case TSTRING: case TSTRING:
store->w_str(store, data->data.str); store->w_str(store, data->data.str);
break; break;
case TUNIT: case TUNIT:
write_unit_reference(data->data.u, store ); write_unit_reference(data->data.u, store );
break; break;
case TFACTION: case TFACTION:
write_faction_reference(data->data.f, store); write_faction_reference(data->data.f, store);
break; break;
case TBUILDING: case TBUILDING:
write_building_reference(data->data.b, store); write_building_reference(data->data.b, store);
break; break;
case TSHIP: case TSHIP:
/* write_ship_reference(data->data.sh, store); */ /* write_ship_reference(data->data.sh, store); */
assert(!"not implemented"); assert(!"not implemented");
break; break;
case TREGION: case TREGION:
write_region_reference(data->data.r, store); write_region_reference(data->data.r, store);
break; break;
case TNONE: case TNONE:
break; break;
default: default:
assert(!"illegal type in object-attribute"); assert(!"illegal type in object-attribute");
} }
} }
static int static int
object_read(attrib *a, void * owner, struct storage * store) object_read(attrib *a, void * owner, struct storage * store)
{ {
object_data * data = (object_data *)a->data.v; object_data * data = (object_data *)a->data.v;
int result; int result;
data->name = store->r_str(store); data->name = store->r_str(store);
data->type = (object_type)store->r_int(store); data->type = (object_type)store->r_int(store);
switch (data->type) { switch (data->type) {
case TINTEGER: case TINTEGER:
data->data.i = store->r_int(store); data->data.i = store->r_int(store);
break; break;
case TREAL: case TREAL:
data->data.real = store->r_flt(store); data->data.real = store->r_flt(store);
break; break;
case TSTRING: case TSTRING:
data->data.str = store->r_str(store); data->data.str = store->r_str(store);
break; break;
case TBUILDING: case TBUILDING:
result = read_reference(&data->data.b, store, read_building_reference, resolve_building); result = read_reference(&data->data.b, store, read_building_reference, resolve_building);
if (result==0 && !data->data.b) { if (result==0 && !data->data.b) {
return AT_READ_FAIL; return AT_READ_FAIL;
} }
break; break;
case TUNIT: case TUNIT:
result = read_reference(&data->data.u, store, read_unit_reference, resolve_unit); result = read_reference(&data->data.u, store, read_unit_reference, resolve_unit);
if (result==0 && !data->data.u) { if (result==0 && !data->data.u) {
return AT_READ_FAIL; return AT_READ_FAIL;
} }
break; break;
case TFACTION: case TFACTION:
result = read_reference(&data->data.f, store, read_faction_reference, resolve_faction); result = read_reference(&data->data.f, store, read_faction_reference, resolve_faction);
if (result==0 && !data->data.f) { if (result==0 && !data->data.f) {
return AT_READ_FAIL; return AT_READ_FAIL;
} }
break; break;
case TREGION: case TREGION:
result = read_reference(&data->data.r, store, read_region_reference, RESOLVE_REGION(store->version)); result = read_reference(&data->data.r, store, read_region_reference, RESOLVE_REGION(store->version));
if (result==0 && !data->data.r) { if (result==0 && !data->data.r) {
return AT_READ_FAIL; return AT_READ_FAIL;
} }
break; break;
case TSHIP: case TSHIP:
/* return read_ship_reference(&data->data.sh, store); */ /* return read_ship_reference(&data->data.sh, store); */
assert(!"not implemented"); assert(!"not implemented");
break; break;
case TNONE: case TNONE:
break; break;
default: default:
return AT_READ_FAIL; return AT_READ_FAIL;
} }
return AT_READ_OK; return AT_READ_OK;
} }
static void static void
object_init(attrib * a) object_init(attrib * a)
{ {
object_data * data; object_data * data;
a->data.v = malloc(sizeof(object_data)); a->data.v = malloc(sizeof(object_data));
data = (object_data *)a->data.v; data = (object_data *)a->data.v;
data->type = TNONE; data->type = TNONE;
} }
static void static void
object_done(attrib * a) object_done(attrib * a)
{ {
object_data * data = (object_data *)a->data.v; object_data * data = (object_data *)a->data.v;
if (data->type == TSTRING) free(data->data.str); if (data->type == TSTRING) free(data->data.str);
free(data->name); free(data->name);
free(a->data.v); free(a->data.v);
} }
attrib_type at_object = { attrib_type at_object = {
"object", object_init, object_done, NULL, "object", object_init, object_done, NULL,
object_write, object_read object_write, object_read
}; };
const char * const char *
object_name(const attrib * a) object_name(const attrib * a)
{ {
object_data * data = (object_data *)a->data.v; object_data * data = (object_data *)a->data.v;
return data->name; return data->name;
} }
struct attrib * struct attrib *
object_create(const char * name, object_type type, variant value) object_create(const char * name, object_type type, variant value)
{ {
attrib * a = a_new(&at_object); attrib * a = a_new(&at_object);
object_data * data = (object_data *)a->data.v; object_data * data = (object_data *)a->data.v;
data->name = strdup(name); data->name = strdup(name);
object_set(a, type, value); object_set(a, type, value);
return a; return a;
} }
void void
object_set(attrib * a, object_type type, variant value) object_set(attrib * a, object_type type, variant value)
{ {
object_data * data = (object_data *)a->data.v; object_data * data = (object_data *)a->data.v;
if (data->type==TSTRING) free(data->data.str); if (data->type==TSTRING) free(data->data.str);
data->type = type; data->type = type;
switch (type) { switch (type) {
case TSTRING: case TSTRING:
data->data.str = value.v?strdup(value.v):NULL; data->data.str = value.v?strdup(value.v):NULL;
break; break;
case TINTEGER: case TINTEGER:
data->data.i = value.i; data->data.i = value.i;
break; break;
case TREAL: case TREAL:
data->data.real = value.f; data->data.real = value.f;
break; break;
case TREGION: case TREGION:
data->data.r = (region*)value.v; data->data.r = (region*)value.v;
break; break;
case TBUILDING: case TBUILDING:
data->data.b = (building*)value.v; data->data.b = (building*)value.v;
break; break;
case TFACTION: case TFACTION:
data->data.f = (faction*)value.v; data->data.f = (faction*)value.v;
break; break;
case TUNIT: case TUNIT:
data->data.u = (unit*)value.v; data->data.u = (unit*)value.v;
break; break;
case TSHIP: case TSHIP:
data->data.sh = (ship*)value.v; data->data.sh = (ship*)value.v;
break; break;
case TNONE: case TNONE:
break; break;
default: default:
assert(!"invalid object-type"); assert(!"invalid object-type");
break; break;
} }
} }
void void
object_get(const struct attrib * a, object_type * type, variant * value) object_get(const struct attrib * a, object_type * type, variant * value)
{ {
object_data * data = (object_data *)a->data.v; object_data * data = (object_data *)a->data.v;
*type = data->type; *type = data->type;
switch (data->type) { switch (data->type) {
case TSTRING: case TSTRING:
value->v = data->data.str; value->v = data->data.str;
break; break;
case TINTEGER: case TINTEGER:
value->i = data->data.i; value->i = data->data.i;
break; break;
case TREAL: case TREAL:
value->f = (float)data->data.real; value->f = (float)data->data.real;
break; break;
case TREGION: case TREGION:
value->v = data->data.r; value->v = data->data.r;
break; break;
case TBUILDING: case TBUILDING:
value->v = data->data.b; value->v = data->data.b;
break; break;
case TFACTION: case TFACTION:
value->v = data->data.f; value->v = data->data.f;
break; break;
case TUNIT: case TUNIT:
value->v = data->data.u; value->v = data->data.u;
break; break;
case TSHIP: case TSHIP:
value->v = data->data.sh; value->v = data->data.sh;
break; break;
case TNONE: case TNONE:
break; break;
default: default:
assert(!"invalid object-type"); assert(!"invalid object-type");
break; break;
} }
} }

View file

@ -1,38 +1,38 @@
/* vi: set ts=2: /* vi: set ts=2:
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de> +-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
| | Enno Rehling <enno@eressea.de> | | Enno Rehling <enno@eressea.de>
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de> | Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
| (c) 1998 - 2003 | Henning Peters <faroul@beyond.kn-bremen.de> | (c) 1998 - 2003 | Henning Peters <faroul@beyond.kn-bremen.de>
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de> | | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
+-------------------+ Stefan Reich <reich@halbling.de> +-------------------+ Stefan Reich <reich@halbling.de>
This program may not be used, modified or distributed This program may not be used, modified or distributed
without prior permission by the authors of Eressea. without prior permission by the authors of Eressea.
*/ */
#ifndef H_ATTRIBUTE_OBJECT #ifndef H_ATTRIBUTE_OBJECT
#define H_ATTRIBUTE_OBJECT #define H_ATTRIBUTE_OBJECT
#include <util/variant.h> #include <util/variant.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef enum { typedef enum {
TNONE = 0, TINTEGER = 1, TREAL = 2, TSTRING = 3, TNONE = 0, TINTEGER = 1, TREAL = 2, TSTRING = 3,
TUNIT = 10, TFACTION = 11, TREGION = 12, TBUILDING = 13, TSHIP = 14, TUNIT = 10, TFACTION = 11, TREGION = 12, TBUILDING = 13, TSHIP = 14,
} object_type; } object_type;
extern struct attrib_type at_object; extern struct attrib_type at_object;
extern struct attrib * object_create(const char * name, object_type type, variant value); extern struct attrib * object_create(const char * name, object_type type, variant value);
extern void object_get(const struct attrib * a, object_type * type, variant * value); extern void object_get(const struct attrib * a, object_type * type, variant * value);
extern void object_set(struct attrib * a, object_type type, variant value); extern void object_set(struct attrib * a, object_type type, variant value);
extern const char * object_name(const struct attrib * a); extern const char * object_name(const struct attrib * a);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

View file

@ -1,40 +1,40 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include "orcification.h" #include "orcification.h"
#include <kernel/save.h> #include <kernel/save.h>
#include <util/attrib.h> #include <util/attrib.h>
/* /*
* simple attributes that do not yet have their own file * simple attributes that do not yet have their own file
*/ */
attrib_type at_orcification = { attrib_type at_orcification = {
"orcification", NULL, NULL, NULL, a_writeint, a_readint, ATF_UNIQUE "orcification", NULL, NULL, NULL, a_writeint, a_readint, ATF_UNIQUE
}; };
attrib * attrib *
make_orcification(int orcification) make_orcification(int orcification)
{ {
attrib * a = a_new(&at_orcification); attrib * a = a_new(&at_orcification);
a->data.i = orcification; a->data.i = orcification;
return a; return a;
} }

View file

@ -1,28 +1,28 @@
/* /*
Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de> Copyright (c) 1998-2010, Enno Rehling <enno@eressea.de>
Katja Zedel <katze@felidae.kn-bremen.de Katja Zedel <katze@felidae.kn-bremen.de
Christian Schlittchen <corwin@amber.kn-bremen.de> Christian Schlittchen <corwin@amber.kn-bremen.de>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/ **/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern struct attrib_type at_orcification; extern struct attrib_type at_orcification;
extern struct attrib * make_orcification(int orcification); extern struct attrib * make_orcification(int orcification);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

Some files were not shown because too many files have changed in this diff Show more