forked from github/server
Der server mag es nicht, wenn Rassen ein space im internal name haben, weil
trigger den rassennamen ohne "" schreiben. also operiere ich die mal raus, spaces soll man da auch nicht haben.
This commit is contained in:
parent
923ea5bcf8
commit
b252b00163
|
@ -85,6 +85,10 @@ rc_new(const char * zName)
|
||||||
{
|
{
|
||||||
char zBuffer[80];
|
char zBuffer[80];
|
||||||
race * rc = calloc(sizeof(race), 1);
|
race * rc = calloc(sizeof(race), 1);
|
||||||
|
if (strchr(zName, ' ')!=NULL) {
|
||||||
|
log_error(("race '%s' has an invalid name. remove spaces\n", zName));
|
||||||
|
assert(strchr(zName, ' ')==NULL);
|
||||||
|
}
|
||||||
strcpy(zBuffer, zName);
|
strcpy(zBuffer, zName);
|
||||||
rc->_name[0] = strdup(zBuffer);
|
rc->_name[0] = strdup(zBuffer);
|
||||||
sprintf(zBuffer, "%s_p", zName);
|
sprintf(zBuffer, "%s_p", zName);
|
||||||
|
|
|
@ -1063,8 +1063,17 @@ readunit(FILE * F)
|
||||||
u->race = new_race[(race_t)ri(F)];
|
u->race = new_race[(race_t)ri(F)];
|
||||||
u->irace = new_race[(race_t)ri(F)];
|
u->irace = new_race[(race_t)ri(F)];
|
||||||
} else {
|
} else {
|
||||||
|
char * space;
|
||||||
|
|
||||||
rs(F, buf);
|
rs(F, buf);
|
||||||
if (strcmp(buf, "giant turtle")==0) strcpy(buf, "giantturtle");
|
space = strchr(buf, ' ');
|
||||||
|
while (space!=NULL) {
|
||||||
|
strcpy(space, space+1);
|
||||||
|
space=strchr(space, ' ');
|
||||||
|
}
|
||||||
|
/* if (strcmp(buf, "giant turtle")==0) strcpy(buf, "giantturtle");
|
||||||
|
if (strcmp(buf, "young dragon")==0) strcpy(buf, "youngdragon");
|
||||||
|
if (strcmp(buf, "young dragon")==0) strcpy(buf, "youngdragon"); */
|
||||||
u->race = rc_find(buf);
|
u->race = rc_find(buf);
|
||||||
assert(u->race);
|
assert(u->race);
|
||||||
rs(F, buf);
|
rs(F, buf);
|
||||||
|
|
|
@ -2521,19 +2521,19 @@
|
||||||
<text locale="en">zombie</text>
|
<text locale="en">zombie</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="skeleton lord">
|
<string name="skeletonlord">
|
||||||
<text locale="de">Skelettherr</text>
|
<text locale="de">Skelettherr</text>
|
||||||
<text locale="en">skeleton lord</text>
|
<text locale="en">skeleton lord</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="skeleton lord_p">
|
<string name="skeletonlord_p">
|
||||||
<text locale="de">Skelettherren</text>
|
<text locale="de">Skelettherren</text>
|
||||||
<text locale="en">skeleton lords</text>
|
<text locale="en">skeleton lords</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="skeleton lord_d">
|
<string name="skeletonlord_d">
|
||||||
<text locale="de">Skelettherren</text>
|
<text locale="de">Skelettherren</text>
|
||||||
<text locale="en">skeleton lords</text>
|
<text locale="en">skeleton lords</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="skeleton lord_x">
|
<string name="skeletonlord_x">
|
||||||
<text locale="de">Skelettherren</text>
|
<text locale="de">Skelettherren</text>
|
||||||
<text locale="en">skeleton lord</text>
|
<text locale="en">skeleton lord</text>
|
||||||
</string>
|
</string>
|
||||||
|
@ -2572,36 +2572,36 @@
|
||||||
<text locale="en">centaur</text>
|
<text locale="en">centaur</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="shadow knight">
|
<string name="shadowknight">
|
||||||
<text locale="de">Schattenritter</text>
|
<text locale="de">Schattenritter</text>
|
||||||
<text locale="en">shadow knight</text>
|
<text locale="en">shadow knight</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="shadow knight_p">
|
<string name="shadowknight_p">
|
||||||
<text locale="de">Schattenritter</text>
|
<text locale="de">Schattenritter</text>
|
||||||
<text locale="en">shadow knight</text>
|
<text locale="en">shadow knight</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="shadow knight_d">
|
<string name="shadowknight_d">
|
||||||
<text locale="de">Schattenrittern</text>
|
<text locale="de">Schattenrittern</text>
|
||||||
<text locale="en">shadow knights</text>
|
<text locale="en">shadow knights</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="shadow knight_x">
|
<string name="shadowknight_x">
|
||||||
<text locale="de">Schattenritter</text>
|
<text locale="de">Schattenritter</text>
|
||||||
<text locale="en">shadow knight</text>
|
<text locale="en">shadow knight</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="sea serpent">
|
<string name="seaserpent">
|
||||||
<text locale="de">Seeschlange</text>
|
<text locale="de">Seeschlange</text>
|
||||||
<text locale="en">sea serpent</text>
|
<text locale="en">sea serpent</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="sea serpent_p">
|
<string name="seaserpent_p">
|
||||||
<text locale="de">Seeschlangen</text>
|
<text locale="de">Seeschlangen</text>
|
||||||
<text locale="en">sea serpents</text>
|
<text locale="en">sea serpents</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="sea serpent_d">
|
<string name="seaserpent_d">
|
||||||
<text locale="de">Seeschlangen</text>
|
<text locale="de">Seeschlangen</text>
|
||||||
<text locale="en">sea serpents</text>
|
<text locale="en">sea serpents</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="sea serpent_x">
|
<string name="seaserpent_x">
|
||||||
<text locale="de">Seeschlangen</text>
|
<text locale="de">Seeschlangen</text>
|
||||||
<text locale="en">sea serpent</text>
|
<text locale="en">sea serpent</text>
|
||||||
</string>
|
</string>
|
||||||
|
@ -3048,19 +3048,19 @@
|
||||||
<text locale="en">shadowdemon</text>
|
<text locale="en">shadowdemon</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="stone golem">
|
<string name="stonegolem">
|
||||||
<text locale="de">Steingolem</text>
|
<text locale="de">Steingolem</text>
|
||||||
<text locale="en">stone golem</text>
|
<text locale="en">stone golem</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="stone golem_p">
|
<string name="stonegolem_p">
|
||||||
<text locale="de">Steingolems</text>
|
<text locale="de">Steingolems</text>
|
||||||
<text locale="en">stone golems</text>
|
<text locale="en">stone golems</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="stone golem_d">
|
<string name="stonegolem_d">
|
||||||
<text locale="de">Steingolems</text>
|
<text locale="de">Steingolems</text>
|
||||||
<text locale="en">stone golems</text>
|
<text locale="en">stone golems</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="stone golem_x">
|
<string name="stonegolem_x">
|
||||||
<text locale="de">Steingolem</text>
|
<text locale="de">Steingolem</text>
|
||||||
<text locale="en">stone golem</text>
|
<text locale="en">stone golem</text>
|
||||||
</string>
|
</string>
|
||||||
|
@ -3269,19 +3269,19 @@
|
||||||
<text locale="en">dragon</text>
|
<text locale="en">dragon</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="young dragon">
|
<string name="youngdragon">
|
||||||
<text locale="de">Jungdrache</text>
|
<text locale="de">Jungdrache</text>
|
||||||
<text locale="en">young dragon</text>
|
<text locale="en">young dragon</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="young dragon_p">
|
<string name="youngdragon_p">
|
||||||
<text locale="de">Jungdrachen</text>
|
<text locale="de">Jungdrachen</text>
|
||||||
<text locale="en">young dragons</text>
|
<text locale="en">young dragons</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="young dragon_d">
|
<string name="youngdragon_d">
|
||||||
<text locale="de">Jungdrachen</text>
|
<text locale="de">Jungdrachen</text>
|
||||||
<text locale="en">young dragons</text>
|
<text locale="en">young dragons</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="young dragon_x">
|
<string name="youngdragon_x">
|
||||||
<text locale="de">Jungdrachen</text>
|
<text locale="de">Jungdrachen</text>
|
||||||
<text locale="en">young dragon</text>
|
<text locale="en">young dragon</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
|
@ -628,7 +628,7 @@
|
||||||
<attack type="4" damage="2d3"/>
|
<attack type="4" damage="2d3"/>
|
||||||
<attack type="3" damage="1d1"/>
|
<attack type="3" damage="1d1"/>
|
||||||
</race>
|
</race>
|
||||||
<race name="stone golem" magres="0.250000" maxaura="1.000000" regaura="0.100000" recruitcost="5000" weight="10000" capacity="2000" speed="1.000000" hp="60" ac="4" damage="2d12+6" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="2" walk="yes" nolearn="yes" teach="no" giveitem="yes">
|
<race name="stonegolem" magres="0.250000" maxaura="1.000000" regaura="0.100000" recruitcost="5000" weight="10000" capacity="2000" speed="1.000000" hp="60" ac="4" damage="2d12+6" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="2" walk="yes" nolearn="yes" teach="no" giveitem="yes">
|
||||||
<ai splitsize="50"/>
|
<ai splitsize="50"/>
|
||||||
<skill name="sk_building" modifier="14"/>
|
<skill name="sk_building" modifier="14"/>
|
||||||
<skill name="sk_roadwork" modifier="14"/>
|
<skill name="sk_roadwork" modifier="14"/>
|
||||||
|
@ -695,7 +695,7 @@
|
||||||
<attack type="4" damage="3d30"/>
|
<attack type="4" damage="3d30"/>
|
||||||
<attack type="6" spell="82"/>
|
<attack type="6" spell="82"/>
|
||||||
</race>
|
</race>
|
||||||
<race name="young dragon" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="10000" weight="20000" capacity="10000" speed="1.000000" hp="300" ac="4" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
|
<race name="youngdragon" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="10000" weight="20000" capacity="10000" speed="1.000000" hp="300" ac="4" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
|
||||||
<ai splitsize="6" killpeasants="yes" learn="yes"/>
|
<ai splitsize="6" killpeasants="yes" learn="yes"/>
|
||||||
<function name="name" value="namedragon"/>
|
<function name="name" value="namedragon"/>
|
||||||
<function name="age" value="agefiredragon"/>
|
<function name="age" value="agefiredragon"/>
|
||||||
|
@ -1060,7 +1060,7 @@
|
||||||
<skill name="sk_unarmed" modifier="1"/>
|
<skill name="sk_unarmed" modifier="1"/>
|
||||||
<attack type="1" damage="1d7"/>
|
<attack type="1" damage="1d7"/>
|
||||||
</race>
|
</race>
|
||||||
<race name="skeleton lord" magres="0.300000" maxaura="1.000000" regaura="1.000000" recruitcost="2" weight="1000" capacity="540" speed="1.000000" hp="60" ac="4" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants="yes" walk="yes" nolearn="yes" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes" resistcut="yes" resistpierce="yes" nogive="yes">
|
<race name="skeletonlord" magres="0.300000" maxaura="1.000000" regaura="1.000000" recruitcost="2" weight="1000" capacity="540" speed="1.000000" hp="60" ac="4" damage="1d7" unarmedattack="6" unarmeddefense="6" attackmodifier="8" defensemodifier="8" scarepeasants="yes" walk="yes" nolearn="yes" teach="no" absorbpeasants="yes" noheal="yes" undead="yes" equipment="yes" resistcut="yes" resistpierce="yes" nogive="yes">
|
||||||
<ai splitsize="2000" aggression="0.02" killpeasants="yes" moverandom="yes"/>
|
<ai splitsize="2000" aggression="0.02" killpeasants="yes" moverandom="yes"/>
|
||||||
<function name="name" value="nameskeleton"/>
|
<function name="name" value="nameskeleton"/>
|
||||||
<skill name="sk_crossbow" modifier="1"/>
|
<skill name="sk_crossbow" modifier="1"/>
|
||||||
|
@ -1118,11 +1118,11 @@
|
||||||
<familiar race="nymph"/>
|
<familiar race="nymph"/>
|
||||||
<familiar race="imp"/>
|
<familiar race="imp"/>
|
||||||
</race>
|
</race>
|
||||||
<race name="shadow knight" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="5" weight="1000" capacity="540" speed="1.000000" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" nogive="yes" walk="yes" nolearn="yes" teach="no" noblock="yes">
|
<race name="shadowknight" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="5" weight="1000" capacity="540" speed="1.000000" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" nogive="yes" walk="yes" nolearn="yes" teach="no" noblock="yes">
|
||||||
<ai splitsize="20000" moverandom="yes"/>
|
<ai splitsize="20000" moverandom="yes"/>
|
||||||
<attack type="1" damage="1d1"/>
|
<attack type="1" damage="1d1"/>
|
||||||
</race>
|
</race>
|
||||||
<race name="sea serpent" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="5000" weight="20000" capacity="5000" speed="1.000000" hp="600" ac="3" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" swim="yes" teach="no" getitem="yes" resistbash="yes">
|
<race name="seaserpent" magres="0.500000" maxaura="1.000000" regaura="1.000000" recruitcost="5000" weight="20000" capacity="5000" speed="1.000000" hp="600" ac="3" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" swim="yes" teach="no" getitem="yes" resistbash="yes">
|
||||||
<ai splitsize="6" killpeasants="yes" moverandom="yes" learn="yes"/>
|
<ai splitsize="6" killpeasants="yes" moverandom="yes" learn="yes"/>
|
||||||
<function name="name" value="namedragon"/>
|
<function name="name" value="namedragon"/>
|
||||||
<function name="move" value="moveswimming"/>
|
<function name="move" value="moveswimming"/>
|
||||||
|
|
Loading…
Reference in New Issue