Commit 42e48753 authored by Nemo Ma's avatar Nemo Ma

fix

parent eded5375
...@@ -23,8 +23,6 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,8 +23,6 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():IsOriginalCodeRule(ac) then if e:GetLabelObject():IsOriginalCodeRule(ac) then
if Duel.CheckLPCost(tp,3000) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if Duel.CheckLPCost(tp,3000) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.PayLPCost(tp,3000) Duel.PayLPCost(tp,3000)
Duel.NegateEffect(0)
return
else else
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
--21.04.13 --21.04.13
local m=11451410 local m=11451410
local cm=_G["c"..m] local cm=_G["c"..m]
cm.IsFusionSpellTrap=true
function cm.initial_effect(c) function cm.initial_effect(c)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
...@@ -35,10 +36,6 @@ function cm.initial_effect(c) ...@@ -35,10 +36,6 @@ function cm.initial_effect(c)
e5:SetRange(0xff) e5:SetRange(0xff)
e5:SetValue(TYPE_FUSION) e5:SetValue(TYPE_FUSION)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_ADD_TYPE)
e6:SetValue(0x10000000)
c:RegisterEffect(e6)
end end
function cm.valcheck(e,c) function cm.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
......
...@@ -56,16 +56,13 @@ end ...@@ -56,16 +56,13 @@ end
function cm.filter(c,tp) function cm.filter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x6978) return c:IsControler(tp) and c:IsSetCard(0x6978)
end end
function cm.mfilter(c)
return c:IsPreviousLocation(LOCATION_MZONE) or (c:GetPreviousLocation()&LOCATION_ONFIELD==0 and c:GetOriginalType()&0x1>0)
end
function cm.check(e,tp,eg,ep,ev,re,r,rp) function cm.check(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.mfilter,nil) for tc in aux.Next(eg) do
local g2=g:Filter(Card.IsPreviousSetCard,nil,0x6978) if (tc:IsPreviousLocation(LOCATION_MZONE) or (tc:GetPreviousLocation()&LOCATION_ONFIELD==0 and tc:GetOriginalType()&0x1>0)) and tc:IsSetCard(0x6978) then
local count0=g2:FilterCount(Card.GetPreviousControler,nil,0) local p=tc:GetReasonPlayer()
local count1=g2:FilterCount(Card.GetPreviousControler,nil,1) cm[p]=cm[p]+1
cm[0]=cm[0]+count0 end
cm[1]=cm[1]+count1 end
end end
function cm.clear(e,tp,eg,ep,ev,re,r,rp) function cm.clear(e,tp,eg,ep,ev,re,r,rp)
cm[0]=0 cm[0]=0
...@@ -113,13 +110,13 @@ end ...@@ -113,13 +110,13 @@ end
function cm.condition3(e,tp,eg,ep,ev,re,r,rp) function cm.condition3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil,TYPE_MONSTER)
g=g:Filter(Card.IsReleasable,nil) g=g:Filter(Card.IsReleasable,nil)
return g:GetCount()>0 and cm[tp]>0 return #g>0 and cm[tp]>0
end end
function cm.operation3(e,tp,eg,ep,ev,re,r,rp) function cm.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil,TYPE_MONSTER)
g=g:Filter(Card.IsReleasable,nil) g=g:Filter(Card.IsReleasable,nil)
local count=math.min(g:GetCount(),cm[tp]) local count=math.min(#g,cm[tp])
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_RELEASE)
local g2=g:Select(1-tp,count,count,nil) local g2=g:Select(1-tp,count,count,nil)
Duel.HintSelection(g2) Duel.HintSelection(g2)
......
...@@ -59,7 +59,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,7 +59,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))+1 op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))+1
end end
e:SetLabel(op) e:SetLabel(op)
if op==1 then e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION) end if op==1 then e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION) else e:SetCategory(0) end
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -106,7 +106,7 @@ function cm.thfilter(c) ...@@ -106,7 +106,7 @@ function cm.thfilter(c)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=2 or (#g>0 and Duel.IsPlayerAffectedByEffect(tp,11451481)) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and g:GetClassCount(Card.GetCode)>=2 or (#g>0 and Duel.IsPlayerAffectedByEffect(tp,11451481)) end
local op=0 local op=0
if Duel.IsPlayerAffectedByEffect(tp,11451481) then if Duel.IsPlayerAffectedByEffect(tp,11451481) then
if g:GetClassCount(Card.GetCode)>=2 then if g:GetClassCount(Card.GetCode)>=2 then
......
...@@ -86,7 +86,7 @@ end ...@@ -86,7 +86,7 @@ end
function cm.adcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,c) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,c)
if chk==0 then return #g>0 end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
sg=g:Select(tp,1,1,nil) sg=g:Select(tp,1,1,nil)
Duel.Overlay(c,sg) Duel.Overlay(c,sg)
......
...@@ -9,7 +9,6 @@ function cm.initial_effect(c) ...@@ -9,7 +9,6 @@ function cm.initial_effect(c)
--effect1 --effect1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_EVENT_PLAYER) e1:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
...@@ -71,7 +70,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,7 +70,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
op=Duel.SelectOption(tp,aux.Stringid(m,3))+2 op=Duel.SelectOption(tp,aux.Stringid(m,3))+2
end end
if op==1 then if op==1 then
e:SetCategory(CATEGORY_DECKDES)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
elseif op==2 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
else
e:SetCategory(0)
end end
e:SetLabel(op) e:SetLabel(op)
end end
......
...@@ -99,7 +99,7 @@ function cm.filter4(c,e) ...@@ -99,7 +99,7 @@ function cm.filter4(c,e)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function cm.filter5(c,e,tp,m,f,chkf) function cm.filter5(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION+0x10000000) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf) return (c:IsType(TYPE_FUSION) or _G["c"..c:GetOriginalCode()].IsFusionSpellTrap) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf)
end end
function cm.filter6(c) function cm.filter6(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
--21.09.21 --21.09.21
local m=11451619 local m=11451619
local cm=_G["c"..m] local cm=_G["c"..m]
cm.IsFusionSpellTrap=true
function cm.initial_effect(c) function cm.initial_effect(c)
--fusion set --fusion set
aux.AddFusionProcFunRep2(c,cm.ffilter,3,63,true) aux.AddFusionProcFunRep2(c,cm.ffilter,3,63,true)
...@@ -31,10 +32,6 @@ function cm.initial_effect(c) ...@@ -31,10 +32,6 @@ function cm.initial_effect(c)
e5:SetRange(0xff) e5:SetRange(0xff)
e5:SetValue(TYPE_FUSION) e5:SetValue(TYPE_FUSION)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_ADD_TYPE)
e6:SetValue(0x10000000)
c:RegisterEffect(e6)
end end
function cm.ffilter(c,fc,sub,mg,sg) function cm.ffilter(c,fc,sub,mg,sg)
return c:IsLevelAbove(1) and (not sg or not sg:IsExists(Card.IsLevel,1,c,c:GetLevel())) return c:IsLevelAbove(1) and (not sg or not sg:IsExists(Card.IsLevel,1,c,c:GetLevel()))
......
--毅飞冲天-泽塔·阿尔法装甲
local m=188801 local m=188801
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="毅飞冲天-泽塔·阿尔法装甲"
function cm.initial_effect(c) function cm.initial_effect(c)
--synchro summon cm.AddSynchroMixProcedure(c,cm.matfilter,nil,nil,aux.NonTuner(nil),1,99)
c:EnableReviveLimit() c:EnableReviveLimit()
cm.AddSynchroMixProcedure(c,nil,nil,nil,nil,1,99,nil)
--atkup
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -17,7 +15,6 @@ function cm.initial_effect(c) ...@@ -17,7 +15,6 @@ function cm.initial_effect(c)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -29,7 +26,6 @@ function cm.initial_effect(c) ...@@ -29,7 +26,6 @@ function cm.initial_effect(c)
local e5=e4:Clone() local e5=e4:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--attack twice
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE) e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -38,18 +34,8 @@ function cm.initial_effect(c) ...@@ -38,18 +34,8 @@ function cm.initial_effect(c)
e6:SetValue(1) e6:SetValue(1)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function cm.AddSynchroMixProcedure(c,f1,f2,f3,f4,minc,maxc,gc) function cm.matfilter(c)
local e1=Effect.CreateEffect(c) return c:IsSynchroType(TYPE_TUNER) or (c:IsSetCard(0x7e) and c:IsLocation(LOCATION_OVERLAY))
e1:SetDescription(1164)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(cm.SynMixCondition(f1,f2,f3,f4,minc,maxc,gc))
e1:SetTarget(cm.SynMixTarget(f1,f2,f3,f4,minc,maxc,gc))
e1:SetOperation(cm.SynMixOperation(f1,f2,f3,f4,minc,maxc,gc))
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
end end
function cm.AddSynchroMixProcedure(c,f1,f2,f3,f4,minc,maxc,gc) function cm.AddSynchroMixProcedure(c,f1,f2,f3,f4,minc,maxc,gc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -73,12 +59,18 @@ end ...@@ -73,12 +59,18 @@ end
function cm.GetSynchroLevelFlowerCardian(c) function cm.GetSynchroLevelFlowerCardian(c)
return 2 return 2
end end
function cm.filtersyn(c,syncard)
return c:IsCanBeSynchroMaterial(syncard)
end
function cm.GetSynMaterials(tp,syncard) function cm.GetSynMaterials(tp,syncard)
local mg=Duel.GetMatchingGroup(cm.SynMaterialFilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,syncard) local mg=Duel.GetMatchingGroup(cm.SynMaterialFilter,tp,LOCATION_MZONE+LOCATION_OVERLAY,LOCATION_MZONE,nil,syncard)
if mg:IsExists(Card.GetHandSynchro,1,nil) then if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_HAND,0,nil,syncard) local mg2=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_HAND,0,nil,syncard)
if mg2:GetCount()>0 then mg:Merge(mg2) end if mg2:GetCount()>0 then mg:Merge(mg2) end
end end
local sg=Duel.GetOverlayGroup(tp,LOCATION_ONFIELD,0)
sg:Filter(cm.filtersyn,nil,syncard)
mg:Merge(sg)
return mg return mg
end end
function cm.SynMixCondition(f1,f2,f3,f4,minc,maxc,gc) function cm.SynMixCondition(f1,f2,f3,f4,minc,maxc,gc)
...@@ -199,7 +191,7 @@ function cm.SynMixFilter4(c,f4,minc,maxc,syncard,mg1,smat,c1,c2,c3,gc,mgchk) ...@@ -199,7 +191,7 @@ function cm.SynMixFilter4(c,f4,minc,maxc,syncard,mg1,smat,c1,c2,c3,gc,mgchk)
else else
mg:Sub(sg) mg:Sub(sg)
end end
return cm.SynMixCheck(mg,sg,minc-1,maxc-1,syncard,smat,gc,mgchk) return aux.SynMixCheck(mg,sg,minc-1,maxc-1,syncard,smat,gc,mgchk)
end end
function cm.SynMixCheck(mg,sg1,minc,maxc,syncard,smat,gc,mgchk) function cm.SynMixCheck(mg,sg1,minc,maxc,syncard,smat,gc,mgchk)
local tp=syncard:GetControler() local tp=syncard:GetControler()
...@@ -244,25 +236,6 @@ function cm.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat,gc,mgchk) ...@@ -244,25 +236,6 @@ function cm.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat,gc,mgchk)
if not found then return false end if not found then return false end
end end
for c in aux.Next(g) do for c in aux.Next(g) do
if c:IsLocation(LOCATION_OVERLAY) and c:IsSetCard(0x7e) then
if not c:IsSynchroType(TYPE_TUNER) and g:IsExists(Card.IsSynchroType,2,nil,TYPE_TUNER) then
return false
end
if c:IsSynchroType(TYPE_TUNER) and g:IsExists(Card.IsSynchroType,1,c,TYPE_TUNER) then
return false
end
end
if c:IsLocation(LOCATION_OVERLAY) and not c:IsSetCard(0x7e) then
if c:IsSynchroType(TYPE_TUNER) and g:IsExists(Card.IsSynchroType,1,c,TYPE_TUNER) then
return false
end
if not c:IsSynchroType(TYPE_TUNER) and g:IsExists(Card.IsSynchroType,2,nil,TYPE_TUNER) then
return false
end
end
if g:FilterCount(Card.IsSynchroType,nil,TYPE_TUNER)==0 and not g:IsExists(Card.IsLocation,1,nil,LOCATION_OVERLAY) then
return false
end
local le,lf,lloc,lmin,lmax=c:GetTunerLimit() local le,lf,lloc,lmin,lmax=c:GetTunerLimit()
if le then if le then
local lct=g:GetCount()-1 local lct=g:GetCount()-1
...@@ -276,37 +249,9 @@ function cm.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat,gc,mgchk) ...@@ -276,37 +249,9 @@ function cm.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat,gc,mgchk)
end end
return true return true
end end
function cm.SynMaterialFilter(c,syncard)
return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard)
end
function cm.SynLimitFilter(c,f,e,syncard)
return f and not f(e,c,syncard)
end
function cm.GetSynchroLevelFlowerCardian(c)
return 2
end
function cm.filtersyn(c,syncard)
return c:IsCanBeSynchroMaterial(syncard)
end
function cm.GetSynMaterials(tp,syncard)
local mg=Duel.GetMatchingGroup(cm.SynMaterialFilter,tp,LOCATION_MZONE+LOCATION_OVERLAY,LOCATION_MZONE,nil,syncard)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_HAND,0,nil,syncard)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
local sg=Duel.GetOverlayGroup(tp,LOCATION_ONFIELD,0)
sg:Filter(cm.filtersyn,nil,syncard)
mg:Merge(sg)
return mg
end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x107f) and c:GetOverlayCount()>0 return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x107f) and c:GetOverlayCount()>0
end end
function cm.atkcon(e) function cm.atkcon(e)
return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
...@@ -6,6 +6,7 @@ function c29010009.initial_effect(c) ...@@ -6,6 +6,7 @@ function c29010009.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29010009+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,29010009+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e1:SetCost(c29010009.cost) e1:SetCost(c29010009.cost)
e1:SetTarget(c29010009.target) e1:SetTarget(c29010009.target)
e1:SetOperation(c29010009.activate) e1:SetOperation(c29010009.activate)
......
...@@ -31,18 +31,19 @@ function c33401201.filter1(c,e,tp) ...@@ -31,18 +31,19 @@ function c33401201.filter1(c,e,tp)
and ((c:IsSetCard(0x341) and (Duel.IsExistingMatchingCard(c33401201.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2) or and ((c:IsSetCard(0x341) and (Duel.IsExistingMatchingCard(c33401201.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2) or
Duel.IsExistingMatchingCard(c33401201.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+4))) Duel.IsExistingMatchingCard(c33401201.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+4)))
or (Duel.IsExistingMatchingCard(c33401201.filter22,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2) or or (Duel.IsExistingMatchingCard(c33401201.filter22,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2) or
Duel.IsExistingMatchingCard(c33401201.filter22,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+4))) Duel.IsExistingMatchingCard(c33401201.filter22,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+4)))
and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c33401201.filter2(c,e,tp,mc,rk) function c33401201.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsSetCard(0x341) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsSetCard(0x341) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c33401201.filter22(c,e,tp,mc,rk) function c33401201.filter22(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsSetCard(0x341) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsSetCard(0x341) and mc:IsCanBeXyzMaterial(c)
and c:GetOriginalAttribute()==mc:GetOriginalAttribute() and c:GetOriginalRace()==mc:GetOriginalRace() and c:GetOriginalAttribute()==mc:GetOriginalAttribute() and c:GetOriginalRace()==mc:GetOriginalRace()
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c33401201.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33401201.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33401201.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33401201.filter1(chkc,e,tp) end
...@@ -53,7 +54,7 @@ function c33401201.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -53,7 +54,7 @@ function c33401201.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c33401201.activate(e,tp,eg,ep,ev,re,r,rp) function c33401201.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1 local g1
......
...@@ -24,17 +24,17 @@ function cm.ffilter(c,fc,sub,mg,sg) ...@@ -24,17 +24,17 @@ function cm.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x341) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute())) return c:IsFusionSetCard(0x341) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end end
function cm.ckfilter(c) function cm.ckfilter(c,tp)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and Duel.IsExistingMatchingCard(cm.ckfilter2,tp,0,LOCATION_MZONE,1,nil,c:GetAttribute()) return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and Duel.IsExistingMatchingCard(cm.ckfilter2,tp,0,LOCATION_MZONE,1,nil,c:GetAttribute())
end end
function cm.ckfilter2(c,at) function cm.ckfilter2(c,at)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:GetAttribute()&at~=0 return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:GetAttribute()&at~=0
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(tp) and cm.ckfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(tp) and cm.ckfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.ckfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.ckfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.ckfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,cm.ckfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
local tg=Duel.GetMatchingGroup(cm.ckfilter2,tp,0,LOCATION_MZONE,nil,tc:GetAttribute()) local tg=Duel.GetMatchingGroup(cm.ckfilter2,tp,0,LOCATION_MZONE,nil,tc:GetAttribute())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,tg:GetCount()*500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,tg:GetCount()*500)
......
...@@ -61,7 +61,7 @@ function cm.rmcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_ATTACK)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
......
...@@ -92,7 +92,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -92,7 +92,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0x1530) and c:IsType(TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x1535) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -18,7 +18,7 @@ function cm.initial_effect(c) ...@@ -18,7 +18,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES) e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+50) e2:SetCountLimit(1,m+500)
e2:SetCost(cm.cost) e2:SetCost(cm.cost)
e2:SetTarget(cm.tgtg) e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop) e2:SetOperation(cm.tgop)
......
...@@ -32,7 +32,7 @@ function cm.initial_effect(c) ...@@ -32,7 +32,7 @@ function cm.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+50) e3:SetCountLimit(1,m+500)
e3:SetCondition(cm.descon) e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg) e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop) e3:SetOperation(cm.desop)
......
...@@ -73,6 +73,9 @@ function cm.sumcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,6 +73,9 @@ function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp) function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,m)
Duel.ResetFlagEffect(tp,m+10000)
Duel.ResetFlagEffect(tp,m+20000)
local c=e:GetHandler() local c=e:GetHandler()
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
...@@ -93,13 +96,13 @@ function cm.aclimit1(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,13 +96,13 @@ function cm.aclimit1(e,tp,eg,ep,ev,re,r,rp)
local n=0 local n=0
if re:IsActiveType(TYPE_SPELL) then n=n+10000 end if re:IsActiveType(TYPE_SPELL) then n=n+10000 end
if re:IsActiveType(TYPE_TRAP) then n=n+20000 end if re:IsActiveType(TYPE_TRAP) then n=n+20000 end
Duel.RegisterFlagEffect(tp,m+n,RESET_PHASE+PHASE_END,0,2) Duel.RegisterFlagEffect(e:GetHandlerPlayer(),m+n,0,0,0)
end end
function cm.elimit(e,te,tp) function cm.elimit(e,te,tp)
local n=0 local n=0
if te:IsActiveType(TYPE_SPELL) then n=n+10000 end if te:IsActiveType(TYPE_SPELL) then n=n+10000 end
if te:IsActiveType(TYPE_TRAP) then n=n+20000 end if te:IsActiveType(TYPE_TRAP) then n=n+20000 end
return Duel.GetFlagEffect(tp,m+n)>0 return Duel.GetFlagEffect(e:GetHandlerPlayer(),m+n)>0
end end
function cm.indvalue(e,re) function cm.indvalue(e,re)
return re:GetHandlerPlayer()~=e:GetHandlerPlayer() return re:GetHandlerPlayer()~=e:GetHandlerPlayer()
......
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