diff --git a/static/app.js b/static/app.js
index 8025627..cba657f 100644
--- a/static/app.js
+++ b/static/app.js
@@ -617,28 +617,8 @@ function animateFight(now) {
});
}
-// How you fight with what's in your hands, and what your trade fights best with.
-function styleNote(me) {
- const weapon = me.equip.weapon, styleId = (weapon && item(weapon).style) || "sword", st = C.styles[styleId];
- const own = C.class_style[me.cls], traits = {
- sword: `${st.interval}s${me.equip.shield ? `, shield blocks ${Math.round(C.block_chance * 100)}%` : ""}`,
- hammer: `${st.interval}s, double crits`,
- staff: `${st.interval}s, accurate`,
- bow: `${st.interval}s, shoots first`,
- };
- return `
${dmgIcon(st.damage)} ${weapon ? st.name[0].toUpperCase() + st.name.slice(1) : "Fists"}: ${C.damage_types[st.damage].name.toLowerCase()}, ${traits[styleId]}.
- ${own === styleId ? `Trade weapon: +15% damage. ` : `Trade weapon: ${esc(C.styles[own].name)} (+15%).`}
`;
-}
-
function combatPanel() {
const me = S.me;
- const stat = (id) => gearStats(item(id));
- const slot = (name, label) => {
- const id = me.equip[name];
- return `${id
- ? `${item(id).icon} ${esc(item(id).name)} ${stat(id)} Unequip `
- : `No ${label} `}
`;
- };
const foods = me.edible.map((id) => `${esc(item(id).name)} (heals ${item(id).heal}, ${fmt(me.bank[id])} left) `).join("");
const hpPct = me.hp / me.max_hp * 100;
return `
@@ -652,11 +632,7 @@ function combatPanel() {
Eats below half HP, retreats when out of food.
${me.edible.length ? "" : `No food in your bank. `}
- Equipment
-
${slot("weapon", "weapon")}${slot("shield", "shield")}${slot("helmet", "helmet")}${slot("body", "body armour")}${slot("legs", "leg armour")}
-
Power ${me.power} · armour ${me.armour} (-${Math.round(me.reduction * 100)}% physical) · ward ${me.ward} (-${Math.round(me.ward_reduction * 100)}% magic)
- ${styleNote(me)}
-
`;
+ ${equipmentPanel(me, true, false)}`;
}
// Power, armour and ward, and the armour's weight.
@@ -1242,11 +1218,7 @@ function characterSheet(uid) {
${esc(cls.signature)}.
${esc(cls.combat)}.
-
Equipment
- ${paperDoll(p, mine)}
- Tools
- ${toolSlots(p)}
-
+ ${equipmentPanel(p, mine)}
`;
@@ -1303,6 +1275,12 @@ function slot2(slot, p) {
return slot in p.equip ? slot : null;
}
+// The equipment panel, the same on the character sheet and the combat page (which leaves out tools).
+function equipmentPanel(p, mine, tools = true) {
+ return `
Equipment ${paperDoll(p, mine)}
+ ${tools ? `Tools ${toolSlots(p)}` : ""}`;
+}
+
// Tools: one small slot per gathering skill.
function toolSlots(p) {
return `${C.skills.filter((s) => `tool_${s.id}` in p.equip).map((s) => {
diff --git a/static/styles.css b/static/styles.css
index 1fd92f4..62da4c2 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -202,8 +202,6 @@ textarea { width: 100%; resize: vertical; min-height: 60px; }
.action .why { font-size: 13px; color: var(--warn); }
.grid-head { grid-column: 1 / -1; margin: 10px 0 -4px; }
.tool-panel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
-.gear { display: flex; flex-direction: column; gap: 6px; }
-.gear-slot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--panel-2); }
.hp-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.bar.hp > span { background: var(--bad); }
.warn { color: var(--warn); }