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

fiix

git-svn-id: http://svn.net-core.org/repos/t-engine4@3354 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2551d437
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ function _M:checkFilter(e, filter, type)
if not filter then return true end
if filter.ignore and self:checkFilter(e, filter.ignore, type) then return false end
forceprint("Checking filter", filter.type, filter.subtype, "::", e.type,e.subtype,e.name)
print("Checking filter", filter.type, filter.subtype, "::", e.type,e.subtype,e.name)
if filter.type and filter.type ~= e.type then return false end
if filter.subtype and filter.subtype ~= e.subtype then return false end
if filter.name and filter.name ~= e.name then return false end
......
......@@ -187,7 +187,7 @@ function _M:generateList()
local list = self.inven_list
local chars = {}
local i = 1
for item, o in ipairs(self.actor:getInven("INVEN")) do
for item, o in ipairs(self.actor:getInven("INVEN") or {}) do
if not self.filter or self.filter(o) then
local char = self:makeKeyChar(i)
......
......@@ -83,7 +83,7 @@ function _M:generateList()
local list = {}
list.chars = {}
local i = 1
for item, o in ipairs(self.inven) do
for item, o in ipairs(self.inven or {}) do
if not self.filter or self.filter(o) then
local char = self:makeKeyChar(i)
......
......@@ -1050,7 +1050,7 @@ local random_zone_layouts = {
["'"] = data:getDoor(),
} end },
-- Building
{ name="building", rarity=4, gen=function(data)
--[[ not yet { name="building", rarity=4, gen=function(data)
return {
class = "engine.generator.map.Building",
lite_room_chance = rng.range(0, 100),
......@@ -1062,6 +1062,7 @@ local random_zone_layouts = {
down = data:getDown(),
door = data:getDoor(),
} end },
]]
-- "Octopus"
{ name="octopus", rarity=6, gen=function(data)
return {
......
......@@ -77,8 +77,10 @@ start_ambush = function(self, who)
self:setEffect(self.EFF_DAMAGE_SHIELD, 3, {power=1000000})
local o, item, inven_id = self:findInAllInventories("Staff of Absorption")
self:removeObject(inven_id, item, true)
o:removed()
if o then
self:removeObject(inven_id, item, true)
o:removed()
end
game.logPlayer(self, "#VIOLET#You wake up after a few hours, surprised to be alive, but the staff is gone!")
game.logPlayer(self, "#VIOLET#Go at once to Last Hope to report those events!")
......
......@@ -145,6 +145,7 @@ newTalent{
a.faction = self.faction
a.max_life = a.max_life
a.life = a.max_life
a.die = nil
a.summoner = self
a.summoner_gain_exp=true
a.summon_time = t.getDuration(self, t)
......
......@@ -89,6 +89,7 @@ function setupSummon(self, m, x, y, no_control)
m.unused_talents = 0
m.unused_generics = 0
m.unused_talents_types = 0
m.no_points_on_levelup = true
m.ai_state = m.ai_state or {}
m.ai_state.tactic_leash = 100
-- Try to use stored AI talents to preserve tweaking over multiple summons
......
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