From 7069cc1294d0929ba636201b25a487641973aa0b Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Sat, 27 Apr 2024 15:24:14 +0100 Subject: [PATCH] Refactoring * Refactored old house points references * Updates set_points method to use a dict to work with multiple changes at once. --- .../characters/astoria/events/intro.rpy | 6 +- .../events/spell_favours_INCOMPLETE.txt | 2 +- .../inspect_her_body_tier2_hermione.rpy | 4 +- .../events/favors/inspect_her_body_tier3.rpy | 2 +- .../favors/inspect_her_body_tier3_tonks.rpy | 6 +- ...nspect_her_body_tier4_tonks_INCOMPLETE.txt | 2 +- game/scripts/characters/cho/events/intro.rpy | 6 +- .../cho/events/quidditch/intros.rpy | 2 +- .../cho/events/quidditch/slytherin_match.rpy | 4 +- .../hermione/events/cardgame_wager.rpy | 14 ++--- .../events/favors/give_me_a_handy.rpy | 2 +- .../events/favors/give_me_a_tittyjob.rpy | 2 +- .../hermione/events/favors/grope_her.rpy | 2 +- .../hermione/events/favors/grope_her_ass.rpy | 4 +- .../hg_pf_T3a_look_at_ass_INCOMPLETE.txt | 2 +- .../hermione/events/favors/lets_have_sex.rpy | 4 +- .../events/favors/show_me_your_panties.rpy | 6 +- .../events/favors/show_me_your_tits.rpy | 2 +- .../hermione/events/favors/suck_it.rpy | 4 +- .../hermione/events/favors/talk_to_me.rpy | 2 +- .../characters/hermione/events/intro.rpy | 6 +- .../hermione/events/items/butt_plugs.rpy | 10 +-- .../hermione/events/items/collars.rpy | 8 +-- .../hermione/events/items/vibrators.rpy | 10 +-- .../hermione/events/jobs_NOT_IN_USE.txt | 6 +- .../hermione/events/odd_jobs/maid.rpy | 14 ++--- .../hermione/events/odd_jobs/panty_thief.rpy | 2 +- .../hermione/events/odd_jobs/promoter.rpy | 10 +-- .../hermione/events/potions/ass_expand.rpy | 4 +- .../hermione/events/potions/breast_expand.rpy | 4 +- .../hermione/events/potions/polyjuice_cat.rpy | 8 +-- .../events/potions/polyjuice_luna.rpy | 2 +- .../events/requests/flash_your_tits.rpy | 2 +- .../events/requests/flirt_with_students.rpy | 2 +- .../events/requests/flirt_with_teachers.rpy | 2 +- .../events/requests/give_a_blowjob.rpy | 2 +- .../events/requests/give_a_handjob.rpy | 2 +- .../hermione/events/requests/have_sex.rpy | 2 +- .../hermione/events/requests/kiss_a_girl.rpy | 2 +- .../events/requests/let_them_grope_you.rpy | 2 +- .../hermione/events/requests/wear_my_cum.rpy | 24 +++---- game/scripts/characters/hermione/summon.rpy | 2 +- .../luna/events/favors/masturbate_for_me.rpy | 2 +- .../luna/events/favors/talk_to_me.rpy | 2 +- .../characters/snape/events/hangouts.rpy | 2 +- .../characters/tonks/events/clothing.rpy | 2 +- .../characters/tonks/events/clothing_old.txt | 2 +- .../characters/tonks/events/hangout.rpy | 2 +- .../events/requests/detention_with_tonks.rpy | 32 +++++----- .../events/requests/hands-on_lessons.rpy | 12 ++-- .../tonks/events/requests/oral_practice.rpy | 16 ++--- game/scripts/events/DayNight.rpy | 12 +--- game/scripts/events/labels.rpy | 8 +-- game/scripts/interface/cheats.rpy | 29 ++++----- game/scripts/interface/house_points.rpy | 63 ++++++++++--------- game/scripts/interface/inventory.rpy | 4 +- game/scripts/interface/topbar.rpy | 18 +++--- .../inventory/potions/addictive_potion.txt | 2 +- .../inventory/potions/clothing_potion.txt | 2 +- .../inventory/potions/expanding_potion.txt | 4 +- .../inventory/potions/milking_potion.txt | 10 +-- .../inventory/potions/polyjuice_potion.txt | 8 +-- .../cardgame/_hermione_card_game_.rpy | 4 +- game/scripts/utility/common_functions.rpy | 4 +- game/scripts/variables.rpy | 35 ++++++----- 65 files changed, 237 insertions(+), 242 deletions(-) diff --git a/game/scripts/characters/astoria/events/intro.rpy b/game/scripts/characters/astoria/events/intro.rpy index 492b238c..55180a6e 100644 --- a/game/scripts/characters/astoria/events/intro.rpy +++ b/game/scripts/characters/astoria/events/intro.rpy @@ -567,13 +567,13 @@ label astoria_intro_E3: her "..." ("annoyed", "narrow", "angry", "R") her "Very well..." ("open", "closed", "base", "mid") $ states.her.mood += 6 - $ gryffindor += 10 + $ states.env.gryffindor += 10 "\"You'll get twenty.\"": her "..." ("annoyed", "base", "base", "R") her "I suppose that's fair." ("open", "closed", "base", "mid") $ states.her.mood = 0 - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "In a few days, everyone at Hogwarts will know what happened to her..." ("grin", "base", "angry", "mid") her "When she's sent to Azkaban!" ("soft", "squint", "angry", "mid") @@ -765,7 +765,7 @@ label astoria_intro_E3: ton "But you'll still have to visit me for detention." ("open", "base", "annoyed", "L") ast "I guess I can do that..." ("smile", "base", "base", "R") ton "Wonderful." ("base", "happyCl", "base", "mid") - $ slytherin += 50 + $ states.env.slytherin += 50 ton "That should be all for now, Miss Greengrass." ("open", "base", "base", "L") ast "..." ("annoyed", "base", "base", "down") diff --git a/game/scripts/characters/astoria/events/spell_favours_INCOMPLETE.txt b/game/scripts/characters/astoria/events/spell_favours_INCOMPLETE.txt index 6d70d704..4eb0c3a8 100644 --- a/game/scripts/characters/astoria/events/spell_favours_INCOMPLETE.txt +++ b/game/scripts/characters/astoria/events/spell_favours_INCOMPLETE.txt @@ -906,7 +906,7 @@ label hermione_breaks_astoria: gen "How many?" ("base", xpos="far_left", ypos="head") her "At least a hundred." gen "One hundred points to Gryffindor then!" ("base", xpos="far_left", ypos="head") - $ gryffindor += 100 + $ states.env.gryffindor += 100 her "Thank you, [genie_name]." ">With that, Hermione unparalyses the dazed Slytherin before leading her out of your office and back to her dorm." jump main_room diff --git a/game/scripts/characters/cho/events/favors/inspect_her_body_tier2_hermione.rpy b/game/scripts/characters/cho/events/favors/inspect_her_body_tier2_hermione.rpy index 480b8729..ff9fd862 100644 --- a/game/scripts/characters/cho/events/favors/inspect_her_body_tier2_hermione.rpy +++ b/game/scripts/characters/cho/events/favors/inspect_her_body_tier2_hermione.rpy @@ -196,13 +196,13 @@ label cc_pf_strip_T2_E3_hermione_choices: menu: "\"Ten points to Gryffindor!\"": - $ gryffindor += 10 + $ states.env.gryffindor += 10 cho "(...)" ("annoyed", "narrow", "angry", "mid") her "Thank you." ("soft", "narrow", "base", "mid_soft") "\"Fifty points to Gryffindor!\"": $ states.cho.mood += 10 - $ gryffindor += 50 + $ states.env.gryffindor += 50 cho "(Fifty?!)" ("soft", "wide", "base", "mid") # Shocked her "Thank you." ("soft", "narrow", "base", "mid_soft") cho @ cheeks heavy_blush "" ("clench", "closed", "angry", "mid") diff --git a/game/scripts/characters/cho/events/favors/inspect_her_body_tier3.rpy b/game/scripts/characters/cho/events/favors/inspect_her_body_tier3.rpy index 63b57c4a..86e295ce 100644 --- a/game/scripts/characters/cho/events/favors/inspect_her_body_tier3.rpy +++ b/game/scripts/characters/cho/events/favors/inspect_her_body_tier3.rpy @@ -835,7 +835,7 @@ label cc_pf_strip_T3_intro_E2: sna "*Tzzzs*... by sheer luck you did." ("snape_32") cho @ cheeks blush "Says the one who literally gave his team liquid luck!" ("disgust", "narrow", "angry", "L") sna "Ten points from Ravenclaw!" ("snape_31") - $ ravenclaw -= 10 + $ states.env.ravenclaw -= 10 cho @ cheeks blush "{size=-4}Like I care...{/size}" ("annoyed", "narrow", "angry", "down") ton "Let the girl speak her mind, Severus!" ("open", "closed", "shocked", "mid") ton "Or shall I remind you that you were the one who barged in here uninvited..." ("open", "narrow", "base", "L") diff --git a/game/scripts/characters/cho/events/favors/inspect_her_body_tier3_tonks.rpy b/game/scripts/characters/cho/events/favors/inspect_her_body_tier3_tonks.rpy index a1b7e780..8ff2a3aa 100644 --- a/game/scripts/characters/cho/events/favors/inspect_her_body_tier3_tonks.rpy +++ b/game/scripts/characters/cho/events/favors/inspect_her_body_tier3_tonks.rpy @@ -457,7 +457,7 @@ label .spank_cho: ton @ hair horny "*Hmm*..." ("annoyed", "narrow", "shocked", "down") ton @ hair horny "A well-behaved girl like you should be rewarded. {heart}" ("crooked_smile", "narrow", "raised", "L") ton @ hair horny "Ten points for Ravenclaw, Miss Chang." ("soft", "narrow", "base", "L") - $ ravenclaw += 10 + $ states.env.ravenclaw += 10 cho @ cheeks heavy_blush "Thank you I guess--" ("crooked_smile", "narrow", "worried", "R") ton @ hair horny "" ("horny", "narrow", "angry", "down") call slap_her @@ -730,7 +730,7 @@ label .spank_tonks: pause .8 ton @ cheeks heavy_blush hair horny "Ten points for Ravenclaw." ("soft", "narrow", "base", "L") - $ ravenclaw += 10 + $ states.env.ravenclaw += 10 ton @ cheeks heavy_blush hair horny "For this thorough ass spanking!" ("horny", "narrow", "base", "mid") cho "Thank you, Professor Tonks." ("crooked_smile", "narrow", "base", "down") @@ -924,7 +924,7 @@ label cc_pf_strip_T3_tonks.succubus_E1: cho "They're demons in female form, that can visit you in your dreams and murder you!" ("soft", "narrow", "angry", "mid") ton "Very good, Miss Chang..." ("crooked_smile", "base", "base", "L") ton "Ten points for Ravenclaw!" ("soft", "narrow", "base", "L") - $ ravenclaw += 10 + $ states.env.ravenclaw += 10 cho @ cheeks blush "Thank you." ("smile", "narrow", "base", "downR") # happy $ states.cho.ev.inspect_her_body.tonks_succubus_encounter = True diff --git a/game/scripts/characters/cho/events/favors/inspect_her_body_tier4_tonks_INCOMPLETE.txt b/game/scripts/characters/cho/events/favors/inspect_her_body_tier4_tonks_INCOMPLETE.txt index 039f396e..355f9f7d 100644 --- a/game/scripts/characters/cho/events/favors/inspect_her_body_tier4_tonks_INCOMPLETE.txt +++ b/game/scripts/characters/cho/events/favors/inspect_her_body_tier4_tonks_INCOMPLETE.txt @@ -55,7 +55,7 @@ # ton "So be it then..." # ton "I'll do anything for my precious Gryffindor house!" # gen "Five points for Gryffindor, Miss Granger!" ("grin", xpos="far_left", ypos="head") - # $ gryffindor += 5 + # $ states.env.gryffindor += 5 # gen "Now strip for us, you little slut." ("angry", xpos="far_left", ypos="head") # "You shall receive one hundred points!": diff --git a/game/scripts/characters/cho/events/intro.rpy b/game/scripts/characters/cho/events/intro.rpy index f5f05eed..074449a0 100644 --- a/game/scripts/characters/cho/events/intro.rpy +++ b/game/scripts/characters/cho/events/intro.rpy @@ -761,7 +761,7 @@ label cho_intro_E3: if states.sna.level <= 30: gen "(I'm going to need to get real friendly with Snape to get those Slytherins in a steady lead...)" ("base", xpos="far_left", ypos="head") gen "One hundred points to Gryffindor...{w=0.6} Happy?" ("base", xpos="far_left", ypos="head") - $ gryffindor += 100 + $ states.env.gryffindor += 100 her "If I'm truly honest with you Sir,{w=0.6} My plans weren't that popular with the Quidditch teams in any case." ("soft", "narrow", "base", "mid_soft") gen "I can't imagine why..." ("base", xpos="far_left", ypos="head") @@ -777,7 +777,7 @@ label cho_intro_E3: her "*Tzzzz*- Fine.. Fifty points then, but I'm not happy about it..." ("angry", "base", "angry", "mid") gen "Fine by me..." ("base", xpos="far_left", ypos="head") gen "Fifty points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 50 + $ states.env.gryffindor += 50 $ states.her.mood += 6 her "Thanks I guess..." ("open", "closed", "angry", "mid") gen "You may leave now..." ("base", xpos="far_left", ypos="head") @@ -814,7 +814,7 @@ label cho_intro_E3: her "(...)" ("annoyed", "narrow", "angry", "R") her "Very well then." ("soft", "closed", "base", "mid") gen "Fifty points, to the Gryffindor house..." ("base", xpos="far_left", ypos="head") - $ gryffindor += 50 + $ states.env.gryffindor += 50 her "Thank you, [name_genie_hermione]." ("base", "base", "base", "mid") else: diff --git a/game/scripts/characters/cho/events/quidditch/intros.rpy b/game/scripts/characters/cho/events/quidditch/intros.rpy index eb4ee140..60444cab 100644 --- a/game/scripts/characters/cho/events/quidditch/intros.rpy +++ b/game/scripts/characters/cho/events/quidditch/intros.rpy @@ -1369,7 +1369,7 @@ label cho_quid_E12: cho "She was a legendary seeker, the speed and precision of her flying was unmatched." ("angry", "closed", "base", "mid") cho "Nobody ever managed to figure out her identity or how she managed to fly so well." ("soft", "narrow", "base", "L") hoo "You sure know your Quidditch history Miss Chang, ten points to Ravenclaw." ("grin", "base", "base", "L") - $ ravenclaw += 10 + $ states.env.ravenclaw += 10 cho "And then...{w=0.4} And then...{w=0.4} You disappeared, and became a teacher?" ("soft", "base", "raised", "L") hoo "Yes indeed." ("base", "shocked", "base", "L") cho "Wow...{w=0.4} I can't believe it." ("soft", "base", "base", "mid") diff --git a/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy b/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy index c76f6db1..153f20ac 100644 --- a/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy +++ b/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy @@ -719,8 +719,8 @@ label slytherin_match: gen "What? I'm just joking, I'm sure she'll be fine..." ("base", xpos="far_left", ypos="head") sna "{size=-4}10 points to Slytherin.{/size}" ("snape_38") gen "Did you say something--" ("base", xpos="far_left", ypos="head") - $ gryffindor += 10 - $ slytherin += 10 + $ states.env.gryffindor += 10 + $ states.env.slytherin += 10 ton @ hair angry "Quiet!" ("mad", "base", "angry", "L") diff --git a/game/scripts/characters/hermione/events/cardgame_wager.rpy b/game/scripts/characters/hermione/events/cardgame_wager.rpy index 60f9c137..54949fc9 100644 --- a/game/scripts/characters/hermione/events/cardgame_wager.rpy +++ b/game/scripts/characters/hermione/events/cardgame_wager.rpy @@ -10,7 +10,7 @@ label hg_wager_bj: her "No! what kind of girl do you take me for, [name_genie_hermione]!" ("scream", "base", "angry", "mid") gen "Fine... Twenty points, deducted from Gryffindor!" ("base", xpos="far_left", ypos="head") her "*Hmph*!" ("angry", "base", "angry", "mid") - $ gryffindor -= 20 + $ states.env.gryffindor -= 20 pause.5 call her_chibi("leave","door","base") else: @@ -72,7 +72,7 @@ label hg_wager_bj: sna "How sweet..." (face="snape_03") her "May I leave now?" ("annoyed", "narrow", "worried", "down", flip=True) gen "You are excused, Miss Granger... But I will be taking twenty points from Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor -= 20 + $ states.env.gryffindor -= 20 call her_walk(action="leave") @@ -99,7 +99,7 @@ label hg_wager_bj: with d1 gen "I'll only deduct ten points from Gryffindor, as we agreed." ("base", xpos="far_left", ypos="head") gen "Ten points deducted from Gryffindor!" ("base", xpos="far_left", ypos="head") - $ gryffindor -= 10 + $ states.env.gryffindor -= 10 call blkfade call her_chibi("stand","mid","base") call gen_chibi("sit_behind_desk") @@ -543,7 +543,7 @@ label hg_wager_bj: "-Only deduct the twenty points-": gen "You should be happy that I'm not deducting more!" ("angry", xpos="far_left", ypos="head") gen "Twenty points deduced from Gryffindor!" ("angry", xpos="far_left", ypos="head") - $ gryffindor -= 20 + $ states.env.gryffindor -= 20 her "..." ("disgust", "base", "angry", "mid") her "Whatever..." ("open", "closed", "angry", "mid") $ states.her.mood += 15 @@ -551,7 +551,7 @@ label hg_wager_bj: gen "Oh, don't you worry..." ("base", xpos="far_left", ypos="head") her "..." gen "Forty points deducted from Gryffindor!" ("angry", xpos="far_left", ypos="head") - $ gryffindor -= 40 + $ states.env.gryffindor -= 40 her "What?! You can't do that!" ("shock", "wide", "worried", "stare") gen "Of course I can, I'm the headmaster!" ("angry", xpos="far_left", ypos="head") her "I can't believe you've done this..." ("mad", "base", "angry", "mid") @@ -609,7 +609,7 @@ label hg_wager_bj: gen "Points?" ("angry", xpos="far_left", ypos="head") gen "Oh yes, the points!" ("grin", xpos="far_left", ypos="head") gen "Twenty points to Gryffindor!" ("grin", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "That's not--" ("normal", "narrow", "base", "down") her "Thank you, [name_genie_hermione]..." ("open", "closed", "base", "mid") if states.env.daytime: @@ -654,7 +654,7 @@ label hg_wager_bj: her "..." ("upset", "narrow", "worried", "down") her "Fine..." ("clench", "narrow", "annoyed", "mid") gen "Twenty points deducted from Gryffindor!" ("base", xpos="far_left", ypos="head") - $ gryffindor -= 20 + $ states.env.gryffindor -= 20 $ states.her.mood += 10 $ states.her.status.blowjob = True diff --git a/game/scripts/characters/hermione/events/favors/give_me_a_handy.rpy b/game/scripts/characters/hermione/events/favors/give_me_a_handy.rpy index 17957a2b..e881ddee 100644 --- a/game/scripts/characters/hermione/events/favors/give_me_a_handy.rpy +++ b/game/scripts/characters/hermione/events/favors/give_me_a_handy.rpy @@ -44,7 +44,7 @@ label end_hg_pf_handjob: if states.her.tier <= 5: gen "Here you go, [name_hermione_genie]... {number=current_payout} points to Gryffindor." ("base", xpos="far_left", ypos="head") gen "You may leave now." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout else: gen "You may leave now, [name_hermione_genie]." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/hermione/events/favors/give_me_a_tittyjob.rpy b/game/scripts/characters/hermione/events/favors/give_me_a_tittyjob.rpy index 0d2cd345..860f08d2 100644 --- a/game/scripts/characters/hermione/events/favors/give_me_a_tittyjob.rpy +++ b/game/scripts/characters/hermione/events/favors/give_me_a_tittyjob.rpy @@ -46,7 +46,7 @@ label end_hg_pf_titjob: # Points if states.her.tier <= 5: gen "{number=current_payout} points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout else: gen "You may leave now, [name_hermione_genie]." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/hermione/events/favors/grope_her.rpy b/game/scripts/characters/hermione/events/favors/grope_her.rpy index 93d360a7..f177f87f 100644 --- a/game/scripts/characters/hermione/events/favors/grope_her.rpy +++ b/game/scripts/characters/hermione/events/favors/grope_her.rpy @@ -49,7 +49,7 @@ label end_hg_pf_grope: # Points if states.her.tier <= 5: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") else: gen "You may leave now, [name_hermione_genie]." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/hermione/events/favors/grope_her_ass.rpy b/game/scripts/characters/hermione/events/favors/grope_her_ass.rpy index 67a1a73b..3e3547f2 100644 --- a/game/scripts/characters/hermione/events/favors/grope_her_ass.rpy +++ b/game/scripts/characters/hermione/events/favors/grope_her_ass.rpy @@ -197,7 +197,7 @@ label hg_pf_grope_ass_T2_back: gen "(Acting all wounded now...)" ("base", xpos="far_left", ypos="head") gen "(I bet she actually enjoyed the slapping and just won't admit it...)" ("grin", xpos="far_left", ypos="head") - $ gryffindor -=10 + $ states.env.gryffindor -=10 $ states.her.mood += 30 jump end_hermione_event @@ -502,7 +502,7 @@ label hg_pf_grope_ass_T3_mad: menu: gen "(...)" ("base", xpos="far_left", ypos="head") "\"Alright, alright... One hundred points it is...\"": - $ gryffindor += 100 + $ states.env.gryffindor += 100 $ states.her.mood += 9 gen "One hundred points to Gryffindor!" ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/hermione/events/favors/hg_pf_T3a_look_at_ass_INCOMPLETE.txt b/game/scripts/characters/hermione/events/favors/hg_pf_T3a_look_at_ass_INCOMPLETE.txt index 561754dd..15d9e5f5 100644 --- a/game/scripts/characters/hermione/events/favors/hg_pf_T3a_look_at_ass_INCOMPLETE.txt +++ b/game/scripts/characters/hermione/events/favors/hg_pf_T3a_look_at_ass_INCOMPLETE.txt @@ -982,7 +982,7 @@ label end_hg_show_ass: if current_payout < 100: $ her_mood +=7 - $ gryffindor +=current_payout + $ states.env.gryffindor +=current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") stop music fadeout 10.0 diff --git a/game/scripts/characters/hermione/events/favors/lets_have_sex.rpy b/game/scripts/characters/hermione/events/favors/lets_have_sex.rpy index 37343129..0d538072 100644 --- a/game/scripts/characters/hermione/events/favors/lets_have_sex.rpy +++ b/game/scripts/characters/hermione/events/favors/lets_have_sex.rpy @@ -49,7 +49,7 @@ label end_hg_pf_sex: # Points gen "Alright then, [name_hermione_genie]. {number=current_payout} points to the Gryffindor house." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout her @ cheeks blush "Thank you, [name_genie_hermione]..." ("open", "base", "base", "R") # Hermione leaves @@ -224,7 +224,7 @@ label hg_pf_sex_T6_intro_E1: her "I am not a prostitute!" gen "But you'll do it anyway??" ("base", xpos="far_left", ypos="head") - if not is_in_lead(gryffindor): + if not is_in_lead(states.env.gryffindor): her "Gryffindor is falling behind again..." ("open", "closed", "base", "mid") else: her "I have to make sure Gryffindor stays in the lead..." ("open", "closed", "base", "mid") diff --git a/game/scripts/characters/hermione/events/favors/show_me_your_panties.rpy b/game/scripts/characters/hermione/events/favors/show_me_your_panties.rpy index 6965edc4..315b9472 100644 --- a/game/scripts/characters/hermione/events/favors/show_me_your_panties.rpy +++ b/game/scripts/characters/hermione/events/favors/show_me_your_panties.rpy @@ -45,7 +45,7 @@ label end_hg_pf_admire_panties: # If Hermione is at tier 4+, she does not care about points. if states.her.tier < 4 and current_payout > 0: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "{number=current_payout} points to Gryffindor, [name_hermione_genie]. Well done." ("base", xpos="far_left", ypos="head") if not _events_completed_any: # First time @@ -585,7 +585,7 @@ label hg_pf_admire_panties_T4_intro_E1: gen "Ten additional points to Gryffindor!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]!" ("base", "happyCl", "worried", "mid") - $ gryffindor+= 10 + $ states.env.gryffindor+= 10 call ctc @@ -680,7 +680,7 @@ label hg_pf_admire_panties_T4_E1: gen "Ten additional points to Gryffindor!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]!" ("base", "happyCl", "worried", "mid") - $ gryffindor+= 10 + $ states.env.gryffindor+= 10 call ctc diff --git a/game/scripts/characters/hermione/events/favors/show_me_your_tits.rpy b/game/scripts/characters/hermione/events/favors/show_me_your_tits.rpy index f23842a5..62b5181e 100644 --- a/game/scripts/characters/hermione/events/favors/show_me_your_tits.rpy +++ b/game/scripts/characters/hermione/events/favors/show_me_your_tits.rpy @@ -41,7 +41,7 @@ label end_hg_pf_admire_breasts: her "" ("base", "narrow", "annoyed", "up", xpos="mid", ypos="base", trans=fade) # Points - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") stop music fadeout 10.0 diff --git a/game/scripts/characters/hermione/events/favors/suck_it.rpy b/game/scripts/characters/hermione/events/favors/suck_it.rpy index f5537c40..69d54844 100644 --- a/game/scripts/characters/hermione/events/favors/suck_it.rpy +++ b/game/scripts/characters/hermione/events/favors/suck_it.rpy @@ -50,7 +50,7 @@ label end_hg_pf_blowjob: if states.her.tier < 6: gen "{number=current_payout} points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout else: gen "You may go now, [name_hermione_genie]." ("base", xpos="far_left", ypos="head") @@ -1397,7 +1397,7 @@ label hg_hidden_blowjob_tonks: call her_chibi_scene("bj_pause", trans=d5) ton "Sixty-nine points!" ("grin", "wide", "base", "mid") - $ gryffindor += 69 + $ states.env.gryffindor += 69 her "(Sixty-nine! That's even more than she offered before!)" ("shock", "wide", "base", "up") gen "Didn't you say fifty, earlier?" ("angry", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/hermione/events/favors/talk_to_me.rpy b/game/scripts/characters/hermione/events/favors/talk_to_me.rpy index d825fab8..876c72ab 100644 --- a/game/scripts/characters/hermione/events/favors/talk_to_me.rpy +++ b/game/scripts/characters/hermione/events/favors/talk_to_me.rpy @@ -32,7 +32,7 @@ label end_hg_pf_talk: # Points if states.her.tier <= 3: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "{number=current_payout} points to Gryffindor, [name_hermione_genie]. Well done." ("base", xpos="far_left", ypos="head") elif states.her.tier == 4 and not _events_filtered_completed_any: gen "{number=current_payout} points to Gryff--" ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/hermione/events/intro.rpy b/game/scripts/characters/hermione/events/intro.rpy index 01c141cb..ef8a5840 100644 --- a/game/scripts/characters/hermione/events/intro.rpy +++ b/game/scripts/characters/hermione/events/intro.rpy @@ -871,7 +871,7 @@ label hermione_intro_E4: stop music fadeout 1.0 # Gryffindor gets shafted by Snape and has 50% of Slytherin's points. - $ gryffindor = int(slytherin*0.5) + $ states.env.gryffindor = int(states.env.gryffindor*0.5) call update_ui_points # Wear default outfit. She's in shock so she didn't change. @@ -1148,7 +1148,7 @@ label hermione_intro_E6: gen "What is it, miss Granger?" ("base", xpos="far_left", ypos="head") her "Well... *Ehm*." ("open", "base", "base", "mid") - if not is_in_lead(gryffindor): + if not is_in_lead(states.env.gryffindor): her "You see... The Gryffindor house is not in the lead anymore..." ("open", "base", "worried", "R") else: her "You see... The Gryffindor house is struggling with points..." ("open", "base", "worried", "R") @@ -1407,7 +1407,7 @@ label hermione_intro_E6: gen "{number=current_payout} point to the Gryffindor house." ("base", xpos="far_left", ypos="head") else: gen "{number=current_payout} points to the Gryffindor house." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout her "..... Yay!......." ("grin", "happyCl", "worried", "mid", emote="sweat") her "This was quite easy..." diff --git a/game/scripts/characters/hermione/events/items/butt_plugs.rpy b/game/scripts/characters/hermione/events/items/butt_plugs.rpy index b6b1c070..a33fd358 100644 --- a/game/scripts/characters/hermione/events/items/butt_plugs.rpy +++ b/game/scripts/characters/hermione/events/items/butt_plugs.rpy @@ -703,7 +703,7 @@ label hg_butt_plugs_small_return: gen "Well done, [name_hermione_genie]." ("base", xpos="far_left", ypos="head") her "" ("base", "narrow", "worried", "down") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." @@ -964,7 +964,7 @@ label hg_butt_plugs_medium_return: her @ cheeks blush "Expose? I'm not sure I know what you mean...{w=0.4} I was tying my shoelaces........" ("base", "base", "base", "R") gen "Very good, [name_hermione_genie]!" ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." @@ -994,14 +994,14 @@ label hg_butt_plugs_large_return: gen "He did what?" ("base", xpos="far_left", ypos="head") her "I know! How dare he!" ("clench", "narrow", "worried", "down") gen "Ten points to Slytherin!" ("base", xpos="far_left", ypos="head") - $ slytherin += 10 + $ states.env.slytherin += 10 her "What?!" ("scream", "wide", "angry", "mid") her "Why are you giving points to Slytherin?!" ("angry", "wide", "angry", "mid") gen "Such a one-liner ought to be rewarded!" ("base", xpos="far_left", ypos="head") her "But [name_genie_hermione]! I'm doing this so that Gryffindor can get ahead of Slytherin!" ("upset", "base", "angry", "mid") gen "Oh, right..." ("base", xpos="far_left", ypos="head") gen "Ten points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 10 + $ states.env.gryffindor += 10 her "*Hmm*... But now Ravenclaw and Hufflepuff are both behind..." ("open", "narrow", "worried", "down") gen "Enough about the points. Tell me more about your behind." ("base", xpos="far_left", ypos="head") her "My-- Oh right..." ("annoyed", "narrow", "angry", "R") @@ -1062,7 +1062,7 @@ label hg_butt_plugs_large_return: her "It was quite an experience to say the least..." gen "Very good, [name_hermione_genie]!" ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." diff --git a/game/scripts/characters/hermione/events/items/collars.rpy b/game/scripts/characters/hermione/events/items/collars.rpy index f820e8e8..4fe3ef86 100644 --- a/game/scripts/characters/hermione/events/items/collars.rpy +++ b/game/scripts/characters/hermione/events/items/collars.rpy @@ -1108,14 +1108,14 @@ label flasher_scene: nar "Hermione stares into your face, cheeks flushed with colour as she spreads her wet pussy..." gen "Ten points to Gryffindor!" ("grin", xpos="far_left", ypos="head") - $ gryffindor += 10 + $ states.env.gryffindor += 10 her @ cheeks blush "Thank you, [name_genie_hermione]..." ("grin", "narrow", "base", "mid") nar "With a sensual step, Hermione turns around then bends down, showing you her ass and pussy in vivid details." gen "Holy shit! This feels like a strip-club!" ("grin", xpos="far_left", ypos="head") gen "Another Ten points to Gryffindor!" ("grin", xpos="far_left", ypos="head") - $ gryffindor += 10 + $ states.env.gryffindor += 10 show screen blkfade with d5 @@ -1150,7 +1150,7 @@ label flasher_scene: gen "Yes, [name_hermione_genie]... That shall do for today." ("base", xpos="far_left", ypos="head") if states.her.level < 19: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "{number=current_payout} points to Gryffindor, [name_hermione_genie]." ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." ("base", "base", "base", "mid") @@ -1260,7 +1260,7 @@ label good_girl_scene: gen "It's nothing. Don't worry about it." ("base", xpos="far_left", ypos="head") if states.her.level < 19: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "{number=current_payout} points to Gryffindor, [name_hermione_genie]." ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." ("base", "happy", "base", "mid") diff --git a/game/scripts/characters/hermione/events/items/vibrators.rpy b/game/scripts/characters/hermione/events/items/vibrators.rpy index ae478f50..5ce1ecc9 100644 --- a/game/scripts/characters/hermione/events/items/vibrators.rpy +++ b/game/scripts/characters/hermione/events/items/vibrators.rpy @@ -2041,7 +2041,7 @@ label hg_vibrators_personal: her @ cheeks blush "Can I have my points now?" ("open", "happy", "base", "mid") gen "Certainly." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "{number=current_payout} points to Gryffindor, [name_hermione_genie]." ("base", xpos="far_left", ypos="head") her @ cheeks blush "Thanks..." ("annoyed", "narrow", "angry", "R") @@ -2100,7 +2100,7 @@ label hg_vibrators_personal: her @ cheeks blush "My points! Now!" ("open", "base", "annoyed", "mid") gen "Alright, alright... Don't get your panties in a twist." ("angry", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "{number=current_payout} points to Gryffindor!" ("base", xpos="far_left", ypos="head") play sound "sounds/click4.ogg" @@ -2159,7 +2159,7 @@ label hg_vibrators_personal: her @ cheeks blush "I insist..." ("angry", "closed", "base", "mid") gen "Suit yourself..." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "{number=current_payout} points to Gryffindor!" ("base", xpos="far_left", ypos="head") gen "Now, can we get back to--" ("base", xpos="far_left", ypos="head") @@ -3496,7 +3496,7 @@ label hg_vibrators_public_return: her "...and denied an orgasm..." gen "Ten points to Gryffindor!" - $ gryffindor += 10 + $ states.env.gryffindor += 10 her "..." gen "What happened next?" @@ -3778,7 +3778,7 @@ label hg_vibrators_public_return: # End section if states.her.tier < 5: #Receiving points, doesn't unlock vibrators - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "{number=current_payout} points to Gryffindor." ("base", xpos="far_left", ypos="head") her @ cheeks blush "Thank you..." ("soft", "base", "base", "mid") her @ cheeks blush "..." ("normal", "narrow", "base", "down") diff --git a/game/scripts/characters/hermione/events/jobs_NOT_IN_USE.txt b/game/scripts/characters/hermione/events/jobs_NOT_IN_USE.txt index 88bee17a..7bec4951 100644 --- a/game/scripts/characters/hermione/events/jobs_NOT_IN_USE.txt +++ b/game/scripts/characters/hermione/events/jobs_NOT_IN_USE.txt @@ -55,7 +55,7 @@ label barmaid_responses: her "Thank you, [name_genie_hermione]." - $ gryffindor+= 20 + $ states.env.gryffindor+= 20 $ states.env.gold += payment call her_walk(action="leave") @@ -196,7 +196,7 @@ label gryffindor_cheer_responses: her "Thank you, [name_genie_hermione]." ("base", "happyCl", "base", "mid") nar "You receive [payment] gold coins." - $ gryffindor+= 20 + $ states.env.gryffindor+= 20 $ states.env.gold += payment call her_walk(action="leave") @@ -338,7 +338,7 @@ label slytherin_cheer_responses: her "Thank you, [name_genie_hermione]." ("base", "narrow", "base", "mid_soft") nar "You receive [payment] gold coins." - $ gryffindor+= 30 + $ states.env.gryffindor+= 30 $ states.env.gold += payment label end_her_working_no_payment: diff --git a/game/scripts/characters/hermione/events/odd_jobs/maid.rpy b/game/scripts/characters/hermione/events/odd_jobs/maid.rpy index cea9929c..06fed0e6 100644 --- a/game/scripts/characters/hermione/events/odd_jobs/maid.rpy +++ b/game/scripts/characters/hermione/events/odd_jobs/maid.rpy @@ -27,7 +27,7 @@ label her_maid_job: her "I suppose I could..." ("normal", "squint", "base", "R") gen "Great!" ("base", xpos="far_left", ypos="head") gen "Return here in the evening to drop off your payment and tell me how it went." ("base", xpos="far_left", ypos="head") - if not is_in_lead(gryffindor): + if not is_in_lead(states.env.gryffindor): her "Alright..." ("open", "base", "base", "mid") her "Let me just put this on..." ("angry", "squint", "base", "mid") else: #Gryffindor is in the lead @@ -60,7 +60,7 @@ label her_maid_job: gen "No, I think it'd be best if I held on to it for now." ("base", xpos="far_left", ypos="head") her "Right..." ("open", "base", "base", "mid") gen "Return here in the evening to drop off your payment and tell me how it went." ("base", xpos="far_left", ypos="head") - if not is_in_lead(gryffindor): + if not is_in_lead(states.env.gryffindor): her "Alright..." ("open", "squint", "base", "R") her "Let me just put this on..." ("angry", "squint", "base", "mid") else: #Gryffindor is in the lead @@ -93,7 +93,7 @@ label her_maid_job: if states.her.level >= 16: her @ cheeks blush "Let me just put this on..." ("angry", "base", "base", "mid") else: - if not is_in_lead(gryffindor): + if not is_in_lead(states.env.gryffindor): her @ cheeks blush "Let me just put this on..." ("angry", "base", "base", "mid") else: #Gryffindor in the lead her "Oh, you want me to do it now?" ("open", "squint", "base", "mid") @@ -120,7 +120,7 @@ label her_maid_job: gen "Put this on for me will you?" ("base", xpos="far_left", ypos="head") if states.her.level < 4: - if not is_in_lead(gryffindor): + if not is_in_lead(states.env.gryffindor): her "*Hmph!*..." ("upset", "base", "annoyed", "mid", xpos="right", ypos="base") else: her "No, thank you, [name_genie_hermione]." ("open", "squint", "base", "mid", xpos="right", ypos="base") @@ -135,7 +135,7 @@ label her_maid_job: $ _event.cancel() jump hermione_favor_menu.odd_jobs elif states.her.level < 16: - if not is_in_lead(gryffindor): + if not is_in_lead(states.env.gryffindor): her "Alright..." ("angry", "base", "base", "mid", xpos="right", ypos="base") else: her "We're in the lead right now... There's no need for me to earn any points at the moment." ("grin", "base", "base", "mid", xpos="right", ypos="base") @@ -179,7 +179,7 @@ label her_maid_job_return: python: progress_factor = math.log(states.her.tier + states.cho.tier + states.ton.tier + states.lun.tier + states.env.day) - payment = int(progress_factor * random_gold) + payment = int(progress_factor * states.env.random.randint(8, 40)) $ hermione.equip(her_outfit_maid) @@ -310,7 +310,7 @@ label her_maid_job_return: her "Here's the payment." ("open", "base", "base", "mid") nar "You receive {number=payment} gold coins." - $ gryffindor+= 10 + $ states.env.gryffindor+= 10 $ states.env.gold += payment call her_walk(action="leave") diff --git a/game/scripts/characters/hermione/events/odd_jobs/panty_thief.rpy b/game/scripts/characters/hermione/events/odd_jobs/panty_thief.rpy index 6caad79e..e4cea8a2 100644 --- a/game/scripts/characters/hermione/events/odd_jobs/panty_thief.rpy +++ b/game/scripts/characters/hermione/events/odd_jobs/panty_thief.rpy @@ -545,7 +545,7 @@ label hg_pr_panty_thief_e1_return: if not states.her.ev.panty_thief.soaked or states.her.tier < 4: gen "Yes, yes..." ("base", xpos="far_left", ypos="head") - $ gryffindor +=15 + $ states.env.gryffindor +=15 gen "Fifteen points to Gryffindor, [name_hermione_genie]... Well deserved." ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]..." ("soft", "base", "base", "R") gen "You can go now." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/hermione/events/odd_jobs/promoter.rpy b/game/scripts/characters/hermione/events/odd_jobs/promoter.rpy index e4a12531..6a26d796 100644 --- a/game/scripts/characters/hermione/events/odd_jobs/promoter.rpy +++ b/game/scripts/characters/hermione/events/odd_jobs/promoter.rpy @@ -104,7 +104,7 @@ label her_promoter_job_return: call give_reward("You have received twenty gold", "interface/icons/gold.webp") $ states.env.gold += 20 gen "Well done [name_hermione_genie], fifteen points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 15 + $ states.env.gryffindor += 15 random: block: @@ -133,7 +133,7 @@ label her_promoter_job_return: call give_reward("You have received twenty gold", "interface/icons/gold.webp") $ states.env.gold += 20 gen "Well done [name_hermione_genie], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 block: her "" @@ -174,7 +174,7 @@ label her_promoter_job_return: call give_reward("You have received twenty gold", "interface/icons/gold.webp") $ states.env.gold += 20 gen "Well done [name_hermione_genie], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 block: her "" @@ -211,7 +211,7 @@ label her_promoter_job_return: call give_reward("You have received twenty gold", "interface/icons/gold.webp") $ states.env.gold += 20 gen "Well done [name_hermione_genie], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 block: $ hermione.set_cum(hair="light") @@ -242,7 +242,7 @@ label her_promoter_job_return: call give_reward("You have received twenty gold", "interface/icons/gold.webp") $ states.env.gold += 20 gen "Well done [name_hermione_genie], twenty-five points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 25 + $ states.env.gryffindor += 25 her "Good night, [name_genie_hermione]." call her_walk(action="leave") diff --git a/game/scripts/characters/hermione/events/potions/ass_expand.rpy b/game/scripts/characters/hermione/events/potions/ass_expand.rpy index f1fdadc0..1bcac4d9 100644 --- a/game/scripts/characters/hermione/events/potions/ass_expand.rpy +++ b/game/scripts/characters/hermione/events/potions/ass_expand.rpy @@ -195,7 +195,7 @@ label her_potion_ass_give: gen "Alright fine... You don't have to go to class for today..." ("base", xpos="far_left", ypos="head") gen "{number=current_payout} points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout her @ cheeks blush "Thank you..." ("angry", "happyCl", "base", "mid") call her_walk(action="leave") @@ -236,7 +236,7 @@ label her_potion_ass_give: gen "Very well [name_hermione_genie]..." ("base", xpos="far_left", ypos="head") gen "{number=current_payout} points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout her @ cheeks blush "Thank you..." ("angry", "closed", "base", "mid") gen "Until next time." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/hermione/events/potions/breast_expand.rpy b/game/scripts/characters/hermione/events/potions/breast_expand.rpy index d5948cf2..0f114e09 100644 --- a/game/scripts/characters/hermione/events/potions/breast_expand.rpy +++ b/game/scripts/characters/hermione/events/potions/breast_expand.rpy @@ -187,7 +187,7 @@ label her_potion_breasts_give: gen "Certainly." ("base", xpos="far_left", ypos="head") gen "{number=current_payout} points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout her "Thank you, [name_genie_hermione], I'll head to class then." ("open", "squint", "base", "mid") else: #19+ @@ -214,7 +214,7 @@ label her_potion_breasts_give: gen "Since you drank it, I suppose you've earned your points." ("base", xpos="far_left", ypos="head") gen "{number=current_payout} points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout her "Thank you, [name_genie_hermione]..." ("open", "base", "base", "mid") #annoyed #blush call her_walk("door") diff --git a/game/scripts/characters/hermione/events/potions/polyjuice_cat.rpy b/game/scripts/characters/hermione/events/potions/polyjuice_cat.rpy index f1e18ffb..534de0c4 100644 --- a/game/scripts/characters/hermione/events/potions/polyjuice_cat.rpy +++ b/game/scripts/characters/hermione/events/potions/polyjuice_cat.rpy @@ -116,7 +116,7 @@ label her_potion_cat_give: her "Oh, okay then." ("soft", "happy", "base", "mid") gen "Twenty points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "Thank you [name_genie_hermione]." ("base", "base", "base", "mid") else: her "Here we go again I suppose..." ("angry", "narrow", "base", "down") @@ -129,7 +129,7 @@ label her_potion_cat_give: gen "I'm sure ten extra points should make it worth it, [name_hermione_genie]." ("base", xpos="far_left", ypos="head") gen "Thirty points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 30 + $ states.env.gryffindor += 30 her "... Thank you [name_genie_hermione]." ("open", "squint", "base", "mid") else: #When she'd enjoy showing herself off as a cat in class @@ -140,7 +140,7 @@ label her_potion_cat_give: gen "Oh, before I forget." ("base", xpos="far_left", ypos="head") gen "Twenty points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "Thank you [name_genie_hermione]." ("open", "squint", "base", "mid") call her_walk(action="leave") @@ -640,7 +640,7 @@ label her_potion_cat_return: gen "Well, you've certainly earned your points." ("base", xpos="far_left", ypos="head") gen "Forty points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 40 + $ states.env.gryffindor += 40 her "Thank you [name_genie_hermione]... Will that be all?" ("base", "happy", "base", "mid", xpos="mid", ypos="base", trans=dissolve) gen "Yes, that will do for today..." ("base", xpos="far_left", ypos="head") her "Okay, Goodnight then..." ("soft", "base", "base", "mid") diff --git a/game/scripts/characters/hermione/events/potions/polyjuice_luna.rpy b/game/scripts/characters/hermione/events/potions/polyjuice_luna.rpy index 50fc73aa..667aaa8e 100644 --- a/game/scripts/characters/hermione/events/potions/polyjuice_luna.rpy +++ b/game/scripts/characters/hermione/events/potions/polyjuice_luna.rpy @@ -561,7 +561,7 @@ label her_potion_luna_give: hide screen blkfade with d5 - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "{number=current_payout} points to Gryffindor!" ("base", xpos="far_left", ypos="head") lun "Thank you, [name_genie_hermione]..." ("open", "closed", "base", "mid", trans=dissolve) diff --git a/game/scripts/characters/hermione/events/requests/flash_your_tits.rpy b/game/scripts/characters/hermione/events/requests/flash_your_tits.rpy index 9bcae561..bc975410 100644 --- a/game/scripts/characters/hermione/events/requests/flash_your_tits.rpy +++ b/game/scripts/characters/hermione/events/requests/flash_your_tits.rpy @@ -118,7 +118,7 @@ label hg_pr_flash_fail: jump too_much_public label end_hg_pr_flash: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." diff --git a/game/scripts/characters/hermione/events/requests/flirt_with_students.rpy b/game/scripts/characters/hermione/events/requests/flirt_with_students.rpy index afaea36a..59486725 100644 --- a/game/scripts/characters/hermione/events/requests/flirt_with_students.rpy +++ b/game/scripts/characters/hermione/events/requests/flirt_with_students.rpy @@ -88,7 +88,7 @@ label end_hg_pr_flirt: $ states.her.ev.flirt_with_students.done_before = True - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." diff --git a/game/scripts/characters/hermione/events/requests/flirt_with_teachers.rpy b/game/scripts/characters/hermione/events/requests/flirt_with_teachers.rpy index f4afee2c..f56633a5 100644 --- a/game/scripts/characters/hermione/events/requests/flirt_with_teachers.rpy +++ b/game/scripts/characters/hermione/events/requests/flirt_with_teachers.rpy @@ -54,7 +54,7 @@ label hg_pr_flirt_teacher: # End Event label end_hg_pr_flirt_teacher: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." diff --git a/game/scripts/characters/hermione/events/requests/give_a_blowjob.rpy b/game/scripts/characters/hermione/events/requests/give_a_blowjob.rpy index d599c272..f9b295f7 100644 --- a/game/scripts/characters/hermione/events/requests/give_a_blowjob.rpy +++ b/game/scripts/characters/hermione/events/requests/give_a_blowjob.rpy @@ -115,7 +115,7 @@ label hg_pr_blowjob_fail: jump too_much_public label end_hg_pr_blowjob: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." diff --git a/game/scripts/characters/hermione/events/requests/give_a_handjob.rpy b/game/scripts/characters/hermione/events/requests/give_a_handjob.rpy index c2768a8c..08492d5f 100644 --- a/game/scripts/characters/hermione/events/requests/give_a_handjob.rpy +++ b/game/scripts/characters/hermione/events/requests/give_a_handjob.rpy @@ -122,7 +122,7 @@ label hg_pr_handjob_fail: jump too_much_public label end_hg_pr_handjob: - $ gryffindor += current_payout #55 + $ states.env.gryffindor += current_payout #55 gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." diff --git a/game/scripts/characters/hermione/events/requests/have_sex.rpy b/game/scripts/characters/hermione/events/requests/have_sex.rpy index 476803f2..4e7db06b 100644 --- a/game/scripts/characters/hermione/events/requests/have_sex.rpy +++ b/game/scripts/characters/hermione/events/requests/have_sex.rpy @@ -80,7 +80,7 @@ label hg_pr_sex_fail: jump too_much_public label end_hg_pr_sex: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "Gryffindor gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." diff --git a/game/scripts/characters/hermione/events/requests/kiss_a_girl.rpy b/game/scripts/characters/hermione/events/requests/kiss_a_girl.rpy index d8becaac..d71b1175 100644 --- a/game/scripts/characters/hermione/events/requests/kiss_a_girl.rpy +++ b/game/scripts/characters/hermione/events/requests/kiss_a_girl.rpy @@ -93,7 +93,7 @@ label hg_pr_kiss_fail: jump too_much_public label end_hg_pr_kiss: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." diff --git a/game/scripts/characters/hermione/events/requests/let_them_grope_you.rpy b/game/scripts/characters/hermione/events/requests/let_them_grope_you.rpy index 618686c6..f2e4c7a5 100644 --- a/game/scripts/characters/hermione/events/requests/let_them_grope_you.rpy +++ b/game/scripts/characters/hermione/events/requests/let_them_grope_you.rpy @@ -112,7 +112,7 @@ label hg_pr_grope_fail: jump too_much_public label end_hg_pr_grope: - $ gryffindor += current_payout + $ states.env.gryffindor += current_payout gen "The Gryffindor house gets {number=current_payout} points!" ("base", xpos="far_left", ypos="head") her "Thank you, [name_genie_hermione]." diff --git a/game/scripts/characters/hermione/events/requests/wear_my_cum.rpy b/game/scripts/characters/hermione/events/requests/wear_my_cum.rpy index cebfb7e7..c82fb20a 100644 --- a/game/scripts/characters/hermione/events/requests/wear_my_cum.rpy +++ b/game/scripts/characters/hermione/events/requests/wear_my_cum.rpy @@ -872,7 +872,7 @@ label hg_pr_cumslut_T5_top: if _events_filtered_completed_all: menu: "\"Fifty points to Gryffindor!\"": - $ gryffindor += 50 + $ states.env.gryffindor += 50 her "Thank you [name_genie_hermione]..." ("open", "base", "base", "mid") jump hg_pr_cumslut_T5_top.end @@ -910,7 +910,7 @@ label hg_pr_cumslut_T5_top: gen "Now, I never expected that, especially from you, [name_hermione_genie]!" ("grin", xpos="far_left", ypos="head") her @ cheeks blush "That's not--{w=0.2} I just don't like being put in a spot where I am forced to--" ("angry", "squint", "worried", "mid") gen "Very cunning of you, [name_hermione_genie]...{w=0.4} Fifty points to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 50 + $ states.env.gryffindor += 50 her @ cheeks blush "...{w=0.4} Thank you [name_genie_hermione]." ("disgust", "squint", "base", "mid") label .end: @@ -964,7 +964,7 @@ label hg_pr_cumslut_T5_clothes: if _events_filtered_completed_all: menu: "\"Fifty points to Gryffindor!\"": - $ gryffindor += 50 + $ states.env.gryffindor += 50 her "Thank you [name_genie_hermione]..." ("open", "narrow", "base", "down") jump hg_pr_cumslut_T5_clothes.end @@ -1004,7 +1004,7 @@ label hg_pr_cumslut_T5_clothes: gen "Like a bloodhound, tracking down its pray..." ("base", xpos="far_left", ypos="head") her @ cheeks blush "..." ("angry", "closed", "annoyed", "mid") gen "Well then, I better award you your points before we get off track...{w=0.4} Fifty points to Gryffindor!" ("base", xpos="far_left", ypos="head") - $ gryffindor += 50 + $ states.env.gryffindor += 50 her "Thank you [name_genie_hermione]..." ("open", "narrow", "base", "down") label .end: @@ -1043,7 +1043,7 @@ label hg_pr_cumslut_T5_hair: if _events_filtered_completed_all: menu: "\"Fifty points to Gryffindor!\"": - $ gryffindor += 50 + $ states.env.gryffindor += 50 her "Thank you [name_genie_hermione]..." ("open", "narrow", "angry", "down") jump hg_pr_cumslut_T5_hair.end @@ -1130,7 +1130,7 @@ label hg_pr_cumslut_T6_crotch: if _events_filtered_completed_all: menu: "\"Fifty points to Gryffindor!\"": - $ gryffindor += 50 + $ states.env.gryffindor += 50 her "Thank you [name_genie_hermione]..." ("open", "narrow", "base", "down") jump hg_pr_cumslut_T6_crotch.end @@ -1178,7 +1178,7 @@ label hg_pr_cumslut_T6_crotch: her @ cheeks blush "..." ("base", "narrow", "worried", "R") gen "So, how many points did we decide on? Forty was it?" ("base", xpos="far_left", ypos="head") her @ cheeks blush "I...{w=0.4} Yes, I think so..." ("open", "base", "base", "mid") - $ gryffindor += 40 + $ states.env.gryffindor += 40 gen "In that case...{w=0.4} Forty points to Gryffindor." ("base", xpos="far_left", ypos="head") her "...{w=0.4} Thank you, [name_genie_hermione]." ("base", "base", "base", "mid") @@ -1228,7 +1228,7 @@ label hg_pr_cumslut_T6_top: if _events_filtered_completed_all: menu: "\"Fifty points to Gryffindor!\"": - $ gryffindor += 50 + $ states.env.gryffindor += 50 her "Thank you [name_genie_hermione]..." ("open", "narrow", "base", "down") jump hg_pr_cumslut_T6_top.end @@ -1279,7 +1279,7 @@ label hg_pr_cumslut_T6_top: her @ cheeks blush "No, she definitely knew! I could tell she was sniffing me while standing behind me, as I was reading!" ("grin", "happyCl", "worried", "mid") gen "I knew it...{w=0.4} My manly musk is irresistible to any woman!" ("base", xpos="far_left", ypos="head") her @ cheeks blush "..." ("grin", "narrow", "worried", "down") #Nervous smile - $ gryffindor += 50 + $ states.env.gryffindor += 50 gen "Very well [name_hermione_genie], I shall award you the points...{w=0.4} Fifty points to Gryffindor!" ("base", xpos="far_left", ypos="head") her "*Phew*... Thank you, [name_genie_hermione]..." ("base", "base", "base", "mid") @@ -1321,7 +1321,7 @@ label hg_pr_cumslut_T6_face: gen "Well then... You may leave now." ("base", xpos="far_left", ypos="head") her @ tears mascara "Did I complete my task?" ("open", "narrow", "annoyed", "mid") gen "You did... Fifty points to Gryffindor!" ("base", xpos="far_left", ypos="head") - $ gryffindor += 50 + $ states.env.gryffindor += 50 her @ tears mascara "I'm glad..." ("annoyed", "closed", "base", "mid") jump hg_pr_cumslut_T6_face.end @@ -1349,7 +1349,7 @@ label hg_pr_cumslut_T6_face: gen "That's not what I was---" ("base", xpos="far_left", ypos="head") her @ tears mascara "......" ("annoyed", "closed", "worried", "mid") gen "Ahem..." ("base", xpos="far_left", ypos="head") - $ gryffindor += 50 + $ states.env.gryffindor += 50 gen "Very well [name_hermione_genie], I shall award you the points...{w=0.4} Fifty points to Gryffindor!" ("base", xpos="far_left", ypos="head") her @ tears mascara "Thank you, [name_genie_hermione]..." ("open", "closed", "worried", "mid") @@ -1392,7 +1392,7 @@ label hg_pr_cumslut_T6_hair: if _events_filtered_completed_all: menu: "\"Fifty points to Gryffindor!\"": - $ gryffindor += 50 + $ states.env.gryffindor += 50 her "Thank you [name_genie_hermione]..." ("open", "narrow", "base", "down") jump hg_pr_cumslut_T6_hair.end diff --git a/game/scripts/characters/hermione/summon.rpy b/game/scripts/characters/hermione/summon.rpy index 5178b403..6705a4d7 100644 --- a/game/scripts/characters/hermione/summon.rpy +++ b/game/scripts/characters/hermione/summon.rpy @@ -147,7 +147,7 @@ label hermione_level_up(tier=None): label hermione_favor_menu: - if not is_in_lead(gryffindor): + if not is_in_lead(states.env.gryffindor): label .skip_points_check: diff --git a/game/scripts/characters/luna/events/favors/masturbate_for_me.rpy b/game/scripts/characters/luna/events/favors/masturbate_for_me.rpy index ab0cebc6..db3fd771 100644 --- a/game/scripts/characters/luna/events/favors/masturbate_for_me.rpy +++ b/game/scripts/characters/luna/events/favors/masturbate_for_me.rpy @@ -353,7 +353,7 @@ label ll_pf_masturbate_T3_E2_intro: gen "Your body is reacting to--" ("base", xpos="far_left", ypos="head") gen "I mean, yes! That makes perfect sense... Your body does tell you when you're hungry, so why wouldn't it try and help you get rid of those spurts too." ("grin", xpos="far_left", ypos="head") gen "Ten points to Ravenclaw." ("base", xpos="far_left", ypos="head") - $ ravenclaw += 10 + $ states.env.ravenclaw += 10 lun @ cheeks blush "Thank you [name_genie_luna]." ("grin", "closed", "base", "mid") gen "Very well then, let's give your body what it needs... Take your bottoms off--" ("base", xpos="far_left", ypos="head") lun @ cheeks blush "..." ("base", "narrow", "base", "mid") #Horny diff --git a/game/scripts/characters/luna/events/favors/talk_to_me.rpy b/game/scripts/characters/luna/events/favors/talk_to_me.rpy index 7ff47ed1..2ad89b02 100644 --- a/game/scripts/characters/luna/events/favors/talk_to_me.rpy +++ b/game/scripts/characters/luna/events/favors/talk_to_me.rpy @@ -256,7 +256,7 @@ label ll_pf_talk_T1_E2_intro: gen "*Ah*...{w=0.4} The what?" ("base", xpos="far_left", ypos="head") lun "The Patronus... You focus on a Happy memory and if you succeed, a corporeal shape of your spirit animal bursts out from your wand!" ("grin", "base", "base", "mid") gen "*Ah*...{w=0.3} Yes, that's it...{w=0.3} Ten points to Ravenclaw!" ("base", xpos="far_left", ypos="head") - $ ravenclaw += 10 + $ states.env.ravenclaw += 10 lun "Thank you, [name_genie_luna]!" ("base", "happyCl", "base", "mid") gen "Now, be quiet and stand there for a bit, will you?" ("base", xpos="far_left", ypos="head") lun "Yes [name_genie_luna]." ("base", "base", "base", "mid") diff --git a/game/scripts/characters/snape/events/hangouts.rpy b/game/scripts/characters/snape/events/hangouts.rpy index a0ff1d1a..6bf0d43e 100644 --- a/game/scripts/characters/snape/events/hangouts.rpy +++ b/game/scripts/characters/snape/events/hangouts.rpy @@ -84,7 +84,7 @@ label snape_hangout: if states.sna.level > 100: $ states.sna.level = 100 - $ slytherin += renpy.random.randint(5, 15) + $ states.env.slytherin += renpy.random.randint(5, 15) label end_snape_hangout_no_points: diff --git a/game/scripts/characters/tonks/events/clothing.rpy b/game/scripts/characters/tonks/events/clothing.rpy index 01195318..fd8b41d3 100644 --- a/game/scripts/characters/tonks/events/clothing.rpy +++ b/game/scripts/characters/tonks/events/clothing.rpy @@ -124,7 +124,7 @@ label tonks_summon_setup: ton @ cheeks heavy_blush hair horny "My house? I was in Hufflepuff, but why--" ("disgust", "base", "raised", "mid") gen "Very well then..." ("base", xpos="far_left", ypos="head") gen "Minus ten points from Hufflepuff!" ("base", xpos="far_left", ypos="head") - $ hufflepuff -=10 + $ states.env.hufflepuff -=10 ton @ cheeks heavy_blush hair upset "What? But [name_genie_tonks]! I'm not even a student--" ("disgust", "base", "base", "mid", trans=hpunch) gen "Also--" ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/tonks/events/clothing_old.txt b/game/scripts/characters/tonks/events/clothing_old.txt index c2bb3952..8c765b6b 100644 --- a/game/scripts/characters/tonks/events/clothing_old.txt +++ b/game/scripts/characters/tonks/events/clothing_old.txt @@ -138,7 +138,7 @@ label tonks_summon_setup: ton "Me? I was in Hufflepuff." ("open", "base", "raised", "mid") gen "Very well then." ("base", xpos="far_left", ypos="head") gen "Minus ten points from Hufflepuff!" ("base", xpos="far_left", ypos="head") - $ hufflepuff -=10 + $ states.env.hufflepuff -=10 ton "What? But [ton_genie_name]! I'm not even a student--" ("open", "wide", "shocked", "mid", trans=hpunch) else: gen "Then that's another minus ten points from Hufflepuff!" ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/tonks/events/hangout.rpy b/game/scripts/characters/tonks/events/hangout.rpy index 4d4ac94b..4463fb03 100644 --- a/game/scripts/characters/tonks/events/hangout.rpy +++ b/game/scripts/characters/tonks/events/hangout.rpy @@ -75,7 +75,7 @@ label tonks_hangout: if states.ton.level > 100: $ states.ton.level = 100 - $ hufflepuff += renpy.random.randint(5, 15) + $ states.env.hufflepuff += renpy.random.randint(5, 15) $ tonks.wear("all") $ chair_OBJ.hidden = False diff --git a/game/scripts/characters/tonks/events/requests/detention_with_tonks.rpy b/game/scripts/characters/tonks/events/requests/detention_with_tonks.rpy index 678253c4..5dcc1510 100644 --- a/game/scripts/characters/tonks/events/requests/detention_with_tonks.rpy +++ b/game/scripts/characters/tonks/events/requests/detention_with_tonks.rpy @@ -50,7 +50,7 @@ label nt_pr_teach_start: ton "And how many points am I allowed to give out?" ("soft", "base", "base", "L") gen "Look, I'm not really convinced these points are real..." ("base", xpos="far_left", ypos="head") gen "I just say \"Ten points to Gryffindor!\" And these girls do whatever I want for some reason..." ("base", xpos="far_left", ypos="head") - $ gryffindor += 10 + $ states.env.gryffindor += 10 gen "So as far as I'm concerned, hand out as many as you want." ("base", xpos="far_left", ypos="head") ton "All right... Well, I better get to class." ("base", "base", "base", "R") ton @ hair neutral "I've got some boys to \"teach\"..." ("horny", "narrow", "raised", "mid") @@ -105,7 +105,7 @@ label nt_pr_teach_T1_E1: #Tier 1 - Event 1 - Slytherin boy ton "Gave him a couple of points for his house." ("open", "base", "base", "R") gen "Well done, [name_tonks_genie]... We'll talk next time." ("base", xpos="far_left", ypos="head") ton "Yes, [name_genie_tonks]. Have a good night." ("base", "base", "base", "mid") - $ slytherin += 20 + $ states.env.slytherin += 20 if states.ton.public_level < 4: # Points til 4. $ states.ton.public_level += 1 @@ -157,7 +157,7 @@ label nt_pr_teach_T1_E1: #Tier 1 - Event 1 - Slytherin boy # Tonks leaves - $ slytherin += 20 + $ states.env.slytherin += 20 if states.ton.public_level < 4: # Points til 4. $ states.ton.public_level += 1 @@ -180,7 +180,7 @@ label nt_pr_teach_T1_E2: # Tier 1 - Event 2 - Racenclaw boy gen "Well done, [name_tonks_genie]... We'll talk next time." ("base", xpos="far_left", ypos="head") ton "Yes, [name_genie_tonks]. Have a good night." ("base", "base", "base", "mid") - $ ravenclaw += 10 + $ states.env.ravenclaw += 10 if states.ton.public_level < 4: # Points til 4. $ states.ton.public_level += 1 @@ -225,7 +225,7 @@ label nt_pr_teach_T1_E2: # Tier 1 - Event 2 - Racenclaw boy # Tonks leaves - $ ravenclaw += 10 + $ states.env.ravenclaw += 10 if states.ton.public_level < 4: # Points til 4. $ states.ton.public_level += 1 @@ -294,7 +294,7 @@ label nt_pr_teach_T1_E3: # Tier 1 - Event 3 - Two Gryffindor boys. Guess who... # Tonks leaves - $ gryffindor += 20 + $ states.env.gryffindor += 20 if states.ton.public_level < 4: # Points til 4. $ states.ton.public_level += 1 @@ -318,7 +318,7 @@ label nt_pr_teach_T1_E4: # Tier 1 - Event 4 - Slytherin girl gen "Well done, [name_tonks_genie]..." ("base", xpos="far_left", ypos="head") ton "Yes, [name_genie_tonks]. Good night." ("silly", "happyCl", "base", "mid") - $ slytherin += 20 + $ states.env.slytherin += 20 if states.ton.public_level < 4: # Points til 4. $ states.ton.public_level += 1 @@ -389,7 +389,7 @@ label nt_pr_teach_T1_E4: # Tier 1 - Event 4 - Slytherin girl # Tonks leaves - $ slytherin += 20 + $ states.env.slytherin += 20 if states.ton.public_level < 4: # Points til 4. $ states.ton.public_level += 1 @@ -415,7 +415,7 @@ label nt_pr_teach_T2_E1: # Tier 2 - Event 1 - Hufflepuff girl gen "Very good, [name_tonks_genie]..." ("base", xpos="far_left", ypos="head") ton "Thank you, [name_genie_tonks]. Until next time..." ("base", "base", "base", "mid") - $ hufflepuff += 40 + $ states.env.hufflepuff += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -484,7 +484,7 @@ label nt_pr_teach_T2_E1: # Tier 2 - Event 1 - Hufflepuff girl # Tonks leaves - $ hufflepuff += 40 + $ states.env.hufflepuff += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -512,7 +512,7 @@ label nt_pr_teach_T2_E2: # Tier 2 - Event 2 - Ravenclaw boy gen "I bet he earned quite a lot today. Well done, [name_tonks_genie]..." ("base", xpos="far_left", ypos="head") ton "That he did, [name_genie_tonks]... See you next time..." ("base", "base", "base", "mid") - $ ravenclaw += 20 + $ states.env.ravenclaw += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -595,7 +595,7 @@ label nt_pr_teach_T2_E2: # Tier 2 - Event 2 - Ravenclaw boy # Tonks leaves - $ ravenclaw += 20 + $ states.env.ravenclaw += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -623,7 +623,7 @@ label nt_pr_teach_T2_E3: # Tier 2 - Event 3 - Slytherin boy gen "Very good, [name_tonks_genie]..." ("base", xpos="far_left", ypos="head") ton "*Mhmm*... Until next time, [name_genie_tonks]..." ("base", "happyCl", "base", "mid") - $ slytherin += 20 + $ states.env.slytherin += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -674,7 +674,7 @@ label nt_pr_teach_T2_E3: # Tier 2 - Event 3 - Slytherin boy call bld gen "(This bitch might be crazier than I thought...)" ("base", xpos="far_left", ypos="head") - $ slytherin += 20 + $ states.env.slytherin += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -698,7 +698,7 @@ label nt_pr_teach_T2_E4: # Tier 2 - Event 4 - Slytherin girl gen "Good work, [name_tonks_genie]..." ("base", xpos="far_left", ypos="head") ton "Thank you... Have a good night, [name_genie_tonks]..." ("base", "base", "base", "mid") - $ slytherin += 20 + $ states.env.slytherin += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -746,7 +746,7 @@ label nt_pr_teach_T2_E4: # Tier 2 - Event 4 - Slytherin girl # Tonks leaves - $ slytherin += 20 + $ states.env.slytherin += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 diff --git a/game/scripts/characters/tonks/events/requests/hands-on_lessons.rpy b/game/scripts/characters/tonks/events/requests/hands-on_lessons.rpy index c3fd6ccb..643d11a0 100644 --- a/game/scripts/characters/tonks/events/requests/hands-on_lessons.rpy +++ b/game/scripts/characters/tonks/events/requests/hands-on_lessons.rpy @@ -86,7 +86,7 @@ label nt_pr_grope_T2_E1: # Tier 1 - Event 1 - Slytherin boy gen "Well done, [name_tonks_genie]... We'll talk next time." ("base", xpos="far_left", ypos="head") ton "Yes, [name_genie_tonks]. Have a good night." ("base", "base", "base", "mid") - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -139,7 +139,7 @@ label nt_pr_grope_T2_E1: # Tier 1 - Event 1 - Slytherin boy # Tonks leaves - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -163,7 +163,7 @@ label nt_pr_grope_T2_E2: # Tier 1 - Event 2 - Ravenclaw boy gen "Well done, [name_tonks_genie]... We'll talk next time." ("base", xpos="far_left", ypos="head") ton "Yes, [name_genie_tonks]. Have a good night." ("base", "base", "base", "mid") - $ ravenclaw += 20 + $ states.env.ravenclaw += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -226,7 +226,7 @@ label nt_pr_grope_T2_E2: # Tier 1 - Event 2 - Ravenclaw boy # Tonks leaves - $ ravenclaw += 20 + $ states.env.ravenclaw += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -314,7 +314,7 @@ label nt_pr_grope_T2_E4: # Tier 1 - Event 4 - Slytherin girl gen "You will have better luck next time, [name_tonks_genie]..." ("base", xpos="far_left", ypos="head") ton "I hope so too, [name_genie_tonks]... Have a good night." ("base", "base", "worried", "mid") - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -366,7 +366,7 @@ label nt_pr_grope_T2_E4: # Tier 1 - Event 4 - Slytherin girl # Tonks leaves - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 diff --git a/game/scripts/characters/tonks/events/requests/oral_practice.rpy b/game/scripts/characters/tonks/events/requests/oral_practice.rpy index 0c793539..9d702d39 100644 --- a/game/scripts/characters/tonks/events/requests/oral_practice.rpy +++ b/game/scripts/characters/tonks/events/requests/oral_practice.rpy @@ -87,7 +87,7 @@ label nt_pr_kiss_T2_intro_E1: # Tier 1 - Event 1 - Slytherin boy gen "Well done, [name_tonks_genie]... We'll talk next time." ("base", xpos="far_left", ypos="head") ton "Have a good night, [name_genie_tonks]." ("base", "happyCl", "base", "mid") - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -138,7 +138,7 @@ label nt_pr_kiss_T2_intro_E1: # Tier 1 - Event 1 - Slytherin boy # Tonks leaves. - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -163,7 +163,7 @@ label nt_pr_kiss_T2_E2: # Tier 1 - Event 2 - Ravenclaw boy gen "Very good, [name_tonks_genie]." ("base", xpos="far_left", ypos="head") ton "Thank you, [name_genie_tonks]. Have a good night." ("base", "base", "base", "mid") - $ ravenclaw += 20 + $ states.env.ravenclaw += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -213,7 +213,7 @@ label nt_pr_kiss_T2_E2: # Tier 1 - Event 2 - Ravenclaw boy # Tonks leaves. - $ ravenclaw += 20 + $ states.env.ravenclaw += 20 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -240,7 +240,7 @@ label nt_pr_kiss_T2_E3: # Tier 1 - Event 3 - Slytherin girls ton "You have no idea, [name_genie_tonks]!" ("base", "base", "angry", "mid") ton "I better get going. Until next time!" ("base", "happyCl", "base", "mid") - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -286,7 +286,7 @@ label nt_pr_kiss_T2_E3: # Tier 1 - Event 3 - Slytherin girls # Tonks leaves. - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -312,7 +312,7 @@ label nt_pr_kiss_T2_E4: #Level 1 Event 4 gen "Very good, [name_tonks_genie]." ("base", xpos="far_left", ypos="head") ton "Thank you, [name_genie_tonks]. Have a good night." ("base", "base", "base", "mid") - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 @@ -364,7 +364,7 @@ label nt_pr_kiss_T2_E4: #Level 1 Event 4 # Tonks leaves. - $ slytherin += 40 + $ states.env.slytherin += 40 if states.ton.public_level < 9: # Points til 9. $ states.ton.public_level += 1 diff --git a/game/scripts/events/DayNight.rpy b/game/scripts/events/DayNight.rpy index 9032fecd..18cad9f1 100644 --- a/game/scripts/events/DayNight.rpy +++ b/game/scripts/events/DayNight.rpy @@ -86,9 +86,6 @@ label day_start: cupboard_OBJ.foreground = Transform(Text(str((states.env.day % 30) + 1), color="#fff", outlines=[(1, "#000", 0, 0)]), pos=(40, 100)) - # Randomisers - random_gold = renpy.random.randint(8, 40) - # Send salary every 7th day if states.env.day % 7 == 0: if states.paperwork_reports >= 1: @@ -100,6 +97,8 @@ label day_start: mailbox.tick() eventqueue.tick() + house_points_daily() + # Update map locations call set_all_map_locations @@ -114,6 +113,7 @@ label day_start: call update_genie call room(states.room, stop_sound=False, hide_screens=False) + call update_ui_points # Equip scheduled outfits if states.lun.wardrobe_scheduling: @@ -134,9 +134,6 @@ label day_start: hide screen blktone with dissolve - # Points gains - call points_changes - call update_ui_points $ renpy.force_autosave(True) @@ -194,9 +191,6 @@ label night_start: states.env.weather = "random" states.env.daytime = False - # Randomisers - random_gold = renpy.random.randint(8, 40) - # Update map locations call set_all_map_locations diff --git a/game/scripts/events/labels.rpy b/game/scripts/events/labels.rpy index 9e740fd7..1cdf69c0 100644 --- a/game/scripts/events/labels.rpy +++ b/game/scripts/events/labels.rpy @@ -89,16 +89,16 @@ label increase_house_points(house, points): call bld call notes if house.startswith("g"): - $ gryffindor += points + $ states.env.gryffindor += points nar "Gryffindor has received {number=points} house points today!" elif house.startswith("h"): - $ hufflepuff += points + $ states.env.hufflepuff += points nar "Hufflepuff has received {number=points} house points today!" elif house.startswith("r"): - $ ravenclaw += points + $ states.env.ravenclaw += points nar "Ravenclaw has received {number=points} house points today!" else: - $ slytherin += points + $ states.env.slytherin += points nar "Slytherin has received {number=points} house points today!" return diff --git a/game/scripts/interface/cheats.rpy b/game/scripts/interface/cheats.rpy index 01856a23..ff02ae13 100644 --- a/game/scripts/interface/cheats.rpy +++ b/game/scripts/interface/cheats.rpy @@ -213,42 +213,39 @@ label cheats: "-House Points-": menu .points: "-Add 200 Slytherin Points-" (icon="interface/icons/small/slyt.webp"): - $ slytherin = clamp(slytherin+200, 1, 999999) + $ states.env.slytherin += 200 call update_ui_points nar "Added 200 points to Slytherin!" "-Remove 200 Slytherin Points-" (icon="interface/icons/small/slyt.webp"): - $ slytherin = clamp(slytherin-200, 1, 999999) + $ states.env.slytherin -= 200 call update_ui_points nar "Removed 200 points from Slytherin!" "-Add 200 Gryffindor Points-" (icon="interface/icons/small/gryf.webp"): - $ gryffindor = clamp(gryffindor+200, 1, 999999) + $ states.env.gryffindor += 200 call update_ui_points nar "Added 200 points to Gryffindor!" "-Remove 200 Gryffindor Points-" (icon="interface/icons/small/gryf.webp"): - $ gryffindor = clamp(gryffindor-200, 1, 999999) + $ states.env.gryffindor -= 200 call update_ui_points nar "Removed 200 points from Gryffindor!" "-Add 200 Ravenclaw Points-" (icon="interface/icons/small/rave.webp"): - $ ravenclaw = clamp(ravenclaw+200, 1, 999999) + $ states.env.ravenclaw += 200 call update_ui_points nar "Added 200 points to Ravenclaw!" "-Remove 200 Ravenclaw Points-" (icon="interface/icons/small/rave.webp"): - $ ravenclaw = clamp(ravenclaw-200, 1, 999999) + $ states.env.ravenclaw -= 200 call update_ui_points nar "Removed 200 points from Ravenclaw!" "-Add 200 Hufflepuff Points-" (icon="interface/icons/small/huff.webp"): - $ hufflepuff = clamp(hufflepuff+200, 1, 999999) + $ states.env.hufflepuff += 200 call update_ui_points nar "Added 200 points to Hufflepuff!" "-Remove 200 Hufflepuff Points-" (icon="interface/icons/small/huff.webp"): - $ hufflepuff = clamp(hufflepuff-200, 1, 999999) + $ states.env.hufflepuff -= 200 call update_ui_points nar "Removed 200 points from Hufflepuff!" "-Reset all points-": - $ slytherin = 1 - $ gryffindor = 1 - $ ravenclaw = 1 - $ hufflepuff = 1 + $ states.env.slytherin = states.env.gryffindor = states.env.ravenclaw = states.env.hufflepuff = 0 call update_ui_points nar "House points reset!" "-Back-": @@ -465,10 +462,10 @@ label .hermione_skip_intro: $ states.paperwork_unlocked = True # Simulate points gains - $ slytherin = gryffindor - $ gryffindor = int(slytherin*0.5) - $ hufflepuff = int(gryffindor*1.1) - $ ravenclaw = int(gryffindor*1.3) + $ states.env.slytherin = 122 + $ states.env.gryffindor = int(states.env.slytherin*0.5) + $ states.env.hufflepuff = int(states.env.gryffindor*1.1) + $ states.env.ravenclaw = int(states.env.gryffindor*1.3) return diff --git a/game/scripts/interface/house_points.rpy b/game/scripts/interface/house_points.rpy index d0524020..c41eb460 100644 --- a/game/scripts/interface/house_points.rpy +++ b/game/scripts/interface/house_points.rpy @@ -1,43 +1,44 @@ ### House-Points ### -label points_changes: # Gets called every day/night. - - python hide: +init python: + def house_points_daily(): progress_factor = max(1, int(math.log(states.env.day) * 5)) # Bonuses based on Tonks and Snape friendship stat - # Tonks' is lower since you can do events with her directly to increase points. - bonus_g = states.her.tier # Passive bonus - bonus_h = int((states.ton.level/100.0) * (progress_factor*0.7)) - bonus_s = int((states.sna.level/100.0) * progress_factor*0.7) - bonus_r = states.cho.tier + states.lun.tier # Passive bonus + bonus_g = states.her.tier + bonus_h = int((states.ton.level / 100.0) * (progress_factor * 0.7)) + bonus_s = int((states.sna.level / 100.0) * (progress_factor * 0.7)) + bonus_r = states.cho.tier + states.lun.tier - leader = max(hufflepuff, ravenclaw, slytherin, gryffindor) + house_points = { + "gryffindor": states.env.gryffindor, + "hufflepuff": states.env.hufflepuff, + "ravenclaw": states.env.ravenclaw, + "slytherin": states.env.slytherin + } - difference_factor_g = min(leader, round((progress_factor + bonus_g) * max(hufflepuff, ravenclaw, slytherin)/float(gryffindor))) - difference_factor_h = min(leader, round((progress_factor + bonus_h) * max(gryffindor, ravenclaw, slytherin)/float(hufflepuff))) - difference_factor_r = min(leader, round((progress_factor + bonus_r) * max(gryffindor, hufflepuff, slytherin)/float(ravenclaw))) - difference_factor_s = min(leader, round((progress_factor + bonus_s) * max(hufflepuff, ravenclaw, gryffindor)/float(slytherin))) + leader = max(house_points.values()) - renpy.dynamic( - points_g = renpy.random.randint(difference_factor_g//2, difference_factor_g), - points_h = renpy.random.randint(difference_factor_h//2, difference_factor_h), - points_r = renpy.random.randint(difference_factor_r//2, difference_factor_r), - points_s = renpy.random.randint(difference_factor_s//2, difference_factor_s), - ) + factors = { + "gryffindor": (bonus_g, max(house_points["hufflepuff"], house_points["ravenclaw"], house_points["slytherin"])), + "hufflepuff": (bonus_h, max(house_points["gryffindor"], house_points["ravenclaw"], house_points["slytherin"])), + "ravenclaw": (bonus_r, max(house_points["gryffindor"], house_points["hufflepuff"], house_points["slytherin"])), + "slytherin": (bonus_s, max(house_points["gryffindor"], house_points["hufflepuff"], house_points["ravenclaw"])) + } - store.gryffindor += points_g - store.hufflepuff += points_h - store.ravenclaw += points_r - store.slytherin += points_s + points = { + house: min(leader, round((progress_factor + bonus) * max_points / house_points[house])) + for house, (bonus, max_points) in factors.items() + } - hide screen points_changes - show screen points_changes(points_g, points_s, points_r, points_h) - return + for house, point in points.items(): + points[house] = renpy.random.randint(point // 2, point) + house_points[house] -screen points_changes(gryffindor=None, slytherin=None, ravenclaw=None, hufflepuff=None, prefix="+", direction="up"): - tag points_changes - zorder 35 + states.env.set_points(points) + +screen house_points(gryffindor=None, slytherin=None, ravenclaw=None, hufflepuff=None, prefix="+", direction="up"): + tag house_points + layer "interface" hbox: spacing 15 @@ -62,10 +63,10 @@ screen points_changes(gryffindor=None, slytherin=None, ravenclaw=None, hufflepuf if gryffindor: text "[prefix][gryffindor]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#A74D2A" if slytherin: - text "+[prefix][slytherin]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#3A734B" + text "[prefix][slytherin]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#3A734B" if ravenclaw: text "[prefix][ravenclaw]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#5974C2" if hufflepuff: text "[prefix][hufflepuff]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#FBC60A" - timer 4.0 action Hide("points_changes") + timer 4.0 action Hide("house_points") diff --git a/game/scripts/interface/inventory.rpy b/game/scripts/interface/inventory.rpy index 25714c9c..e73df048 100644 --- a/game/scripts/interface/inventory.rpy +++ b/game/scripts/interface/inventory.rpy @@ -159,7 +159,7 @@ label inventory_menu(xx=150, yy=90): gen "(I should wait for her to calm down first.)" ("base", xpos="far_left", ypos="head") hide screen blktone with d3 - elif states.active_girl == "hermione" and not states.her.favors_convinced_stage == 2 and is_in_lead(gryffindor): + elif states.active_girl == "hermione" and not states.her.favors_convinced_stage == 2 and is_in_lead(states.env.gryffindor): show screen blktone with d3 @@ -198,7 +198,7 @@ label inventory_menu(xx=150, yy=90): gen "(I should wait for her to calm down first.)" ("base", xpos="far_left", ypos="head") hide screen blktone with d3 - elif states.active_girl == "hermione" and not states.her.favors_convinced_stage == 2 and is_in_lead(gryffindor): + elif states.active_girl == "hermione" and not states.her.favors_convinced_stage == 2 and is_in_lead(states.env.gryffindor): show screen blktone with d3 diff --git a/game/scripts/interface/topbar.rpy b/game/scripts/interface/topbar.rpy index f58463e9..7680ee79 100644 --- a/game/scripts/interface/topbar.rpy +++ b/game/scripts/interface/topbar.rpy @@ -10,18 +10,18 @@ label update_ui_points: #If points variable value exceedes one thousand make it a decimal number instead and round to x.x #Remember, "slytherin_points" is a string! If you need points integer use i.e. "slytherin" variable instead. - $ slytherin_points = text_points(slytherin) - $ gryffindor_points = text_points(gryffindor) - $ ravenclaw_points = text_points(ravenclaw) - $ hufflepuff_points = text_points(hufflepuff) + $ slytherin_points = text_points(states.env.slytherin) + $ gryffindor_points = text_points(states.env.gryffindor) + $ ravenclaw_points = text_points(states.env.ravenclaw) + $ hufflepuff_points = text_points(states.env.hufflepuff) #Check who's in the lead - $ housepoints_sorted = sorted((slytherin, gryffindor, ravenclaw, hufflepuff), reverse=True) + $ housepoints_sorted = sorted((states.env.slytherin, states.env.gryffindor, states.env.ravenclaw, states.env.hufflepuff), reverse=True) - $ slytherin_place = housepoints_sorted.index(slytherin)+1 - $ gryffindor_place = housepoints_sorted.index(gryffindor)+1 - $ ravenclaw_place = housepoints_sorted.index(ravenclaw)+1 - $ hufflepuff_place = housepoints_sorted.index(hufflepuff)+1 + $ slytherin_place = housepoints_sorted.index(states.env.slytherin)+1 + $ gryffindor_place = housepoints_sorted.index(states.env.gryffindor)+1 + $ ravenclaw_place = housepoints_sorted.index(states.env.ravenclaw)+1 + $ hufflepuff_place = housepoints_sorted.index(states.env.hufflepuff)+1 # Set banners yanchor depending on the placement (ascending) $ housepoints_y = [None, 0.0, 0.25, 0.5, 0.75] diff --git a/game/scripts/inventory/potions/addictive_potion.txt b/game/scripts/inventory/potions/addictive_potion.txt index 550d59a7..481e4336 100644 --- a/game/scripts/inventory/potions/addictive_potion.txt +++ b/game/scripts/inventory/potions/addictive_potion.txt @@ -399,7 +399,7 @@ label hg_pp_cumaddict_intro: if her_whoring <= 17: #When she still cares about points (Defined at the start) gen "Thirty points to Gryffindor..." ("base", xpos="far_left", ypos="head") - $ gryffindor += 30 + $ states.env.gryffindor += 30 hide hermione_main hide screen ctc diff --git a/game/scripts/inventory/potions/clothing_potion.txt b/game/scripts/inventory/potions/clothing_potion.txt index ab88f4af..9159dd77 100644 --- a/game/scripts/inventory/potions/clothing_potion.txt +++ b/game/scripts/inventory/potions/clothing_potion.txt @@ -39,7 +39,7 @@ label potion_scene_4: #Transparent uniform her "Can I go now?" gen "Yes you may. Twenty points to Gryffindor" ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "Thank you [genie_name]." ("open", "closed", "base", "mid") diff --git a/game/scripts/inventory/potions/expanding_potion.txt b/game/scripts/inventory/potions/expanding_potion.txt index 5039d483..597e4060 100644 --- a/game/scripts/inventory/potions/expanding_potion.txt +++ b/game/scripts/inventory/potions/expanding_potion.txt @@ -338,7 +338,7 @@ label potion_scene_2_2: show screen bld1 her "Yes [genie_name]." ("base", "narrow", "worried", "down") gen "Oh I almost forgot, twenty points to Gryffindor!" ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "Oh... right, the points. Thank you." ("grin", "narrow", "base", "dead") call nar(">Hermione picks up her skirt and attempts to put it on. Her ass is so huge that it barely covers half of it.") her "..." ("open", "narrow", "worried", "down") @@ -410,7 +410,7 @@ label potion_scene_2_2: gen "I'm sure no one will be able to tell with your skirt on. Now hurry up, I feel like a nap." ("base", xpos="far_left", ypos="head") #her "Yes [genie_name]." ("angry", "squint", "base", "mid",cheeks="blush") gen "Oh I almost forgot, twenty points to Gryffindor!" ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "Oh... right, the points. Thank you." ("grin", "narrow", "annoyed", "up") call nar(">Hermione picks up her skirt and attempts to put it on. Her ass is so huge that it barely covers half of it.") diff --git a/game/scripts/inventory/potions/milking_potion.txt b/game/scripts/inventory/potions/milking_potion.txt index e83c4b8e..60649b44 100644 --- a/game/scripts/inventory/potions/milking_potion.txt +++ b/game/scripts/inventory/potions/milking_potion.txt @@ -243,7 +243,7 @@ label potion_scene_11_1: her "Honestly, [genie_name], I'm shocked that you would even suggest something so completely ridiculous." ("normal", "squint", "angry", "mid") her "I think I better get going..." ("annoyed", "narrow", "angry", "R") gen "Well, twenty points to gryffindor" ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "Thanks..." ("annoyed", "squint", "base", "mid") call her_walk(action="leave") @@ -469,7 +469,7 @@ label potion_scene_11_2: gen "Oh yes, quite right. One hundred points to gryffindor!" ("base", xpos="far_left", ypos="head") - $ gryffindor += 100 + $ states.env.gryffindor += 100 her "Thank you sir..." ("open", "squint", "base", "mid") her "(Although I still have to head to class with these huge things...)" ("annoyed", "narrow", "angry", "R") @@ -800,7 +800,7 @@ label potion_scene_11_3: her "..." ("open_wide_tongue", "narrow", "annoyed", "up") call nar(">Hermione stands before you, unable to speak.") gen "Oh um... twenty points to gryffindor!" ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "..." ("open_wide_tongue", "narrow", "annoyed", "up") gen "And I'll be needing this back." ("base", xpos="far_left", ypos="head") her "..." ("open_wide_tongue", "narrow", "annoyed", "up") @@ -1018,7 +1018,7 @@ label potion_scene_11_3: her "{size=-6}t-turn it...{/size}" ("angry", "squint", "base", "mid",cheeks="blush") her "{size=-4}t-turn it... up...{/size}" ("angry", "narrow", "base", "dead",cheeks="blush",tears="crying") gen "I think you've had enough... twenty points to gryffindor!" ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 her "..." ("angry", "squint", "base", "mid",cheeks="blush") call nar(">And I'll be needing this back.") @@ -1100,7 +1100,7 @@ label potion_scene_11_1_2: gen "how much?" ("base", xpos="far_left", ypos="head") her "Thirty points." ("annoyed", "base", "angry", "mid") gen "Fine, thirty points to gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 30 + $ states.env.gryffindor += 30 her "*hmph*" ("annoyed", "narrow", "annoyed", "mid") her "So when are these \"things\" going to go away? Or do I have to go get one of the nurses to shrink them?" ("angry", "narrow", "annoyed", "mid", emote="angry") gen "They should go back to normal Sometime tonight." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/inventory/potions/polyjuice_potion.txt b/game/scripts/inventory/potions/polyjuice_potion.txt index 6ead375b..367c194a 100644 --- a/game/scripts/inventory/potions/polyjuice_potion.txt +++ b/game/scripts/inventory/potions/polyjuice_potion.txt @@ -84,7 +84,7 @@ label potion_scene_1_1_1: gen "I'm sure another extra ten points should make it worth it, [hermione_name], thirty points to Gryffindor." ("base", xpos="far_left", ypos="head") her "Thank you [genie_name]." ("base", "base", "base", "mid") call nar(">Hermione heads off to class.") - $ gryffindor += 30 + $ states.env.gryffindor += 30 else: her "Now will you at least tell me what this potion does?" ("angry", "base", "base", "mid",tears="soft") gen "It should be noticeable any second now..." ("base", xpos="far_left", ypos="head") @@ -96,7 +96,7 @@ label potion_scene_1_1_1: gen "Yes, [hermione_name], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head") her "Thank you [genie_name]." ("base", "base", "base", "mid") call nar(">Hermione heads off to class.") - $ gryffindor += 20 + $ states.env.gryffindor += 20 call her_walk(action="leave") @@ -249,7 +249,7 @@ label potion_scene_1_1_2: her "Mmmmm, it might be this potion but that tasted good..." ("base", "narrow", "base", "mid_soft") hide hermione_main gen "Well, you certainly earned your seventy-five points." ("base", xpos="far_left", ypos="head") - $ gryffindor += 75 + $ states.env.gryffindor += 75 with d3 her "Thank you [genie_name]. Will that be all?" ("base", "narrow", "base", "up") gen "One last thing." ("base", xpos="far_left", ypos="head") @@ -485,7 +485,7 @@ label potion_scene_1_1_2_alt: hide hermione_main with d3 gen "Well, you certainly earned your seventy-five points." ("base", xpos="far_left", ypos="head") - $ gryffindor += 75 + $ states.env.gryffindor += 75 her "Thank you [genie_name]. Will that be all." ("base", "narrow", "base", "up") gen "One last thing." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/minigames/cardgame/_hermione_card_game_.rpy b/game/scripts/minigames/cardgame/_hermione_card_game_.rpy index e1a99629..f6c76d64 100644 --- a/game/scripts/minigames/cardgame/_hermione_card_game_.rpy +++ b/game/scripts/minigames/cardgame/_hermione_card_game_.rpy @@ -294,7 +294,7 @@ label hermione_random_duel: her "..." ("disgust", "narrow", "worried", "down") her "Fine, that's fair..." ("open", "narrow", "base", "down") her @ cheeks blush "But I'm done playing for today..." ("normal", "happyCl", "worried", "mid") - $ gryffindor -= 20 + $ states.env.gryffindor -= 20 call her_walk(action="leave") jump end_hermione_event @@ -323,7 +323,7 @@ label her_duel_lost: her "*Hah*! Told you I could do it!" her "I'll take those points now." gen "Fine, twenty to Gryffindor." ("base", xpos="far_left", ypos="head") - $ gryffindor += 20 + $ states.env.gryffindor += 20 menu: "-Rematch-": diff --git a/game/scripts/utility/common_functions.rpy b/game/scripts/utility/common_functions.rpy index cfd0e91b..57c02c83 100644 --- a/game/scripts/utility/common_functions.rpy +++ b/game/scripts/utility/common_functions.rpy @@ -164,9 +164,9 @@ init python early: def is_in_lead(house): if isinstance(house, str): - house = getattr(renpy.store, house) + house = getattr(states.env, house) - return (house == max(gryffindor, slytherin, ravenclaw, hufflepuff)) + return (house == max(states.env.gryffindor, states.env.slytherin, states.env.ravenclaw, states.env.hufflepuff)) def play_potion_return(who): if states.env.daytime: diff --git a/game/scripts/variables.rpy b/game/scripts/variables.rpy index f3c8d9a9..80190c71 100644 --- a/game/scripts/variables.rpy +++ b/game/scripts/variables.rpy @@ -95,20 +95,23 @@ init python: self._weather = Weather.set_weather(value) # House Points - def set_points(self, house, value): - old_value = self._points[house] - if value < old_value: - prefix = "-" - direction = "down" - else: - prefix = "+" - direction = "up" - - self._points[house] = min(max(1, value), 99999) + def set_points(self, d): + difference = {} + for house, value in d.items(): + old_value = self._points[house] + if (adjusted := value - old_value) < 0: + prefix = "-" + direction = "down" + else: + prefix = "+" + direction = "up" + value = min(max(1, value), 99999) + self._points[house] = value + difference[house] = adjusted if not renpy.in_rollback() and not _in_replay: - renpy.hide_screen("points_changes") - renpy.show_screen("points_changes", prefix=prefix, direction=direction, **{house: (value-old_value)}) + renpy.hide_screen("house_points") + renpy.show_screen("house_points", prefix=prefix, direction=direction, **difference) @property def gryffindor(self): @@ -116,7 +119,7 @@ init python: @gryffindor.setter def gryffindor(self, value): - self.set_points("gryffindor", value) + self.set_points({"gryffindor": value}) @property def slytherin(self): @@ -124,7 +127,7 @@ init python: @slytherin.setter def slytherin(self, value): - self.set_points("slytherin", value) + self.set_points({"slytherin": value}) @property def ravenclaw(self): @@ -132,7 +135,7 @@ init python: @ravenclaw.setter def ravenclaw(self, value): - self.set_points("ravenclaw", value) + self.set_points({"ravenclaw": value}) @property def hufflepuff(self): @@ -140,7 +143,7 @@ init python: @hufflepuff.setter def hufflepuff(self, value): - self.set_points("hufflepuff", value) + self.set_points({"hufflepuff": value}) # Randomisation @property