Commit ac70453a authored by Tachibana's avatar Tachibana

eme

parent c2218610
No preview for this file type
--副语音乐家 克兰贝莉
function c65000000.initial_effect(c)
c:EnableReviveLimit()
c:SetSPSummonOnce(65000000)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c65000000.spcon)
e0:SetOperation(c65000000.spop)
c:RegisterEffect(e0)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCountLimit(1)
e1:SetCondition(c65000000.condition)
e1:SetCost(c65000000.cost)
e1:SetTarget(c65000000.target)
e1:SetOperation(c65000000.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,65000000+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(c65000000.spzcost)
e2:SetTarget(c65000000.spztg)
e2:SetOperation(c65000000.spzop)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c65000000.val)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
function c65000000.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetDecktopGroup(tp,10)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==10
end
function c65000000.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetDecktopGroup(tp,10)
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function c65000000.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev)
end
function c65000000.costfil(c)
return c:IsFacedown() and c:IsAbleToDeckAsCost()
end
function c65000000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65000000.costfil,tp,LOCATION_REMOVED,0,2,nil) end
local g=Duel.SelectMatchingCard(tp,c65000000.costfil,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c65000000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c65000000.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c65000000.spzcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,5,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,5,5,e:GetHandler())
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function c65000000.spztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_GRAVE)
end
function c65000000.spzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c65000000.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)*300
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment