Commit d0c7d992 authored by 聖園ミカ's avatar 聖園ミカ 🐟

7

parent 51ec6c76
...@@ -21,8 +21,8 @@ function cm.initial_effect(c) ...@@ -21,8 +21,8 @@ function cm.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCategory(CATEGORY_TODECK) e4:SetCategory(CATEGORY_TODECK)
e4:SetCode(EVENT_REMOVE) e4:SetCode(EVENT_REMOVE)
e4:SetTarget(cm.thtg) e4:SetTarget(cm.target)
e4:SetOperation(cm.thop) e4:SetOperation(cm.operation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.ffilter(c,fc,sub,mg,sg) function cm.ffilter(c,fc,sub,mg,sg)
...@@ -49,30 +49,25 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,30 +49,25 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function cm.thfilter(c,e) function cm.filter(c,e,fc,sub,mg,sg)
return c:IsFaceupEx() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) return c:IsFaceupEx() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end end
function cm.thfilter2(c,g) function cm.fselect(g)
return g:IsExists(Card.IsCode,2,c,c:GetCode()) return g:GetClassCount(Card.GetCode)==1
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and cm.thfilter(chkc,e) end local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e) if chkc then return false end
if chk==0 then return g:GetCount()>0 end if chk==0 then return g:CheckSubGroup(cm.fselect,3,3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g1=g:FilterSelect(tp,cm.thfilter2,1,1,nil,g) local sg=g:SelectSubGroup(tp,cm.fselect,false,3,3)
if g1:GetCount()>0 then Duel.SetTargetCard(sg)
local g2=g:FilterSelect(tp,Card.IsCode,2,2,g1:GetFirst(),g1:GetFirst():GetCode()) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
g1:Merge(g2)
Duel.SetTargetCard(g1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,3,0,0)
end
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not g then return end
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end 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