// creator  : weidu.exe (version 23100)
// argument : UDLESA.DLG
// game		 : .
// source	 : ./DATA/DIALOG.BIF
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

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

IF WEIGHT #0 ~Global("duelStarts","AR2202",1)~ THEN BEGIN 0 // from:
  SAY #52568 /* ~I am victorious! They were worms, as I said! Their house is weak, their blades dull and listless!~ */
  IF ~~ THEN REPLY #52569 /* ~You were obviously their superior in both age and skill. Do you gloat over children?~ */ DO ~SetGlobal("duelStarts","AR2202",2)
SetGlobal("DuelOn","AR2202",0)~ GOTO 1
  IF ~~ THEN REPLY #52570 /* ~A fine battle, though I'll wager there are those that could beat you.~ */ DO ~SetGlobal("duelStarts","AR2202",2)
SetGlobal("DuelOn","AR2202",0)~ GOTO 2
  IF ~Gender(LastTalkedToBy,FEMALE)~ THEN REPLY #52571 /* ~Well done. Obviously you are a competent warrior... for a male.~ */ DO ~SetGlobal("duelStarts","AR2202",2)
SetGlobal("DuelOn","AR2202",0)~ GOTO 3
  IF ~~ THEN REPLY #52572 /* ~Truly a fine display. Have you ever met your match?~ */ DO ~SetGlobal("duelStarts","AR2202",2)
SetGlobal("DuelOn","AR2202",0)~ GOTO 4
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #52574 /* ~What? Who slanders me! Step into the pit if you think yourself better than I!~ */
  IF ~~ THEN EXTERN ~UDDROW16~ 10
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #52575 /* ~Are there now? And would you be one of them? Step up and prove your claim! I am ready for you!~ */
  IF ~~ THEN EXTERN ~UDDROW16~ 10
END

IF ~~ THEN BEGIN 3 // from: 0.2
  SAY #52576 /* ~I see. You flatter me with your insults. I will survive your own efforts if you wish to test them. The same goes for anyone else in this place!~ */
  IF ~~ THEN EXTERN ~UDDROW16~ 10
END

IF ~~ THEN BEGIN 4 // from: 0.3
  SAY #52577 /* ~If I had, I would be dead. None have prevailed against me and none will. Does anyone here stand to face me? Does anyone dare?~ */
  IF ~~ THEN EXTERN ~UDDROW16~ 10
END

IF WEIGHT #2 /* Triggers after states #: 12 even though they appear after this state */
~Global("duelStarts","AR2202",2)~ THEN BEGIN 5 // from:
  SAY #52663 /* ~HOLD! I...~ */
  IF ~Global("PlayerDuelingLesaonar","GLOBAL",1)~ THEN DO ~AddexperienceParty(30000)
SetGlobal("DuelOn","AR2202",0)~ GOTO 6
  IF ~Global("PlayerDuelingLesaonar","GLOBAL",2)~ THEN DO ~AddexperienceParty(30000)
SetGlobal("DuelOn","AR2202",0)~ GOTO 7
  IF ~Global("PlayerDuelingLesaonar","GLOBAL",3)~ THEN DO ~AddexperienceParty(30000)
SetGlobal("DuelOn","AR2202",0)~ GOTO 8
  IF ~Global("PlayerDuelingLesaonar","GLOBAL",4)~ THEN DO ~AddexperienceParty(30000)
SetGlobal("DuelOn","AR2202",0)~ GOTO 9
  IF ~Global("PlayerDuelingLesaonar","GLOBAL",5)~ THEN DO ~AddexperienceParty(30000)
SetGlobal("DuelOn","AR2202",0)~ GOTO 10
  IF ~Global("PlayerDuelingLesaonar","GLOBAL",6)~ THEN DO ~AddexperienceParty(30000)
