Commit 35de11d9 authored by nanahira's avatar nanahira

update_link_func

parent 07b69853
......@@ -2,7 +2,7 @@
function c1000617.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xc204),2)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xc204),2)
--control
local e99=Effect.CreateEffect(c)
e99:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -2,7 +2,7 @@
function c1156007.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),2,2)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_EARTH),2,2)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.Senya_name_with_prism=true
function cm.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SEASERPENT),2,2)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SEASERPENT),2,2)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
......
......@@ -6,7 +6,7 @@ cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
Senya.Nanahira(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsCode,37564765),2,2)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),2,2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
--e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......
......@@ -6,7 +6,7 @@ cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
Senya.Nanahira(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsCode,37564765),2,3)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),2,3)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_SINGLE)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......
......@@ -6,7 +6,7 @@ cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
Senya.Nanahira(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsCode,37564765),2,2)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),2,2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
......@@ -6,7 +6,7 @@ cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
Senya.Nanahira(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsCode,37564765),2,4)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),2,4)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_SINGLE)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......
......@@ -5,7 +5,7 @@ xpcall(function() require("expansions/script/c37564765") end,function() require(
function cm.initial_effect(c)
Senya.Nanahira(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsCode,37564765),3,3)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),3,3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......
......@@ -78,6 +78,9 @@ end
function cm.check_set_sayuri(c)
return cm.check_set(c,"sayuri") or c:IsHasEffect(37564900)
end
function cm.check_link_set_sayuri(c)
return cm.check_set(c,"sayuri",nil,Card.GetLinkCode) or c:IsHasEffect(37564900)
end
function cm.check_set_remix(c)
return cm.check_set(c,"remix")
end
......@@ -94,6 +97,19 @@ function cm.check_set_3L(c)
end
return false
end
function cm.check_link_set_3L(c)
if c:IsHasEffect(37564800) then return true end
local codet={c:GetLinkCode()}
for j,code in pairs(codet) do
local mt=cm.LoadMetatable(code)
if mt then
for str,v in pairs(mt) do
if type(str)=="string" and str:find("_3L") and v then return true end
end
end
end
return false
end
function cm.check_fusion_set_3L(c)
if c:IsHasEffect(6205579) then return false end
if c:IsHasEffect(37564800) then return true end
......
......@@ -5,7 +5,7 @@ xpcall(function() require("expansions/script/c37564765") end,function() require(
function cm.initial_effect(c)
c:EnableReviveLimit()
Senya.AddSummonMusic(c,m*16+2,SUMMON_TYPE_LINK)
aux.AddLinkProcedure(c,Senya.check_set_3L,2,2)
aux.AddLinkProcedure(c,Senya.check_link_set_3L,2,2)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
......
......@@ -4,9 +4,8 @@ local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
c:EnableReviveLimit()
--Senya.CommonEffect_3L(c,m)
Senya.AddSummonMusic(c,m*16+2,SUMMON_TYPE_LINK)
aux.AddLinkProcedure(c,Senya.check_set_3L,3,4)
aux.AddLinkProcedure(c,Senya.check_link_set_3L,3,4)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
......
......@@ -20,13 +20,13 @@ function cm.initial_effect(c)
Senya.NegateEffectModule(c,1,nil,cm.cost)
end
function cm.mfilter(c)
return c:IsFaceup() and Senya.check_set_sayuri(c) and c:IsLinkType(TYPE_RITUAL)
return c:IsFaceup() and Senya.check_link_set_sayuri(c) and c:IsLinkType(TYPE_RITUAL)
end
function cm.lcheck(g)
return not g:IsExists(cm.lfilter,1,nil,g)
end
function cm.lfilter(c,g)
return g:IsExists(Card.IsCode,1,c,c:GetCode())
return g:IsExists(Card.IsLinkCode,1,c,c:GetCode())
end
function cm.cfilter(c,g)
return g:IsContains(c)
......
......@@ -3,7 +3,7 @@ local m=50000073
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x50c),2)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x50c),2)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
......
......@@ -2,7 +2,7 @@
local m=57300027
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x570),2,2)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x570),2,2)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
......
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