;This file covers the scenes for the main quest in Blackscabbard and the nearby beach
;-------------------------------------------------------------------
SCENE 3, interiorBedroom, CUT, "Your House", 0, 0, 0
	MUSIC "home.mid"
	IF T2, @home
	COMPARE #<num.peopleInScene>, "1"
	IF> @shoo
	ACTOR 1, #<str.name>, "mirror", 1, 80, 90
	SEL 1
	POSE 1, 4, 4
	IF T1, @dressed
	WAIT 2
		N: You awaken from a restless night's sleep. 
	WAIT 2
		N: Last night's storm was the strongest in recent memory, and you could have sworn you heard a tree get blown over.
	WAIT 2
		1: *yawn*
		1: Man, last night was rough.
	WAIT 2
		N: You try to stand up, but your head begins throbbing.
	WAIT 2
		1: Ugh, maybe I shouldn't have had so much to drink last night. Still, it's not every day we finish taking back the North.
		1: Oh yeah, I should go get my stuff.
	WAIT 1
	HOST_GIVE G500
	SET shortRests, "2"
	HOST_GIVE T1
		N: You start getting dressed, when you hear a knock on the door.
@dressed
	WAIT 2
		1: Huh, I wonder who that might be?
	WAIT 2
	BKGND "interiorHouse.jpg"
	MOVE 1, -20, 70, 1
	WAIT 2
		N: You descend the stairs, put on a kettle, and answer the door.
	MOVE 1, 50, 50
	WAIT 2
		N: You hear the knock again. Whoever they are, 
		N: they're insistent about wanting to see you.

	WAIT 2
		1: I'm coming, I'm coming!
	MOVE 1, 50, 90
	WAIT 1
		N: You open the door to see three well-appointed men, 
		N: dressed in what you can only assume to be royal guard uniforms.
	WAIT 1
	MUSIC "RoyalMessenger.mid"
	ACTOR 2, "Royal Messenger", "joshRoyalty", 4, 120, 90
	ACTOR 3, "Bodyguard", "josh55", 1, 120, 85
	ACTOR 4, "Bodyguard", "josh55", 1, 120, 95
	SEL 2
	POSE 4, 11, 11
	SEL 3
	POSE 1, 4, 4
	SEL 4
	POSE 1, 4, 4
	MOVE 2, 80, 90
	MOVE 3, 85, 85
	MOVE 4, 85, 95
	WAIT 1
		2: Is this %1's residence?
		1: ...Yes?
	WAIT 2
		N: The messenger hands you an envelope with a wax seal 
		N: depicting the Aurean royal crest.
	WAIT 2
		2: You have been summoned to the capital by order of Her Majesty Queen Eilika to assist in the war effort against the forces of the Abyssal Tide.
	WAIT 1
	IF C1, @fighter
	IF C2, @wizard
	IF C6, @rogue
	IF C8, @cleric
	IF C5, @monk
	IF C3, @ranger
	IF C4, @bard
	IF C7, @druid
@fighter
		1: This is the day I've been training for for my whole life! I can't express how honored I am to be fighting in Her Majesty's service.
	GOTO @classdialogue1
@wizard
		1: Good to see Her Majesty isn't so blinded by superstition that she doesn't see the value in the arcane.
	GOTO @classdialogue1
@rogue
		1: If this is punishment for that little incident a few years ago, I'll have you know I've already done my time for that.
	GOTO @classdialogue1
@cleric
		1: Weren't clergy supposed to be exempt from military service? I suppose there's a dearth of healers these days.
	GOTO @classdialogue1
@monk
		1: I can't imagine what Her Majesty would want with an ascetic like me, but I'll go.
	GOTO @classdialogue1
@ranger
		1: Beasts, demons, it matters little to my bow what I'm up against. Count me in.
	GOTO @classdialogue1
@bard
		1: Would the army really have use for someone like me? I just sing for coin in taverns.
	GOTO @classdialogue1
@druid
		1: The Abyssal Tide is as much a threat to nature as it is to civilization, so our interests align here.
	GOTO @classdialogue1
@classdialogue1
		2: Please report to the capital as soon as possible. Now, I must be off.
	WAIT 1
	MOVE 2, 120, 50
	MOVE 3, 120, 45
	MOVE 4, 120, 55
	WAIT 3
		1: I guess I'd better get going. I should probably tell Mom where I'm headed first, though.
	WAIT 2
	HOST_GIVE T2
	GOTO LINK 1, 0
	END
@home
		N: Would you like to rest a while?
	MENU "Yes=@rest", "No=@norest"
@rest
		N: You collapse into your warm, familiar bed and quickly fall asleep.
	GIVE L1
	GIVE H30000
	GIVE M30000
	SET shortRests, "2"
END
@norest
		N: You decide not to sleep for now.
END
@shoo
		N: This scene won't work correctly with more than one person.
	EJECT "T999"
;-----------------------------------------------------

SCENE 4, interiorHouse, SCENE, "Mom's House", 0, 0
	MUSIC "mother.mid"
	ACTOR 1, "Enneleyn", "joshTownsfolk", 23, 30, 90
	COMPARE #<num.peopleInScene>, "1"
	IF> @shoo
	IF I116, @shard
	WAIT 2
		N: Your mother stands before you.
	WAIT 2
		H: Hi, Mom! So, I have some big news.
		1: What is it, dear?
		H: Looks like I'm going to meet the Queen. A royal messenger stopped by my house this morning to deliver the summons. It looks like they need me to help with the war effort.
		1: That's wonderful! An audience with Queen Eilika is a high honor. I'm so proud of you!
	WAIT 2
		N: Though your mother's face beams with pride, 
		N: the look in her eyes betrays a certain sadness.
	WAIT 2
	MUSIC "#silence"
	MUSIC "sad.mid"
		H: Is something wrong, Mom?
		1: *sniffle* No, it's just...
		1: Your father was also involved in this war, and he met his end fighting the Abyssal Tide's army.
		1: I'm worried the same thing might happen to you.
		H: I promise I'll be careful.
	IF C1, @fighter
	IF C2, @wizard
	IF C6, @rogue
	IF C8, @cleric
	IF C5, @monk
	IF C3, @ranger
	IF C4, @bard
	IF C7, @druid
	GOTO @classdialogue2
