Table of Contents

Roar Spell - Code References

Roar Spell

Java Classes

JSON Configuration

This entity is implemented in Lua, no JSON configuration exists

String Resources

<string name="Roar_Name">Roar</string>
<string name="Roar_Info">The mighty roar will surely terrify your enemies and inspire allies.</string>

Lua Scripts

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: