chance auf Projektil-Treffer wird von Turmschilden um 30% reduziert.

This commit is contained in:
Enno Rehling 2009-06-03 21:13:12 +00:00
parent 8cdfa37ca4
commit 37fa742bae
5 changed files with 15 additions and 4 deletions

View File

@ -1068,8 +1068,18 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile)
sd = weapon_effskill(dt, at, weapon, false, false);
if (weapon!=NULL) dwtype=weapon->type;
if (armor) ar += armor->prot;
if (shield) ar += shield->prot;
if (armor) {
ar += armor->prot;
if (armor->projectile>0 && chance(armor->projectile)) {
return false;
}
}
if (shield) {
ar += shield->prot;
if (shield->projectile>0 && chance(shield->projectile)) {
return false;
}
}
/* natürliche Rüstung */
an = du->race->armor;

View File

@ -185,6 +185,7 @@ typedef struct armor_type {
double penalty;
double magres;
int prot;
float projectile; /* chance, dass ein projektil abprallt */
unsigned int flags;
} armor_type;

View File

@ -125,7 +125,6 @@ rc_new(const char * zName)
rc->attack[0].type = AT_COMBATSPELL;
rc->attack[1].type = AT_NONE;
rc->speed = 0;
return rc;
}

View File

@ -638,6 +638,7 @@ xml_readarmor(xmlXPathContextPtr xpath, item_type * itype)
if (xml_bvalue(node, "shield", false)) flags |= ATF_SHIELD;
atype = new_armortype(itype, penalty, magres, ac, flags);
atype->projectile = (float)xml_fvalue(node, "projectile", 0.0);
return atype;
}

View File

@ -7,7 +7,7 @@
<modifier function="mod_dwarves_only"/>
<requirement type="iron" quantity="2"/>
</construction>
<armor ac="2" penalty="-0.20" magres="0.0" shield="yes" />
<armor ac="2" projectile="0.30" penalty="-0.10" magres="0.0" shield="yes" />
</item>
</resource>