Skip to content
Snippets Groups Projects
Commit dc5d26d3 authored by DarkGod's avatar DarkGod
Browse files

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
parents 7960654f b944de8d
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -310,6 +310,7 @@ function _M:targetGetForPlayer(typ)
msg = typ.msg
end
self:targetMode("exclusive", msg, coroutine.running(), typ)
if typ.nowarning then self.target_warning = false end
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
self.target_co = nil
self:targetMode(false, false) self.tooltip_x, self.tooltip_y = nil, nil
......
......@@ -126,10 +126,12 @@ newTalent{
local stats = necroArmyStats(self)
if stats.nb == 0 then return end
local spots, spots_hostile = {}, {}
local spots, spots_hostile, spots_wall = {}, {}, {}
self:projectApply({type="ball", radius=1}, self.x, self.y, Map.TERRAIN, function(_, x, y)
local target = game.level.map(x, y, Map.ACTOR)
local terrain = game.level.map(x, y, Map.TERRAIN)
if target and self:reactionToward(target) < 0 then spots_hostile[#spots_hostile+1] = {x=x, y=y, foe=target}
elseif not target and terrain and terrain.does_block_move then spots_wall[#spots_wall+1] = {x=x, y=y}
elseif not target then spots[#spots+1] = {x=x, y=y}
end
end)
......@@ -138,6 +140,7 @@ newTalent{
local m = rng.tableRemove(stats.list)
if not m then break end
local spot = rng.tableRemove(spots_hostile)
if not spot and m.can_pass and m.can_pass.pass_wall then spot = rng.tableRemove(spots_wall) end
if not spot then spot = rng.tableRemove(spots) end
if not spot then break end
......
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