remove race.init_familiar funpointer

This commit is contained in:
Enno Rehling 2017-02-20 09:32:03 +01:00
parent 04154628e6
commit 5ba3d76efb
6 changed files with 13 additions and 50 deletions

View File

@ -10,7 +10,6 @@
<race name="lynx" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="20" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="5" walk="yes" teach="no" getitem="yes"> <race name="lynx" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="20" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="5" walk="yes" teach="no" getitem="yes">
<ai splitsize="99999"/> <ai splitsize="99999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -183,7 +182,6 @@
<race name="kraken" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="300" damage="2d10" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" coastal="yes" swim="yes" teach="no" getitem="yes"> <race name="kraken" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="300" damage="2d10" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" coastal="yes" swim="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -210,7 +208,6 @@
</race> </race>
<race name="giantturtle" maxaura="0.000000" regaura="0.000000" weight="1600" capacity="600" speed="1.0" hp="900" ac="7" damage="2d50" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="5" coastal="yes" swim="yes" walk="yes" teach="no" getitem="yes"> <race name="giantturtle" maxaura="0.000000" regaura="0.000000" weight="1600" capacity="600" speed="1.0" hp="900" ac="7" damage="2d50" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="5" coastal="yes" swim="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -232,7 +229,6 @@
</race> </race>
<race name="dolphin" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="24" damage="1d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="5" coastal="yes" swim="yes" teach="no" getitem="yes"> <race name="dolphin" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="24" damage="1d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="5" coastal="yes" swim="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -254,7 +250,6 @@
</race> </race>
<race name="tiger" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="30" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" walk="yes" teach="no" getitem="yes"> <race name="tiger" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="30" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" walk="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -278,7 +273,6 @@
</race> </race>
<race name="hellcat" magres="50" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="40" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes" resistpierce="yes"> <race name="hellcat" magres="50" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="40" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes" resistpierce="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -302,7 +296,6 @@
</race> </race>
<race name="owl" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="9" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="2" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes"> <race name="owl" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="9" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="2" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -325,7 +318,6 @@
</race> </race>
<race name="fairy" magres="80" maxaura="1.0" regaura="1.500000" weight="200" capacity="540" speed="1.0" hp="6" damage="1d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="14" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes"> <race name="fairy" magres="80" maxaura="1.0" regaura="1.500000" weight="200" capacity="540" speed="1.0" hp="6" damage="1d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="14" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="magic" modifier="1"/> <skill name="magic" modifier="1"/>
<skill name="riding" modifier="-1"/> <skill name="riding" modifier="-1"/>
<skill name="melee" modifier="-1"/> <skill name="melee" modifier="-1"/>
@ -352,7 +344,6 @@
</race> </race>
<race name="dreamcat" magres="50" maxaura="1.0" regaura="1.0" weight="500" capacity="540" speed="1.0" hp="10" damage="1d5" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="6" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes"> <race name="dreamcat" magres="50" maxaura="1.0" regaura="1.0" weight="500" capacity="540" speed="1.0" hp="10" damage="1d5" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="6" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="magic" modifier="1"/> <skill name="magic" modifier="1"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -375,7 +366,6 @@
</race> </race>
<race name="imp" magres="50" maxaura="1.0" regaura="1.0" weight="500" capacity="540" speed="1.0" hp="10" ac="1" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes"> <race name="imp" magres="50" maxaura="1.0" regaura="1.0" weight="500" capacity="540" speed="1.0" hp="10" ac="1" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -400,7 +390,6 @@
</race> </race>
<race name="ghost" magres="80" maxaura="0.500000" regaura="0.100000" weight="500" capacity="540" speed="1.0" hp="30" ac="5" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="8" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes" invinciblenonmagic="yes"> <race name="ghost" magres="80" maxaura="0.500000" regaura="0.100000" weight="500" capacity="540" speed="1.0" hp="30" ac="5" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="8" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes" invinciblenonmagic="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -427,7 +416,6 @@
<race name="wolf" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="25" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes"> <race name="wolf" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="25" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="name" value="namegeneric"/> <function name="name" value="namegeneric"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -451,7 +439,6 @@
</race> </race>
<race name="unicorn" magres="90" maxaura="1.500000" regaura="1.500000" weight="5000" capacity="2000" speed="2.000000" hp="40" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes"> <race name="unicorn" magres="90" maxaura="1.500000" regaura="1.500000" weight="5000" capacity="2000" speed="2.000000" hp="40" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -475,7 +462,6 @@
</race> </race>
<race name="nymph" magres="90" maxaura="1.0" regaura="1.500000" weight="1000" capacity="540" speed="1.0" hp="15" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" getitem="yes" equipment="yes"> <race name="nymph" magres="90" maxaura="1.0" regaura="1.500000" weight="1000" capacity="540" speed="1.0" hp="15" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" getitem="yes" equipment="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="2"/> <skill name="bow" modifier="2"/>
<skill name="building" modifier="-99"/> <skill name="building" modifier="-99"/>
@ -498,7 +484,6 @@
</race> </race>
<race name="songdragon" magres="99" maxaura="1.0" regaura="1.0" weight="1000" capacity="600" speed="1.500000" hp="40" ac="1" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" fly="yes" walk="yes" teach="no" getitem="yes"> <race name="songdragon" magres="99" maxaura="1.0" regaura="1.0" weight="1000" capacity="600" speed="1.500000" hp="40" ac="1" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" fly="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -526,7 +511,6 @@
<race name="rat" maxaura="0.000000" regaura="0.000000" weight="100" capacity="540" speed="1.0" hp="10" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" walk="yes" teach="no" getitem="yes"> <race name="rat" maxaura="0.000000" regaura="0.000000" weight="100" capacity="540" speed="1.0" hp="10" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" walk="yes" teach="no" getitem="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -550,7 +534,6 @@
</race> </race>
<race name="eagle" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.500000" hp="15" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="2" fly="yes" walk="yes" teach="no" getitem="yes"> <race name="eagle" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.500000" hp="15" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="2" fly="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -573,7 +556,6 @@
</race> </race>
<race name="tunnelworm" magres="80" maxaura="0.000000" regaura="0.000000" weight="30000" capacity="10000" speed="1.0" hp="300" ac="6" damage="3d20" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="1" scarepeasants="yes" walk="yes" teach="no" getitem="yes"> <race name="tunnelworm" magres="80" maxaura="0.000000" regaura="0.000000" weight="30000" capacity="10000" speed="1.0" hp="300" ac="6" damage="3d20" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="1" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="99999"/> <ai splitsize="99999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="10"/> <skill name="mining" modifier="10"/>
<skill name="bow" modifier="-99"/> <skill name="bow" modifier="-99"/>
@ -597,7 +579,6 @@
<attack type="8" damage="1d10"/> <attack type="8" damage="1d10"/>
</race> </race>
<race name="direwolf" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="20" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" giveperson="yes"> <race name="direwolf" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.0" hp="20" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" giveperson="yes">
<function name="initfamiliar" value="oldfamiliars"/>
<ai splitsize="5000"/> <ai splitsize="5000"/>
<attack type="4" damage="2d4"/> <attack type="4" damage="2d4"/>
</race> </race>

