Commit dc5d26d3da2a176040d63a74c635a31a0a4f233c

Authored by DarkGod
2 parents 7960654f b944de8d

Merge branch 'Misc1.7.1' into 'master'

Misc1.7.1

Restore nowarning targeting flag

Recall Minions will only put minions inside walls if they have pass_wall (Dreads)

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