an http based roguelike rpg about jelqing
Blame: src/game/mod.rs
782069860236 | atagen | 2026-10-10 12:44 UTC | 1 | pub mod balance; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 2 | mod body; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 3 | mod clinic; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 4 | mod floors; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 5 | mod forum; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 6 | mod hazards; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 7 | mod household; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 8 | mod items; |
0a0bfee8329e | atagen | 2026-10-11 05:11 UTC | 9 | mod kitchen; |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 10 | pub(crate) mod oracle; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 11 | mod outcome; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 12 | mod shop; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 13 | mod state; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 14 | mod techniques; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 15 | mod turn; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 16 | mod utility; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 17 | |
159f0998263b | atagen | 2026-10-12 11:01 UTC | 18 | pub use body::{PatchOp, volume}; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 19 | pub use forum::{ELDER_LAST_MODIFIED, FORUM_THREAD, forum_thread}; |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 20 | pub use household::vocabulary as excuse_vocabulary; |
7d3fb63208bf | atagen | 2026-10-11 04:38 UTC | 21 | pub use items::{Item, Items, SHOP}; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 22 | pub use outcome::{Outcome, Payload}; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 23 | pub use state::{ |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 24 | Cause, Clinic, Conditions, Elder, Ending, Floor, FloorState, Grip, MumVisit, Observer, |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 25 | RunStatus, Story, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 26 | }; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 27 | pub use techniques::{LUBRICANTS, Lube, Technique}; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 28 | |
99524cf9f17c | atagen | 2026-10-10 10:53 UTC | 29 | use std::{ |
782069860236 | atagen | 2026-10-10 12:44 UTC | 30 | hash::{DefaultHasher, Hash, Hasher}, |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 31 | time::{Instant, SystemTime}, |
99524cf9f17c | atagen | 2026-10-10 10:53 UTC | 32 | }; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 33 | |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 34 | use axum::http::StatusCode; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 35 | use serde_json::{Value, json}; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 36 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 37 | use crate::problem::Problem; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 38 | use balance::{ |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 39 | BRANCH_TURN, HONEST_TOLERANCE, MAX_STAMINA, PRIAPISM_EQ, PULLED_STAMINA, SELF_REPORT_INFLATION, |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 40 | STARTING_CASH, STARTING_EQ, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 41 | }; |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 42 | use oracle::{Oracle, OracleTemplate}; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 43 | use state::Pending; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 44 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 45 | pub struct Run { |
9683736a2c5e | atagen | 2026-10-10 13:15 UTC | 46 | /// The private id in the run's URL. Knowing it is the only authorisation a run has. |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 47 | pub id: String, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 48 | pub public_id: String, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 49 | etag_salt: u64, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 50 | pub version: u64, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 51 | pub turn: u32, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 52 | pub floor: Floor, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 53 | pub here: FloorState, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 54 | pub length: f64, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 55 | pub girth: f64, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 56 | pub foreskin: Option<f64>, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 57 | pub eq: i32, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 58 | pub stamina: i32, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 59 | pub suspicion: u8, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 60 | pub shame: u32, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 61 | pub shame_reported: u32, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 62 | pub shame_total: u32, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 63 | pub cash: u32, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 64 | pub grip: Grip, |
5dfebcc0ac43 | atagen | 2026-10-11 05:28 UTC | 65 | pub friction: i32, |
5dfebcc0ac43 | atagen | 2026-10-11 05:28 UTC | 66 | pub jelq_grip: Option<Grip>, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 67 | pub items: Items, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 68 | pub conditions: Conditions, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 69 | pub warmed_up: bool, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 70 | pub put_applied: bool, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 71 | pub story: Story, |
b85a0d4536c3 | atagen | 2026-10-11 08:50 UTC | 72 | pub uli_taught: bool, |
0a0bfee8329e | atagen | 2026-10-11 05:11 UTC | 73 | pub kitchen_tellings: u8, |
9683736a2c5e | atagen | 2026-10-10 13:15 UTC | 74 | pub mum: Option<MumVisit>, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 75 | pub heard: Vec<String>, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 76 | pub elder: Elder, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 77 | pub clinic: Clinic, |
99524cf9f17c | atagen | 2026-10-10 10:53 UTC | 78 | pub seeded: bool, |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 79 | pub filmed_at: Option<SystemTime>, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 80 | pub observed: Option<Observer>, |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 81 | pub exhausted: bool, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 82 | pub pending: Vec<Pending>, |
d46f9d0b953a | atagen | 2026-10-10 14:41 UTC | 83 | pub notices: Vec<&'static str>, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 84 | pub ended: Option<Ending>, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 85 | pub last_seen: Instant, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 86 | oracle: Oracle, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 87 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 88 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 89 | pub fn round2(x: f64) -> f64 { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 90 | (x * 100.0).round() / 100.0 |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 91 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 92 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 93 | fn round3(x: f64) -> f64 { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 94 | (x * 1000.0).round() / 1000.0 |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 95 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 96 | |
177535ac8abf | atagen | 2026-10-10 10:39 UTC | 97 | fn honest(claimed: f64, actual: f64) -> bool { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 98 | (claimed - actual).abs() < HONEST_TOLERANCE |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 99 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 100 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 101 | fn not_extended() -> Problem { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 102 | Problem::new( |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 103 | StatusCode::NOT_EXTENDED, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 104 | "not-extended", |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 105 | "The requested extension was not applied. The server has recorded the attempt.", |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 106 | ) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 107 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 108 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 109 | pub fn parse_credentials<'a>(authorization: &'a str, scheme: &str) -> Option<&'a str> { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 110 | let (given, rest) = authorization.trim().split_once(' ')?; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 111 | given |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 112 | .eq_ignore_ascii_case(scheme) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 113 | .then(|| rest.trim().trim_matches('"')) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 114 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 115 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 116 | pub fn etag_matches(condition: &str, etag: &str) -> bool { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 117 | condition |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 118 | .split(',') |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 119 | .map(str::trim) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 120 | .any(|tag| tag == "*" || tag.trim_start_matches("W/") == etag) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 121 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 122 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 123 | pub fn shaft(mm: usize) -> String { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 124 | format!("8{}D", "=".repeat(mm.saturating_sub(2))) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 125 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 126 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 127 | impl Run { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 128 | #[cfg(test)] |
782069860236 | atagen | 2026-10-10 12:44 UTC | 129 | pub fn new(id: String, public_id: String, seed: u64) -> Self { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 130 | Self::with_oracle(id, public_id, seed, &OracleTemplate::Rng) |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 131 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 132 | |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 133 | pub fn with_oracle( |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 134 | id: String, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 135 | public_id: String, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 136 | seed: u64, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 137 | template: &OracleTemplate, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 138 | ) -> Self { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 139 | let mut oracle = Oracle::build(template, seed); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 140 | let length = round2(oracle.span( |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 141 | Run::unborn("length", "How long is it, in inches?"), |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 142 | 4.5, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 143 | 6.5, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 144 | )); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 145 | let girth = round2(oracle.span( |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 146 | Run::unborn("girth", "How thick is it, in inches?"), |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 147 | 4.0, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 148 | 5.0, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 149 | )); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 150 | let foreskin = round2(oracle.span( |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 151 | Run::unborn("foreskin", "How much foreskin is there, in inches?"), |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 152 | 0.4, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 153 | 2.4, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 154 | )); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 155 | let etag_salt = oracle.u64(); |
782069860236 | atagen | 2026-10-10 12:44 UTC | 156 | Self { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 157 | id, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 158 | public_id, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 159 | etag_salt, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 160 | version: 0, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 161 | turn: 0, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 162 | floor: Floor::Bedroom, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 163 | here: FloorState::default(), |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 164 | length, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 165 | girth, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 166 | foreskin: Some(foreskin), |
782069860236 | atagen | 2026-10-10 12:44 UTC | 167 | eq: STARTING_EQ, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 168 | stamina: MAX_STAMINA, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 169 | suspicion: 0, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 170 | shame: 0, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 171 | shame_reported: 0, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 172 | shame_total: 0, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 173 | cash: STARTING_CASH, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 174 | grip: Grip::Overhand, |
5dfebcc0ac43 | atagen | 2026-10-11 05:28 UTC | 175 | friction: 0, |
5dfebcc0ac43 | atagen | 2026-10-11 05:28 UTC | 176 | jelq_grip: None, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 177 | items: Items::default(), |
782069860236 | atagen | 2026-10-10 12:44 UTC | 178 | conditions: Conditions::default(), |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 179 | warmed_up: false, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 180 | put_applied: false, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 181 | story: Story::Unopened, |
b85a0d4536c3 | atagen | 2026-10-11 08:50 UTC | 182 | uli_taught: false, |
0a0bfee8329e | atagen | 2026-10-11 05:11 UTC | 183 | kitchen_tellings: 0, |
9683736a2c5e | atagen | 2026-10-10 13:15 UTC | 184 | mum: None, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 185 | heard: Vec::new(), |
d46f9d0b953a | atagen | 2026-10-10 14:41 UTC | 186 | notices: Vec::new(), |
782069860236 | atagen | 2026-10-10 12:44 UTC | 187 | elder: Elder::Unverified { strikes: 0 }, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 188 | clinic: Clinic::default(), |
99524cf9f17c | atagen | 2026-10-10 10:53 UTC | 189 | seeded: false, |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 190 | filmed_at: None, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 191 | observed: None, |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 192 | exhausted: false, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 193 | pending: Vec::new(), |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 194 | ended: None, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 195 | last_seen: Instant::now(), |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 196 | oracle, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 197 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 198 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 199 | |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 200 | /// A roll for a run that does not exist yet, so there is no state to describe. |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 201 | fn unborn(site: &'static str, ask: &str) -> oracle::Roll { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 202 | oracle::Roll { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 203 | state: "A new run is being created. No game has been played yet.".into(), |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 204 | site, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 205 | ask: ask.into(), |
782069860236 | atagen | 2026-10-10 12:44 UTC | 206 | } |
782069860236 | atagen | 2026-10-10 12:44 UTC | 207 | } |
782069860236 | atagen | 2026-10-10 12:44 UTC | 208 | |
782069860236 | atagen | 2026-10-10 12:44 UTC | 209 | fn etag_at(&self, version: u64) -> String { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 210 | let mut hasher = DefaultHasher::new(); |
782069860236 | atagen | 2026-10-10 12:44 UTC | 211 | (self.etag_salt, version).hash(&mut hasher); |
782069860236 | atagen | 2026-10-10 12:44 UTC | 212 | format!("\"{:016x}\"", hasher.finish()) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 213 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 214 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 215 | pub fn etag(&self) -> String { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 216 | self.etag_at(self.version) |
782069860236 | atagen | 2026-10-10 12:44 UTC | 217 | } |
782069860236 | atagen | 2026-10-10 12:44 UTC | 218 | |
782069860236 | atagen | 2026-10-10 12:44 UTC | 219 | /// The ETag the run had when it was created, which the true ending asks for. |
782069860236 | atagen | 2026-10-10 12:44 UTC | 220 | pub fn origin_etag(&self) -> String { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 221 | self.etag_at(0) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 222 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 223 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 224 | pub fn touch(&mut self) { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 225 | self.version += 1; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 226 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 227 | |
5dfebcc0ac43 | atagen | 2026-10-11 05:28 UTC | 228 | pub(super) fn shed(&mut self, friction: i32) { |
5dfebcc0ac43 | atagen | 2026-10-11 05:28 UTC | 229 | self.friction = (self.friction - friction).max(0); |
5dfebcc0ac43 | atagen | 2026-10-11 05:28 UTC | 230 | } |
5dfebcc0ac43 | atagen | 2026-10-11 05:28 UTC | 231 | |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 232 | /// Priapism holds EQ up no matter what else moves it. |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 233 | pub(super) fn reset_eq(&mut self, eq: i32) { |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 234 | let floor = if self.conditions.priapism_turns > 0 { |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 235 | PRIAPISM_EQ |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 236 | } else { |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 237 | 0 |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 238 | }; |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 239 | self.eq = eq.max(floor); |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 240 | } |
14de3e1e8dc2 | atagen | 2026-10-11 06:19 UTC | 241 | |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 242 | /// A melon offer stands only while the raiding streak continues. Any other action ends it. |
5cc6ab966f30 | atagen | 2026-10-11 11:23 UTC | 243 | pub(super) fn end_kitchen_visit(&mut self) { |
5cc6ab966f30 | atagen | 2026-10-11 11:23 UTC | 244 | self.here.melon_offered = false; |
5cc6ab966f30 | atagen | 2026-10-11 11:23 UTC | 245 | } |
5cc6ab966f30 | atagen | 2026-10-11 11:23 UTC | 246 | |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 247 | /// Going back to the jelq walks away from both the fridge and Pump-Bro. |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 248 | pub(super) fn step_away(&mut self) { |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 249 | self.end_kitchen_visit(); |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 250 | self.here.shopping = false; |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 251 | } |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 252 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 253 | fn fresh_nonce(&mut self) -> String { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 254 | format!("{:016x}", self.oracle.u64()) |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 255 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 256 | |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 257 | /// One game decision for the oracle, phrased for the model and stamped |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 258 | /// with the state as the player sees it. |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 259 | fn decision(&self, site: &'static str, ask: impl std::fmt::Display) -> oracle::Roll { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 260 | oracle::Roll { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 261 | state: self.oracle_state(), |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 262 | site, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 263 | ask: ask.to_string(), |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 264 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 265 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 266 | |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 267 | fn oracle_state(&self) -> String { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 268 | let mut s = String::new(); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 269 | let place = match self.floor { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 270 | Floor::Bedroom => "the bedroom", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 271 | Floor::Bathroom => "the bathroom", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 272 | Floor::ChangingRoom => "the changing room", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 273 | Floor::Nans => "Nan's house", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 274 | Floor::Hotel => "the hotel room", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 275 | Floor::Forum => "the forum floor", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 276 | Floor::Clinic => "the clinic", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 277 | }; |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 278 | s.push_str(&format!( |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 279 | "Floor {}, {place}. Turn {}.\n\n", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 280 | self.floor.number(), |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 281 | self.turn |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 282 | )); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 283 | s.push_str(&format!( |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 284 | "eq: {}\nstamina: {}\nfriction: {}\n", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 285 | self.eq, self.stamina, self.friction |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 286 | )); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 287 | if self.conditions.friction_burn { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 288 | s.push_str("friction burn: yes, untreated\n"); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 289 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 290 | if self.conditions.priapism_turns > 0 { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 291 | s.push_str("priapism: yes\n"); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 292 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 293 | if self.conditions.peyronie { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 294 | s.push_str("peyronie's disease: yes\n"); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 295 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 296 | if self.conditions.pulled_muscle { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 297 | s.push_str("pulled muscle: yes\n"); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 298 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 299 | s.push_str(&format!( |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 300 | "suspicion: {}\nshame: {}\nwarmed up: {}\ngrip: {}\n", |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 301 | self.suspicion, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 302 | self.shame, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 303 | if self.warmed_up { "yes" } else { "no" }, |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 304 | self.grip.name(), |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 305 | )); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 306 | let held: Vec<&str> = self.items.owned().iter().map(|item| item.slug()).collect(); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 307 | if !held.is_empty() { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 308 | s.push_str(&format!("items: {}\n", held.join(", "))); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 309 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 310 | if self.mum.is_some() { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 311 | s.push_str("Mum is at the door\n"); |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 312 | } |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 313 | s |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 314 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 315 | |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 316 | fn chance(&mut self, roll: oracle::Roll, odds: u32) -> bool { |
3f9091557ec3 | atagen | 2026-10-11 11:43 UTC | 317 | self.oracle.chance(roll, odds) |
782069860236 | atagen | 2026-10-10 12:44 UTC | 318 | } |
782069860236 | atagen | 2026-10-10 12:44 UTC | 319 | |
782069860236 | atagen | 2026-10-10 12:44 UTC | 320 | pub fn path(&self, sub: &str) -> String { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 321 | format!("/runs/{}{sub}", self.id) |
782069860236 | atagen | 2026-10-10 12:44 UTC | 322 | } |
782069860236 | atagen | 2026-10-10 12:44 UTC | 323 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 324 | pub fn current_length(&self) -> f64 { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 325 | self.length + self.here.temp_length |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 326 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 327 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 328 | pub fn self_reported(&self) -> f64 { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 329 | self.current_length() + SELF_REPORT_INFLATION |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 330 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 331 | |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 332 | pub fn max_stamina(&self) -> i32 { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 333 | if self.conditions.pulled_muscle { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 334 | PULLED_STAMINA |
782069860236 | atagen | 2026-10-10 12:44 UTC | 335 | } else { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 336 | MAX_STAMINA |
782069860236 | atagen | 2026-10-10 12:44 UTC | 337 | } |
782069860236 | atagen | 2026-10-10 12:44 UTC | 338 | } |
782069860236 | atagen | 2026-10-10 12:44 UTC | 339 | |
782069860236 | atagen | 2026-10-10 12:44 UTC | 340 | pub fn forum_read(&self) -> bool { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 341 | self.story == Story::ReadForum |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 342 | } |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 343 | |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 344 | pub fn thread_reachable(&self) -> bool { |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 345 | self.turn >= BRANCH_TURN |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 346 | || self.forum_read() |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 347 | || self.floor.number() >= Floor::Forum.number() |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 348 | } |
e807266c323b | atagen | 2026-10-12 09:46 UTC | 349 | |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 350 | pub fn footage(&self) -> Option<(SystemTime, u64)> { |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 351 | let filmed = self.filmed_at?; |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 352 | let age = filmed.elapsed().map_or(0, |d| d.as_secs()); |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 353 | Some((filmed, age)) |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 354 | } |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 355 | |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 356 | pub fn status(&self) -> RunStatus { |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 357 | if self.ended.is_some() { |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 358 | RunStatus::Gone |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 359 | } else if self.clinic.cured { |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 360 | RunStatus::Normal |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 361 | } else if self.clinic.prescribed { |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 362 | RunStatus::Prescribed |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 363 | } else { |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 364 | RunStatus::Alive |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 365 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 366 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 367 | |
782069860236 | atagen | 2026-10-10 12:44 UTC | 368 | /// The parts of the run that its response headers do not already carry. |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 369 | pub fn view(&self) -> Value { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 370 | let conditions: Vec<&str> = [ |
782069860236 | atagen | 2026-10-10 12:44 UTC | 371 | (self.here.teapot, "short and stout"), |
782069860236 | atagen | 2026-10-10 12:44 UTC | 372 | (self.conditions.peyronie, "curved"), |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 373 | (self.items.cage, "caged"), |
782069860236 | atagen | 2026-10-10 12:44 UTC | 374 | (self.conditions.priapism_turns > 0, "priapism"), |
782069860236 | atagen | 2026-10-10 12:44 UTC | 375 | (self.conditions.pulled_muscle, "pulled muscle"), |
c3e0c27cf8fd | atagen | 2026-10-10 11:28 UTC | 376 | (self.filmed_at.is_some(), "viral"), |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 377 | ] |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 378 | .into_iter() |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 379 | .filter_map(|(active, name)| active.then_some(name)) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 380 | .collect(); |
782069860236 | atagen | 2026-10-10 12:44 UTC | 381 | json!({ |
782069860236 | atagen | 2026-10-10 12:44 UTC | 382 | "public_id": self.public_id, |
c4d70621d377 | atagen | 2026-10-12 11:56 UTC | 383 | "status": self.status().name(), |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 384 | "turn": self.turn, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 385 | "run_shame": self.shame, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 386 | "grip": self.grip.name(), |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 387 | "warmed_up": self.warmed_up, |
99524cf9f17c | atagen | 2026-10-10 10:53 UTC | 388 | "ranked": !self.seeded, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 389 | "conditions": conditions, |
782069860236 | atagen | 2026-10-10 12:44 UTC | 390 | }) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 391 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 392 | |
782069860236 | atagen | 2026-10-10 12:44 UTC | 393 | pub fn end(&mut self, cause: Cause) -> Problem { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 394 | self.ended = Some(Ending { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 395 | cause, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 396 | turn: self.turn, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 397 | }); |
782069860236 | atagen | 2026-10-10 12:44 UTC | 398 | cause.problem().with("turn", self.turn) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 399 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 400 | |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 401 | /// The refractory period is the next HOLD. It comes back with full stamina and nothing else. |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 402 | fn recover(&mut self) { |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 403 | self.exhausted = false; |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 404 | self.stamina = self.max_stamina(); |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 405 | self.reset_eq(STARTING_EQ); |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 406 | self.warmed_up = false; |
e76ab808e7ad | atagen | 2026-10-10 13:46 UTC | 407 | } |
e76ab808e7ad | atagen | 2026-10-10 13:46 UTC | 408 | |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 409 | fn check_exhausted(&self) -> Result<(), Problem> { |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 410 | if !self.exhausted { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 411 | return Ok(()); |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 412 | } |
e76ab808e7ad | atagen | 2026-10-10 13:46 UTC | 413 | Err(Problem::new( |
e76ab808e7ad | atagen | 2026-10-10 13:46 UTC | 414 | StatusCode::TOO_MANY_REQUESTS, |
e76ab808e7ad | atagen | 2026-10-10 13:46 UTC | 415 | "overtrained", |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 416 | "Stamina is exhausted. HOLD for the refractory period.", |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 417 | )) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 418 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 419 | |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 420 | fn exhaust(&mut self) { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 421 | self.stamina = 0; |
a6caa2f99786 | atagen | 2026-10-12 10:38 UTC | 422 | self.exhausted = true; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 423 | } |
782069860236 | atagen | 2026-10-10 12:44 UTC | 424 | |
9683736a2c5e | atagen | 2026-10-10 13:15 UTC | 425 | fn realise(&mut self) { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 426 | let (due, waiting): (Vec<_>, Vec<_>) = std::mem::take(&mut self.pending) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 427 | .into_iter() |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 428 | .partition(|p| p.due <= self.turn); |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 429 | self.pending = waiting; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 430 | for p in due { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 431 | self.length += p.length; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 432 | self.girth += p.girth; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 433 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 434 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 435 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 436 | fn gain(&mut self, length: f64, girth: f64, foreskin: f64) { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 437 | self.length += length; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 438 | self.girth += girth; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 439 | if let Some(f) = &mut self.foreskin { |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 440 | *f += foreskin; |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 441 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 442 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 443 | |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 444 | fn rupture(&mut self) -> Problem { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 445 | let cause = Cause::Ruptured { |
782069860236 | atagen | 2026-10-10 12:44 UTC | 446 | ice_unused: self.items.ice_packs > 0, |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 447 | }; |
782069860236 | atagen | 2026-10-10 12:44 UTC | 448 | self.end(cause) |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 449 | } |
dfa38cf4cd4b | atagen | 2026-10-10 09:17 UTC | 450 | } |