page "anal-initialize"
  # TODO: Image

  say "Hi! This seems to be your first room today which asks you to do anal. Lube and prepare yourself now.", mode: :instant
  button "Ready for anal"

  anal_initialized = 1
  goto_page "$mazeResumeAfterPause()"
end

room "anal1"
  require_fetish :anal
  require_toy :dildo

  say "Haaaa... It hurts.. But it feels so good.."
  say "Fuck yourself with your plug to the beat. Don't touch your dick while fucking yourself.", mode: :instant
  fast_button "~ARE READY TO START"
  stroke_for 90s, :slow
end

room "anal2"
  require_fetish :anal
  require_toy :dildo

  say "Please master... let me... cum... only... once... please."

  say "Put your plug into your ass until the next anal task."
end

boolean anal3: 0
room "anal3"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  if anal3
    say "Oh, it's you again? I guess it's okay to move on for you for today."
  else
    say "Awww.. Look at that loser down on the floor. Isn't he cute?"
    say "Fuck yourself until you edged by anal only. Once for EACH of us! If you can't edge from anal, fuck yourself 100 times for each of us.", mode: :instant
    if fetish_cbt
      say "After each edge, hit your balls 10 times hard", mode: :instant
    else
      say "Take a break of 10 seconds after each edge", mode: :instant
    end

    edge 11
    button "Done with everything"

    anal3 = 1
    say "Great! That was fun."
  end
end

room "anal4"
  require_fetish :anal
  require_toy :dildo
  
  has_anal_task

  say "Oh, hi! Thanks goddess for your perfect timing."
  say "We are testing out our new strap on here. Go down on the floor on all fours and fuck yourself with your dildo #{dildo:50} time#{s_dildo:50}, getting faster and faster every time.", mode: :instant
  fast_button "~ARE DONE"
end

room "anal5"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "Look at that cute girls, being penetrated whereever they can imagine."
  say "Put your anal plug fully inside your butt right now", mode: :instant
  fast_button "~ARE DONE"
  if toy_vibrator
    say "Great, now take your vibrator and hold it against your dick. Set it on medium power and keep it there for one minute. If you edge, turn off the vibrator for 10 seconds and resume. The breaks don't count towards the one minute", mode: :instant
    button "Finished task"
  else
    say "Great, now stroke to the beat for one minute. Whenever you edge, stop stroking and wait 10 seconds. The pause doesn't count towards the one minute."
    start_stroke :fast
    button "Finished stroking"
    stop_stroke
  end

  say "Great, you can remove the plug now and move on."
end

room "anal6"
  require_fetish :anal

  say "Oh, I see, you need some medical tests I guess?"
  if toy_latex_glove
    say "Put on your latex gloves now"
  end
  say "Now put your finger in your ass and finger your ass while stroking with your other hand", mode: :instant
  fast_button "~ARE READY TO START"
  stroke_for 60s, :slow

  say "Perfect! I guess you are still in good condition"
  if toy_latex_glove
    say "You can remove the latex gloves if you want to"
  end
end

room "anal7"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "Hah.. Hah.. I love those balls. You can ride them perfectly."
  say "Put your dildo on the floor and fuck yourself #{dildo:50} time#{s_dildo:50} at any speed you want", mode: :instant
  fast_button "~ARE DONE"
end

room "anal8"
  require_fetish :anal
  require_fetish :cbt
  require_toy :dildo

  has_anal_task

  say "Hmmm? As a boy who needs to be fucked, you don't deserve to use your dick"
  say "Fuck your ass to the beat. However, every time it’s deep in your ass, slap your dick hard for me.", mode: :instant
  fast_button "~ARE READY TO START"
  stroke_for 40s, :slow
  stroke_for 15s, :medium
  stroke_for 5s, :fast
end

room "anal9"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "Huuuh? I love teasing boys until they can't take it anymore..."
  say "Take your dildo, lube it well and fuck yourself to the beat. But I want the dildo to be pulled out completely everytime.", mode: :instant
  fast_button "~ARE READY TO START"
  stroke_for 10s, :very_slow
  stroke_for 30s, :slow
  stroke_for 20s, :medium

  say "Hihihi.. So funny to see you fucking yourself"
end

