cyoa{ 

cyoa: gym-sweaty
	"Ew gross" cyoa-title! picon
	($ "This gym equipment is all covered in sweat now!
	No way is " .. pname .. " touching it." $) text!
	clear-cyoa badfx
;

: gym-barbell-end 
	pchar .dead? if ($ cname .. " dies from this weightlifting mishap." $) +crtext
	else
		strengthREV "An hour passed during that impromptu workout session." +crtext
	then clear-cyoa ' gym-sweaty this-cyoa o'clock@ 1 + o'clock
		team-nearby? not if	
			($ "There was no one around to defend " .. pname .. " during the workout, so " .. phe .. " had to fend off zombies between reps. Watch out!" $) +crtext
			6 11 rnd roomgen{ .zombspawn } 
		then
	;
cyoa-choice: gym-barbell-1 
	($ cname .. " takes off most of the weight from the barbell and then starts " .. "PUMPING IRON" pbold .. " with the mostly empty bar." $) cyoa-text!
	cstrength- if
		($ "It's still a great workout for " .. chim .. ". And nothing is broken or ruptured in the process!" $) +crtext
		strength++ goodfx
	else
		"It just wasn't enough weight to really do anything. The zombies weren't impressed, either." +crtext badfx
	then
	gym-barbell-end
;
cyoa-choice: gym-barbell-2
	($ cname .. " takes off some weight from the barbell, but not so much that " .. phe .. " can't " .. "GET SUPER PUMPED" rbold .. "." $) cyoa-text!
	cstrength- if
		($ "That was too much weight! " .. cHe .. " hears something in " .. chis .. " body make a funny snapping sound." $) +crtext
		ouch-- badfx gym-barbell-end
	then;
	cstrength+ if
		($ cname .. " was disappointed with the workout. " .. cHe .. " will have to push " .. chim .. "self more in the future." $) +crtext badfx gym-barbell-end
	then;
	($ cHe .. " makes a lot of strained grunting noises as that bar gets lifted. What a workout!" $) +crtext goodfx strength++ gym-barbell-end
;
cyoa-choice: gym-barbell-3
	($ cname .. " attempts to lift the ridiculously overloaded barbell. " .. "
	IF THE BAR AIN'T BENDING YOU'RE JUST PRETENDING" fbold .. " 
	-- Ancient Bodybuilder Wisdom" $) cyoa-text!
	cstrength+ if
		($ cHe .. " lifts it, though " .. chis .. " eyes almost pop out of " .. chis .. " head." $) +crtext
		strength++ morale++ goodfx
	else
		($ "Trying to lift that was a catastrophically bad idea! " .. cname .. " feels something in " .. chis .. " body explode." $) +crtext
		ouch2- badfx
	then
	gym-barbell-end
;

cyoa: gym-barbell
	"I.T.B.A.B.Y.J.P." cyoa-title!
	picon
	"There's a fully loaded olympic weight set here. The amount of weight on it can be adjusted down to a less hernia-causing amount." cyoa-text!
	cpet? if
		($ "Unfortunately, olympic weightlifting really isn't designed to work with " .. pname .. "'s body." $)
	+crtext then;
	team-nearby? not if
		($ "With no one nearby to watch out for zombies, it might be dangerous to get a workout in." $) +crtext
	else
		($ pname .. " considers taking a break to get some strength training in as " .. phe .. " is guarded." $) +crtext
	then
		choice( "Lift Light Weight" )choice: gym-barbell-1
		choice( "Lift Heavy Weight" )choice: gym-barbell-2
		choice( "Lift Massive Weight" )choice: gym-barbell-3
	choice( "Leave it for now" )choice
;

: gym-bike-end 
	pchar .dead? if ($ cname .. " dies on the exercise bike from the sheer exertion." $) +crtext
	else
		fitnessREV "An hour passed during that exercise session." +crtext
	then clear-cyoa ' gym-sweaty this-cyoa o'clock@ 1 + o'clock
	team-nearby? not if	
			($ "There was no one around to defend " .. pname .. " during the workout, so " .. phe .. " had to fend off zombies while cycling. Watch out!" $) +crtext
			6 11 rnd roomgen{ .zombspawn } 
		then
	; 
cyoa-choice: gym-bike-1 
	($ cname .. " sets the stationary cycle to " .. "PAVED ROAD ON THE MOON" pbold .. " and starts moving " .. chis .. " legs." $) cyoa-text!
	cfitness- if
		($ "It's good exercise for " .. chim .. ", due to being very out of shape." $) +crtext
		fitness++ goodfx
	else
		"The exercise wasn't really much better than just sitting around in the car." +crtext badfx
	then
	gym-bike-end
;
cyoa-choice: gym-bike-2
	($ cname .. " sets the stationary cycle to " .. "UPHILL COUNTRY ROAD" rbold .. " and starts pumping " .. chis .. " legs." $) cyoa-text!
	cfitness- if
		($ cHe .. " manages to pull something in " .. chis .. " leg! The pain makes " .. chim .. " fall off the bike." $) +crtext
		sting-- badfx gym-bike-end
	then;
	cfitness+ if
		($ cname .. " didn't even break a sweat! It does nothing for improving " .. chis .. " fitness." $) +crtext badfx gym-bike-end
	then;
	($ cHe .. " produces a whole river of sweat. What a workout!" $) +crtext goodfx fitness++ gym-bike-end
;
cyoa-choice: gym-bike-3
	($ cname .. " sets the cycle to " .. "DEATH ROAD TO CANADA" fbold .. " and starts straining " .. chis .. " legs to their limit." $) cyoa-text!
	cfitness+ if
		($ cHe .. " truly " .. "FEELS THE BURN!" rbold $) +crtext
		fitness++ morale++ goodfx
	else
		($ cname .. " doesn't last long before falling down from exhaustion. " .. cHe .. " gasps and horks up an organ." $) +crtext
		sting2- badfx
	then
	gym-bike-end
;

cyoa: gym-bike
	"Cardiovascular Training" cyoa-title!
	picon
	"There's a deluxe UltraMegaFit brand stationary cycle here. Unlike treadmills, this works with the electricity cut off." cyoa-text!
	cpet? if
		($ "Unfortunately, this device just isn't designed to work with " .. pname .. "'s body." $)
	+crtext then;
	team-nearby? not if
		($ "With no one nearby to watch out for zombies, it might be dangerous to get a workout in." $) +crtext
	else
		($ pname .. " considers taking a break to get some fitness training in as " .. phe .. " is guarded." $) +crtext
	then
		choice( "Light Exercise" )choice: gym-bike-1
		choice( "Heavy Exercise" )choice: gym-bike-2
		choice( "INTENSE EXERCISE" )choice: gym-bike-3
	choice( "Leave it for now" )choice
;

}
			
map{ roomgen{
			
: gymcyoa 50 %chance if olympicbar cyoa{ ' gym-barbell cyoa! } else gymbike cyoa{ ' gym-bike cyoa! } then ;

} }

locdef{
		
location: gym
		max-rooms: 2
		entry-tags: gym-entry
		script: yall-theme 

	: gymstuff
		4 9 rnd for roomgen{ dumbbell } scatter next
		1 3 rnd for roomgen{ barbell } scatter next
	;

		room-choice: gym-entry
			room-weight: 10
			room-count: 1
			room-script: 
			room-post-script: 10diff %zombs gymstuff
			filter-only		

		room-choice: restroom
			room-weight: 10
			room-count: 1
			room-script: floor-bath
			
}
