Commit 26b65062 authored by nanahira's avatar nanahira

syosyo

parent f4f571aa
......@@ -7,21 +7,7 @@ function cm.initial_effect(c)
Senya.Nanahira(c)
Senya.AddSummonMusic(c,m*16+1,SUMMON_TYPE_LINK)
c:EnableReviveLimit()
--[[local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)]]
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.linkcon)
e0:SetOperation(cm.linkop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
aux.AddLinkProcedure(c,cm.mfilter,min,max,cm.lcheck)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
......@@ -51,28 +37,11 @@ function cm.initial_effect(c)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.mfilter(c,lc)
return c:IsFaceup() and c:IsCode(37564765) and c:IsCanBeLinkMaterial(lc)
function cm.mfilter(c)
return c:IsFaceup() and c:IsCode(37564765)
end
function cm.lcheck(g,tp,lc)
return Duel.GetLocationCountFromEx(tp,tp,g,lc)>0 and g:IsExists(cm.lfilter,1,nil,g)
end
function cm.lfilter(c,g)
local cg=c:GetColumnGroup()
return g:IsExists(function(tc) return cg:IsContains(tc) end,1,c)
end
function cm.linkcon(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_MZONE,0,nil)
return g:GetCount()>=2 and Senya.CheckGroup(g,cm.lcheck,nil,2,2,tp,c)
end
function cm.linkop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_MZONE,0,nil)
local g1=Senya.SelectGroup(tp,HINTMSG_LMATERIAL,g,cm.lcheck,nil,2,2,tp,c)
c:SetMaterial(g1)
Duel.SendtoGrave(g1,REASON_MATERIAL+REASON_LINK)
function cm.lcheck(g)
return g:IsExists(cm.lfilter,1,nil,g)
end
function cm.location_check(p,tp,z)
local tz=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