@fighter
		H: Besides, isn't this what I've spent all those years training for?
	GOTO @classdialogue2
@wizard
		H: Anyway, I have my spells. I'll be fine.
	GOTO @classdialogue2
@rogue
		H: In any case, I survived a year in one of the toughest prisons the Kingdom has to offer. It's gonna take more than a few demons to bring me down.
	GOTO @classdialogue2
@cleric
		H: You needn't worry about me. The gods will see me through this just as they have seen me through the rest of my life.
	GOTO @classdialogue2
@monk
		H: This military service will give me even stronger opponents to test my skills on. Personally, I can't wait.
	GOTO @classdialogue2
@ranger
		H: My training with the bow will help keep me well away from the main fighting. I should be fine.
	GOTO @classdialogue2
@bard
		H: Even if I do find myself in a sticky situation, you know me, I can always talk my way out.
	GOTO @classdialogue2 
@druid
		H: Cernunnos guides my path. So long as the seasons continue to change, so too will I be with you.
	GOTO @classdialogue2

@classdialogue2
	WAIT 1
	MUSIC "mother.mid"
		1: If you're sure, then I trust you.
		1: But before you go, your father gave me this to give to you if you ever decided to walk the same path as him.
		1: He said it will protect you. 
	WAIT 1
		N: Your mother hands you a shard of some crystal.
	HOST_GIVE I116
	WAIT 2
	CALL 9990@skillcheck, knowledge, #<num.hostWIS>, 0, 10
	COMPARE #<finalResult>, "2"
	IF= @arcanalore
	COMPARE #<finalResult>, "1"
	IF= @arcanalore
	COMPARE #<finalResult>, "0"
	IF= @arcanalorefailed
	GOTO @shard
@arcanalore
		N: (KNOWLEDGE) You feel a small magical presence within the shard.
	GOTO @shard
@arcanalorefailed
		N: The shard appears unremarkable.
	GOTO @shard
@shard
	IF T3, @saidgoodbye
	WAIT 2
		H: Thanks, Mom. I'll make sure to take good care of it.
		1: I won't keep you any longer. Go out there and make the Queen proud.
	HOST_GIVE T3
	END
@saidgoodbye
	IF T6, @investigation
		1: Not that it isn't lovely to see you again, but shouldn't you be on your way to the capital?
	END
@investigation
	IF T7|T9, @gotinfo
		1: Welcome back, dear. Weren't you supposed to be off to the capital?
		H: Yeah, but the bridge is out because a tree fell on it, so I'm helping Conrad with something while Heinrich fixes it. 
		H: You wouldn't happen to have seen anything suspicious over the last few nights, would you?
		H: Conrad says his sheep have been going missing.
		1: Come to think of it, I have. 
		1: I've been having trouble sleeping the last few nights, and when I was up a bit after midnight last night, I noticed some silhouettes out my window near the forest.
		1: They were hunched over like they were trying to sneak past.
		1: It looked like they were coming from the west.
		H: I see. Thanks for telling me.
		1: No problem, dearie.
	HOST_GIVE T7
	END
@gotinfo
		1: Welcome home, dearie. Care for some tea?
	END
@shoo
		1: The house is too messy for guests, dear.
	EJECT "T999"
;------------------------------------------------------

SCENE 5, villageBridge, CUT, "Bridge to the Forest", 0, 0
	COMPARE #<num.peopleInScene>, "1"
	IF> @shoo
	IF= @scenestart
@scenestart
	THEME 8
	ACTOR 1, #<str.name>, "mirror", 1, 20, 90
	IF T23, @mermaid
	ACTOR 2, "Heinrich", "josh97" 1, 50, 90
	FACE 2, 0
	SEL 2
	POSE 1, 4, 4
	IF T4, @bridgetold
	WAIT 2
		N: As you approach the bridge, you see Heinrich, the woodcutter.
	WAIT 2
		2: Hey there, %1. 
		1: Hey, Heinrich. I need to be getting to the capital. 
		1: You know the woods pretty well, can you tell me the quickest way through them?
		2: I'd love to, but the bridge is out until I can get it fixed. Last night's storm blew a tree over onto it. 
		2: I'm already almost done, but if you want something to do in the meantime, I remember hearing Elder Germund talking about something he needed done.
		2: There'll probably be some good coin in it for you too.
		1: Alright, I'll go look into that, then.
	HOST_GIVE T4
	END
@bridgetold
	IF T13, @bridgefixed
		2: Sorry, bridge still isn't fixed.
	WAIT 2
	GOTO EXIT
@bridgefixed
	IF T14, @forest
		2: Hey, %1, the bridge is fixed!
		2: Say, it occurs to me, you don't have a way to keep yourself warm at night and cook yourself food. 
		2: As it happens, I just had Baldrich make me a new axe, so I'll pass my old one on to you. I've even got a tinderbox and some spare firewood around here too. 
		1: Thanks! 
		2: As for how to get through the woods, just follow the road east and you'll eventually reach the next town.
		1: Alright, thank you!
		N: Note from Chomp, The forest isn't finished yet so you can't go there.
		N: Check back for more updates on the Discord!
	HOST_GIVE T14
	END
@forest
	MOVE 1, 200, 50, 1
	MOVE 2, 200, 50, 1
	GOTO LINK 6, 0
	END
