diff --git a/lua/c56158664.lua b/lua/c56158664.lua index 3bdafbc..4f4ec4a 100644 --- a/lua/c56158664.lua +++ b/lua/c56158664.lua @@ -3,4 +3,18 @@ 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 \ No newline at end of file diff --git a/lua/c56158671.lua b/lua/c56158671.lua index cf414e0..62ef4a5 100644 --- a/lua/c56158671.lua +++ b/lua/c56158671.lua @@ -59,14 +59,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g1) end - --[[if e:IsHasType(EFFECT_TYPE_ACTIVATE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetTargetRange(LOCATION_PZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x98)) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - Duel.RegisterEffect(e1,tp) - end]] end