diff --git a/src/etc/Constants.java b/src/etc/Constants.java index e25fcd77..db069652 100644 --- a/src/etc/Constants.java +++ b/src/etc/Constants.java @@ -158,7 +158,7 @@ public class Constants { /** Frame Title **/ public static final String APP_TITLE = "Warframe Weapon DPS Calculator"; - public static final String APP_VERSION = "v0.13.13"; + public static final String APP_VERSION = "v0.13.14"; /** ToolTips **/ public static final String NAME_TOOL_TIP = "The weapon's name."; diff --git a/src/main/Main.java b/src/main/Main.java index 92ea9407..fbc13a8a 100644 --- a/src/main/Main.java +++ b/src/main/Main.java @@ -2056,11 +2056,15 @@ protected static void calculateMiscValues() { explosiveBurstFireStacks = 1 / Math.pow((1 - explosiveFireProcRate * averageStatusChance), potentialBurstProcs); } - slashStacks = ((1 - Math.pow(1 - impactslash, impactProcRate * averageStatusChance)) + (1 - impactslash) * ((slashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs)) * potentialProcs; - burstSlashStacks = ((1 - Math.pow(1 - impactslash, impactProcRate * averageStatusChance)) + (1 - impactslash) * ((slashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs)) * potentialBurstProcs; - explosiveSlashStacks = ((explosiveSlashProcRate * averageStatusChance) + (explosiveImpactProcRate * averageStatusChance * impactslash) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialProcs; - explosiveBurstSlashStacks = ((explosiveSlashProcRate * averageStatusChance) + (explosiveImpactProcRate * averageStatusChance * impactslash) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialBurstProcs; + + slashStacks = ((slashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialProcs; + slashStacks += (1-slashProcRate)* (1 - (hunterMunitions * Math.min(1, finalCritChance))) * (1 - Math.pow(1 - impactslash, impactProcRate * averageStatusChance)) * potentialProcs; // IB or Hem slash procs + burstSlashStacks = slashStacks * potentialBurstProcs / potentialProcs; + explosiveSlashStacks = ((explosiveSlashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialProcs; + explosiveSlashStacks += (1-explosiveSlashProcRate)* (1 - (hunterMunitions * Math.min(1, finalCritChance))) * (1 - Math.pow(1 - impactslash, explosiveImpactProcRate * averageStatusChance)) * potentialProcs; // IB or Hem slash procs + explosiveBurstSlashStacks = explosiveSlashStacks * potentialBurstProcs / potentialProcs; + toxinStacks = procsPerSecond * toxinProcRate * (6 * finalStatusDuration); burstToxinStacks = burstProcsPerSecond * toxinProcRate * (6 * finalStatusDuration); explosiveToxinStacks = procsPerSecond * explosiveToxinProcRate * (6 * finalStatusDuration); @@ -2094,8 +2098,9 @@ protected static void calculateMiscValues() { burstGasStacks += potentialBurstProcs; break; case Constants.IMPACT_WEAPON_DAMAGE: - slashStacks = ((1 - Math.pow(1 - impactslash, impactProcRate * averageStatusChance + 1)) + (1 - impactslash) * ((slashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs)) * potentialProcs; - burstSlashStacks = ((1 - Math.pow(1 - impactslash, impactProcRate * averageStatusChance + 1)) + (1 - impactslash) * ((slashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs)) * potentialBurstProcs; + slashStacks = ((slashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialProcs; + slashStacks += (1-slashProcRate)* (1 - (hunterMunitions * Math.min(1, finalCritChance))) * impactslash * potentialProcs; // IB or Hem slash procs + burstSlashStacks = slashStacks * potentialBurstProcs / potentialProcs; break; } @@ -2117,8 +2122,9 @@ protected static void calculateMiscValues() { explosiveBurstGasStacks += potentialBurstProcs; break; case Constants.IMPACT_WEAPON_DAMAGE: - explosiveSlashStacks = ((1 - Math.pow(1 - impactslash, explosiveImpactProcRate * averageStatusChance + 1)) + (1 - impactslash) * ((explosiveSlashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs)) * potentialProcs; - explosiveBurstSlashStacks = ((1 - Math.pow(1 - impactslash, explosiveImpactProcRate * averageStatusChance + 1)) + (1 - impactslash) * ((explosiveSlashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs)) * potentialBurstProcs; + explosiveSlashStacks = ((explosiveSlashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialProcs; + explosiveSlashStacks += (1-explosiveSlashProcRate)* (1 - (hunterMunitions * Math.min(1, finalCritChance))) * impactslash * potentialProcs; // IB or Hem slash procs + explosiveBurstSlashStacks = explosiveSlashStacks * potentialBurstProcs / potentialProcs; break; } diff --git a/src/ttk/TTKTarget.java b/src/ttk/TTKTarget.java index 85e89690..0c2262d8 100644 --- a/src/ttk/TTKTarget.java +++ b/src/ttk/TTKTarget.java @@ -952,7 +952,9 @@ public double calculateRandomizedTimeToKill() { // Status effects - boolean impactSlashed = false; // Slash procs from Hemorrhage or Internal Bleeding disable other sources of slash procs + boolean slashed = false; // Slash procs from Hemorrhage or Internal Bleeding disable other sources of + // slash procs + boolean impacted = false; // Forced proc? switch (forcedProc) { // Copy-paste vomit code @@ -1052,12 +1054,7 @@ public double calculateRandomizedTimeToKill() { case (Constants.IMPACT_WEAPON_DAMAGE): statusEffects[8] = baseStatusDuration; - if (rng.nextDouble() <= Main.impactslash) { // Add a slash proc for Internal Bleeding or Hemorrhage - double bleedDamage = DoTBase * totalMult * typeMult * 0.35; - slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); - statusEffects[0] = baseStatusDuration; - impactSlashed = true; - } + impacted = true; break; } @@ -1075,19 +1072,13 @@ public double calculateRandomizedTimeToKill() { // Impact Proc if ((proc -= impactProc) < 0) { statusEffects[8] = baseStatusDuration; - if (rng.nextDouble() <= Main.impactslash && !impactSlashed) { // Add a slash proc for Internal Bleeding or Hemorrhage - double bleedDamage = DoTBase * totalMult * typeMult * 0.35; - slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); - statusEffects[0] = baseStatusDuration; - impactSlashed = true; - } + impacted = true; // Slash Proc } else if ((proc -= slashProc) < 0) { - if (!impactSlashed) { - double bleedDamage = DoTBase * totalMult * typeMult * 0.35; - slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); - statusEffects[0] = baseStatusDuration; - } + double bleedDamage = DoTBase * totalMult * typeMult * 0.35; + slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); + statusEffects[0] = baseStatusDuration; + slashed = true; // Fire Proc } else if ((proc -= fireProc) < 0) { double heatDamage = DoTBase * (1 + Main.globalFire) * totalMult * typeMult * 0.5; @@ -1180,16 +1171,23 @@ public double calculateRandomizedTimeToKill() { } // Forced slash proc? - if (((crit > 0 && rng.nextDouble() < Main.hunterMunitions) || (Main.stanceCombo != null && Main.stanceCombo.hits.get(iterations).procs[0].equals("1"))) && !impactSlashed) { + if ((crit > 0 && rng.nextDouble() < Main.hunterMunitions) || (Main.stanceCombo != null && Main.stanceCombo.hits.get(iterations).procs[0].equals("1"))) { double bleedDamage = DoTBase * totalMult * typeMult * 0.35; slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); statusEffects[0] = baseStatusDuration; + slashed = true; } if (Main.shatteringImpact > 0 && Main.impact.finalBase > 0) { shatteringImpacts++; } + if (rng.nextDouble() <= Main.impactslash && impacted && !slashed) { // Apply a slash proc for Internal Bleeding or Hemorrhage + double bleedDamage = DoTBase * totalMult * typeMult * 0.35; + slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); + statusEffects[0] = baseStatusDuration; + } + // Explosive part of the shot // This CANNOT be how I should do this but I'm too stupid to do it in a // different way without breaking multithreading. @@ -1243,7 +1241,8 @@ public double calculateRandomizedTimeToKill() { // Status effects - impactSlashed = false; + slashed = false; + impacted = false; // Forced proc? switch (forcedProcEX) { // Copy-paste vomit code @@ -1343,12 +1342,7 @@ public double calculateRandomizedTimeToKill() { case (Constants.IMPACT_WEAPON_DAMAGE): statusEffects[8] = baseStatusDuration; - if (rng.nextDouble() <= Main.impactslash) { // Add a slash proc for Internal Bleeding or Hemorrhage - double bleedDamage = explosiveDoTBase * totalMult * typeMult * 0.35; - slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); - statusEffects[0] = baseStatusDuration; - impactSlashed = true; - } + impacted = true; break; } @@ -1364,21 +1358,14 @@ public double calculateRandomizedTimeToKill() { double proc = rng.nextDouble(); // Impact Proc if ((proc -= Main.explosiveImpactProcRate) < 0) { - if (rng.nextDouble() <= Main.impactslash && !impactSlashed) { // Add a slash proc for Internal Bleeding or Hemorrhage - double bleedDamage = explosiveDoTBase * totalMult * typeMult * 0.35; - slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); - statusEffects[0] = baseStatusDuration; - impactSlashed = true; - } statusEffects[8] = baseStatusDuration; + impacted = true; // Slash Proc } else if ((proc -= Main.explosiveSlashProcRate) < 0) { - if (!impactSlashed) { - double bleedDamage = explosiveDoTBase * totalMult * typeMult * 0.35; - slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); - statusEffects[0] = baseStatusDuration; - } - + double bleedDamage = explosiveDoTBase * totalMult * typeMult * 0.35; + slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); + statusEffects[0] = baseStatusDuration; + slashed = true; // Fire Proc } else if ((proc -= Main.explosiveFireProcRate) < 0) { double heatDamage = explosiveDoTBase * (1 + Main.globalFire) * totalMult * typeMult * 0.5; @@ -1473,7 +1460,14 @@ public double calculateRandomizedTimeToKill() { } // Forced slash proc? - if ((rng.nextDouble() < Main.hunterMunitions || (Main.stanceCombo != null && Main.stanceCombo.hits.get(iterations).procs[0].equals("1"))) && !impactSlashed) { + if (rng.nextDouble() < Main.hunterMunitions || (Main.stanceCombo != null && Main.stanceCombo.hits.get(iterations).procs[0].equals("1"))) { + double bleedDamage = explosiveDoTBase * totalMult * typeMult * 0.35; + slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); + statusEffects[0] = baseStatusDuration; + } + + // IB or Hem proc + if (rng.nextDouble() <= Main.impactslash && impacted && !slashed) { double bleedDamage = explosiveDoTBase * totalMult * typeMult * 0.35; slashStacks.add(new DoTPair(bleedDamage, baseStatusDuration, 10000, 1, 1, 1, true, false)); statusEffects[0] = baseStatusDuration;