Skip to content

Commit

Permalink
0.13.7
Browse files Browse the repository at this point in the history
  • Loading branch information
spmuladoo committed Jul 29, 2020
1 parent e1bae7a commit 1f21fca
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 71 deletions.
2 changes: 1 addition & 1 deletion src/etc/Constants.java
Expand Up @@ -157,7 +157,7 @@ public class Constants {

/** Frame Title **/
public static final String APP_TITLE = "Warframe Weapon DPS Calculator";
public static final String APP_VERSION = "v0.13.6";
public static final String APP_VERSION = "v0.13.7";

/** ToolTips **/
public static final String NAME_TOOL_TIP = "The weapon's name.";
Expand Down
58 changes: 43 additions & 15 deletions src/main/Main.java
Expand Up @@ -206,6 +206,7 @@ public class Main {
public static int burstCount = 0;
public static double drain = 1;
public static int shatteringImpact = 0;
public static String forcedProc = "";

/** Calculated Values **/
public static int finalMag = 0;
Expand Down Expand Up @@ -255,6 +256,8 @@ public class Main {
protected static double explosiveBurstGasStacks = 0;
protected static double explosiveElectricStacks = 0;
protected static double explosiveBurstElectricStacks = 0;
protected static double explosiveFireStacks = 0;
protected static double explosiveBurstFireStacks = 0;

public static Damage raw = new Damage();
public static Damage impact = new Damage();
Expand Down Expand Up @@ -866,6 +869,7 @@ public static void clearValues() {
finalComboCrit = 0.0;
averageStatusChance = 0;
viralMult = 1;
forcedProc = "";
}

/**
Expand Down Expand Up @@ -906,6 +910,8 @@ protected static void getBaseValues() {
explosiveDamage1Type = selectedWeapon.getExplosiveDamage1Type();
explosiveDamage2Type = selectedWeapon.getExplosiveDamage2Type();

forcedProc = selectedWeapon.getForcedProcType();

switch (damageType) {
case Constants.FIRE_WEAPON_DAMAGE:
fire.base = selectedWeapon.getBaseDamage();
Expand Down Expand Up @@ -1893,6 +1899,7 @@ protected static void calculateFinals() {
* Calculates miscellaneous values
*/
protected static void calculateMiscValues() {

// Status Ratios
double totalprocWeight = raw.finalBase;
slashProcRate = slash.finalBase / raw.finalBase;
Expand Down Expand Up @@ -1985,6 +1992,9 @@ protected static void calculateMiscValues() {
procsPerSecond = ((averageProjectileCount * finalMag) * averageStatusChance) * (1 / finalIterationTime);
burstProcsPerSecond = averageProjectileCount * averageStatusChance * (finalFireRate / avgDelay);

double potentialProcs = ((averageProjectileCount * finalMag) * (1 / finalIterationTime)) * (6 * finalStatusDuration);
double potentialBurstProcs = (averageProjectileCount * (finalFireRate / avgDelay)) * (6 * finalStatusDuration);

// viral multiplier
if (viralProcRate > 0) {
viralMult = 1;
Expand All @@ -2000,32 +2010,29 @@ protected static void calculateMiscValues() {
viralMult += (1 - totalChance) * 3.25;
}

double slashProcsPerPellet = 1 - ((1 - (slashProcRate * averageStatusChance)) * (1 - (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit)))) * (1 - forcedSlashProcs));
slashStacks = slashProcsPerPellet * ((averageProjectileCount * finalMag) * (1 / finalIterationTime)) * (6 * finalStatusDuration);
burstSlashStacks = slashProcsPerPellet * (averageProjectileCount * (finalFireRate / avgDelay)) * (6 * finalStatusDuration);
double explosiveSlashProcsPerPellet = 1 - ((1 - (explosiveSlashProcRate * averageStatusChance)) * (1 - (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit)))) * (1 - forcedSlashProcs));
explosiveSlashStacks = explosiveSlashProcsPerPellet * ((averageProjectileCount * finalMag) * (1 / finalIterationTime)) * (6 * finalStatusDuration);
explosiveBurstSlashStacks = explosiveSlashProcsPerPellet * (averageProjectileCount * (finalFireRate / avgDelay)) * (6 * finalStatusDuration);

// non-stacking fire stacks
if (DPSPanel.fireProcLabel.isSelected()) {
fireStacks = procsPerSecond * fireProcRate * 6;
burstFireStacks = burstProcsPerSecond * fireProcRate * 6;
explosiveFireStacks = procsPerSecond * explosiveFireProcRate * (6 * finalStatusDuration);
explosiveBurstFireStacks = burstProcsPerSecond * explosiveFireProcRate * (6 * finalStatusDuration);
} else if (fireProcRate > 0) {
fireStacks = 1 / Math.pow((1 - fireProcRate * averageStatusChance), (averageProjectileCount * finalMag) * (1 / finalIterationTime * 6 * finalStatusDuration));
burstFireStacks = 1 / Math.pow((1 - fireProcRate * averageStatusChance), (averageProjectileCount * (finalFireRate / avgDelay) * 6 * finalStatusDuration));
fireStacks = 1 / Math.pow((1 - fireProcRate * averageStatusChance), potentialProcs);
burstFireStacks = 1 / Math.pow((1 - fireProcRate * averageStatusChance), potentialBurstProcs);
explosiveFireStacks = 1 / Math.pow((1 - explosiveFireProcRate * averageStatusChance), potentialProcs);
explosiveBurstFireStacks = 1 / Math.pow((1 - explosiveFireProcRate * averageStatusChance), potentialBurstProcs);
}

slashStacks = ((slashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialProcs;
burstSlashStacks = ((slashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialBurstProcs;
explosiveSlashStacks = ((explosiveSlashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialProcs;
explosiveBurstSlashStacks = ((explosiveSlashProcRate * averageStatusChance) + (hunterMunitions * Math.min(1, (finalCritChance + finalComboCrit))) + forcedSlashProcs) * potentialBurstProcs;

toxinStacks = procsPerSecond * toxinProcRate * (6 * finalStatusDuration);
burstToxinStacks = burstProcsPerSecond * toxinProcRate * (6 * finalStatusDuration);
explosiveToxinStacks = procsPerSecond * explosiveToxinProcRate * (6 * finalStatusDuration);
explosiveBurstToxinStacks = burstProcsPerSecond * explosiveToxinProcRate * (6 * finalStatusDuration);

if (weaponName.equals("Hystrix (Poison)") || weaponName.equals("Acrid")) {
toxinStacks += ((averageProjectileCount * finalMag) * (1 / finalIterationTime)) * (6 * finalStatusDuration);
burstToxinStacks += (averageProjectileCount * (finalFireRate / avgDelay)) * (6 * finalStatusDuration);
}


gasStacks = procsPerSecond * gasProcRate * (6 * finalStatusDuration);
burstGasStacks = burstProcsPerSecond * gasProcRate * (6 * finalStatusDuration);
explosiveGasStacks = procsPerSecond * explosiveGasProcRate * (6 * finalStatusDuration);
Expand All @@ -2035,6 +2042,25 @@ protected static void calculateMiscValues() {
burstElectricStacks = burstProcsPerSecond * electricProcRate * (6 * finalStatusDuration);
explosiveElectricStacks = procsPerSecond * explosiveElectricProcRate * (6 * finalStatusDuration);
explosiveBurstElectricStacks = burstProcsPerSecond * explosiveElectricProcRate * (6 * finalStatusDuration);

switch (forcedProc) {
case Constants.FIRE_WEAPON_DAMAGE:
fireStacks += potentialProcs;
burstFireStacks += potentialBurstProcs;
break;
case Constants.ELECTRIC_WEAPON_DAMAGE:
electricStacks += potentialProcs;
burstElectricStacks += potentialBurstProcs;
break;
case Constants.TOXIN_WEAPON_DAMAGE:
toxinStacks += potentialProcs;
burstToxinStacks += potentialBurstProcs;
break;
case Constants.GAS_WEAPON_DAMAGE:
gasStacks += potentialProcs;
burstGasStacks += potentialBurstProcs;
break;
}

// Final Damage values
impact.finalBase *= finalDamageMult;
Expand Down Expand Up @@ -2520,7 +2546,9 @@ protected static void calculateDamagePerSecond() {
burstPoisonDoTDPS += explosiveBurstToxinStacks * explosivePoisonDamage;

heatDoTDPS = fireStacks * heatDamage;
heatDoTDPS += explosiveFireStacks * explosiveHeatDamage;
burstHeatDoTDPS = burstFireStacks * heatDamage;
burstHeatDoTDPS += explosiveBurstFireStacks * explosiveHeatDamage;

cloudDoTDPS = gasStacks * cloudDamage;
cloudDoTDPS += explosiveGasStacks * explosiveCloudDamage;
Expand Down

0 comments on commit 1f21fca

Please sign in to comment.