Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isEmpty function to Module:Opponent #3258

Merged
merged 14 commits into from
Sep 14, 2023
3 changes: 2 additions & 1 deletion components/opponent/commons/opponent.lua
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ end
---@param opponent standardOpponent?
---@return boolean
function Opponent.isEmpty(opponent)
if not opponent or not opponent.type or Table.deepEquals(opponent, Opponent.blank(opponent.type)) then
if not opponent or not opponent.type or
(Table.deepEquals(opponent, Opponent.blank(opponent.type)) and not Opponent.isTbd(opponent)) then
Rathoz marked this conversation as resolved.
Show resolved Hide resolved
return true
end

Expand Down