Simplified implementation of SpeedLimit effect.
This commit is contained in:
@@ -315,6 +315,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999
|
# Default: 999999
|
||||||
MaxPAtk = 999999
|
MaxPAtk = 999999
|
||||||
|
|||||||
+1
@@ -328,6 +328,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -297,6 +297,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1765,6 +1766,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -56,7 +56,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +78,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,6 +315,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999
|
# Default: 999999
|
||||||
MaxPAtk = 999999
|
MaxPAtk = 999999
|
||||||
|
|||||||
+1
@@ -328,6 +328,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -297,6 +297,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1785,6 +1786,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -56,7 +56,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +78,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,6 +315,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999
|
# Default: 999999
|
||||||
MaxPAtk = 999999
|
MaxPAtk = 999999
|
||||||
|
|||||||
+1
@@ -328,6 +328,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -297,6 +297,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1798,6 +1799,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -56,7 +56,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +78,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,6 +315,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999
|
# Default: 999999
|
||||||
MaxPAtk = 999999
|
MaxPAtk = 999999
|
||||||
|
|||||||
+1
@@ -333,6 +333,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
Vendored
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -302,6 +302,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1785,6 +1786,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -56,7 +56,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +78,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,6 +315,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999
|
# Default: 999999
|
||||||
MaxPAtk = 999999
|
MaxPAtk = 999999
|
||||||
|
|||||||
+1
@@ -338,6 +338,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -307,6 +307,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1794,6 +1795,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -56,7 +56,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +78,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,6 +315,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999
|
# Default: 999999
|
||||||
MaxPAtk = 999999
|
MaxPAtk = 999999
|
||||||
|
|||||||
+1
@@ -339,6 +339,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -308,6 +308,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1801,6 +1802,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -56,7 +56,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +78,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -319,6 +319,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999999
|
# Default: 999999999
|
||||||
MaxPAtk = 999999999
|
MaxPAtk = 999999999
|
||||||
|
|||||||
+1
@@ -339,6 +339,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -308,6 +308,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1836,6 +1837,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -56,7 +56,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +78,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,6 +329,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999999
|
# Default: 999999999
|
||||||
MaxPAtk = 999999999
|
MaxPAtk = 999999999
|
||||||
|
|||||||
+1
@@ -339,6 +339,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
Vendored
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -307,6 +307,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1846,6 +1847,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -56,7 +56,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +78,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,6 +329,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999999
|
# Default: 999999999
|
||||||
MaxPAtk = 999999999
|
MaxPAtk = 999999999
|
||||||
|
|||||||
+1
@@ -341,6 +341,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -309,6 +309,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1819,6 +1820,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -61,7 +61,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,7 +83,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,6 +329,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999999
|
# Default: 999999999
|
||||||
MaxPAtk = 999999999
|
MaxPAtk = 999999999
|
||||||
|
|||||||
Vendored
+1
@@ -342,6 +342,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
Vendored
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -309,6 +309,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1821,6 +1822,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -173,6 +173,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -61,7 +61,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,7 +83,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,6 +329,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999999
|
# Default: 999999999
|
||||||
MaxPAtk = 999999999
|
MaxPAtk = 999999999
|
||||||
|
|||||||
+1
@@ -344,6 +344,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -311,6 +311,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1821,6 +1822,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -61,7 +61,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,7 +83,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,6 +234,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999
|
# Default: 999999
|
||||||
MaxPAtk = 999999
|
MaxPAtk = 999999
|
||||||
|
|||||||
+1
@@ -324,6 +324,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
Vendored
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -293,6 +293,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ public class Config
|
|||||||
public static double MAX_BONUS_EXP;
|
public static double MAX_BONUS_EXP;
|
||||||
public static double MAX_BONUS_SP;
|
public static double MAX_BONUS_SP;
|
||||||
public static int MAX_RUN_SPEED;
|
public static int MAX_RUN_SPEED;
|
||||||
|
public static int MAX_RUN_SPEED_SUMMON;
|
||||||
public static int MAX_PATK;
|
public static int MAX_PATK;
|
||||||
public static int MAX_MATK;
|
public static int MAX_MATK;
|
||||||
public static int MAX_PCRIT_RATE;
|
public static int MAX_PCRIT_RATE;
|
||||||
@@ -1732,6 +1733,7 @@ public class Config
|
|||||||
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
MAX_BONUS_EXP = characterConfig.getDouble("MaxExpBonus", 0);
|
||||||
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
MAX_BONUS_SP = characterConfig.getDouble("MaxSpBonus", 0);
|
||||||
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
MAX_RUN_SPEED = characterConfig.getInt("MaxRunSpeed", 300);
|
||||||
|
MAX_RUN_SPEED_SUMMON = characterConfig.getInt("MaxRunSpeedSummon", 350);
|
||||||
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
MAX_PATK = characterConfig.getInt("MaxPAtk", 999999);
|
||||||
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
MAX_MATK = characterConfig.getInt("MaxMAtk", 999999);
|
||||||
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
MAX_PCRIT_RATE = characterConfig.getInt("MaxPCritRate", 500);
|
||||||
|
|||||||
+4
-4
@@ -38,9 +38,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getRunSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ public class SummonStat extends PlayableStat
|
|||||||
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
final double val = super.getWalkSpeed() + Config.RUN_SPD_BOOST;
|
||||||
|
|
||||||
// Apply max run speed cap.
|
// Apply max run speed cap.
|
||||||
if (val > (Config.MAX_RUN_SPEED + 50)) // In retail maximum run speed is 350 for summons and 300 for players
|
if (val > Config.MAX_RUN_SPEED_SUMMON) // In retail maximum run speed is 350 for summons and 300 for players
|
||||||
{
|
{
|
||||||
return Config.MAX_RUN_SPEED + 50;
|
return Config.MAX_RUN_SPEED_SUMMON;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ public enum Stat
|
|||||||
|
|
||||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||||
MOVE_SPEED("moveSpeed"),
|
MOVE_SPEED("moveSpeed"),
|
||||||
|
SPEED_LIMIT("speedLimit"),
|
||||||
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
RUN_SPEED("runSpd", new SpeedFinalizer()),
|
||||||
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
WALK_SPEED("walkSpd", new SpeedFinalizer()),
|
||||||
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
SWIM_RUN_SPEED("fastSwimSpd", new SpeedFinalizer()),
|
||||||
|
|||||||
+16
-2
@@ -56,7 +56,21 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
baseValue += bonusDex;
|
baseValue += bonusDex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, creature.isPlayable() ? Config.MAX_RUN_SPEED : Double.MAX_VALUE);
|
final double maxSpeed;
|
||||||
|
if (creature.isPlayer())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else if (creature.isSummon())
|
||||||
|
{
|
||||||
|
maxSpeed = Config.MAX_RUN_SPEED_SUMMON + creature.getStat().getValue(Stat.SPEED_LIMIT, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxSpeed = Double.MAX_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue), 1, maxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +78,7 @@ public class SpeedFinalizer implements IStatFunction
|
|||||||
{
|
{
|
||||||
if (isBlessed)
|
if (isBlessed)
|
||||||
{
|
{
|
||||||
return (1 * Math.max(enchantLevel - 3, 0)) + (1 * Math.max(enchantLevel - 6, 0));
|
return Math.max(enchantLevel - 3, 0) + Math.max(enchantLevel - 6, 0);
|
||||||
}
|
}
|
||||||
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
return (0.6 * Math.max(enchantLevel - 3, 0)) + (0.6 * Math.max(enchantLevel - 6, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,6 +234,10 @@ MaxSpBonus = 0
|
|||||||
# Default: 300
|
# Default: 300
|
||||||
MaxRunSpeed = 300
|
MaxRunSpeed = 300
|
||||||
|
|
||||||
|
# Maximum summon running speed.
|
||||||
|
# Default: 350
|
||||||
|
MaxRunSpeedSummon = 350
|
||||||
|
|
||||||
# Maximum character Physical Attack.
|
# Maximum character Physical Attack.
|
||||||
# Default: 999999
|
# Default: 999999
|
||||||
MaxPAtk = 999999
|
MaxPAtk = 999999
|
||||||
|
|||||||
+1
@@ -324,6 +324,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
EffectHandler.getInstance().registerHandler("Sow", Sow::new);
|
||||||
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
EffectHandler.getInstance().registerHandler("Speed", Speed::new);
|
||||||
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
EffectHandler.getInstance().registerHandler("SphericBarrier", SphericBarrier::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("SpeedLimit", SpeedLimit::new);
|
||||||
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
EffectHandler.getInstance().registerHandler("SpModify", SpModify::new);
|
||||||
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
EffectHandler.getInstance().registerHandler("Spoil", Spoil::new);
|
||||||
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
EffectHandler.getInstance().registerHandler("StatAddForLevel", StatAddForLevel::new);
|
||||||
|
|||||||
Vendored
+31
@@ -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 dontknowdontcare
|
||||||
|
*/
|
||||||
|
public class SpeedLimit extends AbstractStatEffect
|
||||||
|
{
|
||||||
|
public SpeedLimit(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.SPEED_LIMIT);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -293,6 +293,7 @@ SoulEating: Absorbs souls when taking exp from mobs and sets max soul count.
|
|||||||
Sow: Planting a seed into NPC target. Manor stuff.
|
Sow: Planting a seed into NPC target. Manor stuff.
|
||||||
Speed: Speed stat.
|
Speed: Speed stat.
|
||||||
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
SphericBarrier: Blocks damage and buff/debuff incoming from outside the specified range.
|
||||||
|
SpeedLimit: Increase a character's max Speed limit. (l2jmobius)
|
||||||
SpModify: Bonus SP stat.
|
SpModify: Bonus SP stat.
|
||||||
Spoil: Spoils a mob activating its extra sweep drop.
|
Spoil: Spoils a mob activating its extra sweep drop.
|
||||||
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
StatAddForLevel: Adds a fixed amount of a Stat for a specific player level. (l2jmobius)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user