Addition of area of effect damage effects.

Thanks to quangnguyen.
This commit is contained in:
MobiusDevelopment 2022-04-28 21:03:27 +00:00
parent eff5fcb4ed
commit 8f55f50b4d
13 changed files with 154 additions and 4 deletions

View File

@ -47,6 +47,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AgathionSlot", AgathionSlot::new);
EffectHandler.getInstance().registerHandler("AirBind", AirBind::new);
EffectHandler.getInstance().registerHandler("AreaDamage", AreaDamage::new);
EffectHandler.getInstance().registerHandler("AreaOfEffectDamageDefence", AreaOfEffectDamageDefence::new);
EffectHandler.getInstance().registerHandler("AreaOfEffectDamageModifier", AreaOfEffectDamageModifier::new);
EffectHandler.getInstance().registerHandler("ArtifactSlot", ArtifactSlot::new);
EffectHandler.getInstance().registerHandler("AttackAttribute", AttackAttribute::new);
EffectHandler.getInstance().registerHandler("AttackAttributeAdd", AttackAttributeAdd::new);

View File

@ -0,0 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author quangnguyen
*/
public class AreaOfEffectDamageDefence extends AbstractStatEffect
{
public AreaOfEffectDamageDefence(StatSet params)
{
super(params, Stat.AREA_OF_EFFECT_DAMAGE_DEFENCE);
}
}

View File

@ -0,0 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author quangnguyen
*/
public class AreaOfEffectDamageModifier extends AbstractStatPercentEffect
{
public AreaOfEffectDamageModifier(StatSet params)
{
super(params, Stat.AREA_OF_EFFECT_DAMAGE_MODIFIER);
}
}

View File

@ -16,6 +16,8 @@ AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport
AgathionSlot: Agathion slot modifier. (l2jmobius)
AirBind: Used by airbind chain skills. (l2jmobius)
AreaDamage: Topography (Danger Zone) resistance stat.
AreaOfEffectDamageDefence: Area of effect damage defence stat. (l2jmobius)
AreaOfEffectDamageModifier: Area of effect damage modifier. (l2jmobius)
ArtifactSlot: Artifact slot modifier. (l2jmobius)
AttackAttribute: Stat that increases specific attack attribute.
AttackAttributeAdd: Stat that increases all attack attribute.

View File

@ -197,6 +197,12 @@ public class Formulas
damage = damage * critMod * generalTraitMod * weaknessMod * attributeMod * randomMod * pvpPveMod;
damage *= attacker.getStat().getValue(Stat.MAGICAL_SKILL_POWER, 1);
// AoE modifiers.
if (skill.isBad() && (skill.getAffectLimit() > 0))
{
damage *= attacker.getStat().getMul(Stat.AREA_OF_EFFECT_DAMAGE_MODIFIER, 1) - target.getStat().getValue(Stat.AREA_OF_EFFECT_DAMAGE_DEFENCE, 0);
}
return damage;
}

View File

@ -134,8 +134,6 @@ public enum Stat
CRITICAL_RATE_SKILL("physicalSkillCriticalRate"),
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
DEFENCE_CRITICAL_RATE("defCritRate"),
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
@ -146,6 +144,10 @@ public enum Stat
DEFENCE_CRITICAL_DAMAGE_ADD("defCritDamageAdd"), // Resistance to critical damage in value (Example: +100 will be 100 more critical damage, NOT 100% more).
DEFENCE_CRITICAL_DAMAGE_SKILL("defCAtkSkill"),
DEFENCE_CRITICAL_DAMAGE_SKILL_ADD("defCAtkSkillAdd"),
AREA_OF_EFFECT_DAMAGE_MODIFIER("aoeDamageMofifier"),
AREA_OF_EFFECT_DAMAGE_DEFENCE("aoeDamageDefence"),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
INSTANT_KILL_RESIST("instantKillResist"),
EXPSP_RATE("rExp"),
ACTIVE_BONUS_EXP("activeBonusExp"), // Used to measure active skill bonus exp.

View File

