Skip to content

Commit

Permalink
v1.1.19 - added items and made LB only OOM info more useful
Browse files Browse the repository at this point in the history
  • Loading branch information
lologarithm committed Sep 18, 2021
1 parent d79ddb0 commit c500e42
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions tbc/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,12 @@ var items = []Item{
GemSlots: []GemColor{GemColorYellow, GemColorRed},
SocketBonus: Stats{StatSpellDmg: 4},
},
{ID: 29302, Slot: EquipFinger, Name: "Band of Eternity", Phase: 2, Quality: ItemQualityEpic, SourceZone: "", SourceDrop: "",
Stats: Stats{StatStm: 24, StatInt: 22, StatSpellDmg: 29, StatSpellCrit: 21},
},
{ID: 32779, Slot: EquipFinger, Name: "Band of Frigid Elements", Phase: 2, Quality: ItemQualityEpic, SourceZone: "", SourceDrop: "",
Stats: Stats{StatInt: 13, StatSpellDmg: 34, StatSpellCrit: 17},
},
}

type ItemSet struct {
Expand Down
2 changes: 1 addition & 1 deletion ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ <h4>Standard Elemental Build</h4>
<div id="pullout">
<div class="dtl" style="height:100%;width:100%;padding:10px">
<div id="themetoggle" style="height:20px; bottom: 10px; cursor: pointer;" onclick="toggletheme()">
<text>v1.1.18</text>
<text>v1.1.19</text>
<img id="themebulb" style="height: 20px; width: 20px" src="icons/light-bulb.svg"></img>
</div>
<div style="margin-top:10px">
Expand Down
Binary file modified ui/lib.wasm
Binary file not shown.
13 changes: 8 additions & 5 deletions ui/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,12 @@ function runSim(gearSpec) {

const simRequest = deepCopy(sharedSimRequest);
simRequest.Options.AgentType = AGENT_TYPES.FIXED_LB_ONLY;
simRequest.Options.Encounter.Duration = 600;
simRequest.Options.Encounter.Duration = 1200; // dont care about fights longer than 20min
simRequest.Options.DPSReportTime = sharedOptions.Encounter.Duration;
simRequest.Options.ExitOnOOM = true;

workerPool.runSimulation(simRequest).then(simResult => {
const oomAtText = simResult.OomAtAvg ? Math.round(simResult.OomAtAvg) : ">600";
const oomAtText = (simResult.NumOom > (simRequest.Iterations/3)) ? Math.round(simResult.OomAtAvg) : ">"+simRequest.Options.Encounter.Duration;
console.log("LB Stats: ", simResult);
resultsElem.innerHTML = `<div><h3>Mana</h3><text class="simnums">${oomAtText}</text> sec<br /><text style="font-size:0.7em">to oom casting LB only ${Math.round(simResult.DpsAvg)} DPS</text></div>`
});
Expand All @@ -416,7 +416,10 @@ function runSim(gearSpec) {

const simRequest = deepCopy(sharedSimRequest);
simRequest.Options.AgentType = AGENT_TYPES.FIXED_3LB_1CL;
simRequest.Options.Encounter.Duration = 600;
if (simRequest.Options.Encounter.Duration < 600) {
simRequest.Options.Encounter.Duration = 600; // only go up to 10min if the duration is less.
}

simRequest.Options.DPSReportTime = 30;

workerPool.runSimulation(simRequest).then(simResult => {
Expand Down Expand Up @@ -450,14 +453,14 @@ function runSim(gearSpec) {
rotstats.innerHTML += `<text style="cursor:pointer" title="Avg Dmg: ${Math.round(cast.Dmg / cast.Count)} Crit: ${Math.round(cast.Crits / cast.Count * 100)}%">${castIDToName[castID]}: ${Math.round(cast.Count / simRequest.Iterations)}</text>`;
});
const percentOom = simResult.NumOom / simRequest.Iterations;
if (percentOom > 0.02) {
if (percentOom > 0.001) {
var dangerStyle = "";
if (percentOom > 0.05 && percentOom <= 0.25) {
dangerStyle = "border-color: #FDFD96;"
} else if (percentOom > 0.25) {
dangerStyle = "border-color: #FF6961;"
}
rotstats.innerHTML += `<text title="Downranking is not currently implemented." style="${dangerStyle};cursor: pointer">${Math.round(percentOom * 100)}% of simulations went OOM.`
rotstats.innerHTML += `<text title="Downranking is not currently implemented." style="${dangerStyle};cursor: pointer">${Math.round(percentOom * 1000)/10}% of simulations went OOM.`
}

const rotout = document.getElementById("rotout");
Expand Down

0 comments on commit c500e42

Please sign in to comment.