Commit bb0d6dfb authored by Tachibana's avatar Tachibana

E

parent 277b9a6f
No preview for this file type
......@@ -1631,8 +1631,6 @@
92900001 1 --Virtual UP-北世卿泠
92900010 0 --Virtual UP-Solo Channel
92900018 1 --Virtual UP-鹿岛佩佩子
#960
96001057 0 --闪亮登场 绿色心情
#988
98800006 1 --超古代的仪式 光之呼唤
98800012 0 --超古代的魔神
......
......@@ -96,6 +96,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.SelectMatchingCard(tp,cm.setfilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.HintSelection(dg)
Duel.ChangePosition(dg,POS_FACEDOWN_DEFENSE)
if dg:IsExists(Card.IsLocation,1,nil,LOCATION_SZONE) then
local rg=dg:Filter(Card.IsLocation,nil,LOCATION_SZONE)
Duel.RaiseEvent(rg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
......
--伴生双子·萌芽
local m=96000001
local cm=_G["c"..m]
twins=twins or {}
--to deck
function twins.todeck(c,m)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1))
e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_LEAVE_FIELD)
--e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(twins.tdcon)
e6:SetTarget(twins.tdtg)
e6:SetOperation(twins.tdop)
c:RegisterEffect(e6)
end
function twins.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x280) and c:IsType(TYPE_MONSTER)
end
function twins.tdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(twins.cfilter,1,nil)
end
function twins.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local m=c:GetOriginalCode()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function twins.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.IsExistingMatchingCard(twins.cosfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(96000051,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(twins.cosfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
else
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
function twins.cosfilter(c)
return c:IsCode(96000051) and c:IsAbleToDeck()
end
--sump limit
function twins.sump(c,count)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetLabel(twins.getsummoncount(tp),count-1)
e1:SetTarget(twins.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_LEFT_SPSUMMON_COUNT)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetLabel(twins.getsummoncount(tp),count-1)
e3:SetValue(twins.countval)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function twins.getsummoncount(tp)
return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)+Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)
end
function twins.splimit(e,c,sump,sumtype,sumpos,targetp,se)
local sumpcount,count=e:GetLabel()
return twins.getsummoncount(sump)>sumpcount+count
end
function twins.countval(e,re,tp)
if twins.getsummoncount(tp)>sumpcount+count then return 0 else return cm.getsummoncount(sump)-e:GetLabel()+count end
end
--card effects
function cm.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--to deck
local e6=twins.todeck(c,m)
end
--SpecialSummon
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x280) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--local c=e:GetHandler()
twins.sump(e:GetHandler(),1)
end
--伴生双子·枝叶
local m=96000011
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c10000100") end,function() require("script/c10000100") end)
function cm.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--to deck
local e6=twins.todeck(c,m)
end
--tohand
function cm.thfilter(c)
return c:IsSetCard(0x280) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
twins.sump(e:GetHandler(),2)
end
--伴生双子·果实
local m=96000021
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c10000100") end,function() require("script/c10000100") end)
function cm.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--to deck
local e6=twins.todeck(c,m)
end
--tohand
function cm.thfilter(c)
return c:IsSetCard(0x280) and c:IsType(TYPE_MONSTER) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
twins.sump(e:GetHandler(),3)
end
--伴生双子·枯木
local m=96000031
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c10000100") end,function() require("script/c10000100") end)
function cm.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--to deck
local e6=twins.todeck(c,m)
end
--set
function cm.setfilter(c)
return c:IsSetCard(0x280) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--伴生双子的安眠
local m=96000041
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--cannot change position
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.poscost)
e2:SetOperation(cm.posop)
c:RegisterEffect(e2)
end
function cm.sfilter1(c,tp)
return c:IsFaceup() and c:IsCanTurnSet() and c:IsSetCard(0x280) and Duel.IsExistingTarget(cm.sfilter2,tp,0,LOCATION_MZONE,1,c)
end
function cm.sfilter2(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.sfilter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.sfilter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g1=Duel.SelectTarget(tp,cm.sfilter1,tp,LOCATION_MZONE,0,1,1,nil)
local g2=Duel.SelectTarget(tp,cm.sfilter2,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,g1:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 and Duel.ChangePosition(tg,POS_FACEDOWN_DEFENSE)~=2 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,1-tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_RULE)
end
end
--pos
function cm.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
--伴生双子的生长
local m=96000051
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp,spchk)
return c:IsSetCard(0x280) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or (spchk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function cm.cfilter(c)
return not c:IsSetCard(0x280) or c:IsFacedown()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
or not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil))
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,spchk) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
or not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,spchk)
if g:GetCount()>0 then
if spchk and g:GetFirst():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectOption(tp,1190,1152)==1 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--伴生双子的休息
local m=96000061
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0x280)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x280) and c:IsAbleToDeck()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
if ct<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_MZONE,0,1,ct,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToHand,1-tp,LOCATION_ONFIELD,0,g:GetCount(),g:GetCount(),nil)
Duel.SendtoHand(sg,nil,REASON_RULE)
end
end
--伴生双子·落叶
local m=96000071
local cm=_G["c"..m]
function cm.initial_effect(c)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(cm.tgcon)
e1:SetCost(cm.tgcost)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
--tograve
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x280):GetClassCount(Card.GetCode)>=3
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_SZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_SZONE,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
--tohand
function cm.cfilter(c,re)
return re and re:GetHandler()==c and c:IsSetCard(0x280) and c:IsType(TYPE_MONSTER)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,re)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--伴生双子·花朵
local m=96000081
local cm=_G["c"..m]
function cm.initial_effect(c)
--SpecialSummon and ntr
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
--SpecialSummon and ntr
function cm.cfilter(c,tp)
return c:IsSetCard(0x280) and c:IsFaceup()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end
function cm.ntrfilter(c)
return c:IsControlerCanBeChanged() and not c:IsSetCard(0x280)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<1 or not c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
then return end
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(cm.dtg)
e1:SetOperation(cm.dop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e1)
if Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,cm.ntrfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.GetControl(g,tp)
end
end
--draw
function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.dop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--伴生双子的春夏秋冬
local m=96000091
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--copy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_DECK)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.cpcon)
e3:SetCost(cm.cpcost)
e3:SetTarget(cm.cptg)
e3:SetOperation(cm.cpop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and rp==tp and re:GetHandler():IsSetCard(0x280)
end
function cm.spfilter(c,e,tp,att)
return c:IsSetCard(0x280) and not c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,re:GetHandler():GetAttribute()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,re:GetHandler():GetAttribute())
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
--copy
function cm.cfilter(c,re)
return re and re:GetHandler()==c and c:IsType(TYPE_MONSTER)
end
function cm.cpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and eg:IsExists(cm.cfilter,1,nil,re)
end
function cm.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function cm.cpfilter(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(cm.cpfilter,tp,LOCATION_HAND,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cpfilter,tp,LOCATION_HAND,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
--伴生双子的轮回
local m=96000101
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(cm.thcon)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
--xyz change
function cm.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x280) and c:IsLevelAbove(1)
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetLevel()+1)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function cm.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsRace(RACE_PLANT) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetLevel()+1)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e2,true)
end
end
--tohand
function cm.cfilter(c,e,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsType(TYPE_XYZ) and c:IsSetCard(0x280)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(cm.cfilter,1,nil,e,tp) and aux.exccon(e)
end
function cm.thfilter(c)
return c:IsSetCard(0x280) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and
Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_GRAVE) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--伴生双子·种子
local m=96000111
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,m+1)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(cm.rtg)
e2:SetOperation(cm.rop)
c:RegisterEffect(e2)
end
--SpecialSummon
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,m)+Duel.GetFlagEffect(tp,m)>=3
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--Remove
function cm.rfilter(c)
return c:IsFaceup() and c:IsSetCard(0x280)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.rfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,cm.rfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #tg==0 then return end
if Duel.Remove(tg,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local og=Duel.GetOperatedGroup()
local oc=og:GetFirst()
while oc do
oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
oc=og:GetNext()
end
og:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(og)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetValue(cm.aclimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.retfilter(c)
return c:GetFlagEffect(id)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.retfilter,nil)
if sg:GetCount()>1 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)==1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
local tc=sg:Select(tp,1,1,nil):GetFirst()
Duel.ReturnToField(tc)
else
local tc=sg:GetFirst()
while tc do
Duel.ReturnToField(tc)
tc=sg:GetNext()
end
end
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsLocation(LOCATION_REMOVED)
end
--伴生双子的乐园
local m=96000121
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,nil,nil,99)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--atk & def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsDisabled))
e3:SetValue(3000)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
c:RegisterEffect(e2)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsDisabled))
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
end
--SpecialSummon
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x280) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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+RESETS_STANDARD)
tc:RegisterEffect(e2)
--cannot direct attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
end
--闪亮登场 紫色宝石
local cm,m,o=GetID()
Choco_Debut = Choco_Debut or {}
local CD = Choco_Debut
function CD.Lower(c,code,op1,cod,con2,op2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,code)
e1:SetOperation(CD.L_op1(code,op1))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(1152)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(cod)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,code)
e2:SetCondition(con2)
e2:SetTarget(CD.L_tg2)
e2:SetOperation(CD.L_op2(op2))
c:RegisterEffect(e2)
return e1,e2
end
function CD.Higher(c,op1)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),6,2,nil,nil,99)
c:EnableReviveLimit()
local e=Effect.CreateEffect(c)
e:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e:SetCode(EVENT_SPSUMMON_SUCCESS)
e:SetCondition(CD.H_con1)
e:SetOperation(op1)
c:RegisterEffect(e)
return e1
end
function CD.L_op1(code,op)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local fid=c:GetFieldID()
c:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,fid,66)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
if op then op(e,tp,eg,ep,ev,re,r,rp,c,fid) end
end
end
function CD.L_tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
e:SetLabel(c:IsPublic() and 1 or 0)
end
function CD.L_op2(op2)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
if e:GetLabel()==1 and op2 and op2(e,tp,eg,ep,ev,re,r,rp,1) then
op2(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function CD.H_con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetHandler():GetMaterial():IsExists(Card.IsSetCard,1,nil,0x5282)
end
----------------------------------------
if not cm then return end
function cm.initial_effect(c)
local e1,e2=CD.Lower(c,m,cm.op1,EVENT_CHAINING,cm.con2,cm.op2)
end
--e1
function cm.op1(e,tp,eg,ep,ev,re,r,rp,c,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetRange(LOCATION_HAND)
e1:SetLabel(fid)
e1:SetCondition(cm.op1con1)
e1:SetValue(cm.op1val1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_SSET)
e2:SetLabel(fid)
e2:SetCondition(cm.op1con1)
e2:SetOperation(cm.op1op2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e2)
end
function cm.op1con1(e)
return e:GetHandler():GetFlagEffectLabel(m)==e:GetLabel()
end
function cm.op1val1(e,re,tp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local c=re:GetHandler()
return c:GetFlagEffect(m)>0
end
function cm.op1op2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
local reset=tc:GetControler()==tp and RESET_SELF_TURN or RESET_OPPO_TURN
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+reset,0,1)
end
end
--e2
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp~=tp
end
function cm.opf2(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x5282) and c:GetType()&TYPE_CONTINUOUS>0
and not c:IsForbidden() and c:CheckUniqueOnField(tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.opf2,tp,LOCATION_DECK,0,nil,tp)
if chk then return #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
tc=Duel.SelectMatchingCard(tp,cm.opf2,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
\ No newline at end of file
--闪亮登场 红色宝石
local cm,m,o=GetID()
if not pcall(function() require("expansions/script/c96001051") end) then require("script/c96001051") end
function cm.initial_effect(c)
local e1,e2=Choco_Debut.Lower(c,m,cm.op1,EVENT_SPSUMMON_SUCCESS,cm.con2,cm.op2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
--e1
function cm.op1(e,tp,eg,ep,ev,re,r,rp,c,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_MSET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetLabel(fid)
e1:SetCondition(cm.op1con1)
e1:SetTargetRange(0,1)
e1:SetTarget(aux.TRUE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTarget(cm.op1val3)
c:RegisterEffect(e3)
end
function cm.op1con1(e)
return e:GetHandler():GetFlagEffectLabel(m)==e:GetLabel()
end
function cm.op1val3(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)~=0
end
--e2
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_DECK+LOCATION_HAND) and rp~=tp
end
function cm.opf2(c,e,tp)
return c:IsSetCard(0x5282) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.opf2,tp,LOCATION_DECK,0,nil,e,tp)
if chk then return #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=Duel.SelectMatchingCard(tp,cm.opf2,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if g then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end
end
\ No newline at end of file
--闪亮登场 橘色宝石
local cm,m,o=GetID()
if not pcall(function() require("expansions/script/c96001051") end) then require("script/c96001051") end
function cm.initial_effect(c)
local e1,e2=Choco_Debut.Lower(c,m,cm.op1,EVENT_SPSUMMON_SUCCESS,cm.con2,cm.op2)
end
--e1
function cm.op1(e,tp,eg,ep,ev,re,r,rp,c,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetLabel(fid)
e1:SetCondition(cm.op1con1)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_EXTRA))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
end
function cm.op1con1(e)
return e:GetHandler():GetFlagEffectLabel(m)==e:GetLabel()
end
--e2
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_EXTRA) and rp~=tp
end
function cm.opf2(c,e,tp)
return c:IsSetCard(0x5282) and c:IsType(TYPE_XYZ) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c)>0
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.opf2,tp,LOCATION_EXTRA,0,nil,e,tp)
if chk then return #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=Duel.SelectMatchingCard(tp,cm.opf2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if g then
g:SetMaterial(Group.FromCards(e:GetHandler()))
Duel.Overlay(g,Group.FromCards(e:GetHandler()))
Duel.SpecialSummon(g,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
g:CompleteProcedure()
end
end
\ No newline at end of file
--闪亮登场 橘色巧克力
local cm,m,o=GetID()
if not pcall(function() require("expansions/script/c96001051") end) then require("script/c96001051") end
function cm.initial_effect(c)
local e1=Choco_Debut.Higher(c,cm.op1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON)
e2:SetCountLimit(1)
e2:SetCondition(cm.con2)
e2:SetCost(cm.cos2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK+LOCATION_GRAVE))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--e2
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_EXTRA) and rp~=tp
end
function cm.cos2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(Card.IsPreviousLocation,nil,LOCATION_EXTRA)
for tc in aux.Next(g) do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
end
\ No newline at end of file
--闪亮登场 红色巧克力
local cm,m,o=GetID()
if not pcall(function() require("expansions/script/c96001051") end) then require("script/c96001051") end
function cm.initial_effect(c)
local e1=Choco_Debut.Higher(c,cm.op1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.cos2)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--e2
function cm.cos2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
if tc then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--闪亮登场 甜点聚会
local cm,m,o=GetID()
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.con2)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetTarget(cm.tg4)
e4:SetOperation(cm.op4)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetDescription(aux.Stringid(m,4))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_SZONE)
c:RegisterEffect(e5)
end
--e2
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function cm.tgf2(c)
return c:IsXyzSummonable(nil) and c:IsRace(RACE_SPELLCASTER)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgf2,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tgf2,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
--e4
function cm.tgf4(c,e,tp)
return c:IsRankAbove(1) and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.tgf42,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function cm.tgf42(c,e,tp,mc)
return c:IsSetCard(0x5282) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function cm.tg4(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.tgf4(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tgf4,tp,LOCATION_MZONE,0,1,nil,e,tp) and e:GetHandler():GetFlagEffect(m)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.tgf4,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
e:GetHandler():RegisterFlagEffect(m,RESET_PHASE+PHASE_END,0,1)
end
function cm.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,cm.tgf42,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
--闪亮登场 绿色心情
local cm,m,o=GetID()
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cos1)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cos2)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
--e1
function cm.cos1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.tgf1(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(6) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgf1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tgf1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
--e2
function cm.cos2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -1365,10 +1365,8 @@
!counter 0x9a0 Virtual指示物
#巧克力不做人 2803260801 960 0x280-0x28f
!setname 0x280 伴生双子
!setname 0x281 布偶
!setname 0x3282 世界异变
!setname 0x5282 闪亮登场
#Jerry 1993043473 988 0xad0-0xadf
!setname 0xad0 超古代的
......
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