@mermaid
	IF T24, @forest
	ACTOR 2, "Aerwyna", "joshMiscellaneous", 12, 70, 45
	POSE 12, 13, 12
		1: The river here ought to be devoid of water bugs. Hopefully.
		2: If you say so. I don't know if I can breathe in fresh water, though. I've never tried it.
	WAIT 1
	MOVE 2, 200, 50, 1
	WAIT 1
		N: Aerwyna dives underwater.
	WAIT 2
		N: A moment later, she resurfaces, gasping for air.
	WAIT 1
	MOVE 2, 70, 45, 1
		2: *cough* *cough* Definitely not. Fresh water is out of the question, it seems.
	WAIT 1
		N: Perhaps Maisy will know of a suitable place for Aerwyna to stay.
	WAIT 2
	HOST_GIVE T24
	END
@shoo
		N: Only those who have proven themselves may proceed beyond this point.
	EJECT "T14"
	GOTO @scenestart
	
;-------------------------------------------------------

SCENE 6, interiorHouse, SCENE, "Elder Germund's House", 0, 0
	MUSIC "elder.mid"
	IF T3+T4, @elder
		N: You can hear loud snoring coming from the other room.
	WAIT 2
		H: No use trying to wake the Elder up this early.
	END

@elder
	ACTOR 1, "Elder Germund", "joshTownsfolk", 21, 30, 90
	IF  T5, @talkedtoelder
		N: Before you stands Germund, the Elder of this village.
	WAIT 2
	CALL 9990@skillcheck, knowledge, #<num.hostWIS>, 0, 10
	COMPARE #<finalResult>, "2"
	IF= @critsucceeded
	COMPARE #<finalResult>, "1"
	IF= @succeeded
	COMPARE #<finalResult>, "0"
	IF= @failed
@critsucceeded
	GOTO @germund
@succeeded
	GOTO @germund
@failed
	GOTO @elderspeak
@germund
		N: (KNOWLEDGE) Though Germund is old and frail, your father's words echo,
	WAIT 1
		N: 'Beware an old man in a world where men tend to die young'. 
	WAIT 1
		N: There is more to the Elder than meets the eye, it seems.
	WAIT 2
	GOTO @elderspeak
@elderspeak
		1: Ah, %1, my child, how are you?
		H: I'm doing well. I've been summoned to the royal capital to meet with Queen Eilika.
		1: What an honor! I hope you'll remember our sleepy little hamlet when you're a famed general in the Queen's army.
		1: I must confess some curiosity as to why you're not already on your way, though.
		H: According to Heinrich, the bridge is out. He's working on fixing it, but he said you'd have a job for me in the meantime.
		1: I suppose I did, didn't I. Hmmm, what was it again...
	WAIT 2
		N: Elder Germund strokes his beard in contemplation.
	WAIT 2
		1: Ah, yes, that's it. Our shepherd, Conrad, has something he'd like someone to look into.
		1: I don't remember exactly what it was, though, so you'll need to ask him about it.
		H: Alright, then, might as well.
		1: Good luck!
	HOST_GIVE T5
	END
	
@talkedtoelder
	IF T29, @barondead
		1: If you don't mind, my child, I'd like some peace and quiet to enjoy my coffee. 
	END
@barondead
	IF T13, @rewarded
		H: Turns out the culprit behind the disappearing sheep was a school of sahuagin that had taken up residence in that cave on the beach.
		H: I've killed their baron, so the rest of the school should disperse before too long.
		1: This is wonderful news! You've done us a great service. Those sahuagin would have certainly moved on to us after they ran out of sheep. 
		1: I suppose you'll be wanting a reward, won't you? Please, take these few coins. Also, I have a parting gift for you. It's an old amulet I saved from my adventuring days. 
	HOST_GIVE G500
	HOST_GIVE I950
	HOST_GIVE T13
		1: The amulet's better off with you. I have no business delving into dungeons at my age. 
		1: I reckon the bridge is fixed by now. Tell Heinrich I said hello, won't you?
		H: Thank you for everything, Elder Germund.
	END
@rewarded
		1: Always nice to see the youngsters remember to talk to us old folks.
	END
;-----------------------------------------------------------------------------
SCENE 7, villageHouse2, SCENE, "Conrad's House", 0, 0
	THEME 8
	ACTOR 1, "Conrad", "joshTownsfolk", 1, 50, 70
	ACTOR 2, "Sheep", "joshAnimals", 8, 20, 70
	ACTOR 3, "Sheep", "joshAnimals", 8, 30, 80
	ACTOR 4, "Sheep", "joshAnimals", 8, 40, 70
	SEL 2
	POSE 8, 16, 8
	SEL 3
	POSE 8, 16, 8
	SEL 4
	POSE 8, 16, 8
	IF T5, @investigation
		1: Morning.
	END
@investigation
	IF T6, @agreed
		N: You see a frazzled-looking man in a roughspun tunic and breeches. 
	WAIT 1
		N: This must be Conrad.
	WAIT 2
		1: *Sigh*
		H: Morning, Conrad. Elder Germund said you had something you needed looked into?
		1: Oh, thank the gods! I'm at my wit's end here.
		1: My sheep have been going missing. It seems like I have one or two fewer every day.
		1: On top of that, my remaining sheep seem stressed, like something's attacked them.
		1: I fear I may be ruined if this goes on for much longer.
		H: I'll look into it, don't worry. It's probably just a wolf or something.
	HOST_GIVE T6
	WAIT 2
	GOTO @nature
@nature
	CALL 9990@skillcheck, nature, #<num.hostWIS>, 0, 10
	COMPARE #<finalResult>, "2"
	IF= @critsucceeded
	COMPARE #<finalResult>, "1"
	IF= @succeeded
	COMPARE #<finalResult>, "0"
	IF= @failed
@critsucceeded
	GOTO @tracks
