begintalkscript;

variables;
short pcs;

begintalknode 1;
	state = -1;
	nextstate = 1;
	question = "Abhijit";
	text1 = "The tiger here is proud, strong, and appears to be patently sage.";
	text2 = "He nods and smiles as best he can.  _You rescued Baldev, or so I hear.  For this, I am grateful._";
	text3 = "_My name is Abhijit.  I am the leader of this tribe, and I am grateful to have you in my presence._";
	text5 = "Abhijit is still standing here, waiting for you to say something.";
	action = INTRO;

begintalknode 2;
	state = 1;
	nextstate = 2;
	question = "Do you lead all of the tigers here?";
	text1 = "He shakes his head and lets the skin hanging loosely on his face dance to and fro.  _Well.  Sort of._";
	text2 = "_The tigers here do as they will.  I control their actions as much as they let me.  Although most of the tigers here will obey me and protect me as a matter of course._";
	text3 = "Most of them...?";
	text4 = "_I basically have the most power, so the others tend to gravitate towards me._";

begintalknode 3;
	state = 2;
	nextstate = -1;
	condition = char_ok(37) == TRUE;
	question = "Most of the tigers obey you, but who doesn't?";
	text1 = "_Phanishwar does not.  He is to the southeast._";
	text2 = "_He is deceitful and does wishes for nothing more than his own prosperity and wealth.  He has never protected this tribe, and only the most vile tigers join him._";
	text3 = "_If you were to kill him, I'm sure nobody would mind._";

begintalknode 4;
	state = 1;
	nextstate = -1;
	condition = char_ok(37) == FALSE && get_flag(49,0) == 0;
	question = "Phanishwar is dead.";
	text1 = "Abhijit nods.  _This I know already.  Do not think me ungrateful.  I have no material rewards, but I may still have a boon to bestow._";
	text2 = "_Place your hands upon the top of my head._  You do so.  Suddenly, you feel a rush of adrenaline through your body.  Your fingers twitch anxiously, and your limbs feel lighter.";
	text3 = "_You will now move with greater speed.  Consider this your reward._";
	text4 = "(Characters with less than 1 level of Quick Strike, Parry and Gymnastics now have a level in each.)";
	code = 
		pcs = 0;
		while(pcs <= 3){
			if(char_ok(pcs) == TRUE){
				if(get_stat(pcs,19) == 0){
					alter_stat(pcs,19,1);
				}
				if(get_stat(pcs,20) == 0){
					alter_stat(pcs,20,1);
				}
				if(get_stat(pcs,23) == 0){
					alter_stat(pcs,23,1);
				}
			}
			pcs = (pcs + 1);
		}
		set_flag(50,0,1);
break;

begintalknode 5;
	state = 2;
	nextstate = -1;
	condition = get_flag(50,0) > 0 && get_flag(51,0) == 0;
	question = "Does anyone else resist your rule?";
	text1 = "_Vajramani hesitates when hearing my orders, and won't let those who are not his fellows into his domain.  He prefers isolation._";
	text2 = "_I do not mind this, but then it irritates me that he seeks protection in my cave still._";
	text3 = "_If you find a way to kill them off, I won't be too offended.  But you didn't hear that from me._";

begintalknode 6;
	state = 2;
	nextstate = -1;
	condition = get_flag(50,0) > 0 && get_flag(51,0) > 0;
	question = "Does anyone else resist your rule?";
	text1 = "_Well, ever since you murdered both Phanishwar and Vajramani, essentially cutting our tribe in half, no._";
	text2 = "_I'm not entirely grateful that you killed Vajramani.  Still, his fellows attacked you first.  Not that you weren't warned..._";
	text3 = "_I'm not entirely grateful that you waltzed in and slew Vajramani without giving them a chance to surrender, but they probably wouldn't have.  I think._";
	code = 
		if(get_flag(45,0) > 1){
			remove_string(2);
		}
		else{
			remove_string(3);
		}
break;

begintalknode 7;
	state = 1;
	nextstate = -1;
	condition = get_flag(44,0) >= 1 && get_flag(52,0) == 0;
	question = "There is a secret passage with a rune in these caves.";
	text1 = "Abhijit nods.  _Yes, this I know.  Unfortunately, the rune is something which none of us may pass around._";
	text2 = "_I would be curious to see what is inside of there._";
	code = 
		set_flag(52,0,1);
break;

begintalknode 8;
	state = 1;
	nextstate = -1;
	condition = get_flag(44,0) == 3 && get_flag(52,0) == 1;
	question = "I have been inside of the secret passage in these caves. (Describe)";
	text1 = "You describe the interior of the room you found inside of the passage.  Abhijit seems interested, but also a bit perplexed and disappointed.";
	text2 = "_Right.  Thank you, even though this does nothing for me.  What a curiosity._";
	code = 
		award_party_xp(250,50);
		set_flag(52,0,2);
break;

