Focus Death/Power formula.

Contributed by Sahar.
This commit is contained in:
MobiusDev 2015-09-01 19:15:59 +00:00
parent 151726925f
commit da9d1a3744
7 changed files with 40 additions and 39 deletions

View File

@ -1879,10 +1879,10 @@
<effect name="Buff"> <effect name="Buff">
<mul stat="rCrit" val="0.7" /> <!-- Decreases critical attack rate by 30% --> <mul stat="rCrit" val="0.7" /> <!-- Decreases critical attack rate by 30% -->
<mul stat="blowRate" val="1.6" /> <!-- Increases blow land rate by 60% --> <mul stat="blowRate" val="1.6" /> <!-- Increases blow land rate by 60% -->
<mul stat="cAtk" val="0.7"> <!-- Decreases frontal critical damage by 30% --> <mul stat="cAtkPos" val="0.7"> <!-- Decreases frontal critical damage by 30% -->
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="1.9"> <!-- Increases rear critical damage by 90% --> <mul stat="cAtkPos" val="1.9"> <!-- Increases rear critical damage by 90% -->
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
@ -1891,10 +1891,10 @@
<effect name="Buff"> <effect name="Buff">
<mul stat="rCrit" val="0.7" /> <mul stat="rCrit" val="0.7" />
<mul stat="blowRate" val="#ench1blowRate" /> <mul stat="blowRate" val="#ench1blowRate" />
<mul stat="cAtk" val="0.7"> <mul stat="cAtkPos" val="0.7">
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="1.9"> <mul stat="cAtkPos" val="1.9">
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
@ -1903,10 +1903,10 @@
<effect name="Buff"> <effect name="Buff">
<mul stat="rCrit" val="0.7" /> <mul stat="rCrit" val="0.7" />
<mul stat="blowRate" val="1.6" /> <mul stat="blowRate" val="1.6" />
<mul stat="cAtk" val="0.7"> <mul stat="cAtkPos" val="0.7">
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="#ench2cAtk"> <mul stat="cAtkPos" val="#ench2cAtk">
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
@ -2005,48 +2005,48 @@
</cond> </cond>
<for> <for>
<effect name="Buff"> <effect name="Buff">
<mul stat="cAtk" val="0.7"> <!-- Decreases frontal critical attack damage by 30% --> <mul stat="cAtkPos" val="0.7"> <!-- Decreases frontal critical attack damage by 30% -->
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="1.3"> <!-- Increases side critical attack damage by 30% --> <mul stat="cAtkPos" val="1.3"> <!-- Increases side critical attack damage by 30% -->
<and> <and>
<player front="false" /> <player front="false" />
<player behind="false" /> <player behind="false" />
</and> </and>
</mul> </mul>
<mul stat="cAtk" val="1.6"> <!-- Increases rear critical attack damage by 60% --> <mul stat="cAtkPos" val="1.6"> <!-- Increases rear critical attack damage by 60% -->
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
</for> </for>
<enchant1for> <enchant1for>
<effect name="Buff"> <effect name="Buff">
<mul stat="cAtk" val="0.7"> <!-- Critical Damage from front -30% --> <mul stat="cAtkPos" val="0.7"> <!-- Critical Damage from front -30% -->
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="1.3"> <!-- Critical Damage from side +30% --> <mul stat="cAtkPos" val="1.3"> <!-- Critical Damage from side +30% -->
<and> <and>
<player front="false" /> <player front="false" />
<player behind="false" /> <player behind="false" />
</and> </and>
</mul> </mul>
<mul stat="cAtk" val="#ench1cAtk"> <!-- Critical Damage from back + enchant % --> <mul stat="cAtkPos" val="#ench1cAtk"> <!-- Critical Damage from back + enchant % -->
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
</enchant1for> </enchant1for>
<enchant2for> <enchant2for>
<effect name="Buff"> <effect name="Buff">
<mul stat="cAtk" val="0.7"> <!-- Critical Damage from front -30% --> <mul stat="cAtkPos" val="0.7"> <!-- Critical Damage from front -30% -->
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="#ench2cAtk"> <!-- Critical Damage from side + enchant % --> <mul stat="cAtkPos" val="#ench2cAtk"> <!-- Critical Damage from side + enchant % -->
<and> <and>
<player front="false" /> <player front="false" />
<player behind="false" /> <player behind="false" />
</and> </and>
</mul> </mul>
<mul stat="cAtk" val="1.6"> <!-- Critical Damage from back +60% --> <mul stat="cAtkPos" val="1.6"> <!-- Critical Damage from back +60% -->
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>

