forked from github/server
removing the naming confusion between elven horse and unicorn in the source
This commit is contained in:
parent
02fec778b9
commit
a79d40a91f
5 changed files with 33 additions and 33 deletions
|
@ -2920,13 +2920,13 @@ age_building(building * b)
|
|||
int n, unicorns = 0;
|
||||
for (n=0; n!=u->number; ++n) {
|
||||
if (chance(0.02)) {
|
||||
i_change(&u->items, olditemtype[I_UNICORN], 1);
|
||||
i_change(&u->items, olditemtype[I_ELVENHORSE], 1);
|
||||
++unicorns;
|
||||
}
|
||||
if (unicorns) {
|
||||
ADDMSG(&u->faction->msgs, msg_message("scunicorn",
|
||||
"unit amount rtype", u, unicorns,
|
||||
olditemtype[I_UNICORN]->rtype));
|
||||
olditemtype[I_ELVENHORSE]->rtype));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2110,7 +2110,7 @@ fleechance(unit * u)
|
|||
|
||||
c += (eff_skill(u, SK_STEALTH, r) * 0.05);
|
||||
|
||||
if (get_item(u, I_UNICORN) >= u->number && eff_skill(u, SK_RIDING, r) >= 5)
|
||||
if (get_item(u, I_ELVENHORSE) >= u->number && eff_skill(u, SK_RIDING, r) >= 5)
|
||||
c += 0.30;
|
||||
else if (get_item(u, I_HORSE) >= u->number && eff_skill(u, SK_RIDING, r) >= 1)
|
||||
c += 0.10;
|
||||
|
@ -3061,7 +3061,7 @@ make_fighter(battle * b, unit * u, side * s1, boolean attack)
|
|||
fig->elvenhorses = 0;
|
||||
} else {
|
||||
fig->horses = get_item(u, I_HORSE);
|
||||
fig->elvenhorses = get_item(u, I_UNICORN);
|
||||
fig->elvenhorses = get_item(u, I_ELVENHORSE);
|
||||
}
|
||||
|
||||
if (u->race->battle_flags & BF_EQUIPMENT) {
|
||||
|
|
|
@ -267,7 +267,7 @@ enum {
|
|||
I_FEENSTIEFEL,
|
||||
I_BIRTHDAYAMULET,
|
||||
I_PEGASUS,
|
||||
I_UNICORN,
|
||||
I_ELVENHORSE,
|
||||
I_DOLPHIN,
|
||||
I_RING_OF_NIMBLEFINGER,
|
||||
I_TROLLBELT,
|
||||
|
|
|
@ -1097,7 +1097,7 @@ magic_resistance(unit *target)
|
|||
}
|
||||
|
||||
/* Unicorn +10 */
|
||||
n = get_item(target, I_UNICORN);
|
||||
n = get_item(target, I_ELVENHORSE);
|
||||
if (n) probability += n*0.1/target->number;
|
||||
|
||||
/* Auswirkungen von Zaubern auf der Region */
|
||||
|
|
|
@ -398,48 +398,48 @@ canfly(unit *u)
|
|||
boolean
|
||||
canswim(unit *u)
|
||||
{
|
||||
if (get_item(u, I_DOLPHIN) >= u->number && effskill(u, SK_RIDING) >= 4)
|
||||
return true;
|
||||
if (get_item(u, I_DOLPHIN) >= u->number && effskill(u, SK_RIDING) >= 4)
|
||||
return true;
|
||||
|
||||
#ifdef KARMA_MODULE
|
||||
if (fspecial(u->faction, FS_AMPHIBIAN)) return true;
|
||||
if (fspecial(u->faction, FS_AMPHIBIAN)) return true;
|
||||
#endif /* KARMA_MODULE */
|
||||
if (u->race->flags & RCF_FLY) return true;
|
||||
if (u->race->flags & RCF_FLY) return true;
|
||||
|
||||
if (u->race->flags & RCF_SWIM) return true;
|
||||
if (u->race->flags & RCF_SWIM) return true;
|
||||
|
||||
if (get_movement(&u->attribs, MV_FLY)) return true;
|
||||
if (get_movement(&u->attribs, MV_FLY)) return true;
|
||||
|
||||
if (get_movement(&u->attribs, MV_SWIM)) return true;
|
||||
if (get_movement(&u->attribs, MV_SWIM)) return true;
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
static int
|
||||
canride(unit * u)
|
||||
{
|
||||
int pferde, maxpferde, unicorns, maxunicorns;
|
||||
int skill = effskill(u, SK_RIDING);
|
||||
int pferde, maxpferde, unicorns, maxunicorns;
|
||||
int skill = effskill(u, SK_RIDING);
|
||||
|
||||
unicorns = get_item(u, I_UNICORN);
|
||||
pferde = get_item(u, I_HORSE);
|
||||
maxunicorns = (skill/5) * u->number;
|
||||
maxpferde = skill * u->number * 2;
|
||||
unicorns = get_item(u, I_ELVENHORSE);
|
||||
pferde = get_item(u, I_HORSE);
|
||||
maxunicorns = (skill/5) * u->number;
|
||||
maxpferde = skill * u->number * 2;
|
||||
|
||||
if(!(u->race->flags & RCF_HORSE)
|
||||
&& ((pferde == 0 && unicorns == 0)
|
||||
|| pferde > maxpferde || unicorns > maxunicorns)) {
|
||||
return 0;
|
||||
}
|
||||
if(!(u->race->flags & RCF_HORSE)
|
||||
&& ((pferde == 0 && unicorns == 0)
|
||||
|| pferde > maxpferde || unicorns > maxunicorns)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ridingcapacity(u) - eff_weight(u) >= 0) {
|
||||
if(pferde == 0 && unicorns >= u->number && !(u->race->flags & RCF_HORSE)) {
|
||||
return 2;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (ridingcapacity(u) - eff_weight(u) >= 0) {
|
||||
if(pferde == 0 && unicorns >= u->number && !(u->race->flags & RCF_HORSE)) {
|
||||
return 2;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static boolean
|
||||
|
@ -1412,7 +1412,7 @@ travel_route(unit * u, region_list * route_begin, region_list * route_end, order
|
|||
|
||||
if (fval(current->terrain, SEA_REGION) || fval(next->terrain, SEA_REGION)) {
|
||||
/* trying to enter or exit ocean with horses, are we? */
|
||||
if (get_item(u, I_HORSE) > 0 || get_item(u, I_UNICORN) > 0) {
|
||||
if (get_item(u, I_HORSE) > 0 || get_item(u, I_ELVENHORSE) > 0) {
|
||||
/* tries to do it with horses */
|
||||
if (ord!=NULL) cmistake(u, ord, 67, MSG_MOVE);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue