1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-07-28 16:32:27 +01:00

Fix edge case healing penalty

XL1 iron-haters could equip one iron item without being itchy, but becoming XL2 would make them itchy
now, XL1 iron-haters will be itchy from one iron item
This commit is contained in:
NeroOneTrueKing 2018-06-05 10:58:46 -07:00
parent 189d2d75b0
commit fe413c9df8

View file

@ -3815,16 +3815,16 @@ u_healing_penalty()
{
int penalty = 0;
if(hates_silver(youracedata)){
penalty += (20*u_material_next_to_skin(SILVER))/2;
penalty += (20*u_material_next_to_skin(SILVER)+1)/2;
}
if(hates_iron(youracedata)){
penalty += (u.ulevel * u_material_next_to_skin(IRON))/2;
penalty += (u.ulevel * u_material_next_to_skin(IRON)+1)/2;
}
if(hates_unholy(youracedata)){
penalty += (9*u_bcu_next_to_skin(-1))/2;
penalty += (9*u_bcu_next_to_skin(-1)+1)/2;
}
if(is_demon(youracedata) || is_undead(youracedata)){
penalty += (4*u_bcu_next_to_skin(1))/2;
penalty += (4*u_bcu_next_to_skin(1)+1)/2;
}
return penalty;
}