Commit 67772b71 authored by 想象力很好的毛虫's avatar 想象力很好的毛虫 Committed by GitHub

Fix 超電導波サンダーフォース (#2512)

parent 86855072
...@@ -20,12 +20,9 @@ end ...@@ -20,12 +20,9 @@ end
function c42469671.descon(e,tp,eg,ep,ev,re,r,rp) function c42469671.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c42469671.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c42469671.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c42469671.desfilter(c)
return c:IsFaceup()
end
function c42469671.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c42469671.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c42469671.desfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
if g:GetCount()~=0 then if g:GetCount()~=0 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g:GetCount()) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g:GetCount())
...@@ -35,11 +32,10 @@ function c42469671.sgfilter(c,p) ...@@ -35,11 +32,10 @@ function c42469671.sgfilter(c,p)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(p) return c:IsLocation(LOCATION_GRAVE) and c:IsControler(p)
end end
function c42469671.desop(e,tp,eg,ep,ev,re,r,rp) function c42469671.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c42469671.desfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if Duel.Destroy(g,REASON_EFFECT)~=0 then Duel.Destroy(g,REASON_EFFECT)
local dc=Duel.GetOperatedGroup():FilterCount(c42469671.sgfilter,nil,1-tp) local dc=Duel.GetOperatedGroup():FilterCount(c42469671.sgfilter,nil,1-tp)
if dc~=0 and Duel.GetTurnPlayer()==tp if dc~=0 and Duel.IsTurnPlayer(tp) and Duel.IsMainPhase() and Duel.IsPlayerCanDraw(tp,dc)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and Duel.SelectYesNo(tp,aux.Stringid(42469671,0)) then and Duel.SelectYesNo(tp,aux.Stringid(42469671,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,dc,REASON_EFFECT) Duel.Draw(tp,dc,REASON_EFFECT)
...@@ -63,7 +59,6 @@ function c42469671.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +59,6 @@ function c42469671.desop(e,tp,eg,ep,ev,re,r,rp)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end
end end
function c42469671.checkop(e,tp,eg,ep,ev,re,r,rp) function c42469671.checkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,42469671)~=0 then return end if Duel.GetFlagEffect(tp,42469671)~=0 then return 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