more breaking wands (trunk only)
If breaking a wand of polymorph uses up any floor objects, give a "you feel shuddering vibrations" message like happens when zapping.
This commit is contained in:
@@ -288,6 +288,7 @@ wearing or removing an amulet of restful sleep clobbered permanent sleepiness
|
|||||||
if attempt to select a co-aligned artifact for first divine gift fails because
|
if attempt to select a co-aligned artifact for first divine gift fails because
|
||||||
none is available, choose one from among nonaligned artifacts
|
none is available, choose one from among nonaligned artifacts
|
||||||
if breaking a wand of polymorph causes hero to drop items, don't transform them
|
if breaking a wand of polymorph causes hero to drop items, don't transform them
|
||||||
|
give "shuddering vibrations" feedback if breaking a poly wand uses up items
|
||||||
if polymorph causes a monster to drop items, they won't be used up via
|
if polymorph causes a monster to drop items, they won't be used up via
|
||||||
shuddering vibrations or as golem creation fodder
|
shuddering vibrations or as golem creation fodder
|
||||||
|
|
||||||
|
|||||||
@@ -2651,6 +2651,8 @@ E int FDECL(zapyourself, (struct obj *,BOOLEAN_P));
|
|||||||
E void FDECL(ubreatheu, (struct attack *));
|
E void FDECL(ubreatheu, (struct attack *));
|
||||||
E boolean FDECL(cancel_monst, (struct monst *,struct obj *,
|
E boolean FDECL(cancel_monst, (struct monst *,struct obj *,
|
||||||
BOOLEAN_P,BOOLEAN_P,BOOLEAN_P));
|
BOOLEAN_P,BOOLEAN_P,BOOLEAN_P));
|
||||||
|
E void NDECL(zapsetup);
|
||||||
|
E void NDECL(zapwrapup);
|
||||||
E void FDECL(weffects, (struct obj *));
|
E void FDECL(weffects, (struct obj *));
|
||||||
E int NDECL(spell_damage_bonus);
|
E int NDECL(spell_damage_bonus);
|
||||||
E const char *FDECL(exclam, (int force));
|
E const char *FDECL(exclam, (int force));
|
||||||
|
|||||||
@@ -2908,6 +2908,9 @@ do_break_wand(obj)
|
|||||||
surrounding targets (or underlying objects) got affected yet.] */
|
surrounding targets (or underlying objects) got affected yet.] */
|
||||||
explode(obj->ox, obj->oy, -(obj->otyp), rnd(dmg), WAND_CLASS, EXPL_MAGICAL);
|
explode(obj->ox, obj->oy, -(obj->otyp), rnd(dmg), WAND_CLASS, EXPL_MAGICAL);
|
||||||
|
|
||||||
|
/* prepare for potential feedback from polymorph... */
|
||||||
|
zapsetup();
|
||||||
|
|
||||||
/* this makes it hit us last, so that we can see the action first */
|
/* this makes it hit us last, so that we can see the action first */
|
||||||
for (i = 0; i <= 8; i++) {
|
for (i = 0; i <= 8; i++) {
|
||||||
bhitpos.x = x = obj->ox + xdir[i];
|
bhitpos.x = x = obj->ox + xdir[i];
|
||||||
@@ -2990,6 +2993,9 @@ do_break_wand(obj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* potentially give post zap/break feedback */
|
||||||
|
zapwrapup();
|
||||||
|
|
||||||
/* Note: if player fell thru, this call is a no-op.
|
/* Note: if player fell thru, this call is a no-op.
|
||||||
Damage is handled in digactualhole in that case */
|
Damage is handled in digactualhole in that case */
|
||||||
if (shop_damage) pay_for_damage("dig into", FALSE);
|
if (shop_damage) pay_for_damage("dig into", FALSE);
|
||||||
|
|||||||
@@ -2702,6 +2702,22 @@ struct obj *obj; /* wand or spell */
|
|||||||
return disclose;
|
return disclose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* used by do_break_wand() was well as by weffects() */
|
||||||
|
void
|
||||||
|
zapsetup()
|
||||||
|
{
|
||||||
|
obj_zapped = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
zapwrapup()
|
||||||
|
{
|
||||||
|
/* if do_osshock() set obj_zapped while polying, give a message now */
|
||||||
|
if (obj_zapped)
|
||||||
|
You_feel("shuddering vibrations.");
|
||||||
|
obj_zapped = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* called for various wand and spell effects - M. Stephenson */
|
/* called for various wand and spell effects - M. Stephenson */
|
||||||
void
|
void
|
||||||
weffects(obj)
|
weffects(obj)
|
||||||
@@ -2718,8 +2734,7 @@ struct obj *obj;
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (objects[otyp].oc_dir == IMMEDIATE) {
|
if (objects[otyp].oc_dir == IMMEDIATE) {
|
||||||
obj_zapped = FALSE;
|
zapsetup(); /* reset obj_zapped */
|
||||||
|
|
||||||
if (u.uswallow) {
|
if (u.uswallow) {
|
||||||
(void) bhitm(u.ustuck, obj);
|
(void) bhitm(u.ustuck, obj);
|
||||||
/* [how about `bhitpile(u.ustuck->minvent)' effect?] */
|
/* [how about `bhitpile(u.ustuck->minvent)' effect?] */
|
||||||
@@ -2728,9 +2743,7 @@ struct obj *obj;
|
|||||||
} else {
|
} else {
|
||||||
(void) bhit(u.dx,u.dy, rn1(8,6),ZAPPED_WAND, bhitm,bhito, &obj);
|
(void) bhit(u.dx,u.dy, rn1(8,6),ZAPPED_WAND, bhitm,bhito, &obj);
|
||||||
}
|
}
|
||||||
/* give a clue if obj_zapped */
|
zapwrapup(); /* give feedback for obj_zapped */
|
||||||
if (obj_zapped)
|
|
||||||
You_feel("shuddering vibrations.");
|
|
||||||
|
|
||||||
} else if (objects[otyp].oc_dir == NODIR) {
|
} else if (objects[otyp].oc_dir == NODIR) {
|
||||||
zapnodir(obj);
|
zapnodir(obj);
|
||||||
|
|||||||
Reference in New Issue
Block a user