
cyoa{

: npc-panda-go 
	($ cname .. " starts following " .. pname .. " for awhile!" $) +crtext ccharget
;

: npc-panda-attack
	($ "The panda " .. "lashes out!" rbold $) +crtext pchar .ouch-- bitefx
;

cyoa-choice: npc-panda-food
	($ pname .. " offers the panda some food." $) text!
	50 %chance if 
		npc-panda-go
	else
		($ "The panda chomps on the food and then spits it out. Pandas are picky eaters, but you can keep trying with more food." $) +crtext badfx
	then	
	-1 add-food
;

cyoa-bridge: npc-panda-pull
	($ pname .. " pulls the panda towards " .. phim .. " in hopes that the animal follows. It seems like it's worth a shot." $) text!
	50 %chance if 
		npc-panda-go
	else
		npc-panda-attack
	then	
	
;

cyoa-choice: npc-panda-charm
	pchar charming? if 
		($ pname .. " uses " .. phis .. " natural charm to coax the panda to follow." $) text!
		npc-panda-go
	else
		($ "The panda just seems irritated by " .. pname .. "." $) text!
		npc-panda-attack
	then
;

// pchar .nonfatal if then

cyoa: npc-panda
	"Panda Panic" cyoa-title!
	nearest .character@ choosechar cicon
	($ "It's a panda, standing around the trashed building. It stares at " .. pname .. " with a blank expression. It may be possible to get it to follow you for awhile..." $) text!
		choice( "Leave it alone" )choice
		choice( "Pull the panda along" )choice: npc-panda-pull
		LOOT_FOOD pchar .lootamt@ 0 > if
			choice( "Lure it with food" )choice: npc-panda-food
		then
		choice( "Coax it with charm" )choice: npc-panda-charm	
;

}

: .panda
	35 over .specialtype!
	"Panda" over .name!
	WEAPON_CLAW over .weapon_default!
	6 over .strength!
	6 over .fitness!
	1 over .female!
	"is a panda..." over .job!
	dup cyoa{ ' npc-panda cyoa! }
	drop
;

locdef{
		
location
		tags: panda
		max-rooms: 2
		entry-tags: trashed
		script: set-theme-house
		pre-script: set-theme-house
		
		room-choice: trashed
			room-weight: 10
			room-count: 2
			room-script: nad
			room-post-script: still-npc .panda
			filter-only
			
}