What do I need to do to script the following condition/effect:
If all card zones are disabled by "xxx" effect and your opponent has no cards in their Hand, Deck, Field, Graveyard and Banish Zone.
When this card is Special Summoned: This cards ATK and DEF are equal to the ATK and DEF of the Xyz Materials required to Special Summon this card.
this is the atk function
--atkset
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c60000308.op)
c:RegisterEffect(e1)
end
function c60000308.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(c:GetOverlayGroup():GetSum(Card.GetAttack))
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
the first i think is impossible to do as you wrote it, the only thing that can be done is check if the field is all unusable. But a question, how can you opponent have no cards everywhere?