Use skill power bonuses for ranged bonus calculation.
This commit is contained in:
		| @@ -146,8 +146,9 @@ public final class PhysicalAttack extends AbstractEffect | ||||
| 			final double randomMod = effector.getRandomDamageMultiplier(); | ||||
| 			 | ||||
| 			// Skill specific mods. | ||||
| 			final double wpnMod = effector.getAttackType().isRanged() ? 70 : 77; | ||||
| 			final double rangedBonus = effector.getAttackType().isRanged() ? (attack + _power) : 0; | ||||
| 			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 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; | ||||
| 			double ssmod = 1; | ||||
| @@ -166,7 +167,7 @@ public final class PhysicalAttack extends AbstractEffect | ||||
| 			// ...................____________Melee Damage_____________......................................___________________Ranged Damage____________________ | ||||
| 			// ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef | ||||
| 			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
| 			final double baseMod = (wpnMod * ((attack * effector.getLevelMod()) + (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0) + rangedBonus)) / defence; | ||||
| 			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; | ||||
| 			damage = baseMod * abnormalMod * ssmod * critMod * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod; | ||||
| 		} | ||||
| 		 | ||||
|   | ||||
| @@ -106,8 +106,9 @@ public final class PhysicalAttackHpLink extends AbstractEffect | ||||
| 			final double randomMod = effector.getRandomDamageMultiplier(); | ||||
| 			 | ||||
| 			// Skill specific mods. | ||||
| 			final double wpnMod = effector.getAttackType().isRanged() ? 70 : 77; | ||||
| 			final double rangedBonus = effector.getAttackType().isRanged() ? (attack + _power) : 0; | ||||
| 			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 rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; | ||||
| 			final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; | ||||
| 			double ssmod = 1; | ||||
| 			if (skill.useSoulShot()) | ||||
| @@ -125,7 +126,7 @@ public final class PhysicalAttackHpLink extends AbstractEffect | ||||
| 			// ...................____________Melee Damage_____________......................................___________________Ranged Damage____________________ | ||||
| 			// ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef | ||||
| 			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
| 			final double baseMod = (wpnMod * ((attack * effector.getLevelMod()) + (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0) + rangedBonus)) / defence; | ||||
| 			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; | ||||
| 			damage = baseMod * ssmod * critMod * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod; | ||||
| 			damage *= -((effector.getCurrentHp() * 2) / effector.getMaxHp()) + 2; | ||||
| 		} | ||||
|   | ||||
| @@ -119,8 +119,9 @@ public final class PhysicalAttackSaveHp extends AbstractEffect | ||||
| 			final double randomMod = effector.getRandomDamageMultiplier(); | ||||
| 			 | ||||
| 			// Skill specific mods. | ||||
| 			final double wpnMod = effector.getAttackType().isRanged() ? 70 : 77; | ||||
| 			final double rangedBonus = effector.getAttackType().isRanged() ? (attack + _power) : 0; | ||||
| 			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 rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; | ||||
| 			final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; | ||||
| 			double ssmod = 1; | ||||
| 			if (skill.useSoulShot()) | ||||
| @@ -138,7 +139,7 @@ public final class PhysicalAttackSaveHp extends AbstractEffect | ||||
| 			// ...................____________Melee Damage_____________......................................___________________Ranged Damage____________________ | ||||
| 			// ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef | ||||
| 			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
| 			final double baseMod = (wpnMod * ((attack * effector.getLevelMod()) + (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0) + rangedBonus)) / defence; | ||||
| 			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; | ||||
| 			damage = baseMod * ssmod * critMod * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod; | ||||
| 		} | ||||
| 		 | ||||
|   | ||||
| @@ -139,9 +139,10 @@ public final class PhysicalAttackWeaponBonus extends AbstractEffect | ||||
| 			final double randomMod = effector.getRandomDamageMultiplier(); | ||||
| 			 | ||||
| 			// Skill specific mods. | ||||
| 			final double wpnMod = effector.getAttackType().isRanged() ? 70 : 77; | ||||
| 			final double weaponMod = effector.getAttackType().isRanged() ? 70 : 77; | ||||
| 			final double weaponBonus = _weaponBonus.getOrDefault(effector.getAttackType(), 1.0); | ||||
| 			final double rangedBonus = effector.getAttackType().isRanged() ? (attack + _power) : 0; | ||||
| 			final double power = (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + 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; | ||||
| 			if (skill.useSoulShot()) | ||||
| @@ -159,7 +160,7 @@ public final class PhysicalAttackWeaponBonus extends AbstractEffect | ||||
| 			// ...................____________Melee Damage_____________......................................___________________Ranged Damage____________________ | ||||
| 			// ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef | ||||
| 			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
| 			final double baseMod = (wpnMod * ((attack * effector.getLevelMod()) + (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0) + rangedBonus)) / defence; | ||||
| 			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; | ||||
| 			damage = baseMod * ssmod * critMod * weaponBonus * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod; | ||||
| 		} | ||||
| 		 | ||||
|   | ||||
| @@ -133,8 +133,9 @@ public final class PhysicalSoulAttack extends AbstractEffect | ||||
| 			final double randomMod = effector.getRandomDamageMultiplier(); | ||||
| 			 | ||||
| 			// Skill specific mods. | ||||
| 			final double wpnMod = effector.getAttackType().isRanged() ? 70 : 77; | ||||
| 			final double rangedBonus = effector.getAttackType().isRanged() ? (attack + _power) : 0; | ||||
| 			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 rangedBonus = effector.getAttackType().isRanged() ? attack + power : 0; | ||||
| 			final double critMod = critical ? Formulas.calcCritDamage(effector, effected, skill) : 1; | ||||
| 			double ssmod = 1; | ||||
| 			if (skill.useSoulShot()) | ||||
| @@ -153,7 +154,7 @@ public final class PhysicalSoulAttack extends AbstractEffect | ||||
| 			// ...................____________Melee Damage_____________......................................___________________Ranged Damage____________________ | ||||
| 			// ATTACK CALCULATION 77 * ((pAtk * lvlMod) + power) / pdef            RANGED ATTACK CALCULATION 70 * ((pAtk * lvlMod) + power + patk + power) / pdef | ||||
| 			// ```````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^``````````````````````````````````````^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
| 			final double baseMod = (wpnMod * ((attack * effector.getLevelMod()) + (_power * effector.getStat().getValue(Stats.PHYSICAL_SKILL_POWER, 1)) + effector.getStat().getValue(Stats.SKILL_POWER_ADD, 0) + rangedBonus)) / defence; | ||||
| 			final double baseMod = (weaponMod * ((attack * effector.getLevelMod()) + power + rangedBonus)) / defence; | ||||
| 			damage = baseMod * soulsMod * ssmod * critMod * weaponTraitMod * generalTraitMod * attributeMod * pvpPveMod * randomMod; | ||||
| 		} | ||||
| 		 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment