Commit 3e9b767a authored by 竹中千惠理's avatar 竹中千惠理

2024.7.4

parent ac05a606
No preview for this file type
pics/60010029.jpg

1.79 MB | W: | H:

pics/60010029.jpg

189 KB | W: | H:

pics/60010029.jpg
pics/60010029.jpg
pics/60010029.jpg
pics/60010029.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -14,6 +14,19 @@ function cm.initial_effect(c) ...@@ -14,6 +14,19 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.con1) e1:SetCondition(cm.con1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_DECK)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,0))
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
...@@ -43,6 +56,30 @@ function cm.initial_effect(c) ...@@ -43,6 +56,30 @@ function cm.initial_effect(c)
e5:SetOperation(cm.op5) e5:SetOperation(cm.op5)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function cm.spfilter(c)
return aux.IsCodeListed(c,m) and c:IsDiscardable()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,c)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_DISCARD)
end
--e0 --e0
function cm.op0(e,tp,eg,ep,ev,re,r,rp) function cm.op0(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFieldID()<=172 then return end if e:GetHandler():GetFieldID()<=172 then return end
...@@ -73,14 +110,14 @@ function cm.op3f1(c,mc) ...@@ -73,14 +110,14 @@ function cm.op3f1(c,mc)
return not aux.IsCodeListed(c,mc:GetCode()) return not aux.IsCodeListed(c,mc:GetCode())
end end
function cm.op3con1f(c,tp) function cm.op3con1f(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and (c:IsReason(REASON_COST) or c:IsReason(REASON_SUMMON+REASON_MATERIAL)) return c:IsPreviousControler(tp) and (c:IsReason(REASON_COST) or c:IsReason(REASON_SUMMON+REASON_MATERIAL))
end end
function cm.op3con1(e,tp,eg,ep,ev,re,r,rp) function cm.op3con1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.op3con1f,1,nil,tp) return eg:IsExists(cm.op3con1f,1,nil,tp)
end end
function cm.op3op1(e,tp,eg,ep,ev,re,r,rp) function cm.op3op1(e,tp,eg,ep,ev,re,r,rp)
if #eg-1<=0 then return end if #eg<=0 then return end
Duel.Draw(tp,#eg-1,REASON_EFFECT) Duel.Draw(tp,#eg,REASON_EFFECT)
end end
function cm.op3(e,tp,eg,ep,ev,re,r,rp) function cm.op3(e,tp,eg,ep,ev,re,r,rp)
local c,g=e:GetHandler(),Duel.GetFieldGroup(tp,LOCATION_DECK,0) local c,g=e:GetHandler(),Duel.GetFieldGroup(tp,LOCATION_DECK,0)
...@@ -93,6 +130,13 @@ function cm.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,6 +130,13 @@ function cm.op3(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(cm.op3con1) e1:SetCondition(cm.op3con1)
e1:SetOperation(cm.op3op1) e1:SetOperation(cm.op3op1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(8)
Duel.RegisterEffect(e1,tp)
end end
end end
--e5 --e5
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
local m=60002226 local m=60002226
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,60002223) for i=0,0xffff do
c:EnableCounterPermit(0x624,LOCATION_ONFIELD) c:EnableCounterPermit(i,LOCATION_ONFIELD)
c:EnableCounterPermit(0x625,LOCATION_ONFIELD) end
--race --race
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -13,6 +13,15 @@ function cm.initial_effect(c) ...@@ -13,6 +13,15 @@ function cm.initial_effect(c)
e1:SetRange(0xff) e1:SetRange(0xff)
e1:SetValue(0xfffffff) e1:SetValue(0xfffffff)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--att
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetRange(0xff)
e1:SetValue(0xff)
c:RegisterEffect(e1)
--爆能强化 --爆能强化
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,0))
...@@ -35,30 +44,79 @@ function cm.initial_effect(c) ...@@ -35,30 +44,79 @@ function cm.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2)) e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SUMMON) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c) --local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3)) --e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SUMMON) --e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) --e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) --e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.spcost) --e1:SetCost(cm.spcost)
e1:SetCondition(cm.spcon2) --e1:SetCondition(cm.spcon2)
e1:SetTarget(cm.sptg) --e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) --e1:SetOperation(cm.spop)
c:RegisterEffect(e1) --c:RegisterEffect(e1)
end end
if not cm.enable_all_setname then
cm.enable_all_setname=true
cm._is_set_card=Card.IsSetCard
Card.IsSetCard=function (c,...)
return c:IsOriginalCodeRule(m) or cm._is_set_card(c,...)
end
cm._is_link_set_card=Card.IsLinkSetCard
Card.IsLinkSetCard=function (c,...)
return c:IsOriginalCodeRule(m) or cm._is_link_set_card(c,...)
end
cm._is_fusion_set_card=Card.IsFusionSetCard
Card.IsFusionSetCard=function (c,...)
return c:IsOriginalCodeRule(m) or cm._is_fusion_set_card(c,...)
end
cm._is_previous_set_card=Card.IsPreviousSetCard
Card.IsPreviousSetCard=function (c,...)
return c:IsOriginalCodeRule(m) or cm._is_previous_set_card(c,...)
end
cm._is_original_set_card=Card.IsOriginalSetCard
Card.IsOriginalSetCard=function (c,...)
return c:IsOriginalCodeRule(m) or cm._is_original_set_card(c,...)
end
cm._is_code=Card.IsCode
Card.IsCode=function (c,...)
return c:IsOriginalCodeRule(m) or cm._is_code(c,...)
end
cm._is_link_code=Card.IsLinkCode
Card.IsLinkCode=function (c,...)
return c:IsOriginalCodeRule(m) or cm._is_link_code(c,...)
end
cm._is_fusion_code=Card.IsFusionCode
Card.IsFusionCode=function (c,...)
return c:IsOriginalCodeRule(m) or cm._is_fusion_code(c,...)
end
cm._is_original_code_rule=Card.IsOriginalCodeRule
Card.IsOriginalCodeRule=function (c,...)
return cm._is_original_code_rule(c,m,...)
end
cm._is_code_listed=aux.IsCodeListed
aux.IsCodeListed=function (c,code,...)
return c:IsOriginalCodeRule(m) or cm._is_code_listed(c,code,...)
end
end
function cm.con2(e,c,minc) function cm.con2(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc<=1 and Duel.CheckTribute(c,1) return minc<=1 and Duel.CheckTribute(c,1)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,c) function cm.op2(e,tp,eg,ep,ev,re,r,rp,c)
g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)) local g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE))
c:SetMaterial(g) c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
for tc in aux.Next(g) do for tc in aux.Next(g) do
...@@ -124,37 +182,51 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -124,37 +182,51 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return sg and sg:GetClassCount(Card.GetRace)>=2 return sg and sg:GetClassCount(Card.GetRace)>=2
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):Filter(Card.IsFaceup,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,g) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,0,0,0)
end end
function cm.thfilter(c,e,tp) function cm.thfilter(c,g)
return c:IsSetCard(0x6a9) local sg=g
sg:AddCard(c)
if sg:GetClassCount(Card.GetRace)==#sg and sg:GetClassCount(Card.GetAttribute)==#sg then
return true
else
return false
end
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):Filter(Card.IsFaceup,nil)
local ag=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil,g)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SendtoHand(ag,nil,REASON_EFFECT)~=0 then
Duel.Summon(tp,c,true,nil) Duel.Summon(tp,c,true,nil)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local sg=g:Filter(Card.IsFaceup,nil)
return sg and sg:GetClassCount(Card.GetRace)>=2 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,60002223)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function cm.filter(c,e,tp) --function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return c:IsSetCard(0x6a9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) --local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
end --local sg=g:Filter(Card.IsFaceup,nil)
function cm.xfilter(c) --return sg and sg:GetClassCount(Card.GetRace)>=2 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,60002223)
return c:IsType(TYPE_MONSTER) --end
end --function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
--if chk==0 then return true end
--if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
--local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
--if g:GetCount()>0 then
--Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
--end
--end
--function cm.filter(c,e,tp)
--return c:IsSetCard(0x6a9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
--end
--function cm.xfilter(c)
--return c:IsType(TYPE_MONSTER)
--end
......
...@@ -38,7 +38,7 @@ function cm.con2(e,c,minc) ...@@ -38,7 +38,7 @@ function cm.con2(e,c,minc)
return minc<=1 and Duel.CheckTribute(c,1) return minc<=1 and Duel.CheckTribute(c,1)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,c) function cm.op2(e,tp,eg,ep,ev,re,r,rp,c)
g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)) local g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE))
c:SetMaterial(g) c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
for tc in aux.Next(g) do for tc in aux.Next(g) do
...@@ -85,6 +85,7 @@ function cm.op5(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,6 +85,7 @@ function cm.op5(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.thfilter(c) function cm.thfilter(c)
local tp=c:GetControler()
return c:IsCanHaveCounter(0x624) and Duel.IsCanAddCounter(tp,0x624,1,c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsCanHaveCounter(0x624) and Duel.IsCanAddCounter(tp,0x624,1,c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function cm.thfilter2(c) function cm.thfilter2(c)
......
...@@ -38,7 +38,7 @@ function cm.con2(e,c,minc) ...@@ -38,7 +38,7 @@ function cm.con2(e,c,minc)
return minc<=1 and Duel.CheckTribute(c,1) return minc<=1 and Duel.CheckTribute(c,1)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,c) function cm.op2(e,tp,eg,ep,ev,re,r,rp,c)
g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)) local g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE))
c:SetMaterial(g) c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
for tc in aux.Next(g) do for tc in aux.Next(g) do
......
...@@ -38,7 +38,7 @@ function cm.con2(e,c,minc) ...@@ -38,7 +38,7 @@ function cm.con2(e,c,minc)
return minc<=1 and Duel.CheckTribute(c,1) return minc<=1 and Duel.CheckTribute(c,1)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,c) function cm.op2(e,tp,eg,ep,ev,re,r,rp,c)
g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)) local g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE))
c:SetMaterial(g) c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
for tc in aux.Next(g) do for tc in aux.Next(g) do
......
...@@ -27,7 +27,7 @@ function cm.con2(e,c,minc) ...@@ -27,7 +27,7 @@ function cm.con2(e,c,minc)
return minc<=1 and Duel.CheckTribute(c,1) return minc<=1 and Duel.CheckTribute(c,1)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,c) function cm.op2(e,tp,eg,ep,ev,re,r,rp,c)
g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)) local g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE))
c:SetMaterial(g) c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
for tc in aux.Next(g) do for tc in aux.Next(g) do
...@@ -51,7 +51,7 @@ end ...@@ -51,7 +51,7 @@ end
function cm.op5(e,tp,eg,ep,ev,re,r,rp) function cm.op5(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not e:GetHandler():IsFaceup() then return end if not e:GetHandler():IsRelateToEffect(e) or not e:GetHandler():IsFaceup() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.xfilter,tp,LOCATION_MZONE,,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.xfilter,tp,LOCATION_MZONE,0,1,1,nil)
local dmg=g:GetFirst():GetAttack() local dmg=g:GetFirst():GetAttack()
Duel.Damage(1-tp,dmg,REASON_EFFECT) Duel.Damage(1-tp,dmg,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -27,7 +27,7 @@ function cm.con2(e,c,minc) ...@@ -27,7 +27,7 @@ function cm.con2(e,c,minc)
return minc<=1 and Duel.CheckTribute(c,1) return minc<=1 and Duel.CheckTribute(c,1)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,c) function cm.op2(e,tp,eg,ep,ev,re,r,rp,c)
g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)) local g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE))
c:SetMaterial(g) c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
for tc in aux.Next(g) do for tc in aux.Next(g) do
......
...@@ -29,7 +29,7 @@ function cm.con2(e,c,minc) ...@@ -29,7 +29,7 @@ function cm.con2(e,c,minc)
return minc<=1 and Duel.CheckTribute(c,1) return minc<=1 and Duel.CheckTribute(c,1)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,c) function cm.op2(e,tp,eg,ep,ev,re,r,rp,c)
g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)) local g=Duel.SelectTribute(tp,c,1,Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE))
c:SetMaterial(g) c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
for tc in aux.Next(g) do for tc in aux.Next(g) do
...@@ -48,6 +48,7 @@ function cm.cos5(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,6 +48,7 @@ function cm.cos5(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(Duel.SendtoDeck(g,tp,2,REASON_COST)) e:SetLabel(Duel.SendtoDeck(g,tp,2,REASON_COST))
end end
function cm.op5(e,tp,eg,ep,ev,re,r,rp) function cm.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dam=e:GetLabel() local dam=e:GetLabel()
if not e:GetHandler():IsRelateToEffect(e) or not e:GetHandler():IsFaceup() then return end if not e:GetHandler():IsRelateToEffect(e) or not e:GetHandler():IsFaceup() then return end
if dam==2 then if dam==2 then
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetCost(cm.cost2) e2:SetCost(cm.cost2)
e2:SetCondition(cm.tcon) e2:SetCondition(cm.tcon)
e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
cm={} cm={}
......
...@@ -3,23 +3,166 @@ local cm,m,o=GetID() ...@@ -3,23 +3,166 @@ local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36521307,0)) e1:SetDescription(aux.Stringid(60010095,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetTarget(c36521307.sptg) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetOperation(c36521307.spop) e1:SetCondition(c60010095.spcon)
e1:SetTarget(c60010095.sptg)
e1:SetOperation(c60010095.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60010095,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c60010095.cfmcon)
e2:SetTarget(c60010095.cfmtg)
e2:SetOperation(c60010095.cfmop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60010095,5))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,60010095)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c60010095.tg)
e3:SetOperation(c60010095.op)
c:RegisterEffect(e3)
end end
function c36521307.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c60010095.spcon(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c36521307.spop(e,tp,eg,ep,ev,re,r,rp) function c60010095.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelAbove(1)
end
function c60010095.gcheck(sg)
return sg:GetSum(Card.GetLevel)<=5
end
function c60010095.fselect(g,tp,c)
return g:CheckWithSumEqual(Card.GetLevel,5,g:GetCount(),g:GetCount()) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
end
function c60010095.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60010095.spfilter,tp,LOCATION_HAND,0,c,e,tp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE))+1,g:GetCount())
if chk==0 then
if ft<=0 then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
aux.GCheckAdditional=c60010095.gcheck
local res=g:CheckSubGroup(c60010095.fselect,1,ft,tp,e:GetHandler())
aux.GCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c60010095.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.SpecialSummonStep(c,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.GetMatchingGroup(c60010095.spfilter,tp,LOCATION_HAND,0,c,e,tp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),g:GetCount())
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
aux.GCheckAdditional=c60010095.gcheck
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c60010095.fselect,false,1,ft,tp,nil)
aux.GCheckAdditional=nil
if sg then
local tc=sg:GetFirst()
while tc do
if tc:IsSetCard(0x632) and tc:IsType(TYPE_RITUAL+TYPE_MONSTER) then
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP)
else
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
end
tc=sg:GetNext()
end
end
Duel.SpecialSummonComplete()
end
end
--
function c60010095.cfmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c60010095.cfmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function c60010095.cfmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=3 then return end
if Duel.ConfirmDecktop(tp,3)~=0 then
local g=Duel.GetDecktopGroup(tp,3)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
e:GetHandler():RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
e:GetHandler():RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,c,0x632) then
local gg=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,1,c,0x632):GetFirst()
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
gg:RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
gg:RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
gg:RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
end
end
Duel.ShuffleDeck(tp)
end
function c60010095.thfilter(c)
return c:IsSetCard(0x632) and c:IsAbleToHand() and bit.band(c:GetType(),TYPE_RITUAL+TYPE_MONSTER)==TYPE_RITUAL+TYPE_MONSTER and not c:IsCode(60010095)
end
function c60010095.setfilter(c)
return c:IsSetCard(0x632) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c60010095.thfilter1(c)
return c:IsAbleToHand() and c:IsFaceup()
end
function c60010095.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (Card.GetFlagEffect(c,60010095)~=0 and Duel.IsExistingMatchingCard(c60010095.thfilter,tp,LOCATION_GRAVE,0,1,nil)) or (Card.GetFlagEffect(c,60010096)~=0 and Duel.IsExistingMatchingCard(c60010095.setfilter,tp,LOCATION_DECK,0,1,nil)) or (Card.GetFlagEffect(c,60010097)~=0 and Duel.IsExistingMatchingCard(c60010095.thfilter1,tp,0,LOCATION_MZONE,1,nil)) end
--Duel.GetFlagEffect(c,67200810)==1
end
function c60010095.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if Card.GetFlagEffect(c,60010095)~=0 and Duel.IsExistingMatchingCard(c60010095.thfilter,tp,LOCATION_GRAVE,0,1,nil) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectMatchingCard(tp,c60010095.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g1:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
end
if Card.GetFlagEffect(c,60010096)~=0 and Duel.IsExistingMatchingCard(c60010095.setfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g2=Duel.SelectMatchingCard(tp,c60010095.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SSet(tp,g2:GetFirst())
end
end
if Card.GetFlagEffect(c,60010097)~=0 and Duel.IsExistingMatchingCard(c60010095.thfilter1,tp,0,LOCATION_MZONE,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g3=Duel.SelectMatchingCard(tp,c60010095.thfilter1,tp,0,LOCATION_MZONE,1,1,nil)
if g3:GetCount()>0 then
Duel.SendtoHand(g3,nil,REASON_EFFECT)
end
end end
end end
--奥法集装士『风华乱舞』
function c60010096.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60010096,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c60010096.spcon)
e1:SetTarget(c60010096.sptg)
e1:SetOperation(c60010096.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60010096,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c60010096.cfmcon)
e2:SetTarget(c60010096.cfmtg)
e2:SetOperation(c60010096.cfmop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60010096,5))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,60010096)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c60010096.tg)
e3:SetOperation(c60010096.op)
c:RegisterEffect(e3)
end
function c60010096.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c60010096.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelAbove(1)
end
function c60010096.gcheck(sg)
return sg:GetSum(Card.GetLevel)<=5
end
function c60010096.fselect(g,tp,c)
return g:CheckWithSumEqual(Card.GetLevel,5,g:GetCount(),g:GetCount()) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
end
function c60010096.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60010096.spfilter,tp,LOCATION_HAND,0,c,e,tp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE))+1,g:GetCount())
if chk==0 then
if ft<=0 then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
aux.GCheckAdditional=c60010096.gcheck
local res=g:CheckSubGroup(c60010096.fselect,1,ft,tp,e:GetHandler())
aux.GCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c60010096.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.SpecialSummonStep(c,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.GetMatchingGroup(c60010096.spfilter,tp,LOCATION_HAND,0,c,e,tp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),g:GetCount())
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
aux.GCheckAdditional=c60010096.gcheck
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c60010096.fselect,false,1,ft,tp,nil)
aux.GCheckAdditional=nil
if sg then
local tc=sg:GetFirst()
while tc do
if tc:IsSetCard(0x632) and tc:IsType(TYPE_RITUAL+TYPE_MONSTER) then
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP)
else
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
end
tc=sg:GetNext()
end
end
Duel.SpecialSummonComplete()
end
end
--
function c60010096.cfmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c60010096.cfmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function c60010096.cfmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=3 then return end
if Duel.ConfirmDecktop(tp,3)~=0 then
local g=Duel.GetDecktopGroup(tp,3)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
e:GetHandler():RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
e:GetHandler():RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,c,0x632) then
local gg=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,1,c,0x632):GetFirst()
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
gg:RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
gg:RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
gg:RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
end
end
Duel.ShuffleDeck(tp)
end
function c60010096.thfilter(c)
return c:IsSetCard(0x632) and c:IsAbleToHand() and bit.band(c:GetType(),TYPE_RITUAL+TYPE_MONSTER)==TYPE_RITUAL+TYPE_MONSTER and not c:IsCode(60010096)
end
function c60010096.setfilter(c)
return c:IsSetCard(0x632) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c60010096.thfilter1(c)
return c:IsAbleToHand() and c:IsFaceup()
end
function c60010096.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (Card.GetFlagEffect(c,60010095)~=0 and Duel.IsPlayerCanDraw(tp,1)) or (Card.GetFlagEffect(c,60010096)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0) or (Card.GetFlagEffect(c,60010097)~=0) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60010096.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Card.GetFlagEffect(c,60010095)~=0 and Duel.IsPlayerCanDraw(tp,1) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
if Card.GetFlagEffect(c,60010096)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
if Duel.ConfirmDecktop(tp,1)~=0 then
local g=Duel.GetDecktopGroup(tp,1)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
e:GetHandler():RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
e:GetHandler():RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
end
Duel.ShuffleDeck(tp)
end
if Card.GetFlagEffect(c,60010097)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_RITUAL+TYPE_MONSTER))
e1:SetValue(c60010096.efilter)
if Duel.GetCurrentPhase()==PHASE_MAIN1 then
e1:SetReset(RESET_PHASE+PHASE_MAIN1)
Duel.RegisterFlagEffect(tp,60010096,RESET_PHASE+PHASE_MAIN1,0,1)
else
e1:SetReset(RESET_PHASE+PHASE_MAIN2)
Duel.RegisterFlagEffect(tp,60010096,RESET_PHASE+PHASE_MAIN2,0,1)
end
Duel.RegisterEffect(e1,tp)
end
end
function c60010096.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
--奥法集装士『归根何处』
function c60010097.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60010097,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c60010097.spcon)
e1:SetTarget(c60010097.sptg)
e1:SetOperation(c60010097.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60010097,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c60010097.cfmcon)
e2:SetTarget(c60010097.cfmtg)
e2:SetOperation(c60010097.cfmop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60010097,5))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,60010097)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c60010097.tg)
e3:SetOperation(c60010097.op)
c:RegisterEffect(e3)
end
function c60010097.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c60010097.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelAbove(1)
end
function c60010097.gcheck(sg)
return sg:GetSum(Card.GetLevel)<=5
end
function c60010097.fselect(g,tp,c)
return g:CheckWithSumEqual(Card.GetLevel,5,g:GetCount(),g:GetCount()) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
end
function c60010097.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60010097.spfilter,tp,LOCATION_HAND,0,c,e,tp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE))+1,g:GetCount())
if chk==0 then
if ft<=0 then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
aux.GCheckAdditional=c60010097.gcheck
local res=g:CheckSubGroup(c60010097.fselect,1,ft,tp,e:GetHandler())
aux.GCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c60010097.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.SpecialSummonStep(c,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.GetMatchingGroup(c60010097.spfilter,tp,LOCATION_HAND,0,c,e,tp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),g:GetCount())
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
aux.GCheckAdditional=c60010097.gcheck
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c60010097.fselect,false,1,ft,tp,nil)
aux.GCheckAdditional=nil
if sg then
local tc=sg:GetFirst()
while tc do
if tc:IsSetCard(0x632) and tc:IsType(TYPE_RITUAL+TYPE_MONSTER) then
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP)
else
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
end
tc=sg:GetNext()
end
end
Duel.SpecialSummonComplete()
end
end
--
function c60010097.cfmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c60010097.cfmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function c60010097.cfmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=3 then return end
if Duel.ConfirmDecktop(tp,3)~=0 then
local g=Duel.GetDecktopGroup(tp,3)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
e:GetHandler():RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
e:GetHandler():RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,c,0x632) then
local gg=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,1,c,0x632):GetFirst()
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
gg:RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
gg:RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
gg:RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
end
end
Duel.ShuffleDeck(tp)
end
function c60010097.thfilter(c)
return c:IsSetCard(0x632) and c:IsAbleToHand() and bit.band(c:GetType(),TYPE_RITUAL+TYPE_MONSTER)==TYPE_RITUAL+TYPE_MONSTER and not c:IsCode(60010097)
end
function c60010097.setfilter(c)
return c:IsSetCard(0x632) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c60010097.thfilter1(c)
return c:IsAbleToHand() and c:IsFaceup()
end
function c60010097.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (Card.GetFlagEffect(c,60010095)~=0) or (Card.GetFlagEffect(c,60010096)~=0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)) or (Card.GetFlagEffect(c,60010097)~=0 and Duel.IsExistingMatchingCard(c60010097.thfilter,tp,LOCATION_DECK,0,1,nil)) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
end
function c60010097.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Card.GetFlagEffect(c,60010095)~=0 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
if Card.GetFlagEffect(c,60010096)~=0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local gq=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #gq>0 then
Duel.HintSelection(gq)
Duel.Destroy(gq,REASON_EFFECT)
end
end
if Card.GetFlagEffect(c,60010097)~=0 and Duel.IsExistingMatchingCard(c60010097.thfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60010097.thfilter,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
end
--奥法集装士『追月霜华』
function c60010098.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60010098,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c60010098.spcon)
e1:SetTarget(c60010098.sptg)
e1:SetOperation(c60010098.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60010098,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c60010098.cfmcon)
e2:SetTarget(c60010098.cfmtg)
e2:SetOperation(c60010098.cfmop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60010098,5))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,60010098)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c60010098.tg)
e3:SetOperation(c60010098.op)
c:RegisterEffect(e3)
end
function c60010098.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c60010098.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelAbove(1)
end
function c60010098.gcheck(sg)
return sg:GetSum(Card.GetLevel)<=5
end
function c60010098.fselect(g,tp,c)
return g:CheckWithSumEqual(Card.GetLevel,5,g:GetCount(),g:GetCount()) and Duel.GetLocationCount(tp,LOCATION_MZONE)>g:GetCount()
end
function c60010098.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60010098.spfilter,tp,LOCATION_HAND,0,c,e,tp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE))+1,g:GetCount())
if chk==0 then
if ft<=0 then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
aux.GCheckAdditional=c60010098.gcheck
local res=g:CheckSubGroup(c60010098.fselect,1,ft,tp,e:GetHandler())
aux.GCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c60010098.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.SpecialSummonStep(c,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.GetMatchingGroup(c60010098.spfilter,tp,LOCATION_HAND,0,c,e,tp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),g:GetCount())
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
aux.GCheckAdditional=c60010098.gcheck
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c60010098.fselect,false,1,ft,tp,nil)
aux.GCheckAdditional=nil
if sg then
local tc=sg:GetFirst()
while tc do
if tc:IsSetCard(0x632) and tc:IsType(TYPE_RITUAL+TYPE_MONSTER) then
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP)
else
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
end
tc=sg:GetNext()
end
end
Duel.SpecialSummonComplete()
end
end
--
function c60010098.cfmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c60010098.cfmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function c60010098.cfmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=3 then return end
if Duel.ConfirmDecktop(tp,3)~=0 then
local g=Duel.GetDecktopGroup(tp,3)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
e:GetHandler():RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
e:GetHandler():RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,c,0x632) then
local gg=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,1,c,0x632):GetFirst()
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
gg:RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
gg:RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
gg:RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
end
end
Duel.ShuffleDeck(tp)
end
function c60010098.thfilter(c)
return c:IsSetCard(0x632) and c:IsAbleToHand() and bit.band(c:GetType(),TYPE_RITUAL+TYPE_MONSTER)==TYPE_RITUAL+TYPE_MONSTER and not c:IsCode(60010098)
end
function c60010098.setfilter(c)
return c:IsSetCard(0x632) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c60010098.thfilter1(c)
return c:IsAbleToHand() and c:IsFaceupEx()
end
function c60010098.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (Card.GetFlagEffect(c,60010095)~=0 and Duel.IsExistingMatchingCard(c60010098.setfilter,tp,LOCATION_GRAVE,0,1,nil)) or (Card.GetFlagEffect(c,60010096)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil)) or (Card.GetFlagEffect(c,60010097)~=0 and Duel.IsExistingMatchingCard(Card.IsFaceupEx,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
end
function c60010098.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Card.GetFlagEffect(c,60010095)~=0 and Duel.IsExistingMatchingCard(c60010098.setfilter,tp,LOCATION_GRAVE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g2=Duel.SelectMatchingCard(tp,c60010095.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SSet(tp,g2:GetFirst())
end
end
if Card.GetFlagEffect(c,60010096)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local gq=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local gq1=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,1-tp,0,LOCATION_HAND,1,1,nil)
gq:Merge(gq1)
if #gq>0 then
Duel.HintSelection(gq)
Duel.SendtoDeck(gq,nil,2,REASON_EFFECT)
end
end
if Card.GetFlagEffect(c,60010097)~=0 and Duel.IsExistingMatchingCard(Card.IsFaceupEx,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceupEx(),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--奥法集装士『太阳天道』
function c60010099.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60010099,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c60010099.thcost)
e1:SetTarget(c60010099.thtg)
e1:SetOperation(c60010099.thop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60010099,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c60010099.discon)
e2:SetTarget(c60010099.distg)
e2:SetOperation(c60010099.disop)
c:RegisterEffect(e2)
end
function c60010099.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c60010099.thfilter(c)
return c:IsSetCard(0x632) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c60010099.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c60010099.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60010099.thop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(c60010099.thfilter,tp,LOCATION_DECK,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--
function c60010099.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and Card.GetFlagEffect(c,60010095)~=0 and Card.GetFlagEffect(c,60010096)~=0 and Card.GetFlagEffect(c,60010097)~=0 and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c60010099.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 c60010099.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev)~=0 then
local b2=Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b3=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local op=aux.SelectFromOptions(tp,aux.Stringid(60010099,2),{b2,aux.Stringid(60010099,3)},{b3,aux.Stringid(60010099,4)})
if op==1 then
Card.ResetFlagEffect(c,60010095)
Duel.Recover(tp,1000,REASON_EFFECT)
end
if op==2 then
Card.ResetFlagEffect(c,60010096)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
if op==3 then
Card.ResetFlagEffect(c,60010097)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
Duel.Destroy(g1,REASON_EFFECT)
end
end
end
end
--奥法博览厅
function c60010100.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(60010100,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c60010100.handcon)
c:RegisterEffect(e0)
--activate
local e1=Effect.CreateEffect(c)
--e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCountLimit(1,60010100+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c60010100.cfmop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60010100,0))
--e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
--e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c60010100.condition)
--e2:SetTarget(c60010100.target)
e2:SetOperation(c60010100.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
if not c60010100.global_check then
c60010100.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c60010100.spcheckop)
Duel.RegisterEffect(ge1,0)
end
end
function c60010100.spcheckop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsSummonPlayer(0) and tc:IsSummonType(SUMMON_TYPE_RITUAL) and tc:IsSetCard(0x632) then p1=true else p2=true end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,60010100,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,60010100,RESET_PHASE+PHASE_END,0,1) end
end
function c60010100.handcon(e)
return Duel.GetFlagEffect(tp,60010100)~=0
end
--
function c60010100.cfmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=3 then return end
if Duel.ConfirmDecktop(tp,3)~=0 then
local g=Duel.GetDecktopGroup(tp,3)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
e:GetHandler():RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
e:GetHandler():RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
end
end
--
function c60010100.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x632)
end
function c60010100.condition(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c60010100.cfilter,1,nil)
end
function c60010100.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
while tc do
if Card.GetFlagEffect(c,60010095)~=0 then
e:GetHandler():RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if Card.GetFlagEffect(c,60010096)~=0 then
e:GetHandler():RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if Card.GetFlagEffect(c,60010097)~=0 then
e:GetHandler():RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
tc=eg:GetNext()
end
end
--元素创想
function c60010101.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c60010101.cfmop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60010101,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c60010101.thcon)
e2:SetTarget(c60010101.thtg)
e2:SetOperation(c60010101.thop)
c:RegisterEffect(e2)
end
--
function c60010101.cfmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=3 then return end
if Duel.ConfirmDecktop(tp,3)~=0 then
local g=Duel.GetDecktopGroup(tp,3)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
if g:IsExists(Card.IsType,1,nil,TYPE_SPELL) then
e:GetHandler():RegisterFlagEffect(60010096,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,3))
end
if g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
e:GetHandler():RegisterFlagEffect(60010097,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,4))
end
end
end
--
function c60010101.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Card.GetFlagEffect(c,60010095)~=0 and Card.GetFlagEffect(c,60010096)~=0 and Card.GetFlagEffect(c,60010097)~=0
end
function c60010101.thfilter(c)
return c:IsSetCard(0x632) and c:IsAbleToHand()
end
function c60010101.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c60010101.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) end
end
function c60010101.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SendtoGrave(c,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60010101.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(60010101,0)) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
--快速施法
function c60010102.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(60010102,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c60010102.handcon)
c:RegisterEffect(e0)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c60010102.cfmtg)
e1:SetOperation(c60010102.cfmop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60010102,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60010102.sptg)
e2:SetOperation(c60010102.spop)
c:RegisterEffect(e2)
end
function c60010102.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x632) and c:IsType(TYPE_RITUAL)
end
function c60010102.handcon(e)
return Duel.IsExistingMatchingCard(c60010102.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
--
function c60010102.cfmfilter(c)
return c:IsFaceup() and c:IsSetCard(0x632)
end
function c60010102.cfmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c60010102.cfmfilter,tp,LOCATION_ONFIELD,0,1,c) end
end
function c60010102.cfmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c60010102.cfmfilter,tp,LOCATION_ONFIELD,0,1,1,c)
if g:GetCount()>0 then
local tg=g:GetFirst()
tg:RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
tg:RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
tg:RegisterFlagEffect(60010095,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60010095,2))
end
end
--
function c60010102.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60010102.spop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--奥法集装士『路难寻』
function c60010103.initial_effect(c)
--disable and destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCondition(c60010103.condition)
e1:SetOperation(c60010103.disop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60010103,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
--e2:SetCountLimit(1)
--e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c60010103.condition)
e2:SetTarget(c60010103.target)
e2:SetOperation(c60010103.activate)
c:RegisterEffect(e2)
if not c60010103.global_check1 then
c60010103.global_check1=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SSET)
ge1:SetOperation(c60010103.checkop)
Duel.RegisterEffect(ge1,0)
end
if not c60010103.global_check then
c60010103.global_check=true
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
ge2:SetOperation(c60010103.spcheckop)
Duel.RegisterEffect(ge2,0)
end
end
--
function c60010103.spcheckop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsSummonPlayer(0) and tc:IsSummonType(SUMMON_TYPE_RITUAL) and tc:IsSetCard(0x632) then p1=true else p2=true end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,60010103,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,60010103,RESET_PHASE+PHASE_END,0,1) end
end
function c60010103.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(0,60010102,RESET_PHASE+PHASE_END,0,1)
end
--
function c60010103.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,60010103)~=0 and Duel.GetFlagEffect(tp,60010102)~=0
end
function c60010103.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(60010103,0)) then
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) then
local tc=te:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) then
dg:AddCard(tc)
end
end
end
local gg=Group.Select(dg,tp,1,dg:GetCount(),e:GetHandler())
local gg1=gg:GetFirst()
while gg do
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c60010103.distg)
e1:SetLabelObject(gg1)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c60010103.discon)
e2:SetOperation(c60010103.disop)
e2:SetLabelObject(gg1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
gg1=gg:GetNext()
end
end
Duel.SendtoGrave(c,REASON_EFFECT)
end
function c60010103.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
function c60010103.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c60010103.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c60010103.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c60010103.confilter,tp,LOCATION_PZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and rp==1-tp
end
function c60010103.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck()
end
function c60010103.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c60010103.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x632))
e1:SetValue(c60010103.efilter)
e1:SetLabelObject(re)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
end
function c60010103.efilter(e,re)
return re==e:GetLabelObject()
end
--奥法集装士『燃灯火』 --奥法集装士『燃灯火』
function c60010104.initial_effect(c) function c60010104.initial_effect(c)
--disable and destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCondition(c60010104.discon)
e1:SetOperation(c60010104.disop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c60010104.condition)
e2:SetTarget(aux.nbtg)
e2:SetOperation(c60010104.activate)
c:RegisterEffect(e2)
if not c60010104.global_check1 then
c60010104.global_check1=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SSET)
ge1:SetOperation(c60010104.checkop)
Duel.RegisterEffect(ge1,0)
end
if not c60010104.global_check then
c60010104.global_check=true
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
ge2:SetOperation(c60010104.spcheckop)
Duel.RegisterEffect(ge2,0)
end
end
function c60010104.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x632)
end
function c60010104.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c60010104.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c60010104.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if Duel.NegateActivation(ev) and tc:IsRelateToEffect(re) and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_REMOVED) and not tc:IsReason(REASON_REDIRECT) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c60010104.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function c60010104.aclimit(e,re,tp)
local c=re:GetHandler()
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
--
function c60010104.spcheckop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsSummonPlayer(0) and tc:IsSummonType(SUMMON_TYPE_RITUAL) and tc:IsSetCard(0x632) then p1=true else p2=true end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,60010104,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,60010104,RESET_PHASE+PHASE_END,0,1) end
end
function c60010104.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(0,60010102,RESET_PHASE+PHASE_END,0,1)
end
--
function c60010104.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,60010104)~=0 and Duel.GetFlagEffect(tp,60010102)~=0
end
function c60010104.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cc=Duel.GetCurrentChain()
if Duel.IsExistingMatchingCard(c60010104.thfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(60010104,0)) then
local gg=Duel.GetFieldGroup(c60010104.thfilter,tp,LOCATION_GRAVE,0,nil)
if gg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c60010104.thfilter,tp,LOCATION_GRAVE,0,1,cc,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
Duel.SendtoGrave(c,REASON_EFFECT)
end end
\ No newline at end of file
--奥法集装士『今昔月』
function c60010105.initial_effect(c)
--disable and destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCondition(c60010105.condition)
e1:SetOperation(c60010105.disop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c60010105.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_FZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCountLimit(1)
e3:SetCondition(c60010105.thcon)
e3:SetTarget(c60010105.thtg)
e3:SetOperation(c60010105.thop)
c:RegisterEffect(e3)
if not c60010105.global_check1 then
c60010105.global_check1=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SSET)
ge1:SetOperation(c60010105.checkop)
Duel.RegisterEffect(ge1,0)
end
if not c60010105.global_check then
c60010105.global_check=true
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
ge2:SetOperation(c60010105.spcheckop)
Duel.RegisterEffect(ge2,0)
end
end
function c60010105.atktg(e,c)
return c:IsType(TYPE_RITUAL)
end
--
function c60010105.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c60010105.thfilter(c)
return c:IsSetCard(0x632) and c:IsAbleToHand()
end
function c60010105.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60010105.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c60010105.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c60010105.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--
function c60010105.spcheckop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsSummonPlayer(0) and tc:IsSummonType(SUMMON_TYPE_RITUAL) and tc:IsSetCard(0x632) then p1=true else p2=true end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,60010105,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,60010105,RESET_PHASE+PHASE_END,0,1) end
end
function c60010105.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(0,60010102,RESET_PHASE+PHASE_END,0,1)
end
--
function c60010105.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,60010105)~=0 and Duel.GetFlagEffect(tp,60010102)~=0
end
function c60010105.thfilter1(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c60010105.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(c60010105.thfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(60010105,0)) then
local gg=Duel.GetFieldGroup(c60010105.thfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if gg:GetCount()>0 then
Duel.SendtoHand(gg,nil,REASON_EFFECT)
end
end
Duel.Exile(c,REASON_EFFECT)
Duel.MoveToField(c,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
function c60010105.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
function c60010105.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c60010105.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c60010105.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c60010105.confilter,tp,LOCATION_PZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and rp==1-tp
end
function c60010105.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck()
end
function c60010105.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c60010105.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x632))
e1:SetValue(c60010105.efilter)
e1:SetLabelObject(re)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
end
function c60010105.efilter(e,re)
return re==e:GetLabelObject()
end
...@@ -89,7 +89,7 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,7 +89,7 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(60010111) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -130,6 +130,6 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,6 +130,6 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
Duel.SendtoGrave(gc,REASON_RULE) if gc:IsRelateToEffect(e) then Duel.SendtoGrave(gc,REASON_RULE) end
end end
end end
\ No newline at end of file
--镜想歌 残
local cm,m,o=GetID()
function cm.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_DECK)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCode(EVENT_ADJUST)
e1:SetCondition(cm.rcon)
e1:SetOperation(cm.rop)
c:RegisterEffect(e1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2347477,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.thcon2)
e3:SetTarget(cm.thtg2)
e3:SetOperation(cm.thop2)
c:RegisterEffect(e3)
end
function cm.spfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_ONFIELD,0,1,nil) and c:IsFaceup()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function cm.rcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_GRAVE) and e:GetHandler():IsAbleToDeck()
end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SendtoDeck(c,nil,1,REASON_EFFECT)~=0 then
c:ReverseInDeck()
if Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)<=2 then
Duel.Draw(e:GetHandlerPlayer(),1,REASON_EFFECT)
end
end
Duel.Readjust()
end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:CheckActivateEffect(false,false,false)~=nil
and c:GetActivateEffect():IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local gc=g:GetFirst()
local te=gc:GetActivateEffect()
Duel.MoveToField(gc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local cos,tg,op=te:GetCost(),te:GetTarget(),te:GetOperation()
if te and (not cos or cos(te,tp,eg,ep,ev,re,r,rp,0)) and (not tg or tg(te,tp,eg,ep,ev,re,r,rp,0)) then
e:SetProperty(te:GetProperty())
local code=gc:GetOriginalCode()
Duel.Hint(HINT_CARD,tp,code)
Duel.Hint(HINT_CARD,1-tp,code)
te:UseCountLimit(tp,1,true)
gc:CreateEffectRelation(te)
if cos then cos(te,tp,eg,ep,ev,re,r,rp,1) end
if tg then tg(te,tp,eg,ep,ev,re,r,rp,1) end
--Duel.ClearTargetCard()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if #g==1 then
g=Group.FromCards(c)
--Duel.ChangeTargetCard(0,g)
elseif #g>1 then
Group.RemoveCard(g,Group.RandomSelect(g,tp,1):GetFirst())
Group.AddCard(g,c)
--Duel.ChangeTargetCard(0,g)
end
if g and #g~=0 then
local fg=g:GetFirst()
while fg do
fg:CreateEffectRelation(te)
fg=g:GetNext()
end
end
if g then Duel.ChangeTargetCard(0,g) end --Duel.SetTargetCard(g)
if op then op(te,tp,eg,ep,ev,re,r,rp,1,g) end
gc:ReleaseEffectRelation(te)
if g then
local fg=g:GetFirst()
while fg do
fg:ReleaseEffectRelation(te)
fg=g:GetNext()
end
end
end
if gc:IsRelateToEffect(e) then Duel.SendtoGrave(gc,REASON_RULE) end
end
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK then return true end
end
function cm.thfilter2(c)
return c:IsSetCard(0x633) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
!setname 0x631 遗忘海 !setname 0x631 遗忘海
!setname 0x632 奥法集装士 !setname 0x632 奥法集装士
!setname 0x633 镜想 !setname 0x633 镜想
!setname 0x634 流萤
!setname 0x6a0 机凯种 !setname 0x6a0 机凯种
!setname 0x6a2 大世环 !setname 0x6a2 大世环
......
File added
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