.

Damage Calculation

 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Damage is calculated as:
+
At first target's resistances and thresholds are calculated.<br />
 +
After that using this values raw damage is calculated. <br />
 +
If it is higher than zero, [[Bleed]] value is counted.<br />
  
TargetDR = Armor + Perks
 
TargetDR = (TargetDR* (100 - (10 * HitTheGap) + 30*attacker.Param[TRAIT_FINESSE])) / 100;
 
 
TargetDT = Armor + Perks
 
TargetDT = (TargetDT * (100 - (10 * HitTheGap) + changeDT)) / 100;
 
 
PartialBypass % = 60 * Decreaed DR WeaponTrait;
 
PartialBypass += 30 + (30 * (55 - ((21 - L) * L) / 2)) / 45;
 
PartialBypass -= target.Perk[PE_ARMOR_EFFICIENCY] * 15;
 
PartialBypass += 15 * (weaponPerkEff(attack.WeaponPerks, attack.Skill, WP_PIERCING_STRIKE));
 
PartialBypass += 15 * weaponLegendaryEff(realWeapon,WP_PIERCING_STRIKE);
 
PartialBypass += GetLeadershipBoost(attacker,FTLB_MORE_ARMOR_BYPASS);
 
PartialBypass -= GetLeadershipBoost(target,FTLB_LESS_ARMOR_BYPASS);
 
PartialBypass = CLAMP(partialBypass, 0, 100);
 
  
 +
=Damage resistance=
 +
TargetDR = Armor + Perks<br />
 +
TargetDR = (TargetDR* (100 - (10*HitTheGap) + 30*attacker.Param[TRAIT_FINESSE]))/100<br />
 
if (PartialBypass > 0 )
 
if (PartialBypass > 0 )
 
{
 
{
 
TargetDR = (TargetDR * (100 - PartialBypass )) / 100;
 
TargetDR = (TargetDR * (100 - PartialBypass )) / 100;
 
}
 
}
 +
TargetDR += Ammo.DRMod<br />
 +
TargetDR = CLAMP(TargetDR , 0, 100)<br />
  
TargetDR += Ammo.DRMod;
+
=Bypass=
TargetDR = CLAMP(TargetDR , 0, 100);
+
PartialBypass += 30 + (30 * (55 - ((21 - target.Luck) * target.Luck) / 2)) / 45<br />
 +
PartialBypass -= target.Perk[PE_ARMOR_EFFICIENCY] * 15<br />
 +
PartialBypass += 15 * (weaponPerkEff( WP_PIERCING_STRIKE))<br />
 +
PartialBypass += 15 * weaponLegendaryEff(WP_PIERCING_STRIKE)<br />
 +
PartialBypass += GetLeadershipBoost(attacker,FTLB_MORE_ARMOR_BYPASS)<br />
 +
PartialBypass -= GetLeadershipBoost(target,FTLB_LESS_ARMOR_BYPASS)<br />
 +
PartialBypass = CLAMP(partialBypass, 0, 100)<br />
  
TargetDT = (TargetDT * (100 + Ammo.DTMod)) / 100;
+
=Damage threshold=
TargetDT = CLAMP(TargetDT , 0, 9999);
+
TargetDT = Armor + Perks<br />
 +
TargetDT = (TargetDT * (100 - (10 * HitTheGap) + changeDT)) / 100<br />
 +
TargetDT = (TargetDT * (100 + Ammo.DTMod)) / 100<br />
 +
TargetDT = CLAMP(TargetDT , 0, 9999)<br />
  
DmgMul = DmgMul * Ammo.DmgMul / 100;
+
=Damage calculation=
DmgMul = (DmgMul * bonusDamage) / 100;
+
DmgMul = DmgMul * Ammo.DmgMul / 100<br />
 +
DmgMul = (DmgMul * bonusDamage) / 100<br />
  
rawMin += BRD - targetDT;
+
rawMin = weapon.minDMG<br />
rawMin -= rawMin * targetDR / 100;
+
rawMin += BRD - targetDT<br />
rawMin *= dmgMul / 100;
+
rawMin -= rawMin * targetDR / 100<br />
rawMin *= rounds;
+
rawMin *= dmgMul / 100<br />
rawMax += BRD - targetDT;
+
rawMin *= rounds<br />
rawMax -= rawMax * targetDR / 100;
+
 
rawMax *= dmgMul / 100;
+
rawMax = weapon.maxDMG<br />
rawMax *= rounds;
+
rawMax += BRD - targetDT<br />
 +
rawMax -= rawMax * targetDR / 100<br />
 +
rawMax *= dmgMul / 100<br />
 +
rawMax *= rounds<br />
 +
 
 +
