AbstractStatPercentEffect stats should use the mul getter.
This commit is contained in:
+4
-4
@@ -386,10 +386,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
||||||
int leftHeight = 0;
|
int leftHeight = 0;
|
||||||
int rightHeight = 0;
|
int rightHeight = 0;
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
final StringBuilder leftSb = new StringBuilder();
|
final StringBuilder leftSb = new StringBuilder();
|
||||||
final StringBuilder rightSb = new StringBuilder();
|
final StringBuilder rightSb = new StringBuilder();
|
||||||
String limitReachedMsg = "";
|
String limitReachedMsg = "";
|
||||||
|
|||||||
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
@@ -681,7 +681,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
@@ -4414,8 +4414,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4423,7 +4423,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -476,7 +476,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -552,7 +552,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -839,7 +839,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -889,10 +889,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -919,7 +919,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,28 +1590,28 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dragon weapon defence stat.
|
// Dragon weapon defence stat.
|
||||||
final double dragonDefense;
|
final double dragonDefense;
|
||||||
if (attackerPlayer.isDragonWeaponEquipped())
|
if (attackerPlayer.isDragonWeaponEquipped())
|
||||||
{
|
{
|
||||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
dragonDefense = target.getStat().getMul(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1648,27 +1648,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
+4
-4
@@ -386,10 +386,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
||||||
int leftHeight = 0;
|
int leftHeight = 0;
|
||||||
int rightHeight = 0;
|
int rightHeight = 0;
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
final StringBuilder leftSb = new StringBuilder();
|
final StringBuilder leftSb = new StringBuilder();
|
||||||
final StringBuilder rightSb = new StringBuilder();
|
final StringBuilder rightSb = new StringBuilder();
|
||||||
String limitReachedMsg = "";
|
String limitReachedMsg = "";
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
+1
-1
@@ -674,7 +674,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
@@ -4414,8 +4414,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4423,7 +4423,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -478,7 +478,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -554,7 +554,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -839,7 +839,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -889,10 +889,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -919,7 +919,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
+21
-21
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,28 +1590,28 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dragon weapon defence stat.
|
// Dragon weapon defence stat.
|
||||||
final double dragonDefense;
|
final double dragonDefense;
|
||||||
if (attackerPlayer.isDragonWeaponEquipped())
|
if (attackerPlayer.isDragonWeaponEquipped())
|
||||||
{
|
{
|
||||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
dragonDefense = target.getStat().getMul(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1648,27 +1648,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
+4
-4
@@ -386,10 +386,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
||||||
int leftHeight = 0;
|
int leftHeight = 0;
|
||||||
int rightHeight = 0;
|
int rightHeight = 0;
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
final StringBuilder leftSb = new StringBuilder();
|
final StringBuilder leftSb = new StringBuilder();
|
||||||
final StringBuilder rightSb = new StringBuilder();
|
final StringBuilder rightSb = new StringBuilder();
|
||||||
String limitReachedMsg = "";
|
String limitReachedMsg = "";
|
||||||
|
|||||||
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
@@ -4414,8 +4414,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4423,7 +4423,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -478,7 +478,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -554,7 +554,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -839,7 +839,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -889,10 +889,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -919,7 +919,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,28 +1590,28 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dragon weapon defence stat.
|
// Dragon weapon defence stat.
|
||||||
final double dragonDefense;
|
final double dragonDefense;
|
||||||
if (attackerPlayer.isDragonWeaponEquipped())
|
if (attackerPlayer.isDragonWeaponEquipped())
|
||||||
{
|
{
|
||||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
dragonDefense = target.getStat().getMul(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1648,27 +1648,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
+4
-4
@@ -386,10 +386,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
||||||
int leftHeight = 0;
|
int leftHeight = 0;
|
||||||
int rightHeight = 0;
|
int rightHeight = 0;
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
final StringBuilder leftSb = new StringBuilder();
|
final StringBuilder leftSb = new StringBuilder();
|
||||||
final StringBuilder rightSb = new StringBuilder();
|
final StringBuilder rightSb = new StringBuilder();
|
||||||
String limitReachedMsg = "";
|
String limitReachedMsg = "";
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
+1
-1
@@ -674,7 +674,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
@@ -4414,8 +4414,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4423,7 +4423,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -473,7 +473,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -549,7 +549,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -839,7 +839,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -889,10 +889,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -919,7 +919,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
+2
-2
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
+21
-21
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,28 +1590,28 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dragon weapon defence stat.
|
// Dragon weapon defence stat.
|
||||||
final double dragonDefense;
|
final double dragonDefense;
|
||||||
if (attackerPlayer.isDragonWeaponEquipped())
|
if (attackerPlayer.isDragonWeaponEquipped())
|
||||||
{
|
{
|
||||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
dragonDefense = target.getStat().getMul(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1648,27 +1648,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
+4
-4
@@ -386,10 +386,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
||||||
int leftHeight = 0;
|
int leftHeight = 0;
|
||||||
int rightHeight = 0;
|
int rightHeight = 0;
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
final StringBuilder leftSb = new StringBuilder();
|
final StringBuilder leftSb = new StringBuilder();
|
||||||
final StringBuilder rightSb = new StringBuilder();
|
final StringBuilder rightSb = new StringBuilder();
|
||||||
String limitReachedMsg = "";
|
String limitReachedMsg = "";
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
@@ -660,7 +660,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
@@ -4414,8 +4414,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4423,7 +4423,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -479,7 +479,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -555,7 +555,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -839,7 +839,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -889,10 +889,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -919,7 +919,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,28 +1590,28 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dragon weapon defence stat.
|
// Dragon weapon defence stat.
|
||||||
final double dragonDefense;
|
final double dragonDefense;
|
||||||
if (attackerPlayer.isDragonWeaponEquipped())
|
if (attackerPlayer.isDragonWeaponEquipped())
|
||||||
{
|
{
|
||||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
dragonDefense = target.getStat().getMul(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1648,27 +1648,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
+4
-4
@@ -386,10 +386,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
||||||
int leftHeight = 0;
|
int leftHeight = 0;
|
||||||
int rightHeight = 0;
|
int rightHeight = 0;
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
final StringBuilder leftSb = new StringBuilder();
|
final StringBuilder leftSb = new StringBuilder();
|
||||||
final StringBuilder rightSb = new StringBuilder();
|
final StringBuilder rightSb = new StringBuilder();
|
||||||
String limitReachedMsg = "";
|
String limitReachedMsg = "";
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
@@ -660,7 +660,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
@@ -4414,8 +4414,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4423,7 +4423,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -479,7 +479,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -555,7 +555,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -839,7 +839,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -889,10 +889,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -919,7 +919,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,28 +1590,28 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dragon weapon defence stat.
|
// Dragon weapon defence stat.
|
||||||
final double dragonDefense;
|
final double dragonDefense;
|
||||||
if (attackerPlayer.isDragonWeaponEquipped())
|
if (attackerPlayer.isDragonWeaponEquipped())
|
||||||
{
|
{
|
||||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
dragonDefense = target.getStat().getMul(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1648,27 +1648,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
+4
-4
@@ -386,10 +386,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
||||||
int leftHeight = 0;
|
int leftHeight = 0;
|
||||||
int rightHeight = 0;
|
int rightHeight = 0;
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
final StringBuilder leftSb = new StringBuilder();
|
final StringBuilder leftSb = new StringBuilder();
|
||||||
final StringBuilder rightSb = new StringBuilder();
|
final StringBuilder rightSb = new StringBuilder();
|
||||||
String limitReachedMsg = "";
|
String limitReachedMsg = "";
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
@@ -660,7 +660,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
@@ -4414,8 +4414,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4423,7 +4423,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -479,7 +479,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -555,7 +555,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -839,7 +839,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -889,10 +889,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -919,7 +919,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,28 +1590,28 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dragon weapon defence stat.
|
// Dragon weapon defence stat.
|
||||||
final double dragonDefense;
|
final double dragonDefense;
|
||||||
if (attackerPlayer.isDragonWeaponEquipped())
|
if (attackerPlayer.isDragonWeaponEquipped())
|
||||||
{
|
{
|
||||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
dragonDefense = target.getStat().getMul(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1648,27 +1648,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
+4
-4
@@ -386,10 +386,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
||||||
int leftHeight = 0;
|
int leftHeight = 0;
|
||||||
int rightHeight = 0;
|
int rightHeight = 0;
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
final StringBuilder leftSb = new StringBuilder();
|
final StringBuilder leftSb = new StringBuilder();
|
||||||
final StringBuilder rightSb = new StringBuilder();
|
final StringBuilder rightSb = new StringBuilder();
|
||||||
String limitReachedMsg = "";
|
String limitReachedMsg = "";
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
+1
-1
@@ -671,7 +671,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
@@ -4413,8 +4413,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4422,7 +4422,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -477,7 +477,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -553,7 +553,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -839,7 +839,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -889,10 +889,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -919,7 +919,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
+2
-2
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
+21
-21
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,28 +1590,28 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dragon weapon defence stat.
|
// Dragon weapon defence stat.
|
||||||
final double dragonDefense;
|
final double dragonDefense;
|
||||||
if (attackerPlayer.isDragonWeaponEquipped())
|
if (attackerPlayer.isDragonWeaponEquipped())
|
||||||
{
|
{
|
||||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
dragonDefense = target.getStat().getMul(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1648,27 +1648,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
+4
-4
@@ -386,10 +386,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
final DecimalFormat chanceFormat = new DecimalFormat("0.00##");
|
||||||
int leftHeight = 0;
|
int leftHeight = 0;
|
||||||
int rightHeight = 0;
|
int rightHeight = 0;
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
final StringBuilder leftSb = new StringBuilder();
|
final StringBuilder leftSb = new StringBuilder();
|
||||||
final StringBuilder rightSb = new StringBuilder();
|
final StringBuilder rightSb = new StringBuilder();
|
||||||
String limitReachedMsg = "";
|
String limitReachedMsg = "";
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
@@ -671,7 +671,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
@@ -4413,8 +4413,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4422,7 +4422,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -477,7 +477,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -553,7 +553,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -839,7 +839,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -889,10 +889,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -919,7 +919,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,28 +1590,28 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dragon weapon defence stat.
|
// Dragon weapon defence stat.
|
||||||
final double dragonDefense;
|
final double dragonDefense;
|
||||||
if (attackerPlayer.isDragonWeaponEquipped())
|
if (attackerPlayer.isDragonWeaponEquipped())
|
||||||
{
|
{
|
||||||
dragonDefense = target.getStat().getValue(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
dragonDefense = target.getStat().getMul(Stat.DRAGON_WEAPON_DEFENCE, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1648,27 +1648,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
Vendored
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
+1
-1
@@ -674,7 +674,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
+3
-3
@@ -4404,8 +4404,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4413,7 +4413,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -473,7 +473,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -549,7 +549,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -840,7 +840,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -890,10 +890,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -911,7 +911,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
+2
-2
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
+20
-20
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,21 +1590,21 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
|
return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
|
||||||
@@ -1637,27 +1637,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
Vendored
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
+1
-1
@@ -674,7 +674,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
+3
-3
@@ -4404,8 +4404,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
double damage = damageValue;
|
double damage = damageValue;
|
||||||
if (target.isImmobilized())
|
if (target.isImmobilized())
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
damage *= _stat.getMul(Stat.IMMOBILE_DAMAGE_BONUS, 1);
|
||||||
damage /= target.getStat().getValue(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
damage /= target.getStat().getMul(Stat.IMMOBILE_DAMAGE_RESIST, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!reflect && !isDOT)
|
if (!reflect && !isDOT)
|
||||||
@@ -4413,7 +4413,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// RearDamage effect bonus.
|
// RearDamage effect bonus.
|
||||||
if (isBehind(target))
|
if (isBehind(target))
|
||||||
{
|
{
|
||||||
damage *= _stat.getValue(Stat.REAR_DAMAGE_RATE, 1);
|
damage *= _stat.getMul(Stat.REAR_DAMAGE_RATE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counterattacks happen before damage received.
|
// Counterattacks happen before damage received.
|
||||||
|
|||||||
+2
-2
@@ -473,7 +473,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityExpBonus()
|
public double getVitalityExpBonus()
|
||||||
{
|
{
|
||||||
return (getVitalityPoints() > 0) ? getValue(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
return (getVitalityPoints() > 0) ? getMul(Stat.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVitalityPoints(int value)
|
public void setVitalityPoints(int value)
|
||||||
@@ -549,7 +549,7 @@ public class PlayerStat extends PlayableStat
|
|||||||
|
|
||||||
if (points < 0) // vitality consumed
|
if (points < 0) // vitality consumed
|
||||||
{
|
{
|
||||||
double consumeRate = getValue(Stat.VITALITY_CONSUME_RATE, 1);
|
double consumeRate = getMul(Stat.VITALITY_CONSUME_RATE, 1);
|
||||||
if (consumeRate <= 0)
|
if (consumeRate <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -840,7 +840,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
@@ -890,10 +890,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bonus drop amount effect
|
// bonus drop amount effect
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
if (itemId == Inventory.ADENA_ID)
|
if (itemId == Inventory.ADENA_ID)
|
||||||
{
|
{
|
||||||
rateAmount *= killer.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally
|
// finally
|
||||||
@@ -911,7 +911,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
|
|
||||||
// calculate if item will be rewarded
|
// calculate if item will be rewarded
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
+2
-2
@@ -313,8 +313,8 @@ public class Fishing
|
|||||||
{
|
{
|
||||||
final FishingData fishingData = FishingData.getInstance();
|
final FishingData fishingData = FishingData.getInstance();
|
||||||
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
final double lvlModifier = (Math.pow(_player.getLevel(), 2.2) * fishingCatchData.getMultiplier());
|
||||||
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long xp = (long) (Rnd.get(fishingData.getExpRateMin(), fishingData.getExpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getValue(Stat.FISHING_EXP_SP_BONUS, 1));
|
final long sp = (long) (Rnd.get(fishingData.getSpRateMin(), fishingData.getSpRateMax()) * lvlModifier * _player.getStat().getMul(Stat.FISHING_EXP_SP_BONUS, 1));
|
||||||
_player.addExpAndSp(xp, sp, true);
|
_player.addExpAndSp(xp, sp, true);
|
||||||
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
_player.getInventory().addItem("Fishing Reward", fishingCatchData.getItemId(), 1, _player, null);
|
||||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||||
|
|||||||
+20
-20
@@ -842,7 +842,7 @@ public class Formulas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// general magic resist
|
// general magic resist
|
||||||
final double resModifier = target.getStat().getValue(Stat.MAGIC_SUCCESS_RES, 1);
|
final double resModifier = target.getStat().getMul(Stat.MAGIC_SUCCESS_RES, 1);
|
||||||
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
final int rate = 100 - Math.round((float) (mAccModifier * lvlModifier * targetModifier * resModifier));
|
||||||
|
|
||||||
return (Rnd.get(100) < rate);
|
return (Rnd.get(100) < rate);
|
||||||
@@ -965,7 +965,7 @@ public class Formulas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getValue(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
final double chance = BaseStat.values()[val].calcBonus(actor) * actor.getStat().getMul(Stat.SKILL_CRITICAL_PROBABILITY, 1);
|
||||||
|
|
||||||
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
return ((Rnd.nextDouble() * 100.) < (chance * Config.SKILL_MASTERY_CHANCE_MULTIPLIERS[actor.getActingPlayer().getClassId().getId()]));
|
||||||
}
|
}
|
||||||
@@ -1590,21 +1590,21 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvP
|
// Magical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DAMAGE, 1) * Config.PVP_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_MAGICAL_SKILL_DEFENCE, 1) * Config.PVP_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvP
|
// Physical Skill PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DAMAGE, 1) * Config.PVP_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_SKILL_DEFENCE, 1) * Config.PVP_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvP
|
// Autoattack PvP
|
||||||
pvpAttack = attacker.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
pvpAttack = attacker.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DAMAGE, 1) * Config.PVP_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()];
|
||||||
pvpDefense = target.getStat().getValue(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
pvpDefense = target.getStat().getMul(Stat.PVP_PHYSICAL_ATTACK_DEFENCE, 1) * Config.PVP_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
|
return Math.max(0.05, 1 + (pvpAttack - pvpDefense)); // Bonus should not be negative.
|
||||||
@@ -1637,27 +1637,27 @@ public class Formulas
|
|||||||
if (skill.isMagic())
|
if (skill.isMagic())
|
||||||
{
|
{
|
||||||
// Magical Skill PvE
|
// Magical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_MAGICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_MAGICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_MAGICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Physical Skill PvE
|
// Physical Skill PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_SKILL_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_SKILL_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_SKILL_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Autoattack PvE
|
// Autoattack PvE
|
||||||
pveAttack = attacker.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
pveAttack = attacker.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DAMAGE, 1) * (attackerPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DAMAGE_MULTIPLIERS[attackerPlayer.getClassId().getId()]);
|
||||||
pveDefense = target.getStat().getValue(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
pveDefense = target.getStat().getMul(Stat.PVE_PHYSICAL_ATTACK_DEFENCE, 1) * (targetPlayer == null ? 1 : Config.PVE_PHYSICAL_ATTACK_DEFENCE_MULTIPLIERS[targetPlayer.getClassId().getId()]);
|
||||||
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
pveRaidAttack = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DAMAGE, 1) : 1;
|
||||||
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getValue(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
pveRaidDefense = attacker.isRaid() ? attacker.getStat().getMul(Stat.PVE_RAID_PHYSICAL_ATTACK_DEFENCE, 1) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
return Math.max(0.05, (1 + ((pveAttack * pveRaidAttack) - (pveDefense * pveRaidDefense))) * pvePenalty); // Bonus should not be negative.
|
||||||
|
|||||||
Vendored
+4
-4
@@ -169,10 +169,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
final int start = (page - 1) * 14;
|
final int start = (page - 1) * 14;
|
||||||
final int end = Math.min(list.size() - 1, start + 14);
|
final int end = Math.min(list.size() - 1, start + 14);
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
final double dropAmountAdenaEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_ADENA, 1);
|
final double dropAmountAdenaEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||||
final double dropAmountEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_AMOUNT, 1);
|
final double dropAmountEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||||
final double dropRateEffectBonus = player.getStat().getValue(Stat.BONUS_DROP_RATE, 1);
|
final double dropRateEffectBonus = player.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
final double spoilRateEffectBonus = player.getStat().getValue(Stat.BONUS_SPOIL_RATE, 1);
|
final double spoilRateEffectBonus = player.getStat().getMul(Stat.BONUS_SPOIL_RATE, 1);
|
||||||
for (int index = start; index <= end; index++)
|
for (int index = start; index <= end; index++)
|
||||||
{
|
{
|
||||||
final CBDropHolder cbDropHolder = list.get(index);
|
final CBDropHolder cbDropHolder = list.get(index);
|
||||||
|
|||||||
Vendored
+1
-1
@@ -64,7 +64,7 @@ public class RealDamage extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate resistance.
|
// Calculate resistance.
|
||||||
final double damage = _power - (_power * (Math.min(effected.getStat().getValue(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
final double damage = _power - (_power * (Math.min(effected.getStat().getMul(Stat.REAL_DAMAGE_RESIST, 1), 1.8) - 1));
|
||||||
|
|
||||||
// Do damage.
|
// Do damage.
|
||||||
if (damage > 0)
|
if (damage > 0)
|
||||||
|
|||||||
+1
-1
@@ -674,7 +674,7 @@ public class Attackable extends Npc
|
|||||||
double hateValue = (damage * 100) / (getLevel() + 7);
|
double hateValue = (damage * 100) / (getLevel() + 7);
|
||||||
if (skill == null)
|
if (skill == null)
|
||||||
{
|
{
|
||||||
hateValue *= attacker.getStat().getValue(Stat.HATE_ATTACK, 1);
|
hateValue *= attacker.getStat().getMul(Stat.HATE_ATTACK, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addDamageHate(attacker, damage, (int) hateValue);
|
addDamageHate(attacker, damage, (int) hateValue);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user