From 6e6bb51f27a99247312645e10937ee9d5f3083e1 Mon Sep 17 00:00:00 2001 From: Christian Schlittchen Date: Sun, 14 Apr 2002 09:53:26 +0000 Subject: [PATCH] =?UTF-8?q?-=20L=C3=B6sungsvorschlag=20at=5Fbonus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/kernel/battle.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index fdd625d82..af1290f31 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -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 (attacking) { + skill += u->race->at_bonus; + } else { + skill += u->race->df_bonus; + } } else { /* changed: if we own a weapon, we have at least a skill of 0 */ skill = effskill(u, wtype->skill); if (skill < wtype->minskill) skill = 0; + if (skill > 0) { + if(attacking) { + skill += u->race->at_bonus; + } else { + skill += u->race->df_bonus; + } + } if (attacking) { skill += wtype->offmod; } 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; }