Commit 6d70c162 authored by Tachibana's avatar Tachibana

eme

parent f6cc2d21
Pipeline #6843 passed with stages
in 25 minutes and 26 seconds
......@@ -41,6 +41,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1)
e4:SetCost(cm.cost)
e4:SetCondition(cm.sumcon)
e4:SetTarget(cm.sumtg)
e4:SetOperation(cm.sumop)
......@@ -48,6 +49,18 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e4)
end
end
function cm.tdfilter(c)
return c:IsSetCard(0xcc5) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeckAsCost() and c:IsFaceup()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_REMOVED,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.SendtoDeck(tg1,nil,2,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,c:GetCode(),RESET_PHASE+PHASE_END,0,1)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPublic()
end
......
......@@ -17,6 +17,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
......
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