Bank: drink all potions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
bb56d618df
commit
2597a1d7e7
4 changed files with 28 additions and 7 deletions
|
|
@ -1903,6 +1903,7 @@ function itemPanel(id) {
|
|||
${it.slot ? equipRow(id, it) : ""}
|
||||
${it.potion ? `<div class="row"><div class="small">${esc(it.potion.text)} for ${C.potion_charges} ${it.potion.skill === "combat" ? "fights" : "actions"}.</div>
|
||||
<button class="btn gold" data-potion="${id}">Drink</button>
|
||||
${have > 1 ? `<button class="btn sm" data-potion="${id}" data-qty="all">Drink all (${fmt(have)})</button>` : ""}
|
||||
${S.me.potions[it.potion.skill] && S.me.potions[it.potion.skill].item !== id ? `<div class="small why">Replaces your ${esc(item(S.me.potions[it.potion.skill].item).name.toLowerCase())} (${S.me.potions[it.potion.skill].charges} uses left)</div>` : ""}</div>` : ""}
|
||||
${it.heal ? `<div class="row"><div class="small muted">Heals ${it.heal} resting between fights.</div>
|
||||
${S.me.food === id ? `<span class="tag good">Your fighting food</span>` : `<button class="btn sm" data-food="${id}">Eat this first</button>`}</div>` : ""}
|
||||
|
|
@ -2984,7 +2985,7 @@ document.addEventListener("click", (e) => {
|
|||
if (d.track) return act("/api/track", { id: d.track });
|
||||
if (d.favour) return act("/api/favour", { kind: d.favour });
|
||||
if (d.food) return act("/api/food", { item: d.food === "cheapest" ? null : d.food });
|
||||
if (d.potion) return act("/api/potion", { item: d.potion });
|
||||
if (d.potion) return act("/api/potion", { item: d.potion, qty: d.qty === "all" ? "all" : 1 });
|
||||
if (d.unpost) {
|
||||
if (!confirm("Delete this message?")) return;
|
||||
return act("/api/board/delete", { id: Number(d.unpost) });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue