an http based roguelike rpg about jelqing
Blame: src/game/arousal.rs
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 1 | use super::{ |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 2 | Run, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 3 | balance::{DANGER_EQ, EQ_BAND, HOT_EQ, PREMATURE_EQ, RING_RUPTURE_LINE, RUPTURE_LINE}, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 4 | }; |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 5 | |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 6 | /// What `X-EQ` shows in place of the number, cut on the lines the rolls already use. |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 7 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 8 | pub enum Arousal { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 9 | Flaccid, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 10 | Cold, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 11 | Warm, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 12 | Ideal, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 13 | Swollen, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 14 | Throbbing, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 15 | Straining, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 16 | Imminent, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 17 | Priapic, |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 18 | } |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 19 | |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 20 | impl Arousal { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 21 | pub fn name(self) -> &'static str { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 22 | match self { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 23 | Self::Flaccid => "Flaccid", |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 24 | Self::Cold => "Cold", |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 25 | Self::Warm => "Warm", |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 26 | Self::Ideal => "Ideal", |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 27 | Self::Swollen => "Swollen", |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 28 | Self::Throbbing => "Throbbing", |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 29 | Self::Straining => "Straining", |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 30 | Self::Imminent => "Imminent", |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 31 | Self::Priapic => "Priapic", |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 32 | } |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 33 | } |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 34 | } |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 35 | |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 36 | impl Run { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 37 | pub(super) fn rupture_line(&self) -> i32 { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 38 | if self.items.kit.ring { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 39 | RING_RUPTURE_LINE |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 40 | } else { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 41 | RUPTURE_LINE |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 42 | } |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 43 | } |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 44 | |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 45 | pub fn arousal(&self) -> Arousal { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 46 | if self.body.conditions.priapism_turns > 0 { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 47 | Arousal::Priapic |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 48 | } else if self.hotter_than(PREMATURE_EQ) { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 49 | Arousal::Imminent |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 50 | } else if self.hotter_than(self.rupture_line()) { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 51 | Arousal::Straining |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 52 | } else if self.hotter_than(HOT_EQ) { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 53 | Arousal::Throbbing |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 54 | } else if self.hotter_than(DANGER_EQ) { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 55 | Arousal::Swollen |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 56 | } else if EQ_BAND.contains(&self.body.eq) { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 57 | Arousal::Ideal |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 58 | } else if self.body.eq == 0 { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 59 | Arousal::Flaccid |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 60 | } else if self.cold() { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 61 | Arousal::Cold |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 62 | } else { |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 63 | Arousal::Warm |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 64 | } |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 65 | } |
e028a4184d00 | atagen | 2026-10-14 10:49 UTC | 66 | } |