--暗影魔 归墟 local m=14060002 local cm=_G["c"..m] function cm.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK) --c:EnableUnsummonable() --splimit local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetValue(cm.splimit) c:RegisterEffect(e0) --to deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(m,0)) e1:SetCategory(CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_TO_GRAVE) e1:SetTarget(cm.rettg) e1:SetOperation(cm.retop) c:RegisterEffect(e1) --To grave local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(m,1)) e2:SetCategory(CATEGORY_TOGRAVE) e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_DECK) e2:SetCountLimit(1) e2:SetCondition(cm.tgcon) e2:SetTarget(cm.tgtg) e2:SetOperation(cm.tgop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_SPSUMMON_PROC_G) e3:SetRange(LOCATION_DECK) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCondition(cm.tgcon) c:RegisterEffect(e3) end function cm.splimit(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) end function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) end function cm.retop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsAbleToDeck() then Duel.SendtoDeck(c,nil,1,REASON_EFFECT) c:ReverseInDeck() end end function cm.tgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsFaceup() and not Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) end function cm.tgfilter(c,e,tp) return c:IsSetCard(0x1406) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and not c:IsCode(m) end function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function cm.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SendtoGrave(g,nil,REASON_EFFECT) end end