inappropriate polyself spit attacks
Submitted by <Someone> 12/3/05. player poly'd as guardian naga produced a different attack than a real guardian naga. The fix causes an algorithm similar to that used in spitmnu to be used in dospit.
This commit is contained in:
@@ -117,6 +117,7 @@ don't see objects or read engraving when hero changes location (random
|
|||||||
teleport) or position (levitation timeout) while asleep or fainted
|
teleport) or position (levitation timeout) while asleep or fainted
|
||||||
polymorphed spellbooks may turn blank or be too faint to read
|
polymorphed spellbooks may turn blank or be too faint to read
|
||||||
avoid inappropriate message when using a cursed lamp while blind
|
avoid inappropriate message when using a cursed lamp while blind
|
||||||
|
player polymorphed as a guardian naga spit the wrong kind of venom
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+20
-4
@@ -788,12 +788,28 @@ int
|
|||||||
dospit()
|
dospit()
|
||||||
{
|
{
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
|
struct attack *mattk;
|
||||||
|
|
||||||
if (!getdir((char *)0)) return(0);
|
if (!getdir((char *)0)) return(0);
|
||||||
otmp = mksobj(u.umonnum==PM_COBRA ? BLINDING_VENOM : ACID_VENOM,
|
mattk = attacktype_fordmg(youmonst.data, AT_SPIT, AD_ANY);
|
||||||
TRUE, FALSE);
|
if (!mattk) {
|
||||||
otmp->spe = 1; /* to indicate it's yours */
|
impossible("bad spit attack?");
|
||||||
throwit(otmp, 0L, FALSE);
|
} else {
|
||||||
|
switch (mattk->adtyp) {
|
||||||
|
case AD_BLND:
|
||||||
|
case AD_DRST:
|
||||||
|
otmp = mksobj(BLINDING_VENOM, TRUE, FALSE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
impossible("bad attack type in dospit");
|
||||||
|
/* fall through */
|
||||||
|
case AD_ACID:
|
||||||
|
otmp = mksobj(ACID_VENOM, TRUE, FALSE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
otmp->spe = 1; /* to indicate it's yours */
|
||||||
|
throwit(otmp, 0L, FALSE);
|
||||||
|
}
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user