// creator  : weidu.exe (version 23600)
// argument : TBBRANJ.DLG
// game     : .
// source   : ./DATA/TUTORIAL.BIF
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

BEGIN ~TBBRANJ~

IF ~  Global("TutorialLesson","GLOBAL",23)
~ THEN BEGIN 0 // from:
  SAY #30067 /* ~You cast Cleric spells in the exact same way that you cast Mage spells. I'll refresh your memory in case you've forgotten.~ [TTBRAN02] */
  IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #30069 /* ~Tap my Cast Spell button, choose a spell, and tap on your target. My Cast Spell button is the spell icon on the bottom of the screen. You need to have me selected for you to have access to my spells.~ */
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #30070 /* ~I want you to cast a spell on Belt now. He is slightly wounded from the other spell you cast on him, so you should use one of my healing spells. Go ahead, cast a healing spell on Belt, or anyone else for that matter. (You can rest to restore a healing spell if necessary.)~ */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",10)
SetGlobal("TutorialLesson","GLOBAL",24)
ClickLButtonObject(Myself,INSTANT)
~ EXIT
END

IF ~  Global("TutorialLesson","GLOBAL",24)
~ THEN BEGIN 3 // from:
  SAY #30072 /* ~You haven't cast a spell yet. Tap my Cast Spell button, choose a spell, and tap on your target. If you don't have the spell memorized, then you can rest to memorize it.~ [TTBRAN03] */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",10)
ClickLButtonObject(Myself,INSTANT)
~ EXIT
END

IF ~  Global("TutorialLesson","GLOBAL",25)
~ THEN BEGIN 4 // from:
  SAY #30073 /* ~Good, now I'll give you a short overview on how to memorize Cleric spells.~ [TTBRAN04] */
  IF ~~ THEN GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.0
  SAY #30075 /* ~Any Cleric (or other spellcaster) must memorize spells using the Rest button on the Left Panel after choosing their spells on the Mage Book or Priest Scroll pages. To get to these pages, tap the book or scroll icon on the left edge of the screen.~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #30077 /* ~Choose the spells you want to memorize and then tap on the Rest button. Once your rest is completed, you will have memorized all of your spells.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #30078 /* ~I want you to try and memorize some spells right now.~ */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",15)
SetGlobal("TutorialLesson","GLOBAL",26)
ClickLButtonObject(Myself,INSTANT)
~ EXIT
END

IF ~  Global("TutorialLesson","GLOBAL",26)
~ THEN BEGIN 8 // from:
  SAY #30079 /* ~You haven't slept yet. You can access your sleep button from either your Memorization screen or your Inventory screen.~ [TTBRAN05] */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",10)
ClickLButtonObject(Myself,INSTANT)
~ EXIT
END

IF ~  Global("TutorialLesson","GLOBAL",27)
~ THEN BEGIN 9 // from:
  SAY #30080 /* ~Good job. The spells you have selected will be rememorized each time you rest, replacing any you may have used. Now, on to another ability. A very important skill to the Cleric class is the turning of undead creatures.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #30081 /* ~Paladins also have the ability to Turn Undead. Activating this icon will cause many undead creatures to flee or even be destroyed.~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 10.0
  SAY #30082 /* ~When in this mode, the character can move wherever they wish. Any other action, such as attacking or casting a spell, will deactivate the ability.~ */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #30083 /* ~I am now going to teleport in a skeleton. Try to destroy it using my Turn Undead ability.~ */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",10)
SetGlobal("TutorialLesson","GLOBAL",28)
CreateCreatureObjectEffect("ttskel","SPRAISED","ttxan")
ClickLButtonObject(Myself,INSTANT)
~ EXIT
END

IF ~  Global("TutorialLesson","GLOBAL",28)
!Dead("ttskel")
~ THEN BEGIN 13 // from:
  SAY #30084 /* ~You haven't destroyed the skeleton yet. What's wrong? My Turn Undead button is the skull on the bottom of your screen (if you have me selected).~ [TTBRAN07] */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",10)
ClickLButtonObject(Myself,INSTANT)
~ EXIT
END

IF ~  PartyHasItem("ttwand")
Global("GotWand","LOCALS",0)
~ THEN BEGIN 14 // from:
  SAY #30085 /* ~This is a wand. You should give it to Xan and have him use an Identify spell to figure out what kind of wand it is. Wands can be placed in your Quick Item slot, if your class allows their use.~ [TTBRAN08] */
  IF ~~ THEN DO ~SetGlobal("GotWand","LOCALS",1)
~ EXIT
END

IF ~  HPPercentLT(Myself,50)
Global("Hurt","LOCALS",0)
AreaCheck("TU0018")
~ THEN BEGIN 15 // from:
  SAY #30086 /* ~I am seriously wounded. You should use my own Cure Wounds spell to heal me.~ [TTBRAN09] */
  IF ~~ THEN DO ~SetGlobal("Hurt","LOCALS",1)
~ EXIT
END