View File

@ -292,6 +292,7 @@
<xs:enumeration value="mEvas" /> <xs:enumeration value="mEvas" />
<xs:enumeration value="accMagic" /> <xs:enumeration value="accMagic" />
<xs:enumeration value="cAtk" /> <xs:enumeration value="cAtk" />
<xs:enumeration value="cAtkPos" />
<xs:enumeration value="runSpd" /> <xs:enumeration value="runSpd" />
<xs:enumeration value="reflectDam" /> <xs:enumeration value="reflectDam" />
<xs:enumeration value="defCritRate" /> <xs:enumeration value="defCritRate" />

View File

@ -1825,10 +1825,10 @@
<effect name="Buff"> <effect name="Buff">
<mul stat="rCrit" val="0.7" /> <!-- Decreases critical attack rate by 30% --> <mul stat="rCrit" val="0.7" /> <!-- Decreases critical attack rate by 30% -->
<mul stat="blowRate" val="1.6" /> <!-- Increases blow land rate by 60% --> <mul stat="blowRate" val="1.6" /> <!-- Increases blow land rate by 60% -->
<mul stat="cAtk" val="0.7"> <!-- Decreases frontal critical damage by 30% --> <mul stat="cAtkPos" val="0.7"> <!-- Decreases frontal critical damage by 30% -->
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="1.9"> <!-- Increases rear critical damage by 90% --> <mul stat="cAtkPos" val="1.9"> <!-- Increases rear critical damage by 90% -->
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
@ -1837,10 +1837,10 @@
<effect name="Buff"> <effect name="Buff">
<mul stat="rCrit" val="0.7" /> <mul stat="rCrit" val="0.7" />
<mul stat="blowRate" val="#ench1blowRate" /> <mul stat="blowRate" val="#ench1blowRate" />
<mul stat="cAtk" val="0.7"> <mul stat="cAtkPos" val="0.7">
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="1.9"> <mul stat="cAtkPos" val="1.9">
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
@ -1849,10 +1849,10 @@
<effect name="Buff"> <effect name="Buff">
<mul stat="rCrit" val="0.7" /> <mul stat="rCrit" val="0.7" />
<mul stat="blowRate" val="1.6" /> <mul stat="blowRate" val="1.6" />
<mul stat="cAtk" val="0.7"> <mul stat="cAtkPos" val="0.7">
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="#ench2cAtk"> <mul stat="cAtkPos" val="#ench2cAtk">
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
@ -1951,48 +1951,48 @@
</cond> </cond>
<for> <for>
<effect name="Buff"> <effect name="Buff">
<mul stat="cAtk" val="0.7"> <!-- Decreases frontal critical attack damage by 30% --> <mul stat="cAtkPos" val="0.7"> <!-- Decreases frontal critical attack damage by 30% -->
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="1.3"> <!-- Increases side critical attack damage by 30% --> <mul stat="cAtkPos" val="1.3"> <!-- Increases side critical attack damage by 30% -->
<and> <and>
<player front="false" /> <player front="false" />
<player behind="false" /> <player behind="false" />
</and> </and>
</mul> </mul>
<mul stat="cAtk" val="1.6"> <!-- Increases rear critical attack damage by 60% --> <mul stat="cAtkPos" val="1.6"> <!-- Increases rear critical attack damage by 60% -->
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
</for> </for>
<enchant1for> <enchant1for>
<effect name="Buff"> <effect name="Buff">
<mul stat="cAtk" val="0.7"> <!-- Critical Damage from front -30% --> <mul stat="cAtkPos" val="0.7"> <!-- Critical Damage from front -30% -->
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="1.3"> <!-- Critical Damage from side +30% --> <mul stat="cAtkPos" val="1.3"> <!-- Critical Damage from side +30% -->
<and> <and>
<player front="false" /> <player front="false" />
<player behind="false" /> <player behind="false" />
</and> </and>
</mul> </mul>
<mul stat="cAtk" val="#ench1cAtk"> <!-- Critical Damage from back + enchant % --> <mul stat="cAtkPos" val="#ench1cAtk"> <!-- Critical Damage from back + enchant % -->
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>
</enchant1for> </enchant1for>
<enchant2for> <enchant2for>
<effect name="Buff"> <effect name="Buff">
<mul stat="cAtk" val="0.7"> <!-- Critical Damage from front -30% --> <mul stat="cAtkPos" val="0.7"> <!-- Critical Damage from front -30% -->
<player front="true" /> <player front="true" />
</mul> </mul>
<mul stat="cAtk" val="#ench2cAtk"> <!-- Critical Damage from side + enchant % --> <mul stat="cAtkPos" val="#ench2cAtk"> <!-- Critical Damage from side + enchant % -->
<and> <and>
<player front="false" /> <player front="false" />
<player behind="false" /> <player behind="false" />
</and> </and>
</mul> </mul>
<mul stat="cAtk" val="1.6"> <!-- Critical Damage from back +60% --> <mul stat="cAtkPos" val="1.6"> <!-- Critical Damage from back +60% -->
<player behind="true" /> <player behind="true" />
</mul> </mul>
</effect> </effect>

