Android build v1.1.2

This commit is contained in:
Warren H
2026-06-29 22:35:49 -04:00
parent cbe42b6164
commit c6251167a5
52 changed files with 5554 additions and 3117 deletions
+21
View File
@@ -0,0 +1,21 @@
import type { Spell } from '../game'
export function canCastSpell(
spell: Spell,
resource: number,
cooldowns: Record<string, number>,
resourceCost: number,
) {
return resource >= resourceCost && (cooldowns[spell.id] ?? 0) <= 0
}
export function putSpellOnCooldown(
cooldowns: Record<string, number>,
spell: Spell,
cooldownMultiplier = 1,
) {
return {
...cooldowns,
[spell.id]: spell.cooldown * cooldownMultiplier,
}
}