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
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m59s
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -18,6 +18,7 @@ export {
|
||||
// computeElementMax is now in ../store.ts with support for unlockedManaTypeUpgrades
|
||||
export {
|
||||
getElementalBonus,
|
||||
getMultiElementBonus,
|
||||
getBoonBonuses,
|
||||
calcDamage,
|
||||
calcInsight,
|
||||
|
||||
Reference in New Issue
Block a user