View File

@ -292,6 +292,7 @@
<xs:enumeration value="mEvas" /> <xs:enumeration value="mEvas" />
<xs:enumeration value="accMagic" /> <xs:enumeration value="accMagic" />
<xs:enumeration value="cAtk" /> <xs:enumeration value="cAtk" />
<xs:enumeration value="cAtkPos" />
<xs:enumeration value="runSpd" /> <xs:enumeration value="runSpd" />
<xs:enumeration value="reflectDam" /> <xs:enumeration value="reflectDam" />
<xs:enumeration value="defCritRate" /> <xs:enumeration value="defCritRate" />

View File

@ -531,6 +531,7 @@ public final class Formulas
double baseMod = ((77 * (power + (attacker.getPAtk(target) * ssboost))) / defence); double baseMod = ((77 * (power + (attacker.getPAtk(target) * ssboost))) / defence);
// Critical // Critical
double criticalMod = (attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill)); double criticalMod = (attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill));
double criticalModPos = 1 + ((attacker.calcStat(Stats.CRITICAL_DAMAGE_POSITION, 1, target, skill) - 1) / 2);
double criticalVulnMod = (target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, skill)); double criticalVulnMod = (target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, skill));
double criticalAddMod = ((attacker.getStat().calcStat(Stats.CRITICAL_DAMAGE_ADD, 0) * 6.1 * 77) / defence); double criticalAddMod = ((attacker.getStat().calcStat(Stats.CRITICAL_DAMAGE_ADD, 0) * 6.1 * 77) / defence);
double criticalAddVuln = target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE_ADD, 0, target, skill); double criticalAddVuln = target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE_ADD, 0, target, skill);
@ -554,7 +555,7 @@ public final class Formulas
} }
} }
damage = (baseMod * criticalMod * criticalVulnMod * proximityBonus * pvpBonus) + criticalAddMod + criticalAddVuln; damage = (baseMod * criticalMod * criticalModPos * criticalVulnMod * proximityBonus * pvpBonus) + criticalAddMod + criticalAddVuln;
damage *= weaponTraitMod; damage *= weaponTraitMod;
damage *= generalTraitMod; damage *= generalTraitMod;
damage *= attributeMod; damage *= attributeMod;
@ -570,6 +571,7 @@ public final class Formulas
set.set("pvpBonus", pvpBonus); set.set("pvpBonus", pvpBonus);
set.set("baseMod", baseMod); set.set("baseMod", baseMod);
set.set("criticalMod", criticalMod); set.set("criticalMod", criticalMod);
set.set("criticalModPos", criticalModPos);
set.set("criticalVulnMod", criticalVulnMod); set.set("criticalVulnMod", criticalVulnMod);
set.set("criticalAddMod", criticalAddMod); set.set("criticalAddMod", criticalAddMod);
set.set("criticalAddVuln", criticalAddVuln); set.set("criticalAddVuln", criticalAddVuln);
@ -621,6 +623,7 @@ public final class Formulas
double baseMod = ((77 * (skill.getPower(isPvP, isPvE) + attacker.getPAtk(target))) / defence) * ssboost; double baseMod = ((77 * (skill.getPower(isPvP, isPvE) + attacker.getPAtk(target))) / defence) * ssboost;
// Critical // Critical
double criticalMod = (attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill)); double criticalMod = (attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill));
double criticalModPos = 1 + ((attacker.calcStat(Stats.CRITICAL_DAMAGE_POSITION, 1, target, skill) - 1) / 2);
double criticalVulnMod = (target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, skill)); double criticalVulnMod = (target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, skill));
double criticalAddMod = ((attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 6.1 * 77) / defence); double criticalAddMod = ((attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 6.1 * 77) / defence);
double criticalAddVuln = target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE_ADD, 0, target, skill); double criticalAddVuln = target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE_ADD, 0, target, skill);
@ -644,7 +647,7 @@ public final class Formulas
} }
damage = (baseMod * criticalMod * criticalVulnMod * proximityBonus * pvpBonus) + criticalAddMod + criticalAddVuln; damage = (baseMod * criticalMod * criticalModPos * criticalVulnMod * proximityBonus * pvpBonus) + criticalAddMod + criticalAddVuln;
damage *= generalTraitMod; damage *= generalTraitMod;
damage *= attributeMod; damage *= attributeMod;
damage *= weaponMod; damage *= weaponMod;
@ -659,6 +662,7 @@ public final class Formulas
set.set("pvpBonus", pvpBonus); set.set("pvpBonus", pvpBonus);
set.set("baseMod", baseMod); set.set("baseMod", baseMod);
set.set("criticalMod", criticalMod); set.set("criticalMod", criticalMod);
set.set("criticalModPos", criticalModPos);
set.set("criticalVulnMod", criticalVulnMod); set.set("criticalVulnMod", criticalVulnMod);
set.set("criticalAddMod", criticalAddMod); set.set("criticalAddMod", criticalAddMod);
set.set("criticalAddVuln", criticalAddVuln); set.set("criticalAddVuln", criticalAddVuln);
@ -755,7 +759,7 @@ public final class Formulas
if (crit) if (crit)
{ {
// Finally retail like formula // Finally retail like formula
damage = 2 * attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill) * target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, null) * ((70 * damage) / (defence * reduceDef)); damage = 2 * attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill) * attacker.calcStat(Stats.CRITICAL_DAMAGE_POSITION, 1, target, skill) * target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE, 1, target, null) * ((70 * damage) / (defence * reduceDef));
// Crit dmg add is almost useless in normal hits... // Crit dmg add is almost useless in normal hits...
damage += ((attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 70) / (defence * reduceDef)); damage += ((attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 70) / (defence * reduceDef));
damage += target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE_ADD, 0, target, skill); damage += target.calcStat(Stats.DEFENCE_CRITICAL_DAMAGE_ADD, 0, target, skill);

