combat changes. missile defense will now be with skill/2 even for archers

defense against melee will be with skill/2 for archers instead of skill 0
This commit is contained in:
Enno Rehling 2002-10-01 16:35:57 +00:00
parent f524c332aa
commit a185ed80da
3 changed files with 12 additions and 8 deletions

View File

@ -175,6 +175,10 @@ SOURCE=.\viewrange.h
# End Group
# Begin Source File
SOURCE=.\at_movement.c
# End Source File
# Begin Source File
SOURCE=.\attributes.c
# End Source File
# Begin Source File

View File

@ -702,11 +702,7 @@ weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking)
if (attacking) {
skill += wtype->offmod;
} else {
/* Fernkämpfer haben im Nahkampf Talent 0 */
if (fval(wtype, WTF_MISSILE)) skill = 0;
else {
skill += wtype->defmod;
}
skill += wtype->defmod;
}
}
@ -731,7 +727,7 @@ weapon_effskill(troop t, troop enemy, const weapon * w, boolean attacking, boole
if (attacking) {
skill = w->offskill;
} else {
skill = w->defskill;
skill = missile?w->defmissile:w->defskill;
}
if (wtype->modifiers) {
/* Pferdebonus, Lanzenbonus, usw. */
@ -2827,6 +2823,9 @@ make_fighter(battle * b, unit * u, boolean attack)
if (wtype==NULL || itm->number==0) continue;
weapons[w].offskill = weapon_skill(wtype, u, true);
weapons[w].defskill = weapon_skill(wtype, u, false);
weapons[w].defmissile = weapons[w].defskill;
/* Fernkämpfer haben im Nahkampf Talent/2 */
if (fval(wtype, WTF_MISSILE)) weapons[w].defskill/=2;
weapons[w].type = wtype;
weapons[w].used = 0;
weapons[w].count = itm->number;

View File

@ -96,8 +96,9 @@ typedef struct side {
typedef struct weapon {
int count, used;
const struct weapon_type * type;
int offskill;
int defskill;
int offskill : 8; /* offense skill */
int defskill : 8; /* defense against melee attacks */
int defmissile : 8; /* defense against missiles - not div. by 2 yet */
} weapon;
/*** fighter::person::flags ***/