diff --git a/game/engine/Map.lua b/game/engine/Map.lua index 0d07270202dc6bb86435a49947164f595717f01d..7c97e9d375f93ddcb0d80eee1c2df4d965bdf3ba 100644 --- a/game/engine/Map.lua +++ b/game/engine/Map.lua @@ -675,7 +675,7 @@ function _M:displayEffects() -- Dont bother with obviously out of screen stuff if e.x + e.radius >= self.mx and e.x - e.radius < self.mx + self.viewport.mwidth and e.y + e.radius >= self.my and e.y - e.radius < self.my + self.viewport.mheight then local grids - local s = self.tilesSurface:get(e.overlay.display, e.overlay.color_r, e.overlay.color_g, e.overlay.color_b, e.overlay.color_br, e.overlay.color_bg, e.overlay.color_bb, e.overlay.image, 120) + local s = self.tilesSurface:get(e.overlay.display, e.overlay.color_r, e.overlay.color_g, e.overlay.color_b, e.overlay.color_br, e.overlay.color_bg, e.overlay.color_bb, e.overlay.image, e.overlay.alpha) -- Handle balls if e.dir == 5 then diff --git a/game/engine/utils.lua b/game/engine/utils.lua index 2638384344e94ee04a91942685909344c1d27220..861cd5b14548abb0a0e1f96348f5c86b2966de68 100644 --- a/game/engine/utils.lua +++ b/game/engine/utils.lua @@ -324,6 +324,7 @@ function util.getval(val, ...) end function core.fov.circle_grids(x, y, radius, block) + if radius == 0 then return {[x]={[y]=true}} end local grids = {} core.fov.calc_circle(x, y, radius, function(_, lx, ly) if not grids[lx] then grids[lx] = {} end @@ -340,6 +341,7 @@ function core.fov.circle_grids(x, y, radius, block) end function core.fov.beam_grids(x, y, radius, dir, angle, block) + if radius == 0 then return {[x]={[y]=true}} end local grids = {} core.fov.calc_beam(x, y, radius, dir, angle, function(_, lx, ly) if not grids[lx] then grids[lx] = {} end diff --git a/game/modules/tome/data/birth/classes/divine.lua b/game/modules/tome/data/birth/classes/divine.lua new file mode 100644 index 0000000000000000000000000000000000000000..d0b1207c45470699f98112db090b04e70070a75c --- /dev/null +++ b/game/modules/tome/data/birth/classes/divine.lua @@ -0,0 +1,65 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +newBirthDescriptor{ + type = "class", + name = "Divine", + desc = { + "Divine.", + }, + descriptor_choices = + { + subclass = + { + __ALL__ = "never", + ['Sun Paladin'] = function() return profile.mod.allow_build.divine_sun_paladin and "allow" or "never" end, + }, + }, + copy = { + -- All mages are of angolwen faction + faction = "sunwall", + }, +} + +newBirthDescriptor{ + type = "subclass", + name = "Sun Paladin", + desc = { + "Wohhha", + "Their most important stats are: Magic and Willpower", + }, + stats = { mag=2, str=2, dex=2, }, + talents_types = { + ["divine/sun"]={true, 0.3}, + ["divine/chants"]={true, 0.3}, + ["divine/glyphs"]={true, 0.3}, + ["divine/combat"]={true, 0.3}, + ["divine/light"]={true, 0.3}, + }, + talents = { + }, + copy = { + max_life = 110, + life_rating = 12, + resolvers.equip{ id=true, + {type="weapon", subtype="mace", name="iron mace", autoreq=true}, + {type="armor", subtype="massive", name="iron plate armour", autoreq=true} + }, + }, +} diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index 83edfff5bf74892cfd216015b3c72eae079acd96..3b37ebb31b91dfaceb5ca96f7652e98ba2cbd011 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -128,3 +128,4 @@ load("/data/birth/classes/archer.lua") load("/data/birth/classes/rogue.lua") load("/data/birth/classes/mage.lua") load("/data/birth/classes/wilder.lua") +load("/data/birth/classes/divine.lua") diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index d03b9d2aa16e42b800759d902a982517857861f4..434b193915e6ebe43c32b1be2d3d53c4409d90d7 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -37,6 +37,10 @@ newBirthDescriptor{ Vampire = function() return profile.mod.allow_build.undead_vampire and "allow" or "never" end, Wight = function() return profile.mod.allow_build.undead_wight and "allow" or "never" end, }, + class = + { + Divine = "never", + }, }, copy = { faction = "players", diff --git a/game/modules/tome/data/birth/worlds.lua b/game/modules/tome/data/birth/worlds.lua index a4f84ea80d96f81c85ed5626b069c9b4eb9d939a..1fec0f382413c1fa54ae57f4a1852a27051bf6bd 100644 --- a/game/modules/tome/data/birth/worlds.lua +++ b/game/modules/tome/data/birth/worlds.lua @@ -47,6 +47,7 @@ newBirthDescriptor{ { __ALL__ = "allow", Mage = function() return profile.mod.allow_build.mage and "allow" or "never" end, + Divine = function() return profile.mod.allow_build.divine and "allow" or "never" end, Wilder = function() return ( profile.mod.allow_build.wilder_summoner or profile.mod.allow_build.wilder_wyrmic diff --git a/game/modules/tome/data/gfx/particles/golden_shield.lua b/game/modules/tome/data/gfx/particles/golden_shield.lua new file mode 100644 index 0000000000000000000000000000000000000000..d9394f1141066b940d43d1926c3e6232d526c105 --- /dev/null +++ b/game/modules/tome/data/gfx/particles/golden_shield.lua @@ -0,0 +1,46 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return { generator = function() + local ad = rng.range(0, 360) + local a = math.rad(ad) + local dir = math.rad(ad + 90) + local r = rng.range(12, 20) + local dirv = math.rad(1) + + return { + trail = 1, + life = 10, + size = 4, sizev = -0.1, sizea = 0, + + x = r * math.cos(a), xv = -0.1, xa = 0, + y = r * math.sin(a), yv = -0.1, ya = 0, + dir = dir, dirv = dirv, dira = 0, + vel = 1, velv = 0, vela = 0, + + r = rng.range(220, 255)/255, rv = 0, ra = 0, + g = rng.range(200, 230)/255, gv = 0, ga = 0, + b = 0, bv = 0, ba = 0, + a = rng.range(25, 220)/255, av = 0, aa = 0, + } +end, }, +function(self) + self.ps:emit(10) +end, +100 diff --git a/game/modules/tome/data/gfx/particles/light.lua b/game/modules/tome/data/gfx/particles/light.lua new file mode 100644 index 0000000000000000000000000000000000000000..b0680931b5f4f41ad6eab6b5c731fbd6326ea77d --- /dev/null +++ b/game/modules/tome/data/gfx/particles/light.lua @@ -0,0 +1,48 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return { generator = function() + local ad = rng.range(0, 360) + local a = math.rad(ad) + local dir = math.rad(ad + 180) + local r = rng.range(12, 20) + + return { + trail = 1, + life = 10, + size = 4, sizev = 0.08, sizea = 0, + + x = r * math.cos(a), xv = 0, xa = 0, + y = r * math.sin(a), yv = 0, ya = 0, + dir = dir, dirv = math.rad(3), dira = math.rad(3) / 3, + vel = 1.4, velv = 0, vela = 0, + + r = rng.range(220, 255)/255, rv = 0, ra = 0, + g = rng.range(200, 230)/255, gv = 0, ga = 0, + b = 0, bv = 0, ba = 0, + a = rng.range(25, 220)/255, av = 0, aa = 0, + } +end, }, +function(self) + self.nb = (self.nb or 0) + 1 + if self.nb < 4 then + self.ps:emit(20) + end +end, +800 diff --git a/game/modules/tome/data/gfx/particles/light_beam.lua b/game/modules/tome/data/gfx/particles/light_beam.lua new file mode 100644 index 0000000000000000000000000000000000000000..bc74504fa96f4edf32c259b050ff8aa8ec1967f3 --- /dev/null +++ b/game/modules/tome/data/gfx/particles/light_beam.lua @@ -0,0 +1,57 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +-- Make the ray +local ray = {} +local tiles = math.ceil(math.sqrt(tx*tx+ty*ty)) +local tx = tx * engine.Map.tile_w +local ty = ty * engine.Map.tile_h +local breakdir = math.rad(rng.range(-8, 8)) +ray.dir = math.atan2(ty, tx) +ray.size = math.sqrt(tx*tx+ty*ty) + +-- Populate the beam based on the forks +return { generator = function() + local a = ray.dir + local rad = rng.range(-3,3) + local ra = math.rad(rad) + local r = rng.range(1, ray.size) + + return { + life = 8, + size = 4, sizev = -0.2, sizea = 0, + + x = r * math.cos(a) + 2 * math.cos(ra), xv = 0, xa = 0, + y = r * math.sin(a) + 2 * math.sin(ra), yv = 0, ya = 0, + dir = rng.percent(50) and ray.dir + math.rad(90) or ray.dir - math.rad(90), dirv = 0, dira = 0, + vel = rng.percent(80) and 1 or 0, velv = 0, vela = 0, + + r = rng.range(220, 255)/255, rv = 0, ra = 0, + g = rng.range(200, 230)/255, gv = -0.04, ga = 0, + b = 0, bv = 0, ba = 0, + a = rng.range(25, 220)/255, av = 0, aa = 0, + } +end, }, +function(self) + self.nb = (self.nb or 0) + 1 + if self.nb < 4 then + self.ps:emit(100*tiles) + end +end, +8*100*tiles diff --git a/game/modules/tome/data/talents.lua b/game/modules/tome/data/talents.lua index db3532dd5d4f67f1919c6be70bff42e48750b00a..b058d1da30ff19a21bc376ee7a98d0237804ca72 100644 --- a/game/modules/tome/data/talents.lua +++ b/game/modules/tome/data/talents.lua @@ -22,5 +22,6 @@ load("/data/talents/techniques/techniques.lua") load("/data/talents/cunning/cunning.lua") load("/data/talents/spells/spells.lua") load("/data/talents/gifts/gifts.lua") +load("/data/talents/divine/divine.lua") load("/data/talents/corruptions/corruptions.lua") load("/data/talents/undeads/undeads.lua") diff --git a/game/modules/tome/data/talents/divine/chants.lua b/game/modules/tome/data/talents/divine/chants.lua new file mode 100644 index 0000000000000000000000000000000000000000..c680ac32547d745d8e45d428ab51b7dec9a44ea9 --- /dev/null +++ b/game/modules/tome/data/talents/divine/chants.lua @@ -0,0 +1,169 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +local function cancelChants(self) + local chants = {self.T_CHANT_OF_FORTITUDE, self.T_CHANT_OF_FORTRESS, self.T_CHANT_OF_RESISTANCE, self.T_CHANT_OF_LIGHT} + for i, t in ipairs(chants) do + if self:isTalentActive(t) then + local old = self.energy.value + self.energy.value = 100000 + self:useTalent(t) + self.energy.value = old + end + end +end + +newTalent{ + name = "Chant of Fortitude", + type = {"divine/chants", 1}, + mode = "sustained", + require = divi_req1, + points = 5, + cooldown = 30, + tactical = { + BUFF = 10, + }, + range = 20, + activate = function(self, t) + cancelChants(self) + local power = 5 + self:getTalentLevel(t) * self:combatSpellpower(0.12) + game:playSoundNear(self, "talents/spell_generic2") + local ret = { + phys = self:addTemporaryValue("combat_physresist", power), + spell = self:addTemporaryValue("combat_spellresist", power), + particle = self:addParticles(Particles.new("golden_shield", 1)) + } + return ret + end, + deactivate = function(self, t, p) + self:removeParticles(p.particle) + self:removeTemporaryValue("combat_physresist", p.phys) + self:removeTemporaryValue("combat_spellresist", p.spell) + return true + end, + info = function(self, t) + return ([[Chant the glory of the sun, granting you %d physical and spell resistance. + You may only have one Chant active at once. + The resistance will increase with the Magic stat]]):format(5 + self:getTalentLevel(t) * self:combatSpellpower(0.12)) + end, +} + +newTalent{ + name = "Chant of Fortress", + type = {"divine/chants", 2}, + mode = "sustained", + require = divi_req2, + points = 5, + cooldown = 30, + tactical = { + BUFF = 10, + }, + range = 20, + activate = function(self, t) + cancelChants(self) + local power = 5 + self:getTalentLevel(t) * self:combatSpellpower(0.08) + game:playSoundNear(self, "talents/spell_generic2") + local ret = { + phys = self:addTemporaryValue("resists", {[DamageType.PHYSICAL] = power}), + particle = self:addParticles(Particles.new("golden_shield", 1)) + } + return ret + end, + deactivate = function(self, t, p) + self:removeParticles(p.particle) + self:removeTemporaryValue("resists", p.phys) + return true + end, + info = function(self, t) + return ([[Chant the glory of the sun, granting you %d%% physical damage resistance. + You may only have one Chant active at once. + The resistance will increase with the Magic stat]]):format(5 + self:getTalentLevel(t) * self:combatSpellpower(0.08)) + end, +} + +newTalent{ + name = "Chant of Resistance", + type = {"divine/chants",3}, + mode = "sustained", + require = divi_req3, + points = 5, + cooldown = 30, + tactical = { + BUFF = 10, + }, + range = 20, + activate = function(self, t) + cancelChants(self) + local power = 5 + self:getTalentLevel(t) * self:combatSpellpower(0.08) + game:playSoundNear(self, "talents/spell_generic2") + local ret = { + res = self:addTemporaryValue("resists", { + [DamageType.FIRE] = power, + [DamageType.LIGHTNING] = power, + [DamageType.ACID] = power, + [DamageType.COLD] = power, + }), + particle = self:addParticles(Particles.new("golden_shield", 1)) + } + return ret + end, + deactivate = function(self, t, p) + self:removeParticles(p.particle) + self:removeTemporaryValue("resists", p.res) + return true + end, + info = function(self, t) + return ([[Chant the glory of the sun, granting you %d%% elemental resistances. + You may only have one Chant active at once. + The resistance will increase with the Magic stat]]):format(5 + self:getTalentLevel(t) * self:combatSpellpower(0.08)) + end, +} + +newTalent{ + name = "Chant of Light", + type = {"divine/chants", 4}, + mode = "sustained", + require = divi_req4, + points = 5, + cooldown = 30, + tactical = { + BUFF = 10, + }, + range = 20, + activate = function(self, t) + cancelChants(self) + local power = 10 + self:getTalentLevel(t) * self:combatSpellpower(0.10) + game:playSoundNear(self, "talents/spell_generic2") + local ret = { + phys = self:addTemporaryValue("inc_damage", {[DamageType.LIGHT] = power}), + particle = self:addParticles(Particles.new("golden_shield", 1)) + } + return ret + end, + deactivate = function(self, t, p) + self:removeParticles(p.particle) + self:removeTemporaryValue("inc_damage", p.phys) + return true + end, + info = function(self, t) + return ([[Chant the glory of the sun, granting you %d%% more light damage. + You may only have one Chant active at once. + The damage will increase with the Magic stat]]):format(10 + self:getTalentLevel(t) * self:combatSpellpower(0.10)) + end, +} diff --git a/game/modules/tome/data/talents/divine/divine.lua b/game/modules/tome/data/talents/divine/divine.lua new file mode 100644 index 0000000000000000000000000000000000000000..ea61bd713b0f98c6a95bfaa3fcf67b8a71edaeec --- /dev/null +++ b/game/modules/tome/data/talents/divine/divine.lua @@ -0,0 +1,50 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +-- Corruptions +newTalentType{ type="divine/chants", name = "chants", description = "Chant the glory of the sun." } +newTalentType{ type="divine/light", name = "light", description = "Invoke the power of light to heal and mend." } +newTalentType{ type="divine/combat", name = "combat", description = "Your devotion allows you to combat your foes with indomitable determination." } +newTalentType{ type="divine/sun", name = "sun", description = "Summon the power of the Sun to burn your foes." } +newTalentType{ type="divine/glyphs", name = "glyphs", description = "Bind the holy powers into glyphs to trap your foes." } + +-- Generic requires for corruptions based on talent level +divi_req1 = { + stat = { mag=function(level) return 12 + (level-1) * 2 end }, + level = function(level) return 0 + (level-1) end, +} +divi_req2 = { + stat = { mag=function(level) return 20 + (level-1) * 2 end }, + level = function(level) return 4 + (level-1) end, +} +divi_req3 = { + stat = { mag=function(level) return 28 + (level-1) * 2 end }, + level = function(level) return 8 + (level-1) end, +} +divi_req4 = { + stat = { mag=function(level) return 36 + (level-1) * 2 end }, + level = function(level) return 12 + (level-1) end, +} +divi_req5 = { + stat = { mag=function(level) return 44 + (level-1) * 2 end }, + level = function(level) return 16 + (level-1) end, +} + +load("/data/talents/divine/chants.lua") +load("/data/talents/divine/sun.lua") diff --git a/game/modules/tome/data/talents/divine/sun.lua b/game/modules/tome/data/talents/divine/sun.lua new file mode 100644 index 0000000000000000000000000000000000000000..c295c19726d5bf08cdb7bd81f50f72cc42fd0118 --- /dev/null +++ b/game/modules/tome/data/talents/divine/sun.lua @@ -0,0 +1,136 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +newTalent{ + name = "Searing Light", + type = {"divine/sun", 1}, + require = divi_req1, + points = 5, + cooldown = 9, + tactical = { + ATTACK = 10, + }, + range = 10, + reflectable = true, + action = function(self, t) + local tg = {type="hit", range=self:getTalentRange(t), talent=t} + local x, y = self:getTarget(tg) + if not x or not y then return nil end + self:project(tg, x, y, DamageType.LIGHT, self:spellCrit(6 + self:combatSpellpower(0.3) * self:getTalentLevel(t)), {type="light"}) + + local _ _, x, y = self:canProject(tg, x, y) + -- Add a lasting map effect + game.level.map:addEffect(self, + x, y, 4, + DamageType.LIGHT, 6 + self:combatSpellpower(0.2) * self:getTalentLevel(t), + 0, + 5, nil, + engine.Entity.new{alpha=30, display='', color_br=255, color_bg=215, color_bb=0}, + nil, self:spellFriendlyFire() + ) + + game:playSoundNear(self, "talents/flame") + return true + end, + info = function(self, t) + return ([[Calls the power of the Sun into a searing light doing %0.2f damage and leaving a spot on the ground for 4 turns doing %0.2f damage. + The damage will increase with the Magic stat]]):format(6 + self:combatSpellpower(0.3) * self:getTalentLevel(t), 6 + self:combatSpellpower(0.2) * self:getTalentLevel(t)) + end, +} + +newTalent{ + name = "Sun Flare", + type = {"divine/sun", 2}, + require = divi_req2, + points = 5, + cooldown = 22, + tactical = { + ATTACK = 10, + }, + range = 6, + action = function(self, t) + local tg = {type="ball", range=0, friendlyfire=true, radius=5 + self:getTalentLevel(t), talent=t} + tg.friendlyfire = false + self:project(tg, self.x, self.y, DamageType.BLIND, 3 + self:getTalentLevel(t)) + self:project(tg, self.x, self.y, DamageType.LITE, 1) + if self:getTalentLevel(t) then + self:project(tg, self.x, self.y, DamageType.LIGHT, 4 + self:combatSpellpower(0.1) * self:getTalentLevel(t)) + end + game:playSoundNear(self, "talents/flame") + return true + end, + info = function(self, t) + return ([[Invokes a sun flare, blinding your foes and lighting up your immediate area. + At level 3 it will start dealing %0.2f light damage. + The damage will increase with the Magic stat]]): + format( + 4 + self:combatSpellpower(0.1) * self:getTalentLevel(t) + ) + end, +} + +newTalent{ + name = "Firebeam", + type = {"divine/sun",3}, + require = divi_req3, + points = 5, + cooldown = 10, + tactical = { + ATTACK = 10, + }, + range = 10, + action = function(self, t) + local tg = {type="beam", range=self:getTalentRange(t), talent=t} + local x, y = self:getTarget(tg) + if not x or not y then return nil end + self:project(tg, x, y, DamageType.FIRE, self:spellCrit(10 + self:combatSpellpower(0.2) * self:getTalentLevel(t))) + local _ _, x, y = self:canProject(tg, x, y) + game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(x-self.x), math.abs(y-self.y)), "light_beam", {tx=x-self.x, ty=y-self.y}) + + game:playSoundNear(self, "talents/flame") + return true + end, + info = function(self, t) + return ([[Fire a beam of sun flames at your foes, burning all those in line for %0.2f light damage. + The damage will increase with the Magic stat]]): + format(10 + self:combatSpellpower(0.2) * self:getTalentLevel(t)) + end, +} + +newTalent{ + name = "Sunburst", + type = {"divine/sun", 4}, + require = divi_req4, + points = 5, + cooldown = 35, + tactical = { + ATTACKAREA = 10, + }, + range = 3, + action = function(self, t) + local tg = {type="ball", range=0, radius=3, friendlyfire=false, talent=t} + self:project(tg, self.x, self.y, DamageType.LIGHT, self:spellCrit(10 + self:combatSpellpower(0.17) * self:getTalentLevel(t)), {type="light"}) + game:playSoundNear(self, "talents/fireflash") + return true + end, + info = function(self, t) + return ([[Conjures a furious burst of sunlight, dealing %0.2f light damage to all those around you in a radius of 3. + The damage will increase with the Magic stat]]):format(self:getTalentLevel(t), 10 + self:combatSpellpower(0.17) * self:getTalentLevel(t)) + end, +} diff --git a/ideas/divine.ods b/ideas/divine.ods index 7352c1fd9e729e80659fb41d7a6c5bf59844de38..ac722130037c0809352db9962df38bdd171f7a2a 100644 Binary files a/ideas/divine.ods and b/ideas/divine.ods differ