Commit aac196fa authored by POLYMER's avatar POLYMER

fix

parent 761da510
No preview for this file type
...@@ -145,6 +145,14 @@ end ...@@ -145,6 +145,14 @@ end
function cm.etofilter(c) function cm.etofilter(c)
return c:IsPreviousLocation(LOCATION_EXTRA) and c:IsOnField() return c:IsPreviousLocation(LOCATION_EXTRA) and c:IsOnField()
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp) function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.etofilter,nil) local g=eg:Filter(cm.etofilter,nil)
g:ForEach(Card.RegisterFlagEffect,m-2,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1) g:ForEach(Card.RegisterFlagEffect,m-2,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1)
......
...@@ -150,6 +150,14 @@ end ...@@ -150,6 +150,14 @@ end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp) function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) return re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp) function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local g1=eg:Filter(cm.filter,nil,tp) local g1=eg:Filter(cm.filter,nil,tp)
local g2=eg:Filter(cm.filter,nil,1-tp) local g2=eg:Filter(cm.filter,nil,1-tp)
......
...@@ -91,6 +91,14 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -91,6 +91,14 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_HAND)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_REMOVED,0,1,nil) then return end if not Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_REMOVED,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
...@@ -109,9 +117,9 @@ end ...@@ -109,9 +117,9 @@ end
function cm.grtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.grtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove(tp,POS_FACEDOWN) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove(tp,POS_FACEDOWN) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil,tp,POS_FACEDOWN) and c:IsAbleToRemove(tp,POS_FACEDOWN) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,c,tp,POS_FACEDOWN) and c:IsAbleToRemove(tp,POS_FACEDOWN) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil,tp,POS_FACEDOWN) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,c,tp,POS_FACEDOWN)
g:AddCard(c) g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
......
...@@ -99,6 +99,14 @@ function cm.ertg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -99,6 +99,14 @@ function cm.ertg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,e:GetLabel(),1-tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,e:GetLabel(),1-tp,LOCATION_EXTRA)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.erop(e,tp,eg,ep,ev,re,r,rp) function cm.erop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter4,tp,0,LOCATION_EXTRA,nil,tp) local g=Duel.GetMatchingGroup(cm.filter4,tp,0,LOCATION_EXTRA,nil,tp)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
......
--革命爆发 --革命爆发
local m=11451449 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,99518961) aux.AddCodeList(c,99518961)
--activate --activate
...@@ -61,6 +60,14 @@ function cm.damval(e,re,val,r,rp) ...@@ -61,6 +60,14 @@ function cm.damval(e,re,val,r,rp)
if r&REASON_EFFECT==REASON_EFFECT and re and re:GetHandler():IsCode(99518961) and rp and rp==e:GetHandlerPlayer() then return val*2 end if r&REASON_EFFECT==REASON_EFFECT and re and re:GetHandler():IsCode(99518961) and rp and rp==e:GetHandlerPlayer() then return val*2 end
return val return val
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,nil,e,eg) local g=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,nil,e,eg)
......
...@@ -92,6 +92,14 @@ function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -92,6 +92,14 @@ function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
......
...@@ -29,6 +29,14 @@ function cm.callback(c,rp) ...@@ -29,6 +29,14 @@ function cm.callback(c,rp)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
end end
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
eg:ForEach(cm.callback,rp) eg:ForEach(cm.callback,rp)
end end
......
...@@ -41,6 +41,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,6 +41,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ft1=math.min(5,Duel.GetLocationCount(tp,LOCATION_MZONE)) local ft1=math.min(5,Duel.GetLocationCount(tp,LOCATION_MZONE))
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft1=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft1=1 end
......
...@@ -86,6 +86,14 @@ end ...@@ -86,6 +86,14 @@ end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local ct=math.max(1,e:GetLabel()) local ct=math.max(1,e:GetLabel())
......
...@@ -137,6 +137,14 @@ end ...@@ -137,6 +137,14 @@ end
function cm.filter2(c,re,tp,r) function cm.filter2(c,re,tp,r)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsReason(REASON_RELEASE) and bit.band(r,REASON_COST)~=0 and re and aux.GetValueType(re)=="Effect" and re:IsActivated() and re:GetHandler()==c and re:GetHandlerPlayer()==tp return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsReason(REASON_RELEASE) and bit.band(r,REASON_COST)~=0 and re and aux.GetValueType(re)=="Effect" and re:IsActivated() and re:GetHandler()==c and re:GetHandlerPlayer()==tp
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.filter2,1,nil,re,tp,r) end if chk==0 then return eg:IsExists(cm.filter2,1,nil,re,tp,r) end
......
--空想世界的连理樱 --空想世界的连理樱
--21.06.23 --21.06.23
local m=11451582 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -42,6 +41,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,6 +41,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,eg) end if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,eg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,eg) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,eg)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
e10:SetOperation(function(e,tp,...) e10:SetOperation(function(e,tp,...)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
Duel.RegisterFlagEffect(tp,11451631,RESET_PHASE+ph,0,1) Duel.RegisterFlagEffect(tp,11451631,RESET_PHASE+ph,0,1)
op(e,tp,...) op(e,tp,...)
end) end)
--spsummon condition --spsummon condition
...@@ -38,6 +38,13 @@ function cm.initial_effect(c) ...@@ -38,6 +38,13 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(m) e2:SetCode(m)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(cm.efop)
c:RegisterEffect(e3)
end end
function cm.tdcfop(c) function cm.tdcfop(c)
return function(g) return function(g)
...@@ -66,4 +73,30 @@ function cm.splimit(e,se,sp,st) ...@@ -66,4 +73,30 @@ function cm.splimit(e,se,sp,st)
end end
function cm.cfop(e,tp,eg,ep,ev,re,r,rp) function cm.cfop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(r,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(r,0)) e:GetHandler():RegisterFlagEffect(r,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(r,0))
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(function(c) return c:IsCode(11451631) and c:GetOriginalCode()~=11451631 and c:GetFlagEffect(m)==0 end,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
for tc in aux.Next(g) do
local cid=tc:CopyEffect(11451631,RESET_EVENT+RESETS_STANDARD,1)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,cid)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_ADJUST)
e3:SetLabel(cid)
e3:SetCondition(cm.regcon)
e3:SetOperation(cm.regop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsHasEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,m)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
c:ResetEffect(cid,RESET_COPY)
c:ResetFlagEffect(m)
end end
\ No newline at end of file
...@@ -209,6 +209,14 @@ function cm.retop3(e,tp,eg,ep,ev,re,r,rp) ...@@ -209,6 +209,14 @@ function cm.retop3(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject()) Duel.ReturnToField(e:GetLabelObject())
e:Reset() e:Reset()
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab) function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
local c=e:GetHandler() local c=e:GetHandler()
local ct=lab//3 local ct=lab//3
......
...@@ -248,6 +248,14 @@ function cm.imfilter(c) ...@@ -248,6 +248,14 @@ function cm.imfilter(c)
end end
return false return false
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ig=g:Filter(cm.imfilter,nil) local ig=g:Filter(cm.imfilter,nil)
......
...@@ -69,6 +69,14 @@ end ...@@ -69,6 +69,14 @@ end
function cm.rfilter(c) function cm.rfilter(c)
return c:GetFlagEffect(11451771)>0 return c:GetFlagEffect(11451771)>0
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end
......
...@@ -90,6 +90,14 @@ end ...@@ -90,6 +90,14 @@ end
function cm.rfilter(c) function cm.rfilter(c)
return c:GetFlagEffect(11451771)>0 return c:GetFlagEffect(11451771)>0
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end
......
...@@ -61,6 +61,14 @@ end ...@@ -61,6 +61,14 @@ end
function cm.rfilter(c) function cm.rfilter(c)
return c:GetFlagEffect(11451771)>0 return c:GetFlagEffect(11451771)>0
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end
......
...@@ -80,6 +80,14 @@ end ...@@ -80,6 +80,14 @@ end
function cm.rfilter(c) function cm.rfilter(c)
return c:GetFlagEffect(11451771)>0 return c:GetFlagEffect(11451771)>0
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end
......
...@@ -69,6 +69,14 @@ end ...@@ -69,6 +69,14 @@ end
function cm.rfilter(c) function cm.rfilter(c)
return c:GetFlagEffect(11451771)>0 return c:GetFlagEffect(11451771)>0
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end
......
...@@ -80,6 +80,14 @@ end ...@@ -80,6 +80,14 @@ end
function cm.rfilter(c) function cm.rfilter(c)
return c:GetFlagEffect(11451771)>0 return c:GetFlagEffect(11451771)>0
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end
......
...@@ -74,6 +74,14 @@ end ...@@ -74,6 +74,14 @@ end
function cm.rfilter(c) function cm.rfilter(c)
return c:GetFlagEffect(11451771)>0 return c:GetFlagEffect(11451771)>0
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end
......
...@@ -81,6 +81,14 @@ end ...@@ -81,6 +81,14 @@ end
function cm.rfilter(c) function cm.rfilter(c)
return c:GetFlagEffect(11451771)>0 return c:GetFlagEffect(11451771)>0
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end if phase>=PHASE_BATTLE_START and phase<=PHASE_BATTLE then return end
......
...@@ -125,6 +125,14 @@ end ...@@ -125,6 +125,14 @@ end
function cm.extfilter(c) function cm.extfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost() return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost()
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp) function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local te=e:GetLabelObject() local te=e:GetLabelObject()
......
...@@ -130,6 +130,14 @@ end ...@@ -130,6 +130,14 @@ end
function cm.extfilter(c) function cm.extfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost() return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost()
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp) function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local te=e:GetLabelObject() local te=e:GetLabelObject()
......
...@@ -130,6 +130,14 @@ end ...@@ -130,6 +130,14 @@ end
function cm.extfilter(c) function cm.extfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost() return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost()
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp) function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local te=e:GetLabelObject() local te=e:GetLabelObject()
......
...@@ -171,6 +171,14 @@ end ...@@ -171,6 +171,14 @@ end
function cm.extfilter(c) function cm.extfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost() return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost()
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp) function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local te=e:GetLabelObject() local te=e:GetLabelObject()
......
...@@ -22,6 +22,14 @@ end ...@@ -22,6 +22,14 @@ end
function cm.kfilter(c) function cm.kfilter(c)
return c:IsFaceup() and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA) return c:IsFaceup() and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,c) end if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,c) end
......
...@@ -154,6 +154,14 @@ end ...@@ -154,6 +154,14 @@ end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.leave(e,tp,eg,ep,ev,re,r,rp) function cm.leave(e,tp,eg,ep,ev,re,r,rp)
local b1=r&REASON_SUMMON>0 or (re and (re:GetCode()==EFFECT_SUMMON_PROC or re:GetCode()==EFFECT_SUMMON_COST or re:GetCode()==EVENT_SUMMON)) or Duel.CheckEvent(EVENT_SUMMON) local b1=r&REASON_SUMMON>0 or (re and (re:GetCode()==EFFECT_SUMMON_PROC or re:GetCode()==EFFECT_SUMMON_COST or re:GetCode()==EVENT_SUMMON)) or Duel.CheckEvent(EVENT_SUMMON)
local b2=re and (re:GetCode()==EFFECT_SET_PROC or re:GetCode()==EFFECT_MSET_COST) local b2=re and (re:GetCode()==EFFECT_SET_PROC or re:GetCode()==EFFECT_MSET_COST)
......
...@@ -31,6 +31,14 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,6 +31,14 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetParam(ac) Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0) Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,LOCATION_DECK,nil,ac) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,LOCATION_DECK,nil,ac)
......
...@@ -175,6 +175,14 @@ end ...@@ -175,6 +175,14 @@ end
function cm.filter1(c,fid) function cm.filter1(c,fid)
return c:GetFlagEffect(m)>0 and c:GetFlagEffectLabel(m)==fid return c:GetFlagEffect(m)>0 and c:GetFlagEffectLabel(m)==fid
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp) function cm.acop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end if pnfl_adjusting then return end
pnfl_adjusting=true pnfl_adjusting=true
......
...@@ -266,6 +266,14 @@ function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -266,6 +266,14 @@ function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ag=ng:Filter(Card.IsCanBeEffectTarget,e) local ag=ng:Filter(Card.IsCanBeEffectTarget,e)
if #ag>0 then Duel.SetTargetCard(ag) end if #ag>0 then Duel.SetTargetCard(ag) end
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp) function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......
...@@ -98,6 +98,14 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -98,6 +98,14 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
Duel.SelectTarget(tp,cm.tgfilter,tp,0x3c,0x3c,1,1,c,e) Duel.SelectTarget(tp,cm.tgfilter,tp,0x3c,0x3c,1,1,c,e)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0):Filter(cm.seqfilter,nil) local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0):Filter(cm.seqfilter,nil)
if #g<3 or g:FilterCount(Card.IsFacedown,nil)==0 then return end if #g<3 or g:FilterCount(Card.IsFacedown,nil)==0 then return end
......
...@@ -246,6 +246,14 @@ function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -246,6 +246,14 @@ function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if #ag>0 then Duel.SetTargetCard(ag) end if #ag>0 then Duel.SetTargetCard(ag) end
end end
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp) function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......
...@@ -93,6 +93,14 @@ function cm.acfilter(c,tp) ...@@ -93,6 +93,14 @@ function cm.acfilter(c,tp)
local code,code2=c:GetCode() local code,code2=c:GetCode()
return c:IsSetCard(0xc976) and c:IsAbleToGraveAsCost() and Duel.GetFlagEffect(0,m+code+0xffffff)==0 and (not code2 or Duel.GetFlagEffect(0,m+code2+0xffffff)==0) --and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,c:GetCode()) return c:IsSetCard(0xc976) and c:IsAbleToGraveAsCost() and Duel.GetFlagEffect(0,m+code+0xffffff)==0 and (not code2 or Duel.GetFlagEffect(0,m+code2+0xffffff)==0) --and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,c:GetCode())
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp) function cm.acop(e,tp,eg,ep,ev,re,r,rp)
if cm[0] then return end if cm[0] then return end
if e:GetHandler():GetFlagEffect(m)>0 then return end if e:GetHandler():GetFlagEffect(m)>0 then return end
......
--铳影-殷妮
local s,id,o=GetID()
function c12825601.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(1109)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c12825601.thcost)
e1:SetTarget(c12825601.thtg)
e1:SetOperation(c12825601.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,12825601)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c12825601.spcost)
e2:SetTarget(c12825601.sptg)
e2:SetOperation(c12825601.spop)
c:RegisterEffect(e2)
end
function c12825601.cfilter(c,tp)
return c:IsSetCard(0x4a71) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
and Duel.IsExistingMatchingCard(c12825601.thfilter,tp,LOCATION_DECK,0,1,nil,c)
end
function c12825601.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,12825601)==0
and Duel.IsExistingMatchingCard(c12825601.cfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.RegisterFlagEffect(tp,12825601,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c12825601.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
e:SetLabelObject(g:GetFirst())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c12825601.thfilter(c,mc)
return c:IsType(TYPE_QUICKPLAY) and aux.IsCodeListed(c,mc:GetCode()) and c:IsAbleToHand()
end
function c12825601.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12825601.thop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12825601.thfilter,tp,LOCATION_DECK,0,1,1,nil,rc)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c12825601.rcfilter(c,e,tp)
return c:IsSetCard(0x4a71) and c:IsType(TYPE_QUICKPLAY) and not c:IsCode(12825610,12825611)
and Duel.IsExistingMatchingCard(c12825601.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c12825601.spfilter(c,e,tp,mc)
return c:IsType(TYPE_MONSTER) and aux.IsCodeListed(mc,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12825601.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable()
and Duel.IsExistingMatchingCard(c12825601.rcfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c12825601.rcfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
g:AddCard(e:GetHandler())
Duel.Release(g,REASON_COST)
end
function c12825601.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_EXTRA)
end
function c12825601.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local rc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12825601.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rc)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--铳影-朴景丽
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825602.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c)
chiki.c4a71kang(c,c12825602.discon,c12825602.distg,c12825602.disop,CATEGORY_NEGATE,12825602,1131,12825607)
end
function c12825602.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(12825612)>0
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c12825602.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c12825602.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--铳影-唐莹
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825603.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c)
chiki.c4a71kang(c,nil,c12825603.rmtg,c12825603.rmop,CATEGORY_REMOVE,12825603,1102,12825608)
end
function c12825603.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToRemove() and not rc:IsLocation(LOCATION_REMOVED) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,0,0)
end
function c12825603.rmop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) then
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--铳影-王昕研
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825604.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c,c12825604.tgtg,c12825604.tgop,CATEGORY_TOGRAVE)
chiki.c4a71kang2(c,nil,c12825604.settg,c12825604.setop,nil,12825604,1109,12825609)
end
function c12825604.filter(c)
return c:IsSetCard(0x4a71) and c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
end
function c12825604.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825604.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c12825604.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c12825604.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c12825604.tgfilter(c)
return c:IsSetCard(0x4a71) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c12825604.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825604.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c12825604.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12825604.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--铳影-浅仓绘里
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825605.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c,c12825605.tgtg,c12825605.tgop,CATEGORY_TOGRAVE)
chiki.c4a71kang2(c,nil,c12825605.destg,c12825605.desop,CATEGORY_DESTROY,12825605,1101,12825610)
end
function c12825605.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c12825605.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
function c12825605.tgfilter(c)
return c:IsSetCard(0x4a71) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c12825605.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825605.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c12825605.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12825605.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--铳影-安娜
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825606.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
chiki.c4a71tohand(c,c12825606.target,c12825606.activate)
chiki.c4a71kang2(c,nil,c12825606.hdtg,c12825606.hdop,CATEGORY_REMOVE,12825606,1106,12825611)
end
function c12825606.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function c12825606.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function c12825606.filter(c)
return c:IsSetCard(0x4a71) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c12825606.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825606.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12825606.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12825606.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--铳影-行动代号一
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825607.initial_effect(c)
aux.AddCodeList(c,12825602)
chiki.c4a71rankup(c,c12825607.filter1,c12825607.filter2,12825607)
chiki.chikiav(c,EFFECT_FLAG_CARD_TARGET,nil,c12825607.effcon,c12825607.target,c12825607.operation,CATEGORY_DISABLE,12825607,1131)
end
function c12825607.filter1(c)
return c:GetOverlayCount()>1 and c:IsSetCard(0x4a71) and not c:IsCode(12825602)
end
function c12825607.filter2(c)
return c:IsCode(12825602)
end
function c12825607.cfilter(c)
return c:IsFaceup() and c:IsCode(12825602)
end
function c12825607.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825607.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825607.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c12825607.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--铳影-行动代号二
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825608.initial_effect(c)
aux.AddCodeList(c,12825603)
chiki.c4a71rankup(c,c12825608.filter1,c12825608.filter2,12825608)
chiki.chikiav(c,EFFECT_FLAG_CARD_TARGET,nil,c12825608.effcon,c12825608.target,c12825608.operation,CATEGORY_REMOVE,12825608,1102)
end
function c12825608.filter1(c)
return c:IsSetCard(0x4a71) and not c:IsCode(12825603)
end
function c12825608.filter2(c)
return c:IsCode(12825603)
end
function c12825608.cfilter(c)
return c:IsFaceup() and c:IsCode(12825603)
end
function c12825608.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825608.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825608.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
end
function c12825608.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--铳影-行动代号三
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825609.initial_effect(c)
aux.AddCodeList(c,12825604)
chiki.c4a71rankup(c,c12825609.filter1,c12825609.filter2,12825609)
chiki.chikiav(c,nil,nil,c12825609.effcon,c12825609.target,c12825609.operation,nil,12825609,1102)
end
function c12825609.filter1(c)
return c:IsSetCard(0x4a71) and not c:IsCode(12825604)
end
function c12825609.filter2(c)
return c:IsCode(12825604)
end
function c12825609.cfilter(c)
return c:IsFaceup() and c:IsCode(12825604)
end
function c12825609.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825609.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825609.setfilter(c)
return c:IsSetCard(0x4a71) and c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
end
function c12825609.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825609.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function c12825609.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c12825609.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
\ No newline at end of file
--铳影-行动代号四
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825610.initial_effect(c)
aux.AddCodeList(c,12825605)
chiki.c4a71rankup(c,c12825610.filter1,c12825610.filter2,12825610)
chiki.chikiav(c,nil,nil,c12825610.effcon,c12825610.target,c12825610.operation,CATEGORY_DESTROY,12825610,1101)
end
function c12825610.filter1(c)
return c:GetOverlayCount()>3 and c:IsSetCard(0x4a71) and not c:IsCode(12825605)
end
function c12825610.filter2(c)
return c:IsCode(12825605)
end
function c12825610.cfilter(c)
return c:IsFaceup() and c:IsCode(12825605)
end
function c12825610.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825610.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825610.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c12825610.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--铳影-行动代号五
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c12825611.initial_effect(c)
aux.AddCodeList(c,12825606)
chiki.c4a71rankup(c,c12825611.filter1,c12825611.filter2,12825611)
chiki.chikiav(c,LOCATION_GRAVE,nil,c12825611.effcon,c12825611.target,c12825611.operation,CATEGORY_DESTROY,12825611,1100)
end
function c12825611.filter1(c)
return c:GetOverlayCount()>1 and c:IsSetCard(0x4a71) and not c:IsCode(12825606)
end
function c12825611.filter2(c)
return c:IsCode(12825606)
end
function c12825611.cfilter(c)
return c:IsFaceup() and c:IsCode(12825606)
end
function c12825611.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c12825611.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
end
function c12825611.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c12825611.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c12825611.desfilter,tp,0,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(c12825611.desfilter,tp,0,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c12825611.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c12825611.desfilter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT)
end
--铳影-度假
function c12825612.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12825612+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c12825612.target)
e1:SetOperation(c12825612.activate)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_CHAINING)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c12825612.discon)
e2:SetOperation(c12825612.disop)
c:RegisterEffect(e2)
end
function c12825612.filter(c)
return c:IsSetCard(0x4a71) and c:IsAbleToHand()
end
function c12825612.tdfilter(c)
return not c:IsPublic()
end
function c12825612.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825612.tdfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c12825612.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12825612.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,c12825612.tdfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
if g1:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c12825612.filter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 and Duel.SendtoHand(g2,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g2)
Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function c12825612.discon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandler():IsSetCard(0x4a71) and te:IsActiveType(TYPE_MONSTER) and p==tp and rp==1-tp
end
function c12825612.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e2:SetValue(c12825612.efilter)
te:GetHandler():RegisterEffect(e2)
end
function c12825612.efilter(e,te)
return te:IsActivated() and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--铳影-蛇
function c12825613.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(2)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c12825613.spcon)
e1:SetTarget(c12825613.sptg)
e1:SetOperation(c12825613.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(1108)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,12825613)
e2:SetTarget(c12825613.drtg)
e2:SetOperation(c12825613.drop)
c:RegisterEffect(e2)
end
function c12825613.cfilter(c)
return c:IsSetCard(0x4a71) and c:IsFaceup()
end
function c12825613.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
or Duel.IsExistingMatchingCard(c12825613.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c12825613.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,12825613)==0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,1-tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.RegisterFlagEffect(tp,12825613,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c12825613.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,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c12825613.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c12825613.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function c12825613.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end
function c12825613.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 and c:GetOwner()~=e:GetHandlerPlayer() then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.GetControl(c,1-tp)
else
Duel.SendtoGrave(c,REASON_RULE)
end
end
end
function c12825613.xcf(e,c)
return c==e:GetHandler()
end
function c12825613.rettg(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--铳影-紧急行动
function c12825614.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c12825614.condition)
e1:SetTarget(c12825614.target)
e1:SetOperation(c12825614.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(1109)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,12825614)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12825614.thtg)
e2:SetOperation(c12825614.thop)
c:RegisterEffect(e2)
end
function c12825614.cfilter(c)
return c:IsFacedown() or not c:IsType(TYPE_XYZ)
end
function c12825614.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c12825614.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c12825614.filter(c,e,tp)
return c:IsSetCard(0x4a71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c12825614.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825614.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c12825614.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12825614.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c12825614.thfilter(c)
return c:IsSetCard(0x4a71) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand()
end
function c12825614.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12825614.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1)
end
function c12825614.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12825614.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g1:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(g1,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
...@@ -3,6 +3,15 @@ AD_Database=true ...@@ -3,6 +3,15 @@ AD_Database=true
SNNM=SNNM or {} SNNM=SNNM or {}
local cm=SNNM local cm=SNNM
--53702700 alleffectreset --53702700 alleffectreset
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
--
function cm.AllGlobalCheck(c) function cm.AllGlobalCheck(c)
if not cm.snnm_global_check then if not cm.snnm_global_check then
cm.snnm_global_check=true cm.snnm_global_check=true
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53703015 local m=53703015
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="布莱克星" cm.name="布莱克星"
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53705024 local m=53705024
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="幻海袭杀魄散" cm.name="幻海袭杀魄散"
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53727012 local m=53727012
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="电脑深域N 解址死装" cm.name="电脑深域N 解址死装"
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53750014 local m=53750014
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="异律次元秽魔导 瑞西塔" cm.name="异律次元秽魔导 瑞西塔"
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53752019 local m=53752019
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="莉莉·林德" cm.name="莉莉·林德"
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53754016 local m=53754016
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="异冽玉尘阁" cm.name="异冽玉尘阁"
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53754017 local m=53754017
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="大雪峡" cm.name="大雪峡"
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53756006 local m=53756006
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="指导教师 濑美奈" cm.name="指导教师 濑美奈"
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53796138 local m=53796138
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="规则守护者" cm.name="规则守护者"
...@@ -20,7 +22,7 @@ function cm.initial_effect(c) ...@@ -20,7 +22,7 @@ function cm.initial_effect(c)
cm[2]=Duel.MoveToField cm[2]=Duel.MoveToField
Duel.MoveToField=function(sc,...) Duel.MoveToField=function(sc,...)
local g=Duel.GetMatchingGroup(Card.IsHasEffect,0,LOCATION_EXTRA,LOCATION_EXTRA,nil,m) local g=Duel.GetMatchingGroup(Card.IsHasEffect,0,LOCATION_EXTRA,LOCATION_EXTRA,nil,m)
if #g>0 and sc:GetFlagEffect(m)>0 then if #g>0 and sc:GetFlagEffect(m)>0 and not sc:IsType(TYPE_TOKEN) then
local sg=g:RandomSelect(0,1) local sg=g:RandomSelect(0,1)
Duel.ConfirmCards(0,sg) Duel.ConfirmCards(0,sg)
Duel.ConfirmCards(1,sg) Duel.ConfirmCards(1,sg)
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local s,id=GetID() local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e0=aux.AddLinkProcedure(c,s.matfilter,1,1) local e0=aux.AddLinkProcedure(c,s.matfilter,1,1)
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,2,s.ovfilter,aux.Stringid(id,0)) aux.AddXyzProcedure(c,nil,4,2,s.ovfilter,aux.Stringid(id,0))
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53799156 local m=53799156
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="五等分的魔理沙" cm.name="五等分的魔理沙"
......
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
local m=53799216 local m=53799216
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="木毛的爱女 RI" cm.name="木毛的爱女 RI"
...@@ -46,8 +48,9 @@ function cm.initial_effect(c) ...@@ -46,8 +48,9 @@ function cm.initial_effect(c)
end end
Duel.SpecialSummon(sc,0,sumplayer,sumplayer,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,sumplayer,sumplayer,false,false,POS_FACEUP)
end end
cm[0](g,sumtype,sumplayer,...) local fin=cm[0](g,sumtype,sumplayer,...)
fing:ForEach(Card.ResetFlagEffect,m) fing:ForEach(Card.ResetFlagEffect,m)
return fin
end end
cm[1]=Duel.SpecialSummonStep cm[1]=Duel.SpecialSummonStep
Duel.SpecialSummonStep=function(targets,sumtype,sumplayer,...) Duel.SpecialSummonStep=function(targets,sumtype,sumplayer,...)
...@@ -63,10 +66,10 @@ function cm.initial_effect(c) ...@@ -63,10 +66,10 @@ function cm.initial_effect(c)
Duel.SpecialSummon(sc,0,sumplayer,sumplayer,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,sumplayer,sumplayer,false,false,POS_FACEUP)
tc=sc tc=sc
end end
cm[1](tc,sumtype,sumplayer,...) return cm[1](tc,sumtype,sumplayer,...)
end end
cm[2]=Duel.SynchroSummon cm[2]=Duel.SynchroSummon
Duel.SynchroSummon=function(p,c,tuner) Duel.SynchroSummon=function(p,c,tuner,...)
local sg=Duel.GetMatchingGroup(function(c)return c:IsHasEffect(m)end,p,LOCATION_PZONE,0,nil) local sg=Duel.GetMatchingGroup(function(c)return c:IsHasEffect(m)end,p,LOCATION_PZONE,0,nil)
if #sg>0 and Duel.SelectYesNo(p,aux.Stringid(m,0)) then if #sg>0 and Duel.SelectYesNo(p,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
...@@ -76,6 +79,7 @@ function cm.initial_effect(c) ...@@ -76,6 +79,7 @@ function cm.initial_effect(c)
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
Duel.SpecialSummon(sc,0,p,p,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,p,p,false,false,POS_FACEUP)
end end
return cm[2](p,c,tuner,...)
end end
cm[3]=Duel.XyzSummon cm[3]=Duel.XyzSummon
Duel.XyzSummon=function(p,c,...) Duel.XyzSummon=function(p,c,...)
...@@ -88,6 +92,7 @@ function cm.initial_effect(c) ...@@ -88,6 +92,7 @@ function cm.initial_effect(c)
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
Duel.SpecialSummon(sc,0,p,p,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,p,p,false,false,POS_FACEUP)
end end
return cm[3](p,c,...)
end end
cm[4]=Duel.LinkSummon cm[4]=Duel.LinkSummon
Duel.LinkSummon=function(p,c,...) Duel.LinkSummon=function(p,c,...)
...@@ -100,6 +105,7 @@ function cm.initial_effect(c) ...@@ -100,6 +105,7 @@ function cm.initial_effect(c)
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
Duel.SpecialSummon(sc,0,p,p,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,p,p,false,false,POS_FACEUP)
end end
return cm[4](p,c,...)
end end
end end
end end
......
...@@ -38,6 +38,14 @@ function QutryZyqw.RegisterMergedDelayedEvent(c,code,event,g) ...@@ -38,6 +38,14 @@ function QutryZyqw.RegisterMergedDelayedEvent(c,code,event,g)
ge4:SetOperation(QutryZyqw.MergedDelayEventCheck3) ge4:SetOperation(QutryZyqw.MergedDelayEventCheck3)
Duel.RegisterEffect(ge4,0) Duel.RegisterEffect(ge4,0)
end end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function QutryZyqw.MergedDelayEventCheck1(e,tp,eg,ep,ev,re,r,rp) function QutryZyqw.MergedDelayEventCheck1(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
g:Merge(eg) g:Merge(eg)
......
...@@ -85,5 +85,13 @@ function Auxiliary.PreloadUds() ...@@ -85,5 +85,13 @@ function Auxiliary.PreloadUds()
return (c:IsSSetable(true) and c:IsLocation(LOCATION_SZONE)) or ((_IsCanTurnSet(c) and not c:IsLocation(LOCATION_SZONE))) return (c:IsSSetable(true) and c:IsLocation(LOCATION_SZONE)) or ((_IsCanTurnSet(c) and not c:IsLocation(LOCATION_SZONE)))
end end
EFFECT_FLAG_CANNOT_NEGATE=EFFECT_FLAG_CANNOT_NEGATE or 0x200 EFFECT_FLAG_CANNOT_NEGATE=EFFECT_FLAG_CANNOT_NEGATE or 0x200
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
--require("script/procedure.lua") --require("script/procedure.lua")
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment