| 2681 | } |
| 2682 | |
| 2683 | void PrintItemPower(char plidx, ItemStruct *x) |
| 2684 | { |
| 2685 | switch (plidx) { |
| 2686 | case IPL_TOHIT: |
| 2687 | case IPL_TOHIT_CURSE: |
| 2688 | sprintf(tempstr, "chance to hit : %+i%%", x->_iPLToHit); |
| 2689 | break; |
| 2690 | case IPL_DAMP: |
| 2691 | case IPL_DAMP_CURSE: |
| 2692 | sprintf(tempstr, "%+i%% damage", x->_iPLDam); |
| 2693 | break; |
| 2694 | case IPL_TOHIT_DAMP: |
| 2695 | case IPL_TOHIT_DAMP_CURSE: |
| 2696 | sprintf(tempstr, "to hit: %+i%%, %+i%% damage", x->_iPLToHit, x->_iPLDam); |
| 2697 | break; |
| 2698 | case IPL_ACP: |
| 2699 | case IPL_ACP_CURSE: |
| 2700 | sprintf(tempstr, "%+i%% armor", x->_iPLAC); |
| 2701 | break; |
| 2702 | case IPL_SETAC: |
| 2703 | sprintf(tempstr, "armor class: %i", x->_iAC); |
| 2704 | break; |
| 2705 | case IPL_AC_CURSE: |
| 2706 | sprintf(tempstr, "armor class: %i", x->_iAC); |
| 2707 | break; |
| 2708 | case IPL_FIRERES: |
| 2709 | if (x->_iPLFR < 75) |
| 2710 | sprintf(tempstr, "Resist Fire : %+i%%", x->_iPLFR); |
| 2711 | if (x->_iPLFR >= 75) |
| 2712 | sprintf(tempstr, "Resist Fire : 75%% MAX"); |
| 2713 | break; |
| 2714 | case IPL_LIGHTRES: |
| 2715 | if (x->_iPLLR < 75) |
| 2716 | sprintf(tempstr, "Resist Lightning : %+i%%", x->_iPLLR); |
| 2717 | if (x->_iPLLR >= 75) |
| 2718 | sprintf(tempstr, "Resist Lightning : 75%% MAX"); |
| 2719 | break; |
| 2720 | case IPL_MAGICRES: |
| 2721 | if (x->_iPLMR < 75) |
| 2722 | sprintf(tempstr, "Resist Magic : %+i%%", x->_iPLMR); |
| 2723 | if (x->_iPLMR >= 75) |
| 2724 | sprintf(tempstr, "Resist Magic : 75%% MAX"); |
| 2725 | break; |
| 2726 | case IPL_ALLRES: |
| 2727 | if (x->_iPLFR < 75) |
| 2728 | sprintf(tempstr, "Resist All : %+i%%", x->_iPLFR); |
| 2729 | if (x->_iPLFR >= 75) |
| 2730 | sprintf(tempstr, "Resist All : 75%% MAX"); |
| 2731 | break; |
| 2732 | case IPL_SPLLVLADD: |
| 2733 | if (x->_iSplLvlAdd == 1) |
| 2734 | strcpy(tempstr, "spells are increased 1 level"); |
| 2735 | if (x->_iSplLvlAdd == 2) |
| 2736 | strcpy(tempstr, "spells are increased 2 levels"); |
| 2737 | if (x->_iSplLvlAdd < 1) |
| 2738 | strcpy(tempstr, "spells are decreased 1 level"); |
| 2739 | break; |
| 2740 | case IPL_CHARGES: |
no outgoing calls
no test coverage detected