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

Can not try to use an orb a second time on a portal in the endgame

git-svn-id: http://svn.net-core.org/repos/t-engine4@3312 51575b47-30f0-44d4-a5cc-537603b46e54
parent c44e66f4
No related branches found
No related tags found
No related merge requests found
......@@ -109,9 +109,10 @@ newEntity{ base = "VOID_PORTAL", define_as = "CVOID_PORTAL",
local invocation_close = function(self, who)
if not who:hasQuest("high-peak") or who:hasQuest("high-peak"):isEnded() then return end
game.logPlayer(who, "#LIGHT_BLUE#You use the orb on the portal, shutting it down easily.")
-- Remove the level spot
local spot = game.level:pickSpot{type="portal", subtype=self.summon}
if not spot then return end
game.logPlayer(who, "#LIGHT_BLUE#You use the orb on the portal, shutting it down easily.")
for i = 1, #game.level.spots do if game.level.spots[i] == spot then table.remove(game.level.spots, i) break end end
local g = game.level.map(spot.x, spot.y, engine.Map.TERRAIN)
g.name = g.name .. " (disabled)"
......
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