diff --git a/game/scripts/characters/hermione/events/favors/dance_for_me_snape.rpy b/game/scripts/characters/hermione/events/favors/dance_for_me_snape.rpy index 3c7078b3..94d0fa36 100644 --- a/game/scripts/characters/hermione/events/favors/dance_for_me_snape.rpy +++ b/game/scripts/characters/hermione/events/favors/dance_for_me_snape.rpy @@ -274,7 +274,7 @@ label hg_pf_strip_T4_snape: her @ cheeks blush "......" ("annoyed", "narrow", "worried", "down") sna "............." ("snape_13") - "-Unleash your rage {size=-2}(Hardcore){/size}-" if game.difficulty >= 3: #Hardcore difficulty dialogue. + "-Unleash your rage {size=-2}(Hardcore){/size}-" if states.env.difficulty >= 3: #Hardcore difficulty dialogue. $ states.her.mood += 18 gen "Both of you..." ("base", xpos="far_left", ypos="head") stop music diff --git a/game/scripts/characters/snape/events/hangouts.rpy b/game/scripts/characters/snape/events/hangouts.rpy index 3f75a27c..fe13d2a8 100644 --- a/game/scripts/characters/snape/events/hangouts.rpy +++ b/game/scripts/characters/snape/events/hangouts.rpy @@ -74,9 +74,9 @@ label snape_hangout: # Rain puts him in a good mood. $ states.sna.level += 1 - if game.difficulty == 1: + if states.env.difficulty == 1: $ states.sna.level += 5 - elif game.difficulty == 2: + elif states.env.difficulty == 2: $ states.sna.level += 4 else: $ states.sna.level += 3 diff --git a/game/scripts/characters/tonks/events/hangout.rpy b/game/scripts/characters/tonks/events/hangout.rpy index f1b57084..4d4ac94b 100644 --- a/game/scripts/characters/tonks/events/hangout.rpy +++ b/game/scripts/characters/tonks/events/hangout.rpy @@ -65,9 +65,9 @@ label tonks_hangout: if states.fireplace_started: # Tonks is feeling hot. $ states.ton.level += 2 - if game.difficulty < 2: #Easy difficulty + if states.env.difficulty < 2: #Easy difficulty $ states.ton.level += 5 - elif game.difficulty == 2: #Normal + elif states.env.difficulty == 2: #Normal $ states.ton.level += 4 else: #Hardcore $ states.ton.level += 3 diff --git a/game/scripts/events/DayNight.rpy b/game/scripts/events/DayNight.rpy index 5fa3c5fc..20473741 100644 --- a/game/scripts/events/DayNight.rpy +++ b/game/scripts/events/DayNight.rpy @@ -65,11 +65,11 @@ label day_start: states.sus.busy = bool(sb_summon_pause) # Improve Mood - if game.difficulty == 1: # Easy difficulty + if states.env.difficulty == 1: # Easy difficulty val = 3 - elif game.difficulty == 2: # Normal difficulty + elif states.env.difficulty == 2: # Normal difficulty val = 2 - elif game.difficulty == 3: # Hardcore difficulty + elif states.env.difficulty == 3: # Hardcore difficulty val = 1 states.ton.mood = max(states.ton.mood-val, 0) diff --git a/game/scripts/events/Start.rpy b/game/scripts/events/Start.rpy index b5b4c397..3915a8aa 100644 --- a/game/scripts/events/Start.rpy +++ b/game/scripts/events/Start.rpy @@ -11,13 +11,13 @@ label start_wt: menu: "Difficulty" "How difficult do you want the game to be?" "-Easy-{size=-8}\nIncreased gold, item drop rate and Slytherin-points gains.\nMood will improve faster.\nCheats are available.{/size}": - $ game.difficulty = 1 + $ states.env.difficulty = 1 $ game.cheats = True "-Normal-{size=-8}\nBalanced gold, item drop rate and Slytherin-points gains.\nMood will improve normally.\nCheats are available.{/size}": - $ game.difficulty = 2 + $ states.env.difficulty = 2 $ game.cheats = True "-Hardcore-{size=-8}\nReduced gold, item drop rate and Slytherin-points gains.\nMood will not improve over time.\nNo cheats.{/size}": - $ game.difficulty = 3 + $ states.env.difficulty = 3 $ game.cheats = False if persistent.game_complete: diff --git a/game/scripts/interface/letter.rpy b/game/scripts/interface/letter.rpy index 37734358..3242ff40 100644 --- a/game/scripts/interface/letter.rpy +++ b/game/scripts/interface/letter.rpy @@ -47,9 +47,9 @@ init python: reports_gold = states.paperwork_reports * (int(progress_factor * max(random_gold, progress_flat)) + progress_flat) - if game.difficulty <= 1: # Easy + if states.env.difficulty <= 1: # Easy reports_gold = int(reports_gold * 1.2) - elif game.difficulty == 2: # Normal + elif states.env.difficulty == 2: # Normal pass else: # Hardcore reports_gold = int(reports_gold * 0.9) diff --git a/game/scripts/interface/topbar.rpy b/game/scripts/interface/topbar.rpy index 9e7b84bd..0c670c33 100644 --- a/game/scripts/interface/topbar.rpy +++ b/game/scripts/interface/topbar.rpy @@ -212,7 +212,7 @@ screen ui_menu(): ypos 15 textbutton "Save" action ShowMenu("save") background None xalign 0.5 text_outlines [ (2, "#00000080", 1, 0) ] textbutton "Load" action ShowMenu("load") background None xalign 0.5 text_outlines [ (2, "#00000080", 1, 0) ] - if game.cheats and game.difficulty <= 2 and game.day > 1: + if game.cheats and states.env.difficulty <= 2 and game.day > 1: textbutton "Cheats" action [SetScreenVariable("toggle_menu", False), Jump("cheats")] background None xalign 0.5 text_outlines [ (2, "#00000080", 1, 0) ] if game.day > 1 and renpy.android: textbutton "Preferences" action ShowMenu("preferences") background None xalign 0.5 text_outlines [ (2, "#00000080", 1, 0) ] diff --git a/game/scripts/minigames/dueling/snape_duel.rpy b/game/scripts/minigames/dueling/snape_duel.rpy index 10e26480..e4fd7549 100644 --- a/game/scripts/minigames/dueling/snape_duel.rpy +++ b/game/scripts/minigames/dueling/snape_duel.rpy @@ -235,10 +235,10 @@ label genie_attack: if pentogram: hide screen duel_damage - if game.difficulty <= 1: #Easy + if states.env.difficulty <= 1: #Easy show screen duel_damage(500) $ snape_hp -= 500 - elif game.difficulty == 2: #Normal + elif states.env.difficulty == 2: #Normal show screen duel_damage(500) $ snape_hp -= 500 else: #Hardcore @@ -246,10 +246,10 @@ label genie_attack: $ snape_hp -= 500 else: hide screen duel_damage - if game.difficulty <= 1: #Easy + if states.env.difficulty <= 1: #Easy show screen duel_damage(300) $ snape_hp -= 300 - elif game.difficulty == 2: #Normal + elif states.env.difficulty == 2: #Normal show screen duel_damage(200) $ snape_hp -= 200 else: #Hardcore @@ -287,9 +287,9 @@ label snapes_turn: $ duel_OBJ.snape = "" hide screen duel_damage - if game.difficulty <= 1: #Easy + if states.env.difficulty <= 1: #Easy show screen duel_damage(0, False) - elif game.difficulty == 2: #Normal + elif states.env.difficulty == 2: #Normal show screen duel_damage(100, False) $ genie_hp -= 100 else: #Hardcore #Shouldn't increase the penalty if you blocked correctly... @@ -314,10 +314,10 @@ label snapes_turn: $ duel_OBJ.snape = "" hide screen duel_damage - if game.difficulty <= 1: #Easy + if states.env.difficulty <= 1: #Easy show screen duel_damage(300, False) $ genie_hp -= 300 - elif game.difficulty == 2: #Normal + elif states.env.difficulty == 2: #Normal show screen duel_damage(400, False) $ genie_hp -= 400 else: #Hardcore @@ -393,10 +393,10 @@ label snape_attack: $ duel_OBJ.snape = "" hide screen duel_damage - if game.difficulty <= 1: #Easy + if states.env.difficulty <= 1: #Easy show screen duel_damage(100, False) $ genie_hp -= 100 - elif game.difficulty == 2: #Normal + elif states.env.difficulty == 2: #Normal show screen duel_damage(100, False) $ genie_hp -= 100 else: #Hardcore diff --git a/game/scripts/minigames/puzzle.rpy b/game/scripts/minigames/puzzle.rpy index a2376c47..a727735f 100644 --- a/game/scripts/minigames/puzzle.rpy +++ b/game/scripts/minigames/puzzle.rpy @@ -39,7 +39,7 @@ screen puzzle_minigame(): zorder 30 default tries = 0 - default tiles = generate_puzzle(grid=4, difficulty=game.difficulty, blank=15) + default tiles = generate_puzzle(grid=4, difficulty=states.env.difficulty, blank=15) default hint = False $ score = 0 diff --git a/game/scripts/rooms/main_room/objects/cupboard.rpy b/game/scripts/rooms/main_room/objects/cupboard.rpy index 3c968672..1012e320 100644 --- a/game/scripts/rooms/main_room/objects/cupboard.rpy +++ b/game/scripts/rooms/main_room/objects/cupboard.rpy @@ -112,7 +112,7 @@ init python: elif wine_ITEM.owned < 1: return wine_ITEM - if game.difficulty == 1: + if states.env.difficulty == 1: # Easy # Soft diminishing returns, more rubber banding. Guaranteed item drop. if game.gold < int(170 * math.log(game.day)) and random_percent <= 56 - dr: @@ -122,7 +122,7 @@ init python: random_item = renpy.random.choice(filtered_list or drop_list) return random_item - elif game.difficulty == 2: + elif states.env.difficulty == 2: # Normal # Fair diminishing returns, soft rubber banding. High chance for item drop. (Recommended) if game.gold < int(120 * math.log(game.day)) and random_percent <= 38 - dr: @@ -143,7 +143,7 @@ init python: else: return "nothing" - elif game.difficulty == 3: + elif states.env.difficulty == 3: # Hard # Harsh diminishing returns, no rubber banding. Chance for item drop. if game.gold < int(90 * math.log(game.day)) and random_percent <= 33 - dr: diff --git a/game/scripts/script.rpy b/game/scripts/script.rpy index d872c553..739bb5a7 100644 --- a/game/scripts/script.rpy +++ b/game/scripts/script.rpy @@ -11,7 +11,7 @@ label start: label start_quick: python: version = version_float() - game.difficulty = 2 + states.env.difficulty = 2 states.ton.level = 5 states.sna.level = 5 states.map.unlocked = True @@ -27,7 +27,7 @@ label start_quick: label start_dev: python: version = version_float() - game.difficulty = 2 + states.env.difficulty = 2 game.cheats = True game.gold = 100000 states.map.unlocked = True diff --git a/game/scripts/wardrobe/functions.rpy b/game/scripts/wardrobe/functions.rpy index ea972f46..ce2d2871 100644 --- a/game/scripts/wardrobe/functions.rpy +++ b/game/scripts/wardrobe/functions.rpy @@ -154,7 +154,7 @@ init -1 python: word_list = {"tonks": "friendship", "astoria": "affection", "susan": "confidence", "luna": "corruption", "cho": "recklessness", "hermione": "whoring"} word = word_list.get(states.active_girl, "whoring") - if game.cheats or game.difficulty <= 2: + if game.cheats or states.env.difficulty <= 2: renpy.show_screen("blktone") renpy.with_statement(d3) renpy.say(None, "{size=+6}> Try again at "+word+" level {color=#7a0000}"+str(value)+"{/color}.{/size}")