From 58183d879148d27cfcae711d29489b9e93b52898 Mon Sep 17 00:00:00 2001 From: Bryce Allen Date: Tue, 2 Aug 2022 01:27:31 -0400 Subject: [PATCH] mhr: fix planner weapons stats display different format of slots was breaking it --- web/mhr/weaponplanner.html | 2 +- web/templates/weaponstats-rise.ejs | 115 +++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 web/templates/weaponstats-rise.ejs diff --git a/web/mhr/weaponplanner.html b/web/mhr/weaponplanner.html index f74feff..d6e19d8 100644 --- a/web/mhr/weaponplanner.html +++ b/web/mhr/weaponplanner.html @@ -88,7 +88,7 @@ var DATA_PATH = "/jsonapi/mhr/"; var template_path = new EJS({ url: "/templates/weaponpath.ejs" }); - var template_stats = new EJS({ url: "/templates/weaponstats.ejs" }); + var template_stats = new EJS({ url: "/templates/weaponstats-rise.ejs" }); $(document).ready(function(){ setup_weapon_autocomplete("#weapon", autocomplete_predicate, diff --git a/web/templates/weaponstats-rise.ejs b/web/templates/weaponstats-rise.ejs new file mode 100644 index 0000000..4f451a9 --- /dev/null +++ b/web/templates/weaponstats-rise.ejs @@ -0,0 +1,115 @@ + + + + + + + +
<%= name %>(<%= wtype %>)<% if (phial) { + %><<%= phial %> Phial><% + } else if (shelling_type) { + %><<%= shelling_type %> <%= shelling_level %>><% + } else if (horn_notes) { + %>[<%= horn_notes %>]<% + } %>[<%= slots %>]
+ + + + + + + + + +<% if (village_stars) { %> + +<% } %> + +<% if (guild_stars) { %> + +<% } %> + +<% if (rarity) { %> + +<% } %> + + +
Atk: <%= attack %><% if (affinity) { %><%= affinity %>%<% } %> +<% if (awaken) { %> + (<%= awaken_attack %> <%= awaken %>) +<% } else if (element) { %> + <%= element_attack %> + <%= element %> + <% if (element_2) { %> + <%= element_2_attack %> + <%= element_2 %> + <% } %> +<% } %> + +<% if (sharpness) { %> +
+ + + + + + +<% if (sharpness.length > 6) { %> + +<% } %> +
+
+ + + + + + +<% if (sharpness.length > 6) { %> + +<% } %> +
+<% if (sharpness_plus2) { %> +
+ + + + + + +<% if (sharpness.length > 6) { %> + +<% } %> +
+<% } %> +<% } %> +
<% if (defense) { %>+<%= defense %> Def<% } %> +<% if (parent_name) { %> + (parent) +<% } %> + +Village <%= village_stars %> + +Guild <%= guild_stars %> + +Rarity <%= rarity %> +
+<% if (children.length) { %> + + +
-> + <% for(var i=0; i + <%= children[i]["name"] %> + <% if (i != children.length - 1) { %>|<% } %> + <% } %> +
+<% } %> +