H206 - passive fire damage affecting weapons (trunk only)
<email deleted> reported back on 8/31/06 that elven weapons were not affected when he poked a fire elemental with them. This is true, but moreover, there was no code to have passive fire to affect attackers. Now erode_obj() supports all the same damage types as rust_dmg(), and added the connecting code to allow passive fire attacks do something. There probably should be macros for the damage types used by rust_dmg and erode_obj, and possibly these functions should be combined, but they are slightly different and dealing with that requires more thought.
This commit is contained in:
@@ -3321,7 +3321,7 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */
|
||||
break;
|
||||
}
|
||||
tmp = d(nd,6);
|
||||
if (!rn2(6)) (void) erode_obj(MON_WEP(mon), TRUE, TRUE, FALSE);
|
||||
if (!rn2(6)) (void) erode_obj(MON_WEP(mon), 3, TRUE, FALSE);
|
||||
if (!rn2(6)) erode_armor(mon, TRUE);
|
||||
break;
|
||||
}
|
||||
@@ -3451,9 +3451,9 @@ xchar sx, sy;
|
||||
}
|
||||
/* using two weapons at once makes both of them more vulnerable */
|
||||
if (!rn2(u.twoweap ? 3 : 6))
|
||||
(void) erode_obj(uwep, TRUE, TRUE, FALSE);
|
||||
(void) erode_obj(uwep, 3, TRUE, FALSE);
|
||||
if (u.twoweap && !rn2(3))
|
||||
(void) erode_obj(uswapwep, TRUE, TRUE, FALSE);
|
||||
(void) erode_obj(uswapwep, 3, TRUE, FALSE);
|
||||
if (!rn2(6)) erode_armor(&youmonst, TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user