

// Greeting...
action AcceptFriendshipOffer
{
	verb	  accept ;
	object	offer  friendship ;
} ;

action RejectFriendshipOffer
{
	verb	  reject ;
	object	offer  friendship ;
} ;

button IComeInPeace // this is where the yyval undefined happens (right after we get DeclareButton())
{
	text	  "I come in peace." ;
	action	AcceptFriendshipOffer ;

	do		FriendshipPlus ;
	do		SayDialogFromGroup RespondToIComeInPeace ;
} ;

button PrepareToDie
{
	text	  "Prepare to die." ;
	action	RejectFriendshipOffer ;
	
	do		FriendshipMinus ;
	do		SayDialogFromGroup RespondToThreat ;
} ;


dialog FriendlyWelcome
{
	text "Welcome!" ;
	
	action
	{
		verb	  offer ;
		object	friendship ;
	} ;
	
	button IComeInPeace ;
	button PrepareToDie ;
} ;

dialog RespondToFriendshipOfferReject
{
	attitude surprised ;
	text "Fine!" ;
} ;

dialog RespondToFriendshipOfferAccept
{
	attitude happy ;
	text "Excellent!" ;
	text "Please feel welcome to visit our planet." ;
} ;


// --- random test cases

dialog hello
{
	attitude happy ;
	
	text "hi there!" ;
	text "Welcome!" ;
	
	button "I'm here to kill you." ;
	button "I come in peace." ;
	button IComeInPeace ;
} ;

dialog goodbye
{
} ;

action SayBye
{
	verb	say ;
	object	bye chow shalom ;
} ;

action SayHi
{
	verb	say utter meow ;
	verb	caw ;
	object	hi salut shalom ;
} ;