
moment{

: subjname subject .colourname ;

: guilt

	subject? if "There's just the slightest pang of guilt, but it passes." +crtext then;

	($ subjname .. " feels like " .. subject xhe .. " is to blame for all of this." $) +crtext

	subject .morale2-
;

: winner

	subject? if "Hooray!" +crtext then;

	alone? if
		($ "Victory! " .. subjname .. " pats " .. subject xhim .. "self on the back." $) +crtext
	else
		($ "Victory! Everyone cheers and pats " .. subjname .. " on the back." $) +crtext
	then

	morale++all
	subject attitude++
;


: loser

	subject? if "Nice one!" +crtext then;

	// TODO: Add your own stats logic to determine if people respond at
	// all, and/or if a specific person responds and acts up etc.

	alone? if
		($ subjname .. " shakes " .. subject xhis .. " head at " .. subject xhim .. "self." $) +crtext
	else
		($ Everyone .. " gives " .. subjname .. " the stink eye." $) +crtext
	then

	morale--all
	subject attitude--
;


: death
	subject? if then; // Nobody died?!

	team-count 1 < if
		"There's no one around to carry on the dream of Canada." +crtext
	then;
	
	($ rando .colourname .. " is deeply affected by " .. subject .colourname .. "'s death." $) +crtext

	rando .morale--
	rando .attitude--
;


// TODO: Possible moment types
// - some abstract/generic, some more specific
(*

: asshole ;
: inappropriate ;
: frustrating ;
: annoying ;
: awkward ;
: happy ;
: sad ;
: gain ;
: loss ;
: scary ;
: creepy ;
: fart ;
: satisfaction ;
: funny ;
: revenge ;
*)

(*
	SYNTAX:
	social [blameless] [<character> instigated/subject!] <moment-word> moment

		* stuff in [] is optional
		* by default, the subject is set to the current CYOA
		choicechar
			* if the subject is 0=, then nobody in particular was to
			blame for the event
		* a randomly shuffled stack of affected team members is set in
			the value "affected"
		* you can use RANDO to get the top "affected" character and
		have them respond, or handle them all using forech. Up to you
		and the type of moment. The affected stack is pre-shuffled.

	CALL EXAMPLES

	social asshole moment 								// SUBJECT (usually CHOICECHAR) does something assholish or stupid
	social blameless death moment						// Someone died
	social death moment									// SUBJECT caused someone to die
	social blameless creepy moment 						// Something general happens with zombies or a dead body
	social funny moment									// SUBJECT is a comedian
	social blameless funny moment						// Something generally funny happens

Handy stuff to put in your hack.df file for testing the below:

	: newguy char-gen to recruitee recruited beep ;
	' mtest 1 hotkey!
	' newguy 2 hotkey!
	
*)

}

cyoa{

cyoa-choice: mresult5 
	"There will be more hot dog eating contests in the future." cyoa-text! 
	someicon
	social blameless winner moment
	social guilt moment
;

cyoa-choice: mresult4
	"This could have been prevented!" cyoa-text! 
	social blameless loser moment
	team-count 0 > if 
		choice( "Well, life goes on" )choice: mresult5
	then
;

cyoa-choice: mresult3 
	($ cname .. " explodes in a pulpy mess!" $) cyoa-text! 
	TEAM_STATUS_DIED cchar .decruit
	social death moment	bitefx
	choice( "Dang it" )choice: mresult4
;

cyoa-choice: mresult2 
	($ cname .. " eats another 100 hot dogs!" $) cyoa-text! 
	social winner moment 
	charchoice( ": Wooooo!" )choice: mresult3
;

cyoa-choice: mresult1 
	($ cname .. " gets to 99 hot dogs and then literally, not figuratively, chokes." $) cyoa-text! 
	social loser moment 
	charchoice( ": Wait I can do this!" )choice: mresult2
;

cyoa: mtest
	"There's a hotdog eating competition! Yee-haw!" cyoa-text!
	soloer charchoice( " eats 100 hot dogs" )choice: mresult1
;

}
