--灯火之深秋 local m=28327007 local cm=_G["c"..m] xpcall(function() require("expansions/script/c28327000") end,function() require("script/c28327000") end) function cm.initial_effect(c) aux.AddCodeList(c,28327000) --Activate aux.AddRitualProcEqual2Code(c,28327000,nil,cm.filter) --destroy replace local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetRange(LOCATION_GRAVE) e2:SetTarget(cm.reptg) e2:SetValue(cm.repval) e2:SetOperation(cm.repop) c:RegisterEffect(e2) end function cm.filter(c) return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) end function cm.repfilter(c,tp) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE) end function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(cm.repfilter,1,nil,tp) end return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) end function cm.repval(e,c) return cm.repfilter(c,e:GetHandlerPlayer()) end function cm.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) end