// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using MessagePack;

namespace osu.Game.Online.Multiplayer.MatchTypes.RankedPlay
{
    [Serializable]
    [MessagePackObject]
    public class RankedPlayUserInfo
    {
        /// <summary>
        /// This user's matchmaking rating.
        /// </summary>
        [Key(0)]
        public required int Rating { get; set; }

        /// <summary>
        /// The current life points.
        /// </summary>
        [Key(1)]
        public int Life { get; set; } = 1_000_000;

        /// <summary>
        /// The cards in this user's hand.
        /// </summary>
        [Key(2)]
        public List<RankedPlayCardItem> Hand { get; set; } = [];

        /// <summary>
        /// Rating after conclusion of the match.
        /// </summary>
        [Key(3)]
        public int RatingAfter { get; set; }

        /// <summary>
        /// Information about damage being applied in the current stage.
        /// </summary>
        /// <remarks>
        /// This value is only expected to be populated during the <see cref="RankedPlayStage.Results"/> stage.
        /// </remarks>
        [Key(4)]
        public RankedPlayDamageInfo? DamageInfo;

        /// <summary>
        /// Number of rounds this player has won.
        /// </summary>
        [Key(5)]
        public int RoundsWon { get; set; }

        /// <summary>
        /// This player's individual damage multiplier.
        /// </summary>
        [Key(6)]
        public double DamageMultiplier { get; set; } = 0.5;
    }
}
