====== Roar Spell - Code References ====== {{ rpd:images:roar_spell.png|Roar Spell }} ===== Java Classes ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mechanics/spells/Spell.java|Spell.java]] (Base class) ===== JSON Configuration ===== This entity is implemented in Lua, no JSON configuration exists ===== String Resources ===== Roar The mighty roar will surely terrify your enemies and inspire allies. ===== Lua Scripts ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/spells/Roar.lua|Roar.lua]] - Main spell implementation * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/spells/CustomSpellsList.lua|CustomSpellsList.lua]] - Spell registration (line 13: spells["Witchcraft"] = {"Roar","LightningBolt","Heal","Order"}) ===== Full Lua Script Content ===== --- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by mike. --- DateTime: 1/6/21 1:43 AM --- local RPD = require "scripts/lib/commonClasses" local spell = require "scripts/lib/spell" return spell.init{ desc = function () return { image = 0, imageFile = "spellsIcons/witchcraft.png", name = "Roar_Name", info = "Roar_Info", magicAffinity = "Witchcraft", targetingType = "self", level = 1, castTime = 0, spellCost = 1 } end, cast = function(self, spell, caster) RPD.Sfx.Flare:attach( 6, 32, 0xFF0000, true, caster:getSprite(), 2); RPD.playSound("snd_challenge") local duration = caster:lvl() for _ = 1, caster:skillLevel() do local tgt = caster:randomEnemy() if tgt:valid() then RPD.Sfx.Flare:attach( 4, 16, 0xFF0000, true, tgt:getSprite(), 2); RPD.affectBuff(tgt, RPD.Buffs.Terror, duration):setSource(caster) end end return true end } ===== Entity Usage Analysis ===== Using find_entity_usage.py: * Lua file: ./RemixedDungeon/src/main/assets/scripts/spells/CustomSpellsList.lua (line 13) - Registered as Witchcraft spell * Lua file: ./RemixedDungeon/src/main/assets/scripts/spells/Roar.lua - Main spell implementation * String resources: Roar_Name, Roar_Info * No Java class implementation (Lua-based spell) * No JSON configuration (Lua-based spell) ===== Related mr Entities ===== * [[mr:terror_buff|Terror (Buff)]] - Applied by Roar spell * [[mr:witchcraft|Witchcraft Affinity]] - Spell affinity