From 5d7e6b610e8b4c87eec442fb59d0a915d9c04bcf Mon Sep 17 00:00:00 2001 From: Daniel Arroyo Date: Mon, 24 Aug 2026 10:13:58 -0400 Subject: [PATCH] refactor(personajes): replace per-character capacity table with single reference table (lv0-lv3, baseWeight 115.230) --- .../META-INF/resources/static/js/shots.js | 6 + .../templates/PageResource/personajes.html | 119 ++++-------------- 2 files changed, 32 insertions(+), 93 deletions(-) diff --git a/src/main/resources/META-INF/resources/static/js/shots.js b/src/main/resources/META-INF/resources/static/js/shots.js index 4f4731a..8528985 100644 --- a/src/main/resources/META-INF/resources/static/js/shots.js +++ b/src/main/resources/META-INF/resources/static/js/shots.js @@ -27,6 +27,12 @@ window.shots = { return w > 0 ? Math.floor(maxW / w) : 0; }, + referenceCapacity(tipo, grado, skillLevel, baseWeight = 115230) { + const pesoMax = baseWeight * (1 + skillLevel); + const w = this.itemWeight(tipo, grado); + return w > 0 ? Math.floor(pesoMax / w) : 0; + }, + totalCapacityOf(c) { let total = 0; for (const t of this.TIPOS) { diff --git a/src/main/resources/templates/PageResource/personajes.html b/src/main/resources/templates/PageResource/personajes.html index 360c5ab..f61874b 100644 --- a/src/main/resources/templates/PageResource/personajes.html +++ b/src/main/resources/templates/PageResource/personajes.html @@ -157,65 +157,38 @@ -
+
-

💼 Capacidad de inventario de shots (por peso)

-

Cuántos shots de cada tipo×grado caben en el inventario según el pasivo de cada personaje. Peso máx = baseWeight × (1 + skillLevel).

+

💼 Capacidad de inventario — Referencia (baseWeight 115.230)

+

Shots que entran según skill del personaje (peso máx = 115.230 × (1 + skillLevel)). Variará si tu personaje tiene otro baseWeight.

- - - - - - - - + + + + + + -
PersonajeClase / LvPeso máxTotal shots
TipoGradolv0 (×1)
115.230
lv1 (×2)
230.460
lv2 (×3)
345.690
lv3 (×4)
460.920