
uses events/trade/trader-camp-shared.df

0 var trade-deck

cyoa{ road{ 
	
: trade-camp1 "events/trade/trader-camp-region1.df" ;
: trade-camp2 "events/trade/trader-camp-region2.df" ;
: trade-camp3 "events/trade/trader-camp-region3.df" ;
: trade-camp4 "events/trade/trader-camp-region4.df" ;
: trade-camp5 "events/trade/trader-camp-region5.df" ;
: trade-camp6 "events/trade/trader-camp-region6.df" ;
: trade-camp7 "events/trade/trader-camp-region7.df" ;
: trade-camp8 "events/trade/trader-camp-region8.df" ;
: trade-camp9 "events/trade/trader-camp-region9.df" ;
: trade-camp10 "events/trade/trader-camp-region10.df" ;
	
	deck-new
		card: trade-camp1
		card: trade-camp2
		card: trade-camp3
		card: trade-camp4
		card: trade-camp5
		card: trade-camp6
		card: trade-camp7
		card: trade-camp8
		card: trade-camp9
		card: trade-camp10
		
			
	constant TRADE-CAMP-DECK
	TRADE-CAMP-DECK var trade-camp-deck
	TRADE-CAMP-DECK shuffles to trade-camp-deck
	
: trade-camp-draw
	trade-camp-deck depths 0= if TRADE-CAMP-DECK shuffles to trade-camp-deck then
	trade-camp-deck drawcard
;

: gototradecamp 
	trade-camp-draw	$load-region to-mission 
;

: trade-draw
	choice( "Visit Trader Camp" )choice: gototradecamp
	choice( "Ignore Traders" )choice
	
;

: trade-msg ($ Thegroup .. " runs into a trading camp!" $) ;

: near-last-day-warn
	road-trip-days 3 + nearcanada-day = if 
	"Getting Closer to Canada" cyoa-title!
	"Canada is close! This is the second to last chance to trade!" else trade-msg then +crtext foodamt
;

: last-day-warn 
	road-trip-days nearcanada-day = if
	"Last Shop Before Canada" cyoa-title!
	"This is the last chance to trade! Good luck!" else trade-msg then +crtext foodamt
;

: end-trade-draw 
	cyoa-text! +cr foodamt trade-msg +crtext trade-draw 
;

cyoa: tradeevent
	"Trading on the Death Road" cyoa-title!
	road-trip-days 3 = if
		"Outside of Canada, most of society and civilization has been destroyed. You can still find people engaging in trade, with preserved food being the new currency." 
		end-trade-draw
	then;
	road-trip-days 6 = if
		($ Thegroup .. " feels a sense of dread. Something dangerous is coming. The road seems like it's getting steadily more crowded with the undead, and they're getting riled up." $) cyoa-text!
		near-last-day-warn
		trade-draw
	then;
	road-trip-days 9 = if
		"The drive to Canada used to take a few days, at most. The apocalypse filled the roads with debris, hordes of zombies, and lots of stranded cars. It's now a long trip." cyoa-text!
		last-day-warn
		trade-draw
	then;
	road-trip-days 12 = if
		($ "The road trip continues. The sky starts to turn an ominous red, as if the universe wants " .. thegroup .. " to fail." $) cyoa-text!
		near-last-day-warn
		trade-draw
	then;
	road-trip-days 15 = if
		($ "An enormous army of undead shambles around the carnage that surrounds the border to Canada. Many have tried to get through. Most only succeed in having their bodies added to the horde.
		Maybe " .. yourteam .. " will be different..." $) cyoa-text!
		last-day-warn
		trade-draw
	then;
	road-trip-days 24 = if
		($ "It's been a very long and winding road to Canada. " .. Thegroup .. " is now only a couple days away!" $) cyoa-text!
		near-last-day-warn
		trade-draw
	then;
	road-trip-days 25 = if
		($ "The end is in sight. At the end of this very long road is a massive amount of zombies, the natural end result of the hordes getting a little bigger every few days of travel.
		Maybe " .. yourteam .. " can make it!" $) cyoa-text!
		last-day-warn
		trade-draw
	then;
	50 %chance if
		($ Thegroup .. " is driving down a long stretch of road. No threats on the horizon, but not much else of interest, either. " $)
	else
		($ Thegroup .. " continues making progress along the Death Road. As long as one person remains alive, the dream of Canada lives on." $)
	then cyoa-text!
	+cr foodamt
	($ "Unexpectedly, " .. thegroup .. " finds someone " .. gthey .. " can trade with: " $)
		+crtext trade-draw
	
;

} }
