// Copyright (c) 2026 GregOrigin. All Rights Reserved.
#pragma once

#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "ARPGCharacter.h"
#include "ARPGGameMode.generated.h"

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnPlayerDied);
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnGameStarted);

UCLASS()
class CODEFORGE_API ARPGGameMode : public AGameModeBase
{
	GENERATED_BODY()

public:
	ARPGGameMode();

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "RPG")
	float RespawnDelay = 5.0f;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "RPG")
	bool bAllowFriendlyFire = false;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "RPG")
	float ExperienceMultiplier = 1.0f;

	UPROPERTY(BlueprintAssignable, Category = "RPG")
	FOnPlayerDied OnPlayerDied;

	UPROPERTY(BlueprintAssignable, Category = "RPG")
	FOnGameStarted OnGameStarted;

	UFUNCTION(BlueprintCallable, Category = "RPG")
	void HandlePlayerDeath();

	UFUNCTION(BlueprintCallable, Category = "RPG")
	void RespawnPlayer();
};