init 5 python:

    def her_cg_doll_fix(st, at):
        """Used to fix the jaw issues on bent-over pose"""

        face = hermione.get_face()
        mouth = face["mouth"]

        if hermione.pose == "CG_bent_over" and mouth in ("scream", "open_wide_tongue"):
            return Image("images/CG/her_sex/{}.webp".format(mouth)), None
        return Null(), None

    def gen_cg_doll(st, at):
        d = Image("{}genie_{}.webp".format(genie_doll_path, genie_doll))
        return d, None

default genie_doll_path = "images/CG/her_sex/"
default genie_doll = "hold"
default genie_doll_armfix = "images/CG/her_sex/hold_armfix.webp"

image CG genie_armfix = DynamicImage("[genie_doll_armfix]")

image CG her_doll_fix = DynamicDisplayable(her_cg_doll_fix)
image CG gen_doll = DynamicDisplayable(gen_cg_doll)

image CG her_sex = Fixed(
    "images/CG/her_sex/background.webp",
    "CG gen_doll",
    "CG her_doll",
    "CG her_doll_fix",
    "images/CG/her_sex/foreground.webp",
    "CG genie_armfix",
    )

image CG her_intro hermione = Fixed(
    "images/CG/her_intro/bg.webp",
    AlphaMask(Composite((2160, 1200), (880, -180), Transform("CG her_doll", zoom=1.2)), "images/CG/her_intro/mask.webp"),
    )

image CG her_intro hermione bendover = Fixed(
    "images/CG/her_intro/bg.webp",
    "images/CG/her_intro/hermione_bendover.webp",
    )

image CG breast expand corridor A1:
    "images/CG/her_potions/breast_expand/corridor_a1.webp"

image CG breast expand corridor B1:
    "images/CG/her_potions/breast_expand/corridor_b1.webp"

image CG breast expand classroom A1:
    "images/CG/her_potions/breast_expand/classroom_a1.webp"

image CG breast expand classroom A2:
    "images/CG/her_potions/breast_expand/classroom_a2.webp"

image CG breast expand classroom B1:
    "images/CG/her_potions/breast_expand/classroom_b1.webp"

image CG breast expand classroom B2:
    "images/CG/her_potions/breast_expand/classroom_b2.webp"

image CG ass expand classroom A1:
    "images/CG/her_potions/ass_expand/classroom_a1.webp"

image CG ass expand classroom A2:
    "images/CG/her_potions/ass_expand/classroom_a2.webp"

layeredimage her_vibrators_public:
    fit "cover"

    attribute background default

    group npc multiple prefix "npc":
        attribute sus_ron:
            "her_vibrators_public_npc_sus_ron"
        attribute shock_ron:
            Fixed("her_vibrators_public_npc_shock_ron", \
            "her_vibrators_public_npc_shock_ron_effect")
        attribute shock_harry:
            Fixed("her_vibrators_public_npc_shock_harry", \
            "her_vibrators_public_npc_shock_harry_effect")

    attribute no_hermione null
    attribute body default if_not "no_hermione"
    group blush auto prefix "blush" if_not "no_hermione":
        attribute neutral default
    group tears auto prefix "tears" if_not "no_hermione"
    group eyes auto prefix "eyes" if_not "no_hermione":
        attribute forward default
    group eyebrows auto prefix "eyebrows" if_not "no_hermione":
        attribute neutral default
    group mouth auto prefix "mouth" if_not "no_hermione":
        attribute neutral default
    attribute hair default if_not "no_hermione"

    group wetness auto prefix "wetness" if_not "no_hermione"

    group vibrator_upper variant "vibrator_upper" multiple if_not "no_hermione":
        attribute base default
        attribute egg default at shake_xlinear
        attribute tape default
        attribute effect default at shake_xlinear

    group vibrator_lower variant "vibrator_lower" multiple if_not "no_hermione":
        attribute base default
        attribute egg default at shake_xlinear
        attribute tape default
        attribute effect default at shake_xlinear

    group underwear multiple if_not "no_hermione":
        attribute bra default if_any ["underwear", "nopanties"]
        attribute panties default if_any ["underwear", "nobra"]

    group outfit if_not "no_hermione":
        attribute uniform default
        attribute underwear null
        attribute nobra null
        attribute nopanties null
        attribute nude null

    group effects auto multiple prefix "effects" if_not "no_hermione"

