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