default cheat_wardrobe_alpha = False

default skip_duel = False
default experimental_cheats = False

label cheats:

    if not renpy.seen_label("cheats"):
        "Uncle Good Advice" "{b}Attention!{/b}\nSome cheats can cause bugs and writing inconsistencies, use at your own risk."

    menu:
        "-Inventory-":
            label .general:

            menu:
                "-Add 500 Gold-" (icon="interface/icons/small/gold.webp"):
                    $ game.gold += 500
                    jump cheats.general
                "-Get all gifts-" (icon="interface/icons/small/gift.webp"):
                    python:
                        for i in inventory.get_instances_of_type("gift"):
                            i.owned = i.limit
                    ">Added 100 of each gift item to the inventory."
                "-Get all potions-" (icon="interface/icons/small/potion.webp"):
                    python:
                        for i in inventory.get_instances_of_type("potion"):
                            i.owned = i.limit
                    ">Added 100 of each potion item to the inventory."
                "-Get all ingredients-" (icon="interface/icons/small/potion.webp"):
                    python:
                        for i in inventory.get_instances_of_type("ingredient"):
                            i.owned = i.limit
                    ">Added 100 of each ingredient item to the inventory."
                "-Get all scrolls-" (icon="interface/icons/small/spell.webp"):
                    python:
                        for i in inventory.get_instances_of_type("scroll"):
                            i.owned = i.limit
                    ">Added all scrolls to the inventory."
                "-Get all books-" (icon="interface/icons/small/book.webp"):
                    python:
                        for i in inventory.get_instances_of_type("book"):
                            i.owned = i.limit
                    ">Added all books to the inventory."
                "-Get all decorations-" (icon="interface/icons/small/gold.webp"):
                    python:
                        for i in inventory.get_instances_of_type("decoration"):
                            i.owned = i.limit
                    ">Added all decorations to the inventory."
                "-Get all quest items-" (icon="interface/icons/small/potion.webp"):
                    menu:
                        "Uncle Good Advice" "{color=#ff8000}Attention!{/color} You may receive items that are not intended to be used in your time line, or may be experimental. Do you still wish to proceed?"

                        "-Yes-":
                            pass
                        "-No-":
                            jump cheats.general
                    python:
                        for i in inventory.get_instances_of_type("quest"):
                            i.owned = i.limit

                    ">Added all quest items to the inventory."
                "-Get all outfits-" (icon="interface/icons/small/wardrobe.webp"):
                    menu:
                        "Uncle Good Advice" "{color=#ff8000}Attention!{/color} You may receive outfits that are not intended to be used in your time line, may be experimental, or are duplicates of the already existing outfits. Do you still wish to proceed?"

                        "-Yes-":
                            pass
                        "-No-":
                            jump cheats.general

                    python:
                        for i in CHARACTERS:
                            for x in getattr(renpy.store, i).outfits:
                                if not x.hidden:
                                    x.unlock()

                    # Add relevant quest items to the inventory
                    $ poker_outfit_ITEM.owned = 1
                    $ ball_outfit_ITEM.owned = 1
                    $ maid_outfit_ITEM.owned = 1

                    ">Added all outfits to the wardrobe."
                "-Back-":
                    jump cheats
            jump cheats.general

        "-Characters-":
            label .characters:

            menu:
                "-Tonks-" (icon="interface/icons/small/tonks.webp") if tonks_unlocked:
                    label .tonks:
                    menu:
                        "-Reset mood- ([ton_mood])" if ton_mood != 0:
                            $ ton_mood = 0
                            ">Tonks is no longer mad at you."
                        "-Increase Friendship- ([ton_friendship])" if ton_friendship < 100:
                            $ ton_friendship += 5
                            ">Tonks likes you more..."
                        "-Decrease Friendship- ([ton_friendship])" if ton_friendship > 0:
                            $ ton_friendship -= 5
                            ">Tonks likes you less..."
                        "-Back-":
                            jump cheats.characters
                    jump cheats.tonks

                "-Hermione-" (icon="interface/icons/small/hermione.webp") if hermione_unlocked:
                    label .hermione:
                    menu:
                        "-Reset mood- ([her_mood])" if her_mood != 0:
                            $ her_mood = 0
                            ">Hermione is no longer mad at you."
                        "-Increase Whoring- ([her_whoring])" (icon="interface/icons/small/heart_red.webp") if her_whoring < 24:
                            $ her_whoring += 1
                            ">Hermione became more depraved..."
                        "-Decrease Whoring- ([her_whoring])" (icon="interface/icons/small/heart_black.webp") if her_whoring > 0:
                            $ her_whoring += -1
                            ">Hermione recovered some of her dignity."
                        "-Increase Reputation- ([her_reputation])" (icon="interface/icons/small/star_yellow.webp") if her_reputation < 24:
                            $ her_reputation += 1
                            ">Hermione became more depraved..."
                        "-Decrease Reputation- ([her_reputation])" (icon="interface/icons/small/star_empty.webp") if her_reputation > 0:
                            $ her_reputation += -1
                            ">Hermione recovered some of her dignity."
                        "-Back-":
                            jump cheats.characters
                    jump cheats.hermione

                "-Cho-" (icon="interface/icons/small/cho.webp") if cho_unlocked:
                    label .cho:
                    menu:
                        "-Reset mood- ([cho_mood])" if cho_mood != 0:
                            $ cho_mood = 0
                            ">Cho is no longer mad at you."
                        "-Increase Whoring- ([cho_whoring])" (icon="interface/icons/small/heart_red.webp") if cho_whoring < 24:
                            $ cho_whoring += 1
                            ">Cho became more depraved..."
                        "-Decrease Whoring- ([cho_whoring])" (icon="interface/icons/small/heart_black.webp") if cho_whoring > 0:
                            $ cho_whoring += -1
                            ">Cho recovered some of her dignity."
                        "-Increase Reputation- ([cho_reputation])" (icon="interface/icons/small/star_yellow.webp") if cho_reputation < 24:
                            $ cho_reputation += 1
                            ">Cho became more depraved..."
                        "-Decrease Reputation- ([cho_reputation])" (icon="interface/icons/small/star_empty.webp") if cho_reputation > 0:
                            $ cho_reputation += -1
                            ">Cho recovered some of her dignity."
                        "-Back-":
                            jump cheats.characters
                    jump cheats.cho

                "-Luna-" (icon="interface/icons/small/luna.webp") if luna_unlocked:
                    label .luna:
                    menu:
                        "-Reset mood- ([cho_mood])" if lun_mood != 0:
                            $ lun_mood = 0
                            ">Luna is no longer mad at you."
                        "-Increase Whoring- ([lun_whoring])" (icon="interface/icons/small/heart_red.webp") if lun_whoring < 24:
                            $ lun_whoring += 1
                            ">Luna became more depraved..."
                        "-Decrease Whoring- ([lun_whoring])" (icon="interface/icons/small/heart_black.webp") if lun_whoring > 0:
                            $ lun_whoring += -1
                            ">Luna recovered some of her dignity."
                        # "-Increase Reputation- ([lun_reputation])" (icon="interface/icons/small/star_yellow.webp") if lun_reputation < 24:
                        #     $ lun_reputation += 1
                        #     ">Luna became more depraved..."
                        # "-Decrease Reputation- ([lun_reputation])" (icon="interface/icons/small/star_empty.webp") if lun_reputation > 0:
                        #     $ lun_reputation += -1
                        #     ">Luna recovered some of her dignity."
                        "-Back-":
                            jump cheats.characters
                    jump cheats.luna

                "-Astoria-" (icon="interface/icons/small/astoria.webp") if astoria_unlocked:
                    label .astoria:
                    menu:
                        "-Reset mood-" if ast_mood != 0:
                            $ ast_mood = 0
                            ">Astoria is no longer mad at you."
                        "-Increase Whoring-" (icon="interface/icons/small/heart_red.webp") if ast_whoring < 24:
                            $ ast_whoring += 1
                            ">Astoria likes you more..."
                        "-Decrease Whoring-" (icon="interface/icons/small/heart_black.webp") if ast_whoring > 0:
                            $ ast_whoring += -1
                            "Astoria likes you less..."
                        # "-Increase Reputation- ([ast_reputation])" (icon="interface/icons/small/star_yellow.webp") if ast_reputation < 24:
                        #     $ ast_reputation += 1
                        #     ">Astoria became more depraved..."
                        # "-Decrease Reputation- ([ast_reputation])" (icon="interface/icons/small/star_empty.webp") if ast_reputation > 0:
                        #     $ ast_reputation += -1
                        #     ">Astoria recovered some of her dignity"
                        "-Back-":
                            jump cheats.characters
                    jump cheats.astoria

                "-Susan-" (icon="interface/icons/small/huff.webp") if susan_unlocked:
                    label .susan:
                    menu:
                        "-Reset mood- ([cho_mood])" if sus_mood != 0:
                            $ sus_mood = 0
                            ">Susan is no longer mad at you."
                        "-Increase Whoring- ([sus_whoring])" (icon="interface/icons/small/heart_red.webp") if sus_whoring < 24:
                            $ sus_whoring += 1
                            ">Susan became more depraved..."
                        "-Decrease Whoring- ([sus_whoring])" (icon="interface/icons/small/heart_black.webp") if sus_whoring > 0:
                            $ sus_whoring += -1
                            ">Susan recovered some of her dignity."
                        # "-Increase Reputation- ([sus_reputation])" (icon="interface/icons/small/star_yellow.webp") if sus_reputation < 24:
                        #     $ sus_reputation += 1
                        #     ">Susan became more depraved..."
                        # "-Decrease Reputation- ([sus_reputation])" (icon="interface/icons/small/star_empty.webp") if sus_reputation > 0:
                        #     $ sus_reputation += -1
                        #     ">Susan recovered some of her dignity."
                        "-Back-":
                            jump cheats.characters
                    jump cheats.susan

                "-Back-":
                    jump cheats

        "-House Points-":
            label .points:

            menu:
                "-Add 200 Slytherin Points-" (icon="interface/icons/small/slyt.webp"):
                    $ slytherin = clamp(slytherin+200, 1, 999999)
                    call update_ui_points
                    ">Added 200 points to Slytherin!"
                "-Remove 200 Slytherin Points-" (icon="interface/icons/small/slyt.webp"):
                    $ slytherin = clamp(slytherin-200, 1, 999999)
                    call update_ui_points
                    ">Removed 200 points from Slytherin!"
                "-Add 200 Gryffindor Points-" (icon="interface/icons/small/gryf.webp"):
                    $ gryffindor = clamp(gryffindor+200, 1, 999999)
                    call update_ui_points
                    ">Added 200 points to Gryffindor!"
                "-Remove 200 Gryffindor Points-" (icon="interface/icons/small/gryf.webp"):
                    $ gryffindor = clamp(gryffindor-200, 1, 999999)
                    call update_ui_points
                    ">Removed 200 points from Gryffindor!"
                "-Add 200 Ravenclaw Points-" (icon="interface/icons/small/rave.webp"):
                    $ ravenclaw = clamp(ravenclaw+200, 1, 999999)
                    call update_ui_points
                    ">Added 200 points to Ravenclaw!"
                "-Remove 200 Ravenclaw Points-" (icon="interface/icons/small/rave.webp"):
                    $ ravenclaw = clamp(ravenclaw-200, 1, 999999)
                    call update_ui_points
                    ">Removed 200 points from Ravenclaw!"
                "-Add 200 Hufflepuff Points-" (icon="interface/icons/small/huff.webp"):
                    $ hufflepuff = clamp(hufflepuff+200, 1, 999999)
                    call update_ui_points
                    ">Added 200 points to Hufflepuff!"
                "-Remove 200 Hufflepuff Points-" (icon="interface/icons/small/huff.webp"):
                    $ hufflepuff = clamp(hufflepuff-200, 1, 999999)
                    call update_ui_points
                    ">Removed 200 points from Hufflepuff!"
                "-Reset all points-":
                    $ slytherin = 1
                    $ gryffindor = 1
                    $ ravenclaw = 1
                    $ hufflepuff = 1
                    call update_ui_points
                    ">House points reset!"
                "-Back-":
                    jump cheats
            jump cheats.points

        "-Progression-":
            label .progression:

            menu:
                "-Unlock all Mirror Stories-":
                    python:
                        for i in mirror.items:
                            i.unlocked = True
                    ">Unlocked all mirror stories."

                # "-Hermione-":
                #     jump cheats.progression

                # "-Cho-" if her_tier >= 2:
                #     jump cheats.progression

                "-Back-":
                    jump cheats
            jump cheats.progression

        "-Experimental-":
            label .experimental:

            if not config.developer and not experimental_cheats:
                "Uncle Good Advice" "{color=#7a0000}Warning!{/color} These cheats are highly experimental and are not supposed to be used during a normal playthrough, there's a high chance they {u}will break the game{/u}, but you're the boss."

                menu:
                    "Uncle Good Advice" "Will you take full responsibility for your actions?\n(You will receive no technical support if you encounter any issues)"

                    "-Yes-":
                        $ experimental_cheats = True
                        ">Experimental cheats have been unlocked."
                    "-No-":
                        "Uncle Good Advice" "Smart choice."
                        jump cheats

            menu:
                "{size=-4}-Wardrobe Transparency Slider- (Is enabled: [cheat_wardrobe_alpha]){/size}" (icon="interface/icons/small/wardrobe.webp"):
                    $ cheat_wardrobe_alpha = not cheat_wardrobe_alpha

                "-Unequip all clothes-":
                    python:
                        for i in CHARACTERS:
                            getattr(renpy.store, i).unequip("all")

                    ">All characters are now naked."

                "-Unlock all characters-" (icon="interface/icons/small/talk.webp"):
                    $ snape_unlocked = True
                    $ tonks_unlocked = True
                    $ hermione_unlocked = True
                    $ cho_unlocked = True
                    $ astoria_unlocked = True
                    $ susan_unlocked = True
                    $ luna_unlocked = True
                    # ginny_unlocked = True
                    # voldermort_unlocked = True
                    # hagrid_unlocked = True

                    ">All characters have been unlocked."

                "-Unlock all wardrobes-" (icon="interface/icons/small/wardrobe.webp"):
                    $ tonks_wardrobe_unlocked = True
                    $ hermione_wardrobe_unlocked = True
                    $ cho_wardrobe_unlocked = True
                    $ astoria_wardrobe_unlocked = True
                    $ susan_wardrobe_unlocked = True
                    $ luna_wardrobe_unlocked = True
                    # ginny_wardrobe_unlocked = True
                    # voldemort_wardrobe_unlocked = True
                    # hagrid_wardrobe_unlocked = True

                    ">All wardrobes have been unlocked."

                "-Permanent body alteration-":
                    label .alteration:

                    $ _curr_breast_type = hermione.body.body["breasts"][0]
                    $ _curr_ass_type = hermione.body.body["backside"][0] or "normal"

                    # Note: itertools.cycle breaks Ren'py so we have to rely on a good 'ol if statement
                    # *Sigh* I wish we had match statement in python 2 :(

                    menu:
                        "Hermione Breasts ([_curr_breast_type])" (icon="interface/icons/small/hermione.webp"):
                            if _curr_breast_type == "normal":
                                $ hermione.set_body(breasts="big1")
                            elif _curr_breast_type == "big1":
                                $ hermione.set_body(breasts="big2")
                            elif _curr_breast_type == "big2":
                                $ hermione.set_body(breasts="big3")
                            else:
                                $ hermione.set_body(breasts="normal")

                            jump cheats.alteration

                        "Hermione Ass ([_curr_ass_type])" (icon="interface/icons/small/hermione.webp"):
                            if _curr_ass_type == "normal":
                                $ hermione.set_body(backside="big1")
                            elif _curr_ass_type == "big1":
                                $ hermione.set_body(backside="big2")
                            elif _curr_ass_type == "big2":
                                $ hermione.set_body(backside="big3")
                            else:
                                $ hermione.set_body(backside=None) # This is intended.

                            jump cheats.alteration

                        "-Back-":
                            jump cheats.experimental

                "-Back-":
                    jump cheats
            jump cheats.experimental

        "-Never mind-":
            jump main_room_menu


