// creator  : weidu.exe (version 23100)
// argument : _JONDAL.DLG
// game		 : .
// source	 : ./override/_JONDAL.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~_JONDAL~
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #1 /* Triggers after states #: 3 even though they appear after this state */
~NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #86130 /* ~Hey there <CHARNAME>!  I see you're up early this day.  Well your father, Gorion, has asked me a strange favor.  Seems like he wants you to learn some fighting and asked me to be the teacher.  So I hope you brought your staff with you.~ */
  IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #86131 /* ~Hostile creatures have red circles around their feet. Left-clicking within the circle will direct you to attack me. You can switch weapons using the Quick Weapons icons. The weapon outlined in green is the current weapon. Attack with fists only (empty quick slot) if you only wish to knock your opponent unconscious.  You don't have to worry about that with me, so use your staff.  If you have magical abilities, try casting a spell at me by left clicking on the spell icon at the bottom of the screen.  Left-click on one of the spells that come up and cast it on whichever target you want.  I just hope you have an offensive spell memorized.
~ */
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #86132 /* ~During our fight I'm going to spring a little surprise on you.  Remember, you can press the SPACE BAR at any time and pause the game.  This will give you time to think, especially once my little surprise comes up.  Are you ready now?  Good!~ */
  IF ~~ THEN DO ~CreateCreature("_ERIK",[4185.1114],0)
ActionOverride("erik",Enemy())
Enemy()
~ EXIT
END

IF WEIGHT #0 ~Global("JonHit","GLOBAL",1)
~ THEN BEGIN 3 // from:
  SAY #86134 /* ~You did good kid, especially after Erik started firing those arrows at ya.  I'm sure your father would be proud.  You should go talk to the Gatewarden if you want some experience in fighting with a group of people.  You can find him just south of here.  Out there it can be pretty important to know how to fight with allies at your side.~ */
  IF ~~ THEN DO ~SetGlobal("JonHit","GLOBAL",2)
ChangeEnemyAlly(Myself,NEUTRAL)
ChangeEnemyAlly("erik",NEUTRAL)
ClearAllActions()
ActionOverride("erik",EscapeArea())
EscapeArea()
~ EXIT
END
