====== Magic Arrow Spell - Code References ====== ===== Java Classes ===== * This spell is implemented in Lua, no Java class exists * Spell system: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/lua/Spells.java|Spells.java]] (Lua spell integration) ===== JSON Configuration ===== This entity is implemented in Lua, no JSON configuration exists ===== String Resources ===== * English: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Russian: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-ru/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Spanish: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-es/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Portuguese (Brazilian): [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-pt-rBR/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Chinese (Simplified): [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-zh-rCN/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Chinese (Traditional): [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-zh-rTW/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * German: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-de/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * French: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-fr/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Japanese: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-ja/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Korean: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-ko/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Italian: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-it/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Polish: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-pl/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Ukrainian: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-uk/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Hungarian: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-hu/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Turkish: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-tr/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Greek: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-el/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Indonesian: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-in/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] * Malay: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-ms/strings_all.xml|MagicArrow_Name, MagicArrow_Info]] ===== Lua Scripts ===== * Main script: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/spells/MagicArrow.lua|MagicArrow.lua]] * Spell list: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/spells/CustomSpellsList.lua|CustomSpellsList.lua]] - Registered in Elf spell category ===== Spell Configuration (from Lua) ===== * **Image Index:** 0 * **Image File:** spellsIcons/naturegift.png * **Magic Affinity:** Elf * **Targeting Type:** char_not_self (targets other characters) * **Spell Level:** 1 * **Cast Time:** 0.1 seconds * **Spell Cost:** 5 mana * **Cooldown:** 1 second * **Damage:** Random value between 1 and caster's HT/2 (half of caster's max health) * **Zap Effect:** "magic_arrow" visual effect from caster to victim ===== Implementation Details ===== * **Location:** scripts/spells/MagicArrow.lua * **Dependencies:** - scripts/lib/commonClasses.lua (RPD) - scripts/lib/spell.lua * **Cast Behavior:** Creates magic arrow zap effect and deals damage to target * **Damage Formula:** math.random(1, caster:ht()/2) * **Spell Category:** Elf spells (CustomSpellsList.lua) ===== Related Files ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/lib/spell.lua|spell.lua]] - Spell base class * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/lib/commonClasses.lua|commonClasses.lua]] - Common RPD functions * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/spells/CustomSpellsList.lua|CustomSpellsList.lua]] - Spell category registration