Commit b94d857e authored by POLYMER's avatar POLYMER

fix

parent 0638fd19
...@@ -17,31 +17,25 @@ end ...@@ -17,31 +17,25 @@ end
function cm.chkfilter(c,i) function cm.chkfilter(c,i)
return c:GetSequence()==i return c:GetSequence()==i
end end
function cm.rdfi0ter(c,e)
return c:IsType(TYPE_RITUAL)
and ((c:IsType(TYPE_MONSTER) and c:IsReleasable())
or (c:IsType(TYPE_SPELL) and c:IsDestructable(e)))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local snum=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_RITUAL) if not e:GetHandler():IsRelateToEffect(e) then return end
if snum<=0 then return end
local g2=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil) local g2=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
if not g2 then return end if not g2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_HAND,0,1,snum,nil) local g1=Duel.SelectMatchingCard(tp,cm.rdfi0ter,tp,0x0e,0,1,20,e:GetHandler(),e)
if not g1 then return end if not g1 then return end
snum=g1:GetCount()+1 g1:AddCard(e:GetHandler())
local num=0 local num=g1:GetCount()*3
Duel.ConfirmCards(1-tp,g1) if num>#g2 then num=#g2 end
for i=1,#g2,1 do local rlg=g1:Filter(Card.IsType,nil,TYPE_MONSTER)
if num==snum then break end Duel.Release(rlg,REASON_EFFECT)
local tc=Duel.GetMatchingGroup(cm.chkfilter,tp,LOCATION_DECK,0,nil,#g2-i):GetFirst() local dsg=g1:Filter(Card.IsType,nil,TYPE_SPELL)
if tc:IsType(TYPE_RITUAL) then Duel.Destroy(dsg,REASON_EFFECT)
snum=snum+1
end
num=num+1
end
if num>=#g2 then
Duel.ConfirmDecktop(tp,#g2)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
return
end
Duel.ConfirmDecktop(tp,num) Duel.ConfirmDecktop(tp,num)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
::cancel:: ::cancel::
...@@ -128,9 +122,7 @@ end ...@@ -128,9 +122,7 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end if chk==0 then return not c:IsPublic() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -188,7 +180,4 @@ function cm.adop(e,tp,eg,ep,ev,re,r,rp) ...@@ -188,7 +180,4 @@ function cm.adop(e,tp,eg,ep,ev,re,r,rp)
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e6) tc:RegisterEffect(e6)
end end
end end
\ No newline at end of file
...@@ -45,7 +45,7 @@ function c9910060.xyzop(e,tp,chk) ...@@ -45,7 +45,7 @@ function c9910060.xyzop(e,tp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK) local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,9910060,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9910060,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function c9910060.effcon(e) function c9910060.effcon(e)
return e:GetHandler():GetOverlayCount()>0 return e:GetHandler():GetOverlayCount()>0
......
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