class_name BotPersonality
extends RefCounted

# Rolled once per bot-slot when BotManager spawns a bot, then handed to that
# bot's BotAI and kept for the rest of the match (even across death/respawn)
# so a player can learn "that bot" and plan around it — see overview/bots.md.
# Each trait is independent (0.0-1.0), so e.g. a bot can be aggressive AND
# accurate, or aggressive and a terrible shot; BotAI converts these into
# concrete numbers via the bot_* ranges in GameConfig.

var aggression: float  # higher = presses in closer before it's satisfied with range
var caution: float     # higher = flees earlier when hurt instead of trading hits
var accuracy: float    # higher = tracks the target's true position tightly
var reaction: float    # higher = updates its aim point more often (less lag on movers)
var awareness: float   # higher = notices enemies farther away


static func random() -> BotPersonality:
	var p := BotPersonality.new()
	p.aggression = randf()
	p.caution = randf()
	p.accuracy = randf()
	p.reaction = randf()
	p.awareness = randf()
	return p
