atagen

jelq

public

an http based roguelike rpg about jelqing

Star0
Watch0
e028a4184d000c9c7b61f60e056db01c53aeea23
1
ssh://brewery@pls.lobotomise.me:33/atagen/jelq.git
src/game/items.rsRust158 lines5.2 KB
1
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2
pub enum Item {
3
    WarmTowel,
4
    IcePack,
5
    Ruler,
6
    DoorLock,
7
    DndSign,
8
    Blinds,
9
    Pump,
10
    PumpPro,
11
    Extender,
12
    Ring,
13
    Supplement,
14
    Cage,
15
    CageKey,
16
    Spreadsheet,
17
    TeapotSpout,
18
    BabyOil,
19
    CoconutOil,
20
    Lotion,
21
    Vaseline,
22
    EnergyDrink,
23
}
24
25
pub const SHOP: [Item; 15] = [
26
    Item::Pump,
27
    Item::PumpPro,
28
    Item::Extender,
29
    Item::Ring,
30
    Item::Supplement,
31
    Item::DoorLock,
32
    Item::DndSign,
33
    Item::Blinds,
34
    Item::Ruler,
35
    Item::IcePack,
36
    Item::CageKey,
37
    Item::BabyOil,
38
    Item::CoconutOil,
39
    Item::Lotion,
40
    Item::Vaseline,
41
];
42
43
impl Item {
44
    pub(super) const ALL: [Self; 20] = [
45
        Self::WarmTowel,
46
        Self::IcePack,
47
        Self::Ruler,
48
        Self::DoorLock,
49
        Self::DndSign,
50
        Self::Blinds,
51
        Self::Pump,
52
        Self::PumpPro,
53
        Self::Extender,
54
        Self::Ring,
55
        Self::Supplement,
56
        Self::Cage,
57
        Self::CageKey,
58
        Self::Spreadsheet,
59
        Self::TeapotSpout,
60
        Self::BabyOil,
61
        Self::CoconutOil,
62
        Self::Lotion,
63
        Self::Vaseline,
64
        Self::EnergyDrink,
65
    ];
66
67
    pub fn slug(self) -> &'static str {
68
        match self {
69
            Self::WarmTowel => "warm-towel",
70
            Self::IcePack => "ice-pack",
71
            Self::Ruler => "ruler",
72
            Self::DoorLock => "door-lock",
73
            Self::DndSign => "do-not-disturb-sign",
74
            Self::Blinds => "window-blinds",
75
            Self::Pump => "pump",
76
            Self::PumpPro => "pump-pro",
77
            Self::Extender => "extender",
78
            Self::Ring => "cock-ring",
79
            Self::Supplement => "supplement",
80
            Self::Cage => "chastity-cage",
81
            Self::CageKey => "cage-key",
82
            Self::Spreadsheet => "spreadsheet",
83
            Self::TeapotSpout => "teapot-spout",
84
            Self::BabyOil => "baby-oil",
85
            Self::CoconutOil => "coconut-oil",
86
            Self::Lotion => "lotion",
87
            Self::Vaseline => "vaseline",
88
            Self::EnergyDrink => "energy-drink",
89
        }
90
    }
91
92
    pub fn parse(slug: &str) -> Option<Self> {
93
        Self::ALL.into_iter().find(|item| item.slug() == slug)
94
    }
95
96
    pub fn description(self) -> &'static str {
97
        match self {
98
            Self::WarmTowel => {
99
                "Reusable. Satisfies the warm-up precondition. Use technique=warmup."
100
            }
101
            Self::IcePack => "Cools things sharply. Use technique=ice.",
102
            Self::Ruler => "Measures honestly. The length resource now carries a Content-Length.",
103
            Self::DoorLock => "Keeps your brother out once.",
104
            Self::DndSign => "Works on housekeeping. Mum does not read signs.",
105
            Self::Blinds => "The neighbour has a good camera. The blinds are better.",
106
            Self::Pump => "A pump.",
107
            Self::PumpPro => "Use technique=pump. Gains are temporary.",
108
            Self::Extender => "Passive gains each turn. Takes up room. Can be removed with DELETE.",
109
            Self::Ring => {
110
                "Girth gains doubled. Rupture risk raised. Responses are compressed if you accept gzip. Can be removed with DELETE."
111
            }
112
            Self::Supplement => "Use technique=supplement.",
113
            Self::Cage => "Locked.",
114
            Self::CageKey => "Pump-Bro does not ask.",
115
            Self::Spreadsheet => "Charts your progress. Every line is flat.",
116
            Self::TeapotSpout => "Does nothing. Cannot be dropped.",
117
            Self::BabyOil => "Smooth. +1. One unit per jelq.",
118
            Self::CoconutOil => "+3. Solid until it matters. Suspicious at Nan's.",
119
            Self::Lotion => {
120
                "Handy. +0, and it soaks in fast, so each jelq costs an extra stamina. Soothes a friction burn."
121
            }
122
            Self::Vaseline => "+2. Raises suspicion everywhere.",
123
            Self::EnergyDrink => "technique=energy. +3 stamina. Tastes like a battery.",
124
        }
125
    }
126
127
    pub fn pitch(self) -> &'static str {
128
        match self {
129
            Self::PumpPro => "A pump, but professional.",
130
            Self::Extender => "Passive gains every turn. Takes up room.",
131
            Self::Ring => "Doubles girth gains. Pump-Bro does not discuss the risks.",
132
            Self::Supplement => "Clinically formulated. Ships from overseas.",
133
            Self::DndSign => "Housekeeping respects it.",
134
            Self::Blinds => "The neighbour has a good camera.",
135
            Self::Ruler => "Pump-Bro does not recommend it.",
136
            Self::IcePack => "Cold.",
137
            _ => self.description(),
138
        }
139
    }
140
141
    pub fn price(self) -> Option<u32> {
142
        match self {
143
            Self::Pump => Some(10),
144
            Self::PumpPro | Self::Extender | Self::CageKey => Some(15),
145
            Self::Ring => Some(8),
146
            Self::Supplement | Self::DoorLock | Self::DndSign | Self::Blinds | Self::Ruler => {
147
                Some(5)
148
            }
149
            Self::BabyOil | Self::CoconutOil | Self::Lotion | Self::Vaseline => Some(4),
150
            Self::IcePack => Some(3),
151
            Self::WarmTowel
152
            | Self::Cage
153
            | Self::Spreadsheet
154
            | Self::TeapotSpout
155
            | Self::EnergyDrink => None,
156
        }
157
    }
158
}