Commit 85f57fd0 authored by nanahira's avatar nanahira

catchups for Auxiliary.AddCodeList

parent c553a5ee
...@@ -4,6 +4,7 @@ local cm=_G["c"..m] ...@@ -4,6 +4,7 @@ local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua") Duel.LoadScript("c37564765.lua")
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
Auxiliary.AddCodeList(c,m+1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -12,7 +13,7 @@ function cm.initial_effect(c) ...@@ -12,7 +13,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
cm.fit_monster={37564225} \\
function cm.filter(c,e,tp,m1,m2) function cm.filter(c,e,tp,m1,m2)
if not c:IsCode(37564225) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end if not c:IsCode(37564225) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
......
...@@ -9,7 +9,6 @@ function cm.initial_effect(c) ...@@ -9,7 +9,6 @@ function cm.initial_effect(c)
--[[if not cm.gg then --[[if not cm.gg then
cm.gg=Group.CreateGroup() cm.gg=Group.CreateGroup()
cm.gg:KeepAlive() cm.gg:KeepAlive()
cm.fit_monster={}
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
...@@ -22,8 +21,8 @@ function cm.initial_effect(c) ...@@ -22,8 +21,8 @@ function cm.initial_effect(c)
cm.gg:AddCard(c) cm.gg:AddCard(c)
end end
end) end)
rg:ForEach(function(c) rg:ForEach(function(tc)
table.insert(cm.fit_monster,c:GetOriginalCode()) Auxiliary.AddCodeList(c,tc:GetOriginalCode())
end) end)
end) end)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
......
...@@ -3,8 +3,8 @@ local m=37564335 ...@@ -3,8 +3,8 @@ local m=37564335
local cm=_G["c"..m] local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua") Duel.LoadScript("c37564765.lua")
cm.dfc_front_side=m+1 cm.dfc_front_side=m+1
cm.fit_monster={m+1}
function cm.initial_effect(c) function cm.initial_effect(c)
Auxiliary.AddCodeList(c,m+1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
......
...@@ -13,17 +13,13 @@ function cm.initial_effect(c) ...@@ -13,17 +13,13 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
cm.fit_monster={37564504,37564526,37564552} cm.card_code_list={[37564504]=true,[37564526]=true,[37564552]=true}
function cm.filter(c,e,tp,m1,m2) function cm.filter(c,e,tp,m1,m2)
local ec=e:GetHandler() local ec=e:GetHandler()
if not ec.fit_monster then return false end
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local cd1=c:GetOriginalCode() local cd1=c:GetOriginalCode()
local cd2=c:GetCode() local cd2=c:GetCode()
local check=false local check=Auxiliary.IsCodeListed(c,cd1) or Auxiliary.IsCodeListed(c,cd2)
for i,cd in pairs(ec.fit_monster) do
if cd==cd1 or cd==cd2 then check=true end
end
if not check then return false end if not check then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:Merge(m2) mg:Merge(m2)
......
...@@ -2282,19 +2282,19 @@ function cm.RemainCheckOperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -2282,19 +2282,19 @@ function cm.RemainCheckOperation(e,tp,eg,ep,ev,re,r,rp)
end) end)
end end
--for sayuri --for sayuri
cm.sayuri_fit_monster=cm.sayuri_fit_monster or {} cm.sayuri_code_list=cm.sayuri_code_list or {}
cm.sayuri_activate_effect=cm.sayuri_activate_effect or {} cm.sayuri_activate_effect=cm.sayuri_activate_effect or {}
function cm.SayuriRitualPreload(m) function cm.SayuriRitualPreload(m)
local mt=cm.LoadMetatable(m) local mt=cm.LoadMetatable(m)
mt.Senya_name_with_sayuri=true mt.Senya_name_with_sayuri=true
table.insert(cm.sayuri_fit_monster,m) cm.sayuri_code_list[m]=true
return m,mt return m,mt
end end
function cm.SayuriSpellPreload(m) function cm.SayuriSpellPreload(m)
local mt=cm.LoadMetatable(m) local mt=cm.LoadMetatable(m)
mt.Senya_name_with_sayuri=true mt.Senya_name_with_sayuri=true
mt.fit_monster=cm.sayuri_fit_monster mt.card_code_list=cm.sayuri_code_list
return m,mt return m,mt
end end
function cm.SayuriSelfReturnCommonEffect(c,m) function cm.SayuriSelfReturnCommonEffect(c,m)
......
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