Reference
  Util\Party.txt
  Util\CommonDialog.txt
End Reference

Procedure GetAliveBossCount()
  Dim beaten = 0
  If TestFlag("EastTower_1") Then beaten += 1
  If TestFlag("SouthTower_1") Then beaten += 1
  If TestFlag("WestTower_1") Then beaten += 1
  If TestFlag("NorthTower_1") Then beaten += 1
  Return 4 - beaten
End Procedure

Procedure EvoBoss()
  Dim p_name = [TheHero].Name + "："
  Dim q_name = "？？？："
  Dim beaten_std = 0
  If TestFlag("EastTower_1") AndAlso Not TestFlag("EastEvo") Then beaten_std += 1
  If TestFlag("SouthTower_1") AndAlso Not TestFlag("SouthEvo") Then beaten_std += 1
  If TestFlag("WestTower_1") AndAlso Not TestFlag("WestEvo") Then beaten_std += 1
  If TestFlag("NorthTower_1") AndAlso Not TestFlag("NorthEvo") Then beaten_std += 1
  If beaten_std >= 2 Then
    If Not TestFlag("EastTower_1") Then SetFlag("EastEvo")
    If Not TestFlag("SouthTower_1") Then SetFlag("SouthEvo")
    If Not TestFlag("WestTower_1") Then SetFlag("WestEvo")
    If Not TestFlag("NorthTower_1") Then SetFlag("NorthEvo")
  End If
  If GetAliveBossCount() = 0 Then
    DoMsg(p_name, "（終わった……）")
    Sleep(1000)
    RaiseEvent("StartShake")
    Sleep(500)
    DoMsg(p_name, "（な　なんだ？）")
    Sleep(2000)
    RaiseEvent("StopShake")
    Sleep(1000)
    DoMsg(p_name, "（誰かの声が聞こえる……）")
    DoMsg(q_name, [TheHero].Name + "よ", _
      "今すぐ玄武の塔の最上階へ来るのじゃ")
    Sleep(500)
    DoMsg(p_name, "（どういうことだ？……）")
  End If
End Procedure

Procedure GetEnemyPartyList()
  Dim ep = CreateList()
  Dim alive = GetAliveBossCount()
  If alive = 4 Then
    ep.Add({[E012], [E012]})
    ep.Add({[E106], [E106]})
    ep.Add({[E201], [E201], [E201]})
    ep.Add({[E201], [E202]})
    ep.Add({[E201], [E201], [E202]})
    ep.Add({[E202], [E202]})
  ElseIf alive = 3 Then
    ep.Add({[E021], [E021]})
    ep.Add({[E112], [E112]})
    ep.Add({[E203], [E203], [E203]})
    ep.Add({[E203], [E204]})
    ep.Add({[E203], [E203], [E204]})
    ep.Add({[E204], [E204]})
  ElseIf alive = 2 Then
    ep.Add({[E027], [E027]})
    ep.Add({[E118], [E118]})
    ep.Add({[E205], [E205], [E205]})
    ep.Add({[E205], [E206]})
    ep.Add({[E205], [E205], [E206]})
    ep.Add({[E206], [E206]})
  ElseIf alive = 1 Then
    ep.Add({[E033], [E033]})
    ep.Add({[E124], [E124]})
    ep.Add({[E207], [E207], [E207]})
    ep.Add({[E207], [E208]})
    ep.Add({[E207], [E207], [E208]})
    ep.Add({[E208], [E208]})
  End If
  Return ep
End Procedure

Procedure BoxStillSealed()
  DoMsg("（……開かない）")
End Procedure
