Commit 4e386dec authored by Nemo Ma's avatar Nemo Ma

fix

parent 9ea59978
...@@ -25,6 +25,7 @@ function cm.initial_effect(c) ...@@ -25,6 +25,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Remove counter replace --Remove counter replace
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_RCOUNTER_REPLACE+0x1019) e3:SetCode(EFFECT_RCOUNTER_REPLACE+0x1019)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
...@@ -38,27 +39,13 @@ function cm.initial_effect(c) ...@@ -38,27 +39,13 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not GIGANTIC_JET then if not GIGANTIC_JET then
GIGANTIC_JET=true GIGANTIC_JET=true
local _DGetCounter=Duel.GetCounter
local _CGetCounter=Card.GetCounter local _CGetCounter=Card.GetCounter
function Duel.GetCounter(p,s,o,typ)
local ct=_DGetCounter(p,s,o,typ)
local s1,o1=s,o
if s==1 then s1=0xff end
if o==1 then o1=0xff end
local g=Duel.GetMatchingGroup(Card.IsHasEffect,p,s1,o1,nil,m)
if #g>0 then
for tc in aux.Next(g) do
local og=tc:GetOverlayGroup()
if og and #og>0 then ct=ct+og:FilterCount(cm.filter,nil) end
end
end
return ct
end
function Card.GetCounter(c,typ) function Card.GetCounter(c,typ)
local ct=_CGetCounter(c,typ) local ct=_CGetCounter(c,typ)
if typ~=0x1019 then return ct end
if c:IsHasEffect(m) then if c:IsHasEffect(m) then
local og=c:GetOverlayGroup() local og=c:GetOverlayGroup()
if og and #og>0 then ct=ct+og:FilterCount(cm.filter,nil) end if og and og:FilterCount(cm.filter,nil)>ct then ct=og:FilterCount(cm.filter,nil) end
end end
return ct return ct
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=40010332 local m=40010332
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=40010340 local m=40010340
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=40010342 local m=40010342
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
local m=40010344 local m=40010344
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=40010346 local m=40010346
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
...@@ -71,7 +71,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,7 +71,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end end
function cm.thfilter(c) function cm.thfilter(c)
return cm.Crimsonmoon(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return cm.DragWizard(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=40010348 local m=40010348
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
...@@ -21,7 +21,7 @@ function cm.initial_effect(c) ...@@ -21,7 +21,7 @@ function cm.initial_effect(c)
end end
--Effect 1 --Effect 1
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and cm.Crimsonmoon(c) and bit.band(c:GetType(),0x81)==0x81 return c:IsFaceup() and cm.DragWizard(c) and bit.band(c:GetType(),0x81)==0x81
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=40010350 local m=40010350
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
...@@ -66,7 +66,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
end end
--Effect 2 --Effect 2
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Crimsonmoon(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return cm.DragWizard(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
local m=40010352 local m=40010352
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddRitualProcGreaterCode(c,40010332)
--Effect 1 --Effect 1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
...@@ -52,7 +53,7 @@ function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_e ...@@ -52,7 +53,7 @@ function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_e
return res return res
end end
function cm.spfilter3(c,e,tp,mg) function cm.spfilter3(c,e,tp,mg)
return cm.Crimsonmoon(c) and bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToGrave() return cm.DragWizard(c) and bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_GRAVE,0,1,nil,cm.filter,e,tp,mg,mg2,Card.GetLevel,"Greater") and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_GRAVE,0,1,nil,cm.filter,e,tp,mg,mg2,Card.GetLevel,"Greater")
end end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=40010354 local m=40010354
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
...@@ -19,7 +19,7 @@ function cm.initial_effect(c) ...@@ -19,7 +19,7 @@ function cm.initial_effect(c)
end end
--Effect 1 --Effect 1
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return cm.Crimsonmoon(c) return cm.DragWizard(c)
end end
function cm.mfilter(c) function cm.mfilter(c)
return c:GetLevel()>0 and c:IsReleasableByEffect() return c:GetLevel()>0 and c:IsReleasableByEffect()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=40010356 local m=40010356
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
...@@ -35,7 +35,7 @@ function cm.fselect(g) ...@@ -35,7 +35,7 @@ function cm.fselect(g)
return g:IsExists(cm.moon,1,nil) return g:IsExists(cm.moon,1,nil)
end end
function cm.moon(c) function cm.moon(c)
return c:IsType(TYPE_MONSTER) and cm.Crimsonmoon(c) return c:IsType(TYPE_MONSTER) and cm.DragWizard(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)
...@@ -47,15 +47,18 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,15 +47,18 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if g:CheckSubGroup(cm.fselect,3,3) then if g:CheckSubGroup(cm.fselect,3,3) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,cm.moon,1,1,nil) local sg=g:FilterSelect(tp,cm.moon,1,1,nil)
g:RemoveCard(sg) g:RemoveCard(sg:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:Select(tp,2,2,nil) local sg1=g:Select(tp,2,2,nil)
if #sg>0 and #sg1>0 then if #sg>0 and #sg1>0 then
sg:Merge(sg1) sg:Merge(sg1)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:Select(1-tp,1,1,nil) local tg=sg:Select(1-tp,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) local tc=tg:GetFirst()
sg:RemoveCard(tg) Duel.SendtoHand(tc,nil,REASON_EFFECT)
sg:RemoveCard(tc)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
end end
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=40010358 local m=40010358
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_DragWizard=1 cm.named_with_DragWizard=1
function cm.Crimsonmoon(c) function cm.DragWizard(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard return m and m.named_with_DragWizard
end end
...@@ -42,7 +42,7 @@ end ...@@ -42,7 +42,7 @@ end
--Effect 1 --Effect 1
--Effect 2 --Effect 2
function cm.confilter(c) function cm.confilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and cm.Crimsonmoon(c) return c:IsType(TYPE_MONSTER) and c:IsFaceup() and cm.DragWizard(c)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,3,nil) return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,3,nil)
......
...@@ -5,7 +5,7 @@ cm.named_with_Cardinal=1 ...@@ -5,7 +5,7 @@ cm.named_with_Cardinal=1
function cm.initial_effect(c) function cm.initial_effect(c)
--xyz summon --xyz summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.mfilter,nil,2,99) aux.AddXyzProcedureLevelFree(c,cm.mfilter,nil,3,99)
--immune --immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -36,7 +36,7 @@ function c69164878.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function c69164878.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,69164879,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,69164879,RESET_PHASE+PHASE_END,0,1)
end end
end end
group.r
----------------effect gain--------------- ----------------effect gain---------------
function c69164878.filter(c) function c69164878.filter(c)
...@@ -206,9 +206,9 @@ function c69164878.costfilter(c,e,tp) ...@@ -206,9 +206,9 @@ function c69164878.costfilter(c,e,tp)
return c:IsAbleToRemoveAsCost() and (c:IsControler(tp) or (Duel.GetFlagEffect(tp,69164879)~=0 and c:IsControler(1-tp) and c:IsFaceup() and Duel.GetFlagEffect(tp,69164878)==0)) return c:IsAbleToRemoveAsCost() and (c:IsControler(tp) or (Duel.GetFlagEffect(tp,69164879)~=0 and c:IsControler(1-tp) and c:IsFaceup() and Duel.GetFlagEffect(tp,69164878)==0))
end end
function c69164878.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c69164878.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69164878.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c69164878.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c69164878.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,c69164878.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp)
if g:GetFirst():GetControler()~=tp then if g:GetFirst():GetControler()~=tp then
Duel.Hint(HINT_CARD,0,69164878) Duel.Hint(HINT_CARD,0,69164878)
Duel.RegisterFlagEffect(tp,69164878,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,69164878,RESET_PHASE+PHASE_END,0,1)
......
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