@ -45,6 +45,8 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AgathionSlot", AgathionSlot::new);
EffectHandler.getInstance().registerHandler("AreaDamage", AreaDamage::new);
EffectHandler.getInstance().registerHandler("AreaOfEffectDamageDefence", AreaOfEffectDamageDefence::new);
EffectHandler.getInstance().registerHandler("AreaOfEffectDamageModifier", AreaOfEffectDamageModifier::new);
EffectHandler.getInstance().registerHandler("ArtifactSlot", ArtifactSlot::new);
EffectHandler.getInstance().registerHandler("AttackAttribute", AttackAttribute::new);
EffectHandler.getInstance().registerHandler("AttackAttributeAdd", AttackAttributeAdd::new);

View File

@ -0,0 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author quangnguyen
*/
public class AreaOfEffectDamageDefence extends AbstractStatEffect
{
public AreaOfEffectDamageDefence(StatSet params)
{
super(params, Stat.AREA_OF_EFFECT_DAMAGE_DEFENCE);
}
}

View File

@ -0,0 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 handlers.effecthandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author quangnguyen
*/
public class AreaOfEffectDamageModifier extends AbstractStatPercentEffect
{
public AreaOfEffectDamageModifier(StatSet params)
{
super(params, Stat.AREA_OF_EFFECT_DAMAGE_MODIFIER);
}
}

View File

@ -15,6 +15,8 @@ AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
AgathionSlot: Agathion slot modifier. (l2jmobius)
AreaDamage: Topography (Danger Zone) resistance stat.
AreaOfEffectDamageDefence: Area of effect damage defence stat. (l2jmobius)
AreaOfEffectDamageModifier: Area of effect damage modifier. (l2jmobius)
ArtifactSlot: Artifact slot modifier. (l2jmobius)
AttackAttribute: Stat that increases specific attack attribute.
AttackAttributeAdd: Stat that increases all attack attribute.

View File

@ -248,6 +248,8 @@ public enum AbnormalType
LIFE_FORCE_HARMONY(-1),
SWORD_SYMPHONY(-1),
PD_MD_DOWN(-1),
BLAZING_FURY(-1),
BLAZING_BEAST(-1),
AB_HAWK_EYE(0),
ALL_ATTACK_DOWN(1),
ALL_ATTACK_UP(2),

View File

@ -198,6 +198,12 @@ public class Formulas
damage = damage * critMod * generalTraitMod * weaknessMod * attributeMod * randomMod * pvpPveMod;
damage *= attacker.getStat().getValue(Stat.MAGICAL_SKILL_POWER, 1);
// AoE modifiers.
if (skill.isBad() && (skill.getAffectLimit() > 0))
{
damage *= attacker.getStat().getMul(Stat.AREA_OF_EFFECT_DAMAGE_MODIFIER, 1) - target.getStat().getValue(Stat.AREA_OF_EFFECT_DAMAGE_DEFENCE, 0);
}
return damage;
}

View File

@ -148,8 +148,6 @@ public enum Stat
MAX_MAGIC_CRITICAL_RATE("maxMagicCritRate"),
MAGIC_CRITICAL_RATE("mCritRate", new MCritRateFinalizer()),
MAGIC_CRITICAL_RATE_BY_CRITICAL_RATE("mCritRateByRCrit", Stat::defaultValue, MathUtil::add, MathUtil::mul, 0, 0),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
DEFENCE_CRITICAL_RATE("defCritRate"),
DEFENCE_CRITICAL_RATE_ADD("defCritRateAdd"),
DEFENCE_MAGIC_CRITICAL_RATE("defMCritRate"),
@ -160,6 +158,10 @@ public enum Stat
DEFENCE_CRITICAL_DAMAGE_ADD("defCritDamageAdd"), // Resistance to critical damage in value (Example: +100 will be 100 more critical damage, NOT 100% more).
DEFENCE_CRITICAL_DAMAGE_SKILL("defCAtkSkill"),
DEFENCE_CRITICAL_DAMAGE_SKILL_ADD("defCAtkSkillAdd"),
AREA_OF_EFFECT_DAMAGE_MODIFIER("aoeDamageMofifier"),
AREA_OF_EFFECT_DAMAGE_DEFENCE("aoeDamageDefence"),
BLOW_RATE("blowRate"),
BLOW_RATE_DEFENCE("blowRateDefence"),
INSTANT_KILL_RESIST("instantKillResist"),
EXPSP_RATE("rExp"),
ACTIVE_BONUS_EXP("activeBonusExp"), // Used to measure active skill bonus exp.