local actor function ulost_cbk(u, p, r) if r == "bribed" or r=="captured" then local p2 -- Kill the gains for u2 in u.tile:units_iterate() do if u2.owner ~= u.owner and u2 ~= actor then p2=u2.owner actor = u2 -- Currently, recursive deletions are not supported u2:kill("editor") end end -- Kill the capturer/briber if p2 then for t in u.tile:square_iterate(1) do for u3 in t:units_iterate() do if u3.owner==p2 then u3:kill("editor") end end end -- Deprive the briber of any gold if r == "bribed" then p2:change_gold(-p2:gold()) end end end end signal.connect("unit_lost", "ulost_cbk")