forked from github/server
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:
parent
f524c332aa
commit
a185ed80da
|
@ -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
|
||||
|
|
|
@ -702,13 +702,9 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return skill;
|
||||
}
|
||||
|
@ -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;
|
||||
|
|
|
@ -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 ***/
|
||||
|
|
Loading…
Reference in New Issue