dofile("../defs/team_defs.lua")

Team = class("Team")

function Team:new(team_type)
	local def = assert(TEAMS[team_type], team_type)
	local a = instance(self)	
	a.def = def
	a.index = team_type
	a.enemies = {}
	a.trading = {}
	return a
end

function Team:add_enemy_team(team)
	table.insert(self.enemies, team)
end

function Team:get_enemy_teams()
	return self.enemies
end

function Team:add_trading_team(team)
	table.insert(self.trading, team)
end

function Team:get_trading_teams()
	return self.trading
end

function Team:set_loot_team(t)
	self.loot_team = t
end

function Team:get_loot_team()
	return self.loot_team or self
end

function Team:set_agro_team(t)
	self.agro_team = t
end

function Team:get_agro_team()
	return self.agro_team or self
end
