DenyTunnel

Deny enemy use of tunnel

Usage: Used in 8 task(s)

Lua Implementation

-- Deny Tunnel
function execute(params)
    local tunnelLoc = params.tunnel_location
    local method = params.denial_method or "demolition"

    if method == "demolition" then
        this:addTask("DtDemolish", {location = tunnelLoc})
    elseif method == "flooding" then
        -- Simulate flooding
        this:setStateProperty("TunnelFlooded", true)
    end

    return true
end