Sunsword's #invoke for blinding ray

Support aiming at self (to become blinded) and aiming up/down (to
light the hero's current map spot only, persistently rather than
temporarily).  Also, recognize cancel at the "direction?" prompt to
not leave the #invoke cooldown count set when aborted.

Aiming at self was a little trickier than expected to test because
you're blindness-resistant when wielding Sunsword.  But it doesn't
have to be wielded to be invoked.
This commit is contained in:
PatR
2024-04-02 19:56:39 -07:00
parent e821274382
commit 6aaab97044
2 changed files with 43 additions and 10 deletions

View File

@@ -2958,9 +2958,9 @@ lightdamage(
of death will always be "killed while stuck in creature form"] */
if (obj->oclass == SCROLL_CLASS || obj->oclass == SPBOOK_CLASS)
ordinary = FALSE; /* say blasted rather than zapped */
how = (obj->oclass != SPBOOK_CLASS)
? (const char *) ansimpleoname(obj)
: "spell of light";
how = (obj->oclass == SPBOOK_CLASS) ? "spell of light"
: (!obj->oartifact) ? ansimpleoname(obj)
: bare_artifactname(obj);
Sprintf(buf, "%s %sself with %s", ordinary ? "zapped" : "blasted",
uhim(), how);
/* might rehumanize(); could be fatal, but only for Unchanging */