
// This gets saved/loaded for use in misc gamemode logic checks via the gamemode? word
0 value gamemode-word

: gamemode gamemode_applyword if gamemode_applyword dup to gamemode-word then; gamemode-word ;

gamedef{

: gamemode? gamemode v= ;

(*
	USAGE:

	The 'gamemode' word contains the current mode in the form of the word set with 'applyword'. To check the current
	mode against a specific mode, use: ' <gamemode word to check> gamemode? if ...

	To call the word for the currently selected mode, use: gamemode execute
*)

: 13diffscalar road{ 1.3 to diff-scalar } ;
: 15diffscalar road{ 1.5 to diff-scalar } ;
: 16diffscalar road{ 1.6 to diff-scalar } ;
: 2diffscalar road{ 2 to diff-scalar } ;

: ezbandit road{ 1 to easybandit-mode } ;
: specialmode road{ 1 to specialchar-mode } ;
: familiarmode road{ 1 to familiar-mode } ;

: defaultmode
	ezbandit
;

: longroad
	road{ 25 to nearcanada-day 1 }
	ezbandit
;

: specialchars
	specialmode
	ezbandit
;

: familiarchars
	familiarmode
	ezbandit
;

: specialcharsEX
	specialmode
	16diffscalar
;

: familiarcharsEX
	familiarmode
	16diffscalar
;

: make-a-kepa 0 args( charnum )
	char-gen -> charnum ;

: kepamode
	char-gen to recruitee 
	"Kepa" recruitee .name!
	0 recruitee .female!
	0 recruitee .hairtype!
	0 recruitee .bodytype!
	6 recruitee .headtype!
	0 recruitee .torsotype!
	2 recruitee .legstype!
	0 recruitee .facetype!
	1 recruitee .hairtype!
	0 recruitee .hattype!
	0 recruitee .glassestype!
	0 recruitee .specialtype!
	0 recruitee .speed_bonus!
	0 recruitee .skincolour!
	15 recruitee .haircolour!
	WEAPON_CARDBOARD recruitee .weapona!
	5 recruitee .shooting! 5 recruitee .strength! 3 recruitee .fitness!	2 recruitee .morale!
	0 recruitee .wits! 0 recruitee .attitude! 0 recruitee .temperament! 0 recruitee .loyalty!
	recruitee .fitnessREV recruitee .strengthREV recruitee .shootingREV
	recruitee .witsREV recruitee .attitudeREV recruitee .temperREV recruitee .loyaltyREV
	1 recruitee .vitality! 1 recruitee .health! recruitee .recruit
	2diffscalar
;

: shortroad
	road{ 9 to nearcanada-day }
	ezbandit
	// road{ 1.3 to diff-scalar }
;

: marathonmode
	road{ 30 to nearcanada-day }
	15diffscalar
;

: deadlier
	13diffscalar
;

: UNLOCKM cr$ .. cr$ .. "UNLOCK: " rbold ;

icons16_id 0x 20 + constant MODE_ICONS

: modedefs
	"Death Road Normal Mode" $mode
		"The normal, default game mode.
		Get your skis, pack a toque... we're going to CANADA!
		Most road recruits you find will be random, but sometimes you'll be more lucky." $desc
		MODE_ICONS 0 + icon
		' defaultmode applyword
		
	"Familiar Characters Mode" $mode
		"Most road recruits you meet are now familiar characters, instead of random!
		These are characters that you've created and saved. Make your friends and family, and they'll show up in the game!" $desc
		// You can also import other people's characters.
		MODE_ICONS 0x 8 + icon
		' familiarchars applyword	
	
	"Rare Characters Mode" $mode
		"Most road recruits you meet are now special characters with unique abilities!
		This usually can make things a little easier.
		But not always." $desc
		MODE_ICONS 0x 3 + icon
		' specialchars applyword
		
	"Short Trip to Heck Mode" $mode
		"For impatient people that want a risky shortcut!
		It takes 9 driving days to get to Canada, rather than the default 15 days.
		Be careful, this means less days to prepare for the end!" $desc
		MODE_ICONS 0x 1 + icon
		' shortroad applyword
		gstats{ wins-normal 1 < wins-special 1 < wins-family 1 < } and and if 1 locked
		"A quick 9 driving day mode.
		Unlock by beating any of the normal difficulties. Death Road Normal Mode, Familiar Characters Mode, or Rare Characters Mode." $desc
		then
		
	"Long Winding Road Mode" $mode
		"For people that like to chill and take it easy.
		It takes 25 driving days to get to Canada, rather than the usual 15 days.
		Difficulty progression starts the same, but gets higher! At least you get more time to prepare." $desc
		MODE_ICONS 0x 2 + icon
		' longroad applyword
		gstats{ wins-normal 1 < wins-special 1 < wins-family 1 < } and and if 1 locked
		"A longer 25 driving day mode.
		Unlock by beating any of the normal difficulties. Death Road Normal Mode, Familiar Characters Mode, or Rare Characters Mode." $desc
		then
		
	"Deadlier Road Mode" $mode
		"30% more danger! 30% more excitement!
		About 30% more zombies.
		Bandits are more cruel." $desc
		MODE_ICONS 0x 4 + icon
		' deadlier applyword
		gstats{ wins-normal 1 < wins-special 1 < wins-family 1 < } and and if 1 locked
		"A tougher challenge! Gateway to harder modes!
		Unlock by beating any of the normal difficulties. Death Road Normal Mode, Familiar Characters Mode, or Rare Characters Mode." $desc
		then
		
	($ "Familiar Characters " .. RAINBOW .. "EXTREME" .. WHITE $) $mode
		"Most recruits you meet are familiar characters!
		Make sure your custom characters are strong and work together well, because they will be facing 160% the usual amount of zombies.
		Bandits are more cruel." $desc
		MODE_ICONS 0x a + icon
		gstats{ wins-deadlier 1 < wins-family 1 < } or if 1 locked
		"Very difficult challenge with custom characters!
		Unlock by beating both Deadlier Road Mode and Familiar Characters Mode." $desc
		then
				
	($ "Rare Characters " .. RAINBOW .. "EXTREME" .. WHITE $) $mode
		"Most recruits you meet are special characters!
		This is combined with the amount of zombies set to 160%. Can the unique characters you find survive gigantic walls of undead?
		Bandits are more cruel." $desc
		MODE_ICONS 0x 6 + icon
		' specialcharsEX applyword
		gstats{ wins-deadlier 1 < wins-special 1 < } or if 1 locked
		"Very difficult challenge with special characters!
		Unlock by beating both Deadlier Road Mode and Rare Characters Mode." $desc
		then
		
	($ "Marathon" fbold .. " Mode" $) $mode
		"A grueling challenge.
		It takes 30 driving days to get to Canada, rather than the usual 15 days. About a month of pain!
		Zombie amount starts off 50% higher than normal, and eventually goes to double. 
		Bandits are more cruel." $desc
		MODE_ICONS 0x 9 + icon
		' marathonmode applyword
		gstats{ wins-deadlier 1 < wins-long 1 < } or if 1 locked
		"Extremely difficult challenge, with 30 driving days!
		Unlock by beating both Deadlier Road Mode and Long Winding Road Mode." $desc
		then
		
	($ "K*E*P*A " fbold .. "MODE" $) $mode
		"Kepa Expert Player Advanced Mode.
		Double the zombies, double the fun.
		Start with a Kepa. Do NOT let Kepa die. The ultimate challenge.
		Bandits are more cruel." $desc
		MODE_ICONS 0x 5 + icon
		' kepamode applyword
		gstats{ wins-specialEX 1 < wins-familyEX 1 < wins-marathon 1 < } or or if 1 locked
		"Abandon all hope ye who enter here.
		Unlock by beating all of the hard difficulties. Familiar Characters Extreme, Rare Characters Extreme, and Marathon Mode." $desc
		then
;

modedefs

}
