use super::item::Item; use serde::{Deserialize, Serialize}; #[derive(PartialEq, Eq, PartialOrd, Clone, Serialize, Deserialize, Debug, Ord)] pub enum EffectType { Ephemeral, // i.e. no enduring impact to show in status. Bandages, Bleed, Stunned, } pub struct EffectSet { pub effect_type: EffectType, pub effects: Vec, } pub enum Effect { // messagef takes player, causative item, target as the 3 parameters. Returns message. BroadcastMessage { delay_secs: u64, messagef: Box String + Sync + Send>, }, // skill_multiplier is always positive - sign flipped for crit fails. ChangeTargetHealth { delay_secs: u64, base_effect: i64, skill_multiplier: f64, max_effect: i64, message: Box String + Sync + Send>, }, }