an http based roguelike rpg about jelqing
Commit 9adb509e6685
tarball7 files changed+28-9
@@ -1,4 +1,7 @@
1
-pub const SELF_REPORT_INFLATION: f64 = 1.5;1
+/// In tenths of an inch, rolled once per run.2
+pub const SELF_REPORT_INFLATION: std::ops::RangeInclusive<i32> = 5..=25;3
+pub const UNMEASURED_SHAME: u32 = 10;4
+pub const UNMEASURED_SHAME_PER_INCH: f64 = 5.0;25
pub const MM_PER_INCH: f64 = 25.4;36
pub const HONEST_TOLERANCE: f64 = 0.06;47
pub const EXAGGERATION: f64 = 1.0;@@ -11,6 +11,7 @@ pub struct Body {
1111
pub(crate) length: f64,1212
pub(crate) girth: f64,1313
pub(crate) foreskin: Option<f64>,14
+ pub(crate) inflation: f64,1415
pub(crate) eq: i32,1516
pub(crate) stamina: i32,1617
pub(crate) friction: i32,@@ -26,11 +27,12 @@ pub struct Body {
2627
}2728
2829
impl Body {29
- pub fn new(length: f64, girth: f64, foreskin: f64) -> Self {30
+ pub fn new(length: f64, girth: f64, foreskin: f64, inflation: f64) -> Self {3031
Self {3132
length,3233
girth,3334
foreskin: Some(foreskin),35
+ inflation,3436
eq: STARTING_EQ,3537
stamina: MAX_STAMINA,3638
friction: 0,@@ -3,6 +3,7 @@ use serde_json::json;
33
44
use super::{55
Floor, Outcome, Run,6
+ balance::{UNMEASURED_SHAME, UNMEASURED_SHAME_PER_INCH},67
credentials::{Scheme, etag_matches, parse_credentials},78
measure::{round2, volume},89
};@@ -72,7 +73,8 @@ impl Run {
7273
if !self.clinic.measured {7374
self.clinic.measured = true;7475
if !self.items.kit.ruler {75
- self.standing.shame += 15;76
+ self.standing.shame += UNMEASURED_SHAME77
+ + (self.body.inflation * UNMEASURED_SHAME_PER_INCH).round() as u32;7678
}7779
}7880
let volume = volume(self.body.length, self.body.girth);@@ -46,6 +46,8 @@ pub fn forum_thread() -> Value {
4646
{ "author": "newbie_2009", "body": "I have been sending PUT for three weeks and nothing has changed." },4747
{ "author": "TheElder", "body": "PUT is idempotent. Read the spec." },4848
{ "author": "TheElder", "body": "Members verify with a Ruler. Proxy-Authorization, inches, no rounding up. We can tell." },49
+ { "author": "newbie_2009", "body": "cant i just take off what i tell people. everyone adds an inch and a half" },50
+ { "author": "TheElder", "body": "Everyone adds a different amount. That is why there is a Ruler." },4951
{ "author": "throwaway_77", "body": "my doctor said i was normal. i didnt believe him. i still dont know what he meant by bearer" },5052
{ "author": "TheElder", "body": "My numbers are in my spreadsheet. They have not changed since 2009. Nothing about me has changed since 2009." },5153
],@@ -74,6 +74,14 @@ impl Run {
7474
0.4,7575
2.4,7676
));77
+ let inflation = f64::from(oracle.span_int(78
+ Run::unborn(79
+ "inflation",80
+ "How far does the self-report round up, in tenths of an inch?",81
+ ),82
+ *SELF_REPORT_INFLATION.start(),83
+ *SELF_REPORT_INFLATION.end(),84
+ )) / 10.0;7785
let mut items = Items::default();7886
if oracle.chance(7987
Run::unborn(@@ -105,7 +113,7 @@ impl Run {
105113
version: 0,106114
last_seen: Instant::now(),107115
},108
- body: Body::new(length, girth, foreskin),116
+ body: Body::new(length, girth, foreskin, inflation),109117
standing: Standing::default(),110118
household: Household::default(),111119
online: Online::default(),@@ -255,7 +263,7 @@ impl Run {
255263
}256264
257265
pub fn self_reported(&self) -> f64 {258
- self.current_length() + SELF_REPORT_INFLATION266
+ self.current_length() + self.body.inflation259267
}260268
261269
pub fn shown_length(&self) -> f64 {@@ -316,6 +316,7 @@ async fn a_long_run_fills_the_jeans_before_a_thick_one() {
316316
async fn a_refused_jelq_leaves_the_lube_alone() {317317
let app = seeded_with(Floor::Bedroom, |run| {318318
run.items.kit.extender = true;319
+ run.items.lubes.baby_oil = 1;319320
run.body.girth = 6.0;320321
run.body.length = 6.0;321322
});@@ -155,6 +155,7 @@ async fn mom_speaks_american() {
155155
async fn an_empty_bottle_is_declined_before_the_enemy_stirs() {156156
let control = seeded_with(Floor::ChangingRoom, |run| {157157
run.standing.suspicion = SUSPICION_LIMIT;158
+ run.items.lubes.baby_oil = 1;158159
});159160
let lube = [("content-type", "application/baby-oil")];160161
let caught = send(@@ -337,12 +338,12 @@ async fn raids_get_noisier_and_the_household_notices() {
337338
338339
#[tokio::test]339340
async fn one_telling_closes_the_kitchen_and_its_link() {340
- let app = seeded_with(Floor::Bedroom, |run| run.standing.suspicion = 4);341341
let mut told = None;342
- for _ in 0..20 {342
+ for seed in 0..20 {343
+ let app = app_with(Floor::Bedroom, seed, |run| run.standing.suspicion = 4);343344
let raid = send(&app, "POST", "/runs/cafebabe/kitchen", &[], "").await;344345
if raid.status() == StatusCode::GONE {345
- told = Some(raid);346
+ told = Some((app, raid));346347
break;347348
}348349
assert!(@@ -350,7 +351,7 @@ async fn one_telling_closes_the_kitchen_and_its_link() {
350351
"there is no warning before the telling"351352
);352353
}353
- let told = told.expect("a noisy house tells within twenty raids");354
+ let (app, told) = told.expect("a noisy house tells within twenty houses");354355
assert!(355356
warnings(&told)356357
.iter()