Commit 1bbb8459 authored by GuGu's avatar GuGu

Update c60922.lua

parent 47926427
Pipeline #34289 passed with stage
in 8 seconds
......@@ -8,10 +8,11 @@ function c60922.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetDescription(aux.Stringid(60922,1))
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL|EFFECT_COUNT_CODE_OATH|60922)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c60922.lkcon)
e1:SetTarget(c60922.lktg)
e1:SetOperation(c60922.lkop)
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
......@@ -31,17 +32,25 @@ function c60922.umbfilter(c)
local mt=_G["c" .. code]
return mt and mt.DescSetName == 0x229 and c:IsAbleToRemoveAsCost()
end
function c60922.lkcon(e,c)
function c60922.lkcon(e,c,og)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c60922.umbfilter,tp,LOCATION_GRAVE,0,nil)
return mg:GetCount()>0 and Duel.GetLocationCountFromEx(tp)>0
return mg:GetCount()>0 and Duel.GetLocationCountFromEx(tp)>0 and not og
end
function c60922.lkop(e,tp,eg,ep,ev,re,r,rp,c)
function c60922.lktg(e,tp,eg,ep,ev,re,r,rp,chk,c,og)
local mg=Duel.GetMatchingGroup(c60922.umbfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local sg=mg:Select(tp,1,1,nil)
c:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_MATERIAL+REASON_LINK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=mg:SelectSubGroup(tp,aux.TRUE,true,1,1,tp,c)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c60922.lkop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
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