MeleePlayerIsCrippled

Parameters
whichPlayer player
return type
boolean
Source code
function MeleePlayerIsCrippled takes player whichPlayer returns boolean
    local integer playerStructures  = GetPlayerStructureCount(whichPlayer, true)
    local integer playerKeyStructures = BlzGetPlayerTownHallCount(whichPlayer)

    // Dead players are not considered to be crippled.
    return (playerStructures > 0) and (playerKeyStructures <= 0)
endfunction
Source
Blizzard.j
wc3modding.com
MeleePlayerIsCrippled