:: abduction_basement_scripts[script]
setup.consumables ??= {};

setup.consumables.abductionBread = {
	type: 'meal',
	time: 10,
	hunger: 25,
	energy: 0.7,
	thirst: Infinity,
	price: 0,
	costItems:[],
	repeat: 'direct',
	image:  'locations/shared/abduction/driedbread1.jpg',
	desc: "You eat the dried bread. It tastes awfully, but at least it fills your stomach."
}

:: abduction_basement[private indoors]
	<<image "locations/shared/abduction/basement#.jpg" 1 2>>
	<p>
		You're in a dark basement that has only one window and some lights.
		You're chained to the wall like a dog, a collar wrapped tightly around your neck while cold metal shackles dig painfully into your wrists and ankles.
		You can only move a few meters from the wall to reach several things left for you by your captors.
	</p>

	<p>
		There are some water bottles and dried food beneath your bed.
		A half broken, dirty mirror provides some means to inspect your appearance.
		In the corner is something remotely similar to a shower. It only has cold water though.
	</p>

	<p>
		You could sleep on the dirty mattress on the floor.
		<<if $pc.pcs_sleep > 80>>
			But you are not tired enough to do so.
		<<else>>
			<<act 'Sleep'>>
				<<gt 'sleep'>>
			<</act>>
		<</if>>
		<<if $pc.pcs_sleep > 30>>
			<<act 'Wait' undefined `{time:-240}`>>
				<<either 40>>
					<<addtime `rand(5,60)`>>
					<<gt 'abduction' 'abdSomeoneComing'>>
				<<or 60>>
					<<either $quest('abduction').chainDamageFound ? 0 : 10>>
						<<gt 'abduction' 'chainDamageFind'>>
					<<or 90>>
						<<addtime 240>>
						<<gt 'abduction_basement'>>
					<</either>>
				<</either>>
			<</act>>
		<</if>>
	</p>

	/*<<if $pc.pcs_energy >= 10>>
		There's enough space to do some basic <<link "exercise">><<gt 'abduction' 'abdexercise'>><</link>>.
	<<else>>
		There's enough space to do some basic exercise but you are too hungry to do them.
	<</if>>*/

	<<act 'Eat dried food (0:10)'>>
		<<gt 'beverage' 'abductionBread'>>
	<</act>>
	<<act 'Drink some water (0:01)'>>
		<<gt 'beverage' 'waterTap'>>
	<</act>>
	<<if $quest('abduction').tools>>
		<<act 'Train with dildos'>>
			<<gt 'abduction' 'abdTrainDildos'>>
		<</act>>
		<<if getvar("$breastpump") > 0 and getvar("$bp_unbox") >= 1>>
			<<act 'Use breast pump'>>
				<<gt 'lact_bp' 'bp_milking'>>
			<</act>>

		<</if>>
	<</if>>
	<<if $inventory.get("painkiller") > 0>>
		
		<p>You have <b><<=$inventory.get("painkiller")>></b> <<plural $inventory.get("painkiller") "painkiller" "painkillers">>.</p>
		<<if $pc.painTotal > 0 and $pc.pain('killer') == 0>>
			<<actCLA 'Take a painkiller'>>
				<<run $pc.painInc('killer','',1)>>
				<<run $inventory.dec('painkiller',1)>>
				You take a painkiller.
				<<ret>>
			<</actCLA>>
		<</if>>
	<</if>>
	<<act 'Look in the mirror'>>
		<<gt 'mirror' 'start'>>
	<</act>>
	<<if $pc.pcs_hairbsh < 1>>
		<<brushHairActions undefined true>>

	<</if>>
	<<actCLA 'Take a cold shower (0:15)'>>
		
		<<set $time.minutes += 15>>
		<<set $pc.horny += 1>>
		<<set $noShampoo = 1>>
		<<gs 'cleanBody'>>
		<<image "locations/shared/abduction/shower1.jpg">>
		The shower is cold and you don't have any shampoo, but at least you get clean again...
		<<if $pc.deodorant_on == 1>>
			<<gs 'sweat' 'remove_deo'>>

		<</if>>
		<<ret>>
	<</actCLA>>

	<<if $quest('abduction').chainDamageFound && !$quest('abduction').chainDamageRepaired>>
		<<act 'Unlink chain and inspect window'>>
			<<gt 'abduction' 'windowInspect'>>
		<</act>>
	<</if>>