View File

@ -56,6 +56,7 @@ public enum Stats
DANCE_REUSE("dReuse"), // Dance Skill Reuse Rate DANCE_REUSE("dReuse"), // Dance Skill Reuse Rate
SHIELD_DEFENCE("sDef"), SHIELD_DEFENCE("sDef"),
CRITICAL_DAMAGE("cAtk"), CRITICAL_DAMAGE("cAtk"),
CRITICAL_DAMAGE_POSITION("cAtkPos"),
CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA CRITICAL_DAMAGE_ADD("cAtkAdd"), // this is another type for special critical damage mods - vicious stance, critical power and critical damage SA
MAGIC_CRIT_DMG("mCritPower"), MAGIC_CRIT_DMG("mCritPower"),
MAGIC_CRIT_DMG_ADD("mCritPowerAdd"), MAGIC_CRIT_DMG_ADD("mCritPowerAdd"),

View File

@ -39,12 +39,6 @@ public class FuncMul extends AbstractFunction
{ {
if ((getApplayCond() == null) || getApplayCond().test(effector, effected, skill)) if ((getApplayCond() == null) || getApplayCond().test(effector, effected, skill))
{ {
// Focus Death/Power fix by Sahar.
if ((getStat() == Stats.CRITICAL_DAMAGE) && (skill != null) && ((skill.getId() == 355) || (skill.getId() == 357)))
{
return initVal * (1 + ((getValue() - 1) / 2));
}
return initVal * getValue(); return initVal * getValue();
} }
return initVal; return initVal;