Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "simc-lab",
"productName": "SimC Lab",
"desktopName": "simc-lab.desktop",
"version": "1.35.0",
"version": "1.35.1",
"description": "Local SimulationCraft workbench with upgrade finder and tank simulation.",
"author": "Roburmaster",
"private": true,
Expand Down
2 changes: 2 additions & 0 deletions lib/engine.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export async function prepare(request,catalog,talentData,season) {
if(!Array.isArray(scenarios)||!scenarios.length||scenarios.length>8) throw new Error('Choose 1–8 scenarios.');
// The Silvermoon dummies are always five, so a target matrix collapses to one fight there.
scenarios=scenarios.filter((s,i)=>!isDummyStyle(s?.style)||scenarios.findIndex(o=>o?.style===s.style&&(o.duration??null)===(s.duration??null)&&(o.dummyHealth?.mode??'held')===(s.dummyHealth?.mode??'held'))===i);
// A Mythic+ route has no boss to survive, so a tank on one is ranked on DPS alone.
if(scenarios.length&&scenarios.every(s=>isRouteStyle(s?.style)))settings.tank=null;
const unique=new Set();let routes=null;
for(const s of scenarios) {
if(!fightStyles.includes(s.style)) throw new Error('Unknown fight style.');
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simc-lab",
"version": "1.35.0",
"version": "1.35.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion public/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions public/tank.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ const fields=[['pressure','Sustained damage (% health / sec)',0.5,20,0.5],['bust
export const signed=(n,digits=2)=>`${n>=0?'+':''}${n.toFixed(digits)}`;

export function tankUI({updateCount}){
let presets=null,active=false,weapons=false;
let presets=null,active=false,weapons=false,route=false;
$('#results').insertAdjacentHTML('beforebegin',`<section class="panel" id="tank-panel" hidden><div class="panel-heading"><h2>Tank survival</h2><span class="pill" id="tank-scope">Tank specialization</span></div><p class="panel-intro" id="tank-intro">Tanks are ranked on DPS and survival. A boss is calibrated to your imported gear once per job, then every build fights the same boss.</p><div id="tank-content"></div></section>`);
// The same settings serve one imported tank and every tank specialization in a Weapon Lab job.
function scope(){
$('#tank-panel').hidden=!(active||weapons);
$('#tank-panel').hidden=route||!(active||weapons);
$('#tank-scope').textContent=weapons?'Every tank specialization':'Tank specialization';
$('#tank-intro').textContent=weapons?'Tank specializations are ranked on DPS and survival. A boss is calibrated once for each of their reference profiles, then every weapon fights that boss.':'Tanks are ranked on DPS and survival. A boss is calibrated to your imported gear once per job, then every build fights the same boss.';
}
Expand All @@ -27,8 +27,10 @@ export function tankUI({updateCount}){
init(options){presets=options.tankPresets;render();},
show(profile){active=!!profile?.isTank;scope();},
forWeapons(on){weapons=!!on;scope();},
// A Mythic+ route has no boss to survive, so a tank is ranked on DPS alone there.
forRoute(on){route=!!on;scope();},
settings(){
if(!(active||weapons)||!presets)return undefined;
if(route||!(active||weapons)||!presets)return undefined;
const result={preset:$('#tank-preset').value,weight:Number($('#tank-weight').value)};
for(const [key] of fields){const value=$(`[data-tank="${key}"]`).value;if(value!=='')result[key]=Number(value);}
return result;
Expand Down
Loading