Aura around monster.
Posted: Thu Jul 30, 2015 10:47 pm
So I have the spell pack that was made for LOG2 and it comes with a shit ton of spells.. For the party to use.
I'm wanting to make it so one of my boss's is able to release a fire aura around him that will burn the party if they are to close to it. Below is the spell's coding
And this is the coding for the functions that belong with that spell
Is it possible to make the boss give off this fire aura as a defense or no? I'd like to use it as a way to deal damage to the party if they are trying to side step the boss to much.
I'm wanting to make it so one of my boss's is able to release a fire aura around him that will burn the party if they are to close to it. Below is the spell's coding
Code: Select all
defineSpell{
name = "fire_aura",
uiName = "Fire Aura",
skill = "fire_magic",
requirements = {"fire_magic", 5},
gesture = 1458,
manaCost = 70,
icon = 5,
iconAtlas = "mod_assets/textures/gui/icons.tga",
spellIcon = 5,
spellIconAtlas = "mod_assets/textures/gui/spellIcons.tga",
description = "Burns ennemies in melee range. Lasts 3 seconds per willpower point.",
onCast = function(champion, x, y, direction, elevation, skillLevel)
local time = 3 * champion:getCurrentStat("willpower")
spells_functions.script.soundStart("fire_elemental_burn", 10)
delayedCall("spells_functions", time-10, "soundStop", "fire_elemental_burn", 10)
spells_functions.script.lightStart("fire_aura", 1, 0.5, 0.25, 10, 10, 10)
delayedCall("spells_functions", time-10, "lightStop", "fire_aura", 10)
for i = 0, time do delayedCall("spells_functions", i, "fireAuraPulse", champion:getOrdinal()) end
end
}Code: Select all
function fireAuraPulse(champion)
fireAuraTile(-1, -1, champion)
fireAuraTile(-1, 0, champion)
fireAuraTile(-1, 1, champion)
fireAuraTile( 0, 1, champion)
fireAuraTile( 1, 1, champion)
fireAuraTile( 1, 0, champion)
fireAuraTile( 1, -1, champion)
fireAuraTile( 0, -1, champion)
end
function fireAuraTile(dx, dy, champion)
local w = party.map:getWidth()
local h = party.map:getHeight()
local x = party.x+dx
local y = party.y+dy
if (-1<x and x<w and -1<y and y<h) then
local a = spawn("fire_aura_blast", party.level, x, y, party.facing, party.elevation)
a.tiledamager:setCastByChampion(champion)
end
end