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
|
||||
none is available, choose one from among nonaligned artifacts
|
||||
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
|
||||
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 boolean FDECL(cancel_monst, (struct monst *,struct obj *,
|
||||
BOOLEAN_P,BOOLEAN_P,BOOLEAN_P));
|
||||
E void NDECL(zapsetup);
|
||||
E void NDECL(zapwrapup);
|
||||
E void FDECL(weffects, (struct obj *));
|
||||
E int NDECL(spell_damage_bonus);
|
||||
E const char *FDECL(exclam, (int force));
|
||||
|
||||
@@ -2908,6 +2908,9 @@ do_break_wand(obj)
|
||||
surrounding targets (or underlying objects) got affected yet.] */
|
||||
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 */
|
||||
for (i = 0; i <= 8; 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.
|
||||
Damage is handled in digactualhole in that case */
|
||||
if (shop_damage) pay_for_damage("dig into", FALSE);
|
||||
|
||||
23
src/zap.c
23
src/zap.c
@@ -2702,6 +2702,22 @@ struct obj *obj; /* wand or spell */
|
||||
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 */
|
||||
void
|
||||
weffects(obj)
|
||||
@@ -2718,8 +2734,7 @@ struct obj *obj;
|
||||
} else
|
||||
#endif
|
||||
if (objects[otyp].oc_dir == IMMEDIATE) {
|
||||
obj_zapped = FALSE;
|
||||
|
||||
zapsetup(); /* reset obj_zapped */
|
||||
if (u.uswallow) {
|
||||
(void) bhitm(u.ustuck, obj);
|
||||
/* [how about `bhitpile(u.ustuck->minvent)' effect?] */
|
||||
@@ -2728,9 +2743,7 @@ struct obj *obj;
|
||||
} else {
|
||||
(void) bhit(u.dx,u.dy, rn1(8,6),ZAPPED_WAND, bhitm,bhito, &obj);
|
||||
}
|
||||
/* give a clue if obj_zapped */
|
||||
if (obj_zapped)
|
||||
You_feel("shuddering vibrations.");
|
||||
zapwrapup(); /* give feedback for obj_zapped */
|
||||
|
||||
} else if (objects[otyp].oc_dir == NODIR) {
|
||||
zapnodir(obj);
|
||||
|
||||
Reference in New Issue
Block a user