### Hermione ###

label .hermione_skip_intro:

    $ bird_examined = True
    $ desk_examined = True
    $ cupboard_examined = True
    $ door_examined = True
    $ fireplace_examined = True

    $ wine_ITEM.owned = 5
    $ firewhisky_ITEM.owned = 5

    $ rum_times = 6
    $ game.day = 13

    $ achievements.unlock("start", True)

    $ genie_intro.E1_complete = True
    $ genie_intro.E2_complete = True
    $ genie_intro.E3_complete = True
    $ genie_intro.E4_complete = True

    $ snape_intro.E1_complete   = True
    $ snape_intro.E2_complete   = True
    $ snape_intro.E3_complete   = True
    $ snape_intro.duel_complete = True
    $ snape_intro.E4_complete   = True
    $ snape_intro.E5_complete   = True

    $ ss_he.hermione_E1 = True
    $ ss_he.hermione_E2 = True
    $ ss_he.tonks_E1 = True
    $ ss_he.tonks_E2 = True
    $ ss_he.tonks_E3 = True

    $ tonks_intro.E1_complete = True
    $ tonks_intro.E2_complete = True
    $ tonks_intro.E3_complete = True

    $ nt_he.hermione_E1 = True

    $ hermione_intro.E1_complete = True
    $ hermione_intro.E2_complete = True
    $ hermione_intro.E3_complete = True
    $ hermione_intro.E4_complete = True
    $ hermione_intro.E5_complete = True
    $ hermione_intro.E6_complete = True

    $ letter_hg_1.open(silent=True)
    $ letter_hg_2.open(silent=True)
    $ letter_work_unlock.open(silent=True)
    $ letter_favors.open(silent=True)

    $ snape_unlocked = True
    $ achievements.unlock("unlocksna", True)

    $ tonks_unlocked = True
    $ achievements.unlock("unlockton", True)

    $ hermione_unlocked = True
    $ achievements.unlock("unlockher", True)
    $ tutoring_hermione_unlocked = True
    $ hermione_favors = True
    $ hermione_wardrobe_unlocked = True

    # Simulate points gains
    $ slytherin = gryffindor
    $ gryffindor = int(slytherin*0.5)
    $ hufflepuff = int(gryffindor*1.1)
    $ ravenclaw = int(gryffindor*1.3)

    return

