Commit f2ae6fd7 authored by Tachibana's avatar Tachibana

eme

parent 6aa5c75f
Pipeline #9031 passed with stages
in 39 minutes and 4 seconds
No preview for this file type
--时光酒桌 white
local m=60002000
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(10002024)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(20002024)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(60002011)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(60002024)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
end
This diff is collapsed.
This diff is collapsed.
--时光酒桌 辰月
function c60002011.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002011,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,60002011)
e1:SetCondition(c60002011.stcon1)
e1:SetCost(c60002011.stcost)
e1:SetTarget(c60002011.sttg)
e1:SetOperation(c60002011.stop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCondition(c60002011.stcon2)
c:RegisterEffect(e2)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,60002011)
e2:SetCondition(c60002011.spcon)
e2:SetTarget(c60002011.sptg)
e2:SetOperation(c60002011.spop)
c:RegisterEffect(e2)
if not c60002011.global_check then
c60002011.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCondition(c60002011.checkcon)
ge1:SetOperation(c60002011.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c60002011.checkcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rc:IsType(TYPE_TRAP) and rc:IsType(TYPE_COUNTER) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c60002011.checkop(e,tp,eg,ep,ev,re,r,rp)
local p=re:GetHandlerPlayer()
Duel.RegisterFlagEffect(p,60002011,RESET_PHASE+PHASE_END,0,1)
end
function c60002011.stcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,60002024)
end
function c60002011.stcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,60002024)
end
function c60002011.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c60002011.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c60002011.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) then
Duel.ConfirmCards(1-tp,c)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_COUNTER)
c:RegisterEffect(e1)
--get
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCost(c60002011.gtcost)
e1:SetTarget(c60002011.gttg)
e1:SetOperation(c60002011.gtop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
if Duel.SelectYesNo(tp,aux.Stringid(60002011,0)) then
Duel.BreakEffect()
Duel.Recover(tp,1000,REASON_EFFECT)
end
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c60002011.gctfil(c)
return c:IsAbleToGraveAsCost() and c:IsFacedown()
end
function c60002011.gtcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP)
end
function c60002011.rmfil(c)
return c:IsSetCard(0x629) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c60002011.gckfil1(c,tp)
return c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE)
end
function c60002011.gckfil2(c,tp)
return c:IsControler(1-tp) and c:IsLocation(LOCATION_SZONE)
end
function c60002011.gck(g,tp)
if Duel.IsPlayerAffectedByEffect(tp,20002024) then
return g:FilterCount(c60002011.gckfil1,nil,tp)<=1 and g:FilterCount(c60002011.gckfil2,nil,tp)<=1
elseif Duel.IsPlayerAffectedByEffect(tp,10002024) then
return not g:IsExists(c60002011.gckfil1,1,nil,tp) and g:FilterCount(c60002011.gckfil2,nil,tp)<=1
else
return not g:IsExists(Card.IsControler,1,nil,tp)
end
end
function c60002011.gttg(e,tp,eg,ep,ev,re,r,rp,chk)
local x=0
if Duel.IsPlayerAffectedByEffect(tp,60002011) then
x=2
else
x=3
end
local g=Duel.GetMatchingGroup(c60002011.gctfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if chk==0 then return g:CheckSubGroup(c60002011.gck,x,3,tp) and Duel.IsExistingMatchingCard(c60002011.rmfil,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c60002011.chainlm)
end
end
function c60002011.chainlm(e,rp,tp)
return e:GetHandler():IsType(TYPE_COUNTER)
end
function c60002011.gtop(e,tp,eg,ep,ev,re,r,rp)
local x=0
if Duel.IsPlayerAffectedByEffect(tp,60002011) then
x=2
else
x=3
end
local m=60002011
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c60002009") end) then require("script/c60002009") end
function cm.initial_effect(c)
local e1=timeTable.set(c,m,cm.extraMove)
local e2=timeTable.spsummon(c,m,cm.extra3,cm.extra5)
timeTable.globle(c)
end
--e1
function cm.extraMove(e,tp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60002011.gctfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if not g:CheckSubGroup(c60002011.gck,x,3,tp) then return end
local sg=g:SelectSubGroup(tp,c60002011.gck,false,x,3,tp)
Duel.SendtoGrave(sg,REASON_EFFECT)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c60002011.immval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local g=Duel.SelectMatchingCard(tp,c60002011.rmfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Recover(tp,1000,REASON_EFFECT)
end
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
function c60002011.immval(e,te)
return ((te:IsActiveType(TYPE_MONSTER) and te:GetOwner():IsSummonLocation(LOCATION_EXTRA)) or te:IsActiveType(TYPE_TRAP)) and te:GetHandlerPlayer()~=tp
end
function c60002011.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x629)
end
function c60002011.tgfil(c)
return c:IsLevel(9) and c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0
end
function c60002011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002011.tgfil,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_REMOVED)
end
function c60002011.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60002011.tgfil,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
local dg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(dg,REASON_EFFECT)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
--
if Duel.GetFlagEffect(tp,60002011)>=0 then
--e2
function cm.extra3(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002011,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetTarget(c60002011.xsplimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0)
e4:SetValue(c60002011.xactlimit)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
end
--
if Duel.GetFlagEffect(tp,60002011)>=3 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002011,3))
e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
......@@ -221,30 +29,15 @@ function c60002011.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
--
if Duel.GetFlagEffect(tp,60002011)>=5 then
--
end
function cm.extra5(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60002011,4))
e2:SetDescription(aux.Stringid(m,4))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetCode(60002011)
e2:SetCode(m)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
end
end
end
function c60002011.xsplimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function c60002011.xactlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x629)
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--时光酒桌 意识
function c60002021.initial_effect(c)
--Activate
local m=60002021
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c60002009") end) then require("script/c60002009") end
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002021,1))
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60002021+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c60002021.accon)
e1:SetTarget(c60002021.actg)
e1:SetOperation(c60002021.acop)
c:RegisterEffect(e1)
--xx
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60002021,2))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1)
e2:SetCost(c60002021.xxcost)
e2:SetTarget(c60002021.xxtg)
e2:SetOperation(c60002021.xxop)
c:RegisterEffect(e2)
if not c60002021.global_check then
c60002021.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCondition(c60002021.checkcon)
ge1:SetOperation(c60002021.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c60002021.checkcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rc:IsType(TYPE_TRAP) and rc:IsType(TYPE_COUNTER) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c60002021.checkop(e,tp,eg,ep,ev,re,r,rp)
local p=re:GetHandlerPlayer()
Duel.RegisterFlagEffect(p,60002021,RESET_PHASE+PHASE_END,0,1)
end
function c60002021.cfilter(c)
return c:IsFaceup() and not c:IsSetCard(0x629)
end
function c60002021.accon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c60002021.cfilter,tp,LOCATION_MZONE,0,1,nil)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(timeTable.actionCon)
e1:SetTarget(cm.actg)
e1:SetOperation(cm.acop)
c:RegisterEffect(e1)
timeTable.spell(c,cm.extra3,cm.extra5)
timeTable.globle(c)
end
--e1
function cm.chlimit(e,ep,tp)
return tp==ep
end
function c60002021.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local x=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,x,tp,LOCATION_HAND)
if chk==0 then return g:GetCount()==Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil) and g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),tp,LOCATION_HAND)
if Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,0,nil):GetCount()>=3 then
Duel.SetChainLimit(c60002021.chlimit)
Duel.SetChainLimit(cm.chlimit)
end
end
function c60002021.chlimit(e,ep,tp)
return tp==ep
end
function c60002021.ckfil(c)
function cm.ckfil(c)
return c:IsSetCard(0x629) or (c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER))
end
function c60002021.ssfil(c)
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.ssfil(c)
return c:IsSSetable() and c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER)
end
function c60002021.acop(e,tp,eg,ep,ev,re,r,rp)
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local x=g:FilterCount(c60002021.ckfil,nil)
if x>=0 then
Duel.Draw(tp,x,REASON_EFFECT)
local tc=g:GetFirst()
while tc do
local code=tc:GetCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c60002021.aclimit)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
tc=g:GetNext()
end
local x=g:FilterCount(cm.ckfil,nil)
if x>=0 then
Duel.Draw(tp,x,REASON_EFFECT)
local tc=g:GetFirst()
while tc do
local code=tc:GetCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
tc=g:GetNext()
end
end
if x>=2 then
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
if x>=4 and g:IsExists(c60002021.ssfil,1,nil) then
local sc=g:FilterSelect(tp,c60002021.ssfil,1,1,nil):GetFirst()
Duel.SSet(tp,sc)
if x>=4 and g:IsExists(cm.ssfil,1,nil) then
local sc=g:FilterSelect(tp,cm.ssfil,1,1,nil):GetFirst()
Duel.SSet(tp,sc)
end
end
function c60002021.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function c60002021.xxcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c60002021.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c60002021.setfilter(c)
return c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER) and c:IsSSetable()
end
function c60002021.thfil1(c)
return c:IsSetCard(0x629) and c:IsType(TYPE_MONSTER)
end
function c60002021.thfil2(c)
return c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER)
end
function c60002021.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local x=Duel.GetFlagEffect(tp,60002021)
if x>=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetTarget(c60002021.xsplimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0)
e4:SetValue(c60002021.xactlimit)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
local g=Duel.GetMatchingGroup(c60002021.setfilter,tp,LOCATION_HAND,0,nil)
--e2
function cm.extra3(e,tp)
local g=Duel.GetMatchingGroup(cm.setfilter,tp,LOCATION_HAND,0,nil)
local ct=math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),g:GetCount())
if x>=3 and ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,ct,nil)
Duel.SSet(tp,sg)
--
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
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)
tc=sg:GetNext()
end
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,ct,nil)
Duel.SSet(tp,sg)
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(tc)
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)
tc=sg:GetNext()
end
end
if x>=5 and Duel.IsExistingMatchingCard(c60002021.thfil1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c60002021.thfil2,tp,LOCATION_DECK,0,1,nil) then
local g1=Duel.SelectMatchingCard(tp,c60002021.thfil1,tp,LOCATION_DECK,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c60002021.thfil2,tp,LOCATION_DECK,0,1,1,nil)
g1:Merge(g2)
Duel.SendtoHand(g1,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
function cm.extra5(e,tp)
if Duel.IsExistingMatchingCard(cm.thfil1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(cm.thfil2,tp,LOCATION_DECK,0,1,nil) then
local g1=Duel.SelectMatchingCard(tp,cm.thfil1,tp,LOCATION_DECK,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,cm.thfil2,tp,LOCATION_DECK,0,1,1,nil)
g1:Merge(g2)
Duel.SendtoHand(g1,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
end
function c60002021.xsplimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
function cm.setfilter(c)
return c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER) and c:IsSSetable()
end
function c60002021.xactlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x629)
function cm.thfil1(c)
return c:IsSetCard(0x629) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thfil2(c)
return c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER) and c:IsAbleToHand()
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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