package com.pixelized.shared.lwa.parser.dice

data class Dice(
    val modifier: Modifier?,
    val quantity: Int,
    val faces: Int,
) {
    enum class Modifier {
        ADVANTAGE,
        DISADVANTAGE,
        EMPHASIS,
    }

    override fun toString(): String {
        val modifier = when (modifier) {
            Modifier.ADVANTAGE -> "a"
            Modifier.DISADVANTAGE -> "d"
            Modifier.EMPHASIS -> "e"
            null -> ""
        }
        return "${modifier}${quantity}d${faces}"
    }
}