fix: issues #221 #217 #225 #227 #224 #226 - crafting refunds, mana tracking, cancel slot, multi-element guardians, spell kill advance
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m59s

This commit is contained in:
2026-05-31 01:18:01 +02:00
parent e4f4b297e8
commit 6793461a9f
16 changed files with 263 additions and 63 deletions
+11
View File
@@ -50,6 +50,17 @@ export function getElementalBonus(spellElem: string, floorElem: string): number
return 1.0; // Neutral
}
/**
* Get the elemental bonus against a multi-element floor/guardian.
* Uses the minimum bonus across all elements so multi-element guardians
* are not trivially countered (each element can resist different spells).
*/
export function getMultiElementBonus(spellElem: string, floorElems: string[]): number {
if (floorElems.length === 0) return 1.0;
if (floorElems.length === 1) return getElementalBonus(spellElem, floorElems[0]);
return Math.min(...floorElems.map(e => getElementalBonus(spellElem, e)));
}
// ─── Boon Bonuses ─────────────────────────────────────────────────────────────
export interface BoonBonuses {