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)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.filter1(c,e,tp)
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()
function s.cfilter(c)
return c.MoJin==true and c:IsAbleToRemoveAsCost()
end
function s.filter2(c)
return c.MoJin and c:IsAbleToRemoveAsCost() and c:IsFaceup()
function s.fselect(g,e,tp)
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
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,c,e,tp)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,c)
if chk==0 then return g:CheckSubGroup(s.fselect,5,5,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g1:Clone()
sg:AddCard(c)
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)
local sg=g:SelectSubGroup(tp,s.fselect,false,5,5,e,tp)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
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
end
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)
end
end
function s.tdfilter(c)
return c:IsAbleToDeck() and c.MoJin
return c:IsAbleToDeck() and c.MoJin==true
end
function s.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup() and c.MoJin
return c:IsAbleToHand() and c:IsFaceup() and c.MoJin==true
end
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
......
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