--手札から通常召喚
function c11220.initial_effect(c)
--hand summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c11220.cost)
e1:SetTarget(c11220.target)
e1:SetOperation(c11220.operation)
c:RegisterEffect(e1)
end
function c11220.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 end
local e001=Effect.CreateEffect(e:GetHandler())
e001:SetType(EFFECT_TYPE_FIELD)
e001:SetCode(EFFECT_CANNOT_SUMMON)
e001:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e001:SetTargetRange(1,0)
e001:SetTarget(c11220.nslimit)
e001:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e001,tp)
end
function c11220.nslimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetHandler()~=se:GetHandler()
end
function c11220.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsSummonable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function c11220.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Summon(tp,c,true,nil)
end
end