// -----------------------------
// Irenicus Dialogue Enhancements
// -----------------------------

// Adding first extended option
EXTEND_TOP PPIRENI1 30 #4
  + ~CheckStatGT(Player1,14,CHR) CheckStatGT(Player1,11,INT)~ + ~Why do this? Why this charade--why Imoen?~ DO ~SetGlobal("LK#Irenicus_Why","GLOBAL",1)~ + LK#Irenicus_1
END

// Adding "Why Imoen?" response
EXTEND_TOP PPIRENI2 12 #4
  ++ ~Why Imoen? Why not another Bhaalspawn?~ DO ~SetGlobal("LK#Irenicus_Imoen","GLOBAL",1)~ + LK#Irenicus_2
END

// Adding "What do you mean, you should know?"
EXTEND_TOP PPIRENI2 22 #5
  + ~CheckStatGT(Player1,14,CHR) CheckStatGT(Player1,11,INT)~ + ~What do you mean, you should know?~ DO ~SetGlobal("LK#Irenicus_Curse","GLOBAL",1)~ + LK#Irenicus_3
END

// Irenicus in Hell; final thoughts
EXTEND_TOP HELLJON 1 #6
  + ~Global("LK#Irenicus_Why","GLOBAL",1) Global("LK#Irenicus_Imoen","GLOBAL",1) Global("LK#Irenicus_Curse","GLOBAL",1)~ + ~Wait! Irenicus, you are defeated; surely you understand that? Why do you persist, even in death?~ DO ~SetGlobal("LK#Irenicus_Final","GLOBAL",1)~ + LK#Irenicus_4
END


// "Why?"
APPEND ~PPIRENI1~
  IF ~~ LK#Irenicus_1_0
    SAY ~Why? Power, <CHARNAME>. There is never any reason but power.~
    ++ ~Love. Hate. Jealousy, faith, revenge. There are hundreds.~ + LK#Irenicus_1_1
    ++ ~But why us? What is it you want?~ + LK#Irenicus_1_2
    ++ ~I will kill you slowly and painfully for what you have done. You will *not* survive the process.~ + LK#Irenicus_1_3
  END
  
  IF ~~ LK#Irenicus_1_1
    SAY ~~
    IF ~~ GOTO LK#Irenicus_1_4
  END
  
  IF ~~ LK#Irenicus_1_2
    SAY ~~
    IF ~~ GOTO LK#Irenicus_1_4
  END
  
  IF ~~ LK#Irenicus_1_3
    SAY ~It is you, <CHARNAME>, who will not survive this encounter. Your foolish~
    IF ~~ GOTO LK#Irenicus_1_4
  END
  
  IF ~~ LK#Irenicus_1_4
    SAY ~~
    ++ ~Response #1~ + LK#Irenicus_1_5
    ++ ~Response #2~ + LK#Irenicus_1_6
    ++ ~Response #3~ + LK#Irenicus_1_7
  END
  
  IF ~~ LK#Irenicus_1_5
    SAY ~~
    IF ~~ GOTO LK#Irenicus_1_8
  END
  
  IF ~~ LK#Irenicus_1_6
    SAY ~~
    IF ~~ GOTO LK#Irenicus_1_8
  END
  
  IF ~~ LK#Irenicus_1_7
    SAY ~~
    IF ~~ GOTO LK#Irenicus_1_8
  END
  
  IF ~~ LK#Irenicus_1_8
    SAY ~~
    // to "You are intent on justice, revenge or whatever."
    IF ~~ EXTERN PPIRENI1 32
  END
END

// "Why Imoen?"
APPEND ~PPIRENI2~
  IF ~~ LK#Irenicus_2_0
    SAY ~~
    ++ ~Response #1~ + LK#Irenicus_2_1
    ++ ~Response #2~ + LK#Irenicus_2_2
    ++ ~Response #3~ + LK#Irenicus_2_3
  END
  
  IF ~~ LK#Irenicus_2_1
    SAY ~~
    IF ~~ GOTO LK#Irenicus_2_4
  END

  IF ~~ LK#Irenicus_2_2
    SAY ~~
    IF ~~ GOTO LK#Irenicus_2_4
  END
  
  IF ~~ LK#Irenicus_2_3
    SAY ~~
    IF ~~ GOTO LK#Irenicus_2_4
  END
  
  IF ~~ LK#Irenicus_2_4
    SAY ~~
    ++ ~Response #1~ + LK#Irenicus_2_5
    ++ ~Response #2~ + LK#Irenicus_2_6
    ++ ~Response #3~ + LK#Irenicus_2_7
  END
  
  IF ~~ LK#Irenicus_2_5
    SAY ~~
    IF ~~ GOTO LK#Irenicus_2_8
  END

  IF ~~ LK#Irenicus_2_6
    SAY ~~
    IF ~~ GOTO LK#Irenicus_2_8
  END

  IF ~~ LK#Irenicus_2_7
    SAY ~~
    IF ~~ GOTO LK#Irenicus_2_8
  END
  
  IF ~~ LK#Irenicus_2_8
    SAY ~~
    IF ~~ EXTERN PPIRENI2 14
    // back to "I am done with her."
  END
