--灵刻使的暗面 local m=10904017 local cm=_G["c"..m] function cm.initial_effect(c) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) e0:SetCondition(cm.condition) c:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_SZONE) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(cm.splimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(92204263,0)) e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetTarget(cm.seqtg) e2:SetOperation(cm.seqop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetRange(LOCATION_SZONE) e3:SetCode(EFFECT_CANNOT_SUMMON) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCondition(cm.slcon) e3:SetTargetRange(1,1) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetRange(LOCATION_SZONE) e4:SetValue(cm.efilter) c:RegisterEffect(e4) end function cm.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_LINK) end function cm.splimit(e,c,sump,sumtype,sumpos,targetp) return bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK end function cm.seqfilter(c) return c:IsFaceup() and c:IsSetCard(0x237) end function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.seqfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(cm.seqfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(92204263,1)) Duel.SelectTarget(tp,cm.seqfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function cm.seqop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,571) local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) local nseq=math.log(s,2) Duel.MoveSequence(tc,nseq) Duel.Draw(tp,1,REASON_EFFECT) end function cm.slcon(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()==0 and tc2:GetRightScale()==0 end function cm.efilter(e,re,rp) return rp==e:GetHandlerPlayer() end