using System;
using System.Collections.Generic;
using Cirno.Scripts.Enums;
using Godot;

namespace Cirno.Scripts.Utils;

public class SessionSettings
{
    public GameMode GameMode { get; set; } = GameMode.Game;
    public bool SkipDialogues { get; set; } = false;
    public bool GodMode { get; set; } = false;

    public DifficultyLevel Difficulty { get; set; } = DifficultyLevel.Normal;
    public bool AllowSaving { get; set; } = false;

    public Godot.Collections.Dictionary<string, int> Items { get; set; } = new();
    
    public int LevelNumber { get; set; } = 0;

    public float Health { get; set; }
    public float Shield { get; set; }
    
    public string EquippedWeaponId { get; set; }

    public float DifficultyDamageMultiplier => this.Difficulty switch
    {
        DifficultyLevel.Easy => 1.4f,
        DifficultyLevel.Normal => 1.2f,
        DifficultyLevel.Hard or DifficultyLevel.Lunatic => 1f,
        _ => 1f
    };

    public void NewSession()
    {
        Items = new();
        EquippedWeaponId = string.Empty;
    }
}