Commit fe368466 authored by Nemo Ma's avatar Nemo Ma

fix

parent b5ad820e
...@@ -46,6 +46,17 @@ function cm.initial_effect(c) ...@@ -46,6 +46,17 @@ function cm.initial_effect(c)
e6:SetValue(0x6d) e6:SetValue(0x6d)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.spfilter(c,sc) function cm.spfilter(c,sc)
return c:IsCanBeXyzMaterial(sc) and ((c:IsFaceup() and (c:IsXyzLevel(sc,8) or (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_FAIRY)))) or (c:IsLocation(LOCATION_HAND) and (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_FAIRY)))) return c:IsCanBeXyzMaterial(sc) and ((c:IsFaceup() and (c:IsXyzLevel(sc,8) or (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_FAIRY)))) or (c:IsLocation(LOCATION_HAND) and (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_FAIRY))))
end end
...@@ -68,7 +79,7 @@ function cm.spcon(e,c,og,min,max) ...@@ -68,7 +79,7 @@ function cm.spcon(e,c,og,min,max)
else else
mg=g mg=g
end end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X) aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
...@@ -90,7 +101,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max) ...@@ -90,7 +101,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
else else
mg=g mg=g
end end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
......
...@@ -44,6 +44,17 @@ function cm.initial_effect(c) ...@@ -44,6 +44,17 @@ function cm.initial_effect(c)
e6:SetValue(0x6d) e6:SetValue(0x6d)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.spfilter(c,sc) function cm.spfilter(c,sc)
return c:IsCanBeXyzMaterial(sc) and ((c:IsFaceup() and (c:IsXyzLevel(sc,8) or (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_FAIRY)))) or (c:IsLocation(LOCATION_HAND) and (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_FAIRY)))) return c:IsCanBeXyzMaterial(sc) and ((c:IsFaceup() and (c:IsXyzLevel(sc,8) or (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_FAIRY)))) or (c:IsLocation(LOCATION_HAND) and (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_FAIRY))))
end end
...@@ -66,7 +77,7 @@ function cm.spcon(e,c,og,min,max) ...@@ -66,7 +77,7 @@ function cm.spcon(e,c,og,min,max)
else else
mg=g mg=g
end end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X) aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
...@@ -88,7 +99,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max) ...@@ -88,7 +99,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
else else
mg=g mg=g
end end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
......
...@@ -62,6 +62,17 @@ function cm.initial_effect(c) ...@@ -62,6 +62,17 @@ function cm.initial_effect(c)
Auxiliary.GetLinkCount=function(tc) if tc:GetOriginalCode()==m and tc:IsLocation(LOCATION_PZONE) then return 0x20001 else return _GetLinkCount(tc) end end Auxiliary.GetLinkCount=function(tc) if tc:GetOriginalCode()==m and tc:IsLocation(LOCATION_PZONE) then return 0x20001 else return _GetLinkCount(tc) end end
end end
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.lcheck(g) function cm.lcheck(g)
return g:GetClassCount(Card.GetLinkRace)==1 and g:GetClassCount(Card.GetCode)==g:GetCount() return g:GetClassCount(Card.GetLinkRace)==1 and g:GetClassCount(Card.GetCode)==g:GetCount()
end end
...@@ -91,7 +102,7 @@ function cm.LinkCondition(f,minc,maxc,gf) ...@@ -91,7 +102,7 @@ function cm.LinkCondition(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(Auxiliary.LCheckGoal,minc,maxc,tp,c,gf,lmat) return mg:CheckSubGroup(Auxiliary.LCheckGoal,minc,maxc,tp,c,gf,lmat)
......
--诡雷战队S -分化者- --诡雷战队S -分化者-
--21.04.24 --21.04.24
local m=11451556 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -39,6 +38,17 @@ function cm.initial_effect(c) ...@@ -39,6 +38,17 @@ function cm.initial_effect(c)
e3:SetCondition(cm.con2) e3:SetCondition(cm.con2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.matfilter(c) function cm.matfilter(c)
return c:IsRace(RACE_WARRIOR) or cm.fdfilter(c) return c:IsRace(RACE_WARRIOR) or cm.fdfilter(c)
end end
...@@ -79,7 +89,7 @@ function cm.LinkCondition(f,minc,maxc,gf) ...@@ -79,7 +89,7 @@ function cm.LinkCondition(f,minc,maxc,gf)
if not cm.LConditionFilter(lmat,f,c) then return false end if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat) return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
...@@ -104,7 +114,7 @@ function cm.LinkTarget(f,minc,maxc,gf) ...@@ -104,7 +114,7 @@ function cm.LinkTarget(f,minc,maxc,gf)
if not cm.LConditionFilter(lmat,f,c) then return false end if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
......
--诡雷战队V -变革者- --诡雷战队V -变革者-
--21.04.24 --21.04.24
local m=11451557 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -40,6 +39,17 @@ function cm.initial_effect(c) ...@@ -40,6 +39,17 @@ function cm.initial_effect(c)
e3:SetCondition(cm.con2) e3:SetCondition(cm.con2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.matfilter(c) function cm.matfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) or cm.fdfilter(c) return c:IsAttribute(ATTRIBUTE_FIRE) or cm.fdfilter(c)
end end
...@@ -80,7 +90,7 @@ function cm.LinkCondition(f,minc,maxc,gf) ...@@ -80,7 +90,7 @@ function cm.LinkCondition(f,minc,maxc,gf)
if not cm.LConditionFilter(lmat,f,c) then return false end if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat) return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
...@@ -105,7 +115,7 @@ function cm.LinkTarget(f,minc,maxc,gf) ...@@ -105,7 +115,7 @@ function cm.LinkTarget(f,minc,maxc,gf)
if not cm.LConditionFilter(lmat,f,c) then return false end if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
......
--诡雷战队R -颠覆者- --诡雷战队R -颠覆者-
--21.04.24 --21.04.24
local m=11451558 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -39,6 +38,17 @@ function cm.initial_effect(c) ...@@ -39,6 +38,17 @@ function cm.initial_effect(c)
e3:SetCondition(cm.con2) e3:SetCondition(cm.con2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.matfilter(c) function cm.matfilter(c)
return c:IsType(TYPE_EFFECT) or cm.fdfilter(c) return c:IsType(TYPE_EFFECT) or cm.fdfilter(c)
end end
...@@ -79,7 +89,7 @@ function cm.LinkCondition(f,minc,maxc,gf) ...@@ -79,7 +89,7 @@ function cm.LinkCondition(f,minc,maxc,gf)
if not cm.LConditionFilter(lmat,f,c) then return false end if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat) return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
...@@ -104,7 +114,7 @@ function cm.LinkTarget(f,minc,maxc,gf) ...@@ -104,7 +114,7 @@ function cm.LinkTarget(f,minc,maxc,gf)
if not cm.LConditionFilter(lmat,f,c) then return false end if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
......
...@@ -54,6 +54,17 @@ function cm.initial_effect(c) ...@@ -54,6 +54,17 @@ function cm.initial_effect(c)
Duel.RegisterEffect(ge6,0) Duel.RegisterEffect(ge6,0)
end end
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttackTarget() local tc=Duel.GetAttackTarget()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
...@@ -112,7 +123,7 @@ function cm.LinkCondition(f,minc,maxc,gf) ...@@ -112,7 +123,7 @@ function cm.LinkCondition(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat) return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
...@@ -137,7 +148,7 @@ function cm.LinkTarget(f,minc,maxc,gf) ...@@ -137,7 +148,7 @@ function cm.LinkTarget(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
......
...@@ -40,6 +40,17 @@ function cm.initial_effect(c) ...@@ -40,6 +40,17 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.mfilter(c,xyzc) function cm.mfilter(c,xyzc)
return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,9) return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,9)
end end
...@@ -110,7 +121,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct) ...@@ -110,7 +121,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else else
mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f) mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
end end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X) aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
......
...@@ -40,6 +40,17 @@ function cm.initial_effect(c) ...@@ -40,6 +40,17 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.mfilter(c,xyzc) function cm.mfilter(c,xyzc)
return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,9) return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,9)
end end
...@@ -100,7 +111,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct) ...@@ -100,7 +111,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else else
mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f) mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
end end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X) aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
......
...@@ -39,6 +39,17 @@ function cm.initial_effect(c) ...@@ -39,6 +39,17 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.mfilter(c,xyzc) function cm.mfilter(c,xyzc)
return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,9) return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,9)
end end
...@@ -97,7 +108,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct) ...@@ -97,7 +108,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else else
mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f) mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
end end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X) aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
......
...@@ -40,6 +40,17 @@ function cm.initial_effect(c) ...@@ -40,6 +40,17 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
if not Duel.GetMustMaterial then
function Duel.GetMustMaterial(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
end
function cm.mfilter(c,xyzc) function cm.mfilter(c,xyzc)
return c:IsXyzType(TYPE_MONSTER) and (c:IsRank(9) or (c:IsXyzLevel(xyzc,9) and xyzc:GetFlagEffect(m-17)>0)) return c:IsXyzType(TYPE_MONSTER) and (c:IsRank(9) or (c:IsXyzLevel(xyzc,9) and xyzc:GetFlagEffect(m-17)>0))
end end
...@@ -101,7 +112,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct) ...@@ -101,7 +112,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else else
mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f) mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
end end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X) aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
......
...@@ -68,6 +68,7 @@ function cm.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,6 +68,7 @@ function cm.pop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,nil) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end end
end end
end end
......
...@@ -59,6 +59,7 @@ function cm.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,6 +59,7 @@ function cm.pop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,nil) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end end
end end
end end
......
...@@ -30,8 +30,7 @@ function cm.Foreigner(c) ...@@ -30,8 +30,7 @@ function cm.Foreigner(c)
return m and m.named_with_Foreigner return m and m.named_with_Foreigner
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler() if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(re:GetHandler()) then
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(tc) then
e:SetLabel(1) e:SetLabel(1)
end end
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
......
...@@ -32,8 +32,8 @@ function cm.Foreigner(c) ...@@ -32,8 +32,8 @@ function cm.Foreigner(c)
return m and m.named_with_Foreigner return m and m.named_with_Foreigner
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(tc) then if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(re:GetHandler()) then
e:SetLabel(1) e:SetLabel(1)
end end
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
......
...@@ -32,8 +32,8 @@ function cm.Foreigner(c) ...@@ -32,8 +32,8 @@ function cm.Foreigner(c)
return m and m.named_with_Foreigner return m and m.named_with_Foreigner
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(tc) then if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(re:GetHandler()) then
e:SetLabel(1) e:SetLabel(1)
end end
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
......
...@@ -32,8 +32,8 @@ function cm.Foreigner(c) ...@@ -32,8 +32,8 @@ function cm.Foreigner(c)
return m and m.named_with_Foreigner return m and m.named_with_Foreigner
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(tc) then if e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) and cm.Foreigner(re:GetHandler()) then
e:SetLabel(1) e:SetLabel(1)
end end
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and (re:IsActiveType(TYPE_MONSTER+TYPE_TRAP+TYPE_SPELL) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
......
...@@ -10,7 +10,7 @@ function cm.initial_effect(c) ...@@ -10,7 +10,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--SearchCard --SearchCard
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
...@@ -42,8 +42,8 @@ function cm.initial_effect(c) ...@@ -42,8 +42,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c43990003.filter(c) function c43990003.filter(c,e,tp,ft)
return c:IsSetCard(0x166) and c:IsAbleToHand() return c:IsSetCard(0x166) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end end
function c43990003.target(e,tp,eg,ep,ev,re,r,rp,chk) function c43990003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -57,14 +57,23 @@ function c43990003.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,14 +57,23 @@ function c43990003.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c43990003.activate(e,tp,eg,ep,ev,re,r,rp) function c43990003.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.ConfirmDecktop(p,5) Duel.ConfirmDecktop(p,5)
local g=Duel.GetDecktopGroup(p,5) local g=Duel.GetDecktopGroup(p,5)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local sg=g:FilterSelect(tp,c43990003.filter,1,1,nil,e,tp) local sg=g:FilterSelect(tp,c43990003.filter,1,1,nil,e,tp,ft)
Duel.SendtoHand(sg,nil,REASON_EFFECT) local tc=sg:GetFirst()
Duel.ConfirmCards(1-p,sg) if tc then
Duel.ShuffleDeck(p) if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end end
end end
function c43990003.cfilter(c,tp) function c43990003.cfilter(c,tp)
......
...@@ -28,7 +28,6 @@ function cm.initial_effect(c) ...@@ -28,7 +28,6 @@ function cm.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c43990005.indescon)
e2:SetTarget(c43990005.indestg) e2:SetTarget(c43990005.indestg)
e2:SetValue(aux.tgoval) e2:SetValue(aux.tgoval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -48,17 +47,21 @@ function c43990005.effcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,17 +47,21 @@ function c43990005.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c43990005.thfilter(c) function c43990005.thfilter(c)
return c:IsSetCard(0x166) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x166) and c:IsAbleToHand()
end
function c43990005.spfilter(c,e,tp)
return c:IsSetCard(0x166) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c43990005.efftg(e,tp,eg,ep,ev,re,r,rp,chk) function c43990005.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local chk1=e:GetLabel()&1>0 local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0 local chk2=e:GetLabel()&2>0
if chk==0 then return chk1 and Duel.IsPlayerCanDraw(tp,1) if chk==0 then return chk1 and Duel.IsExistingMatchingCard(c43990005.thfilter,tp,LOCATION_GRAVE,0,1,nil)
or chk2 and Duel.IsExistingMatchingCard(c43990005.thfilter,tp,LOCATION_DECK,0,1,nil) end or chk2 and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c43990005.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)) end
e:SetCategory(0) e:SetCategory(0)
if chk1 then if chk1 then
e:SetCategory(CATEGORY_DRAW) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
if chk2 then if chk2 then
e:SetCategory(e:GetCategory()|(CATEGORY_TOHAND+CATEGORY_SEARCH)) e:SetCategory(e:GetCategory()|(CATEGORY_TOHAND+CATEGORY_SEARCH))
...@@ -70,9 +73,6 @@ function c43990005.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,9 +73,6 @@ function c43990005.effop(e,tp,eg,ep,ev,re,r,rp)
local chk1=e:GetLabel()&1>0 local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0 local chk2=e:GetLabel()&2>0
if chk1 then if chk1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if chk2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c43990005.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c43990005.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -81,9 +81,30 @@ function c43990005.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,9 +81,30 @@ function c43990005.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
end if chk2 then
function c43990005.indescon(e) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return Duel.IsExistingMatchingCard(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_FZONE,LOCATION_FZONE,1,nil) if ft<=0 then return end
if ft>2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c43990005.spfilter),tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
end
end end
function c43990005.indestg(e,c) function c43990005.indestg(e,c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsSetCard(0x166) return c:IsSummonLocation(LOCATION_EXTRA) and c:IsSetCard(0x166)
......
...@@ -2431,7 +2431,7 @@ function cm.LinkCondition(f,minc,maxc,gf,code) ...@@ -2431,7 +2431,7 @@ function cm.LinkCondition(f,minc,maxc,gf,code)
if not aux.LConditionFilter(lmat,f,c,e) then return false end if not aux.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(aux.LCheckGoal,minc,maxc,tp,c,gf,lmat) return mg:CheckSubGroup(aux.LCheckGoal,minc,maxc,tp,c,gf,lmat)
...@@ -2456,7 +2456,7 @@ function cm.LinkTarget(f,minc,maxc,gf) ...@@ -2456,7 +2456,7 @@ function cm.LinkTarget(f,minc,maxc,gf)
if not cm.LConditionFilter(lmat,f,c,e) then return false end if not cm.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
...@@ -4224,3 +4224,63 @@ function cm.GelidimenCheck(e,tp,eg,ep,ev,re,r,rp) ...@@ -4224,3 +4224,63 @@ function cm.GelidimenCheck(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function cm.RabbitTeam(c)
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.RabbitTeamspcon)
e1:SetOperation(cm.RabbitTeamspop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(0xff)
e2:SetOperation(cm.RabbitTeamCheck)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL+53755000)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(cm.RabbitTeamrecon)
e3:SetValue(LOCATION_DECK)
c:RegisterEffect(e3)
end
function cm.RabbitTeamspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local num=53755000
for i=1,4 do if c["Rabbit_Team_Number_"..i] then num=num+i end end
return Duel.GetFlagEffect(tp,num)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.RabbitTeamspop(e,tp,eg,ep,ev,re,r,rp,c)
local num=53755000
for i=1,4 do if c["Rabbit_Team_Number_"..i] then num=num+i end end
local ct=Duel.GetFlagEffect(tp,num)
Duel.ResetFlagEffect(tp,num)
for i=1,ct-1 do Duel.RegisterFlagEffect(tp,num,RESET_PHASE+PHASE_END,0,1) end
Duel.ShuffleDeck(tp)
end
function cm.RabbitTeamrecon(e)
local c=e:GetHandler()
return c:GetReasonPlayer()~=c:GetControler()
end
function cm.RabbitTeamCheck(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,53755000)>0 then return end
Duel.RegisterFlagEffect(0,53755000,0,0,0)
f=Duel.ConfirmDecktop
Duel.ConfirmDecktop=function(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct)
local t={}
for tc in aux.Next(g) do
for i=1,4 do
if tc["Rabbit_Team_Number_"..i] and not cm.IsInTable(i,t) then table.insert(t,i) end
end
end
for _,v in ipairs(t) do Duel.RegisterFlagEffect(tp,53755000+v,RESET_PHASE+PHASE_END,0,1) end
return f(tp,ct)
end
end
...@@ -100,7 +100,7 @@ function cm.LinkCondition(f,minc,maxc,gf) ...@@ -100,7 +100,7 @@ function cm.LinkCondition(f,minc,maxc,gf)
if not cm.LConditionFilter(lmat,f,c) then return false end if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat) return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
...@@ -125,7 +125,7 @@ function cm.LinkTarget(f,minc,maxc,gf) ...@@ -125,7 +125,7 @@ function cm.LinkTarget(f,minc,maxc,gf)
if not cm.LConditionFilter(lmat,f,c) then return false end if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.GetCurrentChain()==0 local cancel=Duel.GetCurrentChain()==0
......
...@@ -77,7 +77,7 @@ function cm.LinkCondition(f,minc,maxc,gf) ...@@ -77,7 +77,7 @@ function cm.LinkCondition(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat) return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
...@@ -102,7 +102,7 @@ function cm.LinkTarget(f,minc,maxc,gf) ...@@ -102,7 +102,7 @@ function cm.LinkTarget(f,minc,maxc,gf)
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat) mg:AddCard(lmat)
end end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL) local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg) Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable() local cancel=Duel.IsSummonCancelable()
......
...@@ -4,8 +4,7 @@ local cm=_G["c"..m] ...@@ -4,8 +4,7 @@ local cm=_G["c"..m]
cm.name="孤独星球" cm.name="孤独星球"
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),1,1) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99)
c:EnableReviveLimit()
--open --open
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
...@@ -9,8 +9,8 @@ function cm.initial_effect(c) ...@@ -9,8 +9,8 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SUMMON_PROC) e3:SetCode(EFFECT_SUMMON_PROC)
e3:SetCondition(cm.otcon) e3:SetCondition(cm.sumcon)
e3:SetOperation(cm.otop) e3:SetOperation(cm.sumop)
e3:SetValue(SUMMON_TYPE_ADVANCE) e3:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--进化 --进化
...@@ -44,31 +44,42 @@ function cm.initial_effect(c) ...@@ -44,31 +44,42 @@ function cm.initial_effect(c)
-- Duel.RegisterEffect(ge1,0) -- Duel.RegisterEffect(ge1,0)
-- end -- end
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_HAND) e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCost(cm.spcost)
e4:SetCondition(cm.spcon2)
e4:SetTarget(cm.target) e4:SetTarget(cm.target)
e4:SetOperation(cm.op) e4:SetOperation(cm.op)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
cm.named_with_treasure=true cm.named_with_treasure=true
function cm.otcon(e,c,minc) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
end
function cm.cfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup())
end
function cm.sumcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local min=1
if minc>=1 then min=minc end
local tp=c:GetControler() local tp=c:GetControler()
return c:GetLevel()>6 and minc<=2 local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.CheckTribute(c,2)) return c:IsLevelAbove(5) and Duel.CheckTribute(c,min,10,mg)
or c:GetLevel()>=1 and c:GetLevel()<=6 and minc<=1 end
and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckTribute(c,1) function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c,minc)
end local min=1
function cm.otop(e,tp,eg,ep,ev,re,r,rp,c) if minc>=1 then min=minc end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local ct=-ft local sg=Duel.SelectTribute(tp,c,min,10,mg)
if ct<=1 then ct=1 end c:SetMaterial(sg)
if c:GetLevel()>6 and ct<2 then ct=2 end Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
local g=Duel.SelectTribute(tp,c,ct,99)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end end
function cm.mgfilter(c,e,tp,fusc) function cm.mgfilter(c,e,tp,fusc)
return bit.band(c:GetReason(),0x12)==0x12 and c:GetReasonCard()==fusc return bit.band(c:GetReason(),0x12)==0x12 and c:GetReasonCard()==fusc
...@@ -162,14 +173,18 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -162,14 +173,18 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil,e,tp) local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g:GetCount()<1 then return end if g:GetCount()<1 then return end
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,60001211,RESET_PHASE+PHASE_END,0,1000) Duel.RegisterFlagEffect(tp,60001211,RESET_PHASE+PHASE_END,0,1000)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()==0
end end
......
...@@ -5,10 +5,11 @@ cm.name="空绝的残光" ...@@ -5,10 +5,11 @@ cm.name="空绝的残光"
function cm.initial_effect(c) function cm.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0)) e4:SetDescription(aux.Stringid(m,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_HAND) e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCost(cm.spcost)
e4:SetTarget(cm.target) e4:SetTarget(cm.target)
e4:SetOperation(cm.op) e4:SetOperation(cm.op)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -32,6 +33,13 @@ function cm.initial_effect(c) ...@@ -32,6 +33,13 @@ function cm.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
...@@ -48,12 +56,18 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,12 +56,18 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
Duel.RegisterFlagEffect(tp,60001211,RESET_PHASE+PHASE_END,0,1000) Duel.RegisterFlagEffect(tp,60001211,RESET_PHASE+PHASE_END,0,1000)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1000) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1000)
end end
...@@ -97,4 +111,4 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,4 +111,4 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.splimit(e,c) function cm.splimit(e,c)
return not c.named_with_treasure return not c.named_with_treasure
end end
\ No newline at end of file
...@@ -29,9 +29,10 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,9 +29,10 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
tc=eg:GetNext() tc=eg:GetNext()
end end
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......
...@@ -4,7 +4,7 @@ local cm=_G["c"..m] ...@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.name="孤独星球" cm.name="孤独星球"
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),1,1) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99)
c:EnableReviveLimit() c:EnableReviveLimit()
--open --open
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -10,8 +10,8 @@ function cm.initial_effect(c) ...@@ -10,8 +10,8 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SUMMON_PROC) e3:SetCode(EFFECT_SUMMON_PROC)
e3:SetCondition(cm.otcon) e3:SetCondition(cm.sumcon)
e3:SetOperation(cm.otop) e3:SetOperation(cm.sumop)
e3:SetValue(SUMMON_TYPE_ADVANCE) e3:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--进化 --进化
...@@ -24,22 +24,24 @@ function cm.initial_effect(c) ...@@ -24,22 +24,24 @@ function cm.initial_effect(c)
e4:SetOperation(cm.drop) e4:SetOperation(cm.drop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.otcon(e,c,minc) function cm.cfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup())
end
function cm.sumcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local min=1
if minc>=1 then min=minc end
local tp=c:GetControler() local tp=c:GetControler()
return c:GetLevel()>6 and minc<=2 local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.CheckTribute(c,2)) return c:IsLevelAbove(5) and Duel.CheckTribute(c,min,10,mg)
or c:GetLevel()>=1 and c:GetLevel()<=6 and minc<=1
and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckTribute(c,1)
end end
function cm.otop(e,tp,eg,ep,ev,re,r,rp,c) function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local min=1
local ct=-ft if minc>=1 then min=minc end
if ct<=1 then ct=1 end local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
if c:GetLevel()>6 and ct<2 then ct=2 end local sg=Duel.SelectTribute(tp,c,min,10,mg)
local g=Duel.SelectTribute(tp,c,ct,99) c:SetMaterial(sg)
c:SetMaterial(g) Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end end
function cm.mgfilter(c,e,tp,fusc) function cm.mgfilter(c,e,tp,fusc)
return bit.band(c:GetReason(),0x12)==0x12 and c:GetReasonCard()==fusc return bit.band(c:GetReason(),0x12)==0x12 and c:GetReasonCard()==fusc
......
...@@ -21,9 +21,9 @@ function cm.initial_effect(c) ...@@ -21,9 +21,9 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e3:SetCondition(aux.exccon) e3:SetCondition(aux.exccon)
e2:SetCost(cm.thcost) e2:SetCost(cm.thcost2)
e2:SetTarget(cm.target) e2:SetTarget(cm.target2)
e2:SetOperation(cm.activate) e2:SetOperation(cm.activate2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.cfilter(c) function cm.cfilter(c)
...@@ -38,7 +38,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end end
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(703897,tp,ACTIVITY_SPSUMMON)==0 if chk==0 then return Duel.GetCustomActivityCount(703897,tp,ACTIVITY_SPSUMMON)==0
and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1) aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
...@@ -60,7 +60,7 @@ end ...@@ -60,7 +60,7 @@ end
function cm.fcheck(tp,sg,fc) function cm.fcheck(tp,sg,fc)
return sg:GetCount()<=2 and sg:IsExists(Card.IsFusionCode,1,nil,68468459) return sg:GetCount()<=2 and sg:IsExists(Card.IsFusionCode,1,nil,68468459)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
...@@ -80,7 +80,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,7 +80,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_DECK,0,nil)
......
...@@ -40,20 +40,20 @@ function c79029803.spcon(e,c) ...@@ -40,20 +40,20 @@ function c79029803.spcon(e,c)
not Duel.IsExistingMatchingCard(c79029803.xxfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(Card.IsFacedown,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)>0 not Duel.IsExistingMatchingCard(c79029803.xxfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(Card.IsFacedown,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)>0
end end
function c79029803.defilter(c) function c79029803.defilter(c)
return c:IsLocation(LOCATION_SZONE) or (c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsFaceup()) return c:IsType(TYPE_TRAP+TYPE_SPELL)
end end
function c79029803.tgcon(e,tp,eg,ep,ev,re,r,rp) function c79029803.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c79029803.detg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029803.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029803.defilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(c79029803.defilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,0,0) local g=Duel.SelectTarget(tp,c79029803.defilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),tp,0,0)
end end
function c79029803.deop(e,tp,eg,ep,ev,re,r,rp) function c79029803.deop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local c=e:GetHandler()
local sg=Duel.SelectMatchingCard(tp,c79029803.defilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) local sg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
end end
......
...@@ -150,6 +150,7 @@ function c98920003.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -150,6 +150,7 @@ function c98920003.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98920003.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98920003.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,g)
end end
end end
function c98920003.posfilter(c) function c98920003.posfilter(c)
......
...@@ -52,9 +52,9 @@ function c98920010.costfilter(c,ec) ...@@ -52,9 +52,9 @@ function c98920010.costfilter(c,ec)
end end
function c98920010.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c98920010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c98920010.costfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,c) end if chk==0 then return Duel.IsExistingMatchingCard(c98920010.costfilter,tp,LOCATION_DECK,0,1,nil,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,c98920010.costfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,c) local cg=Duel.SelectMatchingCard(tp,c98920010.costfilter,tp,LOCATION_DECK,0,1,1,nil,c)
Duel.SendtoGrave(cg,REASON_COST) Duel.SendtoGrave(cg,REASON_COST)
e:SetLabelObject(cg:GetFirst()) e:SetLabelObject(cg:GetFirst())
end end
......
...@@ -42,10 +42,12 @@ function c9911167.ovfilter(c) ...@@ -42,10 +42,12 @@ function c9911167.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3958) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x3958) and c:IsType(TYPE_XYZ)
end end
function c9911167.xyzop(e,tp,chk) function c9911167.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9911167.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.GetFlagEffect(tp,9911167)==0
and Duel.IsExistingMatchingCard(c9911167.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9911167.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c9911167.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
Duel.RegisterFlagEffect(tp,9911167,RESET_PHASE+PHASE_END,0,1)
end end
function c9911167.imcon(e) function c9911167.imcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x3958) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x3958)
......
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