room "anal10"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "Hi, boy! Stroke yourself to an edge #{edge:1} time#{s_edge:1}. Count how many strokes it took to edge", mode: :instant
  start_stroke :normal
  edge 1
  stop_stroke

  prompt_number :tmp_string, "How many strokes did it take you to edge?"
  tmp_string = tmp_string * 2

  say "Perfect! Now take your dildo and fuck yourself #{tmp_string} times. Always pulling it out nearly complete but SLOW, but pushing it in as deep as you can at a high speed.", mode: :instant
  fast_button "~ARE DONE"
end

room "anal11"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "It's time for some anal training. Fuck yourself #{dildo:250} time#{s_dildo:250} with your plug/dildo.", mode: :instant
  fast_button "~ARE DONE"

  say "You know what? Do you have some ice cubes?"
  choices
    choice "Yes"
      say "Perfect! Put 4 of them into your ass and plug in your plug"
    end
    choice "No"
      say "How sad... Oh well, put the plug in your butt now."
    end
  end

  say "Keep the plug inside until your next anal task. You may go to the toilet to remove it, if you want to."
end

room "anal12"
  require_fetish :anal
  require_fetish :pain
  require_toy :dildo

  has_anal_task

  say "Oh. What a cute slave coming down here. I don't have so many visitors, so let's play a little bit."
  say "First of all, if your butt or your dildo is lubed, make it dry."
  say "Now deepthroat my dick until you think that's it's really nice and wet! Better take your time.", mode: :instant
  tmp_string = current_time
  fast_button "~FINISHED"
  tmp_string = current_time - tmp_string

  if tmp_string < 240
    say "Hmmm? You think I'm satisfied with that short time of sucking my dick?"
    say "Fuck yourself with that dick without putting on extra lube for 30 times."
  else
    say "Lucky you! Guess that was long enought to satisfy me. You may move on."
  end
end

room "anal13"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "Oh, hello! My friends just gave me this little toy as my birthday present."
  say "I never used one of those, so please bend forward and let me test it.", mode: :instant
  fast_button "~ARE READY TO FUCK YOURSELF"
  say "Fuck yourself."
  stroke_for 60s, :very_fast

  say "Hmm?? What's up? Oh.. That was too fast? Sorry, I'm not yet used to that toy..."
end

room "anal14"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "Aahh.. Must... Resist.. Must.. Not.."
  say "Hm? Maybe you should join her? Put in your anal plug now! Lube it well.", mode: :instant
  fast_button "~ARE DONE"
  say "Great. If it's a vibrating one, turn it on."
  goto_page "anal14-loop"
end

page "anal14-loop"
  say "Now stand up and do 50 jumping jacks.", mode: :instant
  fast_button "~ARE DONE"
  say "Did your plug slip out?"
  choices
    choice "Yes"
      say "You didn't do a great job with holding it in! What should your students think if it happened during class?"
      say "Suck it clean for one minute", mode: :instant
      fast_button "~ARE DONE"
      say "Great! Now let's try it again. Lube it up very well.", mode: :instant
      fast_button "~ARE DONE"
      goto_page "anal14-loop"
    end
    choice "No"
      say "Great job! You may move on."
      end_of_room
    end
  end
end

room "anal15"
  require_fetish :anal
  require_fetish :cd
  require_toy :dildo

  has_anal_task

  say "Ahh.. Fucking boy toys is so much fun.. Even thought this one actually likes it.."
  if toy_chasity
    say "Put on your chasity device, now.", mode: :instant
    fast_button "~ARE DONE"
    say "Great. Now fuck yourself until you edge from anal only. If you are not able, maybe touch your nipples or at least fuck yourself 100 times", mode: :instant
    fast_button "~ARE DONE"
    say "Perfect. Now remove your chasity device and sniff your own dicks juice while penetrating yourself again to an edge (or 50 times)", mode: :instant
    fast_button "~ARE DONE"
    say "Great. Now lick it clean."
  elsif toy_dildo2
    say "Fuck yourself until you edge from anal only. If you are not able, maybe touch your nipples or at least fuck yourself 100 times", mode: :instant
    fast_button "~ARE DONE"
    say "Now take your second dildo and make it wet from your dicks juice. Sniff it afterwards while penetrating yourself again to an edge (or 50 times)", mode: :instant
    fast_button "~ARE DONE"
    say "Great. Now lick it clean."
  else
    say "Fuck yourself until you edge from anal only. If you are not able, maybe touch your nipples or at least fuck yourself 100 times", mode: :instant
    fast_button "~ARE DONE"
    say "Now take some precum and smear it around your nose. Sniff it afterwards while penetrating yourself again to an edge (or 50 times)", mode: :instant
    fast_button "~ARE DONE"
    say "Great! You can move on, now."
  end
