page "pause"
  image "pause"
  stop_stroke
  say "If you want to continue another day, save the following code and click on 'Resume' on the start page:", mode: :instant
  say "<eval>gameCodeGenerate(curMaze, true)</eval>", mode: :instant
  say "However, this game is actually not meant to be paused this way.", mode: :instant
  choices
    choice "Resume now"
      create_button :pause, "Quit game"
        goto_page "pause"
      end
      goto_page "$mazeResumeAfterPause()"
    end
    choice "End game"
      goto_page "fail-end"
    end
  end
end

page "stop"
  stop_stroke

  image "badfairy1"
  say "So... We've got a small accident here? Tell me, what happened?"

  choices
    choice "Edged"
      if bad_fairy
        goto_page "stop-edge-again"
      else
        goto_page "stop-edge"
      end
    end
    choice "Cummed"
      goto_page "stop-cum"
    end
  end
end

page "stop-edge-again"
  image "badfairy3"
  say "Hmmm? It's you again? You really don't have so much self control, don't you?"

  tmp_string = penality_level * (difficult + 1) + 10
  say "Let me roll a dice of 0 to 100. If it's lower than #{tmp_string} you'll have to stop right now.", mode: :instant
  button "Roll Dice"
  tmp_string2 = round(random_float * 100)
  
  if tmp_string2 < tmp_string
    image "badfairy4"
    say "Oh! It's a #{tmp_string2}, so guess your trip ends here."
    if toy_chasity
      say "Put your dick in your chasity device right now and don't touch it for the next 24 hours."
    else
      say "Don't touch your dick for the next 24 hours. No cumming for you today."
    end
    button "End Game"
    goto_page "fail-end"
  end

  if penality_level < 7
    penality_level += 1
  end

  image "badfairy5"
  say "Lucky!!! It's a #{tmp_string2}. You can have a break of up to 5 minutes...", mode: :instant
  button "Resume Game"
  
  image "badfairy6"
  say "Good... Now that you are ready to continue I'll even give you a little reward. I'll teleport you to any random room now. Good luck keeping track about where you are."

  create_button :stop, "Edged or Cummed", color: :danger
    goto_page "stop"
  end
  goto_page "$mazeGoToRandomRoom()"
end

page "badfairy"
  image "badfairy9"
  say "Muhahaha! Rember me? I followed you since you edged without permission! And now I'm gonna stop you from finishing the game too easy."
  bad_fairy = 0

  if is_maze_mode
    say "I'm gonna teleport you to a random room now! Good luck finding your way back to the entrance again."
    goto_page "$mazeGoToOuterRoom()"
  else
    say "Take a break of one hour before you continue.", mode: :instant
    button "Paused 1 hour"
    say "Great. Now get hard again.", mode: :instant
    button "Hard"
    goto_page "finish"
  end
end

page "stop-edge"
  image "badfairy2"
  say "Whoopsi! So you edged without permission? That's not how the game is meant to be played."
  say "You now what? Have a break of up to 5 minutes. However I'll follow you for some time now... Be ready to meet me again! Hehehe.", mode: :instant
  button "Resume Game"
  bad_fairy = 1

  create_button :stop, "Edged or Cummed", color: :danger
    goto_page "stop"
  end
  goto_page "$mazeResumeAfterPause()"
end

page "stop-cum"
  image "badfairy7"
  say "What? How dare you to cum without permission?"
  if toy_chasity
    say "First of all: Put your tiny dick in your chasity device... Now."
  end

  image "badfairy8"
  say "I have a simple rule for you starting from **NOW**:"
  say "You are forbidden to touch your dick for anything else than cleaning or peeing."
  say "This rule resume until you are so horny that you can cum without touching your dick or pressing anything against it."
  say "You can try to cum by playing with your nipples, riding some plugs or whatever you can imagine. But never touch your dick."
  say "As soon as you cummed in this way OR 4 weeks have passed you are freed from this rules."
  say "One last restriction: You can not cum during the next 7 days."
  say "Good luck."
  button "Finish Game"
  goto_page "fail-end"
end

page "share"
  image "pause"
  stop_stroke
  say "If you want to replay or share this maze, save the following code and click on 'Resume' on the start page:", mode: :instant
  say "<eval>gameCodeGenerate(curMaze, false)</eval>", mode: :instant
  say "Please note, that all configured fetishes and toys are included in this code as the maze depends on these configuration", mode: :instant
  button "Resume"
  create_button :share, "Share maze"
    goto_page "share"
  end
  goto_page "$mazeResumeAfterPause()"
end
