<name>Asbolus</name>
<profession>Champion</profession>
<faction>Game Master</faction>
<dialogue>
  <greeting>
    <reply>
      <if> 
        <key>!taverngamebooked</key>
      </if>
      <text>Hello there, newbies. Have you ever dreamt of becoming a gaming champion?</text>
      <return>main</return>
    </reply>
    <reply>
      <if> 
        <key>!taverngamedone</key>
      </if>
      <text>So, are you making progress at Mages and Minions?</text>
      <return>main</return>
    </reply>
    <reply>
      <text>Gamers watch over each other, [gender].</text>
      <return>main</return>
    </reply>
  </greeting>

  <main>
    <option>
      <if> 
        <key>!taverngamedone</key>
        <key>taverngamebooked</key>
        <key>won_greenmothsociety</key>
        <key>won_goldendawn</key>
        <key>won_doubleeagle</key>
        <key>won_elfherself</key>
        <key>won_auclaire</key>
        <key>won_faeriedragonlawn</key>
        <key>won_lovecraft</key>
        <key>won_fanclub</key>
        <key>won_brownalert</key>
        <key>won_crimsonhawk</key>
        <key>won_sagesrebuttal</key>
        <key>won_doughygrub</key>
        <key>won_ironlady</key>
        <key>won_fortunesfolly</key>
        <key>won_atlas</key>
      </if>
      <text>We have won a game of Mages and Minions in every tavern!</text>
      <npc>
        <reply>
          <text>I am pleasantly surprised, I did not think you had it in you.
You may now call yourselves Champion of Mages and Minions, and collect the prize from the chest outside my hut.</text>
          <script>
            <key>taverngamedone</key>
            <expall>50000</expall>
            <quest>Tavern Game|done</quest>
            <log>Gained the title of Champion of Mages and Minions</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <if> 
        <key>taverngamebooked</key>
        <key>!taverngamedone</key>
      </if>
      <ifnot> 
        <key>won_greenmothsociety</key>
        <key>won_goldendawn</key>
        <key>won_doubleeagle</key>
        <key>won_elfherself</key>
        <key>won_auclaire</key>
        <key>won_faeriedragonlawn</key>
        <key>won_lovecraft</key>
        <key>won_fanclub</key>
        <key>won_brownalert</key>
        <key>won_crimsonhawk</key>
        <key>won_sagesrebuttal</key>
        <key>won_doughygrub</key>
        <key>won_ironlady</key>
        <key>won_fortunesfolly</key>
        <key>won_atlas</key>
      </ifnot>
      <text>We have not yet won a game in all the taverns, game master.</text>
      <npc>
        <reply>
          <text>Some of the taverns are somewhat, how shall I say this, remote. It may take some effort to locate them all.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <if> 
        <key>!taverngamebooked</key>
      </if>
      <text>Playing as we speak... 
I mean, a gaming champion? It sounds interesting. How can it be accomplished?</text>
      <npc>
        <reply>
          <text>You deserve the title if you manage to win a game of Mages and Minions in each of the fifteen taverns in Karigor where the game is played. I wish you wisdom and good luck, return to me if you succeed!</text>
          <script>
            <key>taverngamebooked</key>
            <quest>Tavern Game|Win a game of Mages and Minions in every tavern where the game is played</quest>
            <log>Received instructions from Asbolus on how to become a gaming champion</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>What is the secret of good gaming?</text>
      <npc>
        <reply>
          <text>Ah. Well, just make sure that you never make a move without knowing why, and you are guaranteed to learn from your mistakes. Don't mind those who play by instinct and seem to be lucky all the time. If you were one of them, you would not have asked this question!</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <text>Game on!</text>
      <npc>
        <reply>
          <return>exit</return> 
        </reply>
      </npc>
    </option>
  </main> 
</dialogue>