begintalknode 9;
	state = 1;
	nextstate = 3;
	question = "Tell me about the various tiger leaders here.";
	text1 = "_Well, there are five.  There's myself, Baldev, Vajramani, Jishnu and Phanishwar._";
	text2 = "_Well, there are four.  There's myself, Baldev, Jishnu and Phanishwar._";
	text3 = "_Well, there are four.  There's myself, Baldev, Vajramani and Jishnu._";
	text4 = "_Well, there are three.  There's myself, Baldev and Jishnu._";
	code = 
		clear_strings();
		if(get_flag(50,0) == 0 && get_flag(51,0) == 0){
			add_string(1);
		}
		if(get_flag(50,0) == 0 && get_flag(51,0) == 1){
			add_string(2);
		}
		if(get_flag(50,0) == 1 && get_flag(51,0) == 0){
			add_string(3);
		}
		if(get_flag(50,0) == 1 && get_flag(51,0) == 1){
			add_string(4);
		}
break;

begintalknode 10;
	state = 3;
	nextstate = -1;
	question = "Tell me about yourself.";
	text1 = "_I don't mean to brag, but I have the most tigers under my command than anyone else.  My fellows number at nine, outnumbering Baldev by 1._";
	text2 = "_I give orders to those around me.  Some don't follow them, but most do.  Usually, however, the orders are rare and focus only on protecting the tribe._";

begintalknode 11;
	state = 3;
	nextstate = -1;
	question = "Tell me about Baldev.";
	text1 = "_I am the most powerful here, but Baldev is a close second with eight fellows under his command.  We agree in many ways, and I consider his fellows to be mine and vice-versa._";
	text2 = "_He is a wise leader.   Very wise.  Often times, I will come to him to decide what to do, and likewise will he come to me.  I trust him deeply, and I am grateful that you rescued him._";
	text3 = "_If you haven't already, you should see him about a reward.  He is known for his generosity and gratefulness.  You will find him to the northeast._";

begintalknode 12;
	state = 3;
	nextstate = -1;
	condition = get_flag(51,0) == 0;
	question = "Tell me about Vajramani.";
	text1 = "_He's a recluse.  He does us no harm, but simultaneously no good._";
	text2 = "_I heard a rumor that he brought back from a hunt not any sort of meat but rather two human magi.  I have not sent my fellows to check on this, though._";
	text3 = "_He's northeast of here.  But give him a wide berth, lest he slay you._";

begintalknode 13;
	state = 3;
	nextstate = -1;
	question = "Tell me about Jishnu.";
	text1 = "_He's the weakest of us lords of tigers.  He has only five fellows, and thus follows me in whatever I do._";
	text2 = "_He's definitely not a poor leader, although he just has no power.  He's southwest of me._";

begintalknode 14;
	state = 3;
	nextstate = -1;
	condition = get_flag(50,0) == 0;
	question = "Tell me about Phanishwar.";
	text1 = "_He's maniacal, and I suspect that he would kill us all if it was in his grasp._";
	text2 = "_He only has five fellows, but he has considerable power since he has tamed two powerful, deformed lizards who are capable on taking on more than one of our warriors._";
	text3 = "_If you were to kill him, well...  Nobody else would mind.  You'll find him southeast of here._";

begintalknode 15;
	state = 1;
	nextstate = -1;
	condition = get_flag(47,0) >= 1 && get_flag(53,0) == 0 && get_flag(50,0) == 0;
	question = "There are skeletons of tigers in Phaishwar's trove.";
	text1 = "Abhijit nods.  _I know this.  Unfortunately, I cannot do anything about it without killing many of my fellows in the process._";
	text2 = "_Small though his numbers are, Phanishwar is very fierce, and individually perhaps more powerful than myself.  I would be grateful, though, were you to annihilate him._";
	code = 
		set_flag(53,0,1);
break;

begintalknode 20;
	state = -1;
	nextstate = 5;
	question = "Baldev";
	text1 = "Baldev seems pleased to see you, and understandably so.";
	text2 = "He waits for you to talk since he clearly doesn't have to introduce himself.";

begintalknode 21;
	state = 5;
	nextstate = -1;
	question = "Hello, Baldev.  How have things been going?";
	text1 = "_Very well, Specialists.  Thank you for asking.  My fellows are grateful to have me back._";
	text2 = "_Very well, Specialist.  Thank you for asking.  My fellows are grateful to have me back._";
	text3 = "_Very well, brave warriors.  Thank you for asking.  My fellows are grateful to have me back._";
	text4 = "_Very well, brave warrior.  Thank you for asking.  My fellows are grateful to have me back._";
	code = 
		clear_strings();
		if(get_flag(63,2) > 1){
			if(party_size() > 1)
				add_string(1);
			if(party_size() == 1)
				add_string(2);
		}
		else{
			if(party_size() > 1)
				add_string(3);
			if(party_size() == 1)
				add_string(4);
		}
break;

begintalknode 22;
	state = 5;
	nextstate = -1;
	question = "Is there anything else you would have us do for you?";
	text1 = "He shakes his head in what appears to be shame.  _No.  I cannot ask that of you._";
	text2 = "_You have saved my life and avenged the death of my fellows by killing the wretched Bugbear Mage.  I can ask little else of you, especially since I have nothing more to give you._";
	text3 = "_You have done enough.  Really you have._";