
cyoa{ road{

: bandithurt
	ezbandit? if 
		ouch--all
	else
		ouch12rnd--all
	then
;

: bandit-give-in
	($ Thegroup .. " decides to play it safe. " .. gThey .. " give" .. g1s .. " into the bandits' demands." $) cyoa-text! badfx
;
cyoa-choice: bandit-pay-foodtoll
	someicon bandit-give-in bandit-toll-pay morale--all
;
cyoa-choice: bandit-pay-lowtoll
	someicon bandit-give-in eat-all bandit-ammomed2 morale--all
;
cyoa-choice: bandit-pay-badtoll
	someicon bandit-give-in bandit-ammomed 
		// check if in car
		vehicle.which@ 0 if
			bandit-gas
		else
			bandit-gastank
		then morale2-all
;
cyoa-choice: bandit-start-fight
	($ Thegroup .. " knows that every single one of " .. ghis .. " supplies are essential for " .. ghis .. " chances of reaching Canada. So " .. gthey .. " fight" .. g1s .. "." $) cyoa-text! someicon bitefx
		ezbandit? if 
			ouch--all
		else
			70 %chance if
				ouch12rnd--all
			then;
			ouch2-all
		then
;

: bandit-demand
	bandit-toll? if
		($ bandit-toll .. " food " .. "to pass safely." rbold $) +text
		choice( "Pay toll of " .. bandit-toll .. " food" )choice: bandit-pay-foodtoll
	else
		trunk-food 4 > if
			ezbandit? if 
				($ "the remainder of your food, and a quarter of your ammo and medical supplies." rbold $) 
			else
				($ "the remainder of your food, and half of your ammo and medical supplies." rbold $) 
			then +text
			choice( "Give in to bandit demands" )choice: bandit-pay-lowtoll
		else
			ezbandit? if
				($ "all your extra gas, and half of your ammo and medical supplies!" rbold $)
			else
				($ "all of your ammo, medical supplies, and extra gas tanks!" rbold $)
			then +text
			choice( "Give in to harsh bandit demands" )choice: bandit-pay-badtoll
		then
	then
;
: bandit-fight
	choice( "Refuse and fight!" )choice: bandit-start-fight
;
: bandit-demand-fight
	bandit-demand bandit-fight
;

cyoa-choice: bandit-charm-sucker
	($ cname .. " tricks the bandits. While they wait for supplies to be dropped, " .. ghe .. " runs into the car and peels out.
	The bandits manage to shoot the car as it's speeding away! They only have time to graze it." $) cyoa-text! -1 car-chassis+ bitefx
	car-chassis 0 > if
		"The car gets an extra hole or two added to it, and is otherwise fine." +crtext
	then loyaltyREV
;

cyoa-choice: bandit-charm-tp
	($ Thegroup .. ", not willing or able to spare other supplies, decides to dump out " .. ghis .. " extra weapons from the trunk.
	" .. "EXTRA WEAPONS LOST!" rbold $) cyoa-text! trunk.clear badfx
;

cyoa-choice: bandit-charm-morale
	($ Thegroup .. ", not willing or able to spare other supplies, decides to lose some treasured personal items to the bandits.
	" .. "WHAT A BUMMER!" rbold $) cyoa-text! badfx morale3-all
;

cyoa-bridge: bandit-start-charm
	($ cname .. " offers a compromise to the bandits. " .. gHe .. " will leave something the bandits want on the road, then drive away. No harm will come to either side." $) cyoa-text! witsattREV 
	"The supplies will be:" +crtext
		trunk-food bandit-toll2 1 - > if
			choice( bandit-toll2 .. " food" )choice: bandit-toll-pay2
		then
		cloyalty- if
			choice( "SEE YA, NERDS!!" )choice: bandit-charm-sucker
		then
		trunk-bullet 1 > trunk-rifle-shell 1 > trunk-shotgun-shell 1 > or or if
			choice( "Half your ammo" )choice: bandit-ammo2
		then
		trunk-gas 100 > if
			choice( "Your extra gas tanks" )choice: bandit-gastank
		then
		trunk-medical 1 > if
			choice( "Half your medical supplies" )choice: bandit-med2
		then
		choice( "Personal treasures" )choice: bandit-charm-morale
		trunk.count 0 > if
			choice( "All trunk weapons" )choice: bandit-charm-tp
		then
;
: bandit-charm
	most-charming if 
		charchoice( " offers a compromise" )choice: bandit-start-charm
	then
;

// Toll road

cyoa-bridge: bandit-tollroad-coolit
	cpet? if
		($ cname .. " farts on the toll bridge." $)
	else
		($ cname .. " tells the bridge bandits to" .. " COOL IT." pbold $)
	then cyoa-text!
	cool-it-7 if
		char-gen to recruitee "Bridge Bandit" recruitee .name!
		($ "This really makes the bandits think. 
		Have they just been too greedy?
		They offer a gift in order to start making amends!" $)
		+crtext morale3+all rescue-trainitem cooled-it goodfx
	else cool-it++
		($ "The bandits refuse to lower the bridge until they get most of " .. thegroup .. "'s supplies." $) +crtext badfx bandit-mostgas morale2-all
	then witsattREV 
;

cyoa-choice: bandit-tollroad-shoot
	($ Thegroup .. " draws " .. ghis .. " weapon" .. gs .. " on the bandits." $) cyoa-text!
	($ gThey .. " " .. gare .. " so fast that the bandits are overwhelmed, and forced to lower the bridge.
	" .. Thegroup .. " passes through the bridge unharmed." $) +crtext goodfx
;

cyoa-choice: bandit-tollroad-jump
	($ cname .. " is real mad about having to pay bridge tolls, even post-civilization. " .. cHe .. " runs right into the retracted bridge, sending the car flying past." $) cyoa-text! temperREV car-jump
;

cyoa: bandit-tollroad

	($ "Bandits are guarding a retracted bridge over a river. They demand that anyone passing pays a toll.
	" .. "They want " rbold $) cyoa-text!
		bandit-demand-fight
		shooting-total 12 > if
			choice( "Brandish guns" )choice: bandit-tollroad-shoot
		then
		most-grating if
			charchoice( " tells Bandits to 'Cool It'" fcoolit )choice: bandit-tollroad-coolit
		then
		smartest-pass if
			smartest charchoice( ": Take a detour instead" )choice: car-detour
		then
		angriest-pass if 
			angriest choosechar chumany? if
				cchar charchoice( ": LET'S JUMP IT" )choice: bandit-tollroad-jump
			then
		then
;

// Quiet Ambush

cyoa-choice: bandit-quiet-paranoid
	($ cname .. " calls the bandits on their bluff, immediately. Before the bandits can yell, " .. cname .. " is already making tons of noise.
	As the bandits panic and the zombies rush in, " .. thegroup .. " saunters away by a side route. It pays to constantly plan for the worst!" $) cyoa-text! goodfx morale++ morale++all witsREV attitudeREV
;

cyoa-choice: bandit-quiet-angry
	($ "With no warning and not a single word, " .. cname .. " runs up to the nearest bandit and punches him in the face, knocking him out. Then " .. cname .. " does the same thing to a second bandit before calming down. 
	Everyone's stunned. The remaining three bandits decide they should quietly pick up their friends and leave." $) cyoa-text! goodfx morale++ morale++all temperREV strengthREV
;

cyoa-choice: bandit-quiet-pay
	($ Thegroup .. " pays the bandits their extortion fee, instead of risking the carnage." $) cyoa-text!
	-10 trunk-food+ badfx
;

: bandit-quiet-roll
	50 %chance if
		"One of the bandits yells, and chaos erupts as the zombies swarm out. Escape was messy." +crtext ouch--all badfx
	else
		($ "The bandits were all talk, and don't make a sound when their bluff is called. " .. Thegroup .. " goes back to the car as the bandits creep away." $) +crtext goodfx
	then
;

cyoa-choice: bandit-quiet-nofood
	choosehuman cicon
	($ cname .. " explains that " .. ghe .. " doesn't have enough food." $) cyoa-text! 
	trunk-food 4 > if
		"The bandits don't seem to want to want to risk the carnage, so they accept taking less food." +crtext eat-all
	else
		"The bandits think that this is a lie!" +crtext
		bandit-quiet-roll
	then
;

cyoa-choice: bandit-quiet-yell
	choosehuman cicon
	($ cname .. " calls the bandit's bluff." $) cyoa-text! 
	bandit-quiet-roll
;

cyoa-bridge: bandit-quiet-coolit
	cpet? if
		($ cname .. " farts really faintly at the bandits." .. " Silent... but deadly." pbold $)
	else	
		($ "In a faint whisper, " .. cname .. " tells the bandits to" .. " COOL IT." pbold $) 
	then cyoa-text!
	cool-it-7 if
		char-gen to recruitee "Quiet Bandit" recruitee .name!
		($ "The bandits freeze in place, with no idea what to do. One offers a bribe if " .. cname .. " will just go away and never return.
		The bandits can give their supplies, or silently teach zombie secrets through sign language." $)
		+crtext 
		rescue-trainitem 
		cooled-it goodfx
	else cool-it++
		"The bandits are, for what feels like a long time, taken aback by this." +crtext 
		bandit-quiet-roll
	then witsattREV 
;

cyoa: bandit-quiet
	// NEED IMAGE 
	someicon
	($ "Five bandits ambush " .. thegroup .. " while " .. gtheyare .. " about to sneak into a zombie infested house.
	The bandits speak in a half-whisper, afraid to attract undead attention. They say to hand them over some supplies, or they'll yell." $) cyoa-text!
		trunk-food 9 > if
			choice( "Give 10 food" )choice: bandit-quiet-pay
		else
			choice( "Don't have the food!" )choice: bandit-quiet-nofood
		then		
		most-angrystrong if 
			charchoice( " goes on a rampage" )choice: bandit-quiet-angry
		then
		most-paranoid if 
			charchoice( " already had a plan" )choice: bandit-quiet-paranoid
		then
		most-grating if 
			charchoice( " tells Bandits to 'Cool It'" fcoolit )choice: bandit-quiet-coolit
		then
		choice( "Call bluff" )choice: bandit-quiet-yell
;

// Buff Bandits

cyoa-choice: bandit-buff-pose
	($ cname .. " challenges the bandits to a pose-off." $) cyoa-text!
	cstrength+ if
		($ cHe .. " does an incredible flexing routine, honed by training. The bandits clearly lose, and have to let " .. thegroup .. " go due to the Bodybuilder's Code." $) +crtext goodfx morale2+all strengthREV
	then;
	
	cstrength- if
		90 %chance if
			($ cHe .. " is nowhere near the muscle mass of the bandits. " .. cHe .. " loses the pose-off almost instantly. The bandits take a lot of extra supplies, even ones they don't need, to teach " .. thegroup .. " a lesson about the weak challenging the swole. " $) +crtext morale--all bandit-most bandit-gastank badfx
		else
			($ "By some strange twist of fate, " .. che .. " somehow wins the pose-off due to a little known loophole in the bodybuilding judge's rulebook. The bandits are pretty angry about this, but their hands are tied by their rules." $) +crtext strength++ goodfx morale++all
		then strengthREV
	then;
	
	strengthroll if
		($ cHe .. " manages to somehow beat the bandits in a bodybuilding competition, both in the flexing segments and the talent segment! " .. Thegroup .. " is let go." $)
		+crtext goodfx strength++ morale++all strengthREV
	then;
	($ cname .. " loses the pose-off. It's humiliating, and the bandits take a lot of supplies as punishment for the hubris of challenging them." $) +crtext
		morale-- badfx bandit-ammomed2 bandit-food
;

cyoa-bridge: bandit-buff-coolit
	cpet? if
		($ cname .. " farts at the bandits, and also the concept of bodybuilding." $)
	else	
		($ cname .. " tells the buff bandits to" .. " COOL IT." pbold $)
	then cyoa-text!
	cool-it-7 if
		char-gen to recruitee "Buff Bandit" recruitee .name!
		($ "They are impressed by this bold attitude!
		They declare " .. chim .. " their honorary champion!
		The bandits offer a gift:" $)
		+crtext morale3+all rescskill1 rescue-reward-shuffle recruit-choice cooled-it goodfx
	else cool-it++
		($ "The bandits are enraged by this negative attitude, and take out their anger on " .. thegroup .. "'s car. They all punch it bare-handed, doing some serious damage." $) +crtext -2 car-chassis+ badfx	
		morale--all bitefx
		"The buff bandits run off, flexing. Even the dog." +crtext	
	then witsattREV
;

cyoa-choice: bandit-buff-obliv
	($ cname .. " asks the buff bandits about their " .. "SWEATBANDS" pbold .. " and " .. "CONSTANTLY LIFTING DUMBBELLS WHILE TALKING.
	" pbold .. "The bandits talk about an amazing lost tradition of " .. "BODYBUILDING" rbold .. " that was lost when civilization fell.
	They show what they mean in an inspiring muscle exhibition. In the process, the bandits forget about robbing " .. thegroup .. "." $) cyoa-text!
	morale2+all goodfx witsattREV
;

cyoa: bandit-buff
	image-buff-bandit
	"They're all wearing sweat bands" cyoa-title!
	($ "Bandits appear, all wearing sweatbands and all super buff, even their dog. They demand protein powder!
	" .. "They will also accept " rbold $) cyoa-text!
		bandit-demand
		strongest charchoice( " challenges them to a pose-off" )choice: bandit-buff-pose
		most-grating if
			charchoice( " tells bandits to 'Cool It'" fcoolit )choice: bandit-buff-coolit
		then
		most-oblivious if
			charchoice( " asks what's up with outfits" )choice: bandit-buff-obliv
		then
		bandit-fight
		
;

// Greedy bandits that demand all of your stuff

: bandit-allofit-ez
	ezbandit? if "half of the" else "all" then
;

cyoa-choice: bandit-allofit-pay
	($ "The bandits go through " .. thegroup .. "'s things and take all the food and " .. bandit-allofit-ez .. " supplies.
	" .. Thegroup .. " isn't happy about this, but at least the bandits didn't steal the car or even siphon out the gas. In exchange for the cooperation, they also returned any weapons." $) cyoa-text! badfx
	bandit-most
	morale2-all
;
: bandit-allofit-check args( chara ) 
	<- chara .cfitness+ if
		<- chara .sting--
	else
		<- chara .cfitness- if
			<- chara .ouch2-
		else
			<- chara .ouch-- 50 %chance if <- chara .sting-- then
		then
	then <- chara .fitnessREV
;
cyoa-choice: bandit-allofit-run
	($ Thegroup .. " decides to make a run for it, thinking that the hard won supplies are worth the risk.
	The bandits start shooting!" $) cyoa-text!
	solo if
		cfitness+ if
			($ cname .. " runs and runs, without getting tired! " .. cHe .. " only gets grazed." $) +crtext sting--
		else
			cfitness- if
				($ cname .. " runs a few feet before getting winded. 
				" .. cHe .. " gets hit hard." $) +crtext ouch2-
			else
				($ cname .. " runs as far as " .. che .. " can! " .. cHe .. " gets hit." $) +crtext ouch-- 50 %chance if sting-- then
			then
		then
	else
		' bandit-allofit-check foreach-team-char
	then bitefx
;
cyoa-bridge: bandit-allofit-coolit
	cpet? if
		($ cname .. " farts at the bandits, giving them all " .. chis .. " fart gas." $)
	else	
		($ cname .. " tells the bandits to" .. " COOL IT." pbold $) 
	then cyoa-text!
	cool-it-7 if
		char-gen to recruitee "Reformed Bandit" recruitee .name!
		($ "This stops the bandits in their tracks. 
		What if they've been living their lives wrong this whole time?
		Could things have gone better if they simply 'cooled it'?
		They decide to only do good things from now on, and offer a gift!
		" .. Thegroup .. " is unharmed, with " .. ghis .. " spirits uplifted." $)
		+crtext morale3+all rescue-trainitem cooled-it goodfx
	else cool-it++
		($ "The bandits are not amused by this at all. They open fire as " .. thegroup .. " tries to run away." $) +crtext 
		notsolo if 
			($ "On the plus side, most of the bullets hit " .. cname .. "." $) +crtext
		then
		ouch2- ouch--all bitefx
	then witsattREV 
;

cyoa-choice: bandit-allofit-paranoid
	($ "Always wary, " .. cname .. " was on guard before the ambush. " .. cHe .. " dashes to a nearby but easy to overlook bit of cover. " $) cyoa-text!
	notsolo if ($ Everyone .. " follows " .. chim .. "." $) +text then
	"The bandits lose their overwhelming advantage, and run away after a brief fight." +crtext bitefx sting--all witsattREV
;

cyoa: bandit-allofit
	"Yer Money vs Yor Life" cyoa-title! someicon
	($ "Bandits catch " .. thegroup .. " by surprise, in a really terrible spot for " .. ghim .. " to fight in.
	They demand that all food and " .. bandit-allofit-ez .. " supplies are handed over!
	" .. "YER MONEY OR YOR LIFE!" rbold $) cyoa-text!
		most-charming if 
			charchoice( " offers a compromise" )choice: bandit-start-charm
		else
			choice( "Give up supplies" )choice: bandit-allofit-pay
		then
		most-grating if 
			charchoice( " tells Bandits to 'Cool It'" fcoolit )choice: bandit-allofit-coolit
		then
		most-paranoid if 
			charchoice( ": We can fight them!" )choice: bandit-allofit-paranoid
		then
		choice( "Run for it!" )choice: bandit-allofit-run
;		

} }


