MCPcopy Create free account
hub / github.com/NetHack/NetHack / flashburn

Function flashburn

src/zap.c:3059–3080  ·  view source on GitHub ↗

light[ning] causes blindness */

Source from the content-addressed store, hash-verified

3057
3058/* light[ning] causes blindness */
3059boolean
3060flashburn(long duration, boolean via_lightning)
3061{
3062 if (!resists_blnd(&gy.youmonst)) {
3063 You(are_blinded_by_the_flash);
3064 make_blinded(duration, FALSE);
3065 if (!Blind)
3066 Your1(vision_clears);
3067 return TRUE;
3068 }
3069 /* if blinding is resisted due to magical equipment (Sunsword), give
3070 a sparkle animation (even if also resisted due to being blind)
3071 _unless_ this is lightning-induced; we don't want a double sparkle
3072 if hero is both lightning resistant and blindness resistant, or
3073 worse, have a single sparkle where the player confuses blindness
3074 resistance for lightning resistance */
3075 if (!via_lightning && resists_blnd_by_arti(&gy.youmonst)) {
3076 shieldeff(u.ux, u.uy);
3077 return TRUE;
3078 }
3079 return FALSE;
3080}
3081
3082/* you've zapped a wand downwards while riding
3083 * Return TRUE if the steed was hit by the wand.

Callers 4

mcast_lightningFunction · 0.85
invoke_blinding_rayFunction · 0.85
zapyourselfFunction · 0.85
dobuzzFunction · 0.85

Calls 5

resists_blndFunction · 0.85
YouFunction · 0.85
make_blindedFunction · 0.85
resists_blnd_by_artiFunction · 0.85
shieldeffFunction · 0.85

Tested by

no test coverage detected