--永恒的少女 function c33710928.initial_effect(c) aux.AddSynchroProcedure(c,nil,aux.NonTuner(c33710928.matfilter),1) c:EnableReviveLimit() --to deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(33710928,1)) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(c33710928.tdcost) e1:SetTarget(c33710928.tdtg) e1:SetOperation(c33710928.tdop) c:RegisterEffect(e1) --SpecialSummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(33710928,2)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_TO_GRAVE) e2:SetCondition(c33710928.condition) e2:SetTarget(c33710928.target) e2:SetOperation(c33710928.operation) c:RegisterEffect(e2) end function c33710928.matfilter(c) return not c:IsAttribute(ATTRIBUTE_DARK) end function c33710928.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) Duel.Release(g,REASON_COST) end function c33710928.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end end function c33710928.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) if g:GetCount()>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end function c33710928.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp end function c33710928.filter(c,e,tp) return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsLevelBelow(4) end function c33710928.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c33710928.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function c33710928.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c33710928.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) if g:GetCount()<1 then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end