Calculate magic success by target level and skill magic level configuration.
This commit is contained in:
@@ -170,6 +170,10 @@ FakeDeathUntarget = False
|
||||
# Stand when fake death is active and taking damage.
|
||||
FakeDeathDamageStand = True
|
||||
|
||||
# Calculate magic success by target level and skill magic level (when available).
|
||||
# Otherwise target level and (alternatively) attacker level is used.
|
||||
CalculateMagicSuccessBySkillMagicLevel = True
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Class, Sub-class and skill learning options
|
||||
|
@@ -186,6 +186,7 @@ public class Config
|
||||
public static long EFFECT_TICK_RATIO;
|
||||
public static boolean FAKE_DEATH_UNTARGET;
|
||||
public static boolean FAKE_DEATH_DAMAGE_STAND;
|
||||
public static boolean CALCULATE_MAGIC_SUCCESS_BY_SKILL_MAGIC_LEVEL;
|
||||
public static boolean ALLOW_CLASS_MASTERS;
|
||||
public static ClassMasterSettings CLASS_MASTER_SETTINGS;
|
||||
public static boolean ALLOW_ENTIRE_TREE;
|
||||
@@ -1748,6 +1749,7 @@ public class Config
|
||||
EFFECT_TICK_RATIO = characterConfig.getLong("EffectTickRatio", 666);
|
||||
FAKE_DEATH_UNTARGET = characterConfig.getBoolean("FakeDeathUntarget", false);
|
||||
FAKE_DEATH_DAMAGE_STAND = characterConfig.getBoolean("FakeDeathDamageStand", true);
|
||||
CALCULATE_MAGIC_SUCCESS_BY_SKILL_MAGIC_LEVEL = characterConfig.getBoolean("CalculateMagicSuccessBySkillMagicLevel", true);
|
||||
ALLOW_CLASS_MASTERS = characterConfig.getBoolean("AllowClassMasters", false);
|
||||
ALLOW_ENTIRE_TREE = characterConfig.getBoolean("AllowEntireTree", false);
|
||||
ALTERNATE_CLASS_MASTER = characterConfig.getBoolean("AlternateClassMaster", false);
|
||||
|
@@ -1431,9 +1431,7 @@ public class Formulas
|
||||
return true;
|
||||
}
|
||||
|
||||
// FIXME: Fix this LevelMod Formula.
|
||||
final int levelDifference = (target.getLevel() - (skill.getMagicLevel() > 0 ? skill.getMagicLevel() : attacker.getLevel()));
|
||||
final double lvlModifier = Math.pow(1.3, levelDifference);
|
||||
final double lvlModifier = Math.pow(1.3, target.getLevel() - (Config.CALCULATE_MAGIC_SUCCESS_BY_SKILL_MAGIC_LEVEL && (skill.getMagicLevel() > 0) ? skill.getMagicLevel() : attacker.getLevel()));
|
||||
float targetModifier = 1;
|
||||
if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LEVEL_MAGIC_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
|
||||
{
|
||||
|
Reference in New Issue
Block a user