rawDmg = Random(rawMin, rawMax)<br />
 +
 
 +
=Bleed calculation=
 +
if rawDmg was higher than zero, [[Bleed]] is calculated.
 +
 
 +
BleedCoEff +=  attack.BleedStr + 20 * weaponPerkEff(WP_BETTER_BLEED);<br />
 +
BleedCoEff += 20*weaponLegendaryEff(WP_BETTER_BLEED);<br />
 +
 
 +
if (BleedCoEff > 0)
 +
{<br />
 +
BleedCoEff -= GetLeadershipBoost(target,FTLB_LESS_BLEED);<br />
 +
BleedCoEff += GetLeadershipBoost(attacker,FTLB_MORE_BLEED);<br />
 +
BleedDmg = rawDmg *  BleedCoEff / 100;<br />
 +
}
  
rawDmg = Random(rawMin, rawMax);
+
toBleed = target.Param[ST_DAMAGE_TO_BLEED_DR] + 10 * target.Perk[PE_PMS];<br />
 +
mitbd = rawDmg * toBleed / 100 + target.Param[ST_DAMAGE_TO_BLEED_DT];<br />
 +
if (mitbd > rawDmg )mitbd = rawDmg ;<br />
 +
rawDmg -= mitbd ;<br />
 +
BleedDmg += mitbd;<br />
 +
if (bd > 0)AffectBleed(target, BleedDmg );<br />

Latest revision as of 18:01, 7 April 2016

At first target's resistances and thresholds are calculated.
After that using this values raw damage is calculated.
If it is higher than zero, Bleed value is counted.


Contents

[edit] Damage resistance

TargetDR = Armor + Perks
TargetDR = (TargetDR* (100 - (10*HitTheGap) + 30*attacker.Param[TRAIT_FINESSE]))/100
if (PartialBypass > 0 ) { TargetDR = (TargetDR * (100 - PartialBypass )) / 100; } TargetDR += Ammo.DRMod
TargetDR = CLAMP(TargetDR , 0, 100)

[edit] Bypass

PartialBypass += 30 + (30 * (55 - ((21 - target.Luck) * target.Luck) / 2)) / 45
PartialBypass -= target.Perk[PE_ARMOR_EFFICIENCY] * 15
PartialBypass += 15 * (weaponPerkEff( WP_PIERCING_STRIKE))
PartialBypass += 15 * weaponLegendaryEff(WP_PIERCING_STRIKE)
PartialBypass += GetLeadershipBoost(attacker,FTLB_MORE_ARMOR_BYPASS)
PartialBypass -= GetLeadershipBoost(target,FTLB_LESS_ARMOR_BYPASS)
PartialBypass = CLAMP(partialBypass, 0, 100)

[edit] Damage threshold

TargetDT = Armor + Perks
TargetDT = (TargetDT * (100 - (10 * HitTheGap) + changeDT)) / 100
TargetDT = (TargetDT * (100 + Ammo.DTMod)) / 100
TargetDT = CLAMP(TargetDT , 0, 9999)

[edit] Damage calculation

DmgMul = DmgMul * Ammo.DmgMul / 100
DmgMul = (DmgMul * bonusDamage) / 100

rawMin = weapon.minDMG
rawMin += BRD - targetDT
rawMin -= rawMin * targetDR / 100
rawMin *= dmgMul / 100
rawMin *= rounds

rawMax = weapon.maxDMG
rawMax += BRD - targetDT
rawMax -= rawMax * targetDR / 100
rawMax *= dmgMul / 100
rawMax *= rounds

rawDmg = Random(rawMin, rawMax)

[edit] Bleed calculation

if rawDmg was higher than zero, Bleed is calculated.

BleedCoEff += attack.BleedStr + 20 * weaponPerkEff(WP_BETTER_BLEED);
BleedCoEff += 20*weaponLegendaryEff(WP_BETTER_BLEED);

if (BleedCoEff > 0) {
BleedCoEff -= GetLeadershipBoost(target,FTLB_LESS_BLEED);
BleedCoEff += GetLeadershipBoost(attacker,FTLB_MORE_BLEED);
BleedDmg = rawDmg * BleedCoEff / 100;
}

toBleed = target.Param[ST_DAMAGE_TO_BLEED_DR] + 10 * target.Perk[PE_PMS];
mitbd = rawDmg * toBleed / 100 + target.Param[ST_DAMAGE_TO_BLEED_DT];
if (mitbd > rawDmg )mitbd = rawDmg ;
rawDmg -= mitbd ;
BleedDmg += mitbd;
if (bd > 0)AffectBleed(target, BleedDmg );

(Difference between revisions)
Jump to: navigation, search