mark all three major dragon types as RCF_DRAGON.

use RCF_DRGON flag to detemine BP_DRAGON speed.
This commit is contained in:
Enno Rehling 2016-09-19 15:53:31 +02:00
parent b958fa1c2e
commit 6ec99af4d6
5 changed files with 9 additions and 10 deletions

View File

@ -742,7 +742,7 @@
<attack type="4" damage="5d30"/>
<attack type="6" spell="powerful_dragonbreath" level="12" />
</race>
<race name="dragon" magres="0.700000" maxaura="1.000000" regaura="2.000000" recruitcost="50000" weight="10000" capacity="1000000" speed="1.500000" hp="900" ac="6" damage="2d30" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes">
<race name="dragon" magres="0.700000" maxaura="1.000000" regaura="2.000000" recruitcost="50000" weight="10000" capacity="1000000" speed="1.500000" hp="900" ac="6" damage="2d30" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" unarmedguard="yes" dragon="yes">
<ai splitsize="2" killpeasants="yes" learn="yes"/>
<function name="name" value="namedragon"/>
<function name="age" value="agedragon"/>

View File

@ -1,5 +1,5 @@
<race name="dragon" magres="0.700000" maxaura="1.0" regaura="2.000000" weight="10000" capacity="1000000" speed="1.500000" hp="900" ac=
"6" damage="2d30" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
"6" damage="2d30" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" dragon="yes">
<ai splitsize="2" killpeasants="yes" learn="yes"/>
<function name="name" value="namedragon"/>
<function name="age" value="agedragon"/>

View File

@ -1,4 +1,4 @@
<race name="wyrm" magres="0.900000" maxaura="1.0" regaura="3.000000" weight="18000" capacity="1000000" speed="1.0" hp="2700" ac="8" damage="2d60" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="10" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes">
<race name="wyrm" magres="0.900000" maxaura="1.0" regaura="3.000000" weight="18000" capacity="1000000" speed="1.0" hp="2700" ac="8" damage="2d60" unarmedattack="0" unarmeddefense="0" attackmodifier="10" defensemodifier="10" scarepeasants="yes" fly="yes" walk="yes" teach="no" getitem="yes" resistbash="yes" dragon="yes">
<ai splitsize="1" killpeasants="yes" learn="yes"/>
<function name="name" value="namedragon"/>
<function name="move" value="movedragon"/>

View File

@ -1,4 +1,4 @@
<race name="youngdragon" magres="0.500000" maxaura="1.0" regaura="1.0" weight="8000" capacity="10000" speed="1.0" 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.0" regaura="1.0" weight="8000" capacity="10000" speed="1.0" 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" dragon="yes">
<ai splitsize="6" killpeasants="yes" learn="yes"/>
<function name="name" value="namedragon"/>
<function name="age" value="agefiredragon"/>

View File

@ -1465,15 +1465,14 @@ static void make_route(unit * u, order * ord, region_list ** routep)
static int movement_speed(unit * u)
{
int mp = BP_WALKING;
double dk = u_race(u)->speed;
const race *rc = u_race(u);
double dk = rc->speed;
assert(u->number);
/* dragons have a fixed speed, and no other effects work on them: */
switch (old_race(u_race(u))) {
case RC_DRAGON:
case RC_WYRM:
case RC_FIREDRAGON:
if (fval(rc, RCF_DRAGON)) {
return BP_DRAGON;
}
switch (old_race(u_race(u))) {
case RC_BIRTHDAYDRAGON:
case RC_SONGDRAGON:
mp = BP_DRAGON;