END

// "What do you mean, you should know?"
APPEND ~PPIRENI2~
  IF ~~ LK#Irenicus_3_0
    SAY ~~
    ++ ~Response #1~ + LK#Irenicus_3_1
    ++ ~Response #2~ + LK#Irenicus_3_2
    ++ ~Response #3~ + LK#Irenicus_3_3
  END
  
  IF ~~ LK#Irenicus_3_1
    SAY ~~
    IF ~~ GOTO LK#Irenicus_3_4
  END

  IF ~~ LK#Irenicus_3_2
    SAY ~~
    IF ~~ GOTO LK#Irenicus_3_4
  END
  
  IF ~~ LK#Irenicus_3_3
    SAY ~~
    IF ~~ GOTO LK#Irenicus_3_4
  END
  
  IF ~~ LK#Irenicus_3_4
    SAY ~~
    ++ ~Response #1~ + LK#Irenicus_3_5
    ++ ~Response #2~ + LK#Irenicus_3_6
    ++ ~Response #3~ + LK#Irenicus_3_7
  END
  
  IF ~~ LK#Irenicus_1_5
    SAY ~~
    IF ~~ GOTO LK#Irenicus_3_8
  END
  
  IF ~~ LK#Irenicus_3_6
    SAY ~~
    IF ~~ GOTO LK#Irenicus_3_8
  END

  IF ~~ LK#Irenicus_3_7
    SAY ~~
    IF ~~ GOTO LK#Irenicus_3_8
  END
  
  IF ~~ LK#Irenicus_3_8
    SAY ~~
    IF ~~ EXTERN PPIRENI2 48
    // to "The curse that was wrought against Bodhi and I..."
  END
END

// "What do you mean, you should know?"
APPEND ~PPIRENI2~
  IF ~~ LK#Irenicus_4_0
    SAY ~~
    ++ ~Response #1~ + LK#Irenicus_4_1
    ++ ~Response #2~ + LK#Irenicus_4_2
    ++ ~Response #3~ + LK#Irenicus_4_3
  END
  
  IF ~~ LK#Irenicus_4_1
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_4
  END

  IF ~~ LK#Irenicus_4_2
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_4
  END
  
  IF ~~ LK#Irenicus_4_3
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_4
  END
  
  IF ~~ LK#Irenicus_4_4
    SAY ~~
    ++ ~Response #1~ + LK#Irenicus_4_5
    ++ ~Response #2~ + LK#Irenicus_4_6
    ++ ~Response #3~ + LK#Irenicus_4_7
  END
  
  IF ~~ LK#Irenicus_4_5
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_8
  END
  
  IF ~~ LK#Irenicus_4_6
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_8
  END

  IF ~~ LK#Irenicus_4_7
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_8
  END
  
  IF ~~ LK#Irenicus_4_8
    SAY ~~
    IF ~~ EXTERN PPIRENI2 48
    // to "The curse that was wrought against Bodhi and I..."
  END
END

// "Why do you persist, even in death?"
APPEND ~HELLJON~
  IF ~~ LK#Irenicus_4_0
    SAY ~~
    ++ ~Response #1~ + LK#Irenicus_4_1
    ++ ~Response #2~ + LK#Irenicus_4_2
    ++ ~Response #3~ + LK#Irenicus_4_3
  END
  
  IF ~~ LK#Irenicus_4_1
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_4
  END

  IF ~~ LK#Irenicus_4_2
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_4
  END
  
  IF ~~ LK#Irenicus_4_3
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_4
  END
  
  IF ~~ LK#Irenicus_4_4
    SAY ~~
    ++ ~Response #1~ + LK#Irenicus_4_5
    ++ ~Response #2~ + LK#Irenicus_4_6
    ++ ~Response #3~ + LK#Irenicus_4_7
  END
  
  IF ~~ LK#Irenicus_4_5
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_8
  END
  
  IF ~~ LK#Irenicus_4_6
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_8
  END

  IF ~~ LK#Irenicus_4_7
    SAY ~~
    IF ~~ GOTO LK#Irenicus_4_8
  END
  
  IF ~~ LK#Irenicus_4_8
    SAY ~~
    IF ~~ EXTERN HELLJON 5
    // to "As horrific as this place is..."
  END
END
END