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

BEGIN ~DOMT~

IF ~True()~ THEN BEGIN 0 // from:
  SAY #63770 /* ~The deck seems to vibrate in expectation as you remove it from your pack.  The immediate area grows warmer for a moment, magical energy invisibly radiating from the metal plaques.~ */
  IF ~Global("DOMTdraw","GLOBAL",0)~ THEN REPLY #63771 /* ~Draw one of the cards.~ */ DO ~IncrementGlobal("DOMTdraw","GLOBAL",1)~ GOTO 2
  IF ~Global("DOMTdraw","GLOBAL",1)~ THEN REPLY #63775 /* ~Draw one of the cards.~ */ DO ~IncrementGlobal("DOMTdraw","GLOBAL",1)~ GOTO 3
  IF ~Global("DOMTdraw","GLOBAL",2)~ THEN REPLY #63776 /* ~Draw one of the cards.~ */ DO ~IncrementGlobal("DOMTdraw","GLOBAL",1)~ GOTO 4
  IF ~Global("DOMTdraw","GLOBAL",3)~ THEN REPLY #63777 /* ~Draw one of the cards.~ */ GOTO 5
  IF ~~ THEN REPLY #63772 /* ~Put the deck away for now.~ */ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.4
  SAY #63773 /* ~You replace the Deck of Many Things in your pack, relaxing as the air of suspense seems to dissipate.~ */
  IF ~~ THEN DO ~Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 2 // from: 0.0
  SAY #63774 /* ~Running your fingers along the edge of the metallic plaques, you finally make a decision and remove your chosen card from the deck...~ */
  IF ~RandomNum(6,1)~ THEN GOTO 6
  IF ~RandomNum(6,2)~ THEN GOTO 7
  IF ~RandomNum(6,3)~ THEN GOTO 8
  IF ~RandomNum(6,4)~ THEN GOTO 9
  IF ~RandomNum(6,5)~ THEN GOTO 10
  IF ~RandomNum(6,6)~ THEN GOTO 11
END

IF ~~ THEN BEGIN 3 // from: 0.1
  SAY #63778 /* ~Running your fingers along the edge of the metallic plaques, you finally make a decision and remove your chosen card from the deck...~ */
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,1)~ THEN GOTO 12
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,2)~ THEN GOTO 13
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,3)~ THEN GOTO 14
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,4)~ THEN GOTO 15
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,5)~ THEN GOTO 16
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,6)~ THEN GOTO 17
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,1)~ THEN GOTO 12
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,2)~ THEN GOTO 18
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,3)~ THEN GOTO 19
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,4)~ THEN GOTO 15
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,5)~ THEN GOTO 16
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,6)~ THEN GOTO 17
END

IF ~~ THEN BEGIN 4 // from: 0.2
  SAY #63779 /* ~Running your fingers along the edge of the metallic plaques, you finally make a decision and remove your chosen card from the deck...~ */
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,1)~ THEN GOTO 20
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,2)~ THEN GOTO 21
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,3)~ THEN GOTO 22
  IF ~Global("BadCardDrawn","GLOBAL",0)
RandomNum(6,4)~ THEN GOTO 23
  IF ~RandomNum(6,5)~ THEN GOTO 24
  IF ~RandomNum(6,6)~ THEN GOTO 25
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,1)~ THEN GOTO 20
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,2)~ THEN GOTO 26
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,3)~ THEN GOTO 21
  IF ~Global("BadCardDrawn","GLOBAL",1)
RandomNum(6,4)~ THEN GOTO 23
END

IF ~~ THEN BEGIN 5 // from: 0.3
  SAY #63780 /* ~Running your fingers along the edge of the metallic plaques, you finally make a decision and remove your chosen card from the deck...~ */
  IF ~~ THEN GOTO 27
END

