// © 2025 Naked People Team. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "NPCType.h"
#include "NPCTypeDefinition.generated.h"

class UAnimMontage;

// Data-driven NPC template (GDD §10.2, §17.4). One asset per behavioral type (DA_Walker,
// DA_Stalker, …). ANPC points at one of these; the AI controller + behavior tree read it to
// drive observation weight and the stop-and-stare branch.
UCLASS(BlueprintType)
class NAKEDDESIRE_API UNPCTypeDefinition : public UPrimaryDataAsset
{
	GENERATED_BODY()

public:
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "NPC")
	ENPCType Type = ENPCType::Walker;

	// Multiplier on this NPC's contribution to the player's observed-exposure embarrassment gain
	// (StatsManager §7.1). Walkers read low (~0.35: they glance and move on); Stalkers read high
	// (~1.5: a sustained, deliberate stare). 1.0 is the single-close-observer baseline.
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "NPC", meta = (ClampMin = "0.0"))
	float ObservationWeight = 1.0f;

	// When true the NPC halts and observes the player (Stalker); when false it reacts but keeps
	// walking (Walker). The behavior tree branches on ANPC::ShouldStopToObserve().
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "NPC")
	bool bStopsToObserve = false;

	// How long a stopping NPC lingers staring before resuming its path. Ignored when bStopsToObserve is false.
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "NPC", meta = (ClampMin = "0.0", EditCondition = "bStopsToObserve"))
	float ObserveDurationSeconds = 5.0f;

	// Reaction played when the NPC first notices the player (Walker glance / Stalker stare). Optional.
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "NPC")
	TSoftObjectPtr<UAnimMontage> ReactionMontage;
};