Question about changing a spell

Have a really dumb question? Ask it here to get help from the experts (or those with too much time on their hands)

Moderator: Moderator

Post Reply
Message
Author
chaseface
Low Yeek
Posts: 5
Joined: Sat Sep 16, 2017 7:43 am

Question about changing a spell

#1 Post by chaseface »

I wanted to reduce/edit the radius of the spell Fireflash.... I would like this spells radius to remain the same as lvl 1 at all 5 levels. I cant seem to decipher the code to change the radius:

name = "Fireflash",
type = {"spell/fire",3},
require = spells_req3,
points = 5,
random_ego = "attack",
mana = 40,
cooldown = 8,
tactical = { ATTACKAREA = { FIRE = 2 } },
range = 7,
radius = function(self, t) return math.floor(self:combatTalentScale(t, 2, 6, 0.5, 0, 0, true)) end,
proj_speed = 4,
direct_hit = true,
requires_target = true,
target = function(self, t)
return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), selffire=self:spellFriendlyFire(), talent=t, display={particle="bolt_fire", particle_args={size_factor=1.5}, trail="firetrail"}, sound_stop="talents/fireflash"}
end,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 28, 280) end,
action = function(self, t)
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:projectile(tg, x, y, DamageType.FIRE, self:spellCrit(t.getDamage(self, t)), function(self, tg, x, y, grids)
game.level.map:particleEmitter(x, y, tg.radius, "fireflash", {radius=tg.radius, proj_x=x, proj_y=y, src_x=self.x, src_y=self.y})
if self:attr("burning_wake") then
game.level.map:addEffect(self,
x, y, 4,
engine.DamageType.INFERNO, self:attr("burning_wake"),
tg.radius,
5, nil,
{type="inferno"},
nil, tg.selffire
)
end
end)
game:playSoundNear(self, "talents/fire")
return true
end,
info = function(self, t)
local damage = t.getDamage(self, t)
local radius = self:getTalentRadius(t)
return ([[Conjures up a bolt of fire that moves toward the target and explodes into a flash of fire, doing %0.2f fire damage in a radius of %d.
The damage will increase with your Spellpower.]]):
format(damDesc(self, DamageType.FIRE, damage), radius)

Zicher
Thalore
Posts: 120
Joined: Mon Jun 23, 2014 1:02 pm

Re: Question about changing a spell

#2 Post by Zicher »

Try simply replacing the line:

Code: Select all

radius = function(self, t) return math.floor(self:combatTalentScale(t, 2, 6, 0.5, 0, 0, true)) end,
with

Code: Select all

radius = x,
where "x" is the desired radius (don't forget the comma at the end of the line).
A bus station is a place where buses stop.
A train station is a place where trains stop.
On my table, there is a workstation ...

chaseface
Low Yeek
Posts: 5
Joined: Sat Sep 16, 2017 7:43 am

Re: Question about changing a spell

#3 Post by chaseface »

Ok that worked, thanks for the help!

Post Reply