--灵刻使 冰瞳 local m=10904004 local cm=_G["c"..m] function cm.initial_effect(c) aux.EnablePendulumAttribute(c) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_FIELD) e0:SetCode(EFFECT_SPSUMMON_PROC) e0:SetProperty(EFFECT_FLAG_UNCOPYABLE) e0:SetRange(LOCATION_HAND) e0:SetCondition(cm.spcon) c:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(74371660,0)) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,m) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,0x1c0) e1:SetCondition(cm.ngcon) e1:SetCost(cm.cost) e1:SetTarget(cm.target) e1:SetOperation(cm.operation) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_REMOVE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_PZONE) e2:SetCondition(cm.scon) e2:SetTargetRange(0,1) e2:SetTarget(cm.rmlimit) c:RegisterEffect(e2) end function cm.spcon(e) local tp=e:GetHandler():GetControler() local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1) if not tc1 or not tc2 then return false end return tc1:GetLeftScale()==tc2:GetRightScale() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end function cm.scon(e,tp,eg,ep,ev,re,r,rp) local tp=e:GetHandler():GetControler() local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1) if not tc1 or not tc2 then return false end return tc1:GetLeftScale()==tc2:GetRightScale() end function cm.rmlimit(e,c,p) return c:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) end function cm.ngcon(e) local tp=e:GetHandler():GetControler() local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1) if not tc1 or not tc2 then return false end return tc1:GetLeftScale()==tc2:GetRightScale() and e:GetHandler():GetLeftScale()>tc1:GetLeftScale() end function cm.rmfilter(c) return c:IsSetCard(0x237) and c:IsFaceup() and c:IsAbleToRemoveAsCost() end function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_ONFIELD,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function cm.filter(c) return c:IsFaceup() end function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end end function cm.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil) local tc=g:GetFirst() while tc do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) tc:RegisterEffect(e2) Duel.NegateRelatedChain(tc,RESET_TURN_SET) tc=g:GetNext() end end