====== Magic Affinity ====== Magic Affinity is a mechanic in Remixed Dungeon that determines which spells a character can learn and use. Each hero class has a specific magic affinity that defines what type of spells they can access. ==== Overview ==== Magic Affinity is a system that categorizes spells into different types, and each hero class has a specific affinity that determines which spells they can learn and use during gameplay. ==== Affinity Types ==== Common affinities include: * **Combat** - Spells that enhance combat abilities (e.g. Body Armor, Smash, Die Hard) * **Elemental** - Spells that use elemental forces (e.g. Ignite, Magic Torch, Wind Gust) * **Necromancy** - Spells related to death and undead (e.g. Summon Deathling, Exhumation) * **Rogue** - Stealth and rogue-themed spells (e.g. Cloak, Backstab) * **Huntress** - Nature and ranger-themed spells (e.g. Shoot In Eye, Charm) * **Elf** - Nature magic spells (e.g. Magic Arrow, Sprout) * **Witchcraft** - Various utility spells (e.g. Lightning Bolt, Roar) * **Priest** - Religious magic spells * **PlagueDoctor** - Disease and plague-themed spells * **Common** - Basic utility spells available to some classes ==== Hero Affinities ==== Each hero class has its own magic affinity: * [[en:rpd:warrior_class|Warrior]] - Combat * [[en:rpd:mage_class|Mage]] - Elemental * [[en:rpd:rogue_class|Rogue]] - Rogue * [[en:rpd:huntress_class|Huntress]] - Huntress * [[en:rpd:elf_class|Elf]] - Elf * [[en:rpd:necromancer_class|Necromancer]] - Necromancy * [[en:rpd:gnoll_class|Gnoll]] - Witchcraft * [[en:rpd:priest_class|Priest]] - Priest * [[en:rpd:doctor_class|Doctor]] - PlagueDoctor ==== Code References ==== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/hero/HeroClass.java|HeroClass.java]] - Where affinities are defined for classes * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mechanics/spells/Spell.java|Spell.java]] - Base spell class with magicAffinity property * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mechanics/spells/SpellHelper.java|SpellHelper.java]] - Helper methods for affinity handling * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/windows/WndHeroSpells.java|WndHeroSpells.java]] - Spell selection window logic * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/hero/initHeroes.json|initHeroes.json]] - Affinity definitions for hero classes ==== Related ==== * [[en:rpd:spells_overview|Spells]] * [[en:rpd:spell_system|Spell System]] * [[en:rpd:hero_class|Hero Classes]] * [[en:rpd:hero|Hero]] {{tag> rpd mechanics spells magic}}