Huge thanks to Jack for helping with the banishing part.
--32083013
function c32083013.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(32083013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c32083013.spcon)
e1:SetTarget(c32083013.sptg)
e1:SetOperation(c32083013.spop)
c:RegisterEffect(e1)
end
function c32083013.spcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil
end
function c32083013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c32083013.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c and Duel.SpecialSummonStep(c,0,tp,tp,true,true,POS_FACEUP) then
Duel.Remove(Duel.GetAttacker(),POS_FACEUP,REASON_EFFECT)
end
end