remove a random INTRINSIC ability from hero. returns the intrinsic property which was removed, or 0 if nothing was removed. */
| 641 | returns the intrinsic property which was removed, |
| 642 | or 0 if nothing was removed. */ |
| 643 | int |
| 644 | attrcurse(void) |
| 645 | { |
| 646 | int ret = 0; |
| 647 | |
| 648 | switch (rnd(11)) { |
| 649 | case 1: |
| 650 | if (HFire_resistance & INTRINSIC) { |
| 651 | HFire_resistance &= ~INTRINSIC; |
| 652 | You_feel("warmer."); |
| 653 | ret = FIRE_RES; |
| 654 | break; |
| 655 | } |
| 656 | FALLTHROUGH; |
| 657 | /*FALLTHRU*/ |
| 658 | case 2: |
| 659 | if (HTeleportation & INTRINSIC) { |
| 660 | HTeleportation &= ~INTRINSIC; |
| 661 | You_feel("less jumpy."); |
| 662 | ret = TELEPORT; |
| 663 | break; |
| 664 | } |
| 665 | FALLTHROUGH; |
| 666 | /*FALLTHRU*/ |
| 667 | case 3: |
| 668 | if (HPoison_resistance & INTRINSIC) { |
| 669 | HPoison_resistance &= ~INTRINSIC; |
| 670 | You_feel("a little sick!"); |
| 671 | ret = POISON_RES; |
| 672 | break; |
| 673 | } |
| 674 | FALLTHROUGH; |
| 675 | /*FALLTHRU*/ |
| 676 | case 4: |
| 677 | if (HTelepat & INTRINSIC) { |
| 678 | HTelepat &= ~INTRINSIC; |
| 679 | if (Blind && !Blind_telepat) |
| 680 | see_monsters(); /* Can't sense mons anymore! */ |
| 681 | Your("senses fail!"); |
| 682 | ret = TELEPAT; |
| 683 | break; |
| 684 | } |
| 685 | FALLTHROUGH; |
| 686 | /*FALLTHRU*/ |
| 687 | case 5: |
| 688 | if (HCold_resistance & INTRINSIC) { |
| 689 | HCold_resistance &= ~INTRINSIC; |
| 690 | You_feel("cooler."); |
| 691 | ret = COLD_RES; |
| 692 | break; |
| 693 | } |
| 694 | FALLTHROUGH; |
| 695 | /*FALLTHRU*/ |
| 696 | case 6: |
| 697 | if (HInvis & INTRINSIC) { |
| 698 | HInvis &= ~INTRINSIC; |
| 699 | You_feel("paranoid."); |
| 700 | ret = INVIS; |
no test coverage detected