Jump to content
  • 0

Long Range Capped


DairyPresto

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  04/03/17
  • Last Seen:  

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 🙂

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  07/02/23
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  04/03/17
  • Last Seen:  

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

Link to comment
Share on other sites

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.

×
×
  • Create New...