end

room "anal16"
  require_fetish :anal
  require_fetish :pain
  require_fetish :latex
  require_toy :dildo

  has_anal_task
  
  say "Hmm? Does it hurt? Being penetrated everywhere?"
  if toy_clamps
    say "Put on your nipple clamps now."
    say "Now fuck yourself so hard, that the nipple clamps swing strongly and painful. At least #{dildo:40} time#{s_dildo:40}.", mode: :instant
    fast_button "~FINISHED"
  else
    say "Fuck yourself as hard as your can and squeeze your nipples with the other hand at the same time. At least #{dildo:40} time#{s_dildo:40}.", mode: :instant
    fast_button "~FINISHED"
  end
end

room "anal17"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "Oooh? Does it hurt? Too sad I don't care..."
  say "And about you..."
  goto_page "anal17-loop"
end

page "anal17-loop"
  say "Fuck yourself HARD as many times as you like. However, count how many times you fucked yourself.", mode: :instant
  fast_button "~ARE DONE"

  prompt_number :tmp_string, "How many times did it fuck yourself?"

  say "Great! Now try to edge within #{tmp_string} strokes to edge #{edge:1} time#{s_edge:1}.", mode: :instant
  start_stroke :medium
  choices
    choice "Edged"
      stop_stroke
      say "Good! You may move on."
      end_of_room
    end
    choice "Failed"
      stop_stroke
      say "Too bad for you little boy. Let's try again."
      goto_page "anal17-loop"
    end
  end
end

room "anal18"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "Ahh.. I'm such a slutty girl, hah..."
  say "Put your plug down on the floor in front of a mirror. If you don't have a mirror you can use that way, just go to any mirror"
  say "Now fuck yourself #{dildo:50} time#{s_dildo:50} while watching yourself in the mirror, moaning like a little girl.", mode: :instant
  fast_button "~ARE DONE"
end

room "anal19"
  require_fetish :anal
  require_fetish :cd
  require_toy :dildo

  has_anal_task

  if has_encounter(:anal19)
    say "Thank you for still joining me."
  else
    say "Ahh.. It feels so embarrasing to do it in front of all those people..."
    say "Do you have a inflatable buttplug?"
    choices
      choice "Yes"
        say "Great! Put it in and inflate it as big as you can without it being painful.", mode: :instant
        fast_button "~ARE DONE"
        say "Perfect! Now keep it in until I tell you. If you have to do another anal task, you may remove it for the duration but put it in again afterwards"
        encounter :anal19, label: "Inflatable plug", in_steps: 8..12
          image "anal19"
          say "Hngh! I just came a second time."
          say "You can remove the inflatable plug now."
        end
      end
      choice "No"
        say "No problem. Then just fuck yourself very slowly to the beat. But put it in as deep as you can.", mode: :instant
        fast_button "~ARE READY TO START"
        stroke_for 60s, :very_slow
      end
    end
  end
end

room "anal20"
  require_fetish :anal
  require_fetish :cd
  require_toy :dildo

  has_anal_task

  say "Hah.. It feels so good to cum from penetrating myself. Please don't tell anyone."
  say "Get down on the floor and put your ass up so that your dick is just over your face! Then fuck yourself with your dildo #{dildo:50} time#{s_dildo:50}.", mode: :instant
  fast_button "~ARE DONE"
end

room "anal21"
  require_fetish :anal
  require_toy :dildo

  has_anal_task

  say "Hmpf! It's so hard to stay concentrated while being penetrated all the time"

  if has_encounter(:anal21)
    say "Still penetrating your ass, aren't you? Fuck yourself #{dildo:50} time#{s_dildo:50} at any speed."
  else
    if toy_chasity
      say "Okay. Get soft and put your chasity device on, now."
      fast_button "~ARE DONE"
    end

    say "It's time for some chasity. From now on, whenever you run into a page which tells you to stroke, you'll fuck your ass instead."
    say "If the pace is too fast, just try to do it as fast as you can"
    if toy_chasity
    else
      say "You are not allowed to touch your dick if it's for stroking purpose"
    end
    say "If you are told to edge, try to edge from anal if possible."
    say "Have fun."

    encounter :anal21, label: "Anal Penetration", in_steps: 4..7
      image "anal21"
      say "How does it feel to penetrate yourself all the time?"
      if toy_chasity
        say "You can take off your chasity device now and..."
      end
      say "You can stop penetrating yourself from now and stroke normally again."
    end
  end
end