IF ~~ THEN BEGIN 6 // from: 2.0
  SAY #63781 /* ~The plaque depicts a scene filled with black runes and what appears to be a man screaming in terror inside of a cage.  It is clearly labeled 'DONJON'.~ */
  IF ~~ THEN DO ~SetGlobal("BadCardDrawn","GLOBAL",1)
ReallyForceSpell(LastTalkedToBy(),DECK_DONJON)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 2.1
  SAY #63782 /* ~A striking scene of a bolt of blue lightning striking and destroying a tall tower covers the plaque.  From the tower, a horrified man falls to his death.  The card is clearly labeled 'RUIN'.~ */
  IF ~~ THEN DO ~SetGlobal("BadCardDrawn","GLOBAL",1)
ReallyForceSpell(LastTalkedToBy(),DECK_RUIN)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 8 // from: 2.2
  SAY #63783 /* ~The visage of a medusa upon this card seems almost alive, her gaze boring into you as her snakes writhe.  The card is labeled 'EURYALE'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_EURYALE)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 9 // from: 2.3
  SAY #63784 /* ~The card's depiction of fire seems almost to flicker and writhe, laced with anger, jealousy and envy.  Written in charcoal-black is the card's title: 'FLAMES'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_FLAMES)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 10 // from: 2.4
  SAY #63785 /* ~The plaque depicts a clear scene of a smiling man holding a diamond up to the light.  The diamond is vividly real and seems to glitter with its own magic.  The card is labeled 'GEM'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_GEM)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 11 // from: 2.5
  SAY #63786 /* ~The plaque depicts a strange scene of a smiling man hung upside down by one foot.  Oddly, the card gives you a good feeling, almost a need to laugh.  It is labeled 'JESTER'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_JESTER)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 12 // from: 3.6 3.0
  SAY #63787 /* ~The entire card is black as midnight, with a depth that seems to suddenly reach out for you.  You cannot see the word anywhere upon it, but you know the card's name...'VOID'.~ */
  IF ~~ THEN DO ~SetGlobal("BadCardDrawn","GLOBAL",1)
ReallyForceSpell(LastTalkedToBy(),DECK_VOID)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 13 // from: 3.1
  SAY #63788 /* ~A single man is depicted on the card, seemingly young and intelligent.  One hand points up at the sky, the other to the earth, an old sign for transformation.  The card is ominously labeled 'MAGICIAN'.~ */
  IF ~~ THEN DO ~SetGlobal("BadCardDrawn","GLOBAL",1)
ReallyForceSpell(LastTalkedToBy(),DECK_MAGICIAN)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 14 // from: 3.2
  SAY #63794 /* ~Amidst the runes on the card, a warrior within a black suit of plate armor stares malevolently out at you.  The card is labeled 'KNIGHT'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_KNIGHT)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 15 // from: 3.9 3.3
  SAY #63795 /* ~The card is blood-red, practically dripping with venom, and shows a smiling man stabbing another in the back with a sharp blade.  The card is labeled 'ROGUE'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_ROGUE)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 16 // from: 3.10 3.4
  SAY #63796 /* ~The card is bright and immediately makes you smile, depicting a cherubic boy atop a white horse with the sun shining brilliantly in the sky behind them.  The card is clearly labeled 'SUN'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_SUN)
AddexperienceParty(300000)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 17 // from: 3.11 3.5
  SAY #63797 /* ~The card has a hushed sense about it, showing a wizened old man in a cowl.  His eyes lock onto yours and you know immediately that he possesses great secrets.  The card is labeled 'VIZIER'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_VIZIER)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 18 // from: 3.7
  SAY #63798 /* ~The card depicts a great holy man in rich robes, with the penitent bowing before him.  In his hands, he holds aloft a great, golden key.  The card is labeled 'KEY'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_KEY)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 19 // from: 3.8
  SAY #63800 /* ~A scene of a young woman emerging from a still pond greets you, the woman smiling gently and the night sky so real and vast it startles you.  The card is labeled 'STAR'.~ */
  IF ~True()~ THEN GOTO 30
  IF ~OR(2)
