diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 2ceada7ace47d442f94f45bdf60c7811e6fb3ca9..e05c241175ef50a84f9ae0a174893b7e20d52483 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -568,9 +568,11 @@ function _M:chronoClone(name) end --- Restores a chronomancy clone -function _M:chronoRestore(name) +function _M:chronoRestore(name, remove) local ngame - if type(name) == "string" then ngame = self._chronoworlds[name] + if type(name) == "string" then + ngame = self._chronoworlds[name] + if remove then self._chronoworlds[name] = nil end else ngame = name end if not ngame then return false end diff --git a/game/modules/tome/data/gfx/shockbolt/object/temporal_instability.png b/game/modules/tome/data/gfx/shockbolt/object/temporal_instability.png new file mode 100644 index 0000000000000000000000000000000000000000..7c0d48d554931f105d9aa93fed62654fcc0c8554 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/object/temporal_instability.png differ diff --git a/game/modules/tome/data/talents/chronomancy/chronomancy.lua b/game/modules/tome/data/talents/chronomancy/chronomancy.lua index 493892a419ecb28ba3182b6c999a8e17f39fc214..b9370258becf24c44ca1c20cbe79cb641dbcd41f 100644 --- a/game/modules/tome/data/talents/chronomancy/chronomancy.lua +++ b/game/modules/tome/data/talents/chronomancy/chronomancy.lua @@ -23,7 +23,7 @@ newTalent{ require = chrono_req1, points = 5, paradox = 3, - cooldown = 20, + cooldown = 20, tactical = { BUFF = 10, }, @@ -75,7 +75,7 @@ newTalent{ require = chrono_req3, points = 5, paradox = 5, - cooldown = 20, + cooldown = 20, tactical = { DEFEND = 10, }, @@ -94,23 +94,22 @@ newTalent{ end, } - newTalent{ name = "Precognition", type = {"chronomancy/chronomancy",4}, require = chrono_req4, - points = 5, + points = 5, paradox = 50, cooldown = 100, no_npc_use = true, getDuration = function(self, t) return 4 + math.floor(self:getTalentLevel(t) * getParadoxModifier(self, pm)) end, action = function(self, t) game:playSoundNear(self, "talents/spell_generic") + self:setEffect(self.EFF_PRECOGNITION, t.getDuration(self, t), {}) return true end, info = function(self, t) local duration = t.getDuration(self, t) - return ([[You peer %d turns into the future. Note that visions of your own death can still be fatal. - Not Finished!!]]):format(duration) + return ([[You peer %d turns into the future. Note that visions of your own death can still be fatal.]]):format(duration) end, -} \ No newline at end of file +} diff --git a/game/modules/tome/data/talents/chronomancy/spacetime-weaving.lua b/game/modules/tome/data/talents/chronomancy/spacetime-weaving.lua index 8d29ef8df8b9ec0b08b26dbd7e94f726e4e77819..ad3613974d1a94c8acb9a0f37f1b44d2415fe5c0 100644 --- a/game/modules/tome/data/talents/chronomancy/spacetime-weaving.lua +++ b/game/modules/tome/data/talents/chronomancy/spacetime-weaving.lua @@ -80,7 +80,7 @@ newTalent{ ]]):format(range) end, } - + newTalent{ name = "Temporal Reprieve", type = {"chronomancy/spacetime-weaving", 3}, @@ -105,7 +105,7 @@ newTalent{ format(reduction) end, } - + newTalent{ name = "Wormhole", type = {"chronomancy/spacetime-weaving", 4}, @@ -214,9 +214,9 @@ newTalent{ exit.x = exit_x exit.y = exit_y game.level:addEntity(exit) - exit:identify(true) - exit:setKnown(self, true) - game.zone:addEntity(game.level, exit, "trap", exit_x, exit_y) + exit:identify(true) + exit:setKnown(self, true) + game.zone:addEntity(game.level, exit, "trap", exit_x, exit_y) game.level.map:particleEmitter(exit_x, exit_y, 1, "teleport") -- Linking the wormholes entrance.dest = exit diff --git a/game/modules/tome/data/talents/chronomancy/timetravel.lua b/game/modules/tome/data/talents/chronomancy/timetravel.lua index 9e7a0b212c1f6a088bd630ae5f04b956f7f4dd6f..0d12f159a0df7b1fbdacfcc3a2e977311f5a2fcc 100644 --- a/game/modules/tome/data/talents/chronomancy/timetravel.lua +++ b/game/modules/tome/data/talents/chronomancy/timetravel.lua @@ -190,7 +190,7 @@ newTalent{ end, action = function(self, t) game:onTickEnd(function() - if not game:chronoRestore("on_level") then + if not game:chronoRestore("on_level", true) then game.logSeen(self, "#LIGHT_RED#The spell fizzles.") return end diff --git a/game/modules/tome/data/timed_effects.lua b/game/modules/tome/data/timed_effects.lua index 1be26e80e22d503b3934aafc5e531f157f251268..96a6f88dd7cb96b27458ca859d4d936b3ce2a560 100644 --- a/game/modules/tome/data/timed_effects.lua +++ b/game/modules/tome/data/timed_effects.lua @@ -3058,3 +3058,26 @@ newEffect{ self:removeTemporaryValue("threading", eff.tmpid) end, } + +newEffect{ + name = "PRECOGNITION", + desc = "Precognition", + long_desc = function(self, eff) return "You walk into the future, when the effects end, if you are not dead, you are brought back to the past." end, + type = "magical", + status = "beneficial", + parameters = { power=10 }, + activate = function(self, eff) + game:onTickEnd(function() + game:chronoClone("precognition") + end) + end, + deactivate = function(self, eff) + game:onTickEnd(function() + if not game:chronoRestore("precognition") then + game.logSeen(self, "#LIGHT_RED#The recognition spell fizzles and cancels.") + return + end + game.logPlayer(game.player, "#LIGHT_BLUE#You unfold the space time continuum to a previous state!") + end) + end, +}