View File

@ -28,7 +28,6 @@
</race> </race>
<race name="kraken" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="300" damage="2d10" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" coastal="yes" swim="yes" teach="no" getitem="yes"> <race name="kraken" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="300" damage="2d10" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" coastal="yes" swim="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="perception" modifier="1"/> <skill name="perception" modifier="1"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
@ -62,7 +61,6 @@
</race> </race>
<race name="giantturtle" maxaura="0.000000" regaura="0.000000" weight="1600" capacity="600" speed="1.000000" hp="900" ac="7" damage="2d50" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="5" coastal="yes" swim="yes" walk="yes" teach="no" getitem="yes"> <race name="giantturtle" maxaura="0.000000" regaura="0.000000" weight="1600" capacity="600" speed="1.000000" hp="900" ac="7" damage="2d50" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="5" coastal="yes" swim="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="perception" modifier="1"/> <skill name="perception" modifier="1"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
@ -91,7 +89,6 @@
</race> </race>
<race name="dolphin" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="24" damage="1d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="5" coastal="yes" swim="yes" teach="no" getitem="yes"> <race name="dolphin" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="2.000000" hp="24" damage="1d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="5" coastal="yes" swim="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -119,7 +116,6 @@
</race> </race>
<race name="tiger" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="30" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" walk="yes" teach="no" getitem="yes"> <race name="tiger" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="30" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" walk="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -149,7 +145,6 @@
</race> </race>
<race name="hellcat" magres="50" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="40" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes" resistpierce="yes"> <race name="hellcat" magres="50" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="40" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes" resistpierce="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="perception" modifier="1"/> <skill name="perception" modifier="1"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
@ -179,7 +174,6 @@
</race> </race>
<race name="owl" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="9" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="2" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes"> <race name="owl" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="9" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="2" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="espionage" modifier="1"/> <skill name="espionage" modifier="1"/>
<skill name="stealth" modifier="1"/> <skill name="stealth" modifier="1"/>
<skill name="perception" modifier="5"/> <skill name="perception" modifier="5"/>
@ -210,7 +204,6 @@
</race> </race>
<race name="fairy" magres="80" maxaura="1.000000" regaura="1.500000" weight="200" capacity="540" speed="1.000000" hp="6" damage="1d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="14" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes"> <race name="fairy" magres="80" maxaura="1.000000" regaura="1.500000" weight="200" capacity="540" speed="1.000000" hp="6" damage="1d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="14" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="stealth" modifier="5"/> <skill name="stealth" modifier="5"/>
<skill name="espionage" modifier="2"/> <skill name="espionage" modifier="2"/>
<skill name="perception" modifier="2"/> <skill name="perception" modifier="2"/>
@ -245,7 +238,6 @@
</race> </race>
<race name="dreamcat" magres="50" maxaura="1.000000" regaura="1.000000" weight="500" capacity="540" speed="1.000000" hp="10" damage="1d5" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="6" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes"> <race name="dreamcat" magres="50" maxaura="1.000000" regaura="1.000000" weight="500" capacity="540" speed="1.000000" hp="10" damage="1d5" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="6" fly="yes" walk="yes" teach="no" getitem="yes" invinciblenonmagic="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="magic" modifier="1"/> <skill name="magic" modifier="1"/>
<skill name="espionage" modifier="1"/> <skill name="espionage" modifier="1"/>
<skill name="stealth" modifier="1"/> <skill name="stealth" modifier="1"/>
@ -276,7 +268,6 @@
</race> </race>
<race name="imp" magres="50" maxaura="1.000000" regaura="1.000000" weight="500" capacity="540" speed="1.000000" hp="10" ac="1" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes"> <race name="imp" magres="50" maxaura="1.000000" regaura="1.000000" weight="500" capacity="540" speed="1.000000" hp="10" ac="1" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="4" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -309,7 +300,6 @@
</race> </race>
<race name="ghost" magres="80" maxaura="0.500000" regaura="0.100000" weight="500" capacity="540" speed="1.000000" hp="30" ac="5" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="8" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes" invinciblenonmagic="yes"> <race name="ghost" magres="80" maxaura="0.500000" regaura="0.100000" weight="500" capacity="540" speed="1.000000" hp="30" ac="5" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="5" defensemodifier="8" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" equipment="yes" invinciblenonmagic="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -341,7 +331,6 @@
<race name="wolf" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="25" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes"> <race name="wolf" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="25" damage="2d6" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="3" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="5000"/> <ai splitsize="5000"/>
<function name="name" value="namegeneric"/> <function name="name" value="namegeneric"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -371,7 +360,6 @@
</race> </race>
<race name="unicorn" magres="90" maxaura="1.500000" regaura="1.500000" weight="5000" capacity="2000" speed="2.000000" hp="40" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes"> <race name="unicorn" magres="90" maxaura="1.500000" regaura="1.500000" weight="5000" capacity="2000" speed="2.000000" hp="40" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="4" walk="yes" teach="no" getitem="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -402,7 +390,6 @@
</race> </race>
<race name="nymph" magres="90" maxaura="1.000000" regaura="1.500000" weight="1000" capacity="540" speed="1.000000" hp="15" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" getitem="yes" equipment="yes"> <race name="nymph" magres="90" maxaura="1.000000" regaura="1.500000" weight="1000" capacity="540" speed="1.000000" hp="15" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" getitem="yes" equipment="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
<skill name="bow" modifier="2"/> <skill name="bow" modifier="2"/>
<skill name="building" modifier="-99"/> <skill name="building" modifier="-99"/>
@ -432,7 +419,6 @@
</race> </race>
<race name="songdragon" magres="99" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="600" speed="1.500000" hp="40" ac="1" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" fly="yes" walk="yes" teach="no" getitem="yes" unarmedguard="yes"> <race name="songdragon" magres="99" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="600" speed="1.500000" hp="40" ac="1" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" fly="yes" walk="yes" teach="no" getitem="yes" unarmedguard="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -464,7 +450,6 @@
</race> </race>
<race name="rat" maxaura="0.000000" regaura="0.000000" weight="100" capacity="540" speed="1.000000" hp="10" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" walk="yes" teach="no" getitem="yes"> <race name="rat" maxaura="0.000000" regaura="0.000000" weight="100" capacity="540" speed="1.000000" hp="10" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" walk="yes" teach="no" getitem="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="espionage" modifier="5"/> <skill name="espionage" modifier="5"/>
<skill name="stealth" modifier="4"/> <skill name="stealth" modifier="4"/>
<skill name="perception" modifier="2"/> <skill name="perception" modifier="2"/>
@ -496,7 +481,6 @@
</race> </race>
<race name="eagle" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.500000" hp="15" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="2" fly="yes" walk="yes" teach="no" getitem="yes"> <race name="eagle" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.500000" hp="15" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="2" fly="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="9999"/> <ai splitsize="9999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -526,7 +510,6 @@
</race> </race>
<race name="tunnelworm" magres="80" maxaura="0.000000" regaura="0.000000" weight="30000" capacity="10000" speed="1.000000" hp="300" ac="6" damage="3d20" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="1" scarepeasants="yes" walk="yes" teach="no" getitem="yes"> <race name="tunnelworm" magres="80" maxaura="0.000000" regaura="0.000000" weight="30000" capacity="10000" speed="1.000000" hp="300" ac="6" damage="3d20" unarmedattack="0" unarmeddefense="0" attackmodifier="6" defensemodifier="1" scarepeasants="yes" walk="yes" teach="no" getitem="yes">
<ai splitsize="99999"/> <ai splitsize="99999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="10"/> <skill name="mining" modifier="10"/>
@ -559,7 +542,6 @@
</race> </race>
<race name="lynx" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="20" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="5" walk="yes" teach="no" getitem="yes"> <race name="lynx" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="20" damage="2d3" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="5" walk="yes" teach="no" getitem="yes">
<ai splitsize="99999"/> <ai splitsize="99999"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="-99"/> <skill name="alchemy" modifier="-99"/>
<skill name="crossbow" modifier="-99"/> <skill name="crossbow" modifier="-99"/>
<skill name="mining" modifier="-99"/> <skill name="mining" modifier="-99"/>
@ -589,7 +571,6 @@
<attack type="4" damage="2d3"/> <attack type="4" damage="2d3"/>
</race> </race>
<race name="direwolf" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="20" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" giveperson="yes"> <race name="direwolf" maxaura="0.000000" regaura="0.000000" weight="500" capacity="540" speed="1.000000" hp="20" damage="2d4" unarmedattack="0" unarmeddefense="0" attackmodifier="3" defensemodifier="1" walk="yes" teach="no" giveperson="yes">
<function name="initfamiliar" value="oldfamiliars"/>
<ai splitsize="5000"/> <ai splitsize="5000"/>
<attack type="4" damage="2d4"/> <attack type="4" damage="2d4"/>
</race> </race>
@ -882,7 +863,6 @@
</race> </race>
<race name="demon" magres="15" maxaura="1.000000" regaura="1.250000" recruitcost="150" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="50" ac="2" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" shapeshift="yes" giveperson="yes" giveunit="yes" getitem="yes" recruitethereal="yes" equipment="yes"> <race name="demon" magres="15" maxaura="1.000000" regaura="1.250000" recruitcost="150" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="50" ac="2" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" shapeshift="yes" giveperson="yes" giveunit="yes" getitem="yes" recruitethereal="yes" equipment="yes">
<ai splitsize="10000" moverandom="yes" learn="yes"/> <ai splitsize="10000" moverandom="yes" learn="yes"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="2"/> <skill name="alchemy" modifier="2"/>
<skill name="trade" modifier="-3"/> <skill name="trade" modifier="-3"/>
<skill name="forestry" modifier="1"/> <skill name="forestry" modifier="1"/>
@ -943,7 +923,6 @@
</race> </race>
<race name="goblin" magres="-0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="40" maintenance="10" weight="600" capacity="440" speed="1.000000" hp="16" damage="1d5" unarmedattack="-2" unarmeddefense="0" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes"> <race name="goblin" magres="-0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="40" maintenance="10" weight="600" capacity="440" speed="1.000000" hp="16" damage="1d5" unarmedattack="-2" unarmeddefense="0" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
<ai splitsize="10000" moverandom="yes" learn="yes"/> <ai splitsize="10000" moverandom="yes" learn="yes"/>
<function name="initfamiliar" value="oldfamiliars"/>
<skill name="alchemy" modifier="1"/> <skill name="alchemy" modifier="1"/>
<skill name="mining" modifier="1"/> <skill name="mining" modifier="1"/>
<skill name="building" modifier="1"/> <skill name="building" modifier="1"/>

