<% if (plugins.splatoon) { %>

Splatnet 3

<% if (plugins.splatoon.error) { %>
<%= plugins.splatoon.error.message %>
<% } else { %> <% if (plugins.splatoon.sections.includes("player")) { %>
<%= plugins.splatoon.player.byname %>
Playing since <%= f.date(new Date(plugins.splatoon.player.started), {time:true, date:true, timeZone:config.timezone?.name}) %>
<% for (const badge of plugins.splatoon.player.badges) { %> <% if (badge) { %> <% } else { %>
<% } %> <% } %>
<%= plugins.splatoon.player.name %>
<% for (const {icon, abilities} of plugins.splatoon.player.equipment.gears) { %>
<% for (const {icon} of abilities) { %> <% } %>
<% } %>
<% } %> <% if (plugins.splatoon.sections.includes("versus")) { %>
Level <%= plugins.splatoon.player.level %>
Rank <%= plugins.splatoon.player.rank.current %>
<%= plugins.splatoon.player.battles.wins %> victories
<%= plugins.splatoon.player.painted %>p inked
<% for (const {stage, mode, teams, awards, result, ...match} of plugins.splatoon.vs.matches) { const player = teams.map(({players}) => players.filter(({self}) => self)).flat(Infinity)[0] %>
<% if (result === "WIN") { %>
Victory!
<% } %> <% if (result === "LOSE") { %>
Defeat...
<% } %>
<%= mode.name %> <% if (mode.name !== "Turf War") { %>
<%= match.rank %>
<% } %>
<%= f.date(new Date(match.date), {time:true, date:true, timeZone:config.timezone?.name}) %>
<%= stage.name %>
<% for (const {color, score} of teams) { const width = (score/teams.map(({score}) => score).reduce((a, b) => a + b, 0))*100 %>
<% } %>
<% if (match.knockout === "WIN") { %>
K-O!
<% } else if (match.knockout === "LOSE") { %>
K-O!
<% } else { for (const {score} of teams) { %>
<% if (mode.name === "Turf War") { %> <%= score.toFixed(1) %>% <% } else { %> <%= score %> <% } %>
<% } } %>
Personal stats
<%= player.result.paint %>p
<%= player.result.kill %> <% if (player.result.assist) { %>(<%= player.result.assist %>)<% } %>
<%= player.result.death %>
<%= player.result.special %>
<% for (const {name, rank} of awards) { %>
<%= name %>
<% } %>
<% } %>
<% } %> <% if (plugins.splatoon.sections.includes("salmon-run")) { %>
<%= plugins.splatoon.player.salmon.grade.name %> +<%= plugins.splatoon.player.salmon.grade.points %>
<%= plugins.splatoon.player.salmon.eggs.regular %>
<%= plugins.splatoon.player.salmon.eggs.golden %>
<%= plugins.splatoon.player.salmon.rescues %>
<%= plugins.splatoon.player.salmon.played %> shifts
<%= plugins.splatoon.player.salmon.points %> points
<% for (const {stage, waves, weapons, special, boss, ...match} of plugins.splatoon.salmon.matches) { %>
Hazard level <%= match.hazard %>%
<%= f.date(new Date(match.date), {time:true, date:true, timeZone:config.timezone?.name}) %>
<%= stage.name %>
<% for (let i = 0; i < 3; i++) { %>
<% if (waves[i]) { %>
Wave <%= i+1 %>
<%= waves[i].delivered %> / <%= waves[i].quota %>
<% } else { %>
 
 
<% } %>
<% } %> <% if (boss) { %>
+
<% } %>
Personal stats
<% for (let i = 0; i < 3; i++) { %> " alt="" /> <% } %>
<%= match.eggs.regular %>
<%= match.eggs.golden %>
<%= match.rescues %>
<%= match.rescued %>
<% for (const {count, icon} of match.defeated) { if (count) { %>
x<%= count %>
<% } } %>
<% } %>
<% } %> <% } %>
<% } %>