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