class_name npcConstruct
extends cCharacter

signal location_changed(ai, old_location, new_location)
signal state_changed(ai, old_state, new_state)

var state: int = 0
func advance_state() -> void:
	if state >= MAX_STATE:
		if reset_after_climax:
			state = 0
	else:
		state += 1
		
func _ready():
	super._ready()
	print("Construct Ready")
	Global.game.night.hour_changed.connect(_on_hour_changed)

func _on_hour_changed(hour: int):
	if hour == 1:
		ai_level += 2
	if hour == 3:
		ai_level += 5

func _process(delta: float) -> void:
	super._process(delta)
	
	match state:
		0: pass # dormant
		1: pass
		2: pass
		3: pass
		4: pass
		5: pass
		6: pass
	advance_state()
	if (randi_range(1, 20) > 10):
		stunted = true
