| 808 | } |
| 809 | |
| 810 | staticfn void |
| 811 | peffect_invisibility(struct obj *otmp) |
| 812 | { |
| 813 | boolean is_spell = (otmp->oclass == SPBOOK_CLASS); |
| 814 | |
| 815 | /* spell cannot penetrate mummy wrapping */ |
| 816 | if (is_spell && BInvis && uarmc->otyp == MUMMY_WRAPPING) { |
| 817 | You_feel("rather itchy under %s.", yname(uarmc)); |
| 818 | return; |
| 819 | } |
| 820 | if (Invis || Blind || BInvis) { |
| 821 | gp.potion_nothing++; |
| 822 | } else { |
| 823 | self_invis_message(); |
| 824 | } |
| 825 | if (otmp->blessed && !rn2(HInvis ? 15 : 30)) |
| 826 | HInvis |= FROMOUTSIDE; |
| 827 | else |
| 828 | incr_itimeout(&HInvis, d(6 - 3 * bcsign(otmp), 100) + 100); |
| 829 | newsym(u.ux, u.uy); /* update position */ |
| 830 | if (otmp->cursed) { |
| 831 | pline("For some reason, you feel your presence is known."); |
| 832 | aggravate(); |
| 833 | |
| 834 | /* doing this gives temporary invisibility, but removes permanent |
| 835 | invisibility */ |
| 836 | HInvis &= ~FROMOUTSIDE; |
| 837 | } |
| 838 | } |
| 839 | |
| 840 | staticfn void |
| 841 | peffect_see_invisible(struct obj *otmp) |
no test coverage detected