feat: Add universal victory celebration modal, chamber item requirements, and fix broom & cauldron displays
This commit is contained in:
+23
-3
@@ -215,16 +215,36 @@
|
||||
if (window.navigator && window.navigator.vibrate) window.navigator.vibrate([50, 100, 150]);
|
||||
|
||||
// API Completion Call
|
||||
let newItem = null;
|
||||
try {
|
||||
const res = await fetch('/api/brew/complete', { method: 'POST' });
|
||||
const data = await res.json();
|
||||
if (data.new_item && window.notifyNewItem) {
|
||||
window.notifyNewItem(data.new_item);
|
||||
}
|
||||
if (data.new_item) newItem = data.new_item;
|
||||
} catch (e) {
|
||||
console.error("Brew complete error:", e);
|
||||
}
|
||||
|
||||
if (!newItem) {
|
||||
newItem = {
|
||||
id: "felix_felicis",
|
||||
name: "Felix Felicis",
|
||||
icon: "🧪",
|
||||
desc: "Ein Tropfen flüssiges Gold! Verleiht dir unerschütterliches Glück und enthüllt verborgene Runen."
|
||||
};
|
||||
}
|
||||
|
||||
if (successPanel) successPanel.style.display = 'block';
|
||||
|
||||
if (window.showChamberVictory) {
|
||||
window.showChamberVictory({
|
||||
chamberBadge: "Kammer III: Die Brauküche",
|
||||
title: "⚗️ Zaubertrank Gemeistert!",
|
||||
statsHtml: `<span>🧪 Elixier: <strong>Felix Felicis</strong></span><span>🌡️ Hitze: <strong>Perfekt gemeistert</strong></span>`,
|
||||
item: newItem,
|
||||
storyText: "Der Kessel erstrahlt in gleißendem, flüssigem Gold! Du füllst eine Phiole des unbezahlbaren <strong>Felix Felicis</strong> ab. Seine Wärme durchdringt deinen Geist. Mit geschärften Sinnen trittst du vor das gewaltige <strong>Runen-Drehschloss der vier Gründer</strong>!",
|
||||
nextUrl: "/cryptex",
|
||||
nextBtnText: "➔ Weiter zu Kammer IV: Das Drehschloss 🔐"
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user