Commit ce6dab4d authored by nekrozar's avatar nekrozar

fix Judgment of the Desert

parent d203ce48
...@@ -19,18 +19,31 @@ function c4869446.initial_effect(c) ...@@ -19,18 +19,31 @@ function c4869446.initial_effect(c)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c4869446.postg) e3:SetTarget(c4869446.postg)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local ng=Group.CreateGroup()
ng:KeepAlive()
e2:SetLabelObject(ng)
e3:SetLabelObject(ng)
end end
function c4869446.cfilter(c) function c4869446.cfilter(c)
return c:IsFaceup() and c:IsPreviousPosition(POS_FACEDOWN) return c:IsFaceup() and c:IsPreviousPosition(POS_FACEDOWN)
end end
function c4869446.posop(e,tp,eg,ep,ev,re,r,rp) function c4869446.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=e:GetLabelObject()
if c:GetFlagEffect(4869446)==0 then
sg:Clear()
c:RegisterFlagEffect(4869446,RESET_EVENT+RESETS_STANDARD,0,1)
end
local g=eg:Filter(c4869446.cfilter,nil) local g=eg:Filter(c4869446.cfilter,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
e:GetHandler():SetCardTarget(tc) sg:AddCard(tc)
tc:CreateRelation(c,RESET_EVENT+RESETS_STANDARD)
tc=g:GetNext() tc=g:GetNext()
end end
end end
function c4869446.postg(e,c) function c4869446.postg(e,c)
return e:GetHandler():IsHasCardTarget(c) local g=e:GetLabelObject()
if e:GetHandler():GetFlagEffect(4869446)==0 or g:GetCount()==0 then return false end
return g:IsContains(c) and c:IsRelateToCard(e:GetHandler())
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment