uses base.df
uses charfilt.df
uses charstats.df
uses road.df

cyoa{ road{

// Dentist

// Slightly changed the structure of all below to the new stuff. There's cyoa-choice: to start a choice instead of just doing : , and cyoa: for starting off a cyoa. Both do a lot of little shortcut things, like you no longer need to necessarily use cicon more than once, and you no longer need to use cyoa-start.

// Note that words you make to check things or add optional text to the main text of a new window do not use cyoa-choice. Use one cyoa-choice per "window".

// Also there's words for pronouns that change based on the correct grammar of the situation. che - picks the chosen character and then uses "he" or "she", depending. 
// Search for "xhis" in cyoa.df for a list


: cardJ4-mcheck 
	medicalroll if
		($ cname .. " really did know what they were doing. Using the tools and medical supplies available, " .. che .. " is able to pull the tooth out cleanly and with relatively little pain. " $) cyoa-text! goodfx
		medical++ 
	then;
	
		($ cname .. " ended up having a lot of trouble. The tooth extraction was messy, clumsy, and painful. To make it worse, " .. che .. " pulled the wrong tooth and had to do it again.  " $) cyoa-text! bitefx ouch--
		
	// Added an extra line below for dying from tooth extraction.

	dead? if
		+cr ($ "After pulling the second tooth " .. cname .. " was heard to exclaim " .. "YEAH SCREW THIS NOISE" pbold .. " and then " .. che .. " spontaneously died." $) +text
	then
	
;

cyoa-choice: cardJ4-dentist cardJ4-mcheck medicalREV ;

// Expanded this to show that you can split up the text. cyoa-text! for main bodies of text at the top of the window, +text to add new lines below the main text, +cr to create a line break for spacing. Also did this in the above medical check, to a lesser extent.

: cardJ4-mecheck 
	mechanicroll if
		 ($ "Using the added leverage, " .. che .. " slams the car door, cleanly pulling the tooth out." $) +text goodfx
		mechanic++ 
	then;
	
		($ "Unprepared for the sudden force of slamming the door, " .. che .. " is pulled towards the car and hits " .. chis .. " head on the door. " $) +text bitefx ouch--

// Death flavor text added.
		
	dead? if
		+cr ($ "This exact scenario was actually a pretty common way to die before the zombie apocalypse. These accidents got kept out of the news due to " .. "BIG AUTO CORPORATIONS" rbold .. "." $) +text
	then
;

cyoa-choice: cardJ4-mechanical
	($ cname .. ", using old cartoon shows as inspiration, decides to tie " .. chis .. " tooth to the car door." $) cyoa-text! 
		+cr cardJ4-mecheck mechanicREV
;

: cardJ4-scheck 
	cpet? if
		($ cname .. " tries to get rid of the busted tooth by chomping down on a rock. A few teeth fall out, and the pain is excrutiating. But at least the bad tooth fell out, too." $) cyoa-text! badfx
		nonfatal if
			ouch--
		then morale3- attitude--
	then;
	strengthroll if
		($ cname .. " grabs a pair of pliers and goes to town, pulling the tooth as hard as possible. Using nothing but will to fight through the pain, " .. che .. " gets the tooth out quickly and with surprisingly little trouble." $) cyoa-text! goodfx
		strength++ 
	then;
		($ cname .. " grabs a pair of pliers and goes to town. The extraction doesn't go well. After a lot of pain and blood the tooth eventually comes out." $) cyoa-text! bitefx ouch2-

// Added extra commentary from dying from plier surgery.		
		
		dead? if
			+cr ($ "Somehow " .. cname .. " dies from this." $) +text
		then
		
;

cyoa-choice: cardJ4-force cardJ4-scheck strengthREV ;

cyoa: cardJ4-test
	"Ma Hooth" cyoa-title!
	choosehuman cicon
	($ cname .. " is having near crippling tooth pain. Without access to the precision tools needed the only option it to pull the tooth out. " .. cHe .. " weighs the current options." $) cyoa-text! 3 500 tone
	
		choice( "Force it out!" )choice: cardJ4-force
		cnotpet? if
			choice( "I used to be a dentist!" )choice: cardJ4-dentist
			choice( "I saw this once in a cartoon!" )choice: cardJ4-mechanical
		then
;

// END of Dentist

// Radio Repair

// Not many changes here except cleaning up the words. cyoa-text-cr replaced with +cr, cyoa-text-append replaced with +text, cyoa: added and the words it makes obsolete taken out.

// someone .colourname was also replaced with "somename" and soloer .colourname was replaced with "soloname", search for either in cyoa.df

: cardJ2-jerk ($ cname .. " Removes the CD player and throws it out the window." $) +text
	temperREV morale++
;
: cardJ2-pumped ($ cname .. " Punches the CD player, stopping the music." $) +text
	strengthREV	strength++ morale++
;
cyoa: cardJ2-test ($ someone .colourname .. " gets frustrated when the CD player in the car gets jammed, playing the same song over and over again." $) cyoa-text! +cr 1 cyoa-image-icon! 4 500 tone 

	strongest-pass
	if strongest choosechar cardJ2-pumped then;

	most-ahole
	if choosechar cardJ2-jerk then;

	solo if ($ soloname .. " turns off the volume." $) +text then;

	"The group decides to turn it off for now then try to fix it later." +text
;

// END Radio Repair

// Shop Smart

// The usual cleanups from the above two, see if you can spot the difference.

 cyoa-choice: cardJ1-search ($ Thegroup .. " finds a small amount of ammunition." $) cyoa-text! ammosearch1 goodfx ;

// Below is still a cyoa-choice because it's a result with its own window. cicon isn't necessary because it's built into cyoa-choice: if a character was picked before. If no character is picked by your button press, it usually shows cyoaicon.

cyoa-choice: cardJ1-picked
	"Reading Rainbow" cyoa-title!
	
	($ cname .. " finds and reads some old gun magazines. This somehow makes them a better shooter, you don't question it. "  $) cyoa-text! goodfx

	shootingREV shooting++
;

// The old method involving 3 words to do this was replaced with a way more efficient thing... ' <cyoa-choice> cyoa-team-choice .. search for cyoa-team-choice in cyoa.df

cyoa-choice: cardJ1-one "Who should you bring?" cyoa-text! 
	' cardJ1-picked cyoa-team-choice 
;

: cardJ1-spray 40 %chance if .shooting++ else team-attacked then ;

// cyoa-bad-dialog and $cyoa-ok-dialog are pretty much obsolete now, just use cyoa-text! most of the time along with badfx, goodfx, bitefx, whatever else we add.

cyoa-choice: cardJ1-group "Someone from the group mistakes a mannequin for a zombie and opens fire. During the confusion the whole party opens fire. It was completely chaotic. In the end there were no mannequins left standing. " cyoa-text! badfx
	
	// Note syntax: ' <single word, make shortcut if more> foreach-team-char
	
	' cardJ1-spray foreach-team-char 
	someone team-attacked 
;

cyoa: cardJ1-test
	"Shop Smart" cyoa-title!
	0 to cyoaicon cyoaicon
	"You find a sporting goods store. It looks to have been already ransacked but there's still a chance something was missed." cyoa-text! 3 500 tone
		
	choice( "Quickly look for ammo" )choice: cardJ1-search
	
// Changed choice( below to charchoice( , which shows a picture of their face and has the choosechar stuff after built in. Compare to your old version. Also, with charchoice showing their name is automatic, any text you put in the "" is added after.
	
	solo if
		soloer charchoice( " solo scavenge" )choice: cardJ1-picked
	then;
	choice( "Take everyone" )choice: cardJ1-group
	choice( "Take one other person" )choice: cardJ1-one
;

// END Shop Smart


// Uncomment the below as you want, to overwrite the hotkeys from cyoa-example-7types

// ' cardJ1-test 1 hotkey!
// ' cardJ2-test 2 hotkey!
// ' cardJ7-test 3 hotkey!
' cardJ4-test 4 hotkey!
// ' goodfx 5 hotkey!
// ' bitefx 6 hotkey!
// ' goodfx 7 hotkey!
// ' card-deleteme 8 hotkey!
' goodfx 9 hotkey!

} }


