Commit 8a462b9f218d8cafa09cabb1144ab9f0f83345d5

Authored by dg
1 parent 2551d437

fiix


git-svn-id: http://svn.net-core.org/repos/t-engine4@3354 51575b47-30f0-44d4-a5cc-537603b46e54
... ... @@ -167,7 +167,7 @@ function _M:checkFilter(e, filter, type)
167 167 if not filter then return true end
168 168 if filter.ignore and self:checkFilter(e, filter.ignore, type) then return false end
169 169
170   - forceprint("Checking filter", filter.type, filter.subtype, "::", e.type,e.subtype,e.name)
  170 + print("Checking filter", filter.type, filter.subtype, "::", e.type,e.subtype,e.name)
171 171 if filter.type and filter.type ~= e.type then return false end
172 172 if filter.subtype and filter.subtype ~= e.subtype then return false end
173 173 if filter.name and filter.name ~= e.name then return false end
... ...
... ... @@ -187,7 +187,7 @@ function _M:generateList()
187 187 local list = self.inven_list
188 188 local chars = {}
189 189 local i = 1
190   - for item, o in ipairs(self.actor:getInven("INVEN")) do
  190 + for item, o in ipairs(self.actor:getInven("INVEN") or {}) do
191 191 if not self.filter or self.filter(o) then
192 192 local char = self:makeKeyChar(i)
193 193
... ...
... ... @@ -83,7 +83,7 @@ function _M:generateList()
83 83 local list = {}
84 84 list.chars = {}
85 85 local i = 1
86   - for item, o in ipairs(self.inven) do
  86 + for item, o in ipairs(self.inven or {}) do
87 87 if not self.filter or self.filter(o) then
88 88 local char = self:makeKeyChar(i)
89 89
... ...
... ... @@ -1050,7 +1050,7 @@ local random_zone_layouts = {
1050 1050 ["'"] = data:getDoor(),
1051 1051 } end },
1052 1052 -- Building
1053   - { name="building", rarity=4, gen=function(data)
  1053 +--[[ not yet { name="building", rarity=4, gen=function(data)
1054 1054 return {
1055 1055 class = "engine.generator.map.Building",
1056 1056 lite_room_chance = rng.range(0, 100),
... ... @@ -1062,6 +1062,7 @@ local random_zone_layouts = {
1062 1062 down = data:getDown(),
1063 1063 door = data:getDoor(),
1064 1064 } end },
  1065 +]]
1065 1066 -- "Octopus"
1066 1067 { name="octopus", rarity=6, gen=function(data)
1067 1068 return {
... ...
... ... @@ -77,8 +77,10 @@ start_ambush = function(self, who)
77 77 self:setEffect(self.EFF_DAMAGE_SHIELD, 3, {power=1000000})
78 78
79 79 local o, item, inven_id = self:findInAllInventories("Staff of Absorption")
80   - self:removeObject(inven_id, item, true)
81   - o:removed()
  80 + if o then
  81 + self:removeObject(inven_id, item, true)
  82 + o:removed()
  83 + end
82 84
83 85 game.logPlayer(self, "#VIOLET#You wake up after a few hours, surprised to be alive, but the staff is gone!")
84 86 game.logPlayer(self, "#VIOLET#Go at once to Last Hope to report those events!")
... ...
... ... @@ -145,6 +145,7 @@ newTalent{
145 145 a.faction = self.faction
146 146 a.max_life = a.max_life
147 147 a.life = a.max_life
  148 + a.die = nil
148 149 a.summoner = self
149 150 a.summoner_gain_exp=true
150 151 a.summon_time = t.getDuration(self, t)
... ...
... ... @@ -89,6 +89,7 @@ function setupSummon(self, m, x, y, no_control)
89 89 m.unused_talents = 0
90 90 m.unused_generics = 0
91 91 m.unused_talents_types = 0
  92 + m.no_points_on_levelup = true
92 93 m.ai_state = m.ai_state or {}
93 94 m.ai_state.tactic_leash = 100
94 95 -- Try to use stored AI talents to preserve tweaking over multiple summons
... ...