-Added two new effects (BlockTarget & Duel).
-Added <target hp="n%" /> condition (example - Last Attack skill). -Updated DamOverTime effect - add increase charges count over time. -Updated EnergyAttack effect to new charges system. -Updated FatalBlow effect (able to increase skill power damage if target has affected by selected abnormal type). -Added parameter ignorePhysDefPercent for skills that ignores some % of enemy pDef. -Added function isInvulnerableFor(player) and updated PcCondOverride for this function. -NPC and NPC buffers data updated for Othell Ground skill Poison Zone. -Updated PhysicalAttack effect for skills, that decreases power when using some weapon types, and increases power when using some weapon types. also added isLastAttack parameter (for skill Last Attack atm). -Added stat momentumSkillPower (for Tyrr' passive). Increases power when player have more charges (max 3). -Updated some effect for working with maxSkillDamage parameter. -Updated some old and new skills to 10531. Contributed by NviX.
This commit is contained in:
@ -115,6 +115,7 @@ import com.l2jserver.gameserver.model.conditions.ConditionTargetActiveEffectId;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetActiveSkillId;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetAggro;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetClassIdRestriction;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetHp;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetInvSize;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetLevel;
|
||||
import com.l2jserver.gameserver.model.conditions.ConditionTargetLevelRange;
|
||||
@ -1049,6 +1050,12 @@ public abstract class DocumentBase
|
||||
cond = joinAnd(cond, new ConditionTargetAbnormalType(abnormalType));
|
||||
break;
|
||||
}
|
||||
case "hp":
|
||||
{
|
||||
int hp = Integer.decode(getValue(a.getNodeValue(), template));
|
||||
cond = joinAnd(cond, new ConditionTargetHp(hp));
|
||||
break;
|
||||
}
|
||||
case "mindistance":
|
||||
{
|
||||
int distance = Integer.decode(getValue(a.getNodeValue(), null));
|
||||
|
@ -184,7 +184,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab
|
||||
@Override
|
||||
public final boolean spawnMe()
|
||||
{
|
||||
assert (getWorldRegion() == null) && (getLocation().getX() != 0) && (getLocation().getY() != 0) && (getLocation().getZ() != 0);
|
||||
assert(getWorldRegion() == null) && (getLocation().getX() != 0) && (getLocation().getY() != 0) && (getLocation().getZ() != 0);
|
||||
|
||||
synchronized (this)
|
||||
{
|
||||
@ -569,7 +569,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab
|
||||
|
||||
public void removeStatusListener(L2Character object)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void badCoords()
|
||||
@ -1007,6 +1007,15 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param player
|
||||
* @return {@code true} if player can ignore an invulnerable object if it's invulnerable, {@code false} otherwise.
|
||||
*/
|
||||
public boolean isVulnerableFor(L2Character player)
|
||||
{
|
||||
return !isInvul() || player.canOverrideCond(PcCondOverride.VULNERABLE_ALL_PLAYERS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
|
@ -38,7 +38,8 @@ public enum PcCondOverride
|
||||
DESTROY_ALL_ITEMS(12, "Overrides item destroy conditions"),
|
||||
SEE_ALL_PLAYERS(13, "Overrides the conditions to see hidden players"),
|
||||
TARGET_ALL(14, "Overrides target conditions"),
|
||||
DROP_ALL_ITEMS(15, "Overrides item drop conditions");
|
||||
DROP_ALL_ITEMS(15, "Overrides item drop conditions"),
|
||||
VULNERABLE_ALL_PLAYERS(16, "Overrides the conditions to invulnerable players");
|
||||
|
||||
private final int _mask;
|
||||
private final String _descr;
|
||||
|
@ -4185,7 +4185,8 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Send packet StatusUpdate with current HP,MP and CP to the L2PcInstance and only current HP, MP and Level to all other L2PcInstance of the Party. <B><U> Actions</U> :</B> <li>Send the Server->Client packet StatusUpdate with current HP, MP and CP to this L2PcInstance</li><BR>
|
||||
* Send packet StatusUpdate with current HP,MP and CP to the L2PcInstance and only current HP, MP and Level to all other L2PcInstance of the Party. <B><U> Actions</U> :</B>
|
||||
* <li>Send the Server->Client packet StatusUpdate with current HP, MP and CP to this L2PcInstance</li><BR>
|
||||
* <li>Send the Server->Client packet PartySmallWindowUpdate with current HP, MP and Level to all other L2PcInstance of the Party</li> <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND current HP and MP to all L2PcInstance of the _statusListener</B></FONT>
|
||||
*/
|
||||
@Override
|
||||
@ -4249,8 +4250,10 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
/**
|
||||
* Send a Server->Client packet UserInfo to this L2PcInstance and CharInfo to all L2PcInstance in its _KnownPlayers. <B><U> Concept</U> :</B> Others L2PcInstance in the detection area of the L2PcInstance are identified in <B>_knownPlayers</B>. In order to inform other players of this
|
||||
* L2PcInstance state modifications, server just need to go through _knownPlayers to send Server->Client Packet <B><U> Actions</U> :</B> <li>Send a Server->Client packet UserInfo to this L2PcInstance (Public and Private Data)</li> <li>Send a Server->Client packet CharInfo to all L2PcInstance in
|
||||
* _KnownPlayers of the L2PcInstance (Public data only)</li> <FONT COLOR=#FF0000><B> <U>Caution</U> : DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as MaxHP, STR, DEX...</B></FONT>
|
||||
* L2PcInstance state modifications, server just need to go through _knownPlayers to send Server->Client Packet <B><U> Actions</U> :</B>
|
||||
* <li>Send a Server->Client packet UserInfo to this L2PcInstance (Public and Private Data)</li>
|
||||
* <li>Send a Server->Client packet CharInfo to all L2PcInstance in _KnownPlayers of the L2PcInstance (Public data only)</li>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as MaxHP, STR, DEX...</B></FONT>
|
||||
*/
|
||||
public final void broadcastUserInfo()
|
||||
{
|
||||
@ -4432,8 +4435,10 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage Interact Task with another L2PcInstance. <B><U> Actions</U> :</B> <li>If the private store is a STORE_PRIVATE_SELL, send a Server->Client PrivateBuyListSell packet to the L2PcInstance</li> <li>If the private store is a STORE_PRIVATE_BUY, send a Server->Client PrivateBuyListBuy packet
|
||||
* to the L2PcInstance</li> <li>If the private store is a STORE_PRIVATE_MANUFACTURE, send a Server->Client RecipeShopSellList packet to the L2PcInstance</li>
|
||||
* Manage Interact Task with another L2PcInstance. <B><U> Actions</U> :</B>
|
||||
* <li>If the private store is a STORE_PRIVATE_SELL, send a Server->Client PrivateBuyListSell packet to the L2PcInstance</li>
|
||||
* <li>If the private store is a STORE_PRIVATE_BUY, send a Server->Client PrivateBuyListBuy packet to the L2PcInstance</li>
|
||||
* <li>If the private store is a STORE_PRIVATE_MANUFACTURE, send a Server->Client RecipeShopSellList packet to the L2PcInstance</li>
|
||||
* @param target The L2Character targeted
|
||||
*/
|
||||
public void doInteract(L2Character target)
|
||||
@ -4507,9 +4512,13 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage Pickup Task. <B><U> Actions</U> :</B> <li>Send a Server->Client packet StopMove to this L2PcInstance</li> <li>Remove the L2ItemInstance from the world and send server->client GetItem packets</li> <li>Send a System Message to the L2PcInstance : YOU_PICKED_UP_S1_ADENA or
|
||||
* YOU_PICKED_UP_S1_S2</li> <li>Add the Item to the L2PcInstance inventory</li> <li>Send a Server->Client packet InventoryUpdate to this L2PcInstance with NewItem (use a new slot) or ModifiedItem (increase amount)</li> <li>Send a Server->Client packet StatusUpdate to this L2PcInstance with
|
||||
* current weight</li> <FONT COLOR=#FF0000><B> <U>Caution</U> : If a Party is in progress, distribute Items between party members</B></FONT>
|
||||
* Manage Pickup Task. <B><U> Actions</U> :</B>
|
||||
* <li>Send a Server->Client packet StopMove to this L2PcInstance</li>
|
||||
* <li>Remove the L2ItemInstance from the world and send server->client GetItem packets</li>
|
||||
* <li>Send a System Message to the L2PcInstance : YOU_PICKED_UP_S1_ADENA or YOU_PICKED_UP_S1_S2</li>
|
||||
* <li>Add the Item to the L2PcInstance inventory</li>
|
||||
* <li>Send a Server->Client packet InventoryUpdate to this L2PcInstance with NewItem (use a new slot) or ModifiedItem (increase amount)</li>
|
||||
* <li>Send a Server->Client packet StatusUpdate to this L2PcInstance with current weight</li> <FONT COLOR=#FF0000><B> <U>Caution</U> : If a Party is in progress, distribute Items between party members</B></FONT>
|
||||
* @param object The L2ItemInstance to pick up
|
||||
*/
|
||||
@Override
|
||||
@ -5228,8 +5237,12 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Kill the L2Character, Apply Death Penalty, Manage gain/loss Karma and Item Drop. <B><U> Actions</U> :</B> <li>Reduce the Experience of the L2PcInstance in function of the calculated Death Penalty</li> <li>If necessary, unsummon the Pet of the killed L2PcInstance</li> <li>Manage Karma gain for
|
||||
* attacker and Karam loss for the killed L2PcInstance</li> <li>If the killed L2PcInstance has Karma, manage Drop Item</li> <li>Kill the L2PcInstance</li>
|
||||
* Kill the L2Character, Apply Death Penalty, Manage gain/loss Karma and Item Drop. <B><U> Actions</U> :</B>
|
||||
* <li>Reduce the Experience of the L2PcInstance in function of the calculated Death Penalty</li>
|
||||
* <li>If necessary, unsummon the Pet of the killed L2PcInstance</li>
|
||||
* <li>Manage Karma gain for attacker and Karam loss for the killed L2PcInstance</li>
|
||||
* <li>If the killed L2PcInstance has Karma, manage Drop Item</li>
|
||||
* <li>Kill the L2PcInstance</li>
|
||||
* @param killer
|
||||
*/
|
||||
@Override
|
||||
@ -5720,7 +5733,11 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
/**
|
||||
* Reduce the Experience (and level if necessary) of the L2PcInstance in function of the calculated Death Penalty.<BR>
|
||||
* <B><U> Actions</U> :</B> <li>Calculate the Experience loss</li> <li>Set the value of _expBeforeDeath</li> <li>Set the new Experience value of the L2PcInstance and Decrease its level if necessary</li> <li>Send a Server->Client StatusUpdate packet with its new Experience</li>
|
||||
* <B><U> Actions</U> :</B>
|
||||
* <li>Calculate the Experience loss</li>
|
||||
* <li>Set the value of _expBeforeDeath</li>
|
||||
* <li>Set the new Experience value of the L2PcInstance and Decrease its level if necessary</li>
|
||||
* <li>Send a Server->Client StatusUpdate packet with its new Experience</li>
|
||||
* @param killer
|
||||
* @param atWar
|
||||
*/
|
||||
@ -5795,7 +5812,9 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the HP/MP/CP Regeneration task. <B><U> Actions</U> :</B> <li>Set the RegenActive flag to False</li> <li>Stop the HP/MP/CP Regeneration task</li>
|
||||
* Stop the HP/MP/CP Regeneration task. <B><U> Actions</U> :</B>
|
||||
* <li>Set the RegenActive flag to False</li>
|
||||
* <li>Stop the HP/MP/CP Regeneration task</li>
|
||||
*/
|
||||
public void stopAllTimers()
|
||||
{
|
||||
@ -6158,7 +6177,10 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Private Store type of the L2PcInstance. <B><U> Values </U> :</B> <li>0 : STORE_PRIVATE_NONE</li> <li>1 : STORE_PRIVATE_SELL</li> <li>2 : sellmanage</li><BR>
|
||||
* Set the Private Store type of the L2PcInstance. <B><U> Values </U> :</B>
|
||||
* <li>0 : STORE_PRIVATE_NONE</li>
|
||||
* <li>1 : STORE_PRIVATE_SELL</li>
|
||||
* <li>2 : sellmanage</li><BR>
|
||||
* <li>3 : STORE_PRIVATE_BUY</li><BR>
|
||||
* <li>4 : buymanage</li><BR>
|
||||
* <li>5 : STORE_PRIVATE_MANUFACTURE</li><BR>
|
||||
@ -6175,7 +6197,10 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* <B><U> Values </U> :</B> <li>0 : STORE_PRIVATE_NONE</li> <li>1 : STORE_PRIVATE_SELL</li> <li>2 : sellmanage</li><BR>
|
||||
* <B><U> Values </U> :</B>
|
||||
* <li>0 : STORE_PRIVATE_NONE</li>
|
||||
* <li>1 : STORE_PRIVATE_SELL</li>
|
||||
* <li>2 : sellmanage</li><BR>
|
||||
* <li>3 : STORE_PRIVATE_BUY</li><BR>
|
||||
* <li>4 : buymanage</li><BR>
|
||||
* <li>5 : STORE_PRIVATE_MANUFACTURE</li><BR>
|
||||
@ -6989,8 +7014,11 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a L2PcInstance from the characters table of the database and add it in _allObjects of the L2world. <B><U> Actions</U> :</B> <li>Retrieve the L2PcInstance from the characters table of the database</li> <li>Add the L2PcInstance object in _allObjects</li> <li>Set the x,y,z position of
|
||||
* the L2PcInstance and make it invisible</li> <li>Update the overloaded status of the L2PcInstance</li>
|
||||
* Retrieve a L2PcInstance from the characters table of the database and add it in _allObjects of the L2world. <B><U> Actions</U> :</B>
|
||||
* <li>Retrieve the L2PcInstance from the characters table of the database</li>
|
||||
* <li>Add the L2PcInstance object in _allObjects</li>
|
||||
* <li>Set the x,y,z position of the L2PcInstance and make it invisible</li>
|
||||
* <li>Update the overloaded status of the L2PcInstance</li>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @return The L2PcInstance loaded from the database
|
||||
*/
|
||||
@ -7859,8 +7887,10 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a skill to the L2PcInstance _skills and its Func objects to the calculator set of the L2PcInstance and save update in the character_skills table of the database. <B><U> Concept</U> :</B> All skills own by a L2PcInstance are identified in <B>_skills</B> <B><U> Actions</U> :</B> <li>Replace
|
||||
* oldSkill by newSkill or Add the newSkill</li> <li>If an old skill has been replaced, remove all its Func objects of L2Character calculator set</li> <li>Add Func objects of newSkill to the calculator set of the L2Character</li>
|
||||
* Add a skill to the L2PcInstance _skills and its Func objects to the calculator set of the L2PcInstance and save update in the character_skills table of the database. <B><U> Concept</U> :</B> All skills own by a L2PcInstance are identified in <B>_skills</B> <B><U> Actions</U> :</B>
|
||||
* <li>Replace oldSkill by newSkill or Add the newSkill</li>
|
||||
* <li>If an old skill has been replaced, remove all its Func objects of L2Character calculator set</li>
|
||||
* <li>Add Func objects of newSkill to the calculator set of the L2Character</li>
|
||||
* @param newSkill The L2Skill to add to the L2Character
|
||||
* @param store
|
||||
* @return The L2Skill replaced or null if just added a new L2Skill
|
||||
@ -7891,8 +7921,10 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a skill from the L2Character and its Func objects from calculator set of the L2Character and save update in the character_skills table of the database. <B><U> Concept</U> :</B> All skills own by a L2Character are identified in <B>_skills</B> <B><U> Actions</U> :</B> <li>Remove the
|
||||
* skill from the L2Character _skills</li> <li>Remove all its Func objects from the L2Character calculator set</li> <B><U> Overridden in </U> :</B> <li>L2PcInstance : Save update in the character_skills table of the database</li>
|
||||
* Remove a skill from the L2Character and its Func objects from calculator set of the L2Character and save update in the character_skills table of the database. <B><U> Concept</U> :</B> All skills own by a L2Character are identified in <B>_skills</B> <B><U> Actions</U> :</B>
|
||||
* <li>Remove the skill from the L2Character _skills</li>
|
||||
* <li>Remove all its Func objects from the L2Character calculator set</li> <B><U> Overridden in </U> :</B>
|
||||
* <li>L2PcInstance : Save update in the character_skills table of the database</li>
|
||||
* @param skill The L2Skill to remove from the L2Character
|
||||
* @return The L2Skill removed
|
||||
*/
|
||||
@ -8826,7 +8858,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
switch (sklTargetType)
|
||||
{
|
||||
// Target the player if skill type is AURA, PARTY, CLAN or SELF
|
||||
// Target the player if skill type is AURA, PARTY, CLAN or SELF
|
||||
case AURA:
|
||||
case FRONT_AURA:
|
||||
case BEHIND_AURA:
|
||||
@ -9570,7 +9602,7 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
|
||||
if ((magic && (item.getItem().getDefaultAction() == ActionType.SPIRITSHOT)) //
|
||||
|| (physical && (item.getItem().getDefaultAction() == ActionType.SOULSHOT)))
|
||||
|| (physical && (item.getItem().getDefaultAction() == ActionType.SOULSHOT)))
|
||||
{
|
||||
handler.useItem(this, item, false);
|
||||
}
|
||||
@ -12855,7 +12887,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
final SystemMessage sm;
|
||||
|
||||
if (target.isInvul() && !target.isNpc())
|
||||
if (target.isInvul() && !target.isVulnerableFor(this) && !target.isNpc())
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.THE_ATTACK_HAS_BEEN_BLOCKED);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public class PcStatus extends PlayableStatus
|
||||
return;
|
||||
}
|
||||
|
||||
if (getActiveChar().isInvul() && !(isDOT || isHPConsumption))
|
||||
if (getActiveChar().isInvul() && !getActiveChar().isVulnerableFor(attacker) && !(isDOT || isHPConsumption))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.conditions;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.items.L2Item;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author NviX
|
||||
*/
|
||||
public class ConditionTargetHp extends Condition
|
||||
{
|
||||
private final int _hp;
|
||||
|
||||
/**
|
||||
* Instantiates a new condition target hp.
|
||||
* @param hp the hp
|
||||
*/
|
||||
public ConditionTargetHp(int hp)
|
||||
{
|
||||
_hp = hp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean testImpl(L2Character effector, L2Character effected, Skill skill, L2Item item)
|
||||
{
|
||||
return (effected != null) && (((effected.getCurrentHp() * 100) / effected.getMaxHp()) <= _hp);
|
||||
}
|
||||
|
||||
}
|
@ -200,6 +200,7 @@ public final class Skill implements IIdentifiable
|
||||
private final String _attribute;
|
||||
|
||||
private final boolean _ignoreShield;
|
||||
private final int _ignorePhysDefPercent;
|
||||
|
||||
private final boolean _isSuicideAttack;
|
||||
private final boolean _canBeDispeled;
|
||||
@ -335,6 +336,7 @@ public final class Skill implements IIdentifiable
|
||||
_minChance = set.getInt("minChance", Config.MIN_ABNORMAL_STATE_SUCCESS_RATE);
|
||||
_maxChance = set.getInt("maxChance", Config.MAX_ABNORMAL_STATE_SUCCESS_RATE);
|
||||
_ignoreShield = set.getBoolean("ignoreShld", false);
|
||||
_ignorePhysDefPercent = set.getInt("ignorePhysDefPercent", 0);
|
||||
|
||||
_nextActionIsAttack = set.getBoolean("nextActionAttack", false);
|
||||
|
||||
@ -1365,7 +1367,7 @@ public final class Skill implements IIdentifiable
|
||||
}
|
||||
|
||||
// Check bad skills against target.
|
||||
if ((effector != effected) && isBad() && (effected.isInvul() || (effector.isGM() && !effector.getAccessLevel().canGiveDamage())))
|
||||
if ((effector != effected) && isBad() && ((effected.isInvul() && (!effected.isVulnerableFor(effector))) || (effector.isGM() && !effector.getAccessLevel().canGiveDamage())))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1477,7 +1479,7 @@ public final class Skill implements IIdentifiable
|
||||
{
|
||||
switch (getId())
|
||||
{
|
||||
// TODO: replace with AI
|
||||
// TODO: replace with AI
|
||||
case 5852:
|
||||
case 5853:
|
||||
{
|
||||
@ -1652,6 +1654,14 @@ public final class Skill implements IIdentifiable
|
||||
return _ignoreShield;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the percent of ignore defense of this skill
|
||||
*/
|
||||
public int getIgnorePhysDefPercent()
|
||||
{
|
||||
return _ignorePhysDefPercent;
|
||||
}
|
||||
|
||||
public boolean canBeDispeled()
|
||||
{
|
||||
return _canBeDispeled;
|
||||
|
@ -746,17 +746,23 @@ public final class Formulas
|
||||
}
|
||||
damage = (skill != null) ? ((damage * ssBoost) + skill.getPower(attacker, target, isPvP, isPvE)) : (damage * ssBoost);
|
||||
|
||||
double reduceDef = 1;
|
||||
if (skill != null)
|
||||
{
|
||||
reduceDef -= (skill.getIgnorePhysDefPercent() / 100.0);
|
||||
}
|
||||
|
||||
if (crit)
|
||||
{
|
||||
// Finally retail like formula
|
||||
damage = 2 * attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill) * target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, null) * ((70 * damage) / defence);
|
||||
damage = 2 * attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill) * target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, null) * ((70 * damage) / (defence * reduceDef));
|
||||
// Crit dmg add is almost useless in normal hits...
|
||||
damage += ((attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 70) / defence);
|
||||
damage += ((attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 70) / (defence * reduceDef));
|
||||
damage += target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE_ADD, 0, target, skill);
|
||||
}
|
||||
else
|
||||
{
|
||||
damage = (70 * damage) / defence;
|
||||
damage = (70 * damage) / (defence * reduceDef);
|
||||
}
|
||||
|
||||
damage *= calcAttackTraitBonus(attacker, target);
|
||||
|
@ -59,6 +59,7 @@ public enum Stats
|
||||
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
|
||||
MAGIC_CRIT_DMG("mCritPower"),
|
||||
MAGIC_CRIT_DMG_ADD("mCritPowerAdd"),
|
||||
MOMENTUM_SKILL_POWER("momentumSkillPower"),
|
||||
|
||||
// PVP BONUS
|
||||
PVP_PHYSICAL_DMG("pvpPhysDmg"),
|
||||
|
Reference in New Issue
Block a user