Commit d2df8b3c authored by nanahira's avatar nanahira

fix

parent de1f7445
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
--link summon
cm.AddLinkProcedure(c,aux.TRUE,4)
Senya.AddLinkProcedure(c,aux.TRUE,4)
c:EnableReviveLimit()
Senya.AddSummonMusic(c,m*16+1,SUMMON_TYPE_LINK)
--atk
......
......@@ -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)
cm.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SEASERPENT),2,2)
Senya.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SEASERPENT),2,2)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
......
......@@ -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)
cm.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SEASERPENT),2,3)
Senya.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SEASERPENT),2,3)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -6,7 +6,7 @@ cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
Senya.Nanahira(c)
c:EnableReviveLimit()
cm.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),2,2)
Senya.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)
......
......@@ -32,9 +32,9 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,m)
e3:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
local pend=Duel.GetLocationCount(tp,LOCATION_PZONE)>0
local pend=Senya.GetPZoneCount(tp)>0
local c=e:GetHandler()
local g=Senya.GetReleaseGroup(tp,LOCATION_ONFIELD,0,cm.f,c,pend)
local g=Senya.GetReleaseGroup(tp,LOCATION_ONFIELD,0,cm.f,c,tp,c)
e:SetLabel(1)
if chk==0 then return #g>0 and c:IsReleasable() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......@@ -46,13 +46,13 @@ function cm.initial_effect(c)
if chk==0 then
local l=e:GetLabel()
e:SetLabel(0)
if l~=1 and Duel.GetLocationCount(tp,LOCATION_PZONE)<2 then return false end
if l~=1 and Senya.GetPZoneCount(tp)<2 then return false end
return Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_DECK,0,2,nil)
end
e:SetLabel(0)
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_PZONE)<2 then return end
if Senya.GetPZoneCount(tp)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_DECK,0,2,2,nil)
local pc=g:GetFirst()
......@@ -84,9 +84,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
cm.pendulum_level=7
function cm.f(c,pend)
if not pend and not c:IsLocation(LOCATION_PZONE) and c:GetSequence()>0 and c:GetSequence()<4 then return false end
return c:IsCode(37564765) and c:IsReleasable()
function cm.f(c,tp,ec)
return c:IsCode(37564765) and c:IsReleasable() and Senya.GetPZoneCount(tp,Group.FromCards(c,ec))>1
end
function cm.pcfilter(c)
return c:IsType(TYPE_PENDULUM) and c.Senya_desc_with_nanahira and not c:IsForbidden()
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
Senya.Nanahira(c)
Senya.AddSummonMusic(c,m*16+1,SUMMON_TYPE_LINK)
--link summon
cm.AddLinkProcedure(c,function(c) return c:GetOriginalCode()==37564765 end,1,1)
Senya.AddLinkProcedure(c,function(c) return c:GetOriginalCode()==37564765 end,1,1)
c:EnableReviveLimit()
--special summon
local e3=Effect.CreateEffect(c)
......
......@@ -6,7 +6,7 @@ cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
Senya.Nanahira(c)
c:EnableReviveLimit()
cm.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),2,3)
Senya.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()
cm.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),2,2)
Senya.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)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
Senya.Nanahira(c)
Senya.AddSummonMusic(c,m*16+1,SUMMON_TYPE_LINK)
c:EnableReviveLimit()
cm.AddLinkProcedure(c,cm.mfilter,2,2,cm.lcheck)
Senya.AddLinkProcedure(c,cm.mfilter,2,2,cm.lcheck)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
......
......@@ -6,7 +6,7 @@ cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
Senya.Nanahira(c)
c:EnableReviveLimit()
cm.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),2,4)
Senya.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),2,4)
Senya.AddSummonMusic(c,m*16,SUMMON_TYPE_LINK)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -6,7 +6,7 @@ cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
Senya.Nanahira(c)
c:EnableReviveLimit()
cm.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,37564765),3,3)
Senya.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)
......
......@@ -2680,3 +2680,10 @@ function cm.LinkOperation(f,min,max,gf)
g:DeleteGroup()
end
end
function cm.GetPZoneCount(tp,g)
local res=0
for i=0,1 do
if Duel.CheckLocation(tp,LOCATION_PZONE,i) or (g and g:IsExists(function(c) return c==Duel.GetFieldCard(tp,LOCATION_PZONE,i) or (c:IsLocation(LOCATION_SZONE) and c:GetSequence()==i*4) end,1,nil)) then res=res+1 end
end
return res
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)
cm.AddLinkProcedure(c,Senya.check_link_set_3L,2,2)
Senya.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)
......
......@@ -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)
cm.AddLinkProcedure(c,Senya.check_link_set_3L,3,4)
Senya.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)
......
......@@ -6,7 +6,7 @@ cm.Senya_name_with_sayuri=true
function cm.initial_effect(c)
Senya.AddSummonMusic(c,m*16,SUMMON_TYPE_LINK)
c:EnableReviveLimit()
cm.AddLinkProcedure(c,cm.mfilter,3,3,cm.lcheck)
Senya.AddLinkProcedure(c,cm.mfilter,3,3,cm.lcheck)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(37564765,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
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