Jump to content

Question

Posted

Recently, I found the maximum cap for subrace bonuses, and it works. 

Just like this 

Quote

    case SP_SUBRACE: // bonus2 bSubRace,r,x;
        PC_BONUS_CHK_RACE(type2,SP_SUBRACE);
        if(sd->state.lr_flag != 2)
            sd->subrace[type2] = min(sd->subrace[type2]+val, 70);

It works! Even if the player wears 100% demihuman, it only limits it to 70%. 

I just want to make it on long attack defense the same as subrace with 70% MAx Capped. But I don't know how. 

IDK if this is the source and how to make it happen 

 

Quote

        case SP_LONG_ATK_DEF:
            if(sd->state.lr_flag != 2)
                sd->bonus.long_attack_def_rate += val;
            break;
 



Hope someone can help me with this 🙂

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Try this 1



case SP_LONG_ATK_DEF:
            if(sd->state.lr_flag != 2)
               if(sd->bonus.long_attack_def_rate >= 70)
                     sd->bonus.long_attack_def_rate = 70;
               else
                    sd->bonus.long_attack_def_rate  += val;

 break;

Edited by Drake
  • 0
Posted
On 3/3/2024 at 6:51 PM, Drake said:

Try this 1



case SP_LONG_ATK_DEF:
            if(sd->state.lr_flag != 2)
               if(sd->bonus.long_attack_def_rate >= 70)
                     sd->bonus.long_attack_def_rate = 70;
               else
                    sd->bonus.long_attack_def_rate  += val;

 break;


I already applied this but no one changing still if 100% resist equip, And attack with range it missed

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...