@succeeded
	GOTO @tracks
@failed
	IF C7, @druid
	END
@druid
		H: I should have a spell to allow me to ask the sheep what's going on directly.
	END
	
@tracks
	HOST_GIVE T16
		N: (NATURE) Your eye for detail picks up something.
	WAIT 1
		N: While checking the pen, you see some blood splattering the fence.
	WAIT 1
		N: A few scraps of wool litter the ground.
	WAIT 1
		N: Nearby, a set of webbed footprints in the mud, leading towards the beach to the west.
	END

@agreed
	IF T12, @questdone
		1: Any luck finding the culprit?
	END
@investigationdone
		N: This sheep has nothing else useful to say.
	END
@questdone
	IF T29, @saved
		ACTOR 5, "Agnes", "joshAnimals", 8, 120, 90
		1: Have you found my sheep yet? 
		H: Yep! Come on out, Agnes!
	MOVE 5, 90, 90
		5: Baaaaa!
		1: Agnes! I promise you I'll never let you out of my sight again!
		1: Agnes is my prized sheep, she always produces the softest wool.
		1: Thank you so much, you've done a great service for me and my flock.
	HOST_GIVE T29	
	END
@saved
	ACTOR 5, "Agnes", "joshAnimals", 8, 90, 90
		1: Thank you so much for saving my sheep!
	END
@eventActorSpell2
	COMPARE #<spell.id>, "701"
	IF= @sheep1
		2: Baaaaa!
		1: Stop messing with my sheep!
	END
@eventActorSpell3
	COMPARE #<spell.id>, "701"
	IF= @sheep2
		3: Baaaaa!
		1: Stop messing with my sheep!
	END
@eventActorSpell4
	COMPARE #<spell.id>, "701"
	IF= @sheep3
		4: Baaaaa!
		1: Stop messing with my sheep!
	END
@sheep1
	IF T13|T15|T16, @investigationdone
	IF T2123, @investigationdone
		2: Good morning! A fine day to eat some grass, don't you think?
		H: Sure. Do you have any idea what happened to the rest of your flock?
		2: Haven't the slightest clue. That said, if you see Agnes, tell her she still owes me a new bell.
	HOST_GIVE T2123
	END
@sheep2
	IF T13|T15|T16, @investigationdone
	IF T2124, @investigationdone
		3: And what do you want?
		H: Could you tell me if you've seen anything suspicious the last few nights?
		3: Maybe I did, maybe I didn't.
		3: But why exactly should I tell you? I swear, you humans are all the same.
		3: You lot always come to us expecting something. Milk, wool, information, whatever.
		3: And when you can't wring anything else out of us, you turn us into stew.
		3: You disgust me. Away with you.
		H: She has a point, but does she really need to be so rude about it?
		1: Yeah, that one's always been a bit mean.
	HOST_GIVE T2124
	END
@sheep3
	IF T13|T15|T16, @investigationdone
		N: This sheep seems very stressed.
	WAIT 2
		H: Excuse me, have you seen anything suspicious the last few nights?
		4: Oh, it was awful! They took Agnes!
		H: Who took her?
		4: The green men came through last night and took her! 
		H: The green men?
		4: They were big and slimy and green, and they hit her over the head and carried her away! They came from over by the old lady's house!
		H: Finally, a decent lead. I'll go get Agnes back, don't worry.
		4: Oh, thank you, thank you!
	END
	HOST_GIVE T15
@eventActorSpell5
	COMPARE #<spell.id>, "701"
	IF= @sheep5
		5: Baaaaa!
		1: Stop messing with my sheep!
@sheep5
		5: You know, I have some friends in the next town over. Tell them I sent you and they should have something interesting to say.
	END
;----------------------------------------------------------------------------------
SCENE 8, villageMarket, SCENE, "Amelia's General Goods", 0, 0
	ACTOR 1, "Amelia", "joshTownsfolk", 2, 50, 60
	SEL 1
	POSE 2, 3, 3
	IF T17, @trophy
	IF T6, @investigation
	GOTO @shop
@investigation
	IF T8, @shop
		H: Good morning, Amelia.
		1: Hey there, %1! Anything I can help you with?
		H: As a matter of fact, there is. You wouldn't happen to have seen anything suspicious over the last few nights, would you?
		1: Well, I have been having issues with break-ins.
		1: It's weird, there's no one in this village that's so hard up they'd need to steal anything, but every night it seems like something goes missing from my storehouse.
	MOVE 1, 20, 60
		1: Here, I'll unlock it so you can take a look inside.
		N: Near a few smashed crates you spot them: wet, webbed footprints.
	WAIT 2 
		1: Isn't that weird?
		H: It sure is. Thanks for showing me this, I think I have an idea of what might be behind all of this, but I need more information to be sure.
	HOST_GIVE T8
	END
@shop
		1: Welcome! Best prices this side of the Wyrmspine!
	OFFER 14, 15
	IF T2006, @hasspell
	IF C2, @scroll
	END
@scroll
		1: Since you seem to be a wizard, I have a special offer for you! Just give me a click if you're interested.
	END
@trophy
	IF T18, @shop
	IF GS, @golden
	IF T8|T9, @shop
	END
@golden
		1: It looks like you have a Golden Soul. I've got just the thing for someone so generous!
		1: A bigger trophy bag!
	SET num.TrophyBagWidth, "10"
	SET num.TrophyBagHeight, "10"
	SET num.TrophyBagOpen, "1"
	HOST_GIVE T18
		1: Now it can hold a maximum of 100 different kinds of trophies. Enjoy!
	END
@eventActorClick1
	IF C2, @wizard
		1: Let me know if you need anything!
	END
