--穿越梦想的一执念 local m=33701048 local cm=_G["c"..m] function cm.initial_effect(c) --special summon proc local e0=Effect.CreateEffect(c) e0:SetDescription(aux.Stringid(m,0)) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetType(EFFECT_TYPE_FIELD) e0:SetCode(EFFECT_SPSUMMON_PROC) e0:SetRange(LOCATION_HAND+LOCATION_GRAVE) e0:SetCondition(cm.sumcon) e0:SetCountLimit(1,m) e0:SetOperation(cm.sumop) e0:SetValue(1) c:RegisterEffect(e0) --special summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_LEAVE_FIELD) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCountLimit(1,m+666) e1:SetCost(cm.spcost) e1:SetTarget(cm.sptg) e1:SetOperation(cm.spop) c:RegisterEffect(e1) --damage local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(m,2)) e3:SetCategory(CATEGORY_DAMAGE) e3:SetCountLimit(1,m+999) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetCost(cm.cost) e3:SetTarget(cm.target) e3:SetOperation(cm.operation) c:RegisterEffect(e3) end function cm.refil(c) return c:IsAbleToGraveAsCost() end function cm.sumcon(e,c) local tp=e:GetHandler():GetControler() return Duel.IsExistingMatchingCard(cm.refil,tp,LOCATION_EXTRA,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c) local g=Duel.SelectMatchingCard(tp,cm.refil,tp,LOCATION_EXTRA,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) Duel.BreakEffect() Duel.Recover(tp,1200,REASON_EFFECT) end ---to grave function cm.cfilter(c,ec) return c:IsAbleToGraveAsCost() end function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) Duel.SendtoGrave(g,REASON_COST) end function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function cm.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then end end --effect Damage function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_EXTRA,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,cm.refil,tp,LOCATION_EXTRA,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(800) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) end function cm.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end