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

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

IF WEIGHT #3 /* Triggers after states #: 20 21 22 even though they appear after this state */
~Global("TalkedToLich","GLOBAL",0)
Global("MarloweJob","GLOBAL",1)
Global("LichJob","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #73575 /* ~Ahhhh... I had sensed that one with great power was close by.  And here you are, come to my little prison.  What do you wish, godling?  Vongoethe has no quarrel with you!~ */
  IF ~~ THEN REPLY #73576 /* ~But I have a quarrel with you!  I have come for Malla's soul!~ */ DO ~SetGlobal("TalkedToLich","GLOBAL",1)~ GOTO 1
  IF ~~ THEN REPLY #73577 /* ~So it's true!  A lich!  Prepare to die, creature!~ */ DO ~SetGlobal("TalkedToLich","GLOBAL",1)~ GOTO 1
  IF ~~ THEN REPLY #73578 /* ~I'm here to talk, Vongoethe.  No need for violence.~ */ DO ~SetGlobal("TalkedToLich","GLOBAL",1)~ GOTO 2
END

IF ~~ THEN BEGIN 1 // from: 0.1 0.0
  SAY #73579 /* ~I see, I see.  Let me guess... that lying little merchant, Marlowe, has somehow convinced you to come and end my existence?  Is that it?~ */
  IF ~~ THEN REPLY #73581 /* ~I have come only for Malla's soul.  I would avoid a fight, if I could.~ */ GOTO 3
  IF ~~ THEN REPLY #73582 /* ~I don't need much convincing to kill an undead abomination!~ */ GOTO 4
  IF ~~ THEN REPLY #73583 /* ~What do you mean 'lying'?  What are you talking about?~ */ GOTO 7
END

IF ~~ THEN BEGIN 2 // from: 0.2
  SAY #73580 /* ~That is good.  I have no wish to fight one as powerful as you are, <PRO_RACE>.  But... hmmm, do let me guess.  The lying merchant, Marlowe, has sent you?  Yes, am I right?~ */
  IF ~~ THEN REPLY #73584 /* ~I have come only for Malla's soul.  I would avoid a fight, if I could.~ */ GOTO 3
  IF ~~ THEN REPLY #73585 /* ~Yes, he sent me.  Why?~ */ GOTO 7
  IF ~~ THEN REPLY #73586 /* ~What do you mean 'lying'?  What are you talking about?~ */ GOTO 7
END

IF ~~ THEN BEGIN 3 // from: 2.0 1.0
  SAY #73587 /* ~I could care less about the girl's soul.  It is Marlowe's soul I want, as we agreed!  He could avoid all of this uncomfortable detente if he would simply live up to his side of the bargain!~ */
  IF ~~ THEN REPLY #73589 /* ~Wait... what are you talking about?  What bargain?~ */ GOTO 7
  IF ~~ THEN REPLY #73590 /* ~I'll listen to none of your lies, creature!  Give me the girl's soul: now!~ */ GOTO 6
END

IF ~~ THEN BEGIN 4 // from: 1.1
  SAY #73588 /* ~So he has found the right person, then, to wiggle him out of his contract, yes?  Shall we fight, then, godling?  Is that your wish?~ */
  IF ~~ THEN REPLY #73593 /* ~It is!  I am here to destroy you and nothing more!!~ */ GOTO 5
  IF ~~ THEN REPLY #73594 /* ~Oh, we'll fight... but I want the girl's soul, first!  Hand it over, lich!~ */ GOTO 6
  IF ~~ THEN REPLY #73595 /* ~Wait... what contract?  What are you talking about?~ */ GOTO 7
END

IF ~~ THEN BEGIN 5 // from: 19.0 18.3 15.3 14.3 13.3 12.1 6.0 4.0
  SAY #73592 /* ~Aiiiieee!  If I must perish, then so will the girl!  Come, my dead servants, come!  Protect your master from the godling!!~ */
  IF ~~ THEN DO ~EraseJournalEntry(73477)
EraseJournalEntry(73526)
EraseJournalEntry(73724)
EraseJournalEntry(73725)
EraseJournalEntry(73727)
EraseJournalEntry(73728)
SetGlobal("MallaDead","GLOBAL",1)
SetGlobal("LichFightStart","AR5509",1)
Enemy()~ SOLVED_JOURNAL #73726 /* ~The Graveyard Lich

I killed Vongoethe in the graveyard cavern... although I was unable to get Malla's soul from him, first.  She is likely dead, although Marlowe is at least safe, now.~ */ EXIT
END

IF ~~ THEN BEGIN 6 // from: 4.1 3.1
  SAY #73596 /* ~Nay, you'll not get it, godling!  If I must use the girl's soul to force Marlowe to live up to his contract, then I shall!  I will not be denied!~ */
  IF ~~ THEN REPLY #73597 /* ~So much for saving the girl then.  Prepare to die, lich!~ */ GOTO 5
  IF ~~ THEN REPLY #73598 /* ~What contract?  What are you talking about?~ */ GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.1 4.2 3.0 2.2 2.1 1.2
  SAY #73599 /* ~So it is as I thought.  Marlowe lied to the godling to save his own skin, did he?  Ha ha haaa... did he tell you nothing of our deal, then?~ */
  IF ~~ THEN REPLY #73600 /* ~No.  What deal is this?~ */ GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #73601 /* ~Heh.  Twenty years of fortune and success, he asked me for... in exchange for the voluntary surrender of his soul.  Well, he had his success!  Wealth and power both!~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #73602 /* ~But the human became arrogant, and when his time came due he refused to surrender his soul as payment!  Refused!~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #73603 /* ~So I took the soul of his wife.  I told him she would die without it.  And still he refused me!  He fled the city with his daughter and left his wife to die!~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 10.0
  SAY #73604 /* ~He evaded me for years until I found him here!  I have his daughter's soul, now, and he will live up to his promise or she shall suffer the consequences!!  He had his desire... now I want mine.~ */
  IF ~~ THEN REPLY #73605 /* ~No!  I shall not allow you to harm anyone else!~ */ GOTO 12
  IF ~~ THEN REPLY #73606 /* ~Is there no way that the daughter can live?~ */ GOTO 12
  IF ~~ THEN REPLY #73607 /* ~Why not simply steal his soul, then?  Why steal his wife's and daughter's?~ */ GOTO 13
  IF ~~ THEN REPLY #73608 /* ~He lied to me!  He said that you wanted his daughter and he was protecting her!~ */ GOTO 14
END

IF ~~ THEN BEGIN 12 // from: 11.1 11.0
  SAY #73609 /* ~I shall never surrender the girl's soul, foolish godling.  Raise a hand against me and she perishes.~ */
  IF ~~ THEN REPLY #73610 /* ~But she was no part of this deal!  Why must she be harmed?~ */ GOTO 13
  IF ~~ THEN REPLY #73611 /* ~I care not!  I shall end your existence here and now!!~ */ GOTO 5
END

IF ~~ THEN BEGIN 13 // from: 12.0 11.2
  SAY #73612 /* ~For my purposes, I need a soul freely given and not stolen.  And Marlowe knew this.  The girl's soul is stolen and useless to me... she need not perish, should Marlowe do as he promised!  He may throw others in the way of his fate, but I will hound him until I have what is rightfully mine!~ */
  IF ~~ THEN REPLY #73614 /* ~Will you restore his daughter, then, if I bring him here?~ */ GOTO 15
  IF ~~ THEN REPLY #73615 /* ~And if I brought Marlowe to you?  How would you reward me?~ */ GOTO 15
  IF ~~ THEN REPLY #73616 /* ~I will not help such a man, then.  I shall leave you now, lich.~ */ GOTO 15
  IF ~~ THEN REPLY #73617 /* ~No, you will not.  Regardless of what happens, your existence ends now, lich.~ */ GOTO 5
END

IF ~~ THEN BEGIN 14 // from: 11.3
  SAY #73613 /* ~He lies to protect himself.  He throws others, like his wife and child, in the way of his fate so that he may continue to hide.  But I require a soul freely given and not stolen like the girl's, and he *knew* the price!!  I will have what I am owed!~ */
  IF ~~ THEN REPLY #73618 /* ~Will you restore his daughter, then, if I bring him here?~ */ GOTO 15
  IF ~~ THEN REPLY #73619 /* ~And if I brought Marlowe to you?  How would you reward me?~ */ GOTO 15
  IF ~~ THEN REPLY #73620 /* ~I will not help such a man, then.  I shall leave you now, lich.~ */ GOTO 15
  IF ~~ THEN REPLY #73621 /* ~No, you will not.  Regardless of what happens, your existence ends now, lich.~ */ GOTO 5
END

IF WEIGHT #4 /* Triggers after states #: 20 21 22 even though they appear after this state */
~Global("TalkedToLich","GLOBAL",1)
Global("MarloweJob","GLOBAL",1)
Global("LichJob","GLOBAL",0)~ THEN BEGIN 15 // from: 14.2 14.1 14.0 13.2 13.1 13.0
  SAY #73622 /* ~I would give the soul of the girl to you, godling, were Marlowe brought before me.  Restore her with it or keep it for yourself... it is a valuable thing for many, a soul, yes?~ */
  IF ~~ THEN REPLY #73623 /* ~Very well.  I shall return with Marlowe, then.~ */ GOTO 17
  IF ~~ THEN REPLY #73624 /* ~I've no use for such a reward.  So forget it.  Solve your own problem.~ */ GOTO 16
  IF ~~ THEN REPLY #73626 /* ~No.  I will not help you.~ */ GOTO 16
  IF ~~ THEN REPLY #73625 /* ~No.  You would never live up to your end of such a bargain.  I would rather you die, now.~ */ GOTO 5
END

IF ~~ THEN BEGIN 16 // from: 19.2 18.0 15.2 15.1
  SAY #73627 /* ~As you desire, godling.  I've no wish to cross you... so begone, unless you change your mind.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #73727 /* ~The Graveyard Lich

I met with Vongoethe in the graveyard, and he told me a different tale from the one Marlowe did.  It seems he and Marlowe made a deal... the lich would provide Marlowe 20 years of success in return for his soul, freely given.  Marlowe refused to pay and fled Calimshan with his daughter, leaving his wife to die.  He has been running for some time, and now that the lich has caught up to him and taken his daughter's soul as leverage to get him to pay up, he came to me to intervene.~ */ EXIT
END

IF ~~ THEN BEGIN 17 // from: 19.1 18.1 15.0
  SAY #73628 /* ~Then I shall wait here for your return, godling, with great anticipation.~ */
  IF ~~ THEN DO ~SetGlobal("LichJob","GLOBAL",1)~ UNSOLVED_JOURNAL #73728 /* ~The Graveyard Lich

I have agreed to bring Marlowe to the lich to pay his debt.  I may be able to trick Marlowe into coming... but I wonder if the man wouldn't just come if told to.~ */ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 20 21 22 even though they appear after this state */
~Global("TalkedToLich","GLOBAL",1)
Global("MarloweJob","GLOBAL",1)
Global("LichJob","GLOBAL",1)~ THEN BEGIN 18 // from:
  SAY #73629 /* ~You return... but I do not see Marlowe with you.~ */
  IF ~~ THEN REPLY #73630 /* ~I have changed my mind.  I refuse to return with him.~ */ DO ~EraseJournalEntry(73728)
SetGlobal("LichJob","GLOBAL",0)~ GOTO 16
  IF ~~ THEN REPLY #73631 /* ~I'll bring him, don't worry.~ */ GOTO 17
  IF ~~ THEN REPLY #73632 /* ~I demand the girl's soul in advance.  I won't be cheated!~ */ GOTO 19
  IF ~~ THEN REPLY #73633 /* ~I have changed my mind.  It is time you die!~ */ GOTO 5
END

IF ~~ THEN BEGIN 19 // from: 18.2
  SAY #73634 /* ~Never!  It is mine until I have Marlowe's soul, and not a moment earlier!!~ */
  IF ~~ THEN REPLY #73635 /* ~Bah!  Then you die, lich!!~ */ GOTO 5
  IF ~~ THEN REPLY #73636 /* ~Fine, have it your way.  I'll get Marlowe.~ */ GOTO 17
  IF ~~ THEN REPLY #73637 /* ~Then forget it!  I'm not doing anything for you!~ */ DO ~SetGlobal("LichJob","GLOBAL",0)~ GOTO 16
END

IF WEIGHT #0 ~Dead("marlowe")
GlobalLT("LichJob","GLOBAL",2)
!Global("Enclave","GLOBAL",2)~ THEN BEGIN 20 // from:
  SAY #73667 /* ~You... you have killed Marlowe?!  Now I shall never collect what he owed to me, fool!  You may be powerful, but I shall strike you down!  To me, undead ones!  Kill the godling!!~ */
  IF ~~ THEN DO ~EraseJournalEntry(73477)
EraseJournalEntry(73526)
EraseJournalEntry(73724)
EraseJournalEntry(73725)
EraseJournalEntry(73727)
EraseJournalEntry(73728)
SetGlobal("MallaDead","GLOBAL",1)
SetGlobal("LichFightStart","AR5509",1)
Enemy()~ EXIT
END

IF WEIGHT #1 ~OR(2)
Global("PCKilledMalla","GLOBAL",1)
Global("Enclave","GLOBAL",2)
Global("TalkedToLich","GLOBAL",0)~ THEN BEGIN 21 // from:
  SAY #73668 /* ~So... the one with great power that I sensed has arrived at last.  How I... looked forward to tasting your soul, little godling.  You are powerful, yes... but it is a risk I shall take!!~ */
  IF ~~ THEN DO ~SetGlobal("MallaDead","GLOBAL",1)
SetGlobal("LichFightStart","AR5509",1)
Enemy()~ EXIT
END

IF WEIGHT #2 ~OR(2)
Global("PCKilledMalla","GLOBAL",1)
Global("Enclave","GLOBAL",2)
GlobalGT("TalkedToLich","GLOBAL",0)~ THEN BEGIN 22 // from:
  SAY #73669 /* ~I shall wait no longer for our business to be done, godling!  I hunger for your soul, and I shall have it!!  Despite your power, I shall take it!!~ */
  IF ~~ THEN DO ~EraseJournalEntry(73477)
EraseJournalEntry(73526)
EraseJournalEntry(73724)
EraseJournalEntry(73725)
EraseJournalEntry(73727)
EraseJournalEntry(73728)
SetGlobal("MallaDead","GLOBAL",1)
SetGlobal("LichFightStart","AR5509",1)
Enemy()~ EXIT
END

IF WEIGHT #6 ~GlobalGT("LichJob","GLOBAL",1)
GlobalLT("LichJob","GLOBAL",4)~ THEN BEGIN 23 // from:
  SAY #73670 /* ~Ahhhh... so, Marlowe, we meet again at long last.~ */
  IF ~Global("LichJob","GLOBAL",2)~ THEN EXTERN ~MARLOWE~ 43
  IF ~Global("LichJob","GLOBAL",3)~ THEN EXTERN ~MARLOWE~ 48
END

IF ~~ THEN BEGIN 24 // from:
  SAY #73672 /* ~No less than you tricked <PRO_HIMHER>, fool.  Or I.  Now... your debt is far past due, Marlowe, and the time for running is done.~ */
  IF ~~ THEN EXTERN ~MARLOWE~ 44
END

IF ~~ THEN BEGIN 25 // from:
  SAY #73674 /* ~I shall give the vessel with her soul to the godling, fool.  What <PRO_HESHE> does with it is <PRO_HISHER> business.~ */
  IF ~~ THEN EXTERN ~MARLOWE~ 45
END

IF ~~ THEN BEGIN 26 // from:
  SAY #73681 /* ~Most excellent.  As I live up to my bargains, here is the mortal girl's soul, godling.  Take it and begone.  Now, for what is long overdue, Marlowe...~ */
  IF ~~ THEN REPLY #73682 /* ~No!  I have the girl's soul, now, and I will not allow you to do more harm!~ */ GOTO 27
  IF ~~ THEN REPLY #73684 /* ~This should be interesting...~ */ DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("marlowe2")~ EXIT
  IF ~~ THEN REPLY #73685 /* ~Just get this over with quickly.~ */ DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("marlowe2")~ EXIT
END

IF ~~ THEN BEGIN 27 // from: 26.0
  SAY #73686 /* ~You dare!!  This is a legitimate transaction, one *he* agreed to!!~ */
  IF ~~ THEN REPLY #73687 /* ~Legitimate?  Bargaining with souls?  Don't make me laugh!~ */ GOTO 28
  IF ~~ THEN REPLY #73688 /* ~Regardless, I will not allow him to come to harm!~ */ GOTO 28
  IF ~~ THEN REPLY #73689 /* ~I... suppose you are correct.  Get this over with, then.~ */ DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("marlowe2")~ EXIT
END

IF ~~ THEN BEGIN 28 // from: 27.1 27.0
  SAY #73690 /* ~Hissssss!!  Then you shall die!!  Then you shall all die!!~ */
  IF ~~ THEN DO ~SetGlobal("LichFightStart","AR5509",1)
ActionOverride("marlowe",DialogueInterrupt(FALSE))
DialogueInterrupt(FALSE)
Enemy()~ EXIT
END

IF ~~ THEN BEGIN 29 // from:
  SAY #73692 /* ~And is it time, then, for you to give me that which I am due, Marlowe?  Freely and of your own volition?~ */
  IF ~~ THEN EXTERN ~MARLOWE~ 44
END

IF WEIGHT #7 ~Global("LichJob","GLOBAL",4)
Dead("marlowe")~ THEN BEGIN 30 // from:
  SAY #73693 /* ~It is done.  Very well, godling... you have your payment and I have mine.  I trust there is nothing more to say?~ */
  IF ~~ THEN REPLY #73694 /* ~Only that it is time for you to die, now, lich.~ */ GOTO 32
  IF ~~ THEN REPLY #73695 /* ~No.  I'm satisfied.~ */ GOTO 31
  IF ~~ THEN REPLY #73696 /* ~Begone, creature.  You got what you wanted!~ */ GOTO 31
END

IF ~~ THEN BEGIN 31 // from: 30.2 30.1
  SAY #73697 /* ~Very well.  Perhaps... perhaps another time, godling.~ */
  IF ~~ THEN DO ~EraseJournalEntry(73477)
EraseJournalEntry(73526)
EraseJournalEntry(73724)
EraseJournalEntry(73725)
EraseJournalEntry(73727)
EraseJournalEntry(73728)
ReallyForceSpell(Myself,POOF_GONE)~ SOLVED_JOURNAL #73729 /* ~The Graveyard Lich

Vongoethe has gotten what he wanted from Marlowe, who was more or less willing to have it over with in the end.  I have the soul of the girl in its crystalline cage, now, and could restore her if I wished.~ */ EXIT
END

IF ~~ THEN BEGIN 32 // from: 30.0
  SAY #73698 /* ~Ah, yes.  That was not part of our bargain, was it?  I should have suspected as much.  So be it, godling... but you shall not find me a simple target!!~ */
  IF ~~ THEN DO ~EraseJournalEntry(73477)
EraseJournalEntry(73526)
EraseJournalEntry(73724)
EraseJournalEntry(73725)
EraseJournalEntry(73727)
EraseJournalEntry(73728)
SetGlobal("LichFightStart","AR5509",1)
Enemy()~ SOLVED_JOURNAL #73729 /* ~The Graveyard Lich

Vongoethe has gotten what he wanted from Marlowe, who was more or less willing to have it over with in the end.  I have the soul of the girl in its crystalline cage, now, and could restore her if I wished.~ */ EXIT
END