SetGlobal("DuelOn","AR2202",0)~ GOTO 11
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #52664 /* ~I yield. You have proven the better combatant this day. I... I yield the victory.  My sword is yours, I no longer deserve it.~ */
  IF ~~ THEN DO ~GiveItem("Sw1h39",LastTalkedToBy)
SetGlobal("WaitingToDuel","GLOBAL",2)
SetGlobal("DuelStarts","AR2202",3)
FadeToColor([20.0],0)
CreateCreature("udchal",[634.1052],0)
ActionOverride(Player1,JumpToPoint([608.1123]))
MoveViewPoint([608.1123],100)
FadeFromColor([20.0],0)~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 5.1
  SAY #55266 /* ~I yield. You have proven the better combatant this day. I... I yield the victory.~ */
  IF ~~ THEN DO ~GiveItem("Sw1h39",LastTalkedToBy)
SetGlobal("WaitingToDuel","GLOBAL",2)
SetGlobal("DuelStarts","AR2202",3)
FadeToColor([20.0],0)
CreateCreature("udchal",[634.1052],0)
ActionOverride(Player2,JumpToPoint([608.1123]))
MoveViewPoint([608.1123],100)
FadeFromColor([20.0],0)~ EXIT
END

IF ~~ THEN BEGIN 8 // from: 5.2
  SAY #55306 /* ~I yield. You have proven the better combatant this day. I... I yield the victory.~ */
  IF ~~ THEN DO ~GiveItem("Sw1h39",LastTalkedToBy)
SetGlobal("WaitingToDuel","GLOBAL",2)
SetGlobal("DuelStarts","AR2202",3)
FadeToColor([20.0],0)
CreateCreature("udchal",[634.1052],0)
ActionOverride(Player3,JumpToPoint([608.1123]))
MoveViewPoint([608.1123],100)
FadeFromColor([20.0],0)~ EXIT
END

IF ~~ THEN BEGIN 9 // from: 5.3
  SAY #55307 /* ~I yield. You have proven the better combatant this day. I... I yield the victory.~ */
  IF ~~ THEN DO ~GiveItem("Sw1h39",LastTalkedToBy)
SetGlobal("WaitingToDuel","GLOBAL",2)
SetGlobal("DuelStarts","AR2202",3)
FadeToColor([20.0],0)
CreateCreature("udchal",[634.1052],0)
ActionOverride(Player4,JumpToPoint([608.1123]))
MoveViewPoint([608.1123],100)
FadeFromColor([20.0],0)~ EXIT
END

IF ~~ THEN BEGIN 10 // from: 5.4
  SAY #55308 /* ~I yield. You have proven the better combatant this day. I... I yield the victory.~ */
  IF ~~ THEN DO ~GiveItem("Sw1h39",LastTalkedToBy)
SetGlobal("WaitingToDuel","GLOBAL",2)
SetGlobal("DuelStarts","AR2202",3)
FadeToColor([20.0],0)
CreateCreature("udchal",[634.1052],0)
ActionOverride(Player5,JumpToPoint([608.1123]))
MoveViewPoint([608.1123],100)
FadeFromColor([20.0],0)~ EXIT
END

IF ~~ THEN BEGIN 11 // from: 5.5
  SAY #55309 /* ~I yield. You have proven the better combatant this day. I... I yield the victory.~ */
  IF ~~ THEN DO ~GiveItem("Sw1h39",LastTalkedToBy)
SetGlobal("WaitingToDuel","GLOBAL",2)
SetGlobal("DuelStarts","AR2202",3)
FadeToColor([20.0],0)
CreateCreature("udchal",[634.1052],0)
ActionOverride(Player6,JumpToPoint([608.1123]))
MoveViewPoint([608.1123],100)
FadeFromColor([20.0],0)~ EXIT
END

IF WEIGHT #1 ~Global("LesaNoFightYet","GLOBAL",1)~ THEN BEGIN 12 // from:
  SAY #61299 /* ~Speak to the duel manager if you wish to fight me, worm.~ */
  IF ~~ THEN EXIT
END