Class(LastTalkedToBy,CLERIC_ALL)
Class(LastTalkedToBy,DRUID_ALL)~ THEN GOTO 31
  IF ~Class(LastTalkedToBy,MAGE_ALL)~ THEN GOTO 32
  IF ~Class(LastTalkedToBy,BARD_ALL)
Class(LastTalkedToBy,THIEF_ALL)~ THEN GOTO 33
END

IF ~~ THEN BEGIN 20 // from: 4.6 4.0
  SAY #63803 /* ~A picture of a bone-white skull immediately greets you.  As if animate, the skull grins and immediately fills you with fear.  The card is labeled 'SKULL'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_SKULL)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 21 // from: 4.8 4.1
  SAY #63804 /* ~The card shows an achingly beautiful woman half-hidden by a lantern held in front of her as she moves through the darkness.  The night sky behind her is bright and vividly real.  A label below reads 'MOON'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_MOON)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 22 // from: 4.2
  SAY #63805 /* ~The card shows a wicked, smiling woman with bright eyes who reaches out to you with a withered hand anointed with sharp, gleaming nails.  It is labeled 'TALONS'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_TALONS)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 23 // from: 4.9 4.3
  SAY #63806 /* ~The card's scene shows a young man admiring the sky as he obliviously walks towards a sharp precipice.  The card is labeled 'FOOL'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_FOOL)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 24 // from: 4.4
  SAY #63807 /* ~You are startled as the picture of a blazing, fiery rock seems to leap out at you from the card, its golden trail leading deep within the black background.  The card is labeled 'COMET'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_COMET)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 25 // from: 4.5
  SAY #63808 /* ~Three women hold a single thread between them, all looking at you askance.  One is young and beautiful, another middle-aged and matronly, the third a crone.  The card is labeled 'ERINYES'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_FATES)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 26 // from: 4.7
  SAY #63809 /* ~The card depicts a man seated upon an iron throne, his countenance commanding and regal both.  For a moment, you are sure the figure nods to you solemnly.  The card is labeled 'THRONE'.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),DECK_THRONE)
AddexperienceParty(1000000)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 27 // from: 5.0
  SAY #63810 /* ~The card shows an old man with flaming-red hair and fiery eyes staring out at you.  In his hands he holds a scale, the small silver bowls evenly balanced.  The card is clearly labeled 'BALANCE'.~ */
  IF ~~ THEN GOTO 28
END

IF ~~ THEN BEGIN 28 // from: 27.0
  SAY #63811 /* ~Almost immediately you realize that the man is the creator of the deck.  The image both smiles slightly and nods to you, tapping the scale in his withered hands.~ */
  IF ~~ THEN GOTO 29
END

IF ~~ THEN BEGIN 29 // from: 28.0
  SAY #63812 /* ~What remains of the Deck of Many Things begins to fade suddenly... and within the space of a moment it is gone forever.~ */
  IF ~~ THEN DO ~TakePartyItem("Deck")
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 30 // from: 19.0
  SAY #70868 /* ~You feel a surge of Strength.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),GAIN_ONE_STR_PERMANENT)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 31 // from: 19.1
  SAY #70869 /* ~You feel a surge of Wisdom.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),GAIN_ONE_WIS_PERMANENT)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 32 // from: 19.2
  SAY #70870 /* ~You feel a surge of Intelligence.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),GAIN_ONE_INT_PERMANENT)
Wait(3)
DestroySelf()~ EXIT
END

IF ~~ THEN BEGIN 33 // from: 19.3
  SAY #70871 /* ~You feel a surge of Dexterity.~ */
  IF ~~ THEN DO ~ReallyForceSpell(LastTalkedToBy(),GAIN_ONE_DEX_PERMANENT)
Wait(3)
DestroySelf()~ EXIT
END
