20 lines
577 B
Lua
20 lines
577 B
Lua
--Universe Comet
|
|
local s,id=GetID()
|
|
function s.initial_effect(c)
|
|
--pendulum summon
|
|
Pendulum.AddProcedure(c)
|
|
--special summon if no monster on field
|
|
local e1=Effect.CreateEffect(c)
|
|
e1:SetType(EFFECT_TYPE_FIELD)
|
|
e1:SetCode(EFFECT_SPSUMMON_PROC)
|
|
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
|
|
e1:SetRange(LOCATION_HAND)
|
|
e1:SetCondition(s.spcon)
|
|
c:RegisterEffect(e1)
|
|
end
|
|
--sp function
|
|
function s.spcon(e,c)
|
|
if c==nil then return true end
|
|
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0
|
|
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
|
|
end |