begintownscript;
variables;
short choice;
short i,erase;
short tick1 = 0,tick2 = 0;
short xfall,yfall;

body;
beginstate init_state;
i = 0;
while(char_ok(i) == 0){
	i = i + 1;
}
set_char_dialogue_pic(6,305,0);
set_character_facing(i,4);
break;

beginstate start_state;
if(has_item(496) == 1){
	take_item(496);
	set_flag(0,8,1);
	change_spec_item(1,1);
	message_dialog("You wordlessly bend down to pick up Fabian. Your friend is remarkably light, he has cast off all of his armor and gear and the Cryoprev has wasted away the muscles and fat stores of his body.","His body shakes as you shoulder his weight, it takes you a moment to realize that he's-- laughing.");
	erase_char(6);
}

break;

beginstate exit_state;
break;

beginstate 10;
block_entry(1);
message_dialog("The blood trail winds further into the mountains, you can't leave until you know the truth about your group's final moments, and Fabian's demise.","");
break;

beginstate 11;
if(get_flag(0,0) == 0){
	set_flag(0,0,1);
	reset_dialog();
	add_dialog_str(0,"The blood stains continue on in regular intervals. Fabian must have lost a lot of blood if all of this is his, the chance that he's alive is getting slimmer.",0);
	add_dialog_str(1,"A familiar roar reaches your ears from far in the distance, from what direction exactly you can't be sure.",0);
	add_dialog_str(2,"This time you don't pick up your pace, don't begin sprinting wildly for cover. You'll have to face the Beast eventually, and now you are in peak physical condition, and with no wounded companions to slow you down.",0);
	add_dialog_str(3,"You keep walking, though. Come what may, finding Fabian remains the highest priority.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
}
break;

beginstate 12;
if(get_flag(0,1) == 0){
	set_flag(0,1,1);
	message_dialog("The ground ahead of you ends in a steep cliff, behind you the mountain soars another fifty feet or so. You can see for miles from your vantage just below the Spire's peak.","White, sloaping mountains, windswept crags, the speckles of green in the expanses of snow-- it's easier to appreciate the beauty of the mountains when you aren't struggling through the snow drifts.");
}
break;

beginstate 13;
if(get_flag(0,5) > 0){
	if((get_flag(0,12) == 0) && (get_flag(0,8) > 0)){
		set_flag(0,12,1);
		if(get_flag(0,11) > 0)
			message_dialog("You step up to the cliff again, this time with Fabian in tow. What you must do is clear, but that makes it no easier.","'Do what needs to be done, embrace your fate....'");
		else{
			set_flag(0,11,1);
			message_dialog("The precipice before you falls off into a thousand foot drop. Wind whips past the cliff, pulling at your shirt and tugging at your arms-- the end waits just a step away.","'Do what needs to be done, embrace your fate....'");
		}
		end();
	}
	if(get_flag(0,11) == 0){
		set_flag(0,11,1);
		message_dialog("The precipice before you falls off into a thousand foot drop. Wind whips past the cliff, pulling at your shirt and tugging at your arms-- the end waits just a step away.","The thought of your friend lying back in the cave torments you-- no, his fate is up to him. You can not bring yourself to destroy your best friend.");
		end();
	}
	end();
}
if(get_flag(0,10) == 0){
	set_flag(0,10,1);
	message_dialog("This precipice affords you a brilliant view of the mountains below. The afternoon sun glitters off the snow, nothing dares to breathe for fear of breaking the mountain's silence.","Except for the occasional roar, that is. You cock your head disinterestedly as another splits the air, it can't be long now. You'll make the creature regret leaving you alive.");
}
break;

beginstate 14;
if(get_flag(0,5) > 0)
	set_state_continue(22);
block_entry(1);
message_dialog("This path leads the last hundred yards or so to the very peak of the Spire. It isn't, however, the direction that Fabian took, his blood marks lead towards the entrance to a cave in the cliff face nearby.","");
break;

beginstate 15;
block_entry(1);
relocate_character(i,44,42);
set_character_facing(i,2);
force_view_center(44,42);
force_instant_terrain_redraw();
if(get_flag(0,2) == 0){
	set_flag(0,2,1);
	reset_dialog();
	add_dialog_str(0,"You heave a sigh as you descend into the cave, relieved to finally be out of the blistering heat of the sun. The air here is refreshingly cool, you strip off your gloves and shirt to better enjoy it.",0);
	add_dialog_str(1,"That done, you take a look around you; after all, your reason for coming here wasn't to refresh yourself. Fabian's bloodstains recede further into the mine-- at least you are starting to think it is a mine.",0);
	add_dialog_str(2,"Erasmus had said Amon Sul was built to guard gem mines higher in the mountains, which would support your theory. Also these tunnels certainly exhibit the gouged walls and reinforced ceilings characteristic of a mine.",0);
	add_dialog_str(3,"Whatever it was it was long ago abandoned, and is beginning to cave in. You proceed carefully, alert for any ambushes by the Beast, and for any signs of where Fabian has gone.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
}
break;

beginstate 16;
block_entry(1);
relocate_character(i,8,36);
set_character_facing(i,6);
force_view_center(8,36);
force_instant_terrain_redraw();
break;

beginstate 17;
if(get_flag(0,3) == 0){
	set_flag(0,3,1);
	message_dialog("Several corridors diverge off of this central gallery, but all of them have caved in. At the far end of the ruined cave you see the body of Fabian.","Your heart sinks-- the crumpled form of your friend leans back against the wall, devoid of any signs of life.");
}
break;

beginstate 18;
if(get_flag(0,4) == 0){
	block_entry(1);
	set_flag(0,4,1);
	reset_dialog();
	add_dialog_str(0,"Fabian sits in a pool of his own blood, leaning with his back against a boulder. Although he lies completely still, his face is flushed and sweat drenched.",0);
	add_dialog_str(1,"Last time you checked, corpses don't sweat. You pick up your pace to jog towards him. The  sound of your approach causes him to tiredly pick up his head, and fix his gaze on you.",0);
	add_dialog_str(2,"He looks at you in disbelief for a moment, before bursting out, _No-- NO-- d-don't hurt me, stay away from me-- you bloody fiend-- stay away! I-- I'll fight you..._",0);
	add_dialog_str(3,"He stares at you with wild-eyed fear, holding up his arms to ward you away, and scrambling to push himself as far back against the wall as he can.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);

	reset_dialog();
	add_dialog_str(0,"You approach with your hands held up in a hopefully disarming gesture, assuring him that you are his old friend, not that ravenous creature.",0);
	add_dialog_str(1,"The look of terror in his eyes slowly fades, replaced by..... laughter. _You poor fool, you don't even know, do you? You poor bloody fool, hiked all the way up here. God damn, Vincent, you really don't know..._",0);
	add_dialog_str(2,"The fever and shock have clearly gone to his head, his maniacal laughter continues on. You crouch by his side to tend to him.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);

	reset_dialog();
	add_dialog_str(0,"His left leg has sustained a serious wound, and although you can't see his stomache beneath his tunic you can tell from the blood that he is grievoulsy wounded there too.",0);
	add_dialog_str(1,"Combined with a plethora of other more minor scratches, the feverish glow in his eyes, and the heavy sweating, Fabian looks to be in pretty bad shape. You pull out your herb satchel, and begin stripping off what remains of his clothes.",0);
	add_dialog_str(2,"He pushes you away irritably, _What the hell are you doing?_ When you persist he grows belligerent. _Get the hell out of here with this junk. One moment you're tearing me up, next you're trying to put me back together. Just leave..._",0);
	add_dialog_str(3,"You begin to protest his accustations, but he grabs you by the collar and pulls you close. You can feel his warm breath. _You listen here, damnit, I know who killed me, I know what I saw. I know who ripped apart my friends with his bloody teeth._",0);
	add_dialog_str(4,"_I had to halfway take off your leg to escape-- why I bothered I don't know. Look at the goddamn facts, it was YOU back there, not the Beast. Look at the goddamn blood on your face and bloody tell me it wasn't you. TELL ME DAMN IT._",0);
	add_dialog_str(5,"You stare into his eyes in unaccepting disbelief. You feel his rapid breath, the sweat of his palms gripping your shoulders, the taste of blood, the taste of flesh, screams.....",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);

	reset_dialog();
	add_dialog_str(0,"The realisation slowly dawns on you-- he's right. You break away from his grip. You stagger backwards, your head is spinning-- the world is spinning. You feel like you're going to faint, you feel nauseous. You double over and vomit.",0);
	add_dialog_str(1,"Fabian has relaxed now. The glint in his eye is gone, as is the burning anger. _I'm sorry, friend. It was the drug-- it did it to all of us. It's doing it to me now. It just hit you worst. I-- I'm sorry._",0);
	add_dialog_str(2,"The words reach you as if from miles away, you hardly hear him, there is nothing but the feeling of emptiness and revulsion.",0);
	add_dialog_str(3,"Your stomache now purged, you turn to your blood stained face. You scrub at it viciously but can't wash away the sense of uncleanness. You writhe on the floor clutching at your face, trying to escape your own body.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);

	reset_dialog();
	add_dialog_str(0,"The bodies-- the mangled bodies. The blood sprayed across the floor-- the blood on your face..... What have you done?",0);
	add_dialog_str(1,"Fabian's voice drones on from the distance, he stares vaccantly past you. _It's always burning now-- always hungry, always hot. It's the drug, the Cryoprev is driving me now._",0);
	add_dialog_str(2,"You blindly claw through your pack, for what you aren't sure until your hands grip around the glass vial. You hold it close, and read the label through blurred-red vision: 'Cryoprev: For the treatment of frostbite and hypothermia...'",0);
	add_dialog_str(3,"_It won't let you die, not if it can help it. It rebuilt your body in just two days, but look at me... Look at me... The Cryoprev is in charge now, and it won't let you die. When it takes over the madness is on, you see nothing..._",0);
	add_dialog_str(4,"'Warnings: Cryoprev accelerates the metabolism.... Patients diagnosed with..... Cryoprev can cause drastic and dangerous changes in the body's metabolism if used inappropriately. Use proper dosages to prevent this and other long term effects...'",20);
	add_dialog_str(5,"_From your eyes I could tell, tell it wasn't really you. The drug was hungry, it needed energy to burn. It's sweating away our lives..._",0);
	add_dialog_str(6,"A seperate sticker attached to the bottom of the label reads: 'Cryoprev has been recalled due to dementia, long term metabolism damage, and other brain damage associated with spikes in internal temperature....'",20);
	add_dialog_str(7,"'Continued use is disadvised, the drug should never be taken without consent of a doctor. Patients who have taken the drug and complain of blurry vision should see their doctor....'",20);
	add_dialog_str(8,"'Cryoprev Batch No.19 is officially under recall.' You let the vial roll out of your hand, and lie in silence for minutes, gasping for breath between the retching and coughing.",20);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);

	reset_dialog();
	add_dialog_str(0,"You lie on the ground, sobbing, vomiting, scrubbing, anything to rid yourself of those haunting images.",0);
	add_dialog_str(1,"The gouge marks raking Burden's face, Ainsley's mutilated visage, Adrianna's once wordless scream that now echoes through your head, they all flash through your mind. The screams, the pleas...",0);
	add_dialog_str(2,"Fabian's voice reaches your ears again, _Do you hear that? That's why we're here, they died for a reason, damn it I'M dying for a reason. LISTEN DAMN IT!_",0);
	add_dialog_str(3,"This time you hear the reverberating roar, whether it's because you were listening more attentively or if the noise is just getting closer, you'll never know.",0);
	add_dialog_str(4,"You lie still, wanting to tear yourself from your own body, to escape the things you've done. Useless, all useless...",0);
	add_dialog_str(5,"_STAND UP, DAMN IT! STAND UP YOU BLOODY COWARD! Look what you've done to me, look what you've done to all of us! I'm telling you to stand up, to kill that goddamn creature and end this-- fate knows I can't. NOW DO IT!_",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
	activate_hidden_group(1);
	force_view_center(39,23);
	set_character_pose(i,2);
	set_character_facing(i,4);
	force_instant_terrain_redraw();
	pause(5);

	reset_dialog();
	add_dialog_str(0,"The next thing you know, you are standing upright with sword in hand-- how you got there you don't know, your friend's words struck a chord, one powerful enough to drag you from your misery and self loathing.",0);
	add_dialog_str(1,"So it is that you now face the Beast, the last of your expedition left to do so. The creature stands panting, blue-black pelt glistening with perspiration. You stare into the ravenous eyes, face down the slavering jaws untrembling.",0);
	add_dialog_str(2,"The creature is huge, thrice the size of a full grown man and rippling with muscle. Its movements are ungainly and lurching, but it is strangely quick and agile, bursting forward from a standstill to a frenzied sprint in an instant.",0);
	add_dialog_str(3,"It is this last ability that it chooses to show off now. The creature bears down on you, massive claws scrabbling through the cave's rubble to gain footing, spraying stones and dust behind it-- it has smelled its next meal.",0);
	add_dialog_str(4,"As the burning eyes grow rapidly closer, and with them the drooling behemoth that has hunted you so ruthlessly and with such voracity, the strangest, most laughable thought passes through your head-- you are famished.",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);

}
break;

beginstate 19;
set_flag(0,5,1);
reset_dialog();
add_dialog_str(0,"It is over, the Beast is dead. Lying at your feet, the creature has lost the supernatural air it once had about it. It is no fiend, no evil scourge, and it wasn't immortal. What it is, however, you can't be sure of. ",0);
add_dialog_str(1,"Its body is swollen and has grown prolificly although disproportionately, but beneath the bulk and muscle, the thick, shaggy hair, the claws that could easily envelope your head, you see a familiar form.",0);
add_dialog_str(2,"Its cloudy eyes once burned with the hunger you feel even now, its body drenched in the sweat that turns your own skin sticky. You have a vague idea of how it got to be the way it is now, how a creature becomes a monstrosity like the Beast.",0);
add_dialog_str(3,"Just an idea.... Regardless, it is over now. What it was or how it got to be that way matter not to the people of Manibor, and it matters not to you. The creature is dead, you've done what you came here for. You turn to see Fabian smiling.",0);
add_dialog_choice(0,"OK");
choice = run_dialog(1);
break;

beginstate 20;
if((get_flag(0,4) > 0) && (get_flag(0,5) == 0)){
	block_entry(1);
	print_str_color("Not during combat.",1);
	end();
}
if((get_flag(0,5) > 0) && (get_flag(0,6) == 0) && (get_flag(0,7) == 0)){
	set_flag(0,7,1);
	message_dialog("Fabian lies on the floor, his life slowly ebbing away from him, sapped by the burning of his own body. You have the strong desire to speak to your friend again, no doubt for the last time.","");
}
if((get_flag(0,6) == 1) && (get_flag(0,8) == 0) && (get_flag(0,9) == 0)){
	set_flag(0,9,1);
	message_dialog("You can feel Fabian's eyes following you as you walk from the room, pleading with you to turn back. You turn to see him gripping his dagger, biting his lip as he struggles with himself. Then he sags back, dropping the weapon in resignation.","You turn to leave. Fabian's business is his; you have enough to think about.");
}
break;

beginstate 21;
if(has_item(496) > 0)
	end();
if((get_flag(0,6) > 0) && (get_flag(0,8) == 0)){
	set_flag(0,8,1);
	change_spec_item(1,1);
	message_dialog("You wordlessly bend down to pick up Fabian. Your friend is remarkably light, he has cast off all of his armor and gear and the Cryoprev has wasted away the muscles and fat stores of his body.","His body shakes as you shoulder his weight, it takes you a moment to realize that he's-- laughing.");
	erase_char(6);
}
break;

beginstate 22;
if(get_flag(0,5) == 0)
	end();
reset_dialog();
add_dialog_str(0,"You are hungry. Your body screams for food-- for nourishment to keep it from devouring itself. Your friends' mangled bodies flash through your mind, the hungered look in the Beast's eyes.",0);
add_dialog_str(1,"How long? How long before you are like that? Out in the mountains there are places no man trods, where you could live to feed the burning inside you and perhaps never kill again.",0);
add_dialog_str(2,"_No time for cowardice, no time for selfishness..._ the words float through your mind, but you can't even remember who said them. You are increasingly unfamiliar with your own self. How long?",0);
if(get_flag(0,8) == 0)
	add_dialog_str(3,"You know in your heart that if you leave now you will never return-- that this is perhaps the last time you are in control of yourself. So hungry, need to live...",0);
else
	add_dialog_str(3,"Fabian whispers weakly from your back, _No, Vincent. Nothing-- nothing there for us. The cliff-- the cliff-- remember what the drug made you do, and don't give in. Do what you must...._ So hungry, need to live....",0);
add_dialog_choice(0,"Into the mountains.");
add_dialog_choice(1,"Turn Back");
choice = run_dialog(1);
if(choice == 2){
	block_entry(1);
	end();
}
reset_dialog();
add_dialog_str(0,"As you march into the mountains one thought alone fills your mind, the desire to feed, to find destroy and consume. A new terror now roams the Rim.",0);
add_dialog_str(1,"Sometimes you can remember a time when you were a soldier, a man sent here to destroy the Beast. But that is only a memory of a memory. The past is so dim, so airy and insubstantial it might as well have never existed.",0);
add_dialog_str(2,"Vincent Graff is dead.",0);
add_dialog_str(3,"The Beast of the Rim is reborn.",0);
add_dialog_choice(0,"OK");
choice = run_dialog(1);
end_scenario(0);
break;

beginstate 23;
if(get_flag(0,5) == 0)
	end();
reset_dialog();
add_dialog_str(0,"'Embrace your fate and don't flinch.....' You stand on the edge of the precipice, looking out across the great fall. The mountain calls.",0);
if(get_flag(0,8) == 1){
add_dialog_str(1,"Apparently you spoke aloud, because Fabian speaks up faintly, _I can hear it too, Vincent. So this is it-- this is how heroes die. Just know that I hold none of this against you-- you were true to the end. Farewell._",0);
add_dialog_str(2,"You breath deap, feeling the hunger, the burning. The drug's tendrils have wrapped around your mind, you can do nothing, you are helpless. The bodies, the Beast's eyes...",0);
add_dialog_str(3,"NO! You step forward purposefully; step out into-- nothingness. You fall and fall-- and as you do the tendrils unwrap, you see clearly-- you are free.",0);
}
else{
add_dialog_str(1,"You breath deap, feeling the hunger, the burning. The drug's tendrils have wrapped around your mind, you can do nothing, you are helpless. The bodies, the Beast's eyes...",0);
add_dialog_str(2,"NO! You step forward purposefully; step out into-- nothingness. You fall and fall-- and as you do the tendrils unwrap, you see clearly-- you are free.",0);
}
add_dialog_choice(0,"OK");
choice = run_dialog(1);

relocate_character(i,25,36);
force_view_center(25,36);
force_instant_terrain_redraw();

play_sound(-84);
set_character_pose(i,11);
force_instant_terrain_redraw();
pause(2);

set_character_pose(i,12);
force_instant_terrain_redraw();
pause(2);

set_character_pose(i,13);
force_instant_terrain_redraw();
pause(2);

set_character_pose(i,14);
force_instant_terrain_redraw();
pause(2);



reset_dialog();
if(get_flag(0,8) == 1){
add_dialog_str(0,"Vincent Graff is dead.",0);
add_dialog_str(1,"The Beast is dead.",0);
add_dialog_str(2,"Your fate is fulfilled.",0);
}
else{
add_dialog_str(0,"Vincent Graff is dead.",0);
add_dialog_str(1,"A Beast is dead, but another will rise.",0);
add_dialog_str(2,"You did all you could bring yourself to do.",0);
}
add_dialog_choice(0,"OK");
choice = run_dialog(1);

pause(3);
set_character_pose(i,0);
end_scenario(1);
break;