@wizard
	IF T2006, @hasspell
		H: Say, you wouldn't happen to have any spell scrolls you'd be willing to part with, would you?
		1: As a matter of fact, I have a spell scroll of Burning Hands here! 500 GP and it's yours.
	MENU "Buy the scroll.=@buyspell", "Don't buy it.=@dontbuyspell"
	END
@buyspell
	IF G500, @spell
		1: Looks like you don't have enough money. I'll hold onto the scroll for you so you can come get it when you have enough.
	END
@spell
		1: Here you go!
		1: You'll still need to learn the spell to be able to use it, though.
	HOST_GIVE T2006
	HOST_TAKE G500
	END
@dontbuyspell
		1: Pity. I'll hang onto it in case you change your mind.
	END
@hasspell
		1: Let me know if you need anything!
	END
;-------------------------------------------------------------------------------------
SCENE 9, trees, SCENE, "Path to the Beach", 0, 0
	IF T19, @beach
	COMPARE #<num.peopleInScene>, "1"
	IF> @shoo
	IF T3, @mom
		H: Mom would kill me if I tracked sand into her house, best not go to the beach now.
	END 
@mom
	IF T4, @elder
		H: I need to be getting to the capital, no time to hit the beach now.
	END
@elder
	IF T5, @conrad
		H: I need to go talk to the Elder.
	END
@conrad
	IF T6, @sheep
		H: I need to go speak to Conrad first. 
	END
@sheep
	IF T7+T8|T15|T16, @bones
		H: I have a hunch, but I need to gather more information before I go gallivanting off into danger.
	END
@bones
	ACTOR 1, "Bones", "joshMiscellaneous", 24, 80, 80
	IF T9, @weapon
		N: Following the trail of webbed footprints, you find some scattered bones.
		WAIT 2
		H: Seems like I found where the sheep went. Looks like sahuagin. I'll need a weapon.
	HOST_GIVE T9
	IF C8, @cleric
	END
@weapon
	IF T10, @beach
		H: Charging straight into a sahuagin nest with no weapon would be suicide.
	END
@beach
	GOTO LINK 2, 0
@cleric
		N: Your divine magic allows you to speak with the dead.
	WAIT 2
		N: Perhaps this tragically departed sheep may have something interesting to say.
	WAIT 2
		N: Simply cast the right spell at the bones.
	END
@eventActorSpell1
	COMPARE #<spell.id>, "700"
	IF= @speakwithdead
		N: The bones do not respond to your spell.
	END
@speakwithdead
	ACTOR 2, "Ghost Sheep", "joshAnimals", 8, 80, 70, 1023
	FACE 2, 2
	WAIT 1
		N: The spectre of the dead sheep coalesces and looks at you.
		2: You the hero? Give them fishmen what for, won't you?
		H: In the name of the gods, it will be so. Can you tell me anything about them?
		2: When they was going to eat me, I overheard a thing or two, I did.
		2: Apparently they're going to make a move on the town soon.
		2: They call their leader the Baron. Real nasty fellow, I've heard.
		2: He can cast some spell what makes your legs move slow.
		2: Good luck thrashing him!
	HOST_GIVE T19
	END
@shoo
		N: Only one person may walk this particular path at a time.
	EJECT "T999"
;----------------------------------------------------------------------------------------
SCENE 10, interiorSmithy, SCENE, "Baldrich's Smithy", 4, 0
	MUSIC "blacksmith.mid"
	THEME 7
	COMPARE #<num.peopleInScene>, "1"
	IF> @shoo
	IF T9, @weapon
	ACTOR 1, "Baldrich", "josh17", 1, 30, 70
	SEL 1
	POSE 1, 2, 4
		1: Would you mind coming back later, %1? I'm working on a complicated piece right now.
	END
@weapon
	IF T10, @classdialogue
	ACTOR 1, "Baldrich", "josh17", 1, 30, 70
		N: A blast of hot air assaults you as you open the door.
	WAIT 2
		N: Working the forge is a mountain of a man.
	WAIT 2
		N: This is Baldrich, the town smith.
	WAIT 2
		1: Hey, %1! What brings you to my shop?
		H: I need a weapon. I'll be heading to the capital soon.
	IF C1, @fighter
	IF C2, @wizard
	IF C6, @rogue
	IF C8, @cleric
	IF C5, @monk
	IF C3, @ranger
	IF C4, @bard
	IF C7, @druid
@fighter
		1: Ah yes, here you go. I did my best to restore your dad's old sword to its former sharpness.
		1: May it serve you as well as it did him.
	HOST_GIVE I300
	HOST_GIVE T10
	GOTO @classdialogue
@wizard
		1: It's been a while since I had to get any wands in, but here you go.
	HOST_GIVE I400
	HOST_GIVE T10
	GOTO @classdialogue
@rogue
		1: All I ask is that if you commit any crimes with this, don't mention me to the guards.
	HOST_GIVE I450
	HOST_GIVE T10
	GOTO @classdialogue
@cleric
		1: I have a lot of respect for you, becoming a cleric. Here you go.
	HOST_GIVE I650
	HOST_GIVE T10
	GOTO @classdialogue
@monk
		1: Hopefully this ought to protect your hands.
	HOST_GIVE I350
	HOST_GIVE T10
	GOTO @classdialogue
@ranger
		1: I'm no fletcher, but hopefully this bow will work for you.
	HOST_GIVE I500
	HOST_GIVE T10
	GOTO @classdialogue
@bard
		1: I don't know the first thing about musical instruments, so a bell's the best I can do.
	HOST_GIVE I600
	HOST_GIVE T10
	GOTO @classdialogue
@druid
		1: Hopefully I got the runes I carved into this right.
	HOST_GIVE I550
	HOST_GIVE T10
	GOTO @classdialogue
