Skill power multiplier is related to final damage.
This commit is contained in:
		@@ -147,11 +147,11 @@ public final class EnergyAttack extends AbstractEffect
 | 
			
		||||
			// ...................________Initial Damage_________...__Charges Additional Damage__...____________________________________
 | 
			
		||||
			// ATTACK CALCULATION ((77 * ((pAtk * lvlMod) + power) * (1 + (0.1 * chargesConsumed)) / pdef) * skillPower) + skillPowerAdd
 | 
			
		||||
			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^```^^^^^^^^^^^^^^^^^^^^^^^^^^^^^```^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 | 
			
		||||
			final double baseMod = (77 * ((attacker.getPAtk() * attacker.getLevelMod()) + (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0))) / defence;
 | 
			
		||||
			final double baseMod = (77 * ((attacker.getPAtk() * attacker.getLevelMod()) + _power + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0))) / defence;
 | 
			
		||||
			damage = baseMod * ssmod * critMod * weaponTraitMod * generalTraitMod * attributeMod * energyChargesBoost * pvpPveMod;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		damage = Math.max(0, damage);
 | 
			
		||||
		damage = Math.max(0, damage * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1));
 | 
			
		||||
		
 | 
			
		||||
		effector.doAttack(damage, effected, skill, false, false, critical, false);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -147,7 +147,7 @@ public final class PhysicalAttack extends AbstractEffect
 | 
			
		||||
			
 | 
			
		||||
			// Skill specific mods.
 | 
			
		||||
			final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77;
 | 
			
		||||
			final double power = (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double power = _power + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0;
 | 
			
		||||
			final double abnormalMod = _abnormals.stream().anyMatch(effected::hasAbnormalType) ? _abnormalPowerMod : 1;
 | 
			
		||||
			final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1;
 | 
			
		||||
@@ -169,6 +169,7 @@ public final class PhysicalAttack extends AbstractEffect
 | 
			
		||||
			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 | 
			
		||||
			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence;
 | 
			
		||||
			damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod;
 | 
			
		||||
			damage *= effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		effector.doAttack(damage, effected, skill, false, false, critical, false);
 | 
			
		||||
 
 | 
			
		||||
@@ -107,7 +107,7 @@ public final class PhysicalAttackHpLink extends AbstractEffect
 | 
			
		||||
			
 | 
			
		||||
			// Skill specific mods.
 | 
			
		||||
			final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77;
 | 
			
		||||
			final double power = (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double power = _power + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0;
 | 
			
		||||
			final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1;
 | 
			
		||||
			double ssmod = 1;
 | 
			
		||||
@@ -128,6 +128,7 @@ public final class PhysicalAttackHpLink extends AbstractEffect
 | 
			
		||||
			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 | 
			
		||||
			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence;
 | 
			
		||||
			damage = baseMod * ssmod * critMod * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod;
 | 
			
		||||
			damage *= effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1);
 | 
			
		||||
			damage *= -((effector.getCurrentHp() * 2) / effector.getMaxHp()) + 2;
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,7 @@ public final class PhysicalAttackSaveHp extends AbstractEffect
 | 
			
		||||
			
 | 
			
		||||
			// Skill specific mods.
 | 
			
		||||
			final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77;
 | 
			
		||||
			final double power = (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double power = _power + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0;
 | 
			
		||||
			final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1;
 | 
			
		||||
			double ssmod = 1;
 | 
			
		||||
@@ -141,6 +141,7 @@ public final class PhysicalAttackSaveHp extends AbstractEffect
 | 
			
		||||
			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 | 
			
		||||
			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence;
 | 
			
		||||
			damage = baseMod * ssmod * critMod * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod;
 | 
			
		||||
			damage *= effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		final double minHp = (effected.getMaxHp() * _saveHp) / 100;
 | 
			
		||||
 
 | 
			
		||||
@@ -141,7 +141,7 @@ public final class PhysicalAttackWeaponBonus extends AbstractEffect
 | 
			
		||||
			// Skill specific mods.
 | 
			
		||||
			final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77;
 | 
			
		||||
			final double weaponBonus = _weaponBonus.getOrDefault(effector.getAttackType(), 1.0);
 | 
			
		||||
			final double power = (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double power = _power + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0;
 | 
			
		||||
			final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1;
 | 
			
		||||
			double ssmod = 1;
 | 
			
		||||
@@ -162,6 +162,7 @@ public final class PhysicalAttackWeaponBonus extends AbstractEffect
 | 
			
		||||
			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 | 
			
		||||
			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence;
 | 
			
		||||
			damage = baseMod * ssmod * critMod * weaponBonus * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod;
 | 
			
		||||
			damage *= effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		effector.doAttack(damage, effected, skill, false, false, critical, false);
 | 
			
		||||
 
 | 
			
		||||
@@ -134,7 +134,7 @@ public final class PhysicalSoulAttack extends AbstractEffect
 | 
			
		||||
			
 | 
			
		||||
			// Skill specific mods.
 | 
			
		||||
			final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77;
 | 
			
		||||
			final double power = (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double power = _power + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0);
 | 
			
		||||
			final double rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0;
 | 
			
		||||
			final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1;
 | 
			
		||||
			double ssmod = 1;
 | 
			
		||||
@@ -156,6 +156,7 @@ public final class PhysicalSoulAttack extends AbstractEffect
 | 
			
		||||
			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 | 
			
		||||
			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence;
 | 
			
		||||
			damage = baseMod * soulsMod * ssmod * critMod * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod;
 | 
			
		||||
			damage *= effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		effector.doAttack(damage, effected, skill, false, false, critical, false);
 | 
			
		||||
 
 | 
			
		||||
@@ -141,7 +141,7 @@ public final class Formulas
 | 
			
		||||
		final double pvpPveMod = calculatePvpPveBonus(attacker, target, skill, mcrit);
 | 
			
		||||
		
 | 
			
		||||
		// MDAM Formula.
 | 
			
		||||
		double damage = ((attacker.getINT() * ((power * attacker.getStat().getValue(Stats.MAGICAL_SKILL_POWER, 1)) + attacker.getStat().getValue(Stats.SKILL_POWER_ADD, 0)) * Math.sqrt(mAtk)) / mDef) * shotsBonus;
 | 
			
		||||
		double damage = ((attacker.getINT() * (power + attacker.getStat().getValue(Stats.SKILL_POWER_ADD, 0)) * Math.sqrt(mAtk)) / mDef) * shotsBonus;
 | 
			
		||||
		
 | 
			
		||||
		// Failure calculation
 | 
			
		||||
		if (Config.ALT_GAME_MAGICFAILURES && !calcMagicSuccess(attacker, target, skill))
 | 
			
		||||
@@ -179,6 +179,7 @@ public final class Formulas
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		damage = damage * critMod * generalTraitMod * attributeMod * randomMod * pvpPveMod;
 | 
			
		||||
		damage *= attacker.getStat().getValue(Stats.MAGICAL_SKILL_POWER, 1);
 | 
			
		||||
		
 | 
			
		||||
		return damage;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user