page "debug"
  say "You can toggle options here"
  choices
    choice "Miku: Not Found", color: :danger, if: maze_goal_state("miku") == "free"
      beat "miku"
      goto_page "debug"
    end
    choice "Miku: Beat", color: :warning, if: maze_goal_state("miku") == "beat"
      catch "miku"
      goto_page "debug"
    end
    choice "Miku: Caught", color: :success, if: maze_goal_state("miku") == "catch"
      reset_goal "miku"
      goto_page "debug"
    end
    choice "Hestia: Not Found", color: :danger, if: maze_goal_state("takagi") == "free"
      beat "takagi"
      goto_page "debug"
    end
    choice "Hestia: Beat", color: :warning, if: maze_goal_state("takagi") == "beat"
      catch "takagi"
      goto_page "debug"
    end
    choice "Hestia: Caught", color: :success, if: maze_goal_state("takagi") == "catch"
      reset_goal "takagi"
      goto_page "debug"
    end
    choice "Rem: Not Found", color: :danger, if: maze_goal_state("rem") == "free"
      beat "rem"
      goto_page "debug"
    end
    choice "Rem: Beat", color: :warning, if: maze_goal_state("rem") == "beat"
      catch "rem"
      goto_page "debug"
    end
    choice "Rem: Caught", color: :success, if: maze_goal_state("rem") == "catch"
      reset_goal "rem"
      goto_page "debug"
    end
    choice "Shimakaze: Not Found", color: :danger, if: maze_goal_state("shimakaze") == "free"
      beat "shimakaze"
      goto_page "debug"
    end
    choice "Shimakaze: Beat", color: :warning, if: maze_goal_state("shimakaze") == "beat"
      catch "shimakaze"
      goto_page "debug"
    end
    choice "Shimakaze: Caught", color: :success, if: maze_goal_state("shimakaze") == "catch"
      reset_goal "shimakaze"
      goto_page "debug"
    end
    choice "Zero: Not Found", color: :danger, if: maze_goal_state("zero") == "free"
      beat "zero"
      goto_page "debug"
    end
    choice "Zero: Beat", color: :warning, if: maze_goal_state("zero") == "beat"
      catch "zero"
      goto_page "debug"
    end
    choice "Zero: Caught", color: :success, if: maze_goal_state("zero") == "catch"
      reset_goal "zero"
      goto_page "debug"
    end
    choice "Bad Fairy: Off", color: :danger, if: bad_fairy == 0
      bad_fairy = 1
      goto_page "debug"
    end
    choice "Bad Fairy: Following", color: :success, if: bad_fairy == 1
      bad_fairy = 0
      goto_page "debug"
    end
    choice "Map", if: is_maze_mode
      goto_page "debug-map"
    end
    choice "Resume"
      create_button :debug, "Debug Menu"
        goto_page "debug"
      end
      goto_page "$mazeResumeAfterPause()"
    end
  end
end

page "debug-map"
  say "<eval>mazePrintHtml(curMaze)</eval>", align: :left, mode: :instant
  debug_end_of_room
  goto_page "debug-map"
end
