Commit 0501c591 authored by wind2009's avatar wind2009

Fix 糾罪巧-裁誕

parent aee3cb63
Pipeline #40158 passed with stages
in 2 minutes and 9 seconds
No preview for this file type
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
100245023 100245023
100245024 100245024
100245025 100245025
100245026
100245031 100245031
100245032 100245032
100245033 100245033
......
--糾罪巧-裁 --糾罪巧-裁
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -22,7 +23,7 @@ function s.initial_effect(c) ...@@ -22,7 +23,7 @@ function s.initial_effect(c)
e2:SetCondition(s.spcon) e2:SetCondition(s.spcon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.fsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -42,10 +43,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,10 +43,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,s.tdfilter,p,LOCATION_HAND+LOCATION_ONFIELD,0,1,63,nil) local g=Duel.SelectMatchingCard(p,s.tdfilter,p,LOCATION_HAND+LOCATION_ONFIELD,0,1,63,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local fg=g:Filter(Card.IsLocation,nil,LOCATION_ONFIELD)
if #fg>0 then
Duel.HintSelection(fg)
end
local hg=g:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #hg>0 then
Duel.ConfirmCards(1-p,hg)
end
local ct=Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local ct=Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(p) Duel.ShuffleDeck(p)
Duel.BreakEffect() local rt=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
Duel.Draw(p,ct,REASON_EFFECT) if rt>0 then
Duel.BreakEffect()
Duel.Draw(p,ct,REASON_EFFECT)
end
end end
end end
function s.cfilter(c,sp) function s.cfilter(c,sp)
...@@ -87,6 +99,7 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,6 +99,7 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,g)
end end
end end
elseif e:GetLabel()==2 then elseif e:GetLabel()==2 then
...@@ -94,7 +107,8 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +107,8 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.HintSelection(g)
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end end
end end
end end
\ No newline at end of file
...@@ -54,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetOriginalType()&TYPE_TUNER==0 return c:GetOriginalType()&TYPE_TUNER==0
end end
\ No newline at end of file
...@@ -88,4 +88,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,4 +88,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetOriginalType()&TYPE_TUNER==0 return c:GetOriginalType()&TYPE_TUNER==0
end end
\ No newline at end of file
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