@classdialogue
	IF T17, @missions
	ACTOR 1, "Baldrich", "josh17", 1, 30, 70
	SET num.TrophyBagWidth, "6"
	SET num.TrophyBagHeight, "6"
	SET num.TrophyBagOpen, "1"
	HOST_GIVE T17
		1: By the way, if you'll bring me some monster parts, I should be able to upgrade your gear.
		1: Here's an old trophy bag I had laying around.
		1: I've got lists of the monster parts I need, so come back later and I'll let you know what you need.
		1: See you later!
	END
@missions
	ACTOR 2, "Baldrich", "josh17", 1, 30, 70
	SEL 2
	POSE 1, 2, 4
		2: Hey, %1! Give me a click if you need anything.
	END
@eventActorClick2
	MENU "I'd like something upgraded.=@mission", "Where can I find the materials I need?=@materials", "Do I need to come back here after I leave town?=@comeback", "I lost the boss material I need!=@lostboss"
@mission
		2: Certainly! Here's the lists.
		2: I'll do this upgrade set for free since we're friends, but other blacksmiths will charge you.
	MISSIONS 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
	END
@materials
		2: The materials you need can be had from nearby monsters.
		2: The main exception to this is your weapon. That needs a special material dropped only by the most powerful monster in the area.
	END
@comeback
		2: Each blacksmith has a different set of lists. I can only do the basic stuff, so you'll need to seek out another smith for further upgrades.
	END
@lostboss
		2: If you had to discard a boss trophy for whatever reason, just return to the arena you fought the boss in. It'll be there.
	END
@shoo
	ACTOR 1, "Baldrich", "josh17", 1, 30, 70
		1: Sorry, only one customer in the shop at a time please.
	EJECT "T999"
;----------------------------------------------------------------------------------------------------------------
SCENE 11, beachCave, SCENE, "Sea Cave Entrance", 0, 0, 0
	THEME 4
	IF T27, @enter
	IF T26, @fishing
	IF T11, @enter
		N: The mouth of the cave looms over you, like the maw of a savage beast.
	WAIT 2
	HOST_GIVE T11
	GOTO @enter
@enter
	GOTO LINK 4, 0
	END
@fishing
	IF T27, @enter
	ACTOR 1, "Crazy Maisy", "joshTownsfolk", 6, 50, 95
		1: By my reckonin', the Baron probably had a personal fish pond. I know I would if I was a sahuagin.
		1: Let's go tae wherever he was holed up. That's as good a place as any tae look for a fishin' spot.
	HOST_GIVE T27
	WAIT 2
	GOTO @enter
	END
;-------------------------------------------------------------------------------------------------------------------
SCENE 15, seacavePool, SCENE, "Sahuagin Baron's Lair", 2, 0, 0
	#include proxbeta.txt
	IF T22, @mermaid
	IF T12, @alreadywon
	MUSIC "Evil.mid"
	ACTOR 1, "Sahuagin Baron", "aurea1", 1, 25, 70
	ACTOR 2, "Sahuagin Baron's Guard", "aurea2", 1, 30, 65
	ACTOR 3, "Sahuagin Baron's Guard", "aurea2", 1, 30, 75
	ACTOR 4, "Sahuagin", "aurea3", 1, 40, 65
	ACTOR 5, "Sahuagin", "aurea3", 1, 40, 70
	ACTOR 6, "Sahuagin", "aurea3", 1, 40, 75
	ACTOR 7, "Sahuagin", "aurea3", 1, 50, 65
	ACTOR 8, "Sahuagin", "aurea3", 1, 50, 75
	FACE 4, 4
	FACE 5, 4
	FACE 6, 4
	FACE 7, 4
	FACE 8, 4
		N: You see the Sahuagin Baron in the adjacent chamber.
	WAIT 1
		N: Would you like to attempt to sneak up to the Baron or challenge him directly?
	WAIT 1
	MENU "(THIEVERY)(AGI) Attempt to sneak up to him.=@stealth", "(INTRIGUE)(STR)Challenge him directly.=@challenge."
@challenge
	GOTO @bossfight3
@stealth
		N: You attempt to sneak closer to the Sahuagin Baron.
	WAIT 2
	CALL 9990@skillcheck, thievery, #<num.hostAGI>, 0, 10
	COMPARE #<finalResult>, "2"
	IF= @critsucceeded
	COMPARE #<finalResult>, "1"
	IF= @succeeded
	COMPARE #<finalResult>, "0"
	IF= @failed
@critsucceeded
	GOTO @speech
@succeeded
	GOTO @speech
@failed
	GOTO @caught
@speech
		N: (THIEVERY) As you get within earshot of the Baron, he seems to be giving a speech to his subjects.
	IF C4, @bard
		1: C' n'ghft uh'eog Dagon ahor nafl'fhtagn! h' hai llll fhtagn shogg, mgng shuggnglui ahor ph'nglui mgahnnn gn'th ot yogfm'll ng h' tharanak l' c'!
	WAIT 2
		N: A chorus of "ia! ia!" erupts from the surrounding sahuagin.
	IF C1|C5, @martial
	IF C8, @cleric
	IF C2|C3|C6|C7, @stalactite
@bard
		N: Your magic gives you insight into what the Baron is saying.
		1: Our dark lord Dagon shall awaken! He now dreams within the Abyss, but the Gate shall open in the sea of stars and bring Him to us!
		N: A chorus of "Hail! Hail!" erupts from the surrounding sahuagin.
	GOTO @stalactite
@cleric
	CALL 9990@skillcheck, knowledge, #<num.hostWIS>, 1, 10
	COMPARE #<finalResult>, "2"
	IF= @critsucceeded1
	COMPARE #<finalResult>, "1"
	IF= @succeeded1
	COMPARE #<finalResult>, "0"
	IF= @failed1
	END
