forked from github/server
chance auf Projektil-Treffer wird von Turmschilden um 30% reduziert.
This commit is contained in:
parent
8cdfa37ca4
commit
37fa742bae
5 changed files with 15 additions and 4 deletions
|
@ -1068,8 +1068,18 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile)
|
||||||
sd = weapon_effskill(dt, at, weapon, false, false);
|
sd = weapon_effskill(dt, at, weapon, false, false);
|
||||||
if (weapon!=NULL) dwtype=weapon->type;
|
if (weapon!=NULL) dwtype=weapon->type;
|
||||||
|
|
||||||
if (armor) ar += armor->prot;
|
if (armor) {
|
||||||
if (shield) ar += shield->prot;
|
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 */
|
/* natürliche Rüstung */
|
||||||
an = du->race->armor;
|
an = du->race->armor;
|
||||||
|
|
|
@ -185,6 +185,7 @@ typedef struct armor_type {
|
||||||
double penalty;
|
double penalty;
|
||||||
double magres;
|
double magres;
|
||||||
int prot;
|
int prot;
|
||||||
|
float projectile; /* chance, dass ein projektil abprallt */
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
} armor_type;
|
} armor_type;
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,6 @@ rc_new(const char * zName)
|
||||||
|
|
||||||
rc->attack[0].type = AT_COMBATSPELL;
|
rc->attack[0].type = AT_COMBATSPELL;
|
||||||
rc->attack[1].type = AT_NONE;
|
rc->attack[1].type = AT_NONE;
|
||||||
rc->speed = 0;
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -638,6 +638,7 @@ xml_readarmor(xmlXPathContextPtr xpath, item_type * itype)
|
||||||
if (xml_bvalue(node, "shield", false)) flags |= ATF_SHIELD;
|
if (xml_bvalue(node, "shield", false)) flags |= ATF_SHIELD;
|
||||||
|
|
||||||
atype = new_armortype(itype, penalty, magres, ac, flags);
|
atype = new_armortype(itype, penalty, magres, ac, flags);
|
||||||
|
atype->projectile = (float)xml_fvalue(node, "projectile", 0.0);
|
||||||
return atype;
|
return atype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<modifier function="mod_dwarves_only"/>
|
<modifier function="mod_dwarves_only"/>
|
||||||
<requirement type="iron" quantity="2"/>
|
<requirement type="iron" quantity="2"/>
|
||||||
</construction>
|
</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>
|
</item>
|
||||||
</resource>
|
</resource>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue