Reflecct damage cap

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Vinius
Posts: 61
Joined: Fri Jun 29, 2007 7:10 am

Reflecct damage cap

Post by Vinius »

L2J Revision Number: 3886
L2JDP Revision Number:6990

Hello, I would like to create a cap for reflect damage. Correct buffs will lead to 150% damge reflected ( some bad arithmetic in core ). Can anyone give me a hand, how to create some maximal value ( f.e. in percentages ) of damage reflected?

Many thanks
KaOs2055
Posts: 7
Joined: Fri Dec 18, 2009 5:30 pm

Re: Reflecct damage cap

Post by KaOs2055 »

there is in model/actor/l2character.java
Diego Vargas
Posts: 102
Joined: Wed Dec 10, 2008 9:29 pm

Re: Reflecct damage cap

Post by Diego Vargas »

Retail reflect cap is 99%.
User avatar
gmakhs
Posts: 215
Joined: Sat Apr 14, 2007 12:00 pm

Re: Reflecct damage cap

Post by gmakhs »

reflectedDamage = (int) (reflectPercent / 100. * damage);
change this to
reflectedDamage = (int) (reflectPercent / 20. * damage);


will make cap 20%??
Artour24
Posts: 48
Joined: Fri Sep 17, 2010 7:24 pm

Re: Reflecct damage cap

Post by Artour24 »

gmakhs wrote:reflectedDamage = (int) (reflectPercent / 100. * damage);
change this to
reflectedDamage = (int) (reflectPercent / 20. * damage);


will make cap 20%??
I think that it will make it 500% :) it is simple arithmetic so if you will divide reflect damage percent with a smaller amount than 100 then the result will be bigger .... i think so :)
User avatar
gmakhs
Posts: 215
Joined: Sat Apr 14, 2007 12:00 pm

Re: Reflecct damage cap

Post by gmakhs »

so it should be 500???
Artour24
Posts: 48
Joined: Fri Sep 17, 2010 7:24 pm

Re: Reflecct damage cap

Post by Artour24 »

gmakhs wrote:so it should be 500???
You want to decrease the amount of reflected damage right ? if it so then you have to divide the percentage with a bigger number than 100. For example if you want to make it 50% you have to divide with 200 then the reflected damage from e.g 1000 damage reflected will be 500 ....

Be aware i am not any kind of devs so all what i say above is just my guess, i haven't make any experiments with that but with a mathimatical logic it should be so as i say... why you just don't decrease the reflect damage from skills.xml files ? there is 4 skills that make reflect just find the ID of them and change them ;)
Artour24
Posts: 48
Joined: Fri Sep 17, 2010 7:24 pm

Re: Reflecct damage cap

Post by Artour24 »

Diego Vargas wrote:Retail reflect cap is 99%.
If i understand right all the topics thema then the most % of damage that can be reflected is 40% with a buff of reflect and the song that give 20% each.... maybe i am wrong again :D
User avatar
gmakhs
Posts: 215
Joined: Sat Apr 14, 2007 12:00 pm

Re: Reflecct damage cap

Post by gmakhs »

im gonna try to test it:P
Post Reply