Jump to content
  • 0

Reduce 100% resistance of demi humans to 80% or less


Question

Posted (edited)

How do i reduce the resistance of a player from 100 to 80% or less.

Even if he has 100% resist it should not have any effect, as of now if a player has 100% demi human resist no other player can hit him in woe or pvp.

Any help would be greatful!!!!

Edited by Karthikeyan

4 answers to this question

Recommended Posts

  • 0
Posted

src/map/pc.cpp#L3843


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

you can try something like this, max 80% item bonuses reduction from equipments

  • Love 1
  • 0
Posted

Loc: https://github.com/rathena/rathena/blob/master/conf/battle/status.conf#L30-L32
 

// Maximum resistance to status changes. (100 = 100%)
// NOTE: Cards and equipment can go over this limit, so it only applies to natural resist.
pc_max_status_def: 100
mob_max_status_def: 100

or in src/map/battle.cpp

{ "pc_max_status_def",                  &battle_config.pc_max_sc_def,                   100,    0,      INT_MAX,        },

It may solve your problem.

  • 0
Posted
On 5/9/2021 at 9:08 PM, Emistry said:

src/map/pc.cpp#L3843



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

you can try something like this, max 80% item bonuses reduction from equipments

Thanks Emistry, will try this and revert back thanks ?

 

Hi @Emistry, I tried the above change recompiled server and tested by compounded shield with 4 thara frog cards and still that player was not hitable. He still has 100% demi resist.
Any help ?

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...