Commit 47926427 authored by GuGu's avatar GuGu

Update c60320.lua

parent 745519a4
Pipeline #34288 passed with stage
in 17 seconds
......@@ -8,9 +8,10 @@ function c60320.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetDescription(aux.Stringid(60320,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:SetRange(LOCATION_EXTRA)
e1:SetCondition(c60320.lkcon)
e1:SetTarget(c60320.lktg)
e1:SetOperation(c60320.lkop)
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
......@@ -73,19 +74,27 @@ function c60320.clear(e,tp,eg,ep,ev,re,r,rp)
c60320[0]=true
c60320[1]=true
end
function c60320.lkcon(e,c)
function c60320.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(c60320.umbfilter,tp,LOCATION_HAND,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 c60320.lkop(e,tp,eg,ep,ev,re,r,rp,c)
function c60320.lktg(e,tp,eg,ep,ev,re,r,rp,chk,c,og)
local mg=Duel.GetMatchingGroup(c60320.umbfilter,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local sg=mg:Select(tp,1,1,nil)
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_LINK+REASON_DISCARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
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 c60320.lkop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_DISCARD)
g:DeleteGroup()
end
function c60320.incon(e)
local c=e:GetHandler()
......
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