extends ActionLeaf

@export var angle_offset: float = 0.0


func tick(actor: Node, _blackboard: Blackboard) -> int:
	var mech: MechEnemy = actor as MechEnemy
	if mech.boost_ready():
		var boost_vec: Vector3 = (
			(mech.target_position - mech.global_position)
			. rotated(Vector3(0, 1, 0), angle_offset)
			. normalized()
		)
		mech.boost(boost_vec)
		return SUCCESS
	return FAILURE