@critsucceeded1
		N: (KNOWLEDGE) Though you are not fluent in Deep Speech, you pick up the gist of what the Baron is saying.
	WAIT 1
		N: The sahuagin intend to summon Dagon, the Demon King, into the mortal realm from his prison in the Abyss.
	WAIT 2
	GOTO @stalactite
@succeeded1
		N: (KNOWLEDGE) Though the rest of the baron's speech is completely unintelligible, one word stands out to you.
	WAIT 1
		N: Dagon. The Demon King. It seems the sahuagin have been working with the Abyssal Tide. 
	WAIT 2
	GOTO @stalactite
@failed1
		N: (KNOWLEDGE FAILED) The Baron's speech seems unintelligible.
	WAIT 2
	GOTO @stalactite
@stalactite
	CALL 9990@skillcheck, perception, #<num.hostWIS>, 0, 10
	COMPARE #<finalResult>, "2"
	IF= @succeeded2
	COMPARE #<finalResult>, "1"
	IF= @succeeded2
	COMPARE #<finalResult>, "0"
	IF= @failed2
@succeeded2
		N: (PERCEPTION) You notice a loose-looking stalactite right over where the Baron's guards are standing.
	WAIT 1
		N: A small amount of force would likely send it crashing down directly onto them.
	WAIT 1
		N: Try to dislodge it?
	WAIT 1
	MENU "Yes=@yes", "No=@no"
@yes
	GOTO @bossfight
@no
	GOTO @bossfight2
@failed2
	GOTO @bossfight2
@martial
	WAIT 1
		N: A creature of the Baron's station is unlikely to refuse a challenge to a one-on-one duel.
	WAIT 1
		N: Issue a challenge?
	WAIT 1
	MENU "(STR)(INTRIGUE)Yes=@duel", "No=@noduel"
@duel
	GOTO @bossfight3
@noduel
	GOTO @bossfight2
@bossfight
		N: Your attack strikes home. 
	WAIT 1
		N: The stalactite wobbles and falls, 
		N: taking a chunk of the ceiling with it and burying the two guards in rubble.
		N: The other sahuagin scatter, leaving you alone with the Baron.
	MOVE 2, -20, 45, 1
	MOVE 3, -20, 45, 1
	MOVE 4, -20, 45, 1
	MOVE 5, -20, 50, 1
	MOVE 6, -20, 55, 1
	MOVE 7, -20, 45, 1
	MOVE 8, -20, 55, 1
	WAIT 1
		N: The Baron sees you.
	WAIT 1
		1: Hai ymg' ah'mglw'nafh, shuggoth!
	MOVE 1, -20, 55
	MUSIC "baron.mid"
	FIGHT2 9
	IF ALIVE, @barondefeated
	CALL 9990@deathwarp
	END
@bossfight2
		N: The Baron sees you and points at you.
	WAIT 1
		1: Ah'ehye'drnn! ah'n'gha cahf shuggoth!
	WAIT 1
		N: The crowd of sahuagin rushes you.
	MOVE 4, -20, 45, 1
	MOVE 5, -20, 50, 1
	MOVE 6, -20, 55, 1
	MOVE 7, -20, 45, 1
	MOVE 8, -20, 55, 1
	MUSIC "battle1.mid"
	FIGHT 5, 5, 5, 5
	IF ALIVE, @wave2
	CALL 9990@deathwarp
	END
@bossfight3
		H: You and me, fish-face! If you've any honor, you'll fight me one-on-one!
	IF C1, @fighterchallenge
	CALL 9990@skillcheck, intrigue, #<num.hostSTR>, 0, 10
	GOTO @duelchallenge
@fighterchallenge 
	CALL 9990@skillcheck, intrigue, #<num.hostSTR>, 1, 10
	GOTO @duelchallenge
@duelchallenge
	COMPARE #<finalResult>, "2"
	IF= @succeeded3
	COMPARE #<finalResult>, "1"
	IF= @succeeded3
	COMPARE #<finalResult>, "0"
	IF= @failed3
@succeeded3
		N: The baron picks up his trident, then motions for his guards to stand aside.
	MOVE 2, -20, 65
	MOVE 3, -20, 75
	MOVE 4, -20, 65
	MOVE 5, -20, 70
	MOVE 6, -20, 75
	MOVE 7, -20, 65
	MOVE 8, -20, 75
		1: Og vulgtmnah, shuggoth.  Y' ahor ymg' goka n'gha ymg' ahmgr'luh.
	MOVE 1, -20, 55
	MUSIC "baron.mid"
	FIGHT2 9
	IF ALIVE, @barondefeated
	CALL 9990@deathwarp
	END
@failed3
		N: The Baron seems unimpressed.
	WAIT 1
		1: Ah'ehye'drnn! ah'n'gha cahf shuggoth!
	WAIT 1
		N: The crowd of sahuagin rushes you.
	MOVE 4, -20, 45, 1
	MOVE 5, -20, 50, 1
	MOVE 6, -20, 55, 1
	MOVE 7, -20, 45, 1
	MOVE 8, -20, 55, 1
	MUSIC "battle1.mid"
	FIGHT 5, 5, 5, 5
	IF ALIVE, @wave2
	CALL 9990@deathwarp
	END
@caught
		N: As you attempt to get closer, your foot bumps into a loose rock.
	WAIT 1
		N: The Baron looks up and points at you.
	WAIT 1
		1: Ah'ehye'drnn! ah'n'gha cahf shuggoth!
	WAIT 1
		N: The crowd of sahuagin rushes you.
	MOVE 4, -20, 45, 1
	MOVE 5, -20, 50, 1
	MOVE 6, -20, 55, 1
	MOVE 7, -20, 45, 1
	MOVE 8, -20, 55, 1
	MUSIC "battle1.mid"
	FIGHT 5, 5, 5, 5
	IF ALIVE, @wave2
	CALL 9990@deathwarp
	END