# label .hermione_skip_T1:
#     $ her_tier = 2
#     $ her_whoring = 1
#     return

# label .hermione_skip_T2:
#     $ her_tier = 3
#     $ her_whoring = 9
#     $ hg_jerkoff.trigger = True
#     return

# label .hermione_skip_T3:
#     $ her_tier = 4
#     $ her_whoring = 12
#     $ hg_strip.trigger = True
#     return

# label .hermione_skip_T4:
#     $ her_tier = 5
#     $ her_whoring = 18
#     $ hg_kiss.trigger = True
#     return

# label .hermione_skip_T5:
#     $ her_tier = 6
#     $ her_whoring = 21
#     $ hg_blowjob.trigger = True
#     return


# ### Cho ###

# label .cho_skip_intro:
#     if game.day < 16:
#         $ game.day = 16
#     $ cho_intro.E1_complete = True
#     $ cho_intro.E2_complete = True
#     $ ss_he.cho_E1 = True
#     $ cho_intro.E3_complete = True
#     $ achievements.unlock("unlockcho", True)
#     $ cho_unlocked = True
#     return

# label .cho_skip_quiz:
#     $ cho_quiz.complete = True
#     $ cho_quid.E1_complete = True
#     $ cho_quid.E2_complete = True
#     $ cho_quid.position = "above"
#     $ cho_quid.lock_training = False
#     $ cho_favors_unlocked = True
#     return