Commit 21800773 authored by Huangnan's avatar Huangnan

fix

parent 76f7497e
Pipeline #39529 failed with stages
in 12 minutes and 28 seconds
...@@ -26,26 +26,26 @@ function s.initial_effect(c) ...@@ -26,26 +26,26 @@ function s.initial_effect(c)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.filter1(c,e,tp) function s.cfilter(c)
return c.MoJin and c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c)>0 and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,5,c) and c:IsFaceup() return c.MoJin==true and c:IsAbleToRemoveAsCost()
end end
function s.filter2(c) function s.fselect(g,e,tp)
return c.MoJin and c:IsAbleToRemoveAsCost() and c:IsFaceup() return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end
function s.sfilter(c,e,tp,g)
return c:IsFacedown() and c.MoJin==true
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil,e,tp) end local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) if chk==0 then return g:CheckSubGroup(s.fselect,5,5,e,tp) end
local g1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,c,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g1:Clone() local sg=g:SelectSubGroup(tp,s.fselect,false,5,5,e,tp)
sg:AddCard(c) Duel.Remove(sg,POS_FACEUP,REASON_COST)
local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,4,4,sg,e,tp)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsFacedown() and c.MoJin return c:IsFacedown() and c.MoJin==true
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -82,10 +82,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,10 +82,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.tdfilter(c) function s.tdfilter(c)
return c:IsAbleToDeck() and c.MoJin return c:IsAbleToDeck() and c.MoJin==true
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup() and c.MoJin return c:IsAbleToHand() and c:IsFaceup() and c.MoJin==true
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) 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