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

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@1874 51575b47-30f0-44d4-a5cc-537603b46e54
parent e7b16b90
No related branches found
No related tags found
No related merge requests found
......@@ -54,8 +54,8 @@ function _M:addEntity(e, after)
end
--- Removes an entity from the level
function _M:removeEntity(e)
if not self.entities[e.uid] then error("Entity "..e.uid.."("..e.name..") not present on the level") end
function _M:removeEntity(e, no_warning)
if not no_warning and not self.entities[e.uid] then error("Entity "..e.uid.."("..e.name..") not present on the level") end
self.entities[e.uid] = nil
for i = 1, #self.e_array do
if self.e_array[i] == e then
......
......@@ -202,7 +202,7 @@ function _M:act()
radius_x, radius_y = self.old_x, self.old_y
end
self.src:projectDoStop(self.project.def.typ, self.project.def.tg, self.project.def.damtype, self.project.def.dam, self.project.def.particles, radius_x, radius_y, self.tmp_proj)
game.level:removeEntity(self)
game.level:removeEntity(self, true)
self.dead = true
end
elseif self.homing then
......@@ -210,7 +210,7 @@ function _M:act()
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)
game.level:removeEntity(self, true)
self.dead = true
else
self.homing.on_move(self, self.src)
......@@ -225,7 +225,7 @@ end
function _M:on_move(x, y, target)
if self.project and self.project.def.typ.stop_block then
self.src:projectDoStop(self.project.def.typ, self.project.def.tg, self.project.def.damtype, self.project.def.dam, self.project.def.particles, self.x, self.y, self.tmp_proj)
game.level:removeEntity(self)
game.level:removeEntity(self, true)
self.dead = true
end
end
......
......@@ -28,7 +28,7 @@ newEntity{
}
newEntity{ base = "BASE_LITE",
name = "brass lantern", color=colors.LIGHT_UMBER,
name = "brass lantern", color=colors.UMBER,
desc = [[A brass container with a wick emerging from it, protected from draughts by a sheet of greased paper. It can be carried by a handle.]],
level_range = {1, 20},
rarity = 7,
......@@ -42,13 +42,13 @@ newEntity{ base = "BASE_LITE",
}
newEntity{ base = "BASE_LITE",
name = "dwarven lantern", color=colors.LIGHT_UMBER,
desc = [[Made by the Dwarves, this lantern provides light in the darkest recesses of the earth.]],
name = "alchemist's lamp", color=colors.LIGHT_UMBER,
desc = [[A normal brass lantern, enhanced by alchemy to make it brighter.]],
level_range = {20, 35},
rarity = 10,
encumber = 1,
cost = 2,
material_level = 3,
cost = 3,
material_level = 5,
wielder = {
lite = 3,
......@@ -56,8 +56,8 @@ newEntity{ base = "BASE_LITE",
}
newEntity{ base = "BASE_LITE",
name = "fëanorian lamp", color=colors.GOLD,
desc = [[Made by the descendants of the Noldo craftsman, this lamp contains a part of the flame which burned inside Fëanor.]],
name = "dwarven lantern", color=colors.GOLD,
desc = [[Made by the Dwarves, this lantern provides light in the darkest recesses of the earth.]],
level_range = {35, 50},
rarity = 12,
encumber = 1,
......@@ -68,3 +68,4 @@ newEntity{ base = "BASE_LITE",
lite = 4,
},
}
......@@ -77,7 +77,6 @@ end
add_foe = function(self, next_wave, first, foe_idx)
local spot = game.level:pickSpot{type="portal", subtype="portal"}
while not spot do spot = game.level:pickSpot{type="portal", subtype="portal"} end
print("==================== spot", spot.x, spot.y)
local foes = {
[1] = {
......
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