forked from github/server
- Lösungsvorschlag at_bonus
This commit is contained in:
parent
90a21de41b
commit
6e6bb51f27
|
@ -680,10 +680,22 @@ weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking)
|
||||||
if (skill < u->race->df_default) skill = u->race->df_default;
|
if (skill < u->race->df_default) skill = u->race->df_default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (attacking) {
|
||||||
|
skill += u->race->at_bonus;
|
||||||
|
} else {
|
||||||
|
skill += u->race->df_bonus;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* changed: if we own a weapon, we have at least a skill of 0 */
|
/* changed: if we own a weapon, we have at least a skill of 0 */
|
||||||
skill = effskill(u, wtype->skill);
|
skill = effskill(u, wtype->skill);
|
||||||
if (skill < wtype->minskill) skill = 0;
|
if (skill < wtype->minskill) skill = 0;
|
||||||
|
if (skill > 0) {
|
||||||
|
if(attacking) {
|
||||||
|
skill += u->race->at_bonus;
|
||||||
|
} else {
|
||||||
|
skill += u->race->df_bonus;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (attacking) {
|
if (attacking) {
|
||||||
skill += wtype->offmod;
|
skill += wtype->offmod;
|
||||||
} else {
|
} else {
|
||||||
|
@ -694,12 +706,6 @@ weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Rassenbonus auf Kampf */
|
|
||||||
if (attacking) {
|
|
||||||
skill += u->race->at_bonus;
|
|
||||||
} else {
|
|
||||||
skill += u->race->df_bonus;
|
|
||||||
}
|
|
||||||
|
|
||||||
return skill;
|
return skill;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue