Generate a YGOPro Lua script for the following Yu-Gi-Oh card effect:
Equip only to a Warrior-Type monster. Apply this effect, depending on its battle position. ● Attack Position: It gains ATK equal to its original DEF. ● Defense Position: It gains DEF equal to its original ATK.
--最強の盾
--Magnum Shield
local s,id=GetID()
function s.initial_effect(c)
	aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR))
	--atk/def
	local e2=Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_EQUIP)
	e2:SetCode(EFFECT_UPDATE_ATTACK)
	e2:SetValue(s.atkval)
	c:RegisterEffect(e2)
	local e3=Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_EQUIP)
	e3:SetCode(EFFECT_UPDATE_DEFENSE)
	e3:SetValue(s.defval)
	c:RegisterEffect(e3)
end
function s.atkval(e,c)
	if c:IsDefensePos() then return 0 else return c:GetBaseDefense() end
end
function s.defval(e,c)
	if c:IsAttackPos() then return 0 else return c:GetBaseAttack() end
end