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
|
# End Group
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\at_movement.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\attributes.c
|
SOURCE=.\attributes.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
|
@ -702,13 +702,9 @@ weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking)
|
||||||
if (attacking) {
|
if (attacking) {
|
||||||
skill += wtype->offmod;
|
skill += wtype->offmod;
|
||||||
} else {
|
} else {
|
||||||
/* Fernkämpfer haben im Nahkampf Talent 0 */
|
|
||||||
if (fval(wtype, WTF_MISSILE)) skill = 0;
|
|
||||||
else {
|
|
||||||
skill += wtype->defmod;
|
skill += wtype->defmod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return skill;
|
return skill;
|
||||||
}
|
}
|
||||||
|
@ -731,7 +727,7 @@ weapon_effskill(troop t, troop enemy, const weapon * w, boolean attacking, boole
|
||||||
if (attacking) {
|
if (attacking) {
|
||||||
skill = w->offskill;
|
skill = w->offskill;
|
||||||
} else {
|
} else {
|
||||||
skill = w->defskill;
|
skill = missile?w->defmissile:w->defskill;
|
||||||
}
|
}
|
||||||
if (wtype->modifiers) {
|
if (wtype->modifiers) {
|
||||||
/* Pferdebonus, Lanzenbonus, usw. */
|
/* Pferdebonus, Lanzenbonus, usw. */
|
||||||
|
@ -2827,6 +2823,9 @@ make_fighter(battle * b, unit * u, boolean attack)
|
||||||
if (wtype==NULL || itm->number==0) continue;
|
if (wtype==NULL || itm->number==0) continue;
|
||||||
weapons[w].offskill = weapon_skill(wtype, u, true);
|
weapons[w].offskill = weapon_skill(wtype, u, true);
|
||||||
weapons[w].defskill = weapon_skill(wtype, u, false);
|
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].type = wtype;
|
||||||
weapons[w].used = 0;
|
weapons[w].used = 0;
|
||||||
weapons[w].count = itm->number;
|
weapons[w].count = itm->number;
|
||||||
|
|
|
@ -96,8 +96,9 @@ typedef struct side {
|
||||||
typedef struct weapon {
|
typedef struct weapon {
|
||||||
int count, used;
|
int count, used;
|
||||||
const struct weapon_type * type;
|
const struct weapon_type * type;
|
||||||
int offskill;
|
int offskill : 8; /* offense skill */
|
||||||
int defskill;
|
int defskill : 8; /* defense against melee attacks */
|
||||||
|
int defmissile : 8; /* defense against missiles - not div. by 2 yet */
|
||||||
} weapon;
|
} weapon;
|
||||||
|
|
||||||
/*** fighter::person::flags ***/
|
/*** fighter::person::flags ***/
|
||||||
|
|
Loading…
Reference in New Issue