--灵刻使 黑暗使者 local m=10904001 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:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x237)) e1:SetCondition(cm.tgcon) e1:SetValue(aux.tgoval) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetValue(aux.indoval) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(26638543,0)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_PZONE) e3:SetCountLimit(1) e3:SetTarget(cm.sctg) e3:SetOperation(cm.scop) c:RegisterEffect(e3) 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.tgcon(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.scfilter(c,pc) return c:GetLeftScale()~=pc:GetLeftScale() end function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_PZONE) and cm.scfilter(chkc,c) and chkc~=c end if chk==0 then return Duel.IsExistingTarget(cm.scfilter,tp,LOCATION_PZONE,0,1,c,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,cm.scfilter,tp,LOCATION_PZONE,0,1,1,c,c) end function cm.scop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(tc:GetLeftScale()) e1:SetReset(RESET_EVENT+0x1fe0000) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) e2:SetValue(tc:GetRightScale()) c:RegisterEffect(e2) end end