@wave2
	MUSIC "#silence"
	1: Bug, ya ah'n'gha'drnn! f' ah'n'gha!
	MOVE 2, -20, 45, 1
	MOVE 3, -20, 55, 1
	MUSIC "battle1.mid"
	FIGHT 7, 7, 8
	IF ALIVE, @wave3
	CALL 9990@deathwarp
	END
@wave3
	MUSIC "#silence"
	1: Y' ymg' ephaiah'mgehye ya, ng.
	MOVE 1, -20, 50
	MUSIC "baron.mid"
	FIGHT2 9
	IF ALIVE, @barondefeated
	CALL 9990@deathwarp
	END
@barondefeated
	HOST_GIVE T12
	HOST_GIVE Z9
		N: The Sahuagin Baron falls dead at your feet.
		N: You take his Noble Sahuagin Crest as a trophy.
	WAIT 4
		H: *pant* *pant* 
		H: He's dead! I did it!
		H: Time to go tell the Elder the good news.
	WAIT 4
		N: As you inspect the corpse of the Baron to make sure he's actually dead,
		N: A frightened bleat catches your ear.
	ACTOR 12, "Agnes", "joshAnimals", 8, 30, 90
 		12: Baaaaa!
		H: Ah, there you are. Let's get you back home, shall we?
		N: Agnes is now traveling with you!
	END
@eventActorSpell12
	COMPARE #<spell.id>, "701"
	IF= @agnes
		12: Baaaaa!
	END
@agnes
		12: Oh, thank goodness you're here!
		12: You wouldn't believe what they were going to do to me!
		12: Thank you, thank you, thank you!
		12: How can I ever repay you?
	IF T2123, @belldia
		H: Let's just go, your owner will handle repaying me.
	END
@belldia
		H: Oh yeah, one of the other sheep asked me to tell you that you owe them a new bell.
		12: ... I was hoping they'd forget about that.
	END
@alreadywon
	IF Z9|I301|I351|I401|I451|I501|I551|I601|I651|T4000, @hastrophy
		N: You pick up the Noble Sahuagin Crest you had to leave behind earlier.
	HOST_GIVE Z9
	END
@hastrophy
	IF T27, @maisy
		N: The arena sits hauntingly still.
	END
@mermaid
	IF T23, @alreadywon
	ACTOR 1, "Aerwyna", "joshMiscellaneous", 12, 50, 45
	POSE 12, 13, 12
		H: This pool is bigger and it's probably got more breathable water.
		1: Indeed. It'd be perfect if not for all the sahuagin blood, but that's a problem that fixes itself over time.
	WAIT 2
		H: Hey, uh, you've got a bug in your hair.
		1: OH GODS GET IT OFF! KILL IT KILL IT KILL IT KILL IT!
		H: It's just a bug, what's the big deal?
	WAIT 4
		N: As Aerwyna thrashes around trying to get the bug out of her hair, 
		N: the noise awakens a swarm of other water bugs in the pool.
	WAIT 2
		H: Ohhhhhh-kay, yeah, that could be bad. Just sit tight, I'll take care of it.
	MUSIC "battle1.mid"
	FIGHT 10, 10, 10
	IF ALIVE, @mermaid2
	CALL 9990@deathwarp
	END
@mermaid2
	MUSIC "seacave.mid"
	HOST_GIVE T23
		1: Please get me as far away from here as possible. I hate bugs.
		H: Duly noted. There's a nice spot not far away from the village that I'm pretty sure is fairly bug-free.
		1: Anywhere is better than here.
	END
@maisy
	IF T20, @fishinghole
	IF I117, @rodskip
	HOST_GIVE I117
	GOTO @rodskip
@rodskip
	ACTOR 9, "Crazy Maisy", "joshTownsfolk", 6, 75, 95
	ACTOR 10, "Ripples", "fishingspot", 1, 25, 70
		9: Looks like we're in luck! See the ripples in the water?
		9: Equip that fishing rod I gave ye and cast yer line at 'em."
	END
@eventActorAttack9
		9: Dinnae cast yer line at me! I ain't a fish!
	END
@eventActorAttack10
	COMPARE #<item.id>, "117"
	IF= @catch
	IF> @equiprod
	IF< @equiprod
@catch
	IF T20, @alreadycaughtfish
	SEL 10
	POSE 2
		9: Yeah, just li'ah'! Yer a natural! Now ye just wait fer a bite.
	WAIT 5
	SEL 10
	POSE 3
		9: Ye've got a bite! Now reel her in!
	WAIT 3
	SEL 10
	POSE 1
	HOST_GIVE T20
	HOST_GIVE I131
	HOST_GIVE I130
	SET shadRecordHolder, "Maisy"
	SET codRecordHolder, "Maisy"
	SET salmonRecordHolder, "Maisy"
	SET herringRecordHolder, "Maisy"
	SET shadRecord, "5"
	SET codRecord, "9"
	SET salmonRecord, "10"
	SET herringRecord, "9"
		9: Looks like ye caught a shad. They dinnae sell fer much, but they're tasty.
		9: By the by, if ye're interested, here's me old fishing journal.
		9: It's got all me old size records from before I settled down.
		9: If ye can beat my old records, I reckon I could find some stuff for ye.
		9: Just come talk tae me back at the cabin if ye have any other questions.
		9: I reckon Aerwyna probably wants tae see ye too. Check the alcove east a the cabin. 
	END
@equiprod
		9: Ye cannae fish without a rod.
	END
@alreadycaughtfish
		N: Nothing bites your hook.
	END
@fishinghole
	ACTOR 11, "Ripples", "fishingspot", 1, 25, 70
	END
@eventActorAttack11
	CALL 9990@cast, 05, 11
	SEL 11
	POSE 1
	MUSIC "seacave.mid"
	END
;---------------------------------------------------------------------------------------------------------------------