Elemental Defense

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
Crom
Posts: 191
Joined: Sun May 24, 2009 8:09 pm
Location: Spain

Elemental Defense

Post by Crom »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:3879
L2JDP Revision Number:6983

Well i have test it on latest GF rev and this revs of GE, and i will test on latest of GE, the problem is the damage received, you recive the same damaged when you have 20 of elemental defense when you have 245...

The tests have been done with many values of weapon and the same value of armor.
Elemental defense: 120
Elemental attack: 5,100,120,450,300,200,50,80,90...

You see diferences on the damage when attack and elemental are aproximate the same.

Could anyone test if this is correct?
mgbhard
Posts: 228
Joined: Mon May 05, 2008 10:34 pm

Re: Elemental Defense

Post by mgbhard »

Some players on my server are reporting that, but.. i've test it yesterday and it seems to work fine, at least with my test chars.

When the skill has an element, or is an melee attack it seems to work.

Take in mind that te formula acts on this values, with this i mean if you add 10 elements to your weapon and the diference (attack vs defense) is still in the same level, the damage won't change.

Code: Select all

 				calcPower = skill.getElementPower();				calcDefen = target.getDefenseElementValue(element); 				if (attacker.getAttackElement() == element)					calcPower += attacker.getAttackElementValue(element); 				calcTotal = calcPower - calcDefen;				if (calcTotal > 0)				{					if (calcTotal < 75)						result += calcTotal * 0.0052;					else if (calcTotal < 150)						result = 1.2; // 1.4					else if (calcTotal < 290)						result = 1.3; // 1.7					else if (calcTotal < 300)						result = 1.4; // 1.8					else						result = 2.5; // 2.0				}
Image
Crom
Posts: 191
Joined: Sun May 24, 2009 8:09 pm
Location: Spain

Re: Elemental Defense

Post by Crom »

MGH could you explain me in spanish? I'm not so good today >.<

If i understand you, the "elemental damage" it's not calculated by quantity of element, it's calculated per elemental damage, are you saying that?
mgbhard
Posts: 228
Joined: Mon May 05, 2008 10:34 pm

Re: Elemental Defense

Post by mgbhard »

El daño elemental se calcula restando el elemento de ataque (base + skill) y el de defensa (items + skill).
Es decir: Ataque - Defensa = diferencia de daño por elemento.

Pero hay "niveles" en los que el daño elemental aumenta, si la diferencia (ataque-defensa) es menor a 75, el daño sera X, si la diferencia es > a 75 pero < a 150, el daño sera X', si la diferencia es > a 150 pero menor a 290, el daño sera X''.
Image
Crom
Posts: 191
Joined: Sun May 24, 2009 8:09 pm
Location: Spain

Re: Elemental Defense

Post by Crom »

Thx to explain me it ^^ But with this explanation the elemental defense are bugged, because if i have 20 of Elemental defense or i have 120 if the weapon have 300 i receive the same damage.
mgbhard
Posts: 228
Joined: Mon May 05, 2008 10:34 pm

Re: Elemental Defense

Post by mgbhard »

Crom wrote:Thx to explain me it ^^ But with this explanation the elemental defense are bugged, because if i have 20 of Elemental defense or i have 120 if the weapon have 300 i receive the same damage.
No -.- X' X'' <- x' != x''

The damage is increased when the difference is above 75, then again at 150 an then again at 290
Image
mgbhard
Posts: 228
Joined: Mon May 05, 2008 10:34 pm

Re: Elemental Defense

Post by mgbhard »

Let's see if i can be more clear.

If we assum, you are a Sorcer, hitting with a prominence another char.
In a normal hit, you do 150 damage.
Prominence has a element power of 20.
Your char has a fire power of 15.

The other char (who you are hitting), has a fire defence of 10.

So the maths are:

Code: Select all

 element = skill.getElement();if (element >= 0){	calcPower = skill.getElementPower();	calcDefen = target.getDefenseElementValue(element); 	if (attacker.getAttackElement() == element)		calcPower += attacker.getAttackElementValue(element); 	calcTotal = calcPower - calcDefen;	if (calcTotal > 0)	{		if (calcTotal < 75)			result += calcTotal * 0.0052;		else if (calcTotal < 150)			result = 1.2; // 1.4		else if (calcTotal < 290)			result = 1.3; // 1.7		else if (calcTotal < 300)			result = 1.4; // 1.8		else			result = 2.5; // 2.0	} 
If we use the values above:

Code: Select all

 element = skill.getElement();if (element >= 0)  <<<<----- Element is Fire so goes on{	calcPower = 20	calcDefen = 10 	if (attacker.getAttackElement() == element) <<<<----- Yes		calcPower += 15;    <<<<<------ so calcPower now is 35 	calcTotal = 35 - 10;	if (calcTotal > 0)	{		if (calcTotal < 75)    <<<<----- this condition is true so..			result += 25 * 0.0052;    <-----  1.0 = 1.0 + 25 * 0.0052  <<--  result =  1.13		else			result = 2.5; // 2.0	} 
When the damage is calculated, we have:

Code: Select all

damage *= calcElemental(attacker, target, skill);
Meaning: Damage + element = Damage * result
So: Damage + element = 150 * 1.13
Result: Damage + element = 169,5
Image
Crom
Posts: 191
Joined: Sun May 24, 2009 8:09 pm
Location: Spain

Re: Elemental Defense

Post by Crom »

I understand this, but this isn't ocurr xD

Ex:
attack: 200 fire
dfense:20 fire
damage: 200

Attack: 200 fire
defense: 150 fire
damage: 200

this is going on my GF and GE servers...
doken1313
Posts: 50
Joined: Fri Nov 13, 2009 5:39 pm

Re: Elemental Defense

Post by doken1313 »

I agree...
I tried hitting with a wind lvl4 weapon a char with wind resistance in armor 0 and then with all armor lvl 4 wind res, or lvl 7 wind res and the damage was the same...
Elemental defense doesn't seem to be working at all.
User avatar
DrHouse
L2j Inner Circle
L2j Inner Circle
Posts: 912
Joined: Mon Jan 22, 2007 12:14 am
Location: Spain

Re: Elemental Defense

Post by DrHouse »

Please respect forum rules: type in English or use private message.
Image

Leadership and management are not talk and talk, but talk and do

Proud of being a part of this project
Crom
Posts: 191
Joined: Sun May 24, 2009 8:09 pm
Location: Spain

Re: Elemental Defense

Post by Crom »

¬¬ It was only the explanation of an english post...
Post Reply