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

dont allow jumpgate to work between levels

git-svn-id: http://svn.net-core.org/repos/t-engine4@869 51575b47-30f0-44d4-a5cc-537603b46e54
parent d64d5707
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,10 @@ newTalent{
game.logPlayer(self, "You must sustain the Jumpgate spell to be able to teleport.")
return
end
if eff.jumpgate_level ~= game.zone.short_name .. "-" .. game.level.level then
game.logPlayer(self, "The destination is too far away.")
return
end
game.level.map:particleEmitter(self.x, self.y, 1, "teleport")
self:teleportRandom(eff.jumpgate_x, eff.jumpgate_y, 1)
game.level.map:particleEmitter(eff.jumpgate_x, eff.jumpgate_y, 1, "teleport")
......@@ -96,6 +100,7 @@ newTalent{
local ret = {
jumpgate_x = game.player.x,
jumpgate_y = game.player.y,
jumpgate_level = game.zone.short_name .. "-" .. game.level.level,
particle = self:addParticles(Particles.new("time_shield", 1))
}
return ret
......
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