Skip to content
Snippets Groups Projects
Commit e21550ca authored by dg's avatar dg
Browse files

ice shards

git-svn-id: http://svn.net-core.org/repos/t-engine4@950 51575b47-30f0-44d4-a5cc-537603b46e54
parent e7e5799d
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,7 @@ newDamageType{
end,
}
newDamageType{
name = "cold", type = "COLD", text_color = "#BLUE#",
name = "cold", type = "COLD", text_color = "#1133F3#",
projector = function(src, x, y, type, dam)
local realdam = DamageType.defaultProjector(src, x, y, type, dam)
local target = game.level.map(x, y, Map.ACTOR)
......
......@@ -33,13 +33,20 @@ newTalent{
local tg = {type="ball", range=self:getTalentRange(t), radius=1, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.ICE, self:spellCrit(self:combatTalentSpellDamage(t, 18, 200)))
game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(x-self.x), math.abs(y-self.y)), "ice_shards", {tx=x-self.x, ty=y-self.y})
local grids = self:project(tg, x, y, function(px, py)
local actor = game.level.map(px, py, Map.ACTOR)
if actor and actor ~= self then
DamageType:get(DamageType.ICE).projector(self, actor.x, actor.y, DamageType.ICE, self:spellCrit(self:combatTalentSpellDamage(t, 18, 200)))
game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(actor.x-self.x), math.abs(actor.y-self.y)), "ice_shards", {tx=actor.x-self.x, ty=actor.y-self.y})
end
end)
game:playSoundNear(self, "talents/ice")
return true
end,
info = function(self, t)
return ([[Conjures up a bolt of fire, setting the target ablaze and doing %0.2f fire damage over 3 turns.
This spell will never hit the caster.
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 25, 200))
end,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment