v6.01 "Echo Hunter"<br>
Public Version<<if $charview gt 0>>
/* TODO a stat display for this? */
<<if $events.length gt 0>>
<p><<print $events.length>> events left</p>
<</if>>
/*<code>back: <<print $back>></code>*/
<div id="sidebar-stats">
<<include "sidebar stats">>
</div>
<br>
<<if Story.get(passage()).tags.includes("dressing")>>
<p class="framed-icons" style="font-size: smaller">You can change clothes here. ?changing_room</p>
<</if>>
<div class="grid3col" style="margin: auto; font-weight: 900">
<<if not Story.get(passage()).tags.includes("no-deck")>>
<<button "Deck">><<script>>
Dialog.setup("Action Deck", "inv-dialog autoanim");
Dialog.wiki(Story.get("player deck page").processText());
Dialog.open();
<</script>><</button>>
<<else>>
<button disabled>Deck</button>
<</if>>
<<button "Equipment">><<script>>
Dialog.setup("Equipment", "inv-dialog autoanim");
Dialog.wiki(Story.get("player equipment page").processText());
Dialog.open();
<</script>><</button>>
<<button "Inventory">><<script>>
Dialog.setup("Inventory", "inv-dialog autoanim");
Dialog.wiki(Story.get("inventory dialog").processText());
Dialog.open();
<</script>><</button>>
<div style="grid-column: 1/-1">
<<button "What are these icons?">><<script>>
Dialog.setup("Information", "help-dialog");
Dialog.wiki(Story.get("information dialog").processText());
Dialog.open();
<</script>><</button>>
</div>
</div>
/* end of charview check */
<</if>><<set _statbar_stats to ["balance", "corruption", "identity", "fem", "stress", "arousal"]>>
<div class="flexdown">
<div class="flexhoriz" style="font-size: 2em; line-height: 0;">
<span style="font-size: 1.1rem; margin: auto;">Debt: ?money $debt.payment</span>
<<statnum "money">>
</div>
<<for _stat range _statbar_stats>>
<<statbar _stat>>
<</for>>
</div>
<br>
<div class="flexdown">
<p>Core SIFA Stats:</p>
<<sifa_stats $player_stats.core_stats>>
<<if def $current_loop?.bonuses>>
<p>Equipment Bonuses:</p>
<div style="font-size: 0.55em; margin: auto;">
<<loop_bonuses $current_loop>>
</div>
<</if>>
<p>With Bonuses:</p>
<<sifa_stats>>
</div>SIFA Games[[Game Patreon|https://www.patreon.com/sifagames]]
[[Feedback Discord|https://discord.gg/sZqtvENVXp]]<<if $charview gt 0>>
<div id="avatar"><<include avatar_sidebar>></div>
<<else>>
Continue further to see your character.
<</if>><<set $charview to random(1,3)>>
<span class="cards1">
<a href="https://www.patreon.com/sifagames" target="_blank"> <img @src='"img2/other/banner_right_"+$charview+".jpg"' style="position:relative; left:0; top:0; width: 100%; height: `100%"></a>
</span><<include "body cards init">>
<<include "style cards init">>
<<include "clothing cards init">>
<<include "char init">>
<<include "view boxes init">>
<<include "action cards init">>
<<include "enemy init">>
<<include "functions init">>
<<include "other init">><<set setup.matches_current_loop to function(item) {
return (item.id gt 0) and
(item.rarity lt $current_loop.difficulty) and
item.styles.some(st => $current_loop.event_styles.has(st)) and
item.colors.some(cl => $current_loop.event_colors.has(cl));
}>>
<<set setup.items_matching_current_loop to function(category, ...places) {
let droplist = [];
const items = setup["all_" + category];
for(const place of places) {
droplist.push(...items?.[place]?.filter(setup.matches_current_loop));
}
return droplist;
}>>
<<set setup.matches_difficulty to function(item) {
return (item.id gt 0) and
(item.rarity lt $current_loop.difficulty);
}>>
<<set setup.items_matching_difficulty to function(category, ...places) {
let droplist = [];
const items = setup["all_" + category];
for(const place of places) {
droplist.push(...items?.[place]?.filter(setup.matches_difficulty));
}
return droplist;
}>><<set $back to []>>
<<set $complete_difficulty to 0>>
<<set $loop_choices to []>>
<<set $events to []>>
<<set $charview to 0>>
<<set $debug_passages to new Set()>>
<<set setup.event_passages to {}>>
<<for _tag range ["event", "instant-event", "complex-event"]>>
<<set setup.event_passages[_tag] to Story.lookup("tags", _tag).map(p => p.title)>>
<</for>>
/*<<set setup.event_passages.all to Array.from(new Set(Object.values(setup.event_passages).flat()))>>*/
<<set setup.ok_choices to [{
text: "OK",
target: "back",
color: "green",
}]>>
<<set setup.payments to [100,200,300,400,500,500,500,500]>>
<<set setup.interest_rates to [0.5, 0.3, 0.2, 0.1, 0.05]>>
<<set $debt to {
payment: setup.payments[0],
index: 0,
/* interest_idx: 0, */
}>><<set setup.all_body to {
body: [
new EquipItem({name:"Male Body", gender:"male", styles: ["man"], rarity:"common", fem:-2, hips:1, waist:1, shoulders:1, boobs:0, nipples:1, sub: 0, int: 0, fit: 1, att: 0}),
new EquipItem({name:"Male Body", gender:"male", styles: ["man"], rarity:"common", fem:-1, hips:1, waist:1, shoulders:1, boobs:0, nipples:2, sub: 0, int: 0, fit: 1, att: 0}),
new EquipItem({name:"Male Body", gender:"male", styles: ["man"], rarity:"rare", fem:-1, hips:1, waist:2, shoulders:1, boobs:0, nipples:2, sub: 0, int: 0, fit: 2, att: 0}),
new EquipItem({name:"Male Body", gender:"male", styles: ["man"], rarity:"rare", fem:-1, hips:2, waist:2, shoulders:1, boobs:0, nipples:2, sub: 0, int: 0, fit: 3, att: 0}),
new EquipItem({name:"Male Body", gender:"male", styles: ["man"], rarity:"rare", fem:0, hips:2, waist:2, shoulders:2, boobs:0, nipples:2, sub: 0, int: 0, fit: 2, att: 1}),
new EquipItem({name:"Androgen Body", gender:"unisex", styles: ["trap"], rarity:"rare", fem:1, hips:2, waist:2, shoulders:2, boobs:2, nipples:2, sub: 0, int: 0, fit: 1, att: 2}),
new EquipItem({name:"Androgen Body", gender:"unisex", styles: ["trap"], rarity:"epic", fem:1, hips:2, waist:3, shoulders:2, boobs:2, nipples:2, sub: 0, int: 0, fit: 2, att: 2}),
new EquipItem({name:"Androgen Body", gender:"unisex", styles: ["trap"], rarity:"epic", fem:1, hips:2, waist:3, shoulders:2, boobs:2, nipples:3, sub: 0, int: 0, fit: 1, att: 3}),
new EquipItem({name:"Androgen Body", gender:"unisex", styles: ["trap"], rarity:"epic", fem:2, hips:2, waist:3, shoulders:3, boobs:2, nipples:3, sub: 0, int: 0, fit: 2, att: 3}),
new EquipItem({name:"Female Body", gender:"female", styles: ["girl"], rarity:"epic", fem:2, hips:2, waist:3, shoulders:3, boobs:4, nipples:3, sub: 0, int: 0, fit: 0, att: 4}),
new EquipItem({name:"Female Body", gender:"female", styles: ["girl"], rarity:"epic", fem:2, hips:3, waist:3, shoulders:3, boobs:4, nipples:3, sub: 0, int: 0, fit: 1, att: 4}),
new EquipItem({name:"Female Body", gender:"female", styles: ["girl"], rarity:"legendary", fem:2, hips:3, waist:3, shoulders:3, boobs:4, nipples:4, sub: 0, int: 0, fit: 1, att: 5}),
],
/* would be nice to fix the order, but its also about fixing all the bottom clothes */
penis: [
new EquipItem({name:"Pussy", gender:"female", styles: ["girl"], rarity:"epic", fem:2, sub: 4}),
new EquipItem({name:"Tiny Clitty", gender:"female", styles: ["girl"], rarity:"legendary", fem:2, sub: 4, fit: 1}),
new EquipItem({name:"Little Winkle", gender:"male", styles: ["trap"], rarity:"epic", fem:1, sub: 3, int: 0, fit: 1, att: 0}),
new EquipItem({name:"Small Prick", gender:"male", styles: ["trap"], rarity:"rare", fem:0, sub: 2, int: 0, fit: 1, att: 0}),
new EquipItem({name:"Normal Stick", gender:"male", styles: ["man"], rarity:"common", fem:-1, sub: 0, int: 0, fit: 2, att: 0}),
new EquipItem({name:"Big Tool", gender:"male", styles: ["man"], rarity:"epic", fem:-2, sub: 0, int: 0, fit: 4, att: 0}),
],
face: [
new EquipItem({name:"Masculine Face", gender:"male", styles: ["man"], head:1, rarity:"common", fem:-1, sub: 0, int: 0, fit: 0, att: 0}),
new EquipItem({name:"Boy Face", gender:"male", styles: ["man"], head:2, rarity:"rare", fem:-0, sub: 0, int: 0, fit: 0, att: 1}),
new EquipItem({name:"Femboy Face", gender:"male", styles: ["trap"], head:2, rarity:"epic", fem:1, sub: 0, int: 0, fit: 0, att: 2}),
new EquipItem({name:"Girly Face", gender:"female", styles: ["girl"], head:2, rarity:"legendary", fem:2, sub: 0, int: 0, fit: 0, att: 3}),
],
hair: [
new EquipItem({name:"Short Hair", gender:"male", styles: ["man"], ears:"both", rarity:"common", fem:-1, sub: 0, int: 0, fit: 1, att: 0}),
new EquipItem({name:"Medium Hair", gender:"unisex", styles: ["trap"], ears:"right", rarity:"rare", fem:0, sub: 0, int: 1, fit: 0, att: 1}),
new EquipItem({name:"Long Hair", gender:"female", styles: ["girl"], ears:"left", rarity:"epic", fem:1, sub: 1, int: 1, fit: 0, att: 1}),
],
nails: [
new EquipItem({name:"Short Nails", gender:"male", styles: ["man"], rarity:"common", fem:-1, sub: 0, int: 0, fit: 1, att: 0}),
new EquipItem({name:"Long Nails", gender:"female", styles: ["girl"], rarity:"rare", fem:1, sub: 1, int: 0, fit: 0, att: 1}),
],
}>>
<<for _place, _list range setup.all_body>>
<<for _id, _bd range _list>>
<<set _bd.id to _id>>
<<set _bd.place to _place>>
<</for>>
<</for>>/* more feminine styles get higher rarity.
In the lore it's explained like "males don't even use most of style options, styles are more for women.
So the most feminine stuff is quite hard to find" */
<<set setup.all_styles to {
hairstyle: [
new EquipItem({name:"Natural", gender:"male", colors: ["black"], styles: ["man"], rarity:"rare", int:2}),
new EquipItem({name:"Natural", gender:"unisex", colors: ["brown"], styles: ["trap"], rarity:"rare", fit:2}),
new EquipItem({name:"Natural", gender:"female", colors: ["blonde"], styles: ["girl"], rarity:"rare", sub:2}),
new EquipItem({name:"Natural", gender:"female", colors: ["pink"], styles: ["girl"], rarity:"rare", att:2}),
],
makeup: [
new EquipItem({name:"No Makeup", gender:"male", colors: ["nocolor"], styles: ["man"], rarity:"common"}),
new EquipItem({name:"Natural Makeup", gender:"unisex", colors: ["black", "pink"], styles: ["trap"], rarity:"common", att:1}),
new EquipItem({name:"Light Makeup", gender:"female", colors: ["black", "pink"], styles: ["girl"], rarity:"rare", att:2}),
new EquipItem({name:"Heavy Makeup", gender:"female", colors: ["black", "pink"], styles: ["girl"], rarity:"epic", att:3}),
],
lipstick: [
new EquipItem({name:"No Lipstick", gender:"male", colors: ["nocolor"], styles: ["man"], rarity:"common"}),
new EquipItem({name:"Soft Lipstick", gender:"unisex", colors: ["black"], styles: ["trap"], rarity:"common", int:1}),
new EquipItem({name:"Soft Lipstick", gender:"unisex", colors: ["red"], styles: ["trap"], rarity:"common", att:1}),
new EquipItem({name:"Soft Lipstick", gender:"unisex", colors: ["pink"], styles: ["trap"], rarity:"common", sub:1}),
new EquipItem({name:"Subtle Lipstick", gender:"female", colors: ["black"], styles: ["girl"], rarity:"rare", int:2}),
new EquipItem({name:"Subtle Lipstick", gender:"female", colors: ["red"], styles: ["girl"], rarity:"rare", att:2}),
new EquipItem({name:"Subtle Lipstick", gender:"female", colors: ["pink"], styles: ["girl"], rarity:"rare", sub:2}),
new EquipItem({name:"Bold Lipstick", gender:"female", colors: ["black"], styles: ["girl"], rarity:"epic", int:3}),
new EquipItem({name:"Bold Lipstick", gender:"female", colors: ["red"], styles: ["girl"], rarity:"epic", att:3}),
new EquipItem({name:"Bold Lipstick", gender:"female", colors: ["pink"], styles: ["girl"], rarity:"epic", sub:3}),
],
nail_polish: [
new EquipItem({name:"No Polish Nails", gender:"male", colors: ["nocolor"], styles: ["man"], rarity:"common"}),
new EquipItem({name:"Nail Polish", gender:"unisex", colors: ["transparent"], styles: ["trap"], rarity:"common", fit:1}),
new EquipItem({name:"Nail Polish", gender:"unisex", colors: ["black"], styles: ["trap"], rarity:"common", int:1}),
new EquipItem({name:"Nail Polish", gender:"female", colors: ["blue"], styles: ["girl"], rarity:"common", att:1}),
new EquipItem({name:"Nail Polish", gender:"female", colors: ["white"], styles: ["girl"], rarity:"common", sub:1}),
new EquipItem({name:"Nail Polish", gender:"female", colors: ["red"], styles: ["girl"], rarity:"rare", sub:2}),
new EquipItem({name:"Nail Polish", gender:"female", colors: ["pink"], styles: ["girl"], rarity:"rare", att:2}),
],
toenail_polish: [
new EquipItem({name:"No Polish Toenails", gender:"male", colors: ["nocolor"], styles: ["man"], rarity:"common"}),
new EquipItem({name:"Toenail Polish", gender:"unisex", colors: ["transparent"], styles: ["trap"], rarity:"common", fit:1}),
new EquipItem({name:"Toenail Polish", gender:"unisex", colors: ["black"], styles: ["trap"], rarity:"common", int:1}),
new EquipItem({name:"Toenail Polish", gender:"female", colors: ["blue"], styles: ["girl"], rarity:"common", att:1}),
new EquipItem({name:"Toenail Polish", gender:"female", colors: ["white"], styles: ["girl"], rarity:"common", sub:1}),
new EquipItem({name:"Toenail Polish", gender:"female", colors: ["red"], styles: ["girl"], rarity:"rare", sub:2}),
new EquipItem({name:"Toenail Polish", gender:"female", colors: ["pink"], styles: ["girl"], rarity:"rare", att:2}),
],
}>>
<<for _place, _list range setup.all_styles>>
<<for _id, _st range _list>>
<<set _st.id to _id>>
<<set _st.place to _place>>
<</for>>
<</for>>
<<stylesfemgen setup.all_styles.hairstyle "mid">>
<<stylesfemgen setup.all_styles.makeup "mid">>
<<stylesfemgen setup.all_styles.lipstick "small">>
<<stylesfemgen setup.all_styles.nail_polish "small">>
<<stylesfemgen setup.all_styles.toenail_polish "small">><<widget "stylesfemgen">>
<<set _scale to _args[1]>>
<<for _item range _args[0]>>
<<set _fem to _item.base_fem ?? 0>>
<<set _genpts to {
small: {
male: {fem: 0},
unisex: {fem: 0},
female: {fem: 1},
},
mid: {
male: {fem: -1},
unisex: {fem: 0},
female: {fem: 1},
},
big: {
male: {fem: -3},
unisex: {fem: 2},
female: {fem: 7},
},
}>>
<<set _fem += _genpts[_scale]?.[_item.gender]?.fem ?? 0>>
<<set _rarpts to {
common: {fem: 0},
rare: {fem: 0},
epic: {fem: 0},
legendary: {fem: 1},
}>>
<<set _rar to _item.rarity>>
<<set _fem += _rarpts[_rar]?.fem ?? 0>>
<<set _colorpts to {
black: {fem: 0},
blue: {fem: 1},
brown: {fem: 0},
cyan: {fem: 1},
white: {fem: 1},
blonde: {fem: 1},
red: {fem: 1},
pink: {fem: 1},
nocolor: {fem:0},
transparent:{fem:0}
}>>
<<for _col range _item.colors>>
<<set _fem += _colorpts?.[_col]?.fem ?? 0>>
<</for>>
<<set _item.base_fem to Math.clamp(_fem, -2, 2)>>
<</for>>
<</widget>><<set setup.all_clothes to {
undies: [
new EquipItem({name:"No Undies", gender: "unisex", colors: ["nocolor"], styles: ["lewd", "lewd"]}),
new EquipItem({name:"Boxers", gender: "male", colors: ["black", "white"], styles: ["formal", "modest"]}),
new EquipItem({name:"Boxers", gender: "male", colors: ["blue", "white"], styles: ["formal", "modest"]}),
new EquipItem({name:"Boxers", gender: "male", colors: ["white", "pink"], styles: ["formal", "modest"]}),
new EquipItem({name:"Boxers", gender: "male", colors: ["red", "white"], styles: ["formal", "modest"]}),
new EquipItem({name:"Boxers", gender: "male", colors: ["pink", "cyan"], styles: ["formal", "modest"]}),
new EquipItem({name:"Briefs", gender: "unisex", colors: ["black"], styles: ["active"]}),
new EquipItem({name:"Briefs", gender: "unisex", colors: ["blue"], styles: ["active"]}),
new EquipItem({name:"Briefs", gender: "unisex", colors: ["white"], styles: ["active"]}),
new EquipItem({name:"Briefs", gender: "unisex", colors: ["red"], styles: ["active"]}),
new EquipItem({name:"Briefs", gender: "unisex", colors: ["pink"], styles: ["active"]}),
new EquipItem({name:"Heart Thongs", gender: "female", colors: ["green", "white"], styles: ["comfy", "party", "cute"]}),
new EquipItem({name:"Heart Thongs", gender: "female", colors: ["red", "white"], styles: ["comfy", "party", "cute"]}),
new EquipItem({name:"Heart Boxers", gender: "male", colors: ["green", "white"], styles: ["comfy", "party", "cute"]}),
new EquipItem({name:"Heart Boxers", gender: "male", colors: ["red", "white"], styles: ["comfy", "party", "cute"]}),
new EquipItem({name:"Thongs", gender: "female", colors: ["black"], styles: ["formal", "comfy"]}),
new EquipItem({name:"Striped Panties", gender: "unisex", colors: ["black", "pink"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Striped Panties", gender: "unisex", colors: ["white", "cyan"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Striped Panties", gender: "unisex", colors: ["multicolor"], styles: ["study", "party"]}),
new EquipItem({name:"Striped Panties", gender: "unisex", colors: ["cyan", "pink", "white"], styles: ["study", "party"]}),
new EquipItem({name:"Heart Panties", gender: "female", colors: ["black", "red"], styles: ["casual", "cute"]}),
new EquipItem({name:"Heart Panties", gender: "female", colors: ["blue", "red"], styles: ["casual", "cute"]}),
new EquipItem({name:"Heart Panties", gender: "female", colors: ["cyan", "white"], styles: ["casual", "cute"]}),
new EquipItem({name:"Heart Panties", gender: "female", colors: ["green", "red"], styles: ["casual", "cute"]}),
new EquipItem({name:"Heart Panties", gender: "female", colors: ["pink", "red"], styles: ["casual", "cute"]}),
new EquipItem({name:"Heart Panties", gender: "female", colors: ["red", "black"], styles: ["casual", "cute"]}),
new EquipItem({name:"Heart Panties", gender: "female", colors: ["white", "red"], styles: ["casual", "cute"]}),
new EquipItem({name:"Lace Panties", gender: "female", colors: ["black"], styles: ["casual", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Panties", gender: "female", colors: ["white"], styles: ["casual", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Panties", gender: "female", colors: ["blue"], styles: ["casual", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Panties", gender: "female", colors: ["green"], styles: ["casual", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Panties", gender: "female", colors: ["pink"], styles: ["casual", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Panties", gender: "female", colors: ["red"], styles: ["casual", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Retro Panties", gender: "female", colors: ["black"], styles: ["formal", "comfy", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Retro Panties", gender: "female", colors: ["white"], styles: ["formal", "comfy", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Retro Panties", gender: "female", colors: ["blue"], styles: ["formal", "comfy", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Retro Panties", gender: "female", colors: ["green"], styles: ["formal", "comfy", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Retro Panties", gender: "female", colors: ["pink"], styles: ["formal", "comfy", "sexy"], extra: ["lace"]}),
new EquipItem({name:"Lace Retro Panties", gender: "female", colors: ["red"], styles: ["formal", "comfy", "sexy"], extra: ["lace"]}),
],
bra: [
new EquipItem({name:"No Bra", gender:"unisex", colors: ["nocolor"], styles: []}),
new EquipItem({name:"Beginners Bra", gender:"unisex", colors: ["black"], styles: ["study", "comfy"]}),
new EquipItem({name:"Beginners Bra", gender:"unisex", colors: ["red"], styles: ["study", "comfy"]}),
new EquipItem({name:"Beginners Bra", gender:"unisex", colors: ["white"], styles: ["study", "comfy"]}),
new EquipItem({name:"Beginners Bra", gender:"unisex", colors: ["pink"], styles: ["study", "comfy"]}),
new EquipItem({name:"Beginners Bra", gender:"unisex", colors: ["blue"], styles: ["study", "comfy"]}),
new EquipItem({name:"Crop Cami", gender:"female", colors: ["black"], styles: ["modest"]}),
new EquipItem({name:"Crop Cami", gender:"female", colors: ["blue"], styles: ["modest"]}),
new EquipItem({name:"Crop Cami", gender:"female", colors: ["white"], styles: ["modest"]}),
new EquipItem({name:"Crop Cami", gender:"female", colors: ["red"], styles: ["modest"]}),
new EquipItem({name:"Crop Cami", gender:"female", colors: ["pink"], styles: ["modest"]}),
new EquipItem({name:"Sports Bra", gender:"unisex", colors: ["black"], styles: ["active", "comfy"], extra: ["tight"]}),
new EquipItem({name:"Sports Bra", gender:"unisex", colors: ["blue"], styles: ["active", "comfy"], extra: ["tight"]}),
new EquipItem({name:"Sports Bra", gender:"unisex", colors: ["green"], styles: ["active", "comfy"], extra: ["tight"]}),
new EquipItem({name:"Sports Bra", gender:"unisex", colors: ["pink", "white"], styles: ["active", "comfy"], extra: ["tight"]}),
new EquipItem({name:"Sports Bra", gender:"unisex", colors: ["red"], styles: ["active", "comfy"], extra: ["tight"]}),
new EquipItem({name:"Sports Bra", gender:"unisex", colors: ["white", "black"], styles: ["active", "comfy"], extra: ["tight"]}),
new EquipItem({name:"Push-Up Bra", gender:"female", colors: ["black"], styles: ["casual", "cute"]}),
new EquipItem({name:"Push-Up Bra", gender:"female", colors: ["blue"], styles: ["casual", "cute"]}),
new EquipItem({name:"Push-Up Bra", gender:"female", colors: ["white"], styles: ["casual", "cute"]}),
new EquipItem({name:"Push-Up Bra", gender:"female", colors: ["red"], styles: ["casual", "cute"]}),
new EquipItem({name:"Push-Up Bra", gender:"female", colors: ["pink"], styles: ["casual", "cute"]}),
new EquipItem({name:"Heart Bra", gender:"female", colors: ["green", "white"], styles: ["party", "cute", "sexy"]}),
new EquipItem({name:"Heart Bra", gender:"female", colors: ["red", "white"], styles: ["party", "cute", "sexy"]}),
new EquipItem({name:"Lace Bra", gender:"female", colors: ["black", ], styles: ["formal", "sexy"], extra: ["lace", "transparent"]}),
new EquipItem({name:"Lace Bra", gender:"female", colors: ["blue"], styles: ["formal", "sexy"], extra: ["lace", "transparent"]}),
new EquipItem({name:"Lace Bra", gender:"female", colors: ["green"], styles: ["formal", "sexy"], extra: ["lace", "transparent"]}),
new EquipItem({name:"Lace Bra", gender:"female", colors: ["pink"], styles: ["formal", "sexy"], extra: ["lace", "transparent"]}),
new EquipItem({name:"Lace Bra", gender:"female", colors: ["red"], styles: ["formal", "sexy"], extra: ["lace", "transparent"]}),
new EquipItem({name:"Lace Bra", gender:"female", colors: ["white"], styles: ["formal", "sexy"], extra: ["lace", "transparent"]}),
new EquipItem({name:"Strapless Bra", gender:"female", colors: ["black"], styles: ["casual", "party", "sexy"]}),
],
bottom: [
new EquipItem({name:"No Bottom", gender:"unisex", colors: ["nocolor"], styles: ["lewd"]}),
new EquipItem({name:"Pants", gender:"male", colors: ["black"], styles: ["formal", "modest"]}),
new EquipItem({name:"Pants", gender:"male", colors: ["white"], styles: ["formal", "modest"]}),
new EquipItem({name:"Pants", gender:"male", colors: ["pink"], styles: ["formal", "modest"]}),
new EquipItem({name:"High Waisted Pants", gender:"female", colors: ["black"], styles: ["formal", "casual"]}),
new EquipItem({name:"High Waisted Pants", gender:"female", colors: ["white"], styles: ["formal", "casual"]}),
new EquipItem({name:"High Waisted Pants", gender:"female", colors: ["pink"], styles: ["formal", "casual"]}),
new EquipItem({name:"Tube Skirt", gender:"female", colors: ["black"], styles: ["formal"]}),
new EquipItem({name:"Tube Skirt", gender:"female", colors: ["white"], styles: ["formal"]}),
new EquipItem({name:"Tube Skirt", gender:"female", colors: ["pink"], styles: ["formal"]}),
new EquipItem({name:"Mini Tube Skirt", gender:"female", colors: ["black"], styles: ["formal", "sexy"]}),
new EquipItem({name:"Mini Tube Skirt", gender:"female", colors: ["white"], styles: ["formal", "sexy"]}),
new EquipItem({name:"Mini Tube Skirt", gender:"female", colors: ["pink"], styles: ["formal", "sexy"]}),
new EquipItem({name:"Gym Shorts", gender:"female", colors: ["black", "white"], styles: ["active", "comfy", "sexy"]}),
new EquipItem({name:"Gym Shorts", gender:"female", colors: ["blue", "white"], styles: ["active", "comfy", "sexy"]}),
new EquipItem({name:"Gym Shorts", gender:"female", colors: ["green", "white"], styles: ["active", "comfy", "sexy"]}),
new EquipItem({name:"Gym Shorts", gender:"female", colors: ["pink", "white"], styles: ["active", "comfy", "sexy"]}),
new EquipItem({name:"Gym Shorts", gender:"female", colors: ["red", "black"], styles: ["active", "comfy", "sexy"]}),
new EquipItem({name:"Gym Shorts", gender:"female", colors: ["white", "black"], styles: ["active", "comfy", "sexy"]}),
new EquipItem({name:"Denim Shorts", gender:"unisex", colors: ["black"], styles: ["casual", "party"]}),
new EquipItem({name:"Denim Shorts", gender:"unisex", colors: ["blue"], styles: ["casual", "party"]}),
new EquipItem({name:"Denim Shorts", gender:"unisex", colors: ["green"], styles: ["casual", "party"]}),
new EquipItem({name:"Denim Shorts", gender:"unisex", colors: ["white"], styles: ["casual", "party"]}),
new EquipItem({name:"Denim Shorts", gender:"unisex", colors: ["red"], styles: ["casual", "party"]}),
new EquipItem({name:"Denim Shorts", gender:"unisex", colors: ["pink"], styles: ["casual", "party"]}),
new EquipItem({name:"Seifuku Pants", gender:"male", colors: ["black"], styles: ["study"]}),
new EquipItem({name:"Seifuku Pants", gender:"male", colors: ["blue"], styles: ["study"]}),
new EquipItem({name:"Seifuku Pants", gender:"male", colors: ["cyan"], styles: ["study"]}),
new EquipItem({name:"Seifuku Pants", gender:"male", colors: ["green"], styles: ["study"]}),
new EquipItem({name:"Seifuku Pants", gender:"male", colors: ["pink"], styles: ["study"]}),
new EquipItem({name:"Seifuku Pants", gender:"male", colors: ["white"], styles: ["study"]}),
new EquipItem({name:"Seifuku Long Skirt", gender:"female", colors: ["black"], styles: ["study"]}),
new EquipItem({name:"Seifuku Long Skirt", gender:"female", colors: ["blue"], styles: ["study"]}),
new EquipItem({name:"Seifuku Long Skirt", gender:"female", colors: ["cyan"], styles: ["study"]}),
new EquipItem({name:"Seifuku Long Skirt", gender:"female", colors: ["green"], styles: ["study"]}),
new EquipItem({name:"Seifuku Long Skirt", gender:"female", colors: ["pink"], styles: ["study"]}),
new EquipItem({name:"Seifuku Long Skirt", gender:"female", colors: ["white"], styles: ["study"]}),
new EquipItem({name:"Seifuku Mini Skirt", gender:"female", colors: ["black", "red"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Seifuku Mini Skirt", gender:"female", colors: ["blue", "brown"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Seifuku Mini Skirt", gender:"female", colors: ["blue", "white"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Seifuku Mini Skirt", gender:"female", colors: ["cyan"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Seifuku Mini Skirt", gender:"female", colors: ["green", "white"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Seifuku Mini Skirt", gender:"female", colors: ["pink", "white"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Seifuku Mini Skirt", gender:"female", colors: ["red", "white"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Seifuku Mini Skirt", gender:"female", colors: ["white", "black"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Formal Pants", gender:"female", colors: ["black"], styles: ["formal", "study", "party"]}),
new EquipItem({name:"Winter Pants", gender:"male", colors: ["green", "white"], styles: ["comfy", "party"], extra: ["thick"]}),
new EquipItem({name:"Winter Pants", gender:"male", colors: ["red", "white"], styles: ["comfy", "party"], extra: ["thick"]}),
new EquipItem({name:"Winter Short Skirt", gender:"female", colors: ["green", "white", "black"], styles: ["comfy", "party", "cute"], extra: ["thick"]}),
new EquipItem({name:"Winter Short Skirt", gender:"female", colors: ["red", "white", "black"], styles: ["comfy", "party", "cute"], extra: ["thick"]}),
],
top: [
new EquipItem({name:"No Top", gender:"unisex", colors: ["nocolor"], styles: ["lewd"]}),
new EquipItem({name:"T-Shirt", gender:"male", colors: ["black"], styles: ["active", "casual"]}),
new EquipItem({name:"T-Shirt", gender:"male", colors: ["white"], styles: ["active", "casual"]}),
new EquipItem({name:"T-Shirt", gender:"male", colors: ["pink"], styles: ["active", "casual"]}),
new EquipItem({name:"Tank Top", gender:"unisex", colors: ["pink"], styles: ["active"]}),
new EquipItem({name:"Tank Top", gender:"unisex", colors: ["black"], styles: ["active"]}),
new EquipItem({name:"Tank Top", gender:"unisex", colors: ["white"], styles: ["active"]}),
new EquipItem({name:"Crop Top", gender:"female", colors: ["white"], styles: ["formal", "comfy"]}),
new EquipItem({name:"Crop Top", gender:"female", colors: ["black"], styles: ["formal", "comfy"]}),
new EquipItem({name:"Crop Top", gender:"female", colors: ["red"], styles: ["formal", "comfy"]}),
new EquipItem({name:"Crop Top", gender:"female", colors: ["pink"], styles: ["formal", "comfy"]}),
new EquipItem({name:"Light Shirt", gender:"unisex", colors: ["black", "red"], styles: ["modest", "study"], extra: ["baggy"]}),
new EquipItem({name:"Light Shirt", gender:"unisex", colors: ["cyan"], styles: ["modest", "study"], extra: ["baggy"]}),
new EquipItem({name:"Light Shirt", gender:"unisex", colors: ["white", "blue", "red"], styles: ["modest", "study"], extra: ["baggy"]}),
new EquipItem({name:"Light Shirt", gender:"unisex", colors: ["white", "green"], styles: ["modest", "study"], extra: ["baggy"]}),
new EquipItem({name:"Light Shirt", gender:"unisex", colors: ["white", "pink", "red"], styles: ["modest", "study"], extra: ["baggy"]}),
new EquipItem({name:"Light Shirt", gender:"unisex", colors: ["yellow", "black"], styles: ["modest", "study"], extra: ["baggy"]}),
new EquipItem({name:"Sailor Shirt", gender:"unisex", colors: ["black", "red"], styles: ["study", "cute"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Shirt", gender:"unisex", colors: ["cyan"], styles: ["study", "cute"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Shirt", gender:"unisex", colors: ["white", "blue", "red"], styles: ["study", "cute"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Shirt", gender:"unisex", colors: ["white", "green"], styles: ["study", "cute"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Shirt", gender:"unisex", colors: ["white", "pink", "red"], styles: ["study", "cute"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Shirt", gender:"unisex", colors: ["yellow", "black"], styles: ["study", "cute"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Crop Top", gender:"female", colors: ["black", "red"], styles: ["study", "party", "sexy"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Crop Top", gender:"female", colors: ["cyan"], styles: ["study", "party", "sexy"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Crop Top", gender:"female", colors: ["white", "blue", "red"], styles: ["study", "party", "sexy"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Crop Top", gender:"female", colors: ["white", "green"], styles: ["study", "party", "sexy"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Crop Top", gender:"female", colors: ["white", "pink", "red"], styles: ["study", "party", "sexy"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Crop Top", gender:"female", colors: ["white", "red"], styles: ["study", "party", "sexy"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Sailor Crop Top", gender:"female", colors: ["yellow", "black"], styles: ["study", "party", "sexy"], extra: ["loose", "baggy"]}),
new EquipItem({name:"Vest", gender:"male", colors: ["red", "yellow", "white"], styles: ["active", "party"]}),
new EquipItem({name:"Vest", gender:"male", colors: ["green", "yellow", "white"], styles: ["active", "party"]}),
new EquipItem({name:"Blouse", gender:"female", colors: ["green", "white", "red"], styles: ["comfy", "party", "cute"]}),
new EquipItem({name:"Blouse", gender:"female", colors: ["red", "white", "green"], styles: ["comfy", "party", "cute"]}),
],
shoes: [
new EquipItem({name:"No Shoes", gender:"unisex", colors: ["nocolor"], styles: []}),
new EquipItem({name:"Formal Shoes", gender:"male", colors: ["black"], styles: ["formal"]}),
new EquipItem({name:"Formal Shoes", gender:"male", colors: ["black", "red"], styles: ["formal"]}),
new EquipItem({name:"Formal Shoes", gender:"male", colors: ["cyan"], styles: ["formal"]}),
new EquipItem({name:"Formal Shoes", gender:"male", colors: ["green"], styles: ["formal"]}),
new EquipItem({name:"Formal Shoes", gender:"male", colors: ["pink"], styles: ["formal"]}),
new EquipItem({name:"Formal Shoes", gender:"male", colors: ["pink", "black"], styles: ["formal"]}),
new EquipItem({name:"Formal Shoes", gender:"male", colors: ["red", "black"], styles: ["formal"]}),
new EquipItem({name:"Formal Shoes", gender:"male", colors: ["white", "black"], styles: ["formal"]}),
new EquipItem({name:"Sneakers", gender:"unisex", colors: ["black", "white"], styles: ["active", "party", "casual"]}),
new EquipItem({name:"Sneakers", gender:"unisex", colors: ["cyan", "white"], styles: ["active", "casual"]}),
new EquipItem({name:"Sneakers", gender:"unisex", colors: ["green", "white"], styles: ["active", "casual"]}),
new EquipItem({name:"Sneakers", gender:"unisex", colors: ["pink", "white"], styles: ["active", "party", "casual"]}),
new EquipItem({name:"Sneakers", gender:"unisex", colors: ["red", "white"], styles: ["active", "party", "casual"]}),
new EquipItem({name:"Sneakers", gender:"unisex", colors: ["white"], styles: ["active", "casual"]}),
new EquipItem({name:"Loafers", gender:"unisex", colors: ["black", "red"], styles: ["study", "comfy"]}),
new EquipItem({name:"Loafers", gender:"unisex", colors: ["black"], styles: ["study", "comfy"]}),
new EquipItem({name:"Loafers", gender:"unisex", colors: ["cyan"], styles: ["study", "comfy"]}),
new EquipItem({name:"Loafers", gender:"unisex", colors: ["green"], styles: ["study", "comfy"]}),
new EquipItem({name:"Loafers", gender:"unisex", colors: ["pink", "white"], styles: ["study", "comfy"]}),
new EquipItem({name:"Loafers", gender:"unisex", colors: ["pink"], styles: ["study", "comfy"]}),
new EquipItem({name:"Loafers", gender:"unisex", colors: ["red"], styles: ["study", "comfy"]}),
new EquipItem({name:"Loafers", gender:"unisex", colors: ["white"], styles: ["study", "comfy"]}),
new EquipItem({name:"Womens Oxfords", gender:"female", colors: ["brown", "black"], styles: ["formal", "study", "party"]}),
new EquipItem({name:"Mary Janes", gender:"female", colors: ["black", "black"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Mary Janes", gender:"female", colors: ["cyan"], styles: ["study", "cute"]}),
new EquipItem({name:"Mary Janes", gender:"female", colors: ["green"], styles: ["study", "cute"]}),
new EquipItem({name:"Mary Janes", gender:"female", colors: ["pink"], styles: ["study", "cute"]}),
new EquipItem({name:"Mary Janes", gender:"female", colors: ["pink", "black"], styles: ["study", "cute"]}),
new EquipItem({name:"Mary Janes", gender:"female", colors: ["pink", "white"], styles: ["study", "party", "cute"]}),
new EquipItem({name:"Mary Janes", gender:"female", colors: ["red"], styles: ["study", "cute"]}),
new EquipItem({name:"Mary Janes", gender:"female", colors: ["white"], styles: ["study", "cute"]}),
new EquipItem({name:"Mary Janes", gender:"female", colors: ["white", "black"], styles: ["study", "cute"]}),
new EquipItem({name:"Winter Boots", gender:"male", colors: ["black"], styles: ["modest", "party"]}),
new EquipItem({name:"Winter Boots", gender:"male", colors: ["green", "white"], styles: ["modest", "party"]}),
new EquipItem({name:"Winter Boots", gender:"male", colors: ["red", "white"], styles: ["modest", "party"]}),
new EquipItem({name:"Winter Heels", gender:"female", colors: ["green", "white"], styles: ["party", "cute"], extra: ["highheels"]}),
new EquipItem({name:"Winter Heels", gender:"female", colors: ["red", "white"], styles: ["party", "cute"], extra: ["highheels"]}),
],
legwear: [
new EquipItem({name:"No Legwear", gender:"unisex", colors: ["nocolor"], styles: []}),
new EquipItem({name:"Long Socks", gender:"male", colors: ["white", "green"], styles: ["formal", "modest"]}),
new EquipItem({name:"Long Socks", gender:"male", colors: ["white", "red"], styles: ["formal", "modest"]}),
new EquipItem({name:"Ankle Socks", gender:"unisex", colors: ["white"], styles: ["active", "casual"]}),
new EquipItem({name:"Small Bow Stockings", gender:"female", colors: ["brown", "green", "white"], styles: ["party", "cute"], extra: ["transparent"]}),
new EquipItem({name:"Small Bow Stockings", gender:"female", colors: ["brown", "red", "white"], styles: ["party", "cute"], extra: ["transparent"]}),
new EquipItem({name:"Stockings", gender:"female", colors: ["brown", "black"], styles: ["formal", "casual", "sexy"], extra: ["transparent"]}),
new EquipItem({name:"Seifuku Thigh Highs", gender:"female", colors: ["black", "red"], styles: ["study", "party", "comfy"]}),
new EquipItem({name:"Seifuku Thigh Highs", gender:"female", colors: ["blue", "brown"], styles: ["study", "comfy"]}),
new EquipItem({name:"Seifuku Thigh Highs", gender:"female", colors: ["cyan", "white"], styles: ["study", "comfy"]}),
new EquipItem({name:"Seifuku Thigh Highs", gender:"female", colors: ["green", "white"], styles: ["study", "comfy"]}),
new EquipItem({name:"Seifuku Thigh Highs", gender:"female", colors: ["pink", "white"], styles: ["study", "party", "comfy"]}),
new EquipItem({name:"Seifuku Thigh Highs", gender:"female", colors: ["white", "blue"], styles: ["study", "party", "comfy"]}),
new EquipItem({name:"Seifuku Thigh Highs", gender:"female", colors: ["red", "white"], styles: ["study", "comfy"]}),
],
mask: [
new EquipItem({name:"No Mask", gender:"unisex", colors: ["nocolor"], styles: []}),
new EquipItem({name:"Santas Beard", gender:"male", colors: ["white"], styles: ["party", "party", "party"], extra: ["fake"]}),
new EquipItem({name:"Lexington Glasses", gender:"male", colors: ["black"], styles: ["formal", "modest", "study"], extra: "transparent"}),
new EquipItem({name:"Lexington Glasses", gender:"male", colors: ["red"], styles: ["formal", "modest", "study"], extra: "transparent"}),
new EquipItem({name:"Lexington Glasses", gender:"male", colors: ["white"], styles: ["formal", "modest", "study"], extra: "transparent"}),
new EquipItem({name:"Lexington Glasses", gender:"male", colors: ["cyan"], styles: ["formal", "modest", "study"], extra: "transparent"}),
new EquipItem({name:"Lexington Glasses", gender:"male", colors: ["pink"], styles: ["formal", "modest", "study"], extra: "transparent"}),
new EquipItem({name:"Lexington Glasses", gender:"male", colors: ["green"], styles: ["formal", "modest", "study"], extra: "transparent"}),
new EquipItem({name:"Wellington Glasses", gender:"female", colors: ["black"], styles: ["study", "casual", "cute"], extra: "transparent"}),
new EquipItem({name:"Wellington Glasses", gender:"female", colors: ["red"], styles: ["study", "casual", "cute"], extra: "transparent"}),
new EquipItem({name:"Wellington Glasses", gender:"female", colors: ["white"], styles: ["study", "casual", "cute"], extra: "transparent"}),
new EquipItem({name:"Wellington Glasses", gender:"female", colors: ["cyan"], styles: ["study", "casual", "cute"], extra: "transparent"}),
new EquipItem({name:"Wellington Glasses", gender:"female", colors: ["pink"], styles: ["study", "casual", "cute"], extra: "transparent"}),
new EquipItem({name:"Wellington Glasses", gender:"female", colors: ["green"], styles: ["study", "casual", "cute"], extra: "transparent"}),
],
}>>
/* TODO 'multi' & 'hp' property for clothes? */
<<set _default_zero to ["fem", "sub", "int", "fit", "att"]>>
<<for _place, _list range setup.all_clothes>>
<<for _id, _cl range _list>>
<<set _cl.id to _id>>
<<set _cl.place to _place>>
<<set _cl.extra ??= []>>
<<for _prop range _default_zero>>
<<set _cl[_prop] ??= 0>>
<</for>>
<</for>>
<<clothesstatgen _list>>
<<clothesraritygen _list>>
<</for>><<widget "clothesraritygen">>
<<for _item range _args[0]>>
<<set _value to _item.colors.length+_item.styles.length+_item.extra.length>>
<<if _item.rarity is 0>>
<<if _value gte 5>>
<<set _item.rarity to 3>>
<<elseif _value gte 4>>
<<set _item.rarity to 2>>
<<elseif _value gte 3>>
<<set _item.rarity to 1>>
<<else>>
<<set _item.rarity to 0>>
<</if>>
<</if>>
<</for>>
<</widget>>
<<widget "clothesstatgen">>
<<set _scale to _args[1]>>
<<for _item range _args[0]>>
<<set _fem to _item.fem ?? 0>>
<<set _stylepts to {
modest: {fem:-1, sub:1, int:0, fit:0, att:0},
formal: {fem:-1, sub:0, int:1, fit:0, att:0},
active: {fem:0, sub:0, int:0, fit:1, att:0},
comfy: {fem:0, sub:1, int:0, fit:0, att:0},
casual: {fem:0, sub:0, int:0, fit:1, att:0},
study: {fem:0, sub:0, int:1, fit:0, att:0},
party: {fem:0, sub:0, int:0, fit:0, att:1},
cute: {fem:1, sub:0, int:0, fit:0, att:1},
sexy: {fem:1, sub:0, int:0, fit:0, att:1},
lewd: {fem:1, sub:1, int:0, fit:0, att:0},
}>>
<<for _sty range _item.styles>>
<<set _fem += _stylepts?.[_sty]?.fem ?? 0>>
<<set _item.base_sub += _stylepts?.[_sty]?.sub ?? 0>>
<<set _item.base_int += _stylepts?.[_sty]?.int ?? 0>>
<<set _item.base_fit += _stylepts?.[_sty]?.fit ?? 0>>
<<set _item.base_att += _stylepts?.[_sty]?.att ?? 0>>
<</for>>
<<set _colorpts to {
pink: {fem:2},
black: {fem:-1},
nocolor: {fem:0},
blue: {fem:-1},
brown: {fem:-1},
yellow: {fem:0},
cyan: {fem:0},
green: {fem:0},
white: {fem:1},
red: {fem:1},
multicolor: {fem:1},
}>>
<<set _fem += _colorpts?.[_item.colors[0]]?.fem ?? 0>>
<<set _fem += _colorpts?.[_item.colors[1]]?.fem ?? 0>>
<<set _extrapts to {
tight: {fem:1},
lace: {fem:1},
thick: {fem:-1},
baggy: {fem:-1},
loose: {fem:1},
transparent: {fem:1},
heels: {fem:1},
highheels: {fem:2},
fake: {fem:1},
}>>
<<for _extra range _item.extra>>
<<set _fem += _extrapts?.[_extra]?.fem ?? 0>>
<</for>>
<<set _genpts to {
male: {fem: -1},
unisex: {fem: 0},
female: {fem: 1},
}>>
<<set _fem += _genpts[_item.gender]?.fem ?? 0>>
<<set _item.base_fem to Math.clamp(_fem, -2, 2)>>
<</for>>
<</widget>><<set setup.svg_views to {
"undies": "#svgView(viewBox(-11.400, 203.30, 231.00, 176.50))",
"bra": "#svgView(viewBox(8.9000, 91.800, 190.30, 145.40))",
"bottom": "#svgView(viewBox(-153.80, 203.40, 515.70, 394.00))",
"top": "#svgView(viewBox(-46.300, 91.800, 300.80, 229.90))",
"shoes": "#svgView(viewBox(-15.000, 417.20, 238.10, 181.90))",
"handwear": "#svgView(viewBox(-64.200, 201.70, 185.30, 141.60))",
"penis": "#svgView(viewBox(32.600, 240.70, 142.90, 109.20))",
"hair": "#svgView(viewBox(-29.800, 0.90000, 267.70, 204.50))",
"makeup": "#svgView(viewBox(34.700, 20.800, 138.80, 106.10))",
"nails": "#svgView(viewBox(-22.400, 281.40, 90.500, 69.100))",
"choker": "#svgView(viewBox(69.100, 89.600, 69.900, 53.400))",
"earrings": "#svgView(viewBox(42.300, 64.200, 67.300, 51.400))",
"full_body": "#svgView(viewBox(-286.40, 0.90000, 780.80, 596.50))",
/* Full body is not default; its zoomed out! */
}>>
<<set setup.svg_views.legwear to setup.svg_views.bottom>>
<<set setup.svg_views.outerwear to setup.svg_views.top>>
<<set setup.svg_views.headgear to setup.svg_views.hair>>
<<set setup.svg_views.mask to setup.svg_views.hair>>
/* body SVG views */
<<set setup.svg_views.body to setup.svg_views.top>>
<<set setup.svg_views.face to setup.svg_views.makeup>>
/* style SVG views */
<<set setup.svg_views.hairstyle to setup.svg_views.hair>>
<<set setup.svg_views.lipstick to setup.svg_views.makeup>>
<<set setup.svg_views.toenail_polish to setup.svg_views.shoes>>
<<set setup.svg_views.nail_polish to setup.svg_views.nails>>
<<set setup.equip_layers to {
undies: 1,
bra: 1,
bottom: 2,
top: 2,
shoes: 2,
legwear: 1,
mask: 2,
body: 0,
penis: 0,
face: 0,
hair: 2,
hairstyle: 2,
makeup: 2,
lipstick: 2,
nails: 0,
nail_polish: 0,
toenail_polish: 0,
}>><<set setup.action_cards to [
/* "new" cards, TODO organize into smaller groups? */
new ActionCard({"name": "Apologize", "power": 8, "color": "Red", "rarity": 0, "sub-": 1, "stat1": "Stress+", }),
new ActionCard({"name": "Talk", "power": 8, "color": "Blue", "rarity": 0, "int-": 1, "stat1": "Stress+", }),
new ActionCard({"name": "Slap", "power": 8, "color": "Green", "rarity": 0, "fit-": 1, "stat1": "Stress+", }),
new ActionCard({"name": "Flirt", "power": 8, "color": "Purple", "rarity": 0, "att-": 1, "stat1": "Arousal+", }),
new ActionCard({"name": "Meditate", "power": 1, "color": "Red", "rarity": 1, "sub-": 2, "stat1": "Stress-", "card+bott": 2, }),
new ActionCard({"name": "Take a Break", "power": 1, "color": "Blue", "rarity": 1, "int-": 2, "stat1": "Stress-", "card+bott": 2, }),
new ActionCard({"name": "Respite", "power": 1, "color": "Green", "rarity": 1, "fit-": 2, "stat1": "Stress-", "card+bott": 2, }),
new ActionCard({"name": "Freshen Up", "power": 1, "color": "Purple", "rarity": 1, "att-": 2, "stat1": "Stress-", "card+bott": 2, }),
new ActionCard({"name": "Apathy", "power": 18, "color": "Red", "rarity": 2, "sub-": 2, "stat1": "Arousal-", "stat2": "Arousal-", "unique_effects": "Power is 18 - ?arousal", "pre_play_fn": "subt_arousal_pre", }),
new ActionCard({"name": "Cheer Up", "power": 18, "color": "Blue", "rarity": 2, "int-": 2, "stat1": "Stress-", "stat2": "Arousal-", "unique_effects": "Power is 18 - ?stress", "pre_play_fn": "subt_stress_pre", }),
new ActionCard({"name": "Embrace Masculinity", "power": 19, "color": "Green", "rarity": 2, "fit-": 2, "stat1": "Arousal-", "stat2": "Stress+", "unique_effects": "Power is 19 - ?identity", "pre_play_fn": "subt_identity_pre", }),
new ActionCard({"name": "Embrace Femininity", "power": 9, "color": "Purple", "rarity": 2, "att-": 2, "stat1": "Stress-", "stat2": "Arousal+", "unique_effects": "Power is 9 + ?fem", "pre_play_fn": "add_fem_pre", }),
new ActionCard({"name": "Obey", "power": 12, "color": "Red", "rarity": 3, "sub-": 3, "stat1": "Stress-", "stat2": "Arousal+", "stat3": "Arousal+", "unique_effects": "Power is 11 + playable ?sub", "pre_play_fn": "add_mana_sub_pre", }),
new ActionCard({"name": "Complain", "power": 12, "color": "Blue", "rarity": 3, "int-": 3, "stat1": "Arousal-", "stat2": "Stress+", "stat3": "Stress+", "unique_effects": "Power is 12 + playable ?int", "pre_play_fn": "add_mana_int_pre", }),
new ActionCard({"name": "Special Move", "power": 12, "color": "Green", "rarity": 3, "fit-": 3, "stat1": "Arousal-", "stat2": "Stress+", "stat3": "Stress+", "unique_effects": "Power is 12 + playable ?fit", "pre_play_fn": "add_mana_fit_pre", }),
new ActionCard({"name": "Seduction", "power": 12, "color": "Purple", "rarity": 3, "att-": 3, "stat1": "Stress-", "stat2": "Arousal+", "stat3": "Arousal+", "unique_effects": "Power is 11 + playable ?att", "pre_play_fn": "add_mana_att_pre", }),
/* Older cards...
new ActionCard({"name": "Pink Coffee", "power": 0, "color": "Purple", "rarity": 1, "stat1": "Transformation+", "stat2": "Arousal+", "att+": 3, "card+bott": 1, }),
new ActionCard({"name": "Blue Coffee", "power": 0, "color": "Blue", "rarity": 1, "stat1": "Transformation-", "stat2": "Stress+", "stat3": "Stress+", "int+": 2, "card+bott": 1, }),
new ActionCard({"name": "Green Shake", "power": 0, "color": "Green", "rarity": 1, "stat1": "Transformation-", "stat2": "Stress+", "stat3": "Stress+", "fit+": 2, "card+bott": 1, }),
new ActionCard({"name": "Red Shake", "power": 0, "color": "Red", "rarity": 1, "stat1": "Transformation+", "stat2": "Obedience+", "sub+": 3, "card+bott": 1, }),
new ActionCard({"name": "T-Blockers", "power": 2, "color": "Red", "rarity": 2, "sub-": 1, "int-": 1, "stat1": "Transformation+", "stat2": "Stress-", "stat3": "Arousal-", "unique_effects": "2+ to arousal and stress cards", "effect_fn": "plus_two_arousal_stress_effect", }),
new ActionCard({"name": "Testosterone", "power": 2, "color": "Green", "rarity": 3, "int-": 1, "fit-": 2, "stat1": "Transformation-", "stat2": "Transformation-", "stat3": "Obedience-", "card+top": 2, "unique_effects": "Draw only blue or green cards", "effect_fn": "filter_blue_green_effect", }),
new ActionCard({"name": "Estrogen", "power": 2, "color": "Purple", "rarity": 3, "sub-": 1, "att-": 2, "stat1": "Transformation+", "stat2": "Transformation+", "stat3": "Obedience+", "card+top": 3, "unique_effects": "Draw only purple or red cards", "effect_fn": "filter_purple_red_effect", }),
new ActionCard({"name": "Basic Attack", "power": 5, "color": "Neutral", "rarity": 0, }),
new ActionCard({"name": "Try Hard", "power": 3, "color": "Blue", "rarity": 1, "int-": 1, "fit-": 1, "stat1": "Stress+", "stat2": "Stress+", "stat3": "Obedience-", "unique_effects": "x2 power for this card, including all bonuses", "pre_play_fn": "double_self_pre", }),
new ActionCard({"name": "Prepare for the Worst", "power": 5, "color": "Blue", "rarity": 2, "sub-": 1, "int-": 2, "stat1": "Stress+", "stat2": "Stress+", "stat3": "Obedience+", "unique_effects": "add (20-stress) power to the next card", "effect_fn": "prepare_for_worst_effect", }),
new ActionCard({"name": "Overkill", "power": 6, "color": "Blue", "rarity": 3, "int-": 3, "stat1": "Stress+", "stat2": "Stress+", "stat3": "Stress+", "unique_effects": "x2 power to the next card", "effect_fn": "double_next_effect", }),
new ActionCard({"name": "Take a Nap", "power": 0, "color": "Blue", "rarity": 0, "int-": 1, "stat1": "Stress-", "stat2": "Arousal+", "stat3": "Arousal+", "card+bott": 2, }),
new ActionCard({"name": "Take a Break", "power": 3, "color": "Blue", "rarity": 1, "int-": 1, "fit-": 1, "stat1": "Stress-", "stat2": "Stress-", "unique_effects": "draw Try Hard card from your deck", "effect_fn": "take_break_effect", }),
new ActionCard({"name": "Meditate", "power": 2, "color": "Blue", "rarity": 2, "sub-": 1, "int-": 1, "fit-": 1, "stat1": "Stress-", "stat2": "Stress-", "stat3": "Obedience+", "card+bott": 2, "unique_effects": "1+ to all cards", "effect_fn": "plus_one_all_effect", }),
new ActionCard({"name": "Complain", "power": 7, "color": "Red", "rarity": 0, "sub-": 1, "stat1": "Obedience+", }),
new ActionCard({"name": "Talk", "power": 8, "color": "Blue", "rarity": 0, "int-": 1, "stat1": "Stress+", }),
new ActionCard({"name": "Slap", "power": 8, "color": "Green", "rarity": 0, "fit-": 1, "stat1": "Fatigue+", }),
new ActionCard({"name": "Flirt", "power": 7, "color": "Purple", "rarity": 0, "att-": 1, "stat1": "Arousal+", }),
*/
]>>
<<set setup.balance_cards to [
new ActionCard({"balance-": 1, "name": "Awkward Silence", "power": 13, "color": "Blue", "rarity": 1, "stat1": "Arousal-", "int+": 2, "fit+": 2, "card+top": 2, }),
new ActionCard({"balance-": 1, "name": "Friendly Talk", "power": 17, "color": "Blue", "rarity": 2, "stat1": "Stress-", "stat2": "Arousal-", "int+": 3, "fit+": 3, "card+top": 3, }),
new ActionCard({"balance-": 1, "name": "Friendzone", "power": 21, "color": "Blue", "rarity": 3, "stat1": "Stress-", "stat2": "Stress-", "stat3": "Arousal-", "int+": 4, "fit+": 4, "card+top": 4, }),
]>>
<<set setup.corruption_cards to [
new ActionCard({"corruption-": 1, "name": "Get Closer", "power": 21, "color": "Purple", "rarity": 1, "stat1": "Arousal+", "sub+": 3, "att+": 3, "card+top": 2, }),
new ActionCard({"corruption-": 1, "name": "Blowjob", "power": 26, "color": "Purple", "rarity": 2, "stat1": "Stress+", "stat2": "Arousal+", "sub+": 4, "att+": 4, "card+top": 3, }),
new ActionCard({"corruption-": 1, "name": "Hardcore", "power": 31, "color": "Purple", "rarity": 3, "stat1": "Stress+", "stat2": "Arousal+", "stat3": "Arousal+", "sub+": 5, "att+": 5, "card+top": 4, }),
]>>
/*
<<set setup.token_cards to [
new ActionCard({"name": "Lewd Thoughts", "power": 0, "color": "Neutral", "rarity": 0, "int-": 1, "stat1": "Arousal+", "card+top": 1, }),
new ActionCard({"name": "Horny", "power": 0, "color": "Neutral", "rarity": 0, "att-": 1, "stat1": "Arousal+", "stat2": "Arousal+", "card+top": 1, }),
new ActionCard({"name": "Orgasm", "power": 0, "color": "Neutral", "rarity": 0, "fit-": 1, "stat1": "Transformation+", "stat2": "Arousal+", "stat3": "Arousal+", "card+top": 2, "unique_effects": "if TF lt 30 spawn 1 Embarassed", "effect_fn": "orgasm_effect", }),
new ActionCard({"name": "Embarassed", "power": 0, "color": "Neutral", "rarity": 0, "int-": 1, "stat1": "Stress+", "stat2": "Arousal+", "stat3": "Obedience+", "sub+": 1, "att+": 1, }),
]>>
*/
<<set $player_deck to []>>
<<run $player_deck.push(setup.action_cards[0], setup.action_cards[1], setup.action_cards[2], setup.action_cards[3])>>
/*<<set $player_deck to clone(setup.action_cards)>>*/<<set setup.regular_enemies to [
{name: "Furious Echo", style: "active", gender:"female", power_rate: 1},
{name: "Gross Echo", style: "modest", gender:"male", power_rate: 1},
{name: "Well-Dressed Echo", style: "formal", gender:"male", power_rate: 1},
{name: "Horny Echo", style: "casual", gender:"male", power_rate: 1},
]>>
<<for _id, _enm range setup.regular_enemies>>
<<set _enm.id to _id>>
<<set _enm.image ??= _enm.name + "_b.jpg">>
<</for>><<set $player_equipment to new PlayerEquipment({
body: setup.all_body.body[0],
penis: setup.all_body.penis[5],
face: setup.all_body.face[0],
nails: setup.all_body.nails[0],
hair: setup.all_body.hair[0],
hairstyle: setup.all_styles.hairstyle[0],
toenail_polish: setup.all_styles.toenail_polish[0],
nail_polish: setup.all_styles.nail_polish[0],
makeup: setup.all_styles.makeup[0],
lipstick: setup.all_styles.lipstick[0],
undies: setup.all_clothes.undies[0],
bra: setup.all_clothes.bra[0],
legwear: setup.all_clothes.legwear[0],
mask: setup.all_clothes.mask[0],
top: setup.all_clothes.top[0],
shoes: setup.all_clothes.shoes[0],
bottom: setup.all_clothes.bottom[0],
})>>
<<set $player_perm_equip to clone($player_equipment)>>
<<set $player_stats to new PlayerStats()>>
<<set $player_stats.cor_cards to 1; $player_stats.bal_cards to 1>>
<<set $inv to []>><<widget "statbar">>
/* args[0] is expected to be a value in PlayerStats e.g. fem, stress... one of the ones capped at 10
* args[1] is an optional icon name (uses 0 otherwise) */
<<set _wis_icon to _args[1] ?? _args[0]>>
<<set _wis_stat to $player_stats[_args[0]]>>
<span @class='"statbar statbar-" + _wis_icon'>
<img class="statbar-icon" @alt="_args[0]" @src='"img2/icons/" + _wis_icon + ".svg"'>
<<for _i = 1; _i lte 10; ++_i>>
<<set _wis_class to "statbar-block">>
<<if _wis_stat gte _i>>
<<set _wis_class += " statbar-block-on">>
<</if>>
<span @class="_wis_class">
<<if _i is _wis_stat>>
<<print _i>>
<<elseif (_i is 1 and _wis_stat lt 1) or (_i is 10 and _wis_stat gt 10)>>
/* first block should have lte 1, last block has gte 10 */
<<print _wis_stat>>
<</if>>
</span>
<</for>>
</span>
<</widget>>
<<widget "raw_stat_num">>
/* args:
* 0: icon name (path in icons dir), also becomes extra class name
* 1: display value-- rendered literally; no safety precautions.
* 2: add'l CSS classes to apply after statnum instead of defaults */
<<set _wrsn_classes to _args[2] ?? "statnum-" + _args[0]>>
<span @class='"statnum " + _wrsn_classes'>
<img class="statnum-img" @alt="_args[0]" @src='"img2/icons/" + _args[0] + ".svg"'>
<span class="statnum-txt"><<print _args[1]>></span>
</span>
<</widget>>
<<widget "statnum">>
/* args:
* 0: icon name & key in lookup object (usually $player_stats)
* 1: OPTIONAL lookup object, defaults to PlayerStats */
<<set _wisn_icon to _args[0]>>
<<set _wisn_value to (_args[1] ?? $player_stats)[_args[0]]>>
<<if typeof _wisn_value isnot "number">>
<<set _wisn_value to "??">>
<<else>>
<<set _wisn_value to Math.clamp(Math.round(_wisn_value), 0, 9999).toString()>>
<</if>>
<<raw_stat_num _wisn_icon _wisn_value>>
<</widget>>
<<widget "sifa_stats">>
/* args[0] is lookup object for statnum, optional */
<div class="grid4col" style="margin: auto;">
<<for _wis_sifa range setup.SIFA>>
<<statnum _wis_sifa _args[0]>>
<</for>>
</div>
<</widget>>
<<widget "loop_bonuses">>
/* args[0] is expected to be a loop object (i.e. from loop gen passage) */
<<for _sty, _bonuses range _args[0].bonuses.styles>>
<span class="loop-bonuses">
<<print "?" + _sty>> ➡
<<for _sifa, _quant range _bonuses>>
/* no newline for print to avoid introducing needless whitespace */
<<for _i to 0; _i lt _quant; ++_i>><<print "?" + _sifa>><</for>>
<</for>>
</span>
<</for>>
<</widget>><<widget render_char>>
/* args[0] layer num: 0 naked, 1 underwear, 2 all
* args[1] SVG view (string to append to .svg)
* args[2] character object (object w/ body, hair, etc. properties that point to equipment, TODO list them)
*/
<<set _layer to _args[0]>>
<<set _view to _args[1] ?? "">>
<<set _char to _args[2] ?? $player_equipment>>
<<set _svg to ".svg" + _view>>
<div class="imgstack">
/* hair back */
<img @src='"img2/char/styles/hair/" + _char.hairstyle.name + "/" + "".concat(... _char.hairstyle.colors) + "/" + _char.hair.id + "/b" + _svg'>
/* buttocks */
<img @src='"img2/char/body/other/buttocks" + _svg'>
/* body */
<img @src='"img2/char/body/body/h" + _char.body.hips + "_w" + _char.body.waist + "_s" + _char.body.shoulders + _svg'>
/* If no underwear + bottoms... */
<<if _layer is 0 or (_layer is 1 and _char.undies.id is 0) or (_char.undies.id is 0 and _char.bottom.id is 0)>>
<img @src='"img2/char/body/other/thigh_shadow" + _svg'>
/* testicles */
<img @src='"img2/char/body/penis/testicles" + _char.penis.id + _svg'>
/* penis */
<<if $player_stats.arousal gte 10>>
<img @src='"img2/char/body/penis/erect" + _char.penis.id + _svg'>
<<else>>
<img @src='"img2/char/body/penis/soft" + _char.penis.id + _svg'>
<</if>>
<</if>>
/* boobs */
<img @src='"img2/char/body/boobs/b" + _char.body.boobs + "_s" + _char.body.shoulders + _svg'>
/* nipples */
<img @src='"img2/char/body/nipples/n" + _char.body.nipples + "_b" + _char.body.boobs + "_s" + _char.body.shoulders + _svg'>
/* toenails */
<img @src='"img2/char/styles/toenails/" + _char.toenail_polish.name + "/" + "".concat(... _char.toenail_polish.colors) + _svg'>
/* nails */
<img @src='"img2/char/styles/nails/" + _char.nail_polish.name + "/" + "".concat(... _char.nail_polish.colors) + "/" + _char.nails.id + "/s" + _char.body.shoulders + _svg'>
/* undies */
<<if _layer gte 1>>
<img @src='"img2/char/clothes/undies/" + _char.undies.name + "/" + "".concat(... _char.undies.colors) + "/h" + _char.body.hips + "w" + _char.body.waist + _svg'>
/* undies penis */
<img @src='"img2/char/clothes/undies/" + _char.undies.name + "/" + "".concat(... _char.undies.colors) + "/p" + _char.penis.id + _svg'>
/* legwear */
<img @src='"img2/char/clothes/legwear/" + _char.legwear.name + "/" + "".concat(... _char.legwear.colors) + "/h" + _char.body.hips + "w" + _char.body.waist + _svg'>
/* bra */
<img @src='"img2/char/clothes/bra/" + _char.bra.name + "/" + "".concat(... _char.bra.colors) + "/b" + _char.body.boobs + "w" + _char.body.waist + "s" + _char.body.shoulders + _svg'>
<</if>>
<<if _layer gte 2>>
/* shoes */
<img @src='"img2/char/clothes/shoes/" + _char.shoes.name + "/" + "".concat(... _char.shoes.colors) + _svg'>
/* tops */
<<set _baggy to _char.top.extra.includes("baggy")>>
<<set _top_src to "img2/char/clothes/tops/" + _char.top.name + "/" + "".concat(... _char.top.colors) + "/b" + _char.body.boobs + "h" + _char.body.hips + "w" + _char.body.waist + "s" + _char.body.shoulders + _svg>>
<<if not _baggy>>
<img @src="_top_src">
<</if>>
/* bottoms */
<img @src='"img2/char/clothes/bottoms/" + _char.bottom.name + "/" + "".concat(... _char.bottom.colors) + "/h" + _char.body.hips + "w" + _char.body.waist + _svg'>
/* bottoms penis */
<img @src='"img2/char/clothes/bottoms/" + _char.bottom.name + "/" + "".concat(... _char.bottom.colors) + "/p" + _char.penis.id + _svg'>
/* baggy tops */
<<if _baggy>>
<img @src="_top_src">
<</if>>
<</if>>
/* head */
<img @src='"img2/char/body/other/" + _char.face.head + _svg'>
/* makeup svg */
<img @src='"img2/char/styles/makeup/" + _char.makeup.name + "/" + "".concat(... _char.makeup.colors) + "/" + _char.face.id + _svg'>
/* lipstick svg */
<img @src='"img2/char/styles/lipstick/" + _char.lipstick.name + "/" + "".concat(... _char.lipstick.colors) + "/" + _char.face.id + _svg'>
/* front hair & ears */
<img @src='"img2/char/styles/hair/" + _char.hairstyle.name + "/" + "".concat(... _char.hairstyle.colors) + "/" + _char.hair.id + "/f" + _svg'>
<img @src='"img2/char/styles/hair/ears_" + _char.hair.ears + _svg'>
/* face */
<img @src='"img2/char/body/face/" + _char.face.id + _svg'>
/* mask */
<<if _layer gte 1>>
<img @src='"img2/char/clothes/mask/" + _char.mask.name + "/" + "".concat(... _char.mask.colors) + _svg'>
<</if>>
</div>
<</widget>><<widget equip_card>>
/* _args[0] is expected to be an EquipItem.
* Also, note that in widgets, using a common name like _card can accidentally overwrite stuff :\ */
<<set _weq_card to _args[0]>>
<<if _weq_card is undefined or _weq_card is null>>
<<run $debug_passages.add(passage())>>
<div class="equipgrid">
<img src="img2/gear/static2.svg" class="equipgridbg" style='background: orange'>
<span style="grid-row: 2; font-size: 8cqh; margin: 1em;">
An equipment card belongs here but it was null or undefined.
Please save here and report this bug.
</span>
</div>
<<else>>
<<set _rarity_text to _weq_card.rarity_text>>
<<if _rarity_text is "unique">>
<<set _rarity_text to "legendary">>
<</if>>
/* patches for new equipment card style */
<<switch _rarity_text>>
<<case "rare">>
<<set _bg to "deepskyblue">>
<<case "epic">>
<<set _bg to "blueviolet">>
<<case "legendary">>
<<set _bg to "orange">>
<<default>> /* common */
<<set _bg to "gray">>
<</switch>>
<<set _fem to _weq_card.fem>>
<div class="equipgrid">
<img src="img2/gear/static2.svg" class="equipgridbg" @style='"background: " + _bg'>
<div class="equipgridheader">
<span class="equipgridtitle">_weq_card.name</span>
<span class="equipgridstyles">
<<for _style range _weq_card.styles>>
<img @src='"img2/gear/style/" + _style + ".svg"'>
<</for>>
</span>
</div>
<div class="equipgridart">
<<render_char setup.equip_layers[_weq_card.place] setup.svg_views[_weq_card.place]
$player_equipment.with_alt_equip(_weq_card)>>
</div>
<img src="img2/gear/frame.svg" class="equipgridbg" style="z-index: 10">
<div class="equipgridinfo">
<div class="equipgriddesc">
<<for _sifa range setup.SIFA>>
/* this works, but would need CSS tweaks to fit 3 or 4 stats in the card
<<if _weq_card[_sifa] gt 0>>
<<statnum _sifa _weq_card>>
<</if>>*/
<<for _num to 0; _num lt _weq_card[_sifa]; _num++>>
<img @src='"img2/icons/" + _sifa + ".svg"'>
/* TODO (works but needs CSS tweaks): <<print "?" + _sifa>> */
<</for>>
<</for>>
</div>
<img @src='"img2/gear/" + _rarity_text + ".svg"' class="equipgridrarity">
<span class="equipgridfem">
<<set _color to "equipgridfemtext">>
<<if _fem gte 0>>
<img src="img2/gear/fem.svg">
<<else>>
<img src="img2/gear/masculinity.svg">
<<set _fem to Math.abs(_fem)>>
<<set _color += " equipgridmastext">>
<</if>>
/* TODO: Adjust size based on length of string here? */
<span @class="_color">_fem</span>
</span>
</div>
</div>
<</if>> /* for null check */
<</widget>>
<<widget "equipment_type_icon">>
/* note: color is not directly inserted into style-- it's part of a class name */
<<set _color to _args[0]>>
<<set _type to _args[1]>>
/* patching over old icon naming scheme */
<<switch _type>>
<<case "face">>
<<set _type to "body1">>
<<case "body">>
<<set _type to "body2">>
<<case "penis">>
<<set _type to "body3">>
<<case "hairstyle">>
<<set _type to "hair">>
<<case "nail_polish">>
<<set _type to "nails">>
<<case "toenail_polish">>
<<set _type to "toenails">>
/* default: do nothing */
<</switch>>
<<set _classes to "eq_type_icon btn-" + _color>>
<img @class="_classes" @src='"img2/icons/onbutton/" + _type + ".svg"'>
<</widget>>
<<widget "equip_tf">>
/* args: 0, 1: two EquipItems, before & after. */
<div class="itemtfgrid">
<<equip_card _args[0]>>
<img alt="has transformed into" src="img2/icons/green_arrow.svg">
<<equip_card _args[1]>>
</div>
<</widget>><<widget action_card>>
/* _args[0] is expected to be an ActionCard.
* All other args are optional string literals:
* "notilt" to disable js-tilt
* "disabled" to add grayscale effect */
<<set _wac_card to _args[0]>>
<<if _wac_card is undefined or _wac_card is null>>
<<run $debug_passages.add(passage())>>
<div class="cardgrid">
<img src="img2/actions/static.svg" class="cardgridbg" style='background: orange'>
<span style="grid-row: 2; font-size: 7cqh; margin: 1em;">
An equipment card belongs here but it was null or undefined.
Please save here and report this bug.
</span>
</div>
<<else>>
<<set _wac_class to "cardgrid">>
<<if _args.slice(1).includes("disabled")>>
<<set _wac_class += " grayscale">>
<</if>>
<<if not _args.slice(1).includes("notilt")>>
<<set _wac_class += " js-tilt">>
<</if>>
<div @class="_wac_class">
<img src="img2/actions/static.svg" class="cardgridbg" @style='"background: " + _wac_card.background'>
<div class="cardgridheader">
<span class="cardgridtitle">_wac_card.name</span>
<span class="cardgridcost">
<<for _type, _qty range _wac_card.mana_cost>>
<<for _i = 0; _i < _qty; ++_i>>
<img @src='"img2/icons/" + _type + ".svg"'>
<</for>>
<</for>>
</span>
</div>
<img class="cardgridart" @alt="_wac_card.img_alt" @src="_wac_card.img_path">
<img src="img2/gear/frame.svg" class="cardgridbg" style="z-index: 10">
<div class="cardgridicons">
<span class="cardgridicon">
<img src="img2/actions/power.svg">
<<if _wac_card.power gte 0>>
<img src="img2/actions/positive.svg">
<<else>>
<img src="img2/actions/negative.svg">
<</if>>
/* TODO: Adjust size based on length of string here? */
<<set _color to "cardgridicontext">>
<<if _wac_card.power_mod_up>>
<<set _color += " mod_up">>
<<elseif _wac_card.power_mod_down>>
<<set _color += " mod_down">>
<</if>>
<span @class="_color">_wac_card.power</span>
</span>
<img @alt="_wac_card.rarity_text" @src='"img2/icons/" + _wac_card.rarity_text + ".svg"' class="cardgridrarity">
<<for _type, _qty range _wac_card.stat_effects>>
<<for _i = 0; _i < Math.abs(_qty); ++_i>>
<span class="cardgridicon">
<img src="img2/actions/status.svg">
<<if _qty gt 0>>
<img src="img2/actions/negative.svg">
/* TODO something... better */
<span class="cardgridicon-sign">+</span>
<<else>>
<img src="img2/actions/positive.svg">
<</if>>
<img class="cardgridicon-primary" @alt="_type" @src='"img2/icons/" + _type + ".svg"'>
/* emoji fallback... <span class="cardgridicontext">_icon</span> */
</span>
<</for>>
<</for>>
</div>
<div class="cardgriddesc">
<<print _wac_card.description>>
</div>
</div>
<</if>> /* end of null check */
<</widget>>
<<widget reshuffle_deck>>
<<set $temp_deck to clone($player_deck).shuffle()>>
<<if def $draw_filter>>
<<set $temp_deck to $temp_deck.filter($draw_filter)>>
<</if>>
<</widget>>
<<widget playable_action>>
/* args[0] is an array of cards usable in action_card widget, typically $player_hand
* args[1] is an index in that array */
<<set _deck to _args[0]>>
<<set _idx to _args[1]>>
<<set _card to _deck[_idx]>>
<<capture _deck, _idx>>
<<link "<<action_card _card>>">>
<<set $next_power_multiplier to 0; $next_power_addition to 0;>>
/* To avoid issues w/ manipulating hand, remove the card being played before running its effect. */
<<run _deck.splice(_idx, 1)[0].run_effect()>>
<<if $enemy_power lte 0>>
<<set $battle_won to true>>
<<goto $back.pop()>>
<</if>>
/* Drawing cards can be annoying since we *might* run out & need to re-shuffle player deck=>temp to get more */
<<if $draw_front > 0>>
<<if $temp_deck.length >= $draw_front>>
/* the plucks here aren't really needed since deck was shuffled /shrug */
<<run $player_hand.unshift(... $temp_deck.pluckMany($draw_front))>>
<<else>>
<<run $player_hand.unshift(... $temp_deck)>>
<<set $draw_front -= $temp_deck.length>>
<<reshuffle_deck>>
<<run $player_hand.unshift(... $temp_deck.pluckMany($draw_front))>>
<</if>>
<</if>>
<<if $draw_back > 0>>
<<if $temp_deck.length >= $draw_back>>
/* the plucks here aren't really needed since deck was shuffled /shrug */
<<run $player_hand.push(... $temp_deck.pluckMany($draw_back))>>
<<else>>
<<run $player_hand.push(... $temp_deck)>>
<<set $draw_back -= $temp_deck.length>>
<<reshuffle_deck>>
<<run $player_hand.push(... $temp_deck.pluckMany($draw_back))>>
<</if>>
<</if>>
<<replace "#battlediv">><<include "battle page incl">><</replace>>
<<replace "#sidebar-stats">><<include "sidebar stats">><</replace>>
<</link>>
<</capture>>
<</widget>><div style="line-height: 1">
<h1 style="margin-top: 0">Icon Reference</h1>
<h2>SIFA Statistics</h2>
</div>
<p>These are the main statistics representing your character's abilities.
They affect your ability to play cards in combat and are used for some skill checks.
You have a set of "core" SIFA stats that can be increased by training,
but your cosmetics, clothing, and body also contribute to your SIFA stats.</p>
<ul style="columns: 4">
<li>?sub Submissiveness</li>
<li>?int Intelligence</li>
<li>?fit Fitness</li>
<li>?att Attractiveness</li>
</ul>
<h2 style="line-height: 1">Story Statistics</h2>
<ul>
<li>?money Money. Makes the world go 'round.</li>
</ul>
<p>These stats relate to your karma. You can gain and lose points from story events,
and you can spend karma to play special cards in combat.</p>
<ul style="columns: 2">
<li>?balance Balance</li>
<li>?corruption Corruption</li>
</ul>
<p>These stats relate to your femininity:</p>
<ul>
<li>?fem Femininity of your appearance.
All of your cosmetics, clothing, and body parts contribute to this score.</li>
<li>?identity Identity. This represents how feminine your thoughts and actions are.</li>
</ul>
<p>These stats relate to other mental states:</p>
<ul style="columns: 2">
<li>?stress Stress. Stay calm!</li>
<li>?arousal Arousal. Stay focused!</li>
</ul>
<h2 style="line-height: 1">Card Effects</h2>
<ul style="columns: 2">
<li><span style="font-size:2.5em;color:black;background:white;padding:2px;">⏮</span> Draw cards into your hand from the back.<br>Play existing cards to see new ones.</li>
<li><span style="font-size:2.5em;color:black;background:white;padding:2px;">⏭</span> Draw cards into your hand to the front.<br>New cards are available immediately.</li>
</ul>
<h2 style="line-height: 1">Rarity Icons</h2>
<p>These describe the relative value of equipment items and cards:</p>
<ul style="columns: 4">
<<for _icon range setup.rarities.slice(0, 4)>>
<li><<print "?" + _icon>> _icon</li>
<</for>>
</ul>
<h2 style="line-height: 1">Style Icons</h2>
<p>These icons show up on equipment items, and relate to the "style" or "type" of item they are:</p>
<ul style="columns: 9em;">
<<for _icon range
["modest", "formal", "active", "comfy", "casual",
"study", "party", "cute", "sexy", "lewd",]>>
<li><<print "?" + _icon>> _icon</li>
<</for>>
</ul>/* formerly "collected cards page". Note that cards tag reduces margin-top CSS...*/
/*<<set _can_change to Story.get($back.at(-1)).tags.includes("dressing")>>*/
<<set _can_change to Story.get(passage()).tags.includes("dressing")>>
/* TODO CSS fuckery continues */
<div style="width: 80%; margin: auto;">
<<if _can_change>>
<p>Click a clothing item to take it off and move it to
<<link "your inventory">><<script>>
Dialog.close();
Dialog.setup("Inventory", "inv-dialog autoanim");
Dialog.wiki(Story.get("inventory dialog").processText());
Dialog.open();
<</script>><</link>>.
</p>
<<else>>
<p>You are not allowed to change right now.</p>
<</if>>
/* Removable clothing items */
<<set _r_slots to ["mask", "top", "bra", "bottom", "undies", "legwear", "shoes"]>>
<div id="changeable-equip" class="grid5col">
<<for _slot range _r_slots>><<capture _slot>>
<<set _item to $player_equipment[_slot]>>
<div class="flexdown" style="row-gap: 0;">
<div style="width: 60%">
<<if _item.id isnot 0>>
<<equipment_type_icon "green" _slot>>
<<else>>
<<equipment_type_icon "red" _slot>>
<</if>>
</div>
/*
<<if _can_change and _item.id isnot 0>>
<a data-passage="passage()"
data-setter="$inv.push(clone($player_equipment[_slot])); $player_equipment[_slot] to clone(setup.all_clothes[_slot][0]);">
<<equip_card _item>>
</a>
<<else>>
<<equip_card _item>>
<</if>>
*/
<<equip_card _item>>
</div>
<</capture>><</for>>
</div>
/* Body & Style items (not changeable) */
<<set _slots to ["hair", "face", "body", "nails", "penis",
"hairstyle", "makeup", "lipstick", "nail_polish", "toenail_polish"]>>
<div class="grid5col">
<<for _slot range _slots>>
<<set _item to $player_equipment[_slot]>>
<div class="flexdown" style="row-gap: 0;">
<div style="width: 60%"> <<equipment_type_icon "green" _slot>> </div>
<<equip_card _item>>
</div>
<</for>>
</div>
/* end width hack */
</div>
<<done>><<script>>
const SCV = variables();
const TMP = temporary();
if(TMP.can_change) {
$('#changeable-equip .equipgrid').each((idx, el) => {
/* tie the element back to the slot... */
const slot = TMP.r_slots[idx];
const jqel = $(el);
if(SCV.player_equipment[slot].id !== 0) {
/* TODO use <a> tags like a normal person (messes w/ hierarchy) */
jqel.css('cursor', 'pointer');
jqel.ariaClick((event) => {
SCV.inv.push(clone(SCV.player_equipment[slot]));
SCV.player_equipment[slot] = clone(setup.all_clothes[slot][0]);
const parent = jqel.parent();
jqel.remove();
/* fix label color above */
parent.find('img').addClass("btn-red").removeClass("btn-green");
/* add replacement card */
parent.wiki('<<equip_card $player_equipment["' + slot + '"]>>');
/* redraw avatar (TODO: on dialog close instead?) */
$('#avatar').empty().wiki("<<include avatar_sidebar>>");
});
}
});
}
<</script>><</done>><<set _can_change to Story.get(passage()).tags.includes("dressing")>>
<<set _delete_items to false>>
<<for _idx, _item range $inv>>
<<set _item.inv_idx to _idx>>
<</for>>
<<if $inv.length is 0>>
<p class="largertext">Your inventory is empty...</p>
<<else>>
<<set _inv_groups to Object.groupBy($inv, ({place}) => place)>>
/* TODO should probably be a setup var. see also: Object.keys(setup.all_clothes) */
<<set _places to ["mask", "top", "bra", "bottom", "undies", "legwear", "shoes"]>>
<<set _first_place to _places.find(p => def _inv_groups[p])>>
<div id="inv-seln" class="flexbuttons" style="gap: 0.15em;">
<<for _place range _places>>
<<if def _inv_groups[_place]>>
<<set _color to _place is _first_place ? "green" : "red">>
<a @data-place="_place"><<equipment_type_icon _color _place>></a>
<</if>>
<</for>>
<<if not passage().startsWith("introduction")>>
<button id="deletebtn" class="btn btn-delete togglebtn">Delete Items</button>
<</if>>
</div>
<div id="inv-items">
<<inventory_group _first_place>>
</div>
<</if>>
<<done>><<script>>
const SCV = variables();
const TMP = temporary();
setup.make_inv_clickable();
$('#inv-seln a').each((_, el) => {
const jqel = $(el);
jqel.ariaClick((ev) => {
const place = jqel[0].dataset.place;
delete TMP.inv_swap;
TMP.delete_items = false;
$('#inv-items').empty().wiki("<<inventory_group '" + place + "'>>");
$('#inv-seln a .btn-green').addClass("btn-red").removeClass("btn-green");
/*$('#inv-notice').empty().wiki("<<inventory_notice>>");*/
delbtn.removeClass("toggle-on");
jqel.children().first().addClass("btn-green").removeClass("btn-red");
setup.make_inv_clickable();
});
});
const delbtn = $('#deletebtn');
delbtn.ariaClick((ev) => {
const item_area = $('#inv-items .grid4col');
const worn = $('#inv-items .flexdown').first();
TMP.delete_items = !TMP.delete_items;
$('#inv-notice').empty().wiki("<<inventory_notice>>");
delete TMP.inv_swap;
$('#inv-items .cardselect').removeClass(setup.card_select_classes);
if(TMP.delete_items) {
delbtn.addClass("toggle-on");
item_area.addClass("warning-bg");
worn.hide();
} else {
delbtn.removeClass("toggle-on");
item_area.removeClass("warning-bg");
worn.show();
}
});
$(document).one(':dialogclosed', function (ev) {
delete TMP.inv_swap;
SCV.inv = SCV.inv.filter(i => i !== null && i !== undefined && i.id !== 0);
});
<</script>><</done>><<widget "inventory_notice">>
/* no args, but reads _can_change and _delete_items */
<<if not _delete_items>>
Click any two items to swap them, for organization.
<<if _can_change>>
This includes your currently worn equipment, to change.
<br>(You can remove worn clothing from
<<link "the equipment page">><<script>>
Dialog.close();
Dialog.setup("Equipment", "inv-dialog autoanim");
Dialog.wiki(Story.get("player equipment page").processText());
Dialog.open();
<</script>><</link>>.)
<<else>>
You are not able to change your clothes right now.
<</if>>
<<else>>
Click the same item twice to delete it <em>permanently</em>.
<<link "Consider saving first.">><<script>>
Dialog.close();
UI.saves();
<</script>><</link>>
<</if>>
<</widget>>
<<widget "inventory_group">>
/* args: 0: name of key in _inv_groups-- should be a valid equipment "place".
* the value in _inv_groups should be an array of inv. items; each item is expected to have a .inv_idx too
* the tmp var _can_change is expected to exist-- TODO make it another arg? */
<<set _wig_place to _args[0]>>
<p id="inv-notice"><<inventory_notice>></p>
<div class="flexhoriz" style="gap: 1em;">
<div class="flexdown" style="flex: 1;">
<p style="text-align: center;">Current _wig_place</p>
<<if _can_change>>
<a @data-place="_wig_place"><<equip_card $player_equipment[_wig_place]>></a>
<<else>>
<<equip_card $player_equipment[_wig_place]>>
<</if>>
</div>
<div class="grid4col" style="flex: 5;">
<<if _inv_groups[_wig_place]?.length > 0>>
<<for _wig_item range _inv_groups[_wig_place]>>
<a @data-place="_wig_item.place" @data-inv-idx="_wig_item.inv_idx"><<equip_card _wig_item>></a>
<</for>>
<<else>>
<p class="gridfilltxt">You have no _wig_place items.</p>
<</if>>
</div>
</div>
<</widget>><p>This is your deck of actions. Click two cards to swap them (for organization).</p>
<div id="deck-inv" class="grid5col">
<<for _card range $player_deck>>
<<action_card _card>>
<</for>>
</div>
<<done>><<script>>
setup.activate_tilt();
const SCV = variables();
$('#deck-inv .cardgrid').each((idx, el) => {
const jqel = $(el);
jqel.data("deckidx", idx)
.ariaClick((ev) => {
const my_idx = jqel.data("deckidx");
if(SCV.card_swap === undefined) {
/* no card set, "activate" it */
SCV.card_swap = my_idx;
jqel.addClass(setup.card_select_classes);
} else if(SCV.card_swap === my_idx) {
/* picked same card, deactivate */
jqel.removeClass(setup.card_select_classes);
delete SCV.card_swap;
} else {
/* Swap their data... */
SCV.player_deck[my_idx] = SCV.player_deck.splice(SCV.card_swap, 1, SCV.player_deck[my_idx])[0];
const other = $($('#deck-inv .cardgrid')[SCV.card_swap]);
other.removeClass(setup.card_select_classes);
other.data("deckidx", my_idx);
jqel.data("deckidx", SCV.card_swap);
delete SCV.card_swap;
/* finally, swap them in HTML */
jqel.swapWith(other);
/* and reset both cards' tilt... */
jqel[0].vanillaTilt?.reset();
other[0].vanillaTilt?.reset();
}
});
});
$(document).one(':dialogclosed', function (ev) {
delete variables().card_swap;
});
<</script>><</done>><h1>Thank you for trying EP: Backrooms.</h1>
<div class="textwall">
<p>Before we begin, we want to emphasize that this game is a work of fiction created by adults, <em>for adults</em>.
This game contains pornographic content such as nudity and sex scenes.
You should not interact with this sort of work until you are <strong>at least 18 years of age, or better yet, 21.</strong></p>
<p>If you aren't old enough yet, please consider that these age gates exist for a reason.
It's very easy to watch, play, or read porn too much, at the expense of your relationships and responsiblities.</p>
<p>It's OK to uninstall the game. It'll be around if you decide to come back.</p>
<div class="flexbuttons" style="justify-content: center; gap: 1em;">
<<button "I'm an adult" "starting content warning">><</button>>
<<button "I'm not an adult" "starting age fail">><</button>>
</div>
</div><div class="textwall">
<p>There are two reasons the authors can think of for answering that way.
You might actually be an adult, but you're either curious about this option or just being funny.
Well, here we are...</p>
<p>Otherwise, you're being honest, in which case, we wonder how you got this game in the first place.
Seriously, please consider looking for other forms of entertainment; porn isn't <em>that</em> worthwhile.
Again, it's OK to uninstall the game. It'll be around if you decide to come back.</p>
</div>
<<done>>
<<run UIBar.stow()>>
<<addclass "#right-ui-bar" "stowed">>
<</done>><h1>Content Warnings & Disclaimers</h1>
<div class="textwall" style="text-indent: unset">
<p>To elaborate, this game contains content related to:</p>
<ul>
<li>Forced feminization</li>
<li>Male-to-female transformation</li>
<li>Hypnosis</li>
<li>...and of course, character nudity and sex.</li>
</ul>
<p>Many parts of the game may intentionally prevent you, the player, from making choices the way you want to.
However, we ensure that you retain the ability to consent to your character's sexual actions.</p>
</div>
<div class="textwall">
<p>Again, this is a work of pure fiction. This work uses potentially offensive gendered stereotypes
that do not reflect the authors' views of reality. Please treat everyone with respect, regardless of how they present themselves.</p>
<p style="text-align: center; text-indent: 0;"><strong>If you have any issue with the above, please close the game.</strong></p>
<div class="flexbuttons" style="justify-content: center; gap: 1em;">
<<button "I've read the disclaimer." "introduction 1">><</button>>
</div>
</div><p class="largertext">Please pardon our dust.
We literally used these pages for development testing and haven't spent too much time making them pretty.
By the way, you can use your browser's search feature (usually Ctrl/Cmd + F) to find specific items.</p>
/* [[Text|Link][Setter]] */
/* Most "events" should return here */
/*<<run $back.push(passage())>>*/
<ul>
<li>[[Back to loop confirmation|changing room]]</li>
<li>[[Change your body|body check][$back.push(passage())]]</li>
<li>[[Change your styles (cosmetics)|styles check][$back.push(passage())]]</li>
<li>[[Change your clothes (beware: lag)|clothes check][$back.push(passage())]]</li>
/*
<li>[[event test]]</li>
<li>[[event card test]]</li>
<li>[[action cards test]]</li>
<li>[[loop selection]]</li>
<li> ?changing_room changing allowed from here </li>
*/
<li><<link "Add 10 random inventory items" "test starting page">>
<<set _inv_padding to 10>>
<<run $inv.push(...Object.values(setup.all_clothes).flat()
.filter(({id}) => id isnot 0).randomMany(_inv_padding))>>
<</link>></li>
/*
<li style="overflow-wrap: break-word;">your overall stats: <<print JSON.stringify($player_stats.plain_obj)>></li>
<<if def $current_loop>>
<li>
<p>chosen loop stats: <<print JSON.stringify($current_loop)>></p>
[[Start the loop!|start loop]]
</li>
<<else>>
<li>Go to loop selection and pick something to begin...</li>
<</if>>
*/
</ul>
<div class="flexbuttons">
<<button "+1 ?sub" "test starting page">><<set $player_stats.bsub+=1>><</button>>
<<button "+1 ?int" "test starting page">><<set $player_stats.bint+=1>><</button>>
<<button "+1 ?fit" "test starting page">><<set $player_stats.bfit+=1>><</button>>
<<button "+1 ?att" "test starting page">><<set $player_stats.batt+=1>><</button>>
<<button "+5 ?money" "test starting page">><<set $player_stats.money+=5>><</button>>
<<button "+1 ?stress" "test starting page">><<set $player_stats.stress+=1>><</button>>
<<button "+1 ?arousal" "test starting page">><<set $player_stats.arousal+=1>><</button>>
<<button "+1 ?balance" "test starting page">><<set $player_stats.balance+=1>><</button>>
<<button "+1 ?corruption" "test starting page">><<set $player_stats.corruption+=1>><</button>>
<<button "+1 ?identity" "test starting page">><<set $player_stats.identity+=1>><</button>>
</div>
<div class="flexbuttons">
<<button "-1 ?sub" "test starting page">><<set $player_stats.bsub-=1>><</button>>
<<button "-1 ?int" "test starting page">><<set $player_stats.bint-=1>><</button>>
<<button "-1 ?fit" "test starting page">><<set $player_stats.bfit-=1>><</button>>
<<button "-1 ?att" "test starting page">><<set $player_stats.batt-=1>><</button>>
<<button "-5 ?money" "test starting page">><<set $player_stats.money-=5>><</button>>
<<button "-1 ?stress" "test starting page">><<set $player_stats.stress-=1>><</button>>
<<button "-1 ?arousal" "test starting page">><<set $player_stats.arousal-=1>><</button>>
<<button "-1 ?balance" "test starting page">><<set $player_stats.balance-=1>><</button>>
<<button "-1 ?corruption" "test starting page">><<set $player_stats.corruption-=1>><</button>>
<<button "-1 ?identity" "test starting page">><<set $player_stats.identity-=1>><</button>>
</div>
/*
<br>
<p>and now, for some stat blocks:</p>
<<for _stat range PlayerEquipment._stats.concat(PlayerStats._stats)>>
<<statbar _stat>>
<</for>>
<p>and for the numeric versions:</p>
<<for _stat range PlayerEquipment._stats.concat(PlayerStats._stats, ["money"])>>
<<statnum _stat>>
<</for>>
<p>sifa stats (at full passage width)</p>
<<sifa_stats>>
*/<<button "Back" "back">><</button>>
<br>
<<for _j to 0; _j lt Object.keys(setup.all_body).length; _j++>>
<<set _place to Object.keys(setup.all_body)[_j]>>
<<print _place>>
<<set _items_at_place to clone(setup.all_body[_place])>>
/*<<set _drop_items to _items_at_place.filter(item => item.rarity.includes("common") or item.rarity.includes("rare") or item.rarity.includes("epic") or item.rarity.includes("legendary"))>>*/
<div class="cards5" style="gap: 0.25em">
<<for _card range _items_at_place>>
<<capture _card>>
<a data-passage=passage() data-setter="$player_equipment[_card.place] to _card">
<<equip_card _card>>
</a>
<</capture>>
<</for>>
</div>
<</for>><<button "Back" "back">><</button>>
<br>
<<for _j to 0; _j lt Object.keys(setup.all_styles).length; _j++>>
<<set _place to Object.keys(setup.all_styles)[_j]>>
<<print _place>>
<<set _items_at_place to clone(setup.all_styles[_place])>>
/*<<set _drop_items to _items_at_place.filter(item => item.rarity.includes("common") or item.rarity.includes("rare") or item.rarity.includes("epic") or item.rarity.includes("legendary"))>>*/
<div class="cards5" style="gap: 0.25em">
<<for _card range _items_at_place>>
<<capture _card>>
<a data-passage=passage() data-setter="$player_equipment[_card.place] to _card">
<<equip_card _card>>
</a>
<</capture>>
<</for>>
</div>
<</for>><<button "Back" "back">><</button>><br>
/*
<<set _styles to {}; _rarities to {}>>
<<set _stats to {min: Infinity, max: -Infinity, sum: 0}>>
<<set _sifa_stats to {}>>
<<for _sifa range setup.SIFA>>
<<set _sifa_stats[_sifa] to clone(_stats)>>
<</for>>
<<set _count to 0>>
<<for _i range setup.all_clothes>>
<<for _k range _i>>
<<set _count++>>
<<for _st range _k.styles>>
<<set _styles[_st] to (_styles[_st] ?? 0) + 1>>
<</for>>
<<set _rarities[_k.rarity] to (_rarities[_k.rarity] ?? 0) + 1>>
<<for _sifa range setup.SIFA>>
<<set _k_stat to _k[_sifa] ?? 0>>
<<set _sifa_stats[_sifa].sum += _k_stat>>
<<set _sifa_stats[_sifa].min to Math.min(_sifa_stats[_sifa].min, _k_stat)>>
<<set _sifa_stats[_sifa].max to Math.max(_sifa_stats[_sifa].max, _k_stat)>>
<</for>>
<</for>>
<</for>>
<<for _sifa, _stat range _sifa_stats>>
<<set _stat.avg to (_stat.sum / _count).toPrecision(5)>>
<</for>>
<p>Counts: (total items: _count)</p>
<<set _pr_st to []>>
<<for _ty, _val range _styles>>
<<run _pr_st.push(_ty + " <img style='height: 1em' src='img2/gear/style/" + _ty + ".svg'>: " + _val)>>
<</for>>
<p><<print _pr_st.join(" | ")>></p>
<<set _pr_st to []>>
<<for _ty, _val range _rarities>>
<<run _pr_st.push(_ty + " <img style='height: 1em' src='img2/gear/" + _ty + ".svg'>: " + _val)>>
<</for>>
<p><<print _pr_st.join(" | ")>></p>
<p>SIFA stats:</p>
<<for _sifa, _stat range _sifa_stats>>
<p><<print _sifa + ": " + JSON.stringify(_stat)>></p>
<</for>>
*/
<<for _j to 0; _j lt Object.keys(setup.all_clothes).length; _j++>>
<<set _place to Object.keys(setup.all_clothes)[_j]>>
<<print _place>>
<<set _items_at_place to clone(setup.all_clothes[_place])>>
/*<<set _drop_items to _items_at_place.filter(item => item.rarity.includes("common") or item.rarity.includes("rare") or item.rarity.includes("epic") or item.rarity.includes("legendary"))>>*/
<div class="cards5" style="gap: 0.25em">
<<for _card range _items_at_place>>
<<capture _card>>
<a data-passage=passage() data-setter="$player_equipment[_card.place] to _card">
<<equip_card _card>>
</a>
<</capture>>
<</for>>
</div>
<</for>>/* 0 - stat to check (the higher the stat the more likely to get enemy)
1 - bonus for stat check (negative value reduces the chance, positive improves the chance)
2 - styles of the enemy
3 - genders of the enemy
4 - power rate (power*power_rate)*/
<<widget "enemy_spawn">>
<<set _check_stat to _args[0]>>
<<set _bonus_stat to _args[1]>>
<<set _power_rate to _args[4]>>
<<set _enemychance to random(1,10)>>
<<if _enemychance gt _check_stat+_bonus_stat>>
<<set $enemy to null>>
<<else>>
<<set _possible_enemies to setup.regular_enemies.filter(item => _args[2].includes(item.style) and _args[3].includes(item.gender))>>
<<set $enemy to _possible_enemies.random()>>
<<set $enemy.power_rate to _power_rate>>
<</if>>
<</widget>>/* 0 - stat to check (the lower the stat the more likely to get trap)
1 - bonus for stat check (positive value reduces the chance, negative improves the chance)
2 - types of the trap*/
<<widget "trap_spawn">>
<<set _check_stat to _args[0]>>
<<set _bonus_stat to _args[1]>>
<<set _trapchance to random(1,10)>>
<<if _trapchance lte $player_stats[_check_stat]+_bonus_stat>>
<<set $trap to null>>
<<else>>
<<set _possible_traps to setup.traps.filter(item => _args[2].includes(item.type))>>
<<set $trap to _possible_traps.random()>>
<</if>>
<</widget>><<widget "choice_btn">>
/* Args is expected to be a single object with the properties:
* color: background color. TODO maybe more elaborate CSS.
* target: target passage name (for "high" threshold, if applicable)
* text: text on the button
* requirement: OPTIONAL statistic to check; *for now* must be a stat in $player_stats
* threshold: OPTIONAL number, requirement must be gte this for button to be enabled
* low_threshold: OPTIONAL number, if requirement is less than (not equal) this number,
enable w/ alternate target & text. If neither threshold is met, disable button.
* low_target: OPTIONAL target passage name if low_threshold is met (uses target otherwise)
* low_text: OPTIONAL text if low_threshold is met (uses text otherwise)
* mid_target: OPTIONAL target passage to use if neither threshold is met (instead of disabling)
both low & high thresholds must be defined for this to have an effect
* mid_text: OPTIONAL text to use if neither threshold is met (defaults to text)
* disabled: OPTIONAL bool, if true, always disables this button
* disabled_text: OPTIONAL text to show on the button when disabled (defaults to text) */
<<set _btn to _args[0]>>
<<set _disable to false>>
<<set _text to _btn.text>>
<<set _target to _btn.target>>
<<if def _btn.requirement>>
<<set _req to $player_stats[_btn.requirement]>>
<<if (def _btn.threshold) and (ndef _btn.low_threshold)>>
/* only regular threshold */
<<if not (_req >= _btn.threshold)>>
<<set _disable to true>>
<<set _text to _btn.disabled_text ?? _text>>
<</if>>
/* otherwise met, nothing to do */
<<elseif (ndef _btn.threshold) and (def _btn.low_threshold)>>
/* only low threshold */
<<if _req < _btn.low_threshold>>
<<set _target to _btn.low_target ?? _target>>
<<set _text to _btn.low_text ?? _text>>
<<else>>
<<set _disable to true>>
<<set _text to _btn.disabled_text ?? _text>>
<</if>>
<<elseif (def _btn.threshold) and (def _btn.low_threshold)>>
/* low & high threshold. Test high, then low... */
<<if not (_req >= _btn.threshold)>>
/* high not met, try low */
<<if _req < _btn.low_threshold>>
/* low met */
<<set _target to _btn.low_target ?? _target>>
<<set _text to _btn.low_text ?? _text>>
<<elseif def _btn.mid_target>>
/* neither met, but there's a fallback... */
<<set _target to _btn.mid_target>>
<<set _text to _btn.mid_text ?? _text>>
<<else>>
/* neither met, no fallback */
<<set _disable to true>>
<<set _text to _btn.disabled_text ?? _text>>
<</if>>
<</if>>
/* else high is OK, use regular text & target */
<</if>>
/* else both are missing, do nothing */
<</if>>
<<if _disable or _btn.disabled is true>>
<button class="btn" disabled>_text</button>
<<else>>
<button @data-passage="_target" class="btn" @style='"background: " + _btn.color'>_text</button>
<</if>>
<</widget>>
<<widget "event_passage" container>>
/* Args:
* 0: object for event_card widget
* 1: array of "button" objects for player choices, see choice_btn widget
* _contents: passage text */
<<set _wevp_card to _args[0]>>
<<set _wevp_choices to _args[1]>>
<div class="grid2col">
<div><<print _contents>></div>
<div class="flexdown">
<div class="js-tilt" style="width: 80%;"><<event_card _wevp_card>></div>
<<for _choice range _wevp_choices>>
<<choice_btn _choice>>
<</for>>
</div>
</div>
<</widget>>
<<widget "event_card">>
/* Args is expected to be exactly 1 object with properties:
* title
* color: background color/CSS property
* bg_img: file name, relative to event images path
* fg_img: OPTIONAL like bg_img
* OR it can be an EquipItem or ActionCard-- then this will just display that widget + tilt
*/
<<set _wev_card to _args[0]>>
<<if _wev_card.is_equip_item>>
<<equip_card _wev_card>>
<<elseif _wev_card.is_action_card>>
<<action_card _wev_card notilt>>
<<else>>
<div class="eventcard">
<div class="eventcard-static" @style='"background: " + _wev_card.color'>
<img src="img2/events/static.svg">
</div>
<div class="eventcard-title"><<print _wev_card.title>></div>
<img class="eventcard-art-bg" @src='"img2/events/images/" + _wev_card.bg_img'>
<<if def _wev_card.fg_img>>
<img class="eventcard-art" @src='"img2/events/images/" + _wev_card.fg_img'>
<</if>>
</div>
<</if>>
<</widget>><<set $loop_choices to []>>
/* TODO generate these instead. Loop over all the items "properly".
Object.values(SugarCube.setup.all_body).forEach(li => li.forEach(it => it.colors.forEach(c => colors.add(c)))); */
/* removed "nocolor" and "transparent","multicolor","brown","yellow","blonde". */
/* fixed amount of colors styles, gender styles for body/style items moved out of clothing styles */
<<set _colors to ["black","white","blue","pink","red","cyan","green"]>>
<<set _styles to ["lewd","formal","modest","active","comfy","party","cute","study","casual","sexy"]>>
<<set _gender_styles to ["man", "trap", "girl"]>>
/* TODO: number of loops generated is the same as the number of complete difficulties. So at the beginning only 1 loop is generated.
If you complete first difficulty - you will see 2 loops generated. But both of them might be of the same difficulty
maybe there is a better way then using $complete_difficulty to track the number of complete difficulties xD */
/*<<set _max_diff to $complete_difficulty + 1>>*/
<<set _random_diff to Math.min(4, $debt.index + 1)>>
<<for _num = 1; _num lte 4; _num++>>
<<set _loop to {
difficulty: random(1, _random_diff),
bonuses: {
colors: {},
styles: {},
},
event_styles: new Set(),
event_colors: new Set(),
}>>
/* added all the colors and gender styles into the loop settings, so only styles that add extra stats take effect for now. Later we return gender and maybe colors */
<<set _bonuses to 3>>
<<set _bonus_colors to 0>>
<<set _bonus_styles to _bonuses - _bonus_colors>>
<<for _i = 0; _i < _bonus_colors; ++_i>>
<<set _color to _colors.random()>>
<<set _loop.event_colors.add(_color)>>
<<set _bonus to setup.SIFA.random()>>
<<set _loop.bonuses.colors[_color] ??= {}>>
<<set _loop.bonuses.colors[_color][_bonus] ??= 0>>
<<set _loop.bonuses.colors[_color][_bonus] += 1>>
<</for>>
<<for _i = 0; _i < _bonus_styles; ++_i>>
<<set _style to _styles.random()>>
<<set _loop.event_styles.add(_style)>>
<<set _bonus to setup.SIFA.random()>>
<<set _loop.bonuses.styles[_style] ??= {}>>
<<set _loop.bonuses.styles[_style][_bonus] ??= 0>>
<<set _loop.bonuses.styles[_style][_bonus] += 1>>
<</for>>
<<set _events to 10>>
<<set _event_styles to 0>>
<<set _event_gender_styles to 3>>
<<set _event_colors to _events - _event_styles - _event_gender_styles>>
<<run _styles.randomMany(_event_styles).forEach(c => _loop.event_styles.add(c))>>
<<run _colors.randomMany(_event_colors).forEach(c => _loop.event_colors.add(c))>>
<<run _gender_styles.randomMany(_event_gender_styles).forEach(c => _loop.event_styles.add(c))>>
<<set $loop_choices.push(_loop)>>
<</for>>
/* The rest of this passage is just for testing.
<<run console.log($loop_choices)>>
<<run console.log(JSON.stringify($loop_choices, null, 2))>>
<<set $current_loop to $loop_choices[0]>>
<<run $player_equipment.calc_all_stats()>>
<<goto "test starting page">>
*/<<run $back.push(passage())>>
<a href="https://www.patreon.com/sifagames" target="_blank"> <img src="img2/other/backrooms_banner_1.jpg" class="relfull"></a>
<br>
<br>
<p>Each loop has different dress code preferences. <<if $debt.index lte 0>>Harder difficulties can become available after succesful payments.<</if>></p>
<p class="largertext">Your next payment when you return is ?money<<print $debt.payment>>.</p>
<<if $loop_choices.length is 0>>
<<include "loop gen">>
<</if>>
/*
[[back]]<br>
[[Regen loops?|loop selection][$loop_choices to []]]<br>*/
<<set _diff_str to [null, "Easy", "Medium", "Hard", "Hardest"]>>
<div class="grid2col" style="margin: auto; width: 100%">
<<for _loop range $loop_choices>><<capture _loop>>
<button class="btn btn-loop" data-passage="changing room" data-setter="$current_loop to _loop">
<h2><<print _diff_str[_loop.difficulty]>></h2>
<p>Equipment bonuses:</p>
<<loop_bonuses _loop>>
</button>
<</capture>><</for>>
</div>
<br><<set _choices to [
{
text: "Start",
target: "start loop",
color: "green",
},
{
text: "Change the Loop",
target: "loop selection",
color: "gray",
},
]>>
<<set _ecard to {title: "Changing Room", color: "hotpink", bg_img: "Women Changing Room_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?changing_room</p>
<p>I can change my clothes here. It's better to wear something that fits the dress code, but it isn't necessary.</p>
<p>I can still change the loop if I want to.</p>
<</event_passage>>/* maybe a better name is "loop event calc"? */
<<set $events to []>>
/* each "wave" should not have duplicates but repeats may happen otherwise */
<<for _i = 0; _i < 4; ++_i>>
<<set _wave to []>>
/* TODO maybe something involving weighted randomness instead? */
<<run _wave.push(...setup.event_passages["instant-event"].randomMany(6))>>
<<run _wave.push(...setup.event_passages["event"].randomMany(4))>>
<<run _wave.push(...setup.event_passages["complex-event"].randomMany(2))>>
<<run _wave.shuffle()>>
/* avoid back-to-back duplicate events-- move first event to end */
<<if $events.at(-1) === _wave[0]>>
<<run _wave.push(_wave.shift())>>
<</if>>
<<run $events.push(... _wave)>>
<</for>>
<<set $player_perm_equip to clone($player_equipment)>>
/* TODO passage to introduce TFs? */
<<goto "next event">><<if $player_stats.identity gte 10 and (not $current_loop.max_identity)>>
<<set _event to "full identity precalc">>
<<elseif $player_stats.stress gte 10>>
<<set _event to "overstressed">>
<<elseif $player_stats.arousal gte 10>>
<<set _event to "overaroused">>
<<elseif $player_stats.balance gte 10>>
<<set _event to "full balance calc">>
<<elseif $player_stats.corruption gte 10>>
<<set _event to "full corruption calc">>
<<else>>
<<set _event to $events.shift()>>
<</if>>
<<if def _event>>
/* when event is over, go back here */
<<run $back.push(passage())>>
<<goto _event>>
<<else>>
/* completed all events. TODO boss passage instead? */
<<goto "loop end">>
<</if>>/* 'back' should point to the lobby around here... */
<<unset $current_loop>>
<<set $loop_choices to []>>
<<set _old_equip to clone($player_equipment)>>
/* reset player body to "permanent" */
<<for _place range Object.keys(setup.all_body)>>
<<set $player_equipment[_place] to $player_perm_equip[_place]>>
<</for>>
<<if $player_stats.money gte $debt.payment>>
<<set _choices to [{
text: "Alright, here you go",
target: "loop end payment",
color: "green",
}]>>
<<else>>
<<set _choices to [{
text: "I'm a little short...",
target: "loop end debt fail calc",
color: "darkred",
}]>>
<</if>>
<<set _ecard to {title: "Welcome Back", color: "green", bg_img: "Men Changing Room_b.jpg"}>>
<<event_passage _ecard _choices>>
<p>Welcome back. Your body has been returned to its initial state.</p>
<<equip_tf _old_equip.face $player_equipment.face>>
<<equip_tf _old_equip.body $player_equipment.body>>
<p>Per the terms of your contract, you currently owe ?money<<print $debt.payment>>
for facility upkeep. Please remit these funds immediately.</p>
<</event_passage>><<set $player_stats.money -= $debt.payment>>
<<set $debt.index = Math.min($debt.index + 1, setup.payments.length - 1)>>
<<set $debt.payment to setup.payments[$debt.index]>>
<<if $debt.index gte setup.payments.length>>
<<set $related_phrase to "You paid all the money, what means that you have won. Unfortunatelly, Sifa was too lazy to write some good endings. But we keep working on the game, and we have a lot of materials prepared. So the next half of the year will be quite active, so check for the updates sometimes. Thanks for your time, you're awesome!">>
<<else>>
<<set $related_phrase to "Unfortunately, due to increasing upkeep here, you will owe <strong>?money<<print $debt.payment>></strong> on your next return from a loop. Feel free to hang on to your remaining funds until then.">>
<</if>>
<<set _ecard to {title: "Debt Paid", color: "blue", bg_img: "Men Changing Room_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p>Excellent. Glad to see you're earning your keep. No need to worry about interest or otherwise, for now...</p>
<p>$related_phrase</p>
<</event_passage>><<set $debt.payment -= $player_stats.money>>
<<set $player_stats.money to 0>>
<<set $debt.interest_idx to 0>>
<<if $debt.payment lt setup.payments[$debt.index] * 2>>
<<goto "loop end debt fail">>
<<else>>
<<goto "loop end debt overflow">>
<</if>><<set _choices to [
{
text: "Compound Interest",
target: "loop end interest calc",
color: "darkred",
},
{
text: "Enhance yourself",
disabled_text: "Got enough enhancements...",
target: "loop end tf calc",
color: "magenta",
disabled: $debt.interest_idx gte setup.interest_rates.length - 1,
},
]>>
<<set _rate to (setup.interest_rates[$debt.interest_idx] * 100) + "%">>
<<set _potential_debt to Math.round($debt.payment * (1 + setup.interest_rates[$debt.interest_idx]))>>
<<set _ecard to {title: "Other Arrangements", color: "red", bg_img: "makeup process_b.jpg"}>>
<<event_passage _ecard _choices>>
<<if $debt.interest_idx is 0>>
<p>Well, you may be low on funds, but you can still pay down with what you have.</p>
<p>That said, we will have to compound some interest at a rate of _rate, which will leave you with a new debt of
?money<<print _potential_debt>> upon your next return from a loop.</p>
<p>That said, we do offer an option to lessen the blow a little.
We can enhance you to better fit the loop, that reduces our costs,
and we pass that on to you in the form of a temporary reduction in interest rate. What do you say?</p>
<<elseif $debt.interest_idx lt setup.interest_rates.length - 1>>
<p>Lovely. That should make it a bit easier for you to earn money in the loop.
We have reduced your interest rate to _rate, which will leave you with a new debt of
?money<<print _potential_debt>> upon your next return from a loop.</p>
<p>We are willing to reduce your interest further, should you be willing to transform more.</p>
<<else>>
<p>While we appreciate your enthusiasm, we are only willing to reduce your debt so far...
Your final interest rate is _rate, which will leave you with a new debt of
?money<<print _potential_debt>> upon your next return from a loop.</p>
<p>Have a lovely day with your new form.</p>
<</if>>
<</event_passage>><<set $debt.payment to Math.round($debt.payment * (1 + setup.interest_rates[$debt.interest_idx]))>>
<<run delete $debt.interest_idx>>
<<goto "back">><<run $back.push("loop end debt fail")>>
<<set $debt.interest_idx += 1>>
<<goto "feminization calc">><<set _choices to [
{
text: "Face the consequences",
target: "loop end overflow tf",
color: "red",
disabled: $debt.interest_idx gte setup.interest_rates.length - 1,
},
]>>
<<set _ecard to {title: "Excessive Debt?!", color: "red", bg_img: "Brainwashing Porn_b.jpg"}>>
<<event_passage _ecard _choices>>
<p>Well, this is ridiculous. You've let your debt grow double in size?! We're willing to cap it there,
so you'll only owe ?money<<print 2 * setup.payments[$debt.index]>> next time... but you will be subject
to some transformative measures to help us keep our costs down. Please enjoy this instructional video...</p>
<</event_passage>><<set $debt.payment to 2 * setup.payments[$debt.index]>>
/* TODO hypno event/identity+ */
<<set $player_stats.identity += 2>>
<<set $player_stats.arousal = 0>>
<<run $back.push(... new Array(3).fill("feminization calc"))>>
<<goto "back">>/* for "manual" links to back-- maybe should be a widget idk */
<<if $back.length > 0>>
<<goto $back.pop()>>
<<else>>
<p>Oops, we tried to "go back" without keeping track of what was "back". Please report a bug with a save file here.</p>
[[Go "back" to loop selection|loop selection]]
<</if>>/* go back, after discarding the top */
<<run $back.pop()>>
<<goto "back">><div class="grid2col">
<<set _ecard to {title: "test event", color: "blue", fg_img: "testnpc_f.png", bg_img: "testnpc_b.jpg"}>>
<div class="js-tilt">
<<event_card _ecard>>
</div>
[[back]]
</div><<set _choices to [
{
text: "Back",
target: "back",
color: "blue",
},
{
text: "Wardrobe",
target: "wardrobe",
color: "mediumvioletred",
},
{
text: "Drawer",
target: "drawer",
color: "mediumvioletred",
},
{
text: "women changing room",
target: "women changing room",
color: "mediumvioletred",
},
{
text: "Gym Entrance",
target: "gym entrance",
color: "green",
},
{
text: "Always off, even though req is met",
target: "event test",
color: "green",
requirement: "att",
threshold: -Infinity,
disabled: true,
},
{
text: "?att is >= 5",
disabled_text: "?att is < 5",
target: "event test",
color: "pink",
requirement: "att",
threshold: 5,
},
{
text: "?sub is >= 10, loop",
low_text: "?sub is < 6, go back",
disabled_text: "?sub is 5-9, disable",
target: "event test",
low_target: "back",
color: "red",
requirement: "sub",
threshold: 10,
low_threshold: 6,
},
{
text: "?att is < 5",
disabled_text: "?att is >= 5",
target: "event test",
color: "pink",
requirement: "att",
low_threshold: 5,
},
]>>
<<set _dumb to {
text: '<img style="display: inline-block; vertical-align: middle; width: 90%;" src="img2/actions/image/Show Obedience.png">',
target: "event test",
color: "blue",
}>>
/*<<set _ecard to {title: "this is a really long event", color: "blue", fg_img: "testnpc_f.png", bg_img: "testnpc_b.jpg"}>>*/
/*<<set _ecard to setup.all_clothes.bottom[1]>>*/
<<set _ecard to setup.action_cards[1]>>
<<event_passage _ecard _choices>>
<p>This is a sample event. Who knows what'll happen?</p>
<p>You have these stats: <<print JSON.stringify($player_stats.plain_obj, null, 1)>></p>
<p>Next, here's a "standalone" copy of the first button. This widget isn't really indended for "inline" usage, but it's possible. <<choice_btn _choices[0]>></p>
<p>Also, button elements can have stuff other than text: <<choice_btn _dumb>></p>
<</event_passage>><<set $get_action_card to "red">>
<<set _choices to [
{
text: "Submission ?sub",
target: "sub action card",
color: "darkred",
},
{
text: "Intellect ?int",
target: "int action card",
color: "mediumblue",
},
{
text: "Fitness ?fit",
target: "fit action card",
color: "green",
},
{
text: "Attraction ?att",
target: "att action card",
color: "purple",
},
{
text: "Skip",
target: "skip action card",
color: "gray",
},
]>>
<<set _ecard to {title: "Lecture Hall", color: "mediumblue", bg_img: "teacher_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?sub ?int ?fit ?att</p>
<p>Here I can learn some new skills. I need to improve my core stats first, then I can spend my points to learn new actions. However, with the new skills it would be easier to release echoes.</p>
<</event_passage>><<set $get_action_card to "red">>
<<set $get_action_card2 to "bsub">>
<<set _choices to [
{
text: "Back",
target: "new action card choice",
color: "gray",
},
{
disabled_text: "Not enough ?corruption",
text: "?sub Training -?corruption",
target: "get bstat calc",
color: "darkcyan",
requirement: "corruption",
threshold: 1,
},
{
disabled_text: "Not enough ?sub",
text: "Common Card -1?sub",
target: "get common action calc",
color: "green",
requirement: "bsub",
threshold: 1,
},
{
disabled_text: "Not enough ?sub",
text: "Rare Card -2?sub",
target: "get rare action calc",
color: "royalblue",
requirement: "bsub",
threshold: 2,
},
{
disabled_text: "Not enough ?sub",
text: "Epic Card -3?sub",
target: "get epic action calc",
color: "purple",
requirement: "bsub",
threshold: 3,
},
{
disabled_text: "Not enough ?sub",
text: "Legendary Card -4?sub",
target: "get legendary action calc",
color: "orange",
requirement: "bsub",
threshold: 4,
},
]>>
<<set _ecard to {title: "Submission Lesson", color: "red", bg_img: "dominant teacher_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?sub</p>
<p>Here I can learn some new submission skills.</p>
<</event_passage>><<set $get_action_card to "blue">>
<<set $get_action_card2 to "bint">>
<<set _choices to [
{
text: "Back",
target: "new action card choice",
color: "gray",
},
{
disabled_text: "Not enough ?balance",
text: "?int Training -?balance",
target: "get bstat calc",
color: "darkcyan",
requirement: "balance",
threshold: 1,
},
{
disabled_text: "Not enough ?int",
text: "Common Card -1?int",
target: "get common action calc",
color: "green",
requirement: "bint",
threshold: 1,
},
{
disabled_text: "Not enough ?int",
text: "Rare Card -2?int",
target: "get rare action calc",
color: "royalblue",
requirement: "bint",
threshold: 2,
},
{
disabled_text: "Not enough ?int",
text: "Epic Card -3?int",
target: "get epic action calc",
color: "purple",
requirement: "bint",
threshold: 3,
},
{
disabled_text: "Not enough ?int",
text: "Legendary Card -4?int",
target: "get legendary action calc",
color: "orange",
requirement: "bint",
threshold: 4,
},
]>>
<<set _ecard to {title: "Intellect Lesson", color: "darkblue", bg_img: "smart echo_b.jpg", fg_img: "smart echo.png"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?int</p>
<p>Here I can learn some new intellect skills.</p>
<</event_passage>><<set $get_action_card to "green">>
<<set $get_action_card2 to "bfit">>
<<set _choices to [
{
text: "Back",
target: "new action card choice",
color: "gray",
},
{
disabled_text: "Not enough ?balance",
text: "?fit Training -?balance",
target: "get bstat calc",
color: "darkcyan",
requirement: "balance",
threshold: 1,
},
{
disabled_text: "Not enough ?fit",
text: "Common Card -1?fit",
target: "get common action calc",
color: "green",
requirement: "bfit",
threshold: 1,
},
{
disabled_text: "Not enough ?fit",
text: "Rare Card -2?fit",
target: "get rare action calc",
color: "royalblue",
requirement: "bfit",
threshold: 2,
},
{
disabled_text: "Not enough ?fit",
text: "Epic Card -3?fit",
target: "get epic action calc",
color: "purple",
requirement: "bfit",
threshold: 3,
},
{
disabled_text: "Not enough ?fit",
text: "Legendary Card -4?fit",
target: "get legendary action calc",
color: "orange",
requirement: "bfit",
threshold: 4,
},
]>>
<<set _ecard to {title: "Fitness Lesson", color: "green", bg_img: "fitness_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?fit</p>
<p>Here I can learn some new fitness skills.</p>
<</event_passage>><<set $get_action_card to "purple">>
<<set $get_action_card2 to "batt">>
<<set _choices to [
{
text: "Back",
target: "new action card choice",
color: "gray",
},
{
disabled_text: "Not enough ?corruption",
text: "?att Training -?corruption",
target: "get bstat calc",
color: "darkcyan",
requirement: "corruption",
threshold: 1,
},
{
disabled_text: "Not enough ?att",
text: "Common Card -1?att",
target: "get common action calc",
color: "green",
requirement: "batt",
threshold: 1,
},
{
disabled_text: "Not enough ?att",
text: "Rare Card -2?att",
target: "get rare action calc",
color: "royalblue",
requirement: "batt",
threshold: 2,
},
{
disabled_text: "Not enough ?att",
text: "Epic Card -3?att",
target: "get epic action calc",
color: "purple",
requirement: "batt",
threshold: 3,
},
{
disabled_text: "Not enough ?att",
text: "Legendary Card -4?att",
target: "get legendary action calc",
color: "orange",
requirement: "batt",
threshold: 4,
},
]>>
<<set _ecard to {title: "Attractiveness Lesson", color: "purple", bg_img: "hot echo_b.jpg", fg_img: "hot echo.png"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?att</p>
<p>Here I can learn some new Attractiveness skills.</p>
<</event_passage>><<set $player_stats[$get_action_card2] += 1>>
<<if $get_action_card2 is "bint" or $get_action_card2 is "bfit">>
<<set $player_stats.balance -= 1>>
<<else>>
<<set $player_stats.corruption -= 1>>
<</if>>
<<goto "back">><<set $player_stats[$get_action_card2] -= 1>>
<<set $loot to setup.action_cards.filter(item => item.rarity is 0 and item.color eq $get_action_card).random()>>
<<run $player_deck.push($loot)>>
<<goto "new action card">><<set $player_stats[$get_action_card2] -= 2>>
<<set $loot to setup.action_cards.filter(item => item.rarity is 1 and item.color eq $get_action_card).random()>>
<<run $player_deck.push($loot)>>
<<goto "new action card">><<set $player_stats[$get_action_card2] -= 3>>
<<set $loot to setup.action_cards.filter(item => item.rarity is 2 and item.color eq $get_action_card).random()>>
<<run $player_deck.push($loot)>>
<<goto "new action card">><<set $player_stats[$get_action_card2] -= 4>>
<<set $loot to setup.action_cards.filter(item => item.rarity is 3 and item.color eq $get_action_card).random()>>
<<run $player_deck.push($loot)>>
<<goto "new action card">><<set $player_stats.corruption += 1>>
<<goto "back">><<set $get_action_card to "red">>
<<event_passage $loot setup.ok_choices>>
<p>I learned new skill - $loot.name. Now I can use it to release the echoes.</p>
<</event_passage>><<set _choices to [
{
text: "Dress-code Preset",
target: "random matched clothing loot calc",
color: "green",
},
{
text: "Random Preset",
target: "random clothing loot calc",
color: "green",
},
{
text: "Enhance Preset",
target: "enhance clothing calc",
color: "green",
},
]>>
<<set _ecard to {title: "Wardrobe", color: "orange", bg_img: "Wardrobe_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?balance ?corruption ?fem</p>
Cool, I can find some new clothes in this wardrobe. It's said this wardrobe has 3 presets. Dress-code clothing, random clothing, and "Enhance", whatever that means.
<</event_passage>><<set $player_stats.balance += 1>>
<<set _droplist to setup.items_matching_current_loop("clothes", "top", "bottom", "shoes")>>
<<if _droplist.length is 0>>
<<set _droplist to setup.items_matching_difficulty("clothes", "top", "bottom", "shoes")>>
<</if>>
<<set $loot to clone(_droplist.random())>>
<<if $loot is undefined>>
<<goto "no clothing loot results">>
<<else>>
<<goto "clothing loot results">>
<</if>><<set $player_stats.corruption += 1>>
<<set _droplist to setup.items_matching_difficulty("clothes", "top", "bottom", "shoes")>>
<<set $loot to clone(_droplist.random())>>
<<if $loot is undefined>>
<<goto "no clothing loot results">>
<<else>>
<<goto "clothing loot results">>
<</if>><<set _current_clothing to Object.keys(setup.all_clothes).shuffle()
.map(clty => $player_equipment[clty])
.reduce((ans, cur) => ans.fem < cur.fem ? ans : cur)>>
<<set $old_item to clone(_current_clothing)>>
<<set _matching_clothes to setup.all_clothes[_current_clothing.place]
.filter(item => item.fem gte _current_clothing.fem and item.rarity lte $current_loop.difficulty and item.id gt 0 and item.id neq $old_item.id)>>
<<if _matching_clothes.length is 0>>
<<goto "no clothing loot results">>
<<else>>
<<set $player_equipment[_current_clothing.place] to clone(_matching_clothes.random())>>
<<set $loot to clone($player_equipment[_current_clothing.place])>>
<<if $loot.fem eq $old_item.fem>>
<<set $player_stats.stress -= 1>>
<<set $related_phrase to "I don't feel any major differences from before.">>
<<else>>
<<set $related_phrase to "I can only change that in private if I want to.">>
<</if>>
<<goto "enhanced clothing results">>
<</if>><<set _choices to [
{
text: "Dress-code Preset",
target: "random matched underwear loot calc",
color: "green",
},
{
text: "Random Preset",
target: "random underwear loot calc",
color: "green",
},
{
text: "Enhance Preset",
target: "enhance clothing calc",
color: "green",
},
]>>
<<set _ecard to {title: "Drawer", color: "orange", bg_img: "Drawer_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?balance ?corruption ?fem</p>
<p>Great, I can try to find new underwear in this drawer. Maybe someone even left some accessories there. It's said this wardrobe has 3 presets. Dress-code item, random item, and "Enhance", whatever that means.</p>
<</event_passage>><<set $player_stats.balance += 1>>
<<set _droplist to setup.items_matching_current_loop("clothes", "mask", "undies", "bra", "legwear")>>
<<if _droplist.length is 0>>
<<set _droplist to setup.items_matching_difficulty("clothes", "mask", "undies", "bra", "legwear")>>
<</if>>
<<set $loot to clone(_droplist.random())>>
<<if $loot is undefined>>
<<goto "no clothing loot results">>
<<else>>
<<goto "clothing loot results">>
<</if>><<set $player_stats.corruption += 1>>
<<set _droplist to setup.items_matching_difficulty("clothes", "mask", "undies", "bra", "legwear")>>
<<set $loot to clone(_droplist.random())>>
<<if $loot is undefined>>
<<goto "no clothing loot results">>
<<else>>
<<goto "clothing loot results">>
<</if>><<set _current_clothing to clone($player_equipment[$loot.place])>>
<<set _choices to [
{
disabled_text: "Not enough ?corruption",
text: "Put in inventory -?corruption",
target: "put new clothing in inventory calc",
color: "purple",
requirement: "corruption",
threshold: 1,
},
{
text: "Wear $loot.name",
target: "wear new clothing calc",
color: "hotpink",
},
{
disabled_text: "Not enough ?balance",
text: "Skip -?balance",
target: "new clothing skip calc",
color: "blue",
requirement: "balance",
threshold: 1,
},
]>>
<<set _ecard to $loot>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?identity ?fem ?stress ?arousal</p>
<p>I found $loot.gender $loot.name. I can put it in my bag.</p>
<p>From the other hand, I can change $loot.place right here if I don't want to look for changing room.</p>
<p>I currently have <<print $player_equipment[$loot.place].name>>.</p>
<div class="bigcard">
<<equip_card _current_clothing>>
</div>
<</event_passage>><<set $player_stats.balance -= 1>>
<<goto "back">><<event_passage $loot setup.ok_choices>>
<p>Robotic voice told me to place my $old_item.place inside.
After a while it was unlocked and I was told to try $loot.name on. $related_phrase</p>
<p>I had <<print $old_item.name>> before, but now it's gone.</p>
<div class="bigcard">
<<equip_card $old_item>>
</div>
<</event_passage>><<set $player_stats.corruption -= 1>>
<<run $inv.push(clone($loot))>>
<<goto "back">><<run $inv.push(clone($player_equipment[$loot.place]))>>
<<set $player_equipment[$loot.place] to clone($loot)>>
<<goto "back">><<set _ecard to {title: "Nothing", color: "deepskyblue", bg_img: "Nothing_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
Eh, nothing useful here.
<</event_passage>><<set _choices to [
{
disabled_text: "Not enough ?balance",
text: "Subtle Cosmetics -?balance",
target: "subtle cosmetics calc",
color: "royalblue",
requirement: "balance",
threshold: 1,
},
{
disabled_text: "Not enough ?corruption",
text: "Heavy Cosmetics -?corruption",
target: "heavy cosmetics calc",
color: "purple",
requirement: "corruption",
threshold: 2,
},
{
text: "Skip",
target: "back",
color: "gray",
},
]>>
<<set _ecard to {title: "Makeup Chair", color: "hotpink", bg_img: "makeup chair_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?fem ?stress</p>
<p>Ok, it's not just a chair. It's an automatic makeup chair. It can change my look, like hairstyle, makeup, etc. It has 2 modes, subtle and heavy.</p>
<p>I can also relax a bit during the process.</p>
<</event_passage>><<set $player_stats.balance -= 1>>
<<set $player_stats.stress -= 1>>
<<set _droplist to []>>
<<run _droplist.push(... setup.all_styles.hairstyle.filter(item => item.fem lte 1 and item.id gt 0))>>
<<run _droplist.push(... setup.all_styles.toenail_polish.filter(item => item.fem lte 1 and item.id gt 0))>>
<<run _droplist.push(... setup.all_styles.nail_polish.filter(item => item.fem lte 1 and item.id gt 0))>>
<<run _droplist.push(... setup.all_styles.makeup.filter(item => item.fem lte 1 and item.id gt 0))>>
<<run _droplist.push(... setup.all_styles.lipstick.filter(item => item.fem lte 1 and item.id gt 0))>>
<<set $loot to clone(_droplist.random())>>
<<set $old_item to clone($player_equipment[$loot.place])>>
<<set $player_equipment[$loot.place] to clone($loot)>>
<<goto "new cosmetics">><<set $player_stats.corruption -= 2>>
<<set $player_stats.stress -= 1>>
<<set _droplist to []>>
<<run _droplist.push(...Object.values(setup.all_styles).flat().filter(({fem}) => fem gt 1))>>
<<set $loot to clone(_droplist.random())>>
<<set $old_item to clone($player_equipment[$loot.place])>>
<<set $player_equipment[$loot.place] to clone($loot)>>
<<goto "new cosmetics">><<set _ecard to {title: "Makeup Chair", color: "hotpink", bg_img: "makeup process_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p>A robotic voice told me to sit down and relax. After some time my new $loot.name was finished.</p>
<<equip_tf $old_item $loot>>
<</event_passage>><<set _choices to [
{
disabled_text: "Not enough ?stress to sleep",
text: "Sleep",
target: "sleeping in the bedroom of love calc",
color: "green",
requirement: "stress",
threshold: 4,
},
{
disabled_text: "Not enough ?arousal to masturbate",
text: "Masturbate",
target: "masturbate calc",
color: "red",
requirement: "arousal",
threshold: 4,
},
{
text: "Skip",
target: "back",
color: "gray",
},
]>>
<<set _ecard to {title: "The Bedroom of Love", color: "red", bg_img: "The Bedroom of Love_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?changing_room ?balance ?corruption ?identity ?fem ?stress ?arousal</p>
<p>It should be a brothel room. Dim lights, red colors, and everything is "love" themed. At least I'm alone here, so I can change clothes.</p>
<p>This place has a bed, so it's good enough to take a break and sleep for a while. Especially if I'm stressed out. But it's a brothel. I don't want to think what might happen if someone mistakes me for a worker.</p>
<p>I also spotted a TV set here. Though, I couldn't find the remote control. Instead I noticed the instructions. It is said that TV has a sensor, so when you want to masturbate it shows you the channel based on your look. Sounds stupid, but interesting. What they might show me this time?</p>
<</event_passage>><<enemy_spawn $player_stats.fem 2 "modest" "male" 1.5>>
<<set $player_stats.stress to 0>>
<<set $player_stats.balance++>>
<<if $enemy>>
<<set $player_stats.stress += Math.round((10-$player_stats.identity)/4)>>
<<set $player_stats.identity++>>
<<if $player_stats.identity lt 5>>
<<set $related_phrase to '"What the fuck?!" I shouted loudly and pushed the guy and the groin I`ve been exploring a moment ago with all my strength. "Get off me!"'>>
<<elseif $player_stats.identity lt 8>>
<<set $related_phrase to 'I wasn`t suprised to see the guy waiting for me to finish him off. I`m in the brothel after all. "You know, I actually don`t work here." You told him.'>>
<<else>>
<<set $related_phrase to 'Your wishes came true. It is a man above you, and seems like his cock is as fat as the guy himself. "You know, I would like to work here, but unfortunately I don`t." You explained him.'>>
<</if>>
/*<<run $back.push("next event")>>*/
<<goto "waking up in the bedroom of love">>
<<else>>
<<goto "back">>
<</if>><<set _choices to [
{
disabled_text: "Not enough ?corruption",
text: "Suck him off for <<print Math.round((10+$player_stats.fem+$player_stats.att)*$current_loop.difficulty/2)>>?money",
target: "suck the pickle calc",
color: "purple",
requirement: "corruption",
threshold: 1,
},
{
disabled_text: "Not enough ?corruption",
text: "Let him fuck you for <<print Math.round((10+$player_stats.fem+$player_stats.att)*$current_loop.difficulty)>>?money",
target: "sex in the brothel calc",
color: "red",
requirement: "corruption",
threshold: 1,
},
{
text: "Release the echo",
target: "event battle",
color: "royalblue",
},
]>>
<<set _ecard to {title: "Good Morning", color: "red", bg_img: "good morning brothel_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?changing_room ?money ?fem ?identity ?stress ?arousal ?corruption</p>
<p>Half asleep I touched something hard above me. After few more touches and a squeeze I still had no clue what was that. So I decided to open my eyes.</p>
<p>"Good morning, cutie. It's time to work."</p>
<p>A fat man was right above me. And I was squeezing nothing else but his bulge.</p>
<p>$related_phrase</p>
<p>"Oh my! I'm truly sorry. I didn't know you're not working here. But... How did such a cutie end up sleeping in the brothel?.." The echo started to get suspicious. I need to deal with him now.</p>
<p>I can still tell him that I'm working here. This way I can get the extra money I need so much. But working here means being a submissive whore who sells her body to strangers. Do I really want to do this?</p>
<p>I can also try to release the echo. It would be harder than usual, though.</p>
<</event_passage>><<set $player_stats.money += Math.round((10+$player_stats.fem+$player_stats.att)*$current_loop.difficulty/2)>>
<<set $player_stats.stress += Math.round((2+10-$player_stats.identity)/2)>>
<<set $player_stats.identity += 1>>
<<set $player_stats.bsub += 1>>
<<set $player_stats.corruption -= 1>>
<<if $player_stats.arousal gte 8>>
<<set $player_stats.arousal to 0>>
<<set $player_stats.corruption += 1>>
<<set $player_stats.identity += 1>>
<<set $related_phrase to "I was too horny to just worship someone's dick. I wanted to get some relief too. So I started to wank myself. In a moment we both came. Cumming while sucking stranger's dick... Great... ">>
<<else>>
<<set $player_stats.arousal += 2>>
<<set $related_phrase to "For some reason my arousal got higher from sucking stranger's dick. However it wasn't enough for shame orgasm, so I just made my client happy, gulped and received the payment.">>
<</if>>
<<goto "suck the pickle">><<set $player_stats.money += (10+$player_stats.fem+$player_stats.att)*$current_loop.difficulty>>
<<set $player_stats.stress += (2+10-$player_stats.identity)>>
<<set $player_stats.bsub += 2>>
<<set $player_stats.identity += 1>>
<<set $player_stats.corruption -= 1>>
<<if $player_stats.arousal gte 4>>
<<set $player_stats.arousal to 0>>
<<set $player_stats.corruption += 1>>
<<set $player_stats.identity += 1>>
<<set $related_phrase to "I told the fat guy that he can use me anyway he wants. So he used me quite hard, like I'm a complete whore. It took us just a few minutes untill we came. Then the echo thanked me and gave me my payment.">>
<<else>>
<<set $player_stats.arousal += 4>>
<<set $related_phrase to "I told the fat guy that he can use me anyway he wants. So he used me quite hard, like I'm a complete whore. It took him just a few minutes untill he came. Then the echo thanked me and gave me the payment I deserved and left me with my raised arousal.">>
<</if>>
<<goto "sex in the brothel">><<set _ecard to {title: "Blowjob", color: "hotpink", bg_img: "blowjob_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?changing_room</p>
<p>$related_phrase</p>
<</event_passage>><<set _ecard to {title: "Use Me", color: "red", bg_img: "Use Me_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?changing_room</p>
<p>$related_phrase</p>
<</event_passage>><<set $player_stats.arousal to 0>>
<<set $player_stats.corruption++>>
<<set $player_stats.bsub += 1>>
<<if $player_stats.identity lt $player_stats.fem>>
<<set $player_stats.identity++>>
<<set $player_stats.stress++>>
<<set $related_phrase to "Oh, I should have worn something that fits my identity. I feel more feminine after masturbating on this porn. Realization hit me with a bit of extra stress.">>
<<elseif $player_stats.identity gt $player_stats.fem>>
<<set $player_stats.identity-->>
<<set $player_stats.stress += 2>>
<<set $related_phrase to "Oh, I should have worn something that fits my identity. I feel more masculine after masturbating on this porn. Trying to convince myself that it's good I got more stressed.">>
<<else>>
<<set $player_stats.balance++>>
<<set $player_stats.stress-->>
<<set $related_phrase to "It didn't take much time till I came. Wanking on something that fits your preferences is cool. You start to feel that you're supposed to be here at moments like that.">>
<</if>>
<<goto "masturbate in the brothel">><<if $player_stats.fem lt 1>>
<<set _ecard to {title: "Straight Porn", color: "red", bg_img: "Straight Porn_b.jpg"}>>
<<elseif $player_stats.fem lt 2>>
<<set _ecard to {title: "Lesbian Porn", color: "red", bg_img: "Lesbian Porn_b.jpg"}>>
<<elseif $player_stats.fem lt 4>>
<<set _ecard to {title: "Blowjob Porn", color: "red", bg_img: "Blowjob Porn_b.jpg"}>>
<<elseif $player_stats.fem lt 6>>
<<set _ecard to {title: "Brainwashing Porn", color: "red", bg_img: "Brainwashing Porn_b.jpg"}>>
<<elseif $player_stats.fem lt 8>>
<<set _ecard to {title: "Femdom Porn", color: "red", bg_img: "Femdom Porn_b.jpg"}>>
<<elseif $player_stats.fem lt 10>>
<<set _ecard to {title: "Sissy Porn", color: "red", bg_img: "Sissy Porn_b.jpg"}>>
<<else>>
<<set _ecard to {title: "Threesome Porn", color: "red", bg_img: "Threesome Porn_b.jpg"}>>
<</if>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?changing_room</p>
<p>Right at the moment I touched my $player_equipment.penis.name the screen changed the channel to _ecard.title.</p>
<p>$related_phrase</p>
<p>The fact of masturbating in the brothel where everyone having sex made me feel more submissive.</p>
<</event_passage>><<set _choices to [
{
disabled_text: "Not enough ?money",
text: "Striptease Show -<<print 4*$current_loop.difficulty>>?money",
target: "striptease show calc",
color: "crimson",
requirement: "money",
threshold: 4*$current_loop.difficulty,
},
{
disabled_text: "Not enough ?money",
text: "Relax at the bar -<<print 2*$current_loop.difficulty>>?money",
target: "relax at the bar calc",
color: "green",
requirement: "money",
threshold: 2*$current_loop.difficulty,
},
{
disabled_text: "Not enough ?balance",
text: "Bartender Shift -?balance",
target: "bartender shift calc",
color: "slateblue",
requirement: "balance",
threshold: 1,
},
{
disabled_text: "Not enough ?corruption",
text: "Pole Dancer Shift -?corruption",
target: "pole dancer shift calc",
color: "hotpink",
requirement: "corruption",
threshold: 1,
},
{
text: "Skip",
target: "back",
color: "gray",
},
]>>
<<set _ecard to {title: "Striptease Bar", color: "darkred", bg_img: "striptease bar_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?changing_room ?money ?balance ?corruption ?identity ?stress ?arousal</p>
<p>It's definetaly a striptease bar. Ok, let's see what I can do here.</p>
<p>Obious enough, I can hire some pole dancer if I need some relief. The price is <<print 4*$current_loop.difficulty>> ?money.
Sure I can just spend <<print 2*$current_loop.difficulty>> ?money at the bar.</p>
<p>If you look at this from the other angle, I can work here. One of the options is a shift as a bartender.
I just need to be smart and charming enough to communicate with the customers.
Another option is a pole dancer shift. The performance is based basically on everything I have, sure except of my brain.
At least I can be sure customers won't touch me, the rules are quite strict here.</p>
<p>I can change my clothes using one of the private rooms.</p>
<</event_passage>><<set $player_stats.money -= 4*$current_loop.difficulty>>
<<set $player_stats.arousal += 3>>
<<if $player_stats.arousal gt 5>>
<<set $player_stats.arousal to 0>>
<<set $related_phrase to "It's good they allow masturbating here. But don't you dare touch a girl here, what actually isn't a problem at all. I came right before the time is up. The girl gave me a wink and went to the next customer.">>
<<else>>
<<set $related_phrase to "I wasn't aroused enough to masturbate, so I just watched the full show, gave the dancer the money she deserved, so she smiled for the last time and went to the next customer.">>
<</if>>
<<set $player_stats.corruption += 1>>
<<set $player_stats.stress -= 2>>
<<goto "striptease show">><<set _ecard to {title: "Personal Striptease Show", color: "darkred", bg_img: "striptease show_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?changing_room</p>
<p>$related_phrase
I can still change the clothes.</p>
<</event_passage>><<set $player_stats.money -= 2*$current_loop.difficulty>>
<<set $player_stats.balance += 1>>
<<set $player_stats.stress -= 4>>
<<goto "relax at the bar">><<set _ecard to {title: "At the Bar", color: "orange", bg_img: "bartender_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?changing_room</p>
<p>I spent some time at the bar. Nothing special, a regular chat with the bartender, few shots, and I'm refreshed and ready to go.
I can still change the clothes in the private room.</p>
<</event_passage>><<set $sallary to Math.round(((($player_stats.int + $player_stats.att) / 2)-(($player_stats.stress + $player_stats.arousal) / 4)+10) * $current_loop.difficulty)>>
<<set $player_stats.money += $sallary>>
<<set $player_stats.balance -= 1>>
<<set $player_stats.stress += Math.round((6 + Math.abs($player_stats.fem - $player_stats.identity))/2)>>
<<if $player_stats.identity lt $player_stats.fem>>
<<set $player_stats.identity += 1>>
<<set $related_phrase to "Working infront of the others while looking more feminine made me feel more accustomed to the girly stuff.">>
<<elseif $player_stats.identity gt $player_stats.fem>>
<<set $player_stats.identity -= 1>>
<<set $related_phrase to "Working infront of the others while looking less feminine made me feel less accustomed to the girly stuff.">>
<<else>>
<<set $related_phrase to "Wasn't hard at all.">>
<<set $player_stats.stress -= 1>>
<</if>>
<<goto "bartender shift">><<set _ecard to {title: "Bartender Shift", color: "orange", bg_img: "bartender_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?changing_room</p>
<p>I spent some time at the bar, but this time I was the bartender myself. $related_phrase I earned <<print $sallary>>?money.
I can still change the clothes in the private room.</p>
<</event_passage>><<set $sallary to Math.round(((($player_stats.sub + $player_stats.fit + $player_stats.att + $player_stats.fem) / 2)+10) * $current_loop.difficulty)>>
<<set $player_stats.money += $sallary>>
<<set $player_stats.corruption -= 1>>
<<set $player_stats.stress += 12 - $player_stats.identity>>
<<set $player_stats.arousal += $player_stats.identity>>
<<if $player_stats.identity lt $player_stats.fem>>
<<set $player_stats.identity += 2>>
<<set $related_phrase to "Dancing on a pole infront of the masturbating men while looking more feminine than usual made me feel way more accustomed to the girly stuff.">>
<<elseif $player_stats.identity gte $player_stats.fem>>
<<set $player_stats.identity += 1>>
<<set $related_phrase to "Dancing on a pole infront of the others while looking less feminine than usual didn't change the fact that I'm actually a pole dancer now, and the guys are wanking at me.">>
<</if>>
<<goto "pole dancer shift">><<set _ecard to {title: "Pole Dancer Shift", color: "darkred", bg_img: "striptease show_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?changing_room</p>
<p>$related_phrase However, I earned <<print $sallary>>?money.
I can still change the clothes in the private room.</p>
<</event_passage>><<set _choices to [
{
text: "Take the Money",
target: "take lost money calc",
color: "green",
},
{
text: "Skip the Money",
target: "skip lost money calc",
color: "royalblue",
},
]>>
<<set _ecard to {title: "Lost Money", color: "royalblue", bg_img: "lost money_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?money ?balance ?corruption</p>
<p>I spotted some ?money on the floor. Should I take it or just skip?</p>
<</event_passage>><<set $player_stats.corruption += 1>>
<<set $player_stats.money += random(3,6)*$current_loop.difficulty>>
<<goto "back">><<set $player_stats.balance += 1>>
<<goto "back">><<set $player_stats.stress +=1>>
<<goto "trip over">><<set _ecard to {title: "Tripped Over", color: "darkslategray", bg_img: "trip over_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?stress</p>
<p>Ouch! I tripped over. My butt hurts...</p>
<</event_passage>><<set $player_stats.arousal +=1>>
<<goto "lewd scene">><<set _ecard to {title: "Lewd Scene", color: "magenta", bg_img: "lewd scene_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?arousal</p>
<p>Oh, what is that in her butt? It's definitely a plug. Such a lewd scene... And hot!</p>
<</event_passage>><<set $related_phrase to 5*$current_loop.difficulty>>
<<run $related_phrase to Math.clamp($related_phrase, 0, $player_stats.money)>>
<<set $player_stats.money -= 5*$current_loop.difficulty>>
<<goto "pickpocket">><<set _ecard to {title: "Pickpocket", color: "brown", bg_img: "pickpocket_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?money</p>
<p>A passing by guy bumped into me. It wasn't too bad, so he just apologized and gone. In a while the realization hit me. The guy have just stolen <<print $related_phrase>>?money from me.</p>
<</event_passage>><<set $enemy to clone(setup.regular_enemies.random())>>
<<goto "regular enemy encounter">><<set _choices to [
{
text: "Release the Echo",
target: "event battle",
color: "darkred",
},
]>>
<<set _bg to $enemy.name+"_b.jpg">>
<<set _ecard to {title: $enemy.name, color: "darkred", bg_img: _bg}>>
<<event_passage _ecard _choices>>
<p>I bumped into $enemy.name. Seems like I have no other choice than to release it. And I can get some extra money from the echo.</p>
<</event_passage>><<set $player_stats.corruption += 1>>
<<set $player_stats.stress += 2>>
<<goto "spanked">><<set _ecard to {title: "Spanked", color: "brown", bg_img: "spanked_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?corruption ?stress</p>
<p>Something got stuck on my leg. I bent over to remove it when my butt got spanked. Ouch! I closed my eyes for a moment, and when I opened them I couldn't see anyone nearby.</p>
<</event_passage>><<set $player_stats.balance += 1>>
<<set $player_stats.arousal += 2>>
<<goto "a fall">><<set _ecard to {title: "A Fall", color: "brown", bg_img: "a fall_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p class="framed-icons">?balance ?arousal</p>
<p>A guy bumped into me. Something wrong with people here... However, the guy tried his best to catch me up, but failed. Now both of us are on the floor, he is on top of me, hand squeezing my chest. The guy turned red immediately, got up, apologized and ran off.</p>
<</event_passage>><<if $testing_subject_meeting>>
<<goto "testing subject 3">>
<<else>>
<<goto "testing subject 1">>
<</if>><<set $testing_subject_meeting to true>>
<<set _choices to [
{
text: "I'm a boy",
target: "testing subject 2",
color: "green",
},
{
disabled_text: "Not enough ?corruption",
text: "I'm a girl -?corruption",
target: "no testing subject",
color: "slateblue",
requirement: "corruption",
threshold: 1,
},
]>>
<<set _ecard to {title: "Lab Assistant", color: "deepskyblue", bg_img: "smart echo_b.jpg", fg_img: "smart echo.png"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?identity</p>
<p>When I was passing by a shy girl she asked about my gender.</p>
<p>"It's not common to ask this, you know?" You decided to act carefuly this time. It's about laboratory stuff, who knows what stuff they make there.
<p>"Sorry again, don't get me wrong, please." She tried to hide her eyes behind the glasses. "But I just need your biological gender. You know, our lab is looking for new testing subjects, we pay good money for that. Unfortunately, we need biological male subjects to test this new supplement."</p>
<p>"So why not telling that before asking about genders?" You smirked.</p>
<p>Her face became red even more.</p>
<p>"I'm sorry... I'm just an assistant..."</p>
<p>It seemes like she is about to burst into tears. It's better to answer something before it happened.</p>
<</event_passage>><<set $player_stats.identity -= 1>>
<<goto "testing subject 2">><<set $player_stats.identity += 1>>
<<set $player_stats.corruption -= 1>>
<<goto "no testing subject">><<set _ecard to {title: "Lab Assistant", color: "deepskyblue", bg_img: "smart echo_b.jpg", fg_img: "smart echo.png"}>>
<<event_passage _ecard setup.ok_choices>>
<p>"Oh, really? I mean... Maybe next time... Goodbye then."</p>
<br>
<p><i>"Lab Assistant" arc with this character comming soon. If you want it to happen sooner, vote for the character you like the most [[here|https://www.patreon.com/posts/character-106693649]]. It's free for all.</i></p>
<</event_passage>><<set _choices to [
{
text: "Next",
target: "testing subject 3",
color: "green",
},
]>>
<<set _ecard to {title: "Smart Coffee", color: "darkblue", bg_img: "smart coffee_b.jpg"}>>
<<event_passage _ecard _choices>>
<p>"It's good. I mean, it's good for us, not for you... Sorry! I mean maybe it's also good for you... I don't know... Maybe it's not..."</p>
<p>"You said something about the testing and the money?" I decided to save her this time.</p>
<p>"Oh, right! So, I have a new formula here with me. It's just a coffee, but with some special component that supposed to improve male's brain power."</p>
<p>"Yeah, like the label says." I mentioned. Finally something for males.</p>
<p>"Definetaly! "Smart Coffee" it is. However, formula isn't perfect yet, bcz it still has side effects. But don't worry, nothing dangerous to health."</p>
<</event_passage>><<set _choices to [
{
text: "Drink it",
target: "testing subject calc",
color: "green",
},
{
disabled_text: "Not enough ?balance",
text: "Change your mind -?balance",
target: "no smart coffee calc",
color: "slateblue",
requirement: "balance",
threshold: 1,
},
]>>
<<set _ecard to {title: "Smart Coffee", color: "darkblue", bg_img: "smart coffee_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?money ?stress ?arousal ?sub ?int ?fit ?att</p>
<p>"Let me explain the process. It's simple. You drink the coffee then describe me what you feel. After that you get at least <<print 5*$current_loop.difficulty>>?money, based on your intellegence. You know, the smarter you are the better feedback we get."</p>
<p>"Sounds good for me."</p>
<p>"So, here is your coffee, sir!" Assistant girl giggled. Her confidence seems increased.</p>
<p>I took the cup. I still had doubts, though. Should I really drink it for money?</p>
<</event_passage>><<set $player_stats.balance -= 1>>
<<goto "no testing subject">><<set $player_stats.bint += 1>>
<<set _dice to random(1,4)>>
<<if _dice is 1>>
<<set $player_stats.bsub += 1>>
<<set $player_stats.arousal += 2>>
<<set $related_phrase to "I also feel more... obedient. And seems like my, ehm, arousal increased. Not too much, but still...">>
<<elseif _dice is 2>>
<<set $player_stats.bint += 1>>
<<set $player_stats.stress += 2>>
<<set $related_phrase to "You know, this time it's all about brain. It's really a smart coffee. From the other hand, I feel a bit more worked out now...">>
<<elseif _dice is 3>>
<<set $player_stats.bfit += 1>>
<<set $player_stats.stress += 2>>
<<set $related_phrase to "I also feel stronger, cool. From the other hand, I feel a bit more worked out now...">>
<<else>>
<<set $player_stats.batt += 1>>
<<set $player_stats.arousal += 2>>
<<set $related_phrase to "I also feel more... attractive? And seems like my, ehm, arousal increased. Not too much, but still...">>
<</if>>
<<set $events.splice(4, 0, "feminization calc")>>
<<goto "testing subject">><<set _choices to [
{
text: "Next",
target: "testing subject final calc",
color: "green",
},
]>>
<<set _ecard to {title: "Lab Assistant", color: "deepskyblue", bg_img: "smart echo_b.jpg", fg_img: "smart echo.png"}>>
<<event_passage _ecard _choices>>
<p>"Do you feel something? Can you describe that?"</p>
<p>I took some more time to think about it, and then answered.</p>
<p>"I'm sure I got smarter." You said. The assistant marked something in her notebook. "$related_phrase And I feel something else that I can't describe, sorry."</p>
<p>"Don't worry, it's more than enough. Here is your <<print (5+$player_stats.int)*$current_loop.difficulty>>?money. We continue improving the formula, so next time I would ask you to try again. See you next time!"</p>
<br>
<p><i>"Lab Assistant" arc with this character comming soon. If you want it to happen sooner, vote for the character you like the most [[here|https://www.patreon.com/posts/character-106693649]]. It's free for all.</i></p>
<</event_passage>><<set $player_stats.money += (5+$player_stats.int)*$current_loop.difficulty>>
<<goto "back">><<if $real_man_meeting>>
<<goto "become a real man 3">>
<<else>>
<<goto "become a real man 1">>
<</if>><<set $real_man_meeting to true>>
<<set _choices to [
{
text: "Next",
target: "become a real man 2",
color: "green",
},
]>>
<<set _ecard to {title: "Real Man", color: "deepskyblue", bg_img: "Real Man_b.jpg", fg_img: "Real Man.png"}>>
<<event_passage _ecard _choices>>
<p>"Hey! Hey you! Do you want to become a real man?" A cute girl got closer and asked again. "Sorry, but do you want to become a real man like me?"</p>
<p>"Ehm..." I explored the girl, from top to bottom. "What?"</p>
<p>"Ok, let me explain. You know, in the past, I wasn`t as manly as I am now. People often mistook me for a girl." I got it, it's a boy... "Some even mocked me for my look.
They called me "femboy", "sissy", and some other words that I didn`t even know the meaning. And one day I decided to change that!"
His posture has become more confident.</p><p>"I decided to become a real man!"</p>
<</event_passage>><<set _choices to [
{
text: "Next",
target: "become a real man 3",
color: "green",
},
]>>
<<set _ecard to {title: "Real Man", color: "deepskyblue", bg_img: "Real Man_b.jpg", fg_img: "Real Man.png"}>>
<<event_passage _ecard _choices>>
<p>"I see..." Still confused you continued to listen to his story.</p>
<p>"So I went to the gym, I found the strongest guy there, and I told him that I can do anything he wants to become as strong and masculine as he is.
And look at me now." I looked at his body, it was still cute and maybe even hot, just like a minute ago. "Yeah, I got bigger already! Thanks to him and the time spent in training.
My legs, hips, glutes, all my bottom part is quite big and strong now! The guy from the gym said that it will take some time to improve the top part, though.
But there is a shortcut. If I take these hyper-masculine supplements I can become stronger in no time. One moment, let me show you."</p>
<</event_passage>><<set _choices to [
{
text: "Become a real man",
target: "become a real man calc",
color: "green",
},
{
disabled_text: "Not enough ?balance",
text: "Not interested -?balance",
target: "no become a real man calc",
color: "slateblue",
requirement: "balance",
threshold: 1,
},
]>>
<<set _ecard to {title: "Pink Supplements", color: "purple", bg_img: "pink coffee_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?stress ?fit</p>
<p>The "real man" showed me a pink cup with some liquid inside. "Cute! Don't you think?"</p>
<p>"Ehm... Yes... So what do you want from me?" You asked.</p>
<p>The boy took your hand. "I'm a little worried to take it. So I want you to try it with me, if you don't mind. It's always better doing something together, don't you think?
And I can see that you also want to become stronger. It's said that you get stronger within a few minutes. Visual effect takes place after a while. So what do you think?"</p>
<p> It would be hard to reject such a cute face...</p>
<</event_passage>><<set $player_stats.bfit += 1>>
<<set $player_stats.stress -= 3>>
<<set $events.splice(4, 0, "feminization calc")>>
<<goto "become a real man">><<set $player_stats.balance -= 1>>
<<goto "no become a real man">><<set _choices to [
{
text: "Next",
target: "back",
color: "green",
},
]>>
<<set _ecard to {title: "Real Man", color: "deepskyblue", bg_img: "Real Man_b.jpg", fg_img: "Real Man 2.png"}>>
<<event_passage _ecard _choices>>
<p>"Cool! Here, take it." The boy gave me the pink bottle. "Now let's drink it straight to the bottom!"</p>
<p> Both of us started to drink. It was sweet and quite tasty. And as the label said, I started to feel the power almost instantly.</p>
<p> When we finished cute thing infront of me stuck out his tong, waiting for me to tell something.</p>
<p>"Ehm... Good boy." You said.</p>
<p>His eyes flashed. "Do you really think? Thank you so much! It's so cool to hear "boy" from someone, you can't imagine! Seems like it's really working. And I'm already feeling the energy, so I better go and do some more squats. Cya next time!"</p>
<br>
<p><i>"The Real Man" arc with this character coming soon. If you want it to happen sooner, vote for the character you like the most [[here|https://www.patreon.com/posts/character-106693649]]. It's free for all.</i></p>
<</event_passage>><<set _choices to [
{
text: "Next",
target: "back",
color: "green",
},
]>>
<<set _ecard to {title: "Real Man", color: "deepskyblue", bg_img: "Real Man_b.jpg", fg_img: "Real Man.png"}>>
<<event_passage _ecard _choices>>
<p>"Eh... So..." Cute face of the real man became sad for a moment, and then back to normal. "Maybe next time then? You seem to be a good person, I would really like to spend some time with you! Cya!"</p>
<br>
<p><i>"The Real Man" arc with this character comming soon. If you want it to happen sooner, vote for the character you like the most [[here|https://www.patreon.com/posts/character-106693649]]. It's free for all.</i></p>
<</event_passage>>
/* TODO add link to poll */<<set _current_clothing to Object.keys(setup.all_styles).shuffle()
.map(clty => $player_equipment[clty]).reduce((ans, cur) => ans.fem < cur.fem ? ans : cur)>>
<<set $old_item to clone(_current_clothing)>>
<<set _matching_clothes to setup.all_styles[_current_clothing.place]
.filter(item => item.fem gt _current_clothing.fem and item.id gt 0 and item.id neq $old_item.id)>>
<<if _matching_clothes.length is 0>>
<<goto "back">>
<<else>>
<<set $loot to clone(_matching_clothes.random())>>
<<goto "great stylist 1">>
<</if>><<set _choices to [
{
text: "Shut up and wait",
target: "stylist makeup calc",
color: "green",
},
{
disabled_text: "Not enough ?balance",
text: "Run away -?balance",
target: "run away calc",
color: "gray",
requirement: "balance",
threshold: 1,
},
]>>
<<set _ecard to {title: "The Great Stylist", color: "purple", bg_img: "stylist echo_b.jpg", fg_img: "stylist echo.png"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?identity ?fem ?stress ?att</p>
<p>"Omg... Darling, what happened to your $old_item.name?" Quite handsome and hyper stylish guy examines my look.</p>
<p>"Nothing. Why?"</p>
<p>The guy was definitely caught off guard by my question. "You ask why? Girl, don't you want men to fight for you? Don't you want to see them kneel before your beauty?"</p>
<p>"I'm not a g..."</p>
<p>"I don't want to hear your excuses. Every single woman wants to become more beautiful and desired, no matter how deep she borrowed these feelings." He took some tools from his bag and said in a joking tone. "So just shut up and let the Great Stylist do his job."</p>
<</event_passage>><<set $player_stats.balance -= 1>>
<<set $player_stats.stress += 1>>
<<goto "back">><<set $old_item to clone($player_equipment[$loot.place])>>
<<set $player_equipment[$loot.place] to clone($loot)>>
<<set $player_stats.batt += 2>>
<<set $player_stats.identity += 1>>
<<set $player_stats.stress -= 2>>
<<if $great_stylist_meeting>>
<<goto "great stylist result">>
<<else>>
<<goto "great stylist 2">>
<</if>><<set $great_stylist_meeting to true>>
<<set _choices to [
{
text: "Next",
target: "great stylist 3",
color: "green",
},
]>>
<<set _ecard to {title: "The Great Stylist", color: "purple", bg_img: "stylist echo_b.jpg", fg_img: "stylist echo.png"}>>
<<event_passage _ecard _choices>>
<p> Every single stylist's move was so precise and confident that my doubts about his "greatness" were dispelled. However, I decided to ask him why he called himself "The Great Stylist".</p>
<p> "Asking again? Darling, you're a bit out of place here, you know." The man answered without the actual answer.</p>
<p> "What do you mean? Here?"</p>
<p> "I mean here, in the loop." Suprised, I suddenly moved, but his gentle hand guided me back to the position stylist needed to continue. "Usually people try to stay neutral and just fit in. But you are not the same. Girl, you really are special."</p>
<p>You couldn't hold any longer.</p>
<p>"Do you know that we are in the loop?"</p>
<</event_passage>><<set _choices to [
{
text: "Next",
target: "great stylist result",
color: "green",
},
]>>
<<set _ecard to {title: "The Great Stylist", color: "purple", bg_img: "stylist echo_b.jpg", fg_img: "stylist echo.png"}>>
<<event_passage _ecard _choices>>
<p>"Yes, sure." He smiled. "Don't be so suprised, or you get wrinkles on your cute forehead. You can find many people here who knows where are they are, or at least starting to understand that. Moreover, some of us are able to move freely between the different loops."</p>
<p>You couldn't believe that there are other people who know everything.</p>
<p>"But tell you, darling, it's the best place in the world. You can try everything you want, you can go wherever you want, and so on. The freedom at its very core." Then the great stylist added. "If you know what to do."</p>
<p>"What should I do?"</p>
<p>"At first, start asking yourself rather than people in the loop. And maybe then you get the answer." He stepped back. "We are done!"</p>
<</event_passage>><<set _ecard to {title: "The Great Stylist", color: "purple", bg_img: "stylist echo_b.jpg", fg_img: "stylist echo.png"}>>
<<event_passage _ecard setup.ok_choices>>
<p>You can see freshly made $loot.name in the mirror.</p>
<<equip_tf $old_item $loot>>
<p>"And it's time to say goodbye! I'm out of time." He said and put all the tools back into his bag.</p>
<p>"Wait, but I have so many questions to ask..."</p>
<p>"Don't worry, I believe a girl like you can find all the answers herself." With these words the great stylist has gone.</p>
<br>
<p><i>"The Great Stylist" arc with this character comming soon. If you want it to happen sooner, vote for the character you like the most [[here|https://www.patreon.com/posts/character-106693649]]. It's free for all.</i></p>
<</event_passage>>
/* TODO add link to poll */<<set $enemy to {name: "Well-Dressed Echo", style: "formal", gender:"male", power_rate: 2}>>
<<set $player_stats.identity to $player_stats.fem>>
<<if $player_stats.identity gte 10>>
<<set $current_loop.max_identity to true>>
<</if>>
<<goto "full identity">><<set _choices to [
{
text: "Take Heavy Dose",
target: "take heavy dose calc",
color: "hotpink",
},
{
disabled_text: "Not enough ?corruption",
text: "Show him how girly you actually are -2?corruption",
target: "full identity sex calc",
color: "red",
requirement: "corruption",
threshold: 2,
},
{
disabled_text: "Not enough ?balance",
text: "Release Echo -?balance",
target: "fight for balance",
color: "slateblue",
requirement: "balance",
threshold: 1,
},
]>>
<<set _ecard to {title: "Estrogen", color: "hotpink", bg_img: "estrogen_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?money ?identity ?arousal</p>
<p><<print $enemy.name>> blocked my way.</p>
<p>"Darling, if you're so desperate to be a girl, why don't you take these tablets? Sooth to say, the duty of every individual is to help society to improve. So I can't let you go without a heavy dose of these "improvements"."</p>
<p>For some reason his words hit me really deep, and my ?identity has become the same as my ?fem. However, I still need to choose what to do. These tablets will improve all my skills and will also help to relax a bit. So it doesn't seem too bad.</p>
<p>If I decide to release him, I should be ready for a tough session.</p>
<</event_passage>><<set $player_stats.corruption -= 2>>
<<set $player_stats.money += (10+$player_stats.fem+$player_stats.att)*$current_loop.difficulty>>
<<set $player_stats.batt += 2>>
<<set $player_stats.bsub += 2>>
<<set $player_stats.identity += 3>>
<<set $player_stats.stress -= 2>>
<<if $player_stats.arousal gte 4>>
<<set $player_stats.arousal to 0>>
<<set $player_stats.corruption += 1>>
<<set $player_stats.identity += 2>>
<<set $related_phrase to "I told the $enemy.name that he can use me anyway he wants, but no pills. So he used me quite hard, like I'm a complete whore. It took us just a few minutes untill we came. Then the echo thanked me and gave me my payment.">>
<<else>>
<<set $player_stats.arousal += 4>>
<<set $related_phrase to "I told the $enemy.name that he can use me anyway he wants, but no pills. So he used me quite hard, like I'm a complete whore. It took him just a few minutes untill he came. Then the echo thanked me and gave me the payment I deserved and left me with my raised arousal.">>
<</if>>
<<goto "full identity sex">><<if $player_equipment.body.id gt 8>>
<<set _scene to "hardcore futa_b.jpg">>
<<else>>
<<set _scene to "hardcore trap_b.jpg">>
<</if>>
<<set _ecard to {title: "Hardcore Sex", color: "darkred", bg_img: _scene}>>
<<event_passage _ecard setup.ok_choices>>
<p>$related_phrase</p>
<</event_passage>><<set $player_stats.bfit += 1>>
<<set $player_stats.batt += 1>>
<<set $player_stats.bsub += 1>>
<<set $player_stats.bint += 1>>
<<set $player_stats.stress -= 3>>
<<set $player_stats.arousal -= 3>>
<<set $events.splice(3, 0, "feminization calc")>>
<<set $events.splice(6, 0, "feminization calc")>>
<<set $events.splice(9, 0, "feminization calc")>>
<<goto "back">><<set $player_stats.balance -= 1>>
<<goto "event battle">><<set _choices to [
{
disabled_text: "Not enough ?balance",
text: "Hold On -?balance",
target: "hold on calc",
color: "slateblue",
requirement: "balance",
threshold: 1,
},
{
text: "Pass Out",
target: "pass out calc",
color: "red",
},
]>>
<<set _ecard to {title: "Passing Out", color: "brown", bg_img: "Passing Out_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?money ?identity ?fem ?stress</p>
<p>I... think... I'm passing out...</p>
<</event_passage>><<set _choices to [
{
disabled_text: "Not enough ?corruption",
text: "Calm Down -?corruption",
target: "calm down calc",
color: "blueviolet",
requirement: "corruption",
threshold: 1,
},
{
text: "Pass Out",
target: "pass out calc",
color: "red",
},
]>>
<<set _ecard to {title: "Passing Out", color: "brown", bg_img: "Passing Out_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?money ?identity ?fem ?arousal</p>
<p>I... think... I'm passing out...</p>
<</event_passage>><<set $player_stats.balance -= 1>>
<<set $player_stats.stress -= 1>>
<<goto "back">><<set $player_stats.corruption -= 1>>
<<set $player_stats.arousal -= 1>>
<<goto "back">><<if $player_stats.stress gte 10>>
<<set $player_stats.stress to 5>>
<<set $related_phrase to "I feel that my stress is much lower now. After passing out right on the floor, strange.">>
<<set $old_item to clone($player_equipment.body)>>
<<set _body_num to $player_equipment.body.id+1>>
<<set _body_num to Math.clamp(_body_num, 0, setup.all_body.body.length-1)>>
<<set $player_equipment.body to clone(setup.all_body.body[_body_num])>>
<<set $loot to clone($player_equipment.body)>>
<<elseif $player_stats.arousal gte 10>>
<<set $player_stats.arousal to 5>>
<<set $related_phrase to "My arousal is lower now. Seems like I had some wet dreams. What is strange that my undies are clean.">>
<<set _random_feminization to ["nails", "hair", "face", "penis"].random()>>
<<set $old_item to clone($player_equipment[_random_feminization])>>
<<if _random_feminization is "penis">>
<<set _body_num to $player_equipment[_random_feminization].id-1>>
<<else>>
<<set _body_num to $player_equipment[_random_feminization].id+1>>
<</if>>
<<set _body_num to Math.clamp(_body_num, 0, setup.all_body[_random_feminization].length-1)>>
<<set $player_equipment[_random_feminization] to clone(setup.all_body[_random_feminization][_body_num])>>
<<set $loot to clone($player_equipment[_random_feminization])>>
<</if>>
<<set $player_stats.identity += 1>>
<<set $player_stats.money -= 10*$current_loop.difficulty>>
<<goto "passed out">><<set _ecard to {title: "Feminization", color: "magenta", bg_img: "Feminization_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p>I woke up. $related_phrase.</p>
<p>But it's not the weirdest thing. Even the fact that I lost <<print 10*$current_loop.difficulty>>?money isn't suprising. It's quite expected actually.</p>
<p>The weirdest thing is that my body has changed. The images of girls in fancy clothes are still flashing in my head. I got feminized!</p>
<p>Now I have <<print $loot.name>>.</p>
<<equip_tf $old_item $loot>>
<</event_passage>><<set $player_stats.balance -= 6>>
<<if $player_stats.bal_cards lt 3>>
<<set $player_stats.bal_cards += 1>>
<<set $player_stats.bal_cards to Math.clamp($player_stats.bal_cards, 1, 3)>>
<<set $loot to clone(setup.balance_cards[$player_stats.bal_cards-1])>>
<<set $related_phrase to "My ?balance was high enough to realize that I can use the power of $loot.name if I really need to release the echo.">>
<<else>>
<<set $player_stats.money += 10*$current_loop.difficulty>>
<<set $player_stats.bint += 1>>
<<set $player_stats.bfit += 1>>
<<set $loot to {title: "Bonus", color: "deepskyblue", bg_img: "lost money_b.jpg"}>>
<<set $related_phrase to "My ?balance was high enough to make me stronger and even get some extra ?money.">>
<</if>>
<<goto "full karma">><<set $player_stats.corruption -= 6>>
<<if $player_stats.cor_cards lt 3>>
<<set $player_stats.cor_cards += 1>>
<<set $player_stats.cor_cards to Math.clamp($player_stats.cor_cards, 1, 3)>>
<<set $loot to clone(setup.corruption_cards[$player_stats.cor_cards-1])>>
<<set $related_phrase to "My ?corruption was high enough to realize that I can use the power of $loot.name if I really need to release the echo.">>
<<else>>
<<set $player_stats.money += 10*$current_loop.difficulty>>
<<set $player_stats.batt += 1>>
<<set $player_stats.bsub += 1>>
<<set $loot to {title: "Bonus", color: "deepskyblue", bg_img: "lost money_b.jpg"}>>
<<set $related_phrase to "My ?corruption was high enough to make me stronger and even get some extra ?money.">>
<</if>>
<<goto "full karma">><<event_passage $loot setup.ok_choices>>
<p>$related_phrase</p>
<</event_passage>>
/* INTRODUCTION start */<<set $charview to 3>>
<<set _choices to [
{
text: "Next",
target: "introduction 2",
color: "green",
},
]>>
<<set _ecard to {title: "Naked", color: "darkblue", bg_img: "naked_b.jpg"}>>
<<event_passage _ecard _choices>>
<p>I woke up in unfamiliar place fully naked... I didn't remember who I am and what happened to me.</p>
<p>I noticed a screen on the wall telling what to do next</p>
<p>"Hello! I know that you don't remember a thing. But don't you worry. At first, let's find something to cover you up. Go to the next room."</p>
<p>Ok, it wasn't a bad idea. And anyway I have no other ideas. Let's go.</p>
<</event_passage>><<set _choices to [
{
text: "Next",
target: "introduction 3",
color: "green",
},
]>>
<<set _ecard to {title: "Drawer", color: "hotpink", bg_img: "drawer_b.jpg"}>>
<<event_passage _ecard _choices>>
<p>"What are you waiting for? Open the drawer and try to find something. Don't you worry, fluf, no one will ever find out that you borrowed something from there."</p>
<</event_passage>><<set _ecard to clone(setup.all_clothes.undies[12])>>
<<run $inv.push(clone(_ecard))>>
<<set _choices to [
{
text: "Next",
target: "introduction 4",
color: "green",
},
]>>
<<event_passage _ecard _choices>>
<p>I managed to find only red panties with the heart on the groin area. It's still better than walking naked.</p>
<p> However, for some weird reason I couldn't wear them. My body just didn't want to do it. Let's check what the screen got to say.</p>
<p>"Yes, you can't wear this cute panties no matter how hard you try. It's because the loop is blocking you from doing that. Just move to the next room, there you can finally wear the panties, as you always wanted."</p>
<p>Loop? What is this person talking about?</p>
<</event_passage>><<set _choices to [
{
text: "Put on the panties, then continue",
target: "introduction 5",
color: "red",
},
]>>
<<set _ecard to {title: "Changing Room", color: "hotpink", bg_img: "women changing room_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?changing_room</p>
<p>"Do you see this icon? If you see such icon in the room that means you can change here.
So you can open your inventory now and wear the panties."</p>
<br>
<p><i>You can open inventory on the left sidebar. To wear an item just click the item you want and then click your current item to swap them.</i></p>
<</event_passage>><<if $player_equipment.undies.id lte 0>>
<<goto "introduction 4">>
<</if>>
<<set _choices to [
{
text: "Next",
target: "introduction 6",
color: "green",
},
]>>
<<set _ecard to {title: "Half Naked", color: "darkblue", bg_img: "half naked_b.jpg"}>>
<<event_passage _ecard _choices>>
<p>"You look adorable in this panties!"</p>
<p>Do they really see me or it's just a setup? I don't see any cameras here...</p>
<p>"Now let's try to make some cash. After all, we saved you, but it costed us a lot. I would like to let you go without paying, fluf. By SIFA company can't save everyone for free, you know."</p>
Oh, great, the debt. I don't event know what happened.
<p> "Your debt is 3000?money in total. But don't you worry, we decided to let you work on it step by step, without pushing yourself too much. 100?money is your first payment. We expect you to pay it after your first loop."</p>
<p>Ok, doesn't sound too much, to be honest.</p>
<p>"Now let's try to earn some cash. Go to the next room."</p>
<</event_passage>><<set _choices to [
{
text: "Relax at the bar",
target: "introduction 7",
color: "green",
},
{
disabled_text: "Not enough ?balance",
text: "Bartender Shift -?balance",
target: "bartender shift calc",
color: "gold",
requirement: "balance",
threshold: 1,
},
]>>
<<set _ecard to {title: "Striptease Bar", color: "blueviolet", bg_img: "striptease bar_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?money ?balance ?stress</p>
<p>Oh no! It's definetaly a striptease bar. Don't tell me they gonna force me to dance in this panties for strangers. I'm not a bitch boy or something...</p>
<p>"I could imagine what thoughts you have at the moment, heh. But I keep telling you - don't worry, it's not so bad. You can work here as a bartender, for example. And you fit in just well, heh."</p>
<p>But it doesn't change the fact that I need to work in striptease bar... I think I have no choice anyway...</p>
<p>"But at first, you need to get some balance ?balance points. I think you already mentioned this icon in the room. That means that the room is connected to balance somehow. Try to spend some time at the bar. This time it's free."</p>
<</event_passage>><<set $player_stats.balance += 1>>
<<set _choices to [
{
disabled_text: "Not enough ?money",
text: "Relax at the bar -5?money",
target: "introduction 7",
color: "green",
requirement: "money",
threshold: 5,
},
{
disabled_text: "Not enough ?balance",
text: "Bartender Shift -?balance",
target: "introduction 8 calc",
color: "orange",
requirement: "balance",
threshold: 1,
},
]>>
<<set _ecard to {title: "Striptease Bar", color: "blueviolet", bg_img: "striptease bar_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?money ?balance ?stress</p>
<p>After some time at the bar you felt something changed. Now you can work here.</p>
<p>"Now you can spend your ?balance point to get some cash here."</p>
<</event_passage>><<set $player_stats.money += 10>>
<<set $player_stats.balance -= 1>>
<<set $player_stats.stress += 2>>
<<goto "introduction 8">><<set _choices to [
{
text: "Look for the next message",
target: "introduction 9",
color: "green",
},
]>>
<<set _ecard to {title: "Bartender Shift", color: "orange", bg_img: "bartender_b.jpg"}>>
<<event_passage _ecard _choices>>
<p class="framed-icons">?money ?balance</p>
<p>I spent some time at the bar, but this time I was the bartender myself. I can't say it was hard. But doing in half naked is still quite stressful.</p>
<</event_passage>><<set $enemy to clone(setup.regular_enemies[1])>>
<<run $back.push("introduction 10")>>
<<set $current_loop to {
difficulty: 1,
}>>
<<set _choices to [
{
text: "Release the Echo",
target: "event battle",
color: "darkred",
},
]>>
<<set _ecard to {title: "Gross Echo", color: "darkred", bg_img: "gross echo_b.jpg"}>>
<<event_passage _ecard _choices>>
<p>I were looking for the next message when a fat guy started following me. Thanks god I found the message.</p>
<p>"Now you can start to worry, fluf. You are followed by the echo. We call people like the one following you "echoes", because they are not real people. It's like a ghost, just a trace of a real human being stuck in the loop."</p>
<p>A ghost? What is going on??</p>
<p>"But again, no need to panic. You can release them. To make it possible, you need to bring them to emotions, anyway you want. You have some initial actions to perform, I think it's enough for now. Later you will learn more actions. Remember that each action has different impact on you. Some make you aroused, some increase your stress, and so on."</p>
<</event_passage>><<run $player_deck.push(setup.action_cards[6])>>
<<unset $current_loop>>
<<set _choices to [
{
text: "Start the real game",
target: "loop selection",
color: "green",
},
]>>
<<event_passage setup.action_cards[6] _choices>>
<p>"You are so cool, fluf! You will become a great echo hunter! You know what? I gonna teach you a new skill right now. It's called respite."</p>
<p>I spent some time learning new skill.</p>
<p>"Now you are ready for a real game to start. Just remember what you've learned. And remember about the first payment. Good luck!"</p>
<</event_passage>>
/* INTRODUCTION end */<<set $player_stats.arousal += 2>>
<<set _non_max_tf to []>>
<<for _part range Object.keys(setup.all_body)>>
<<if _part is "penis" and $player_equipment[_part].id gt 0>>
<<set _non_max_tf.push(_part)>>
<<elseif $player_equipment[_part].id lt setup.all_body[_part].length - 1>>
<<set _non_max_tf.push(_part)>>
<</if>>
<</for>>
<<if _non_max_tf.length is 0>>
/* player has max fem body in all categories... */
<<goto "back">>
<</if>>
/* weight by # TFs remaining per category */
<<set _weights to _non_max_tf.map(p => {
if(p === "penis") {
return $player_equipment[p].id;
} else {
return setup.all_body[p].length - 1 - $player_equipment[p].id;
}
})>>
<<set _random_feminization to _non_max_tf[alias_sampler(_weights)()]>>
<<set $old_item to clone($player_equipment[_random_feminization])>>
<<if _random_feminization is "penis">>
<<set _body_num to $player_equipment[_random_feminization].id-1>>
<<else>>
<<set _body_num to $player_equipment[_random_feminization].id+1>>
<</if>>
<<set _body_num to Math.clamp(_body_num, 0, setup.all_body[_random_feminization].length-1)>>
<<set $player_equipment[_random_feminization] to clone(setup.all_body[_random_feminization][_body_num])>>
<<set $loot to clone($player_equipment[_random_feminization])>>
<<switch _random_feminization>>
<<case "penis">>
<<set $related_phrase to "Oh no, my penis has shrunk!">>
<<case "face">>
<<set $related_phrase to "My face has changed. It's even more feminine now.">>
<<case "nails">>
<<set $related_phrase to "My nails have become longer. Not a big deal.">>
<<case "hair">>
<<set $related_phrase to "My hair has grown.">>
<<default>>
<<set $related_phrase to "Something happened to my body.">>
<</switch>>
<<goto "feminization">><<set _ecard to {title: "Feminization", color: "magenta", bg_img: "Feminization_b.jpg"}>>
<<event_passage _ecard setup.ok_choices>>
<p>$related_phrase But what caused this to happen?</p>
<p>Now I have <<print $loot.name>>.</p>
<<equip_tf $old_item $loot>>
<</event_passage>><<set _choices to [
{
text: "Clear your mind",
target: "remove card selection",
color: "royalblue",
},
{
text: "Move on",
target: "back",
color: "grey",
},
]>>
<<set _ecard to {title: "Meditation", color: "cyan", bg_img: "yoga_b.jpg"}>>
<<event_passage _ecard _choices>>
/* TODO icon for cards... */
<p>I wandered into an empty room filled with yoga mats. It's unusually calm here...
Maybe I could take a break and clear my head.
A little bit of extra focus would probably help me deal with these echoes more effectively...</p>
<</event_passage>><p>You can remove an action card from your deck here.</p>
<div class="flexbuttons">
<button data-passage="back" class="btn">On second thought, keep my deck as is.</button>
</div>
<div id="deck-inv" class="grid5col">
<<for _idx, _card range $player_deck>><<capture _idx _card>>
<<link "<<action_card _card>>">>
<<set _rm_idx to _idx>>
<<run Dialog.setup("Forget this card?", "autoanim");
Dialog.wiki(Story.get("remove card confirm").processText());
Dialog.open();>>
<</link>>
<</capture>><</for>>
</div><<set _rm_card to $player_deck[_rm_idx]>>
<<action_card _rm_card notilt>>
<div class="flexbuttons">
<<button "Keep it.">><<run Dialog.close()>><</button>>
<<button "Forget it!" "back">>
<<run $player_deck.splice(_rm_idx, 1)>>
<<run Dialog.close()>>
<</button>>
</div>
<<done>>
<<addclass "#ui-dialog-body button" "btn">>
<<addclass "#ui-dialog-body button:nth-child(2)" "btn-red">>
<</done>>[[test starting page]]<br>
[[back]][[back]]<br>
[[battle pre calc][$back.push("battle end test"); $enemy to setup.regular_enemies.random()]]
<<set $newactions ??= setup.action_cards.randomMany(5)>>
<<set _cards to []>>
<<for _c = 0; _c < 5; ++_c>>
<<set _stats to {sub: 0, int: 0, fit: 0, att: 0}>>
<<for _s = 0; _s < _c + 1; ++_s>>
<<set _stats[Object.keys(_stats).random()]++>>
<</for>>
<<run _cards.push({
/* copied the last one from a Mozilla example lol */
background: ["#6A0000", "#2E3192", "#8F006D", "#176320", "radial-gradient(#e66465, #9198e5)"][_c],
name: "Longer Card Title " + _c,
mana_cost: _stats,
img: "complain_b.jpg",
power: 5 * (_c - 1) + 1,
stat_effects: {obedience: 3 - _c},
description: "Everything is possible, <em>nothing is free.</em>",
rarity_text: ["common", "rare", "epic", "legendary"][(_c + 1) % 4],
})>>
<</for>>
<<set _cards[1].description to "It is useful to test what happens with really long descriptions because overflow behavior can be annoying.">>
<<set _cards[2].description to '<span style="font-size: .5em">Yo dawg, I heard you like cards in cards </span><div class="dumbdescr" style="transform: translateZ(5px)"><<action_card _cards[0]>></div>'>>
<div class="grid3col">
<<for _card range _cards.slice(1, 4)>>
<<action_card _card>>
<</for>>
</div>
<p>The following cards were randomly picked at start and *should* stay the same on save/load/passage navigation</p>
<div class="grid5col">
<<for _card range $newactions>>
<<action_card _card>>
<</for>>
</div>
<p>Here are all the obtainable cards:</p>
<div class="grid5col">
<<for _card range setup.action_cards>>
<<action_card _card>>
<</for>>
</div>
<p>Here are the ?balance cards:</p>
<div class="grid5col">
<<for _card range setup.balance_cards>>
<<action_card _card>>
<</for>>
</div>
<p>And the ?corruption cards</p>
<div class="grid5col">
<<for _card range setup.corruption_cards>>
<<action_card _card>>
<</for>>
</div>
/*
<div class="grid5col">
<<for _card range _cards>>
<<action_card _card>>
<</for>>
</div>
<br>
<div class="cards10" style="gap: 0.5%">
<<for _card range _cards>>
<<action_card _card>>
<</for>>
<<for _card range _cards>>
<<action_card _card>>
<</for>>
</div>
*//* assuming an $enemy is set already... */
<<run $back.push("post event battle")>>
<<goto "battle pre calc">><<set _winnings to 10 * $current_loop.difficulty>>
<<if $battle_won>>
/* TODO better victory (& maybe loss) image */
<<set _ecard to {title: "You won!", color: "deepskyblue", bg_img: "lost money_b.jpg"}>>
<<set $player_stats.money += _winnings>>
<<set _passage to "You managed to release the echo. It left behind " + _winnings + " ?money, neat!">>
<<else>>
<<set $player_stats.money -= _winnings/2>>
<<set _ecard to {title: "You lost!", color: "brown", bg_img: "Passing Out_b.jpg"}>>
<<set _passage to "You lost. While you were passed out, the echo rummaged through your wallet and stole " + (_winnings / 2) + " ?money from you.">>
<</if>>
<<event_passage _ecard setup.ok_choices>>
<p>_passage</p>
<</event_passage>><<unset $battle_won>>
/* Mana setup; copy from stats */
<<set $mana to {}>>
<<for _sifa range setup.SIFA>>
<<set $mana[_sifa] to $player_stats[_sifa]>>
<</for>>
/* Player deck setup */
<<for _card range $player_deck>>
<<set _card.power_modifier to 0>>
<<set _card.turn_power to 0>>
<</for>>
<<set $temp_deck to clone($player_deck).shuffle()>>
<<set $player_hand to $temp_deck.splice(0, 5)>>
<<set $bal_deck to setup.balance_cards.slice(0, $player_stats.bal_cards)>>
<<set $cor_deck to setup.corruption_cards.slice(0, $player_stats.cor_cards)>>
<<set $next_power_multiplier to 0>>
<<set $next_power_addition to 0>>
<<unset $draw_filter>>
/* Enemy setup. TODO properties from something in setup */
<<set $enemy_power to Math.round(($enemy?.power_rate ?? 1) * 24 * ($current_loop.difficulty+($current_loop.difficulty-1)))>>
<<goto "battle page">>/* <p>debug: Go back to <code><<print $back.at(-1)>></code>
by [[winning|back][$battle_won to true]] or [[losing|back][$battle_won to false]]</p> */
<div id="battlediv">
<<include "battle page incl">>
</div>/*
<p>Power target: $enemy_power</p>
<p>all stats: <code style="overflow-wrap: break-word;"><<print JSON.stringify($player_stats.plain_obj)>></code></p>
<p>mana:
<<for _type, _amt range $mana>>
_amt <<print "?" + _type>>,
<</for>>
</p>
<p>bonus add'n: $next_power_addition; bonus mult: $next_power_multiplier</p>
<p>total hand size: $player_hand.length</p>
your hand: <br>
*/
<<set $draw_front to 0>>
<<set $draw_back to 0>>
<<set _top_of_hand to $player_hand.slice(0, 5)>>
<<for _card range _top_of_hand>>
<<run _card.run_pre_play()>>
<</for>>
<<run $bal_deck[0]?.run_pre_play()>>
<<run $cor_deck[0]?.run_pre_play()>>
<<set _playable to _top_of_hand.map(c => c.is_playable)>>
<<set _hand_count to _playable.reduce((acc, cur) => acc + Number(cur), 0)>>
<div class="grid3col" style="gap: 1em; align-items: center; margin-bottom: auto;">
<div class="flexdown" style="width: 80%; margin: auto;">
<<statbar "balance">>
<<if $bal_deck[0]?.is_playable>>
<<playable_action $bal_deck 0>>
<<else>>
/* TODO will require keeping track of the last one if more cards get introduced... */
<<set _thecard to $bal_deck[0] ?? setup.balance_cards[$player_stats.bal_cards - 1]>>
<<action_card _thecard disabled notilt>>
<</if>>
</div>
<div class="flexdown">
<div class="imgstack js-tilt">
<<set _ecard to {
title: $enemy.name,
color: "blue", /* TODO ??? */
bg_img: $enemy.image, /* TODO probably pointing in the wrong dir */
}>>
<<event_card _ecard>>
<span class="enemyhptxt">$enemy_power</span>
</div>
<<if _hand_count lt 5>>
<button class="btn" data-passage="back" data-setter="$battle_won to false">Give up?</button>
<</if>>
<<sifa_stats $mana>>
</div>
<div class="flexdown" style="width: 80%; margin: auto;">
<<statbar "corruption">>
<<if $cor_deck[0]?.is_playable>>
<<playable_action $cor_deck 0>>
<<else>>
/* TODO will require keeping track of the last one if more cards get introduced... */
<<set _thecard to $cor_deck[0] ?? setup.corruption_cards[$player_stats.cor_cards - 1]>>
<<action_card _thecard disabled notilt>>
<</if>>
</div>
</div>
<div class="grid5col playerhandbg">
<<for _idx, _card range _top_of_hand>>
<<if _playable[_idx]>>
<<playable_action $player_hand _idx>>
<<else>>
<<action_card _card disabled>>
<</if>>
<</for>>
<<if _top_of_hand.length is 0>>
<p class="gridfilltxt">You've ran out of cards!</p>
<</if>>
</div>
<<done>><<run setup.activate_tilt()>><</done>><p>
<<if $battle_won>>
Congrats, you won!
<<else>>
Oh no, you lost...
<</if>>
</p>
[[back]] * [[Try again?|battle pre calc][$back.push(passage())]]