--魔回避
function c87592011.initial_effect(c)
	--Activate
	local e1=Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_ATTACK_ANNOUNCE)
	e1:SetTarget(c87592011.target)
	e1:SetOperation(c87592011.activate)
	c:RegisterEffect(e1)

end
function c87592011.target(e,tp,eg,ep,ev,re,r,rp,chk)
	local tg=Duel.GetAttacker()
	if chk==0 then return tg:IsOnField() and Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and tp~=Duel.GetTurnPlayer() 
		and Duel.IsPlayerCanSpecialSummonMonster(tp,87592100,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
	Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c87592011.activate(e,tp,eg,ep,ev,re,r,rp)
	if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
		and Duel.IsPlayerCanSpecialSummonMonster(tp,87592100,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then
			local token=Duel.CreateToken(tp,87592100)
		Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
	local e1=Effect.CreateEffect(e:GetHandler())
	e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
	e1:SetCode(EVENT_BE_BATTLE_TARGET)
	e1:SetCountLimit(1)
	e1:SetOperation(c87592011.op)
	token:RegisterEffect(e1)
		Duel.SpecialSummonComplete()
	end
end
function c87592011.op(e,tp,eg,ep,ev,re,r,rp)
	Duel.NegateAttack()
end