/*
<<case 'abdexercise'>>
	
	<<gs 'exercise' 'tier2' 30 'stren'>>
	<<video "pc/activities/exercises/push_nude.mp4">>
	<p>You do push-ups for $timestring minutes, improving your strength.</p>
	<<set $randpushfact = rand(-5,5)>>
	<<if $pc.pcs_energy < 40>>
		<<set $randpushfact -= rand(1,10)>>

	<</if>>
	<<set $pushnum = ($pc.skillLevel("strength") * $pc.pcs_sleep * $pc.pcs_health) / (1 * 67 * $pc.healthmax) + $randpushfact>>
	<<if getvar("$pushnum") < 1>>
		<<set $pushnum = rand(1,5)>>

	<</if>>
	<<set $randpushfact to null>>
	<p><br>You managed to do pushnum push-ups. Your previous record is pushrecord.</p>
	<<if $pushrecord < $pushnum>>
		<<set $pushrecord = $pushnum>>

	<</if>>
	<<actCLA 'Continue'>>
		
		<<gs 'exercise' 'tier2' 30 'vital'>>
		<<video "pc/activities/exercises/abdominal_nude.mp4">>
		<p>You do a series of abdominal exercises for $timestring minutes, improving your endurance.</p>
		<<act 'Finish'>>
			<<gt 'abduction' 'abdFood'>>
		<</act>>
	<</actCLA>>

<<case 'abdSleep'>>
	
	<<set $time.minutes += 240>>
	<<set $pc.pcs_sleep += 50>>
	<<image "locations/shared/abduction/bed1.jpg">>
	You've slept for several hours, but nightmares have awakened you.
	<<act 'Continue'>>
		<<gt 'abduction_basement'>>
	<</act>>
<<case 'abdEscape'>>
	
	<<image "locations/shared/abduction/cellarwindow1.jpg">>
	Looking at the only window in the basement, you notice that there's a lock on it to prevent your escape.
	<<set $time.minutes += 5>>
	<<act 'Try to break the lock'>>
		<<gt 'abduction' 'abdEscapeWindow1'>>
	<</act>>
	<<act 'Go back to your bed and re-attach your leash to the wall'>>
		<<gt 'abduction_basement'>>
	<</act>>
<<case 'abdEscapeWindow1'>>
	
	
<<case 'abdEscapeWindow2'>>
	
	<<image "locations/shared/abduction/cellarwindow1.jpg">>
	You continue in your attempts to break the window.
	<<set $time.minutes += 5>>
	<<set $breakChance = rand(1,100)>>
	<<if getvar("$breakChance") <= 90>>
		You desperately try to unscrew it, but you run out of time... and luck.
		Your master comes into the basement and catches you running around unleashed. This won't end well for you...
		<<set $failedEscapeCount += 1>>
		<<act 'Panic'>>
			<<gt 'abduction' 'abdTorture'>>
		<</act>>
	<<else>>
		<p>You did it, and just in time! Before anyone can discover your actions, you manage to loosen the window and pull yourself through it.</p>
		<p>As you land, you see some clothes hanging on a line. It looks like the clothes for 4 or 5 girls, but by luck one of the outfits is yours!</p>
		<<act 'Run away'>>
			<<gt 'abduction' 'abdEscapeWindow3'>>
		<</act>>
	<</if>>
<<case 'abdEscapeWindow3'>>
	
	<<set $i = rand(1, 3)>>
	<<gs 'underwear' 'wear'>>
	<<gs 'underwear' 'dispose'>>
	<<gs 'clothing' 'wear_last_worn'>>
	<<image `'locations/shared/abduction/midnowhere'+$i+'.jpg'`>>
	Pulling on your clothes as you run, you finally think you're far enough away and try to find your bearings.
	Any underwear you had with you is lost, but that's a small price to pay for your freedom.
	Looking around, you discover that you're in the middle of nowhere.
	Before you in the distance, you see a shimmer of something that could be water.
	If you turn back, you can hear distant noise of what could be a highway.
	On your left, you can see the dust and pollution of what could be a large city.
	You can't see anything to your right, but something is pulling you that way...
	You decide to...
	<<set $time.minutes += 180>>
	<<if $pc.pcs_hydra >= 100>>
		<<set $pc.pcs_hydra -= 25>>
	<<else>>
		<<set $pc.pcs_hydra -= 50>>
	<</if>>
	<<actCLA 'Turn and run the opposite direction'>>
		<<gt 'road' 12>>
	<</actCLA>>
	<<act 'Run left'>>
		<<gt 'city_industrial'>>
	<</act>>
	<<act 'Run right'>>
		<<gt 'pav_commercial'>>
	<</act>>
	<<act 'Run forward'>>
		<<gt 'city_lake' 'start'>>
	<</act>>

 */