package com.pixelized.shared.lwa.protocol.websocket

import kotlinx.serialization.Serializable

@Serializable
sealed interface CharacterSheetEvent : SocketMessage, CharacterSheetIdMessage {

    @Serializable
    data class UpdateDamage(
        override val characterSheetId: String,
        override val timestamp: Long,
        val armor: Int?,
        val oldValue: Int,
        val damage: Int,
    ) : CharacterSheetEvent

    @Serializable
    data class UpdateFatigue(
        override val characterSheetId: String,
        override val timestamp: Long,
        val oldValue: Int,
        val fatigue: Int,
    ) : CharacterSheetEvent

    @Serializable
    data class UpdateDiminished(
        override val timestamp: Long,
        override val characterSheetId: String,
        val diminished: Int,
    ) : CharacterSheetEvent

    @Serializable
    data class UpdateAlteration(
        override val timestamp: Long,
        override val characterSheetId: String,
        val alterationId: String,
        val active: Boolean,
    ) : CharacterSheetEvent

    @Serializable
    data class UpdateSkillUsageEvent(
        override val timestamp: Long,
        override val characterSheetId: String,
        val skillId: String,
        val used: Boolean,
    ) : CharacterSheetEvent
}