--Magium Disciples local m=888810 local cm=_G["c"..m] function cm.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(m,0)) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCountLimit(1,888110) e1:SetTarget(cm.target) e1:SetOperation(cm.operation) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(m,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_HAND) e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetCountLimit(1,888120) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCondition(cm.spcon1) e2:SetTarget(cm.sptg1) e2:SetOperation(cm.spop1) c:RegisterEffect(e2) end function cm.filter(c) return c:IsCode(888809) end function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,1,tp,LOCATION_DECK) end function cm.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil) local tc=g:GetFirst() if g:GetCount()>0 then local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,5) if fc then Duel.SendtoGrave(fc,REASON_RULE) Duel.BreakEffect() end Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) end end function cm.spcon1(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) end function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function cm.spop1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end