light[ning] causes blindness */
| 3057 | |
| 3058 | /* light[ning] causes blindness */ |
| 3059 | boolean |
| 3060 | flashburn(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. |
no test coverage detected