-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:
MobiusDev
2015-07-14 20:03:39 +00:00
parent b07f46dc5c
commit d722c7a961
26 changed files with 2227 additions and 1002 deletions

View File

@@ -18,6 +18,8 @@
*/
package handlers.effecthandlers;
import java.util.StringTokenizer;
import com.l2jserver.gameserver.enums.ShotType;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.actor.L2Character;
@@ -25,9 +27,11 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
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.AbnormalType;
import com.l2jserver.gameserver.model.skills.BuffInfo;
import com.l2jserver.gameserver.model.stats.BaseStats;
import com.l2jserver.gameserver.model.stats.Formulas;
import com.l2jserver.gameserver.model.stats.Stats;
/**
* Fatal Blow effect implementation.
@@ -35,9 +39,15 @@ import com.l2jserver.gameserver.model.stats.Formulas;
*/
public final class FatalBlow extends AbstractEffect
{
private final String _targetAbnormalType;
private final double _skillAddPower;
public FatalBlow(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
{
super(attachCond, applyCond, set, params);
_targetAbnormalType = params.getString("targetAbnormalType", "NULL");
_skillAddPower = params.getDouble("skillAddPower", 1);
}
@Override
@@ -73,6 +83,20 @@ public final class FatalBlow extends AbstractEffect
byte shld = Formulas.calcShldUse(activeChar, target, info.getSkill());
double damage = Formulas.calcBlowDamage(activeChar, target, info.getSkill(), shld, ss);
if (_targetAbnormalType != "NULL")
{
StringTokenizer st = new StringTokenizer(_targetAbnormalType, ",");
while (st.hasMoreTokens())
{
String abnormal = st.nextToken().trim();
if (target.getEffectList().getBuffInfoByAbnormalType(AbnormalType.valueOf(abnormal)) != null)
{
damage *= _skillAddPower;
break;
}
}
}
// 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);
if (crit)
@@ -80,6 +104,13 @@ public final class FatalBlow extends AbstractEffect
damage *= 2;
}
// reduce damage if target has maxdamage buff
double maxDamage = (target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
if (maxDamage > 0)
{
damage = (int) maxDamage;
}
target.reduceCurrentHp(damage, activeChar, info.getSkill());
target.notifyDamageReceived(damage, activeChar, info.getSkill(), crit, false);