package com.craigvg.lichun_android.domain.models import kotlinx.serialization.Serializable /** * Relationship event models for dating feature */ @Serializable enum class RelationshipEventType { ARGUMENT, ANNIVERSARY, JEALOUSY, PROPOSAL, BREAKUP_THREAT } @Serializable data class RelationshipEvent( val id: String, val type: RelationshipEventType, val title: String, val description: String, val partnerName: String, val partnerId: String, val choices: List ) @Serializable data class EventChoice( val id: String, val text: String, val affinityChange: Int, val diamondCost: Int = 0, val moneyCost: Double = 0.0, val energyCost: Int = 0 ) { fun canAfford(energy: Int, money: Double, diamonds: Int): Boolean { return energy >= energyCost && money >= moneyCost && diamonds >= diamondCost } val costDescription: String get() { val costs = mutableListOf() if (energyCost > 0) costs.add("$energyCost Energy") if (moneyCost > 0) costs.add("$$moneyCost") if (diamondCost > 0) costs.add("$diamondCost Diamonds") return costs.joinToString(" + ") } }