====== Spell System - Code References ====== ===== Java Classes ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mechanics/spells/Spell.java|Spell.java]] - Base spell implementation. Defines `level`, `spellCost`, `castTime`, `cooldown`, `targetingType`, `magicAffinity`, `imageFile`, and the `cast(@NotNull Char, int)` / `cast(@NotNull Char, @NotNull Char)` / `canCast(@NotNull Char, boolean)` interfaces used by every spell. * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mechanics/spells/SpellFactory.java|SpellFactory.java]] - Factory that instantiates Spell subclasses (used to register the spell catalog and to look up the magic affinity / class restrictions for a hero). ===== Lua Scripts ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/spells/|All Spell Scripts]] - Individual spell implementations in Lua (each script returns the `desc` table consumed by the Lua spell library). ===== JSON Configuration ===== This system is implemented in Java/Lua, no JSON configuration exists. ===== String Resources ===== Select a target being. You do not have enough mana to cast a \"%1$s\" spell. You can\'t perform %s while your soul separated from body. %s is not ready for use yet %1$s: summon limit reached (Current max: %2$d)! Magic Level: Spells ===== Related mr Entities ===== * [[mr:spell|Spell]] * [[mr:spell_affinity|Spell Affinity]] * [[mr:magic_mechanic|Magic Mechanic]]