--ガンバラナイト
function c24291651.initial_effect(c)
	--to defence
	local e1=Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(24291651,0))
	e1:SetCategory(CATEGORY_POSITION)
	e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
	e1:SetCode(EVENT_BE_BATTLE_TARGET)
	e1:SetCondition(c24291651.poscon)
	e1:SetOperation(c24291651.posop)
	c:RegisterEffect(e1)
end
function c24291651.poscon(e,tp,eg,ep,ev,re,r,rp)
	return e:GetHandler():IsAttack()
end
function c24291651.posop(e,tp,eg,ep,ev,re,r,rp)
	local c=e:GetHandler()
	if c:IsFaceup() and c:IsRelateToEffect(e) then
		Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
	end
end
