Sync with L2jServer HighFive Sep 8th 2015.
This commit is contained in:
@@ -78,10 +78,10 @@ public class L2NpcActionShift implements IActionShiftHandler
|
||||
html.replace("%mp%", String.valueOf((int) ((L2Character) target).getCurrentMp()));
|
||||
html.replace("%mpmax%", String.valueOf(((L2Character) target).getMaxMp()));
|
||||
|
||||
html.replace("%patk%", String.valueOf(((L2Character) target).getPAtk(null)));
|
||||
html.replace("%matk%", String.valueOf(((L2Character) target).getMAtk(null, null)));
|
||||
html.replace("%pdef%", String.valueOf(((L2Character) target).getPDef(null)));
|
||||
html.replace("%mdef%", String.valueOf(((L2Character) target).getMDef(null, null)));
|
||||
html.replace("%patk%", String.valueOf((int) ((L2Character) target).getPAtk(null)));
|
||||
html.replace("%matk%", String.valueOf((int) ((L2Character) target).getMAtk(null, null)));
|
||||
html.replace("%pdef%", String.valueOf((int) ((L2Character) target).getPDef(null)));
|
||||
html.replace("%mdef%", String.valueOf((int) ((L2Character) target).getMDef(null, null)));
|
||||
html.replace("%accu%", String.valueOf(((L2Character) target).getAccuracy()));
|
||||
html.replace("%evas%", String.valueOf(((L2Character) target).getEvasionRate(null)));
|
||||
html.replace("%crit%", String.valueOf(((L2Character) target).getCriticalHit(null, null)));
|
||||
@@ -126,8 +126,8 @@ public class L2NpcActionShift implements IActionShiftHandler
|
||||
html.replace("%spawntype%", "Fixed");
|
||||
html.replace("%spawn%", ((L2Npc) target).getSpawn().getX() + " " + ((L2Npc) target).getSpawn().getY() + " " + ((L2Npc) target).getSpawn().getZ());
|
||||
}
|
||||
html.replace("%loc2d%", String.valueOf((int) target.calculateDistance(((L2Npc) target).getSpawn().getLocation(target), false, false)));
|
||||
html.replace("%loc3d%", String.valueOf((int) target.calculateDistance(((L2Npc) target).getSpawn().getLocation(target), true, false)));
|
||||
html.replace("%loc2d%", String.valueOf((int) activeChar.calculateDistance(((L2Npc) target).getSpawn().getLocation(target), false, false)));
|
||||
html.replace("%loc3d%", String.valueOf((int) activeChar.calculateDistance(((L2Npc) target).getSpawn().getLocation(target), true, false)));
|
||||
if (((L2Npc) target).getSpawn().getRespawnMinDelay() == 0)
|
||||
{
|
||||
html.replace("%resp%", "None");
|
||||
|
@@ -1000,10 +1000,10 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
adminReply.replace("%currentload%", String.valueOf(player.getCurrentLoad()));
|
||||
adminReply.replace("%maxload%", String.valueOf(player.getMaxLoad()));
|
||||
adminReply.replace("%percent%", String.valueOf(Util.roundTo(((float) player.getCurrentLoad() / (float) player.getMaxLoad()) * 100, 2)));
|
||||
adminReply.replace("%patk%", String.valueOf(player.getPAtk(null)));
|
||||
adminReply.replace("%matk%", String.valueOf(player.getMAtk(null, null)));
|
||||
adminReply.replace("%pdef%", String.valueOf(player.getPDef(null)));
|
||||
adminReply.replace("%mdef%", String.valueOf(player.getMDef(null, null)));
|
||||
adminReply.replace("%patk%", String.valueOf((int) player.getPAtk(null)));
|
||||
adminReply.replace("%matk%", String.valueOf((int) player.getMAtk(null, null)));
|
||||
adminReply.replace("%pdef%", String.valueOf((int) player.getPDef(null)));
|
||||
adminReply.replace("%mdef%", String.valueOf((int) player.getMDef(null, null)));
|
||||
adminReply.replace("%accuracy%", String.valueOf(player.getAccuracy()));
|
||||
adminReply.replace("%evasion%", String.valueOf(player.getEvasionRate(null)));
|
||||
adminReply.replace("%critical%", String.valueOf(player.getCriticalHit(null, null)));
|
||||
|
@@ -222,7 +222,7 @@ public class AdminFightCalculator implements IAdminCommandHandler
|
||||
{
|
||||
shld1++;
|
||||
}
|
||||
boolean _crit1 = Formulas.calcCrit(npc1.getCriticalHit(npc2, null), false, npc2);
|
||||
boolean _crit1 = Formulas.calcCrit(npc1, npc2);
|
||||
if (_crit1)
|
||||
{
|
||||
crit1++;
|
||||
@@ -255,7 +255,7 @@ public class AdminFightCalculator implements IAdminCommandHandler
|
||||
{
|
||||
shld2++;
|
||||
}
|
||||
boolean _crit2 = Formulas.calcCrit(npc2.getCriticalHit(npc1, null), false, npc1);
|
||||
boolean _crit2 = Formulas.calcCrit(npc2, npc1);
|
||||
if (_crit2)
|
||||
{
|
||||
crit2++;
|
||||
|
@@ -44,7 +44,6 @@ public class AdminHeal implements IAdminCommandHandler
|
||||
@Override
|
||||
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||
{
|
||||
|
||||
if (command.equals("admin_heal"))
|
||||
{
|
||||
handleHeal(activeChar);
|
||||
|
@@ -187,11 +187,11 @@ public class NpcViewMod implements IBypassHandler
|
||||
html.replace("%atktype%", Util.capitalizeFirst(npc.getAttackType().name().toLowerCase()));
|
||||
html.replace("%atkrange%", npc.getStat().getPhysicalAttackRange());
|
||||
|
||||
html.replace("%patk%", npc.getPAtk(activeChar));
|
||||
html.replace("%pdef%", npc.getPDef(activeChar));
|
||||
html.replace("%patk%", (int) npc.getPAtk(activeChar));
|
||||
html.replace("%pdef%", (int) npc.getPDef(activeChar));
|
||||
|
||||
html.replace("%matk%", npc.getMAtk(activeChar, null));
|
||||
html.replace("%mdef%", npc.getMDef(activeChar, null));
|
||||
html.replace("%matk%", (int) npc.getMAtk(activeChar, null));
|
||||
html.replace("%mdef%", (int) npc.getMDef(activeChar, null));
|
||||
|
||||
html.replace("%atkspd%", npc.getPAtkSpd());
|
||||
html.replace("%castspd%", npc.getMAtkSpd());
|
||||
|
@@ -26,7 +26,7 @@ import com.l2jserver.gameserver.model.conditions.Condition;
|
||||
import com.l2jserver.gameserver.model.effects.AbstractEffect;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.model.stats.BaseStats;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.stats.Formulas;
|
||||
|
||||
/**
|
||||
@@ -43,7 +43,7 @@ public final class Backstab extends AbstractEffect
|
||||
@Override
|
||||
public boolean calcSuccess(BuffInfo info)
|
||||
{
|
||||
return info.getEffector().isBehindTarget() && !Formulas.calcPhysicalSkillEvasion(info.getEffector(), info.getEffected(), info.getSkill()) && Formulas.calcBlowSuccess(info.getEffector(), info.getEffected(), info.getSkill());
|
||||
return !info.getEffector().isInFrontOf(info.getEffected()) && !Formulas.calcPhysicalSkillEvasion(info.getEffector(), info.getEffected(), info.getSkill()) && Formulas.calcBlowSuccess(info.getEffector(), info.getEffected(), info.getSkill());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,18 +68,19 @@ public final class Backstab extends AbstractEffect
|
||||
|
||||
L2Character target = info.getEffected();
|
||||
L2Character activeChar = info.getEffector();
|
||||
boolean ss = info.getSkill().useSoulShot() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
byte shld = Formulas.calcShldUse(activeChar, target, info.getSkill());
|
||||
double damage = Formulas.calcBackstabDamage(activeChar, target, info.getSkill(), shld, ss);
|
||||
Skill skill = info.getSkill();
|
||||
boolean ss = skill.useSoulShot() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
byte shld = Formulas.calcShldUse(activeChar, target, skill);
|
||||
double damage = Formulas.calcBackstabDamage(activeChar, target, skill, shld, ss);
|
||||
|
||||
// Crit rate base crit rate for skill, modified with STR bonus
|
||||
if (Formulas.calcCrit(info.getSkill().getBaseCritRate() * 10 * BaseStats.STR.calcBonus(activeChar), true, target))
|
||||
if (Formulas.calcCrit(activeChar, target, skill))
|
||||
{
|
||||
damage *= 2;
|
||||
}
|
||||
|
||||
target.reduceCurrentHp(damage, activeChar, info.getSkill());
|
||||
target.notifyDamageReceived(damage, activeChar, info.getSkill(), true, false);
|
||||
target.reduceCurrentHp(damage, activeChar, skill);
|
||||
target.notifyDamageReceived(damage, activeChar, skill, true, false);
|
||||
|
||||
// Manage attack or cast break of the target (calculating rate, sending message...)
|
||||
if (!target.isRaid() && Formulas.calcAtkBreak(target, damage))
|
||||
@@ -95,6 +96,6 @@ public final class Backstab extends AbstractEffect
|
||||
}
|
||||
|
||||
// Check if damage should be reflected
|
||||
Formulas.calcDamageReflected(activeChar, target, info.getSkill(), true);
|
||||
Formulas.calcDamageReflected(activeChar, target, skill, true);
|
||||
}
|
||||
}
|
@@ -85,7 +85,7 @@ public final class EnergyAttack extends AbstractEffect
|
||||
final Skill skill = info.getSkill();
|
||||
|
||||
double attack = attacker.getPAtk(target);
|
||||
int defence = target.getPDef(attacker);
|
||||
double defence = target.getPDef(attacker);
|
||||
|
||||
if (!_ignoreShieldDefence)
|
||||
{
|
||||
|
@@ -29,7 +29,7 @@ import com.l2jserver.gameserver.model.effects.AbstractEffect;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalType;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.model.stats.BaseStats;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.stats.Formulas;
|
||||
import com.l2jserver.gameserver.model.stats.Stats;
|
||||
|
||||
@@ -73,15 +73,16 @@ public final class FatalBlow extends AbstractEffect
|
||||
{
|
||||
L2Character target = info.getEffected();
|
||||
L2Character activeChar = info.getEffector();
|
||||
Skill skill = info.getSkill();
|
||||
|
||||
if (activeChar.isAlikeDead())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
boolean ss = info.getSkill().useSoulShot() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
byte shld = Formulas.calcShldUse(activeChar, target, info.getSkill());
|
||||
double damage = Formulas.calcBlowDamage(activeChar, target, info.getSkill(), shld, ss);
|
||||
boolean ss = skill.useSoulShot() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
byte shld = Formulas.calcShldUse(activeChar, target, skill);
|
||||
double damage = Formulas.calcBlowDamage(activeChar, target, skill, shld, ss);
|
||||
|
||||
if (_targetAbnormalType != "NULL")
|
||||
{
|
||||
@@ -97,8 +98,7 @@ public final class FatalBlow extends AbstractEffect
|
||||
}
|
||||
}
|
||||
|
||||
// Crit rate base crit rate for skill, modified with STR bonus
|
||||
boolean crit = Formulas.calcCrit(info.getSkill().getBaseCritRate() * 10 * BaseStats.STR.calcBonus(activeChar), true, target);
|
||||
boolean crit = Formulas.calcCrit(activeChar, target, skill);
|
||||
if (crit)
|
||||
{
|
||||
damage *= 2;
|
||||
@@ -111,8 +111,8 @@ public final class FatalBlow extends AbstractEffect
|
||||
damage = (int) maxDamage;
|
||||
}
|
||||
|
||||
target.reduceCurrentHp(damage, activeChar, info.getSkill());
|
||||
target.notifyDamageReceived(damage, activeChar, info.getSkill(), crit, false);
|
||||
target.reduceCurrentHp(damage, activeChar, skill);
|
||||
target.notifyDamageReceived(damage, activeChar, skill, crit, false);
|
||||
|
||||
// Manage attack or cast break of the target (calculating rate, sending message...)
|
||||
if (!target.isRaid() && Formulas.calcAtkBreak(target, damage))
|
||||
@@ -128,6 +128,6 @@ public final class FatalBlow extends AbstractEffect
|
||||
}
|
||||
|
||||
// Check if damage should be reflected
|
||||
Formulas.calcDamageReflected(activeChar, target, info.getSkill(), true);
|
||||
Formulas.calcDamageReflected(activeChar, target, skill, true);
|
||||
}
|
||||
}
|
@@ -28,7 +28,7 @@ import com.l2jserver.gameserver.model.effects.AbstractEffect;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.items.type.WeaponType;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.model.stats.BaseStats;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.stats.Formulas;
|
||||
import com.l2jserver.gameserver.model.stats.Stats;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
@@ -80,16 +80,17 @@ public final class PhysicalAttack extends AbstractEffect
|
||||
{
|
||||
L2Character target = info.getEffected();
|
||||
L2Character activeChar = info.getEffector();
|
||||
Skill skill = info.getSkill();
|
||||
|
||||
if (activeChar.isAlikeDead())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (((info.getSkill().getFlyRadius() > 0) || (info.getSkill().getFlyType() != null)) && activeChar.isMovementDisabled())
|
||||
if (((info.getSkill().getFlyRadius() > 0) || (skill.getFlyType() != null)) && activeChar.isMovementDisabled())
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||
sm.addSkillName(info.getSkill());
|
||||
sm.addSkillName(skill);
|
||||
activeChar.sendPacket(sm);
|
||||
return;
|
||||
}
|
||||
@@ -100,16 +101,16 @@ public final class PhysicalAttack extends AbstractEffect
|
||||
}
|
||||
|
||||
int damage = 0;
|
||||
boolean ss = info.getSkill().isPhysical() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
final byte shld = Formulas.calcShldUse(activeChar, target, info.getSkill());
|
||||
boolean ss = skill.isPhysical() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
final byte shld = Formulas.calcShldUse(activeChar, target, skill);
|
||||
// Physical damage critical rate is only affected by STR.
|
||||
boolean crit = false;
|
||||
if (info.getSkill().getBaseCritRate() > 0)
|
||||
if (skill.getBaseCritRate() > 0)
|
||||
{
|
||||
crit = Formulas.calcCrit(info.getSkill().getBaseCritRate() * 10 * BaseStats.STR.calcBonus(activeChar), true, target);
|
||||
crit = Formulas.calcCrit(activeChar, target, skill);
|
||||
}
|
||||
|
||||
damage = (int) Formulas.calcPhysDam(activeChar, target, info.getSkill(), shld, false, ss);
|
||||
damage = (int) Formulas.calcPhysDam(activeChar, target, skill, shld, false, ss);
|
||||
|
||||
if (crit)
|
||||
{
|
||||
@@ -158,24 +159,24 @@ public final class PhysicalAttack extends AbstractEffect
|
||||
}
|
||||
else
|
||||
{
|
||||
target.reduceCurrentHp(damage, activeChar, info.getSkill());
|
||||
target.reduceCurrentHp(damage, activeChar, skill);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
target.reduceCurrentHp(damage, activeChar, info.getSkill());
|
||||
target.notifyDamageReceived(damage, activeChar, info.getSkill(), crit, false);
|
||||
target.reduceCurrentHp(damage, activeChar, skill);
|
||||
target.notifyDamageReceived(damage, activeChar, skill, crit, false);
|
||||
}
|
||||
|
||||
// Check if damage should be reflected
|
||||
Formulas.calcDamageReflected(activeChar, target, info.getSkill(), crit);
|
||||
Formulas.calcDamageReflected(activeChar, target, skill, crit);
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.YOUR_ATTACK_HAS_FAILED);
|
||||
}
|
||||
|
||||
if (info.getSkill().isSuicideAttack())
|
||||
if (skill.isSuicideAttack())
|
||||
{
|
||||
activeChar.doDie(activeChar);
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ import com.l2jserver.gameserver.model.conditions.Condition;
|
||||
import com.l2jserver.gameserver.model.effects.AbstractEffect;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.model.stats.BaseStats;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.stats.Formulas;
|
||||
import com.l2jserver.gameserver.model.stats.Stats;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
@@ -65,6 +65,7 @@ public final class PhysicalAttackHpLink extends AbstractEffect
|
||||
{
|
||||
L2Character target = info.getEffected();
|
||||
L2Character activeChar = info.getEffector();
|
||||
Skill skill = info.getSkill();
|
||||
|
||||
if (activeChar.isAlikeDead())
|
||||
{
|
||||
@@ -74,22 +75,22 @@ public final class PhysicalAttackHpLink extends AbstractEffect
|
||||
if (activeChar.isMovementDisabled())
|
||||
{
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||
sm.addSkillName(info.getSkill());
|
||||
sm.addSkillName(skill);
|
||||
activeChar.sendPacket(sm);
|
||||
return;
|
||||
}
|
||||
|
||||
final byte shld = Formulas.calcShldUse(activeChar, target, info.getSkill());
|
||||
final byte shld = Formulas.calcShldUse(activeChar, target, skill);
|
||||
// Physical damage critical rate is only affected by STR.
|
||||
boolean crit = false;
|
||||
if (info.getSkill().getBaseCritRate() > 0)
|
||||
if (skill.getBaseCritRate() > 0)
|
||||
{
|
||||
crit = Formulas.calcCrit(info.getSkill().getBaseCritRate() * 10 * BaseStats.STR.calcBonus(activeChar), true, target);
|
||||
crit = Formulas.calcCrit(activeChar, target, skill);
|
||||
}
|
||||
|
||||
int damage = 0;
|
||||
boolean ss = info.getSkill().isPhysical() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
damage = (int) Formulas.calcPhysDam(activeChar, target, info.getSkill(), shld, false, ss);
|
||||
boolean ss = skill.isPhysical() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
damage = (int) Formulas.calcPhysDam(activeChar, target, skill, shld, false, ss);
|
||||
|
||||
if (damage > 0)
|
||||
{
|
||||
@@ -101,11 +102,11 @@ public final class PhysicalAttackHpLink extends AbstractEffect
|
||||
}
|
||||
|
||||
activeChar.sendDamageMessage(target, damage, false, crit, false);
|
||||
target.reduceCurrentHp(damage, activeChar, info.getSkill());
|
||||
target.notifyDamageReceived(damage, activeChar, info.getSkill(), crit, false);
|
||||
target.reduceCurrentHp(damage, activeChar, skill);
|
||||
target.notifyDamageReceived(damage, activeChar, skill, crit, false);
|
||||
|
||||
// Check if damage should be reflected.
|
||||
Formulas.calcDamageReflected(activeChar, target, info.getSkill(), crit);
|
||||
Formulas.calcDamageReflected(activeChar, target, skill, crit);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -25,7 +25,7 @@ import com.l2jserver.gameserver.model.conditions.Condition;
|
||||
import com.l2jserver.gameserver.model.effects.AbstractEffect;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.model.stats.BaseStats;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.stats.Formulas;
|
||||
import com.l2jserver.gameserver.model.stats.Stats;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
@@ -65,16 +65,17 @@ public final class PhysicalSoulAttack extends AbstractEffect
|
||||
{
|
||||
L2Character target = info.getEffected();
|
||||
L2Character activeChar = info.getEffector();
|
||||
Skill skill = info.getSkill();
|
||||
|
||||
if (activeChar.isAlikeDead())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (((info.getSkill().getFlyRadius() > 0) || (info.getSkill().getFlyType() != null)) && activeChar.isMovementDisabled())
|
||||
if (((skill.getFlyRadius() > 0) || (skill.getFlyType() != null)) && activeChar.isMovementDisabled())
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||
sm.addSkillName(info.getSkill());
|
||||
sm.addSkillName(skill);
|
||||
activeChar.sendPacket(sm);
|
||||
return;
|
||||
}
|
||||
@@ -85,21 +86,21 @@ public final class PhysicalSoulAttack extends AbstractEffect
|
||||
}
|
||||
|
||||
int damage = 0;
|
||||
boolean ss = info.getSkill().isPhysical() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
final byte shld = Formulas.calcShldUse(activeChar, target, info.getSkill());
|
||||
boolean ss = skill.isPhysical() && activeChar.isChargedShot(ShotType.SOULSHOTS);
|
||||
final byte shld = Formulas.calcShldUse(activeChar, target, skill);
|
||||
// Physical damage critical rate is only affected by STR.
|
||||
boolean crit = false;
|
||||
if (info.getSkill().getBaseCritRate() > 0)
|
||||
if (skill.getBaseCritRate() > 0)
|
||||
{
|
||||
crit = Formulas.calcCrit(info.getSkill().getBaseCritRate() * 10 * BaseStats.STR.calcBonus(activeChar), true, target);
|
||||
crit = Formulas.calcCrit(activeChar, target, skill);
|
||||
}
|
||||
|
||||
damage = (int) Formulas.calcPhysDam(activeChar, target, info.getSkill(), shld, false, ss);
|
||||
damage = (int) Formulas.calcPhysDam(activeChar, target, skill, shld, false, ss);
|
||||
|
||||
if ((info.getSkill().getMaxSoulConsumeCount() > 0) && activeChar.isPlayer())
|
||||
if ((skill.getMaxSoulConsumeCount() > 0) && activeChar.isPlayer())
|
||||
{
|
||||
// Souls Formula (each soul increase +4%)
|
||||
int chargedSouls = (activeChar.getActingPlayer().getChargedSouls() <= info.getSkill().getMaxSoulConsumeCount()) ? activeChar.getActingPlayer().getChargedSouls() : info.getSkill().getMaxSoulConsumeCount();
|
||||
int chargedSouls = (activeChar.getActingPlayer().getChargedSouls() <= skill.getMaxSoulConsumeCount()) ? activeChar.getActingPlayer().getChargedSouls() : skill.getMaxSoulConsumeCount();
|
||||
damage *= 1 + (chargedSouls * 0.04);
|
||||
}
|
||||
if (crit)
|
||||
@@ -117,18 +118,18 @@ public final class PhysicalSoulAttack extends AbstractEffect
|
||||
}
|
||||
|
||||
activeChar.sendDamageMessage(target, damage, false, crit, false);
|
||||
target.reduceCurrentHp(damage, activeChar, info.getSkill());
|
||||
target.notifyDamageReceived(damage, activeChar, info.getSkill(), crit, false);
|
||||
target.reduceCurrentHp(damage, activeChar, skill);
|
||||
target.notifyDamageReceived(damage, activeChar, skill, crit, false);
|
||||
|
||||
// Check if damage should be reflected
|
||||
Formulas.calcDamageReflected(activeChar, target, info.getSkill(), crit);
|
||||
Formulas.calcDamageReflected(activeChar, target, skill, crit);
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.YOUR_ATTACK_HAS_FAILED);
|
||||
}
|
||||
|
||||
if (info.getSkill().isSuicideAttack())
|
||||
if (skill.isSuicideAttack())
|
||||
{
|
||||
activeChar.doDie(activeChar);
|
||||
}
|
||||
|
Reference in New Issue
Block a user