configs/
flip.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3use tsify_next::Tsify;
4
5/// Balance settings for the persistent global equipment flip gauge.
6#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, Tsify)]
7pub struct FlipSettings {
8    /// Chapter level at which Real slots, progress, and flip presentation become active.
9    #[schemars(
10        title = "Глава разблокировки флипа",
11        description = "До этой главы игрок остаётся в Fantasy, а шкала не заполняется."
12    )]
13    pub unlock_chapter: i64,
14
15    /// Normalized progress required to toggle the global active side.
16    #[schemars(
17        title = "Порог глобального флипа",
18        description = "Сколько нормализованного прогресса требуется для одного переключения Real/Fantasy."
19    )]
20    pub progress_threshold: f64,
21
22    /// BAL-026 `C`: gauge for removing a victim's FULL health bar (scaled by
23    /// the victim's wave share for outgoing, by the owner's own bar for
24    /// incoming). Symmetric for dealt and received.
25    #[schemars(
26        title = "Шкала за снятую полоску здоровья",
27        description = "Сколько прогресса шкалы даёт снятие полной полосы здоровья: исходящий урон умножается на долю жертвы в волне, входящий нормируется собственным здоровьем."
28    )]
29    pub damage_gauge_coefficient: f64,
30}
31
32impl FlipSettings {
33    pub const fn is_unlocked(&self, chapter_level: i64) -> bool {
34        chapter_level >= self.unlock_chapter
35    }
36}