View File

@ -226,7 +226,7 @@ race_list *get_familiarraces(void)
if (!init) { if (!init) {
race *rc = races; race *rc = races;
for (; rc != NULL; rc = rc->next) { for (; rc != NULL; rc = rc->next) {
if (rc->init_familiar != NULL) { if (rc->flags & RCF_FAMILIAR) {
racelist_insert(&familiarraces, rc); racelist_insert(&familiarraces, rc);
} }
} }

View File

@ -145,7 +145,6 @@ extern "C" {
race_name_func generate_name; race_name_func generate_name;
void(*age) (struct unit * u); void(*age) (struct unit * u);
void(*init_familiar) (struct unit *);
struct rcoption *options; /* rarely used properties */ struct rcoption *options; /* rarely used properties */
@ -226,6 +225,7 @@ extern "C" {
#define RCF_IRONGOLEM (1<<28) /* race gets irongolem properties */ #define RCF_IRONGOLEM (1<<28) /* race gets irongolem properties */
#define RCF_ATTACK_MOVED (1<<29) /* may attack if it has moved */ #define RCF_ATTACK_MOVED (1<<29) /* may attack if it has moved */
#define RCF_MIGRANTS (1<<30) /* may have migrant units (human bonus) */ #define RCF_MIGRANTS (1<<30) /* may have migrant units (human bonus) */
#define RCF_FAMILIAR (1<<31) /* may be a familiar */
/* Economic flags */ /* Economic flags */
#define ECF_KEEP_ITEM (1<<1) /* gibt Gegenst<73>nde weg */ #define ECF_KEEP_ITEM (1<<1) /* gibt Gegenst<73>nde weg */

View File

@ -1798,9 +1798,6 @@ static int parse_races(xmlDocPtr doc)
else if (strcmp((const char *)propValue, "age") == 0) { else if (strcmp((const char *)propValue, "age") == 0) {
rc->age = (void(*)(struct unit *))fun; rc->age = (void(*)(struct unit *))fun;
} }
else if (strcmp((const char *)propValue, "initfamiliar") == 0) {
rc->init_familiar = (void(*)(struct unit *))fun;
}
else { else {
log_error("unknown function type '%s' for race %s\n", (const char *)propValue, rc->_name); log_error("unknown function type '%s' for race %s\n", (const char *)propValue, rc->_name);
} }
@ -1822,6 +1819,7 @@ static int parse_races(xmlDocPtr doc)
propValue = xmlGetProp(node, BAD_CAST "race"); propValue = xmlGetProp(node, BAD_CAST "race");
assert(propValue != NULL); assert(propValue != NULL);
frc = rc_get_or_create((const char *)propValue); frc = rc_get_or_create((const char *)propValue);
frc->flags |= RCF_FAMILIAR;
if (xml_bvalue(node, "default", false)) { if (xml_bvalue(node, "default", false)) {
rc->familiars[k] = rc->familiars[0]; rc->familiars[k] = rc->familiars[0];
rc->familiars[0] = frc; rc->familiars[0] = frc;

View File

@ -34,10 +34,10 @@
#include <spells/flyingship.h> #include <spells/flyingship.h>
/* kernel includes */ /* kernel includes */
#include <kernel/curse.h>
#include <kernel/connection.h>
#include <kernel/building.h> #include <kernel/building.h>
#include <kernel/curse.h> #include <kernel/curse.h>
#include <kernel/connection.h>
#include <kernel/equipment.h>
#include <kernel/faction.h> #include <kernel/faction.h>
#include <kernel/item.h> #include <kernel/item.h>
#include <kernel/messages.h> #include <kernel/messages.h>
@ -514,11 +514,16 @@ static const race *select_familiar(const race * magerace, magic_t magiegebiet)
static void make_familiar(unit * familiar, unit * mage) static void make_familiar(unit * familiar, unit * mage)
{ {
/* skills and spells: */ /* skills and spells: */
if (u_race(familiar)->init_familiar != NULL) { const struct equipment *eq;
u_race(familiar)->init_familiar(familiar); char eqname[64];
const race * rc = u_race(familiar);
snprintf(eqname, sizeof(eqname), "%s_familiar", rc->_name);
eq = get_equipment(eqname);
if (eq != NULL) {
equip_items(&familiar->items, eq);
} }
else { else {
log_error("could not perform initialization for familiar %s.\n", familiar->faction->race->_name); log_error("could not perform initialization for familiar %s.\n", rc->_name);
} }
/* triggers: */ /* triggers: */