package com.pixelized.shared.lwa.model.characterSheet

import kotlinx.serialization.Serializable

@Serializable
data class CharacterSheetJsonV1(
    override val id: String,
    override val name: String,
    val job: String?,
    val portrait: String?,
    val thumbnail: String?,
    val externalLink: String?,
    val level: Int,
    val shouldLevelUp: Boolean?,
    // characteristics
    val strength: Int,
    val dexterity: Int,
    val constitution: Int,
    val height: Int,
    val intelligence: Int,
    val power: Int,
    val charisma: Int,
    // alterations
    val damage: Int?,
    val fatigue: Int?,
    val diminished: Int?,
    val alterations: List<String>?,
    // skills
    val skills: List<Skill>,
    val occupations: List<Skill>,
    val magics: List<Skill>,
    // actions
    val rolls: List<Roll>,
    // tags
    val tag: List<String>?,
) : CharacterSheetJson {

    @Serializable
    data class Skill(
        val id: String,
        val label: String,
        val description: String?,
        val base: String,
        val bonus: String?,
        val level: Int,
        val occupation: Boolean,
        val used: Boolean,
    )

    @Serializable
    data class Roll(
        val id: String,
        val label: String,
        val description: String?,
        val canBeCritical: Boolean,
        val roll: String,
        val special: String?,
        val critical: String?,
    )
}