Commit b88d87db authored by 大崎甜花's avatar 大崎甜花 Committed by GitHub

jnmlp lua

parent 0fdfb80b
--穹顶煌刃 寒风·雪天
local m=14000371
local cm=_G["c"..m]
cm.named_with_Skayarder=1
function cm.initial_effect(c)
--fusion
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,cm.matfilter,1,1,true)
--spsummon condition
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(cm.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
e2:SetValue(1)
c:RegisterEffect(e2)
--cannot be fusion material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.negcon)
e4:SetOperation(cm.negop)
c:RegisterEffect(e4)
--SpecialSummon from Deck
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_RELEASE)
e5:SetTarget(cm.tg)
e5:SetOperation(cm.op)
c:RegisterEffect(e5)
end
function cm.Skay(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Skayarder
end
cm.loaded_metatable_list=cm.loaded_metatable_list or {}
function cm.load_metatable(code)
local m1=_G["c"..code]
if m1 then return m1 end
local m2=cm.loaded_metatable_list[code]
if m2 then return m2 end
_G["c"..code]={}
if pcall(function() dofile("expansions/script/c"..code..".lua") end) or pcall(function() dofile("script/c"..code..".lua") end) then
local mt=_G["c"..code]
_G["c"..code]=nil
if mt then
cm.loaded_metatable_list[code]=mt
return mt
end
else
_G["c"..code]=nil
end
end
function cm.check_fusion_set_Skayarder(c)
if c:IsHasEffect(6205579) then return false end
local codet={c:GetFusionCode()}
for j,code in pairs(codet) do
local mt=cm.load_metatable(code)
if mt then
for str,v in pairs(mt) do
if type(str)=="string" and str:find("_Skayarder") and v then return true end
end
end
end
return false
end
function cm.matfilter(c)
return cm.check_fusion_set_Skayarder(c)
end
function cm.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function cm.rsfilter(c,fc,tp)
return cm.Skay(c) and c:IsLevel(8)
and c:IsReleasable() and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0 and c:IsCanBeFusionMaterial(fc,SUMMON_TYPE_SPECIAL)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroup(tp,cm.rsfilter,1,nil,c,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,cm.rsfilter,1,1,nil,c,tp)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
c:RegisterFlagEffect(14000351,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:GetFlagEffect(14000351)~=0 or c:GetSummonType()&(SUMMON_TYPE_SPECIAL+1)==SUMMON_TYPE_SPECIAL+1)
and rp==1-tp and Duel.IsChainDisablable(ev)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.Remove(rc,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.spfilter(c,e,tp)
return cm.Skay(c) and c:IsLevel(4) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
local code=tc:GetOriginalCodeRule()
tc:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(code,0))
end
--穹顶煌刃 寒风·雪天
local m=14000371
local cm=_G["c"..m]
cm.named_with_Skayarder=1
function cm.initial_effect(c)
--fusion
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,cm.matfilter,cm.matfilter1,true)
--spsummon condition
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.fuslimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
e2:SetValue(1)
c:RegisterEffect(e2)
--cannot be fusion material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.negcon)
e4:SetOperation(cm.negop)
c:RegisterEffect(e4)
--SpecialSummon from Deck
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_RELEASE)
e5:SetTarget(cm.tg)
e5:SetOperation(cm.op)
c:RegisterEffect(e5)
end
function cm.Skay(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Skayarder
end
cm.loaded_metatable_list=cm.loaded_metatable_list or {}
function cm.load_metatable(code)
local m1=_G["c"..code]
if m1 then return m1 end
local m2=cm.loaded_metatable_list[code]
if m2 then return m2 end
_G["c"..code]={}
if pcall(function() dofile("expansions/script/c"..code..".lua") end) or pcall(function() dofile("script/c"..code..".lua") end) then
local mt=_G["c"..code]
_G["c"..code]=nil
if mt then
cm.loaded_metatable_list[code]=mt
return mt
end
else
_G["c"..code]=nil
end
end
function cm.check_fusion_set_Skayarder(c)
if c:IsHasEffect(6205579) then return false end
local codet={c:GetFusionCode()}
for j,code in pairs(codet) do
local mt=cm.load_metatable(code)
if mt then
for str,v in pairs(mt) do
if type(str)=="string" and str:find("_Skayarder") and v then return true end
end
end
end
return false
end
function cm.matfilter(c)
return cm.check_fusion_set_Skayarder(c)
end
function cm.matfilter1(c)
return c:IsFusionType(TYPE_EFFECT)
end
function cm.rsfilter(c,fc,tp)
return cm.Skay(c) and c:IsLevel(8)
and c:IsReleasable() and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0 and c:IsCanBeFusionMaterial(fc,SUMMON_TYPE_SPECIAL)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroup(tp,cm.rsfilter,1,nil,c,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,cm.rsfilter,1,1,nil,c,tp)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
c:RegisterFlagEffect(14000351,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:GetFlagEffect(14000351)~=0 or c:GetSummonType()&(SUMMON_TYPE_SPECIAL+1)==SUMMON_TYPE_SPECIAL+1)
and rp==1-tp and Duel.IsChainDisablable(ev)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.Remove(rc,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.spfilter(c,e,tp)
return cm.Skay(c) and c:IsLevel(4) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
local code=tc:GetOriginalCodeRule()
tc:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(code,0))
end
end
\ No newline at end of file
--抹杀立方·零点
local m=14000657
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(cm.sscon)
e1:SetTarget(cm.sstg)
e1:SetOperation(cm.ssop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.spcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and c:GetReasonEffect() and c:GetReasonEffect():GetOwner()==c
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spcfilter,1,nil,tp)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
end
function cm.spcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1
end
function cm.xyzfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsCode(14000656) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0
and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
--抹杀立方·零点
local m=14000657
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(cm.sscon)
e1:SetTarget(cm.sstg)
e1:SetOperation(cm.ssop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.spcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and c:GetReasonEffect() and c:GetReasonEffect():GetOwner()==c
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spcfilter,1,nil,tp)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
end
function cm.spcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1
end
function cm.xyzfilter(c,e,tp,mat)
return c:IsType(TYPE_XYZ) and c:IsCode(14000656) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mat,c)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetDescription(aux.Stringid(17060915,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
......@@ -16,7 +16,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetDescription(aux.Stringid(17060915,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
--synchro level
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetDescription(aux.Stringid(17060915,2))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_SYNCHRO_LEVEL)
......@@ -78,13 +78,12 @@ end
function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_GRAVE)
return ft>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,ft)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_GRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ft)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.slevel(e,c)
......
--明智英树
local m=26818001
local cm=_G["c"..m]
function cm.initial_effect(c)
--indestructable
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e0:SetCondition(cm.indcon)
e0:SetValue(1)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--multiatk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_MAIN_END)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.askcon)
e2:SetCost(cm.atkcost)
e2:SetOperation(cm.askop)
c:RegisterEffect(e2)
--multiatk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(TIMING_MAIN_END)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.atkcon)
e3:SetCost(cm.atkcost)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsLevel(3) and Duel.GetMZoneCount(tp,c)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.indfilter(c)
return c:IsFaceup() and c:IsLevel(3)
end
function cm.indcon(e)
return Duel.IsExistingMatchingCard(cm.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.IsAbleToEnterBP() and Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.costfilter(c)
return aux.IsCodeListed(c,26818001) and c:IsType(TYPE_MONSTER) and (c:IsControler(tp) or c:IsFaceup())
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.askcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.askop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(cm.indct)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
--明智英树
local m=26818001
local cm=_G["c"..m]
function cm.initial_effect(c)
--indestructable
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e0:SetCondition(cm.indcon)
e0:SetValue(1)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--multiatk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_MAIN_END)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.askcon)
e2:SetCost(cm.atkcost)
e2:SetOperation(cm.askop)
c:RegisterEffect(e2)
--multiatk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(TIMING_MAIN_END)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.atkcon)
e3:SetCost(cm.atkcost)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsLevel(3) and Duel.GetMZoneCount(tp,c)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.indfilter(c)
return c:IsFaceup() and c:IsLevel(3)
end
function cm.indcon(e)
return Duel.IsExistingMatchingCard(cm.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.IsAbleToEnterBP() and Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.costfilter(c)
return aux.IsCodeListed(c,26818001) and c:IsType(TYPE_MONSTER) and (c:IsControler(tp) or c:IsFaceup())
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.askcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.IsAbleToEnterBP()
end
function cm.askop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(cm.indct)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
--永辉真理 类比推理
function c30557012.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30557012,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,30557012)
e1:SetCost(c30557012.drcost)
e1:SetTarget(c30557012.drtg)
e1:SetOperation(c30557012.drop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30557012,2))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,30557011)
e2:SetCondition(c30557012.condition)
e2:SetOperation(c30557012.operation)
c:RegisterEffect(e2)
end
function c30557012.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c30557012.operation(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetOperation(c30557012.op)
Duel.RegisterEffect(e3,tp)
end
function c30557012.op(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
if re:GetHandlerPlayer()~=tp and c~=e:GetHandler() and Duel.SelectYesNo(tp,aux.Stringid(30557012,0)) then
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local gc=g:GetFirst()
if gc:IsSetCard(0x306) then
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.MoveSequence(tc,1)
end
end
end
function c30557012.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c30557012.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,TYPE_MONSTER) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,0)
end
function c30557012.filter(c)
return c:IsSetCard(0x306)
end
function c30557012.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,TYPE_MONSTER)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c30557012.filter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(30557012,1)) then
local g=Duel.SelectMatchingCard(tp,c30557012.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
--永辉真理 类比推理
function c30557012.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30557012,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,30557012)
e1:SetCost(c30557012.drcost)
e1:SetTarget(c30557012.drtg)
e1:SetOperation(c30557012.drop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30557012,2))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,30557011)
e2:SetCondition(c30557012.condition)
e2:SetOperation(c30557012.operation)
c:RegisterEffect(e2)
end
function c30557012.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c30557012.operation(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetOperation(c30557012.op)
Duel.RegisterEffect(e3,tp)
end
function c30557012.op(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
if re:GetHandlerPlayer()~=tp and c~=e:GetHandler() and Duel.SelectYesNo(tp,aux.Stringid(30557012,0)) then
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local gc=g:GetFirst()
if gc:IsSetCard(0x306) then
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.MoveSequence(gc,1)
end
end
end
function c30557012.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c30557012.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,TYPE_MONSTER) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,0)
end
function c30557012.filter(c)
return c:IsSetCard(0x306)
end
function c30557012.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,TYPE_MONSTER)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c30557012.filter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(30557012,1)) then
local g=Duel.SelectMatchingCard(tp,c30557012.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
end
\ No newline at end of file
--憧憬的战士 本条二亚
function c33400208.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x341),6,2)
c:EnableReviveLimit()
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33400208,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,33400208)
e2:SetCondition(c33400208.tgcon)
e2:SetTarget(c33400208.tgtg)
e2:SetOperation(c33400208.tgop)
c:RegisterEffect(e2)
--DISABLE
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33400208,1))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,33400208+10000)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c33400208.discost)
e3:SetTarget(c33400208.distg)
e3:SetOperation(c33400208.disop)
c:RegisterEffect(e3)
end
function c33400208.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c33400208.tgft(c)
return c:IsSetCard(0x341)
end
function c33400208.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.IsExistingTarget(c33400208.tgft,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,0,0)
end
function c33400208.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.ConfirmDecktop(1-tp,1)
local g=Duel.GetDecktopGroup(1-tp,1)
local tc=g:GetFirst()
if tc:IsCode(ac) then
local sg=Duel.SelectMatchingCard(tp,c33400208.tgft,tp,LOCATION_REMOVED,0,1,2,nil)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
end
function c33400208.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=0
if e:GetHandler():GetFlagEffect(33401301)>0 then ft=1 end
if chk==0 then return ((ft==1) or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)) end
if ft==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end
function c33400208.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c33400208.disop(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFirstTarget()
local tc2=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.ConfirmDecktop(1-tp,1)
local g=Duel.GetDecktopGroup(1-tp,1)
local tc=g:GetFirst()
local token=Duel.CreateToken(tp,ac)
local t1=bit.band(token:GetType(),0x7)
local t2=bit.band(tc:GetType(),0x7)
if t1==t2 then
Duel.Damage(1-tp,500,REASON_EFFECT)
if Duel.SelectYesNo(tp,aux.Stringid(33400208,3)) then
local e1=Effect.CreateEffect(tc2)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c33400208.distg2)
e1:SetLabelObject(tc1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(tc2)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c33400208.discon2)
e2:SetOperation(c33400208.disop2)
e2:SetLabelObject(tc1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
if tc:IsCode(ac) then
Duel.Damage(1-tp,500,REASON_EFFECT)
if tc1:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(33400208,4))then
Duel.SendtoGrave(tc1,REASON_EFFECT)
end
end
end
function c33400208.distg2(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c33400208.discon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c33400208.disop2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--憧憬的战士 本条二亚
function c33400208.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x341),6,2)
c:EnableReviveLimit()
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33400208,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,33400208)
e2:SetCondition(c33400208.tgcon)
e2:SetTarget(c33400208.tgtg)
e2:SetOperation(c33400208.tgop)
c:RegisterEffect(e2)
--DISABLE
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33400208,1))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,33400208+10000)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c33400208.discost)
e3:SetTarget(c33400208.distg)
e3:SetOperation(c33400208.disop)
c:RegisterEffect(e3)
end
function c33400208.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c33400208.tgft(c)
return c:IsSetCard(0x341)
end
function c33400208.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.IsExistingTarget(c33400208.tgft,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,0,0)
end
function c33400208.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.ConfirmDecktop(1-tp,1)
local g=Duel.GetDecktopGroup(1-tp,1)
local tc=g:GetFirst()
if tc:IsCode(ac) then
local sg=Duel.SelectMatchingCard(tp,c33400208.tgft,tp,LOCATION_REMOVED,0,1,2,nil)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
end
function c33400208.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=0
if e:GetHandler():GetFlagEffect(33401301)>0 then ft=1 end
if chk==0 then return ((ft==1) or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)) end
if ft==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end
function c33400208.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c33400208.disop(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFirstTarget()
local tc2=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.ConfirmDecktop(1-tp,1)
local g=Duel.GetDecktopGroup(1-tp,1)
local tc=g:GetFirst()
local token=Duel.CreateToken(tp,ac)
local t1=bit.band(token:GetType(),0x7)
local t2=bit.band(tc:GetType(),0x7)
if t1==t2 then
Duel.Damage(1-tp,500,REASON_EFFECT)
if Duel.SelectYesNo(tp,aux.Stringid(33400208,3)) then
local e1=Effect.CreateEffect(tc2)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c33400208.distg2)
e1:SetLabelObject(tc1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(tc2)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c33400208.discon2)
e2:SetOperation(c33400208.disop2)
e2:SetLabelObject(tc1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
if tc:IsCode(ac) then
Duel.Damage(1-tp,1000,REASON_EFFECT)
if tc1:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(33400208,4))then
Duel.SendtoGrave(tc1,REASON_EFFECT)
end
end
end
function c33400208.distg2(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c33400208.discon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c33400208.disop2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
This diff is collapsed.
This diff is collapsed.
--吉姆III
function c47530140.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47530140,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,47530140)
e1:SetCondition(c47530140.spcon)
e1:SetTarget(c47530140.sptg)
e1:SetOperation(c47530140.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c47530140.distg)
e2:SetOperation(c47530140.disop)
c:RegisterEffect(e2)
end
function c47530140.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(4)
end
function c47530140.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c47530140.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c47530140.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c47530140.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c47530140.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c47530140.splimit(e,c)
return not c:IsRace(RACE_MACHINE) and c:IsSummonType(TYPE_LINK)
end
function c47530140.disfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c47530140.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c47530140.disfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c47530140.disfilter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c47530140.disfilter,tp,0,LOCATION_ONFIELD,1,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c47530140.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
while tc do
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: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
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_TRIGGER)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
--吉姆III
function c47530140.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47530140,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,47530140)
e1:SetCondition(c47530140.spcon)
e1:SetTarget(c47530140.sptg)
e1:SetOperation(c47530140.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,47530141)
e2:SetTarget(c47530140.distg)
e2:SetOperation(c47530140.disop)
c:RegisterEffect(e2)
end
function c47530140.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(4)
end
function c47530140.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c47530140.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c47530140.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c47530140.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c47530140.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c47530140.splimit(e,c)
return not c:IsRace(RACE_MACHINE) and c:IsSummonType(TYPE_LINK)
end
function c47530140.disfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c47530140.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c47530140.disfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c47530140.disfilter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c47530140.disfilter,tp,0,LOCATION_ONFIELD,1,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c47530140.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
while tc do
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: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
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_TRIGGER)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
end
\ No newline at end of file
--皇家骑士战场
function c60152611.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152611,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c60152611.e2con)
e2:SetTarget(c60152611.e2tg)
e2:SetOperation(c60152611.e2op)
c:RegisterEffect(e2)
--level change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60152611,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetTarget(c60152611.e3tg)
e3:SetOperation(c60152611.e3op)
c:RegisterEffect(e3)
end
function c60152611.e2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c60152611.e2tgfilter(c)
return return c:IsSetCard(0x6b27) and c:IsSummonable(true,nil)
end
function c60152611.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152611.e2tgfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c60152611.e2op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c60152611.e2tgfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c60152611.e3tgfilter(c)
return not c:IsPublic()
end
function c60152611.e3tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152611.e3tgfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60152611.e3op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDraw(tp) then return end
local ks=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ks2=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ks>ks2 then ks=ks2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c60152611.e3tgfilter,tp,LOCATION_HAND,0,1,ks,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
end
end
--皇家骑士战场
function c60152611.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152611,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c60152611.e2con)
e2:SetTarget(c60152611.e2tg)
e2:SetOperation(c60152611.e2op)
c:RegisterEffect(e2)
--level change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60152611,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetTarget(c60152611.e3tg)
e3:SetOperation(c60152611.e3op)
c:RegisterEffect(e3)
end
function c60152611.e2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c60152611.e2tgfilter(c)
return c:IsSetCard(0x6b27) and c:IsSummonable(true,nil)
end
function c60152611.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152611.e2tgfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c60152611.e2op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c60152611.e2tgfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c60152611.e3tgfilter(c)
return not c:IsPublic()
end
function c60152611.e3tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152611.e3tgfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60152611.e3op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDraw(tp) then return end
local ks=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ks2=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ks>ks2 then ks=ks2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c60152611.e3tgfilter,tp,LOCATION_HAND,0,1,ks,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
if Duel.Draw(tp,g:GetCount(),REASON_EFFECT)>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
end
end
--天知之翼的骑行
function c65010556.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,65010556)
e1:SetTarget(c65010556.target)
e1:SetOperation(c65010556.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65010556,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,65010557)
e2:SetTarget(c65010556.sptg)
e2:SetOperation(c65010556.spop)
c:RegisterEffect(e2)
end
function c65010556.filter(c,e,tp)
return (c:IsCode(65010558) or c:IsCode(65010552)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65010556.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65010556.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c65010556.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65010556.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SpecialSummonStep(g,0,tp,tp,false,false,POS_FACEUP)
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)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c65010556.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c65010556.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c65010556.filter2(c,e,tp,m,f,chkf)
if c:IsCode(65010554) then
local mg=Duel.GetMatchingGroup(c65010556.filter0,tp,LOCATION_GRAVE,0,nil)
m:Merge(mg)
end
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c65010556.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsAbleToRemove,nil)
local res=Duel.IsExistingMatchingCard(c65010556.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c65010556.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
function c65010556.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsAbleToRemove,nil):Filter(c65010556.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c65010556.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c65010556.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if tc:IsCode(65010554) then
local mg=Duel.GetMatchingGroup(c65010556.filter0,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg)
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--天知之翼的骑行
function c65010556.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,65010556)
e1:SetTarget(c65010556.target)
e1:SetOperation(c65010556.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65010556,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,65010557)
e2:SetTarget(c65010556.sptg)
e2:SetOperation(c65010556.spop)
c:RegisterEffect(e2)
end
function c65010556.filter(c,e,tp)
return (c:IsCode(65010558) or c:IsCode(65010552)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65010556.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65010556.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c65010556.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65010556.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c65010556.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c65010556.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c65010556.filter2(c,e,tp,m,f,chkf)
if c:IsCode(65010554) then
local mg=Duel.GetMatchingGroup(c65010556.filter0,tp,LOCATION_GRAVE,0,nil)
m:Merge(mg)
end
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c65010556.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsAbleToRemove,nil)
local res=Duel.IsExistingMatchingCard(c65010556.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c65010556.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
function c65010556.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsAbleToRemove,nil):Filter(c65010556.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c65010556.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c65010556.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if tc:IsCode(65010554) then
local mg=Duel.GetMatchingGroup(c65010556.filter0,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg)
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--奇妙仙灵 彩片翼
function c65050202.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x9da8),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65050202,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,65050202)
e1:SetCondition(c65050202.con1)
e1:SetTarget(c65050202.tg)
e1:SetOperation(c65050202.op)
c:RegisterEffect(e1)
local e0=e1:Clone()
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCondition(c65050202.con2)
c:RegisterEffect(e0)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65050202,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,65050202)
e2:SetCondition(c65050202.condition1)
e2:SetTarget(c65050202.target)
e2:SetOperation(c65050202.activate)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCondition(c65050202.condition2)
c:RegisterEffect(e3)
end
function c65050202.condfil(c)
return c:IsFaceup() and c:IsType(TYPE_TUNER)
end
function c65050202.condition1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,65050211) and Duel.IsExistingMatchingCard(c65050202.condfil,tp,LOCATION_MZONE,0,1,nil)
end
function c65050202.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,65050211) and Duel.IsExistingMatchingCard(c65050202.condfil,tp,LOCATION_MZONE,0,1,nil)
end
function c65050202.filter(c,e,tp)
return c:IsSetCard(0x9da8) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsLevel(3)
end
function c65050202.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c65050202.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c65050202.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c65050202.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c65050202.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c65050202.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,65050211)
end
function c65050202.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,65050211)
end
function c65050202.tgfil(c,tp)
return c:IsFaceup() and c:IsLevelBelow(6) and c:IsType(TYPE_TUNER)
end
function c65050202.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65050202.tgfil(chkc,tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c65050202.tgfil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
local g=Duel.SelectTarget(tp,c65050202.tgfil,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end
function c65050202.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
--nontuner
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_NONTUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c65050202.tnval)
tc:RegisterEffect(e1)
end
end
function c65050202.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
--奇妙仙灵 彩片翼
function c65050202.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x9da8),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65050202,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,65050202)
e1:SetCondition(c65050202.con1)
e1:SetTarget(c65050202.tg)
e1:SetOperation(c65050202.op)
c:RegisterEffect(e1)
local e0=e1:Clone()
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCondition(c65050202.con2)
c:RegisterEffect(e0)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65050202,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,65050202)
e2:SetCondition(c65050202.condition1)
e2:SetTarget(c65050202.target)
e2:SetOperation(c65050202.activate)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCondition(c65050202.condition2)
c:RegisterEffect(e3)
end
function c65050202.condfil(c)
return c:IsFaceup() and c:IsType(TYPE_TUNER)
end
function c65050202.condition1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,65050211) and Duel.IsExistingMatchingCard(c65050202.condfil,tp,LOCATION_MZONE,0,1,nil)
end
function c65050202.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,65050211) and Duel.IsExistingMatchingCard(c65050202.condfil,tp,LOCATION_MZONE,0,1,nil)
end
function c65050202.filter(c,e,tp)
return c:IsSetCard(0x9da8) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsLevel(3)
end
function c65050202.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c65050202.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c65050202.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c65050202.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c65050202.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c65050202.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,65050211)
end
function c65050202.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,65050211)
end
function c65050202.tgfil(c,tp)
return c:IsFaceup() and c:IsLevelBelow(6) and c:IsType(TYPE_TUNER)
end
function c65050202.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65050202.tgfil(chkc,tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c65050202.tgfil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
local g=Duel.SelectTarget(tp,c65050202.tgfil,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end
function c65050202.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
--nontuner
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_NONTUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c65050202.tnval)
tc:RegisterEffect(e1)
end
end
function c65050202.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
--奇妙仙灵 华净翼
function c65050204.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x9da8),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,65050204)
e1:SetCondition(c65050204.con1)
e1:SetTarget(c65050204.tg)
e1:SetOperation(c65050204.op)
c:RegisterEffect(e1)
local e0=e1:Clone()
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCondition(c65050204.con2)
c:RegisterEffect(e0)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,65050204)
e2:SetCondition(c65050204.condition)
e2:SetTarget(c65050204.target)
e2:SetOperation(c65050204.activate)
c:RegisterEffect(e2)
end
function c65050204.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,65050211)
end
function c65050204.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,65050211)
end
function c65050204.tgfil(c,tp)
return c:IsFaceup() and c:IsLevelBelow(6) and c:IsAbleToGrave()
end
function c65050204.spfil(c,e,tp)
return c:IsSetCard(0x9da8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65050204.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65050204.tgfil(chkc,tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c65050204.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(c65050204.spfil,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
local g=Duel.SelectTarget(tp,c65050204.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c65050204.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget()
local g=Duel.SelectMatchingCard(tp,c65050204.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g and Duel.SpecialSummon(g,0,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c65050204.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c65050204.filter(c)
return c:IsSetCard(0x9da8) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function c65050204.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65050204.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c65050204.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c65050204.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
--奇妙仙灵 华净翼
function c65050204.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x9da8),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,65050204)
e1:SetCondition(c65050204.con1)
e1:SetTarget(c65050204.tg)
e1:SetOperation(c65050204.op)
c:RegisterEffect(e1)
local e0=e1:Clone()
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCondition(c65050204.con2)
c:RegisterEffect(e0)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,65050204)
e2:SetCondition(c65050204.condition)
e2:SetTarget(c65050204.target)
e2:SetOperation(c65050204.activate)
c:RegisterEffect(e2)
end
function c65050204.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,65050211)
end
function c65050204.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,65050211)
end
function c65050204.tgfil(c,tp)
return c:IsFaceup() and c:IsLevelBelow(6) and c:IsAbleToGrave()
end
function c65050204.spfil(c,e,tp)
return c:IsSetCard(0x9da8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65050204.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65050204.tgfil(chkc,tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c65050204.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(c65050204.spfil,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
local g=Duel.SelectTarget(tp,c65050204.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c65050204.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget()
local g=Duel.SelectMatchingCard(tp,c65050204.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c65050204.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c65050204.filter(c)
return c:IsSetCard(0x9da8) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function c65050204.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65050204.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c65050204.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c65050204.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--掠夺星曜·贪狼
local m=66915014
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(97616504,0))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.drcon)
e4:SetTarget(cm.drtg)
e4:SetOperation(cm.drop)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(cm.eftg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
--recover
local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_RECOVER)
e11:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e11:SetCode(EVENT_BATTLE_DESTROYING)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e11:SetCondition(cm.reccon)
e11:SetTarget(cm.rectg)
e11:SetOperation(cm.recop)
local e55=Effect.CreateEffect(c)
e55:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e55:SetRange(LOCATION_MZONE)
e55:SetTargetRange(LOCATION_MZONE,0)
e55:SetTarget(cm.eftg)
e55:SetLabelObject(e11)
c:RegisterEffect(e55)
--spsummon limit
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_FIELD)
e22:SetRange(LOCATION_SZONE)
e22:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e22:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e22:SetTargetRange(1,0)
e22:SetTarget(cm.sumlimit)
c:RegisterEffect(e22)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(66915001)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_SZONE,0,1,nil) and eg:GetFirst()==ec and Duel.GetAttacker()==ec
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(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
function cm.eftg(e,c)
local seq=c:GetSequence()
return c:IsSetCard(0x1374)
and seq<5 and math.abs(e:GetHandler():GetSequence()-seq)<=1
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=Duel.GetAttackTarget()
if ev==1 then t=Duel.GetAttacker() end
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabel(t:GetAttack())
return t:GetLocation()==LOCATION_GRAVE and t:IsType(TYPE_MONSTER)
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel())
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1374)
--掠夺星曜·贪狼
local m=66915014
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(97616504,0))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.drcon)
e4:SetTarget(cm.drtg)
e4:SetOperation(cm.drop)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(cm.eftg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
--recover
local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_RECOVER)
e11:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e11:SetCode(EVENT_BATTLE_DESTROYING)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e11:SetCondition(cm.reccon)
e11:SetTarget(cm.rectg)
e11:SetOperation(cm.recop)
local e55=Effect.CreateEffect(c)
e55:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e55:SetRange(LOCATION_SZONE)
e55:SetTargetRange(LOCATION_MZONE,0)
e55:SetTarget(cm.eftg)
e55:SetLabelObject(e11)
c:RegisterEffect(e55)
--spsummon limit
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_FIELD)
e22:SetRange(LOCATION_SZONE)
e22:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e22:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e22:SetTargetRange(1,0)
e22:SetTarget(cm.sumlimit)
c:RegisterEffect(e22)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(66915001)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_SZONE,0,1,nil) and eg:GetFirst()==ec and Duel.GetAttacker()==ec
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(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
function cm.eftg(e,c)
local seq=c:GetSequence()
return c:IsSetCard(0x1374)
and seq<5 and math.abs(e:GetHandler():GetSequence()-seq)<=1
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=Duel.GetAttackTarget()
if ev==1 then t=Duel.GetAttacker() end
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabel(t:GetAttack())
return t:GetLocation()==LOCATION_GRAVE and t:IsType(TYPE_MONSTER)
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel())
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1374)
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