[HELP] Absorb Damage Taken Bonus

iCORE

New member
Messages
393
Points
0
Location
Halcyon Ragnarok
Github
Naori
Emulator
hi Everyone can you help me make a bonus like this

Absorb 10% HP From Physical Damage Taken

for example i have 100 hp and im being attack with 50 damage and the 10% if the 50 damage will be absorb as HP.

sorry for my bad english hope you can help me, thanks alot 

 
Last edited by a moderator:
bonus bNearAtkDef,`n`; | Adds `n`% damage reduction against melee physical attacks
bonus bLongAtkDef,`n`; | Adds `n`% damage reduction against ranged physical attacks


hi AnnieRuRu can you help me make a bonus like this

Increases AllStats by 30%

for example i have

STR: 100 + 30% = 30
AGI: 200 + 30% = 60 
VIT: 100 + 30% = 30
DEX: 150 + 30% = 45
INT: 100 + 30% = 30
LUK: 100 +30% = 30

i try using this bonus <" bonus bAllStats (readparam(bAllStats) / 30) "> but it only read as every 30 of my status points. 

sorry for my bad english hope you can help me, thanks alot :)
bonus bStr, readparam(bStr) *3/ 10;
....
bonus bLuk, readparam(bLuk) *3/ 10;

 
bonus bNearAtkDef,`n`; | Adds `n`% damage reduction against melee physical attacks
bonus bLongAtkDef,`n`; | Adds `n`% damage reduction against ranged physical attacks




bonus bStr, readparam(bStr) *3/ 10;
....
bonus bLuk, readparam(bLuk) *3/ 10;
thanks annie and how about

regain % of damage taken and receive it as hp

 
Last edited by a moderator:
just use reduce damage taken ...

imagine if the player having 199 attack speed, and trigger the hunter fly card effect every time, that effect kinda spammy

 
hmm, what i want to ask is how to make a script for damage taken, like when the attacker has 100 damage the receiver will gain the percent of that damage.

 
Last edited by a moderator:
is there some kind of game ... that use this description ?

don't really understand whats the difference in reduce damage taken and absorb damage taken ...
if absorb 10% damage taken, that would equal to reduce 20% taken isn't it ?

btw sorry earlier, it seems bonus bNearAtkDef,`n`; reduce damage taken in value, not percentage

if you couldn't find the bonus you want ...
https://github.com/HerculesWS/Hercules/blob/stable/doc/item_bonus.md
then its probably not there

 
I think what he means is recovering attacker's HP by a % of the damage dealt.

Example: absorb 10% of damage as HP
if your attack causes 100 points of damage, you will recover 10 HP (10% of 100)

I think you might be looking for bHPDrainRateRace or bHPDrainRate

 
Probably yes, but would require source changes to achieve that

 
I haven't tested, but try this:

src/map/battle.c search:

if (wd.flag & BF_WEAPON && src != target && damage > 0) {
if (battle_config.left_cardfix_to_right)
battle->drain(sd, target, wd.damage, wd.damage, tstatus->race, is_boss(target));
else
battle->drain(sd, target, wd.damage, wd.damage2, tstatus->race, is_boss(target));
}


change to (first line)

Code:
		if (src != target && damage > 0) {
			if (battle_config.left_cardfix_to_right)
				battle->drain(sd, target, wd.damage, wd.damage, tstatus->race, is_boss(target));
			else
				battle->drain(sd, target, wd.damage, wd.damage2, tstatus->race, is_boss(target));
		}
 
hmm so I didn't get what exactly you're trying to do too xD

 
OnPCStatCalcEvent:
bonus bNoWeaponDamage, 100;
end;


totally immune to physical damage

so ... bonus bNoWeaponDamage, 10; will reduce 10% physical damage

 
@AnnieRuru sorry for my bad explanation but ill still try to explain it more clearly.

Example:

Item Description is "Absord 10% damage and heal as HP".

Player A deals 100 damage to Player B therefore Player B will heal 10% of the damage as HP. 

its like bHPDrainRate,'n'; but will trigger when being attacked by someone.

hope i explain it clearly that its not reduce damage like you are saying.

 
Last edited by a moderator:
Back
Top