Skip to content

Commit

Permalink
sortie sim: results Node Reached resource node after
Browse files Browse the repository at this point in the history
  • Loading branch information
fourinone41 committed Oct 10, 2024
1 parent d03fda3 commit 59b6239
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
Binary file added assets/maps/nodeAnchor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions js/data/strings_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
"moderate_damage": "Moderate Damage",
"all": "All",
"node_reached": "Node Reached",
"can_advance_after_desc": "Rate of being able to advance to a resource node after final node (ignoring heavy-damage except for flagship)",
"fcf_used": "{img_fcf}Used",
"avg_resupply": "Avg Resupply",
"avg_resupply_tooltip": "Includes Main Fleet + Support Fleets + LBAS",
Expand Down
1 change: 1 addition & 0 deletions js/data/strings_ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
"moderate_damage": "中破",
"all": "All",
"node_reached": "Node到達率",
"can_advance_after_desc": "最終Nodeの後に資源マスへ進める確率(旗艦大破のみ撤退)",
"fcf_used": "{img_fcf}退避率",
"avg_resupply": "平均補給コスト",
"avg_resupply_tooltip": "出撃艦隊 + 支援艦隊 + 基地航空隊出撃&補充コスト",
Expand Down
3 changes: 3 additions & 0 deletions js/simulator-ui/sim-interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ var SIM = {
totalTransport: 0,
totalFCFUsed: 0,
totalUnderway: 0,
totalCanAdvanceAfter: 0,
nodes: [],
};
for (let n=0; n<numNodes; n++) {
Expand Down Expand Up @@ -252,6 +253,8 @@ var SIM = {
}
let shipBossFlag = FLEETS2.at(-1).ships[0];
this._results.totalGaugeDamage += shipBossFlag.maxHP - Math.max(0,shipBossFlag.HP);
let ship1 = FLEETS1[0].ships[0];
if (ship1 && this.simResultPrev && this.simResultPrev.battleNum == dataInput.nodes.length && (ship1.HP/ship1.maxHP > .25 || (ship1.repairs && ship1.repairs.length))) this._results.totalCanAdvanceAfter++;
},

_inputEquivalent: function(v1,v2) {
Expand Down
3 changes: 2 additions & 1 deletion js/simulator-ui/ui-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ var UI_MAIN = Vue.createApp({
fuelS: 0, ammoS: 0, steelS: 0, bauxS: 0, bucketS: 0, dameconS: 0, underwayS: 0,
fuelSunk: 0, ammoSunk: 0, steelSunk: 0, bauxSunk: 0, bucketSunk: 0, dameconSunk: 0, underwaySunk: 0,
emptiedPlane: 0, emptiedLBAS: 0,
fcfUsed: 0, nodeReached: [],
fcfUsed: 0, nodeReached: [], canAdvanceAfter: 0,
showMore: false,
fuelA: 0, ammoA: 0, steelA: 0, bauxA: 0, bucketA: 0, dameconA: 0, underwayA: 0,
fuelB: 0, ammoB: 0, steelB: 0, bauxB: 0, bucketB: 0, dameconB: 0, underwayB: 0,
Expand Down Expand Up @@ -518,6 +518,7 @@ var UI_MAIN = Vue.createApp({
this.results.flagSunkHP = formatNum(resultSim.totalGaugeDamage / totalNum);
this.results.flagSunkHPBoss = formatNum(resultSim.totalGaugeDamage / nodeLast.num);
this.results.transport = formatNum(resultSim.totalTransport / totalNum);
this.results.canAdvanceAfter = formatNum(resultSim.totalCanAdvanceAfter / totalNum);

this.results.fuelSupply = formatNum(resultSim.totalFuelS / totalNum);
this.results.ammoSupply = formatNum(resultSim.totalAmmoS / totalNum);
Expand Down
4 changes: 2 additions & 2 deletions simulator.html
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ <h3>
<div v-show="results.numNodes>1">
<div>{{$t('node_reached')}}:</div>
<table class="multi">
<tr><th v-for="n in results.numNodes">{{n}}</th></tr>
<tr><td v-for="stat in results.nodeReached">{{stat}}</td></tr>
<tr><th v-for="n in results.numNodes">{{n}}</th><th><img src="assets/maps/nodeAnchor.png" style="width:20px" :title="$t('can_advance_after_desc')"/></th></tr>
<tr><td v-for="stat in results.nodeReached">{{stat}}</td><td>{{results.canAdvanceAfter}}</td></tr>
</table>
</div>
<div v-show="results.fcfUsed">
Expand Down

0 comments on commit 59b6239

Please sign in to comment.