Merge pull request #345 from TurnerSE/bug/#2145

Bug/#2145
This commit is contained in:
Enno Rehling 2015-11-03 13:04:28 +01:00
commit 4052f52472
2 changed files with 6 additions and 9 deletions

View file

@ -1158,14 +1158,6 @@ terminate(troop dt, troop at, int type, const char *damage, bool missile)
/* Momentan nur Trollgürtel und Werwolf-Eigenschaft */
am = select_magicarmor(dt);
#if CHANGED_CROSSBOWS
if (awtype && fval(awtype, WTF_ARMORPIERCING)) {
/* crossbows */
ar /= 2;
an /= 2;
}
#endif
if (rule_armor < 0) {
rule_armor = get_param_int(global.parameters, "rules.combat.nat_armor", 0);
}
@ -1182,6 +1174,12 @@ terminate(troop dt, troop at, int type, const char *damage, bool missile)
/* use the higher value, add half the other value */
ar = (ar > an) ? (ar + an / 2) : (an + ar / 2);
}
if (awtype && fval(awtype, WTF_ARMORPIERCING)) {
/* crossbows */
ar /= 2;
}
ar += am;
if (type != AT_COMBATSPELL && type != AT_SPELL) {

View file

@ -37,6 +37,5 @@
*/
#define MUSEUM_MODULE 1
#define ARENA_MODULE 1
#define CHANGED_CROSSBOWS 0 /* use the WTF_ARMORPIERCING flag */
#undef REGIONOWNERS /* (WIP) region-owner uses HELP_TRAVEL to control entry to region */