Skip to content
Snippets Groups Projects
Commit d1d253cb authored by Adry85's avatar Adry85 Committed by Zoey76
Browse files

Removed power from skills that have PhysicalAttackHpLink effect handler.

Reviewed by: Zoey76

DP part for:
https://bitbucket.org/l2jserver/l2j_server/commits/3ec79608b311b0765af46002c514a9afec134d0b
parent 77640efa
No related branches found
No related tags found
No related merge requests found
......@@ -36,9 +36,15 @@ import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
*/
public final class PhysicalAttackHpLink extends AbstractEffect
{
private final double _power;
private final double _pvpPower;
public PhysicalAttackHpLink(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
{
super(attachCond, applyCond, set, params);
_power = params.getDouble("power", 0);
_pvpPower = params.getDouble("pvpPower", _power);
}
@Override
......@@ -50,7 +56,7 @@ public final class PhysicalAttackHpLink extends AbstractEffect
@Override
public L2EffectType getEffectType()
{
return L2EffectType.PHYSICAL_ATTACK_HP_LINK;
return L2EffectType.PHYSICAL_ATTACK;
}
@Override
......@@ -65,6 +71,8 @@ public final class PhysicalAttackHpLink extends AbstractEffect
L2Character target = info.getEffected();
L2Character activeChar = info.getEffector();
Skill skill = info.getSkill();
double power = activeChar.isPlayable() && target.isPlayable() ? _pvpPower : _power;
power *= (-((target.getCurrentHp() * 2) / target.getMaxHp()) + 2);
if (activeChar.isAlikeDead())
{
......@@ -80,13 +88,13 @@ public final class PhysicalAttackHpLink extends AbstractEffect
}
final byte shld = Formulas.calcShldUse(activeChar, target, skill);
int damage = 0;
double damage = 0;
boolean ss = skill.isPhysical() && activeChar.isChargedShot(ShotType.SOULSHOTS);
damage = (int) Formulas.calcPhysDam(activeChar, target, skill, shld, false, ss);
damage = Formulas.calcSkillPhysDam(activeChar, target, shld, false, ss, power);
if (damage > 0)
{
activeChar.sendDamageMessage(target, damage, false, false, false);
activeChar.sendDamageMessage(target, (int) damage, false, false, false);
target.reduceCurrentHp(damage, activeChar, skill);
target.notifyDamageReceived(damage, activeChar, skill, false, false, false);
......
......@@ -542,7 +542,6 @@
<set name="mpConsume" val="#mpConsume" />
<set name="operateType" val="A1" />
<set name="overHit" val="true" />
<set name="power" val="#power" />
<set name="reuseDelay" val="5000" />
<set name="rideState" val="NONE" />
<set name="targetType" val="ONE" />
......@@ -563,13 +562,20 @@
<enchant6 name="elementPower" val="#enchElementPower" />
<enchant6 name="magicLvl" val="#enchMagicLvl" />
<enchant7 name="magicLvl" val="#enchMagicLvl" />
<enchant7 name="pvpPower" val="#enchDuel" />
<cond msgId="113" addName="1">
<using kind="BOW" />
</cond>
<for>
<effect name="PhysicalAttackHpLink" />
<effect name="PhysicalAttackHpLink">
<param power="#power" />
</effect>
</for>
<enchant7for>
<effect name="PhysicalAttackHpLink">
<param power="4870" />
<param pvpPower="#enchDuel" />
</effect>
</enchant7for>
</skill>
<skill id="315" levels="16" name="Crush of Doom" enchantGroup1="2" enchantGroup2="2" enchantGroup3="2" enchantGroup4="2" enchantGroup5="2" enchantGroup6="2" enchantGroup7="2">
<table name="#effectPoints"> -425 -431 -438 -444 -449 -455 -460 -466 -471 -475 -480 -484 -488 -492 -496 -499 </table>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment