diff --git a/game/engines/default/engine/Projectile.lua b/game/engines/default/engine/Projectile.lua index a376376a59959b55dd1935108d78c53763282764..ccee83e9a6254fe50a9c80c95b298b75eaa4a4cd 100644 --- a/game/engines/default/engine/Projectile.lua +++ b/game/engines/default/engine/Projectile.lua @@ -139,6 +139,49 @@ function _M:tooltip() return "Projectile: "..self.name end +local coords = { + [1] = { 4, 2, 7, 3 }, + [2] = { 1, 3, 4, 6 }, + [3] = { 2, 6, 1, 9 }, + [4] = { 7, 1, 8, 2 }, + [5] = {}, + [6] = { 9, 3, 8, 2 }, + [7] = { 4, 8, 1, 9 }, + [8] = { 7, 9, 4, 6 }, + [9] = { 8, 6, 7, 3 }, +} + +--- Move one step to the given target if possible +-- This tries the most direct route, if not available it checks sides and always tries to get closer +function _M:moveDirection(x, y) + local l = line.new(self.x, self.y, x, y) + local lx, ly = l() + if lx and ly then + -- if we are blocked, try some other way + if game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move") then + local dirx = lx - self.x + local diry = ly - self.y + local dir = coord_to_dir[dirx][diry] + + local list = coords[dir] + local l = {} + -- Find posiblities + for i = 1, #list do + local dx, dy = self.x + dir_to_coord[list[i]][1], self.y + dir_to_coord[list[i]][2] + if not game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move") then + l[#l+1] = {dx,dy, (dx-x)^2 + (dy-y)^2} + end + end + -- Move to closest + if #l > 0 then + table.sort(l, function(a,b) return a[3]<b[3] end) + return self:move(l[1][1], l[1][2]) + end + else + return self:move(lx, ly) + end + end +end --- Called by the engine when the projectile can move function _M:act() @@ -162,6 +205,16 @@ function _M:act() game.level:removeEntity(self) self.dead = true end + elseif self.homing then + self:moveDirection(self.homing.target.x, self.homing.target.y) + self.homing.count = self.homing.count - 1 + if (self.x == self.homing.target.x and self.y == self.homing.target.y) or self.homing.count <= 0 then + self.homing.on_hit(self, self.src, self.homing.target) + game.level:removeEntity(self) + self.dead = true + else + self.homing.on_move(self, self.src) + end end end @@ -205,3 +258,25 @@ function _M:makeProject(src, display, def, do_move, do_act, do_stop) return p end + +--- Generate a projectile for an homing projectile +function _M:makeHoming(src, display, def, target, count, on_move, on_hit) + display = display or {display='*'} + local speed = def.speed + local name = def.name + speed = speed or 10 + local p =_M.new{ + name = name, + display = display.display or ' ', color = display.color or colors.WHITE, image = display.image or nil, + travel_particle = display.particle, + trail_particle = display.trail, + src = src, + def = def, + homing = {target=target, count=count, on_move=on_move, on_hit=on_hit}, + energy = {mod=speed}, + } + + game.level.map:checkAllEntities(target.x, target.y, "on_projectile_target", p) + + return p +end diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 3a9c3c8e10cfb7561f5f88ebe663efaaa2a773b5..d8efc7baaeff03eba9e8cc5f03d1cad2d8037da1 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1313,6 +1313,7 @@ function _M:postUseTalent(ab, ret) -- Cancel stealth! if ab.id ~= self.T_STEALTH and ab.id ~= self.T_HIDE_IN_PLAIN_SIGHT and not ab.no_break_stealth then self:breakStealth() end + if ab.id ~= self.T_LIGHTNING_SPEED then self:breakLightningSpeed() end return true end @@ -1346,6 +1347,13 @@ function _M:breakStealth() end end +--- Breaks lightning speed if active +function _M:breakLightningSpeed() + if self:hasEffect(self.EFF_LIGHTNING_SPEED) then + self:removeEffect(self.EFF_LIGHTNING_SPEED) + end +end + --- Break antimagic for a while after using spells & magic devices function _M:antimagicBackslash(turns) local done = false diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 3cc2a3113b900581eb7f1d9a24a09bca4a842c8c..dc94731d53c1a4dae373099d4efcec512d60d9f2 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -201,6 +201,7 @@ function _M:updateMainShader() if self:attr("stealth") then game.fbo_shader:setUniform("colorize", {0.7,0.7,0.7}) elseif self:attr("invisible") then game.fbo_shader:setUniform("colorize", {0.4,0.5,0.7}) elseif self:attr("unstoppable") then game.fbo_shader:setUniform("colorize", {1,0.2,0}) + elseif self:attr("lightning_speed") then game.fbo_shader:setUniform("colorize", {0.2,0.3,1}) else game.fbo_shader:setUniform("colorize", {0,0,0}) -- Disable end @@ -211,6 +212,7 @@ function _M:updateMainShader() -- Moving Blur shader if self:attr("invisible") then game.fbo_shader:setUniform("motionblur", 3) + elseif self:attr("lightning_speed") then game.fbo_shader:setUniform("motionblur", 2) else game.fbo_shader:setUniform("motionblur", 0) -- Disable end end @@ -631,6 +633,7 @@ function _M:playerUseItem(object, item, inven) end self:breakStealth() + self:breakLightningSpeed() self.changed = true end) local ok, ret = coroutine.resume(co) diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 7bab7527ff607cb699de023becd55c5531d3d675..11e0d22053124e6f719a34b0361845c723cc4c14 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -161,6 +161,7 @@ function _M:attackTarget(target, damtype, mult, noenergy) -- Cancel stealth! if break_stealth then self:breakStealth() end + self:breakLightningSpeed() return hit end diff --git a/game/modules/tome/data/birth/classes/wilder.lua b/game/modules/tome/data/birth/classes/wilder.lua index 63860f10919c3499393b1d21798c0990b4b23cd8..3f4901926cc32614479874248de65b4769dbd00f 100644 --- a/game/modules/tome/data/birth/classes/wilder.lua +++ b/game/modules/tome/data/birth/classes/wilder.lua @@ -93,6 +93,7 @@ newBirthDescriptor{ ["wild-gift/sand-drake"]={true, 0.3}, ["wild-gift/fire-drake"]={true, 0.3}, ["wild-gift/cold-drake"]={true, 0.3}, + ["wild-gift/storm-drake"]={true, 0.3}, ["cunning/survival"]={false, 0}, ["technique/shield-offense"]={false, -0.1}, ["technique/2hweapon-offense"]={true, -0.1}, diff --git a/game/modules/tome/data/general/npcs/all.lua b/game/modules/tome/data/general/npcs/all.lua index f3732358a125588f666287d6c33d546b21deadf1..62641e58272f611629def18663ce02f6d0d6872d 100644 --- a/game/modules/tome/data/general/npcs/all.lua +++ b/game/modules/tome/data/general/npcs/all.lua @@ -57,6 +57,7 @@ loadIfNot("/data/general/npcs/skeleton.lua") loadIfNot("/data/general/npcs/snake.lua") loadIfNot("/data/general/npcs/snow-giant.lua") loadIfNot("/data/general/npcs/spider.lua") +loadIfNot("/data/general/npcs/storm-drake.lua") --loadIfNot("/data/general/npcs/sunwall-town.lua") loadIfNot("/data/general/npcs/swarm.lua") loadIfNot("/data/general/npcs/thieve.lua") diff --git a/game/modules/tome/data/general/npcs/storm-drake.lua b/game/modules/tome/data/general/npcs/storm-drake.lua new file mode 100644 index 0000000000000000000000000000000000000000..c6646daceed735b0ee1463ef4c8bc97b3170b399 --- /dev/null +++ b/game/modules/tome/data/general/npcs/storm-drake.lua @@ -0,0 +1,108 @@ +-- 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 Talents = require("engine.interface.ActorTalents") + +newEntity{ + define_as = "BASE_NPC_STORM_DRAKE", + type = "dragon", subtype = "storm", + display = "D", color=colors.WHITE, + + body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, + resolvers.drops{chance=100, nb=1, {type="money"} }, + + infravision = 20, + life_rating = 15, + rank = 2, + size_category = 5, + + autolevel = "warrior", + ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=2, }, + energy = { mod=1 }, + stats = { str=20, dex=20, mag=30, con=16 }, + + resists = { [DamageType.LIGHTNING] = 100, }, + + knockback_immune = 1, + stun_immune = 1, +} + +newEntity{ base = "BASE_NPC_STORM_DRAKE", + name = "storm drake hatchling", color=colors.BLUE, display="d", + desc = [[A drake hatchling, not too powerful in itself, but it usually comes with its brothers and sisters.]], + level_range = {8, nil}, exp_worth = 1, + rarity = 1, + rank = 1, size_category = 2, + max_life = resolvers.rngavg(40,60), + combat_armor = 5, combat_def = 0, + combat = { dam=resolvers.rngavg(25,40), atk=resolvers.rngavg(25,60), apr=25, dammod={str=1.1} }, + on_melee_hit = {[DamageType.LIGHTNING]=resolvers.mbonus(7, 2)}, + combat = { dam=resolvers.rngavg(10,15), atk=15, apr=5, dammod={str=0.6} }, + + make_escort = { + {type="dragon", subtype="storm", name="storm drake hatchling", number=3, no_subescort=true}, + }, +} + +newEntity{ base = "BASE_NPC_STORM_DRAKE", + name = "storm drake", color=colors.BLUE, display="D", + desc = [[A mature storm drake, armed with a deadly breath weapon and nasty claws.]], + level_range = {14, nil}, exp_worth = 1, + rarity = 3, + max_life = resolvers.rngavg(100,110), + combat_armor = 12, combat_def = 0, + combat = { dam=resolvers.rngavg(25,70), atk=resolvers.rngavg(25,70), apr=25, dammod={str=1.1} }, + on_melee_hit = {[DamageType.LIGHTNING]=resolvers.mbonus(15, 10)}, + + summon = { + {type="dragon", name="storm drake hatchling", number=1, hasxp=false}, +-- {type="dragon", name="storm drake", number=1, hasxp=false}, + }, + + resolvers.talents{ + [Talents.T_SUMMON]=1, + [Talents.T_TORNADO]=2, + [Talents.T_LIGHTNING_BREATH]=3, + }, +} + +newEntity{ base = "BASE_NPC_STORM_DRAKE", + name = "storm wyrm", color=colors.LIGHT_BLUE, display="D", + desc = [[An old and powerful storm drake, armed with a deadly breath weapon and nasty claws.]], + level_range = {25, nil}, exp_worth = 1, + rarity = 5, + rank = 3, + max_life = resolvers.rngavg(170,190), + combat_armor = 30, combat_def = 0, + on_melee_hit = {[DamageType.LIGHTNING]=resolvers.mbonus(25, 10)}, + combat = { dam=resolvers.rngavg(25,110), atk=resolvers.rngavg(25,70), apr=25, dammod={str=1.1} }, + + summon = { + {type="dragon", name="storm drake", number=3, hasxp=false}, +-- {type="dragon", name="storm wyrm", number=1, hasxp=false}, + }, + + resolvers.talents{ + [Talents.T_SUMMON]=1, + [Talents.T_LIGHTNING_SPEED]=5, + [Talents.T_LIGHTNING]=5, + [Talents.T_LIGHTNING_BREATH]=5, + [Talents.T_TORNADO]=5, + }, +} diff --git a/game/modules/tome/data/talents/gifts/gifts.lua b/game/modules/tome/data/talents/gifts/gifts.lua index da2741de3f39ee8d414081f809ee082d08fe7675..2aac58b102bca3ba2ce991440a3bd4efc0077125 100644 --- a/game/modules/tome/data/talents/gifts/gifts.lua +++ b/game/modules/tome/data/talents/gifts/gifts.lua @@ -28,6 +28,7 @@ newTalentType{ type="wild-gift/slime", name = "slime aspect", generic = true, de newTalentType{ type="wild-gift/sand-drake", name = "sand drake aspect", description = "Take on the defining aspects of a Sand Drake." } newTalentType{ type="wild-gift/fire-drake", name = "fire drake aspect", description = "Take on the defining aspects of a Fire Drake." } newTalentType{ type="wild-gift/cold-drake", name = "cold drake aspect", description = "Take on the defining aspects of a Cold Drake." } +newTalentType{ type="wild-gift/storm-drake", name = "storm drake aspect", description = "Take on the defining aspects of a Storm Drake." } -- Generic requires for gifts based on talent level gifts_req1 = { @@ -60,6 +61,7 @@ load("/data/talents/gifts/slime.lua") load("/data/talents/gifts/sand-drake.lua") load("/data/talents/gifts/fire-drake.lua") load("/data/talents/gifts/cold-drake.lua") +load("/data/talents/gifts/storm-drake.lua") function checkMaxSummon(self) local nb = 0 diff --git a/game/modules/tome/data/talents/gifts/storm-drake.lua b/game/modules/tome/data/talents/gifts/storm-drake.lua new file mode 100644 index 0000000000000000000000000000000000000000..5ab7abd1660c128a3545f72b7ce4d4d088abb537 --- /dev/null +++ b/game/modules/tome/data/talents/gifts/storm-drake.lua @@ -0,0 +1,175 @@ +-- 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 Object = require "engine.Object" + +newTalent{ + name = "Lightning Speed", + type = {"wild-gift/storm-drake", 1}, + require = gifts_req1, + points = 5, + equilibrium = 10, + cooldown = 26, + range = 20, + tactical = { + ATTACK = 10, + }, + requires_target = true, + action = function(self, t) + self:setEffect(self.EFF_LIGHTNING_SPEED, math.ceil(6 + self:getTalentLevel(t) * 1.2), {power=400 + self:getTalentLevel(t) * 70}) + return true + end, + info = function(self, t) + return ([[You transform into pure lightning, moving %d%% faster for %d turns. + Any actions other than moving will stop this effect.]]):format(400 + self:getTalentLevel(t) * 70, math.ceil(6 + self:getTalentLevel(t) * 1.2)) + end, +} + +newTalent{ + name = "???", + type = {"wild-gift/storm-drake", 2}, + require = gifts_req2, + mode = "sustained", + points = 5, + sustain_equilibrium = 30, + cooldown = 10, + range = 20, + tactical = { + DEFEND = 10, + }, + activate = function(self, t) + return { + onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.COLD]=5 * self:getTalentLevel(t)}), + armor = self:addTemporaryValue("combat_armor", 4 * self:getTalentLevel(t)), + } + end, + deactivate = function(self, t, p) + self:removeTemporaryValue("on_melee_hit", p.onhit) + self:removeTemporaryValue("combat_armor", p.armor) + return true + end, + info = function(self, t) + return ([[Your skin forms icy scales, damaging all that hit you for %d cold damage and increasing your armor by %d.]]):format(damDesc(self, DamageType.C, 5 * self:getTalentLevel(t)), 4 * self:getTalentLevel(t)) + end, +} + +newTalent{ + name = "Tornado", + type = {"wild-gift/storm-drake", 3}, + require = gifts_req3, + points = 5, + equilibrium = 14, + cooldown = 15, + proj_speed = 2, -- This is purely indicative + range = function(self, t) return 6 + math.ceil(self:getTalentLevel(t) * 2) end, + requires_target = true, + action = function(self, t) + local tg = {type="hit", range=self:getTalentRange(t), nolock=true, talent=t} + local x, y = self:getTarget(tg) + if not x or not y then return nil end + local _ _, x, y = self:canProject(tg, x, y) + local target = game.level.map(x, y, Map.ACTOR) + if not target then return nil end + + local movedam = self:combatTalentMindDamage(t, 10, 60) + local dam = self:combatTalentMindDamage(t, 15, 130) + + local proj = require("engine.Projectile"):makeHoming( + self, + {particle="bolt_lightning", trail="lightningtrail"}, + {speed=2, name="Tornado", dam=dam, movedam=movedam}, + target, + self:getTalentRange(t), + function(self, src) + local DT = require("engine.DamageType") + DT:get(DT.LIGHTNING).projector(src, self.x, self.y, DT.LIGHTNING, self.def.movedam) + end, + function(self, src, target) + local DT = require("engine.DamageType") + src:project({type="ball", radius=1}, self.x, self.y, DT.LIGHTNING, self.def.dam) + src:project({type="ball", radius=1}, self.x, self.y, DT.MINDKNOCKBACK, self.def.dam) + if target:checkHit(src:combatMindpower(), target:combatPhysicalResist(), 10) and target:canBe("stun") then + target:setEffect(target.EFF_STUNNED, 4, {}) + else + game.logSeen(target, "%s resists the tornado!", target.name:capitalize()) + end + + -- Lightning ball gets a special treatment to make it look neat + local sradius = (1 + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2 + local nb_forks = 16 + local angle_diff = 360 / nb_forks + for i = 0, nb_forks - 1 do + local a = math.rad(rng.range(0+i*angle_diff,angle_diff+i*angle_diff)) + local tx = self.x + math.floor(math.cos(a) * 1) + local ty = self.y + math.floor(math.sin(a) * 1) + game.level.map:particleEmitter(self.x, self.y, 1, "lightning", {radius=1, tx=tx-self.x, ty=ty-self.y, nb_particles=25, life=8}) + end + game:playSoundNear(self, "talents/lightning") + end + ) + game.zone:addEntity(game.level, proj, "projectile", self.x, self.y) + game:playSoundNear(self, "talents/lightning") + return true + end, + info = function(self, t) + return ([[Summons a tornado that moves slowly toward its target, following it if it changes position. + Any foe caught in its path take %0.2f lightning damage. + When it reaches its target it explodes in a radius of 1 for %0.2f lightning damage, %0.2f physical damage. All affected creatures will be knocked back and the targeted creature will be stunned for 4 turns. + The tornado will last for %d turns or until it reaches its target. + Damage will increase with your Willpower.]]):format( + damDesc(self, DamageType.LIGHTNING, self:combatTalentMindDamage(t, 10, 60)), + damDesc(self, DamageType.LIGHTNING, self:combatTalentMindDamage(t, 15, 130)), + damDesc(self, DamageType.PHYSICAL, self:combatTalentMindDamage(t, 15, 130)), + 6 + math.ceil(self:getTalentLevel(t) * 2) + ) + end, +} + +newTalent{ + name = "Lightning Breath", + type = {"wild-gift/storm-drake", 4}, + require = gifts_req4, + points = 5, + random_ego = "attack", + equilibrium = 12, + cooldown = 12, + message = "@Source@ breathes lightning!", + tactical = { + ATTACKAREA = 10, + }, + range = function(self, t) return 4 + self:getTalentLevelRaw(t) end, + direct_hit = true, + requires_target = true, + action = function(self, t) + local tg = {type="cone", range=0, radius=self:getTalentRange(t), friendlyfire=false, talent=t} + local x, y = self:getTarget(tg) + if not x or not y then return nil end + local dam = 40 + self:getStr(80) * self:getTalentLevel(t) + self:project(tg, x, y, DamageType.LIGHTNING_DAZE, rng.avg(dam / 3, dam, 3), {type="lightning_explosion"}) + game:playSoundNear(self, "talents/breath") + return true + end, + info = function(self, t) + return ([[You breathe lightning in a frontal cone. Any target caught in the area will take %0.2f to %0.2f lightning damage and can be dazed for a few turns. + The damage will increase with the Strength stat]]):format( + damDesc(self, DamageType.LIGHTNING, 40 + self:getStr(80) * self:getTalentLevel(t)), + damDesc(self, DamageType.LIGHTNING, 40 + self:getStr(80) * self:getTalentLevel(t)) + ) + end, +} diff --git a/game/modules/tome/data/talents/gifts/summon-distance.lua b/game/modules/tome/data/talents/gifts/summon-distance.lua index f9cef4b4f883366bb6eb1b748345a86e10f1006e..5631f57d814b85f983a14f99b6adab9bdc51b2d5 100644 --- a/game/modules/tome/data/talents/gifts/summon-distance.lua +++ b/game/modules/tome/data/talents/gifts/summon-distance.lua @@ -67,7 +67,7 @@ newTalent{ } newTalent{ - name = "Lightning Breath", + name = "Lightning Breath", short_name = "LIGHTNING_BREATH_HYDRA", type = {"wild-gift/other",1}, require = gifts_req1, points = 5, @@ -242,7 +242,7 @@ newTalent{ max_mana = 150, resolvers.talents{ - [self.T_LIGHTNING_BREATH]=self:getTalentLevelRaw(t), + [self.T_LIGHTNING_BREATH_HYDRA]=self:getTalentLevelRaw(t), [self.T_ACID_BREATH]=self:getTalentLevelRaw(t), [self.T_POISON_BREATH]=self:getTalentLevelRaw(t), }, diff --git a/game/modules/tome/data/talents/spells/storm.lua b/game/modules/tome/data/talents/spells/storm.lua index 416c3a7e6b1a6f01e764a0dff0303e52b4d3b146..885ee1e1734835b9f7098cbc5a9398d560adb298 100644 --- a/game/modules/tome/data/talents/spells/storm.lua +++ b/game/modules/tome/data/talents/spells/storm.lua @@ -74,7 +74,7 @@ newTalent{ if not x or not y then return nil end local dam = self:combatTalentSpellDamage(t, 25, 200) self:projectile(tg, x, y, DamageType.LIGHTNING_DAZE, {daze=100, dam=self:spellCrit(rng.avg(dam / 3, dam, 3))}, {type="lightning_explosion"}) - game:playSoundNear(self, "talents/fire") + game:playSoundNear(self, "talents/lightning") return true end, info = function(self, t) diff --git a/game/modules/tome/data/timed_effects.lua b/game/modules/tome/data/timed_effects.lua index fc9bcd7d6e9ce556b3dc3f9276b07478ebb799cb..c46f4dbd46b11b6f27c9a7044e8e888fcfc0f321 100644 --- a/game/modules/tome/data/timed_effects.lua +++ b/game/modules/tome/data/timed_effects.lua @@ -1780,3 +1780,24 @@ newEffect{ self:removeTemporaryValue("resists", eff.tmpid) end, } + +newEffect{ + name = "LIGHTNING_SPEED", + desc = "Lightning Speed", + long_desc = function(self, eff) return ("Turn into pure lightning, moving %d%% faster."):format(eff.power) end, + type = "magical", + status = "beneficial", + parameters = {}, + on_gain = function(self, err) return "#Target# turn into pure lightning!.", "+Lightning Speed" end, + on_lose = function(self, err) return "#Target# is back to normal.", "-Lightning Speed" end, + activate = function(self, eff) + eff.tmpid = self:addTemporaryValue("lightning_speed", 1) + eff.moveid = self:addTemporaryValue("energy", {mod=self.energy.mod*eff.power/100}) + eff.particle = self:addParticles(Particles.new("bolt_lightning", 1)) + end, + deactivate = function(self, eff) + self:removeParticles(eff.particle) + self:removeTemporaryValue("lightning_speed", eff.tmpid) + self:removeTemporaryValue("energy", eff.moveid) + end, +} diff --git a/game/modules/tome/data/zones/gorbat-pride/npcs.lua b/game/modules/tome/data/zones/gorbat-pride/npcs.lua index 65b625e345e7968ca716e5a9a2e12da49fa03f08..67cfe3d3de27b3f58d532d7b1cc82036c3573626 100644 --- a/game/modules/tome/data/zones/gorbat-pride/npcs.lua +++ b/game/modules/tome/data/zones/gorbat-pride/npcs.lua @@ -20,6 +20,7 @@ load("/data/general/npcs/orc.lua", rarity(3)) load("/data/general/npcs/orc-gorbat.lua", rarity(0)) load("/data/general/npcs/cold-drake.lua", rarity(0)) +load("/data/general/npcs/storm-drake.lua", rarity(0)) load("/data/general/npcs/fire-drake.lua", rarity(0)) load("/data/general/npcs/multihued-drake.lua", rarity(3)) diff --git a/ideas/gifts.ods b/ideas/gifts.ods index 9ba6c11e2071c47b189273c78bdfab04a4e3aa6f..5c8416e3f982b108d0aeff50b87cf8e896658c56 100644 Binary files a/ideas/gifts.ods and b/ideas/gifts.ods differ