Commit b952d7dd authored by TanakaKotoha's avatar TanakaKotoha

wdnmd

parent 486be0d6
--星光歌剧 雪代晶Revue --星光歌剧 雪代晶Revue
if not pcall(function() require("expansions/script/c65010000") end) then require("script/c65010000") end function c65010564.initial_effect(c)
local m,cm=rscf.DefineCard(65010564) --spsummon
function cm.initial_effect(c) local e1=Effect.CreateEffect(c)
local e1=rsef.FTO(c,EVENT_RELEASE,{m,0},{1,m},"sp","de",LOCATION_HAND,cm.spcon,nil,rsop.target(rscf.spfilter2(),"sp"),cm.spop) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
local e2=rsef.RegisterClone(c,e1,"code",EVENT_TO_GRAVE,"ctrl",cm.spcon2) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
local e3=rsef.SC(c,EVENT_SPSUMMON_SUCCESS,nil,nil,nil,cm.imcon,cm.imop) e1:SetCode(EVENT_RELEASE)
local e4=rsef.QO(c,nil,{m,1},{1,m+100},"dis,atk","tg",LOCATION_MZONE,nil,nil,rstg.target(cm.disfilter,"dis",LOCATION_MZONE,LOCATION_MZONE,1,1,c),cm.disop) e1:SetProperty(EFFECT_FLAG_DELAY)
end e1:SetRange(LOCATION_HAND)
function cm.cfilter(c,tp) e1:SetCountLimit(1,65010564)
e1:SetCondition(c65010564.spcon)
e1:SetTarget(c65010564.sptg)
e1:SetOperation(c65010564.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c65010564.spcon2)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c65010564.imcon)
e3:SetOperation(c65010564.imop)
c:RegisterEffect(e3)
--disable
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,65010664)
e4:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e4:SetTarget(c65010564.distg)
e4:SetOperation(c65010564.disop)
c:RegisterEffect(e4)
end
function c65010564.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end end
function cm.spcon(e,tp,eg) function c65010564.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp) return eg:IsExists(c65010564.cfilter,1,nil,tp)
end
function c65010564.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c65010564.cfilter,1,nil,tp) and rp~=tp
end end
function cm.spop(e,tp) function c65010564.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=rscf.GetSelf(e) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if c then rssf.SpecialSummon(c) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp) function c65010564.spop(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp) and rp~=tp local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end end
function cm.imcon(e,tp,eg,ep,ev,re) function c65010564.imcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsHasType(EFFECT_TYPE_ACTIONS) and re:GetHandler():IsSetCard(0x9da0) return re:GetHandler():IsSetCard(0x9da0) and re:GetHandler():IsType(TYPE_MONSTER)
end end
function cm.imop(e,tp) function c65010564.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
rshint.Card(m) local e1=Effect.CreateEffect(c)
local e1=rsef.FV_IMMUNE_EFFECT({c,tp},rsval.imntg2,aux.TargetBoolFunction(Card.IsSetCard,0x9da0),{LOCATION_MZONE,0},nil,rsreset.pend) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9da0))
e1:SetValue(c65010564.efilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end end
function cm.disfilter(c) function c65010564.efilter(e,te)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) local c=e:GetHandler()
local ec=te:GetHandler()
if ec:IsHasCardTarget(c) or (te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te)) then return false end
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end end
function cm.disop(e,tp) function c65010564.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
local tc=rscf.GetTargetCard(Card.IsFaceup) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=c end
if not tc then return end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
local e1=rscf.QuickBuff({c,tc},"atkf",tc:GetAttack()/2,"reset",rsreset.est_pend) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
local e2,e3=rsef.SV_LIMIT({c,tc},"dis,dise",nil,nil,rsreset.est_pend) end
end function c65010564.disop(e,tp,eg,ep,ev,re,r,rp)
\ No newline at end of file local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(math.ceil(tc:GetAttack()/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
...@@ -57,8 +57,8 @@ function c9910070.sprcon(e,c) ...@@ -57,8 +57,8 @@ function c9910070.sprcon(e,c)
end end
function c9910070.sprop(e,tp,eg,ep,ev,re,r,rp,c) function c9910070.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c9910070.sprfilter1,tp,LOCATION_MZONE,0,nil,c) local g=Duel.GetMatchingGroup(c9910070.sprfilter1,tp,LOCATION_MZONE,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,c9910070.sprfilter2,true,2,2,tp,c) local sg=g:SelectSubGroup(tp,c9910070.sprfilter2,false,2,2,tp,c)
c:SetMaterial(sg) c:SetMaterial(sg)
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
end end
......
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