v2.13.0 : RM%/MM% d'equipement en plages (min/max) tirees au drop
db.js : GEAR_KEYS += rmPctMin, mmPctMin (les rmPct/mmPct existants = max) ; vanillaGear : min defaut = la valeur (pas de plage) ; migration ALTER gear ADD COLUMN rmPctMin/mmPctMin + UPDATE min=valeur. mp.js applyGearTuning : mods construits hors cles Min, RM%/MM% tires au hasard dans [min,max] a la creation (comme les potions). treasures.js : encyclopedie affiche la plage 'min a max %' (rmPctMin/mmPctMin portes sur le def). admin GEAR_LABELS : RM%/MM% min + max. Solo : valeurs fixes (la plage vit dans la base / monde partage). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const APP_VERSION = "2.12.0";
|
||||
const APP_VERSION = "2.13.0";
|
||||
|
||||
/* Alpha : maîtrise initiale haute pour les tests. Remettre 15 % / 15 % à la v1.0 officielle. */
|
||||
const START_COMP_PCT = 90;
|
||||
|
||||
@@ -162,6 +162,14 @@ function treasuresRender() {
|
||||
for (const def of (gearSource[slot] || [])) {
|
||||
const fx = [];
|
||||
for (const [key, label, unit] of GEAR_MOD_LABELS) {
|
||||
// RM%/MM% : affichés en plage [min, max] (tirés au hasard à la création)
|
||||
if (key === "rmPct" || key === "mmPct") {
|
||||
const max = def.mods[key] || 0, min = def[key + "Min"] != null ? def[key + "Min"] : max;
|
||||
if (!max && !min) continue;
|
||||
const txt = min === max ? `${max > 0 ? "+" : ""}${max}` : `${min} à ${max}`;
|
||||
fx.push(`<span class="tz-fx ${max < 0 ? "tz-bad" : "tz-good"}">${label} ${txt}${unit}</span>`);
|
||||
continue;
|
||||
}
|
||||
const v = def.mods[key];
|
||||
if (!v) continue;
|
||||
const cls = v > 0 ? "tz-fx tz-good" : "tz-fx tz-bad";
|
||||
@@ -272,6 +280,7 @@ function gearBySlotFromRows(rows) {
|
||||
(bySlot[r.slot] = bySlot[r.slot] || []).push({
|
||||
emoji: r.emoji, name: r.name, tier: r.tier, twoHanded: !!r.twoHanded,
|
||||
note: staticDef && staticDef.note, mods,
|
||||
rmPctMin: r.rmPctMin != null ? r.rmPctMin : r.rmPct, mmPctMin: r.mmPctMin != null ? r.mmPctMin : r.mmPct,
|
||||
});
|
||||
}
|
||||
return bySlot;
|
||||
|
||||
Reference in New Issue
Block a user