atagen

jelq

public

an http based roguelike rpg about jelqing

Star0
Watch0

Commit bad9f5b8202f

tarball

atagen <boss@atagen.co>2026-10-14 09:25 UTC

3 files changed+20-5
game: let an edge use the lube it is sent

Edges always chafed dry and ignored Content-Type, so a lube-heavy edging route was impossible and a declared bottle was neither used nor checked.
Modified file: src/game/dispatch.rs+3 additions−1 deletions
@@ -64,12 +64,14 @@ impl Run {
6464 Utility::Energy => return self.energy(),
6565 Utility::Edge | Utility::Pump => {}
6666 }
67+ let lube = lube.filter(|_| utility == Utility::Edge);
6768 self.ready(Technique::Utility(utility), lube)?;
6869 self.check_storage()?;
70+ self.lube_available(lube)?;
6971 self.check_clock()?;
7072 self.floor_enemy()?;
7173 match utility {
72- Utility::Edge => self.edge(),
74+ Utility::Edge => self.edge(lube),
7375 _ => self.pump(),
7476 }
7577 }
Modified file: src/game/utility.rs+5 additions−4 deletions
@@ -7,7 +7,7 @@ use axum::http::{StatusCode, header};
77 use serde_json::json;
88
99 use super::{
10- Floor, Outcome, Run,
10+ Floor, Lube, Outcome, Run,
1111 balance::{
1212 EDGE_EQ, EDGE_GIRTH, EDGE_LOOP, ENERGY_STAMINA, FRICTION_ICE, HOTEL_STRESS, ICE_EQ,
1313 PRIAPISM_EQ, PRIAPISM_TURNS, PUMP_GAIN, SHOWER_EQ, SUPPLEMENT_WORKS, TOWELLESS_EQ,
@@ -159,9 +159,10 @@ impl Run {
159159 .with("upstream", "Pump-Bro"))
160160 }
161161
162- pub(super) fn edge(&mut self) -> Result<Outcome, Problem> {
163- self.chafe(None, 5, false);
164- self.commit(5, None, 1)?;
162+ pub(super) fn edge(&mut self, lube: Option<Lube>) -> Result<Outcome, Problem> {
163+ self.take_lube(lube)?;
164+ self.chafe(lube, 5, false);
165+ self.commit(5, lube, 1)?;
165166 if let ControlFlow::Break(interrupted) = self.hazards(5)? {
166167 return Ok(interrupted);
167168 }
Modified file: src/tests/body.rs+12 additions
@@ -268,6 +268,18 @@ async fn friction_rises_with_vigour_and_edging_chafes() {
268268 });
269269 let edge = send(&app, "JELQ", "/runs/cafebabe?technique=edge", &[], "").await;
270270 assert_eq!(header(&edge, "x-friction"), "2/10");
271+
272+ let oiled = seeded_with(Floor::Hotel, |run| {
273+ run.here.wifi_accepted = true;
274+ run.body.eq = 55;
275+ run.body.foreskin = Some(0.5);
276+ run.items.lubes.baby_oil = 1;
277+ });
278+ let oil = [("content-type", "application/baby-oil")];
279+ let edge = send(&oiled, "JELQ", "/runs/cafebabe?technique=edge", &oil, "").await;
280+ assert_eq!(header(&edge, "x-friction"), "0/10");
281+ let empty = send(&oiled, "JELQ", "/runs/cafebabe?technique=edge", &oil, "").await;
282+ assert_eq!(empty.status(), StatusCode::UNSUPPORTED_MEDIA_TYPE);
271283 }
272284
273285 #[tokio::test]