CommonEvent 180
Name = "Colosseum: Ghost Matches"

  999([180])
  Script(["ex_choice_add(\"Lost Soul Cup\",1,\"v[722] >= 0\",1)"])
  ScriptMore(["ex_choice_add(\"Death Spirit Cup\",2,\"v[722] >= 1\",2)"])
  ScriptMore(["ex_choice_add(\"Invisible Queen Cup\",3,\"v[722] >= 2\",3)"])
  ScriptMore(["ex_choice_add(\"Reaper Cup\",4,"])
  ScriptMore(["\"v[722] >= 3 and v[1143] >= 25\",0)"])
  ScriptMore(["ex_choice_add(\"Never mind\",5)"])
  Script(["ex_choice_show"])
  ConditionalBranch([1, 9, 0, 1, 0])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Official>You are participating in the Lost Soul Cup!\nIn that case, please proceed to the arena!"])
    ShowText([""])
    ShowText([""])
    ConditionalBranch([1, 1143, 0, 9, 2])
      TransferPlayer([0, 483, 32, 31, 6, 0])
      Empty([])

    BranchEnd([])
    ConditionalBranch([1, 1143, 0, 10, 1])
      ControlVariables([57, 57, 0, 0, 1200])
      TransferPlayer([0, 200, 32, 31, 6, 0])
      Empty([])

    BranchEnd([])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Referee>Team Luka has entered!\nWithout further ado, the first match shall begin at once!!"])
    ShowText([""])
    ShowText([""])
    ControlVariables([702, 702, 0, 0, 1])
    CallCommonEvent([160])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Referee>Team Luka has won the first match!\nContinuing on, the second match shall now commence!!"])
    ShowText([""])
    ShowText([""])
    ControlVariables([702, 702, 0, 0, 2])
    CallCommonEvent([160])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Referee>Team Luka has won the second match!\nAt last, the finals shall now commence!"])
    ShowText([""])
    ShowText([""])
    ControlVariables([702, 702, 0, 0, 3])
    CallCommonEvent([160])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Referee>And the winners of the finals are...Team Luka!!\nLet's all give a round of applause for Team Luka!!"])
    ShowText([""])
    ShowText([""])
    ConditionalBranch([1, 722, 0, 0, 0])
      PlaySE(["RPG::SE(@name=\"mon_fanfale2\", @pitch=100, @volume=100)"])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["You have mastered the Lost Soul Cup!!"])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeArmor([1312, 0, 0, 1, false])
      ConditionalBranch([8, 549])
        Empty([])

      Else([])
        ControlSwitches([2284, 2284, 0])
        ChangeItems([549, 0, 0, 1])
        Empty([])

      BranchEnd([])
      ControlVariables([722, 722, 0, 0, 1])
      Empty([])

    Else([])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeItems([36, 0, 0, 1])
      ChangeItems([40, 0, 0, 1])
      ChangeItems([44, 0, 0, 1])
      ConditionalBranch([8, 549])
        Empty([])

      Else([])
        ControlSwitches([2284, 2284, 0])
        ChangeItems([549, 0, 0, 1])
        Empty([])

      BranchEnd([])
      Empty([])

    BranchEnd([])
    ConditionalBranch([1, 1143, 0, 9, 2])
      TransferPlayer([0, 484, 14, 10, 8, 0])
      Empty([])

    BranchEnd([])
    ConditionalBranch([1, 1143, 0, 10, 1])
      ControlVariables([57, 57, 0, 0, 1199])
      TransferPlayer([0, 199, 14, 10, 8, 0])
      Empty([])

    BranchEnd([])
    Script(["gain_medal(1611)"])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Official>Congratulations on winning the Lost Soul Cup championship!\nAs one would expect of top-notch fighters!"])
    ShowText([""])
    ShowText([""])
    CallCommonEvent([159])
    ExitEventProcessing([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 9, 0, 2, 0])
    ConditionalBranch([1, 1001, 0, 30, 1])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Official>You are participating in the Death Spirit Cup!\nIn that case, please proceed to the arena!"])
      ShowText([""])
      ShowText([""])
      ConditionalBranch([1, 1143, 0, 9, 2])
        TransferPlayer([0, 483, 32, 31, 6, 0])
        Empty([])

      BranchEnd([])
      ConditionalBranch([1, 1143, 0, 10, 1])
        ControlVariables([57, 57, 0, 0, 1200])
        TransferPlayer([0, 200, 32, 31, 6, 0])
        Empty([])

      BranchEnd([])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Referee>Team Luka has entered!\nWithout further ado, the first match shall begin at once!!"])
      ShowText([""])
      ShowText([""])
      ControlVariables([702, 702, 0, 0, 3])
      CallCommonEvent([160])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Referee>Team Luka has won the first match!\nContinuing on, the second match shall now commence!!"])
      ShowText([""])
      ShowText([""])
      ControlVariables([702, 702, 0, 0, 4])
      CallCommonEvent([160])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Referee>Team Luka has won the second match!\nAt last, the finals shall now commence!"])
      ShowText([""])
      ShowText([""])
      ControlVariables([702, 702, 0, 0, 6])
      CallCommonEvent([160])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Referee>And the winners of the finals are...Team Luka!!\nLet's all give a round of applause for Team Luka!!"])
      ShowText([""])
      ShowText([""])
      ConditionalBranch([1, 722, 0, 1, 0])
        PlaySE(["RPG::SE(@name=\"mon_fanfale2\", @pitch=100, @volume=100)"])
        ShowTextAttributes(["", 0, 0, 2])
        ShowText(["You have mastered the Death Spirit Cup!!"])
        PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
        ChangeArmor([1635, 0, 0, 1, false])
        ControlVariables([722, 722, 0, 0, 2])
        Empty([])

      Else([])
        PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
        ChangeItems([41, 0, 0, 1])
        Empty([])

      BranchEnd([])
      ConditionalBranch([1, 1143, 0, 9, 2])
        TransferPlayer([0, 484, 14, 10, 8, 0])
        Empty([])

      BranchEnd([])
      ConditionalBranch([1, 1143, 0, 10, 1])
        ControlVariables([57, 57, 0, 0, 1199])
        TransferPlayer([0, 199, 14, 10, 8, 0])
        Empty([])

      BranchEnd([])
      Script(["gain_medal(1612)"])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Official>Congratulations on winning the Death Spirit Cup championship! You're on the verge of becoming unrivaled, ultra top-class fighters!"])
      ShowText([""])
      ShowText([""])
      CallCommonEvent([159])
      ExitEventProcessing([])
      Empty([])

    Else([])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Official>I'm sorry, but that title is currently being prepared. Please come back another time."])
      ShowText([""])
      ShowText([""])
      JumpToLabel(["メニュー"])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 9, 0, 3, 0])
    ConditionalBranch([1, 1001, 0, 34, 1])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Official>You are participating in the Invisible Queen Cup!\nIn that case, please proceed to the arena!"])
      ShowText([""])
      ShowText([""])
      ConditionalBranch([1, 1143, 0, 9, 2])
        TransferPlayer([0, 483, 32, 31, 6, 0])
        Empty([])

      BranchEnd([])
      ConditionalBranch([1, 1143, 0, 10, 1])
        ControlVariables([57, 57, 0, 0, 1200])
        TransferPlayer([0, 200, 32, 31, 6, 0])
        Empty([])

      BranchEnd([])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Referee>Team Luka has entered!\nWithout further ado, the first match shall begin at once!!"])
      ShowText([""])
      ShowText([""])
      ControlVariables([702, 702, 0, 0, 5])
      CallCommonEvent([160])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Referee>Team Luka has won the first match!\nContinuing on, the second match shall now commence!!"])
      ShowText([""])
      ShowText([""])
      ControlVariables([702, 702, 0, 0, 6])
      CallCommonEvent([160])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Referee>Team Luka has won the second match!\nAt last, the finals shall now commence!"])
      ShowText([""])
      ShowText([""])
      ControlVariables([702, 702, 0, 0, 7])
      CallCommonEvent([160])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Referee>And the winners of the finals are...Team Luka!!\nLet's all give a round of applause for Team Luka!!"])
      ShowText([""])
      ShowText([""])
      ConditionalBranch([1, 722, 0, 2, 0])
        PlaySE(["RPG::SE(@name=\"mon_fanfale2\", @pitch=100, @volume=100)"])
        ShowTextAttributes(["", 0, 0, 2])
        ShowText(["You have mastered the Invisible Queen Cup!!"])
        PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
        ChangeArmor([1313, 0, 0, 1, false])
        ControlVariables([722, 722, 0, 0, 3])
        Empty([])

      Else([])
        PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
        ChangeItems([37, 0, 0, 1])
        ChangeItems([41, 0, 0, 1])
        ChangeItems([45, 0, 0, 1])
        Empty([])

      BranchEnd([])
      ConditionalBranch([1, 1143, 0, 9, 2])
        TransferPlayer([0, 484, 14, 10, 8, 0])
        Empty([])

      BranchEnd([])
      ConditionalBranch([1, 1143, 0, 10, 1])
        ControlVariables([57, 57, 0, 0, 1199])
        TransferPlayer([0, 199, 14, 10, 8, 0])
        Empty([])

      BranchEnd([])
      Script(["gain_medal(1613)"])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Official>Congratulations on winning the Invisible Queen Cup championship! You have achieved a glorious record!"])
      ShowText([""])
      ShowText([""])
      CallCommonEvent([159])
      ExitEventProcessing([])
      Empty([])

    Else([])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["\\n<Official>I'm sorry, but that title is currently being prepared. Please come back another time."])
      ShowText([""])
      ShowText([""])
      JumpToLabel(["メニュー"])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 9, 0, 4, 0])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Staff>"])
    ShowText(["You are participating in the Reaper's Cup!"])
    ShowText(["Now, please proceed to the arena!"])
    ConditionalBranch([1, 1143, 0, 9, 2])
      TransferPlayer([0, 483, 32, 31, 6, 0])
      Empty([])

    BranchEnd([])
    ConditionalBranch([1, 1143, 0, 10, 1])
      ControlVariables([57, 57, 0, 0, 1200])
      TransferPlayer([0, 200, 32, 31, 6, 0])
      Empty([])

    BranchEnd([])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Judge>"])
    ShowText(["Team Luka has entered!"])
    ShowText(["Now, let's get started with the first match!!"])
    ControlVariables([702, 702, 0, 0, 8])
    ChangeBattleBGM(["RPG::BGM(@name=\"boss_hametu2\", @volume=100, @pitch=100)"])
    CallCommonEvent([160])
    ChangeBattleBGM(["RPG::BGM(@name=\"battle\", @volume=100, @pitch=100)"])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Judge>"])
    ShowText(["Team Luka wins the first match!"])
    ShowText(["Continuing on to the second match, let's go!!"])
    ControlVariables([702, 702, 0, 0, 9])
    ChangeBattleBGM(["RPG::BGM(@name=\"boss_hametu2\", @volume=100, @pitch=100)"])
    CallCommonEvent([160])
    ChangeBattleBGM(["RPG::BGM(@name=\"battle\", @volume=100, @pitch=100)"])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Judge>"])
    ShowText(["Team Luka wins the second match as well!"])
    ShowText(["Finally, the finals begin!!"])
    ControlVariables([702, 702, 0, 0, 10])
    ChangeBattleBGM(["RPG::BGM(@name=\"boss_hametu2\", @volume=100, @pitch=100)"])
    CallCommonEvent([160])
    ChangeBattleBGM(["RPG::BGM(@name=\"battle\", @volume=100, @pitch=100)"])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Judge>"])
    ShowText(["The winner of the finals is... Team Luka!!"])
    ShowText(["Everyone in attendance, give a round of applause for Team Luka!!"])
    ConditionalBranch([1, 722, 0, 3, 0])
      PlaySE(["RPG::SE(@name=\"mon_fanfale2\", @pitch=100, @volume=100)"])
      ShowTextAttributes(["", 0, 0, 2])
      ShowText(["They have conquered the Reaper's Cup!!"])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeItems([4091, 0, 0, 1])
      ControlVariables([722, 722, 0, 0, 4])
      Empty([])

    Else([])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeArmor([4404, 0, 0, 1, false])
      Empty([])

    BranchEnd([])
    ConditionalBranch([1, 1143, 0, 9, 2])
      TransferPlayer([0, 484, 14, 10, 8, 0])
      Empty([])

    BranchEnd([])
    ConditionalBranch([1, 1143, 0, 10, 1])
      ControlVariables([57, 57, 0, 0, 1199])
      TransferPlayer([0, 199, 14, 10, 8, 0])
      Empty([])

    BranchEnd([])
    Script(["gain_medal(1614)"])
    ShowTextAttributes(["", 0, 0, 2])
    ShowText(["\\n<Staff>"])
    ShowText(["Congratulations on winning the Reaper's Cup!"])
    ShowText(["This record will be etched in the history of the Coliseum!"])
    CallCommonEvent([159])
    ExitEventProcessing([])
    Empty([])

  BranchEnd([])
  Empty([])