image her_vibrators_public_proxy = LayeredImageProxy("her_vibrators_public")
image her_vibrators_public_xray = Xray("her_vibrators_public", "her_vibrators_public_proxy", radius=0.18)

layeredimage her_vibrators_personal hermione1:
    fit "cover"
    fit_first True

    always "her_vibrators_personal_background"

    attribute shadow default
    attribute body default
    group blush auto prefix "blush":
        attribute neutral null default
    group eyes auto prefix "eyes":
        attribute open_forward default
    group eyebrows auto prefix "eyebrows":
        attribute neutral default
    group mouth auto prefix "mouth":
        attribute horny default
    attribute fringe default

    group effects auto multiple prefix "effects"

    group vibrator multiple variant "vibrator":
        attribute base default
        attribute eggl default at shake_xlinear
        attribute eggr default at shake_xlinear
        attribute tape default

layeredimage her_vibrators_personal hermione2:
    fit "cover"
    fit_first True

    always "her_vibrators_personal_background"

    attribute shadow default
    attribute body default
    group blush auto prefix "blush":
        attribute neutral null default
    group eyes auto prefix "eyes":
        attribute open_forward default
    group eyebrows auto prefix "eyebrows":
        attribute neutral default
    group mouth auto prefix "mouth":
        attribute horny default
    attribute fringe default

    group effects auto multiple prefix "effects"

    group vibrator multiple variant "vibrator":
        attribute base default
        attribute eggl default at shake_xlinear
        attribute eggr default at shake_xlinear
        attribute eggm default at shake_xlinear
        attribute tape default

layeredimage her_vibrators_personal hermione3:
    fit "cover"
    fit_first True

    always "her_vibrators_personal_background"

    attribute shadow default
    attribute body default
    group blush auto prefix "blush":
        attribute neutral null default
    group eyes auto prefix "eyes":
        attribute clenched default
    group eyebrows auto prefix "eyebrows":
        attribute worried default
    group mouth auto prefix "mouth":
        attribute open default

    group effects auto multiple prefix "effects"

    group vibrator multiple variant "vibrator":
        attribute base default
        attribute eggl default at shake_xlinear
        attribute eggr default at shake_xlinear

layeredimage her_flash_public:
    fit "cover"

    always "her_flash_public_background"

    group npc auto prefix "npc":
        attribute pose5:
            at blink_repeat # TODO: Figure out why this does not work.

    group hermione auto prefix "hermione":
        attribute pose1 default

    group blush auto prefix "blush":
        attribute neutral null default
    group eyes auto prefix "eyes":
        attribute open_forward default
    group eyebrows auto prefix "eyebrows":
        attribute worried default
    group mouth auto prefix "mouth":
        attribute soft default
    group effects auto prefix "effects"

transform her_flirt_public_flitwick_feather:
    align (0.5, 0.5)
    rotate 10
    offset (-60, 40)
    ease_quad 3.0 rotate 5 offset (-30, -20)
    ease_quad 3.0 rotate 10 offset (-60, 40)
    repeat

transform her_flirt_public_flitwick_hermione_hand:
    subpixel True

    align (0.5, 0.5)
    rotate 1
    offset (-25, 10)
    pause 0.2
    ease_quad 2.8 rotate -1 offset (25, 15)
    ease_quad 2.8 rotate 1 offset (-25, 10)
    pause 0.2
    repeat

layeredimage her_flirt_public_flitwick:
    fit "cover"
    fit_first True

    #always "her_flirt_public_flitwick_background"
    always "her_flirt_public_flitwick_hermione"

    attribute feather default at her_flirt_public_flitwick_feather
    attribute hermione_hand default at her_flirt_public_flitwick_hermione_hand

    group hermione_eyes auto prefix "eyes":
        attribute forward default
    group hermione_eyebrows auto prefix "eyebrows":
        attribute neutral default
    group hermione_mouth auto prefix "mouth":
        attribute closed default

    ypan 180
