Commit 670933ca authored by REIKAI's avatar REIKAI 💬

bug fix and function replace

parent d2e1af8d
Pipeline #22096 passed with stages
in 34 minutes and 26 seconds
......@@ -4,7 +4,7 @@ local m=12038014
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddSynchroProcedure(c,aux.Tuner(nil),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
......
......@@ -6,7 +6,7 @@ cm.named_with_FRXS=true
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--synchro summon
aux.AddSynchroProcedure(c,aux.Tuner(nil),cm.mfilter,1,15)
aux.AddSynchroProcedure(c,nil,cm.mfilter,1,15)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
......
......@@ -6,7 +6,7 @@ cm.named_with_XIFRXS=true
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--synchro summon
aux.AddSynchroProcedure(c,aux.Tuner(nil),cm.mfilter,1,15)
aux.AddSynchroProcedure(c,nil,cm.mfilter,1,15)
c:EnableReviveLimit()
--destroy
local e2=Effect.CreateEffect(c)
......@@ -15,7 +15,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(cm.destg)
......@@ -46,6 +45,10 @@ function cm.initial_effect(c)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ( Duel.GetFlagEffect(tp,m+100)==0 or (Duel.GetFlagEffect(tp,12043024)~=0 and Duel.GetFlagEffect(tp,m+100)<2 ) ) end
Duel.RegisterFlagEffect(tp,m+100,RESET_PHASE+PHASE_END,0,1)
end
function cm.mfilter(c)
return srre.check_set_FRXS(c)
end
......@@ -76,10 +79,6 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetFlagEffect(tp,m+100)==0 or (Duel.GetFlagEffect(tp,12043024)~=0 and Duel.GetFlagEffect(tp,m+100)<2)) end
Duel.RegisterFlagEffect(tp,m+100,RESET_PHASE+PHASE_END,0,1)
end
function cm.drcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
......@@ -92,18 +91,25 @@ end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=eg:FilterCount(cm.drcfilter1,nil,tp)
local ct2=eg:FilterCount(cm.drcfilter1,nil,1-tp)
if chk==0 then return (ct>0 and Duel.IsPlayerCanDraw(tp,ct)) or (ct2>0 and Duel.IsPlayerCanDraw(1-tp,ct2)) end
e:SetLabel(ct,ct2)
if chk==0 then return ( ct>0 and Duel.IsPlayerCanDraw(tp,ct) ) or ( ct2>0 and Duel.IsPlayerCanDraw(1-tp,ct2) ) end
if ct>0 then
e:SetLabel(e:GetLabel()+ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
if ct2>0 then
e:SetLabel(e:GetLabel()+ct2*100)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,ct2)
end
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local ct,ct2=e:GetLabel()
if ct>0 then
Duel.Draw(tp,ct,REASON_EFFECT)
local ct=e:GetLabel()
local ct1=ct%100
local ct2=math.floor(ct/100)
if ct1>0 then
Duel.Draw(tp,ct1,REASON_EFFECT)
end
if ct2>0 then
Duel.Draw(1-tp,ct2,REASON_EFFECT)
Duel.Draw(tp,ct2,REASON_EFFECT)
end
end
function cm.spfilter(c,e,tp)
......
......@@ -14,7 +14,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e0)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,Sr_Su.chainfilter)
--synchro summon
aux.AddSynchroProcedure(c,aux.Tuner(nil),aux.FilterBoolFunction(Card.IsSynchroType,TYPE_EFFECT),1)
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_EFFECT),1)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
Duel.LoadScript("c12084001.lua")
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.Tuner(nil),aux.FilterBoolFunction(Card.IsSetCard,0x9fa8),1,1)
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x9fa8),1,1)
c:EnableReviveLimit()
--destroy
local e3=Effect.CreateEffect(c)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
Duel.LoadScript("c12084001.lua")
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.Tuner(nil),aux.FilterBoolFunction(Card.IsSetCard,0x9fa8),1,1)
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x9fa8),1,1)
c:EnableReviveLimit()
--destroy
local e2=Effect.CreateEffect(c)
......@@ -56,7 +56,7 @@ function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.drcfilter,1,nil,tp)
end
function cm.tdfilter(c)
return c:IsAbleToHand()
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,2,nil) end
......@@ -74,7 +74,7 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_PUBLIC)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,0,1,aux.Stringid(m,2))
tc:RegisterFlagEffect(12009060,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,0,1,aux.Stringid(m,2))
tc=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -88,7 +88,7 @@ function cm.linktarget(f,minc,maxc,gf)
if not cm.ConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
......
......@@ -112,7 +112,7 @@ function c9310070.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp):Filter(c9310070.rfilter,nil,tp)
return rg:CheckSubGroup(c9310070.fselect,1,rg:GetCount(),tp)
return c:IsFacedown() and rg:CheckSubGroup(c9310070.fselect,1,rg:GetCount(),tp)
end
function c9310070.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetReleaseGroup(tp):Filter(c9310070.rfilter,nil,tp)
......
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