Commit 3f1dcf9d authored by wyykak's avatar wyykak

fix c60922.lua

parent 1ae1f81f
--红叶的和伞-秋分 --红叶的和伞-秋分
function c60922.initial_effect(c) function c60922.initial_effect(c)
--link summon --link summon
Nef.AddLinkProcedureWithDesc(c,c60922.matfilter,1,1,nil,aux.Stringid(60922,0)) Nef.AddLinkProcedureWithDesc(c,c60922.matfilter,1,1,nil,aux.Stringid(60922,0))
c:EnableReviveLimit() c:EnableReviveLimit()
--link summon --link summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetDescription(aux.Stringid(60922,1)) e1:SetDescription(aux.Stringid(60922,1))
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA) e1:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL|60922)
e1:SetCondition(c60922.lkcon) e1:SetRange(LOCATION_EXTRA)
e1:SetOperation(c60922.lkop) e1:SetCondition(c60922.lkcon)
e1:SetValue(SUMMON_TYPE_LINK) e1:SetOperation(c60922.lkop)
c:RegisterEffect(e1) e1:SetValue(SUMMON_TYPE_LINK)
--cannot link material c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c) --cannot link material
e0:SetType(EFFECT_TYPE_SINGLE) local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(1) e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e0) e0:SetValue(1)
end c:RegisterEffect(e0)
function c60922.matfilter(c) end
return c:IsLinkType(TYPE_EFFECT) and c:IsLinkAttribute(ATTRIBUTE_WATER) function c60922.matfilter(c)
end return c:IsLinkType(TYPE_EFFECT) and c:IsLinkAttribute(ATTRIBUTE_WATER)
function c60922.umbfilter(c) end
local code=c:GetOriginalCode() function c60922.umbfilter(c)
local mt=_G["c" .. code] local code=c:GetOriginalCode()
return mt and mt.DescSetName == 0x229 and c:IsAbleToRemoveAsCost() local mt=_G["c" .. code]
end return mt and mt.DescSetName == 0x229 and c:IsAbleToRemoveAsCost()
function c60922.lkcon(e,c) end
if c==nil then return true end function c60922.lkcon(e,c)
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end if c==nil then return true end
local tp=c:GetControler() if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local mg=Duel.GetMatchingGroup(c60922.umbfilter,tp,LOCATION_GRAVE,0,nil) local tp=c:GetControler()
return mg:GetCount()>0 and Duel.GetLocationCountFromEx(tp)>0 local mg=Duel.GetMatchingGroup(c60922.umbfilter,tp,LOCATION_GRAVE,0,nil)
end return mg:GetCount()>0 and Duel.GetLocationCountFromEx(tp)>0
function c60922.lkop(e,tp,eg,ep,ev,re,r,rp,c) end
local mg=Duel.GetMatchingGroup(c60922.umbfilter,tp,LOCATION_GRAVE,0,nil) function c60922.lkop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL) local mg=Duel.GetMatchingGroup(c60922.umbfilter,tp,LOCATION_GRAVE,0,nil)
local sg=mg:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
c:SetMaterial(sg) local sg=mg:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_MATERIAL+REASON_LINK) c:SetMaterial(sg)
end Duel.Remove(sg,POS_FACEUP,REASON_MATERIAL+REASON_LINK)
end
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