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) local m=60002011
--set local cm=_G["c"..m]
local e1=Effect.CreateEffect(c) if not pcall(function() require("expansions/script/c60002009") end) then require("script/c60002009") end
e1:SetDescription(aux.Stringid(60002011,0)) function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) local e1=timeTable.set(c,m,cm.extraMove)
e1:SetRange(LOCATION_HAND) local e2=timeTable.spsummon(c,m,cm.extra3,cm.extra5)
e1:SetCountLimit(1,60002011) timeTable.globle(c)
e1:SetCondition(c60002011.stcon1) end
e1:SetCost(c60002011.stcost) --e1
e1:SetTarget(c60002011.sttg) function cm.extraMove(e,tp)
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() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) then if Duel.SelectYesNo(tp,aux.Stringid(m,0)) 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.BreakEffect()
Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(tp,1000,REASON_EFFECT)
end end
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) 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 end
function c60002011.chainlm(e,rp,tp) --e2
return e:GetHandler():IsType(TYPE_COUNTER) function cm.extra3(c)
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 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) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetDescription(aux.Stringid(m,3))
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)
end
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
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:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
...@@ -221,30 +29,15 @@ function c60002011.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -221,30 +29,15 @@ function c60002011.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1000) e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
-- function cm.extra5(c)
if Duel.GetFlagEffect(tp,60002011)>=5 then
--
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60002011,4)) e2:SetDescription(aux.Stringid(m,4))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetCode(60002011) e2:SetCode(m)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2) 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
--时光酒桌 乾月 --时光酒桌 乾月
function c60002012.initial_effect(c) local m=60002012
--set local cm=_G["c"..m]
local e1=Effect.CreateEffect(c) if not pcall(function() require("expansions/script/c60002009") end) then require("script/c60002009") end
e1:SetDescription(aux.Stringid(60002012,0)) function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) local e1=timeTable.set(c,m,cm.extraMove)
e1:SetRange(LOCATION_HAND) local e2=timeTable.spsummon(c,m,cm.extra3,cm.extra5)
e1:SetCountLimit(1,60002012) timeTable.globle(c)
e1:SetCondition(c60002012.stcon1) end
e1:SetCost(c60002012.stcost) --e1
e1:SetTarget(c60002012.sttg) function cm.rmfil(c)
e1:SetOperation(c60002012.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(c60002012.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,60002012)
e2:SetCondition(c60002012.spcon)
e2:SetTarget(c60002012.sptg)
e2:SetOperation(c60002012.spop)
c:RegisterEffect(e2)
if not c60002012.global_check then
c60002012.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCondition(c60002012.checkcon)
ge1:SetOperation(c60002012.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c60002012.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 c60002012.checkop(e,tp,eg,ep,ev,re,r,rp)
local p=re:GetHandlerPlayer()
Duel.RegisterFlagEffect(p,60002012,RESET_PHASE+PHASE_END,0,1)
end
function c60002012.stcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,60002024)
end
function c60002012.stcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,60002024)
end
function c60002012.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c60002012.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c60002012.rmfil(c)
return c:IsSetCard(0x629) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() return c:IsSetCard(0x629) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end end
function c60002012.stop(e,tp,eg,ep,ev,re,r,rp) function cm.extraMove(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) then if Duel.IsExistingMatchingCard(cm.rmfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) 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(c60002012.gtcost)
e1:SetTarget(c60002012.gttg)
e1:SetOperation(c60002012.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.IsExistingMatchingCard(c60002012.rmfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(60002012,0)) then
Duel.BreakEffect() Duel.BreakEffect()
local tc=Duel.SelectMatchingCard(tp,c60002012.rmfil,tp,LOCATION_DECK,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.rmfil,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c60002012.gctfil(c)
return c:IsAbleToGraveAsCost() and c:IsFacedown()
end end
function c60002012.gtcost(e,tp,eg,ep,ev,re,r,rp,chk) --e2
if chk==0 then return true end function cm.extra3(c)
Duel.ChangePosition(e:GetHandler(),POS_FACEUP)
end
function c60002012.gckfil1(c,tp)
return c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE)
end
function c60002012.gckfil2(c,tp)
return c:IsControler(1-tp) and c:IsLocation(LOCATION_SZONE)
end
function c60002012.gck(g,tp)
if Duel.IsPlayerAffectedByEffect(tp,20002024) then
return g:FilterCount(c60002012.gckfil1,nil,tp)<=1 and g:FilterCount(c60002012.gckfil2,nil,tp)<=1
elseif Duel.IsPlayerAffectedByEffect(tp,10002024) then
return not g:IsExists(c60002012.gckfil1,1,nil,tp) and g:FilterCount(c60002012.gckfil2,nil,tp)<=1
else
return not g:IsExists(Card.IsControler,1,nil,tp)
end
end
function c60002012.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(c60002012.gctfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if chk==0 then return g:CheckSubGroup(c60002012.gck,x,3,tp) and Duel.IsExistingMatchingCard(c60002012.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(c60002012.chainlm)
end
end
function c60002012.chainlm(e,rp,tp)
return e:GetHandler():IsType(TYPE_COUNTER)
end
function c60002012.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 c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60002012.gctfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if not g:CheckSubGroup(c60002012.gck,x,3,tp) then return end
local sg=g:SelectSubGroup(tp,c60002012.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(c60002012.immval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local g=Duel.SelectMatchingCard(tp,c60002012.rmfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c60002012.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 c60002012.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x629)
end
function c60002012.tgfil(c)
return c:IsLevel(9) and c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0
end
function c60002012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002012.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 c60002012.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60002012.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,60002012)>=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002012,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(c60002012.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(c60002012.xactlimit)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
end
--
if Duel.GetFlagEffect(tp,60002012)>=3 then
--indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002012,3)) e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
...@@ -223,33 +33,19 @@ function c60002012.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -223,33 +33,19 @@ function c60002012.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
-- function cm.extra5(c)
if Duel.GetFlagEffect(tp,60002012)>=5 then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60002012,4)) e2:SetDescription(aux.Stringid(m,4))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_DAMAGE) e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetValue(c60002012.val) e2:SetValue(cm.val)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end
end
end
end
function c60002012.xsplimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function c60002012.xactlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x629)
end end
function c60002012.val(e,re,dam,r,rp,rc) function cm.val(e,re,dam,r,rp,rc)
return math.floor(dam/12) return math.floor(dam/12)
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.
--时光酒桌 意识 --时光酒桌 意识
function c60002021.initial_effect(c) local m=60002021
--Activate 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) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002021,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60002021+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c60002021.accon) e1:SetCondition(timeTable.actionCon)
e1:SetTarget(c60002021.actg) e1:SetTarget(cm.actg)
e1:SetOperation(c60002021.acop) e1:SetOperation(cm.acop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--xx timeTable.spell(c,cm.extra3,cm.extra5)
local e2=Effect.CreateEffect(c) timeTable.globle(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 end
function c60002021.accon(e,tp,eg,ep,ev,re,r,rp) --e1
return not Duel.IsExistingMatchingCard(c60002021.cfilter,tp,LOCATION_MZONE,0,1,nil) function cm.chlimit(e,ep,tp)
return tp==ep
end end
function c60002021.actg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.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
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local x=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) 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,x,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),tp,LOCATION_HAND)
if Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,0,nil):GetCount()>=3 then if Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,0,nil):GetCount()>=3 then
Duel.SetChainLimit(c60002021.chlimit) Duel.SetChainLimit(cm.chlimit)
end end
end end
function c60002021.chlimit(e,ep,tp) function cm.ckfil(c)
return tp==ep
end
function c60002021.ckfil(c)
return c:IsSetCard(0x629) or (c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER)) return c:IsSetCard(0x629) or (c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER))
end 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) return c:IsSSetable() and c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER)
end 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 c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local x=g:FilterCount(c60002021.ckfil,nil) local x=g:FilterCount(cm.ckfil,nil)
if x>=0 then if x>=0 then
Duel.Draw(tp,x,REASON_EFFECT) Duel.Draw(tp,x,REASON_EFFECT)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -79,7 +52,7 @@ function c60002021.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +52,7 @@ function c60002021.acop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetValue(c60002021.aclimit) e1:SetValue(cm.aclimit)
e1:SetLabel(code) e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
...@@ -89,62 +62,22 @@ function c60002021.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,62 +62,22 @@ function c60002021.acop(e,tp,eg,ep,ev,re,r,rp)
if x>=2 then if x>=2 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
if x>=4 and g:IsExists(c60002021.ssfil,1,nil) then if x>=4 and g:IsExists(cm.ssfil,1,nil) then
local sc=g:FilterSelect(tp,c60002021.ssfil,1,1,nil):GetFirst() local sc=g:FilterSelect(tp,cm.ssfil,1,1,nil):GetFirst()
Duel.SSet(tp,sc) Duel.SSet(tp,sc)
end end
end end
function c60002021.aclimit(e,re,tp) --e2
return re:GetHandler():IsCode(e:GetLabel()) function cm.extra3(e,tp)
end local g=Duel.GetMatchingGroup(cm.setfilter,tp,LOCATION_HAND,0,nil)
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)
local ct=math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),g:GetCount()) local ct=math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),g:GetCount())
if x>=3 and ct>0 then if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,ct,nil) local sg=g:Select(tp,1,ct,nil)
Duel.SSet(tp,sg) Duel.SSet(tp,sg)
--
local tc=sg:GetFirst() local tc=sg:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
...@@ -153,20 +86,22 @@ function c60002021.xxop(e,tp,eg,ep,ev,re,r,rp) ...@@ -153,20 +86,22 @@ function c60002021.xxop(e,tp,eg,ep,ev,re,r,rp)
tc=sg:GetNext() tc=sg:GetNext()
end end
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 end
local g1=Duel.SelectMatchingCard(tp,c60002021.thfil1,tp,LOCATION_DECK,0,1,1,nil) function cm.extra5(e,tp)
local g2=Duel.SelectMatchingCard(tp,c60002021.thfil2,tp,LOCATION_DECK,0,1,1,nil) 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) g1:Merge(g2)
Duel.SendtoHand(g1,tp,REASON_EFFECT) Duel.SendtoHand(g1,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1) Duel.ConfirmCards(1-tp,g1)
end end
end end
function c60002021.xsplimit(e,c) function cm.setfilter(c)
return c:IsLocation(LOCATION_EXTRA) return c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER) and c:IsSSetable()
end
function cm.thfil1(c)
return c:IsSetCard(0x629) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c60002021.xactlimit(e,re,tp) function cm.thfil2(c)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x629) return c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER) and c:IsAbleToHand()
end end
\ No newline at end of file
This diff is collapsed.
--时光酒桌 刹那 --时光酒桌 刹那
function c60002023.initial_effect(c) local m=60002023
--Activate 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) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60002023,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60002023+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c60002023.accon) e1:SetCondition(timeTable.actionCon)
e1:SetCost(c60002023.accost) e1:SetCost(cm.accost)
e1:SetTarget(c60002023.actg) e1:SetTarget(cm.actg)
e1:SetOperation(c60002023.acop) e1:SetOperation(cm.acop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--xx timeTable.spell(c,cm.extra3,cm.extra5)
local e2=Effect.CreateEffect(c) timeTable.globle(c)
e2:SetDescription(aux.Stringid(60002023,2)) end
e2:SetType(EFFECT_TYPE_QUICK_O) --e1
e2:SetCode(EVENT_FREE_CHAIN) function cm.accost(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetRange(LOCATION_HAND) local rc=Duel.GetMatchingGroupCount(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
e2:SetCountLimit(1) local rh=Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
e2:SetCost(c60002023.xxcost) local count=math.min(rc,rh)
e2:SetTarget(c60002023.xxtg) if chk==0 then return count>0 end
e2:SetOperation(c60002023.xxop) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,count,nil)
c:RegisterEffect(e2) local count=Duel.Remove(g,POS_FACEUP,REASON_COST)
if not c60002023.global_check then e:SetLabel(count)
c60002023.global_check=true end
local ge1=Effect.CreateEffect(c) function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCondition(c60002023.checkcon)
ge1:SetOperation(c60002023.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c60002023.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 c60002023.checkop(e,tp,eg,ep,ev,re,r,rp)
local p=re:GetHandlerPlayer()
Duel.RegisterFlagEffect(p,60002023,RESET_PHASE+PHASE_END,0,1)
end
function c60002023.accon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c60002023.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c60002023.accost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,99,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetCount())
end
function c60002023.actg(e,tp,eg,ep,ev,re,r,rp,chk)
local x=e:GetLabel()
if chk==0 then return true end if chk==0 then return true end
if Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,0,nil):GetCount()>=3 then if Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,0,nil):GetCount()>=3 then
Duel.SetChainLimit(c60002023.chlimit) Duel.SetChainLimit(cm.chlimit)
end end
end end
function c60002023.chlimit(e,ep,tp) function cm.chlimit(e,ep,tp)
return tp==ep return tp==ep
end end
function c60002023.acop(e,tp,eg,ep,ev,re,r,rp) function cm.aclimit(e,re,tp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local x=e:GetLabel() local x=e:GetLabel()
if Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,x,nil) then if Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,x,nil) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,x,x,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,x,x,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
--
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
...@@ -82,7 +60,7 @@ function c60002023.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +60,7 @@ function c60002023.acop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetValue(c60002023.aclimit) e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if x>=2 and Duel.IsPlayerCanDraw(tp,1) then if x>=2 and Duel.IsPlayerCanDraw(tp,1) then
...@@ -104,116 +82,34 @@ function c60002023.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,116 +82,34 @@ function c60002023.acop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c60002023.aclimit(e,re,tp) --e2
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) function cm.thfil(c)
end
function c60002023.xxcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c60002023.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c60002023.thfil(c)
return c:IsAbleToHand() and (c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER)) return c:IsAbleToHand() and (c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER))
end end
function c60002023.xxop(e,tp,eg,ep,ev,re,r,rp) function cm.extra3(e,tp)
local c=e:GetHandler() if Duel.IsExistingMatchingCard(cm.thfil,tp,LOCATION_GRAVE,0,1,nil) then
local x=Duel.GetFlagEffect(tp,60002023) local sg=Duel.SelectMatchingCard(tp,cm.thfil,tp,LOCATION_GRAVE,0,1,1,nil)
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(c60002023.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(c60002023.xactlimit)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
if x>=3 and Duel.IsExistingMatchingCard(c60002023.thfil,tp,LOCATION_GRAVE,0,1,nil) then
local sg=Duel.SelectMatchingCard(tp,c60002023.thfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT) Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
if x>=5 then end
function cm.extra5(e,tp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE) e1:SetCode(EFFECT_CANNOT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,0) e1:SetTargetRange(1,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x629)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x629))
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT) e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetValue(c60002023.dxefil) e2:SetValue(cm.dxefil)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end
end
function c60002023.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:GetHandler():IsControler(e:GetOwnerPlayer()) and te:GetHandler():IsSetCard(0x629)
end
function c60002023.gctfil(c)
return c:IsAbleToGraveAsCost() and c:IsFacedown()
end
function c60002023.gtcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002023.gctfil,tp,LOCATION_ONFIELD,0,3,e:GetHandler()) end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP)
local g=Duel.SelectMatchingCard(tp,c60002023.gctfil,tp,LOCATION_ONFIELD,0,3,3,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c60002023.rmfil(c)
return c:IsSetCard(0x629) and c:IsAbleToRemove()
end
function c60002023.gttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60002023.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(c60002023.chainlm)
end
end
function c60002023.chainlm(e,rp,tp)
return e:GetHandler():IsType(TYPE_COUNTER)
end
function c60002023.gtop(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,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(c60002023.immval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local g=Duel.SelectMatchingCard(tp,c60002023.rmfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c60002023.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 c60002023.xsplimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end end
function c60002023.xactlimit(e,re,tp) function cm.dxefil(e,ct)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x629) local p=e:GetHandler():GetControler()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:GetHandler():IsSetCard(0x629)
end end
\ No newline at end of file
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