Commit 09ea439d7d3eeb1dfe6516609666c79a5c48bbe1

Authored by DarkGod
2 parents 90241101 dc5d26d3

Merge branch 'master' of git.net-core.org:tome/t-engine4

... ... @@ -310,6 +310,7 @@ function _M:targetGetForPlayer(typ)
310 310 msg = typ.msg
311 311 end
312 312 self:targetMode("exclusive", msg, coroutine.running(), typ)
  313 + if typ.nowarning then self.target_warning = false end
313 314 if self.target.target.x and config.settings.auto_accept_target and not typ.immediate_keys and (not typ.nolock or typ.can_autoaccept) and (not typ.nowarning or typ.can_autoaccept) and (not typ.no_restrict or typ.can_autoaccept) then
314 315 self.target_co = nil
315 316 self:targetMode(false, false) self.tooltip_x, self.tooltip_y = nil, nil
... ...
... ... @@ -126,10 +126,12 @@ newTalent{
126 126 local stats = necroArmyStats(self)
127 127 if stats.nb == 0 then return end
128 128
129   - local spots, spots_hostile = {}, {}
  129 + local spots, spots_hostile, spots_wall = {}, {}, {}
130 130 self:projectApply({type="ball", radius=1}, self.x, self.y, Map.TERRAIN, function(_, x, y)
131 131 local target = game.level.map(x, y, Map.ACTOR)
  132 + local terrain = game.level.map(x, y, Map.TERRAIN)
132 133 if target and self:reactionToward(target) < 0 then spots_hostile[#spots_hostile+1] = {x=x, y=y, foe=target}
  134 + elseif not target and terrain and terrain.does_block_move then spots_wall[#spots_wall+1] = {x=x, y=y}
133 135 elseif not target then spots[#spots+1] = {x=x, y=y}
134 136 end
135 137 end)
... ... @@ -138,6 +140,7 @@ newTalent{
138 140 local m = rng.tableRemove(stats.list)
139 141 if not m then break end
140 142 local spot = rng.tableRemove(spots_hostile)
  143 + if not spot and m.can_pass and m.can_pass.pass_wall then spot = rng.tableRemove(spots_wall) end
141 144 if not spot then spot = rng.tableRemove(spots) end
142 145 if not spot then break end
143 146
... ...