Commit 7ee60dbf authored by DailyShana's avatar DailyShana

fix

parent 87469f41
...@@ -15,8 +15,9 @@ function c94212438.initial_effect(c) ...@@ -15,8 +15,9 @@ function c94212438.initial_effect(c)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetLabel(94212438) e2:SetLabel(94212438)
e2:SetCondition(c94212438.condition) e2:SetCondition(c94212438.plcon)
e2:SetOperation(c94212438.operation) e2:SetTarget(c94212438.pltg)
e2:SetOperation(c94212438.plop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tograve --tograve
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -42,17 +43,21 @@ function c94212438.initial_effect(c) ...@@ -42,17 +43,21 @@ function c94212438.initial_effect(c)
end end
function c94212438.target(e,tp,eg,ep,ev,re,r,rp,chk) function c94212438.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if c94212438.condition(e,tp,eg,ep,ev,re,r,rp) and Duel.SelectYesNo(tp,94) then if Duel.GetCurrentPhase()==PHASE_END and c94212438.plcon(e,tp,eg,ep,ev,re,r,rp) and Duel.SelectYesNo(tp,94) then
e:SetOperation(c94212438.operation) e:SetOperation(c94212438.plop)
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65) e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65)
e:GetHandler():RegisterFlagEffect(94212439,RESET_PHASE+PHASE_END,0,1)
else else
e:SetOperation(nil) e:SetOperation(nil)
end end
end end
function c94212438.condition(e,tp,eg,ep,ev,re,r,rp) function c94212438.plcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and e:GetHandler():GetFlagEffect(94212438)<4 return Duel.GetTurnPlayer()~=tp and e:GetHandler():GetFlagEffect(94212438)<4
end end
function c94212438.operation(e,tp,eg,ep,ev,re,r,rp) function c94212438.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(94212439)==0 end
end
function c94212438.plop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
...@@ -85,5 +90,5 @@ function c94212438.winop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,5 +90,5 @@ function c94212438.winop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c94212438.cfilter3,tp,LOCATION_ONFIELD,0,e:GetHandler()) local g=Duel.GetMatchingGroup(c94212438.cfilter3,tp,LOCATION_ONFIELD,0,e:GetHandler())
if g:GetClassCount(Card.GetCode)==4 then if g:GetClassCount(Card.GetCode)==4 then
Duel.Win(tp,WIN_REASON_DESTINY_BOARD) Duel.Win(tp,WIN_REASON_DESTINY_BOARD)
end end
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