diff --git a/game/scripts/characters/cho/events/favors/inspect_her_body_tier2.rpy b/game/scripts/characters/cho/events/favors/inspect_her_body_tier2.rpy index 87783d57..07968512 100644 --- a/game/scripts/characters/cho/events/favors/inspect_her_body_tier2.rpy +++ b/game/scripts/characters/cho/events/favors/inspect_her_body_tier2.rpy @@ -80,7 +80,7 @@ label cc_pf_strip_T2_intro_E1: $ cho.equip(cho_outfit_default) $ cho.set_pose("default") $ cho.animation = None - $ game.gold = 1984 + $ states.env.gold = 1984 $ game.day = 123 call room("main_room") diff --git a/game/scripts/characters/cho/events/favors/suck_it.rpy b/game/scripts/characters/cho/events/favors/suck_it.rpy index 94e75c15..fcae40b3 100644 --- a/game/scripts/characters/cho/events/favors/suck_it.rpy +++ b/game/scripts/characters/cho/events/favors/suck_it.rpy @@ -57,7 +57,7 @@ label cc_pf_blowjob_T3_intro_E1: $ cho.equip(cho_outfit_default) $ cho.set_pose("default") $ cho.animation = None - $ game.gold = 1984 + $ states.env.gold = 1984 $ game.day = 124 call room("main_room") diff --git a/game/scripts/characters/cho/events/intro.rpy b/game/scripts/characters/cho/events/intro.rpy index 414c5d76..f5f05eed 100644 --- a/game/scripts/characters/cho/events/intro.rpy +++ b/game/scripts/characters/cho/events/intro.rpy @@ -578,7 +578,7 @@ label ss_he_cho_E1: sna "That's barely worth it." ("snape_04") sna "How about two thousand gold?" ("snape_13") - if game.gold < 2000: + if states.env.gold < 2000: gen "I don't have that much gold." ("base", xpos="far_left", ypos="head") sna "Well, you have plenty of time to gather that amount." ("snape_22") else: diff --git a/game/scripts/characters/cho/events/quidditch/gryffindor_match.rpy b/game/scripts/characters/cho/events/quidditch/gryffindor_match.rpy index 5760d3b5..f42838e5 100644 --- a/game/scripts/characters/cho/events/quidditch/gryffindor_match.rpy +++ b/game/scripts/characters/cho/events/quidditch/gryffindor_match.rpy @@ -124,7 +124,7 @@ label gryffindor_match: show screen blkfade with d5 - $ game.gold = 1984 + $ states.env.gold = 1984 $ game.day = 665 $ states.env.daytime = True $ game.weather = "clear" @@ -586,7 +586,7 @@ label gryffindor_match: if _in_replay: $ cho.equip(cho_outfit_quidditch_gryffindor) - $ game.gold = 1984 + $ states.env.gold = 1984 $ game.day = 667 $ states.env.daytime = True $ game.weather = "clear" @@ -728,7 +728,7 @@ label gryffindor_match: with d5 $ cho.equip(cho_outfit_quidditch_gryffindor) - $ game.gold = 1984 + $ states.env.gold = 1984 $ game.day = 667 $ states.env.daytime = True $ game.weather = "clear" @@ -934,7 +934,7 @@ label gryffindor_match: $ cho.equip(cho_outfit_quidditch_gryffindor) $ cho.set_pose("broom") $ cho.animation = sprite_fly_idle - $ game.gold = 1984 + $ states.env.gold = 1984 $ game.day = 667 call room("quidditch_stands2") call quidditch_stands2(weather="sun_low", crowd=crowd_full) @@ -958,7 +958,7 @@ label gryffindor_match: $ cho.equip(cho_outfit_quidditch_gryffindor) $ cho.set_pose("broom") $ cho.animation = sprite_fly_idle - $ game.gold = 1984 + $ states.env.gold = 1984 $ game.day = 667 call room("quidditch_stands2") call quidditch_stands2(weather="sun_low", crowd=crowd_full) @@ -2150,7 +2150,7 @@ label gryffindor_match_return: call sna_walk(xpos="desk", speed=1.5) play sound "sounds/money_thud.ogg" - $ game.gold += 2000 + $ states.env.gold += 2000 sna "Here, now shut...{w=0.2} Up!" ("snape_17", xpos=200, ypos="base", trans=d3, flip=False) call sna_walk(action="leave", speed=1.5) diff --git a/game/scripts/characters/cho/events/quidditch/gryffindor_practice.rpy b/game/scripts/characters/cho/events/quidditch/gryffindor_practice.rpy index 4e679f81..15c3c27b 100644 --- a/game/scripts/characters/cho/events/quidditch/gryffindor_practice.rpy +++ b/game/scripts/characters/cho/events/quidditch/gryffindor_practice.rpy @@ -73,7 +73,7 @@ label cc_gt_return: gen "How expensive could a broom be--" ("base", xpos="far_left", ypos="head") # This will always display player gold + 1000, because why not. - $ _gold = game.gold + 4000 + $ _gold = states.env.gold + 4000 $ _gold = num_to_word(_gold) cho "[_gold]!" ("clench", "closed", "base", "mid") @@ -102,7 +102,7 @@ label cc_gt_return: with d5 $ cho.equip(cho_outfit_quidditch_gryffindor) - $ game.gold = 1984 + $ states.env.gold = 1984 $ game.day = 665 $ states.env.daytime = False $ game.weather = "clear" diff --git a/game/scripts/characters/cho/events/quidditch/intros.rpy b/game/scripts/characters/cho/events/quidditch/intros.rpy index 30829d08..31188a3d 100644 --- a/game/scripts/characters/cho/events/quidditch/intros.rpy +++ b/game/scripts/characters/cho/events/quidditch/intros.rpy @@ -1506,7 +1506,7 @@ label cho_quid_E12: $ hooch.equip(hoo_outfit_default) $ hooch.equip(hoo_accessory_broom_dildo) $ cho.equip(cho_outfit_quidditch_gryffindor) - $ game.gold = 1984 + $ states.env.gold = 1984 $ game.day = 666 $ states.env.daytime = True $ game.weather = "clear" diff --git a/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy b/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy index dedfd490..bc96956d 100644 --- a/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy +++ b/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy @@ -559,14 +559,14 @@ label slytherin_match: her "" ("open", "base", "angry", "up") sna "Well, some of us bet quite a fortune on the outcome." ("snape_09") - if game.gold >= 2000: + if states.env.gold >= 2000: gen "Fuck{w=0.3}, I forgot he was here..." ("angry", xpos="far_left", ypos="head") else: gen "Oh shit{w=0.3}, the bet..." ("angry", xpos="far_left", ypos="head") sna "You aren't going to chicken out now, are you?" ("snape_03") gen "No... of course not..." ("base", xpos="far_left", ypos="head") - if game.gold >= 2000: + if states.env.gold >= 2000: gen "(Why did I bet so much gold on this?!)" ("angry", xpos="far_left", ypos="head") else: gen "(How in the hell would I get two thousand gold?!)" ("angry", xpos="far_left", ypos="head") 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 6a449460..88bee17a 100644 --- a/game/scripts/characters/hermione/events/jobs_NOT_IN_USE.txt +++ b/game/scripts/characters/hermione/events/jobs_NOT_IN_USE.txt @@ -56,7 +56,7 @@ label barmaid_responses: her "Thank you, [name_genie_hermione]." $ gryffindor+= 20 - $ game.gold += payment + $ states.env.gold += payment call her_walk(action="leave") @@ -197,7 +197,7 @@ label gryffindor_cheer_responses: her "Thank you, [name_genie_hermione]." ("base", "happyCl", "base", "mid") nar "You receive [payment] gold coins." $ gryffindor+= 20 - $ game.gold += payment + $ states.env.gold += payment call her_walk(action="leave") @@ -339,7 +339,7 @@ label slytherin_cheer_responses: her "Thank you, [name_genie_hermione]." ("base", "narrow", "base", "mid_soft") nar "You receive [payment] gold coins." $ gryffindor+= 30 - $ game.gold += payment + $ 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 43196cdc..09477832 100644 --- a/game/scripts/characters/hermione/events/odd_jobs/maid.rpy +++ b/game/scripts/characters/hermione/events/odd_jobs/maid.rpy @@ -311,7 +311,7 @@ label her_maid_job_return: nar "You receive {number=payment} gold coins." $ gryffindor+= 10 - $ game.gold += payment + $ states.env.gold += payment call her_walk(action="leave") diff --git a/game/scripts/characters/hermione/events/odd_jobs/promoter.rpy b/game/scripts/characters/hermione/events/odd_jobs/promoter.rpy index f1061f9b..e4a12531 100644 --- a/game/scripts/characters/hermione/events/odd_jobs/promoter.rpy +++ b/game/scripts/characters/hermione/events/odd_jobs/promoter.rpy @@ -102,7 +102,7 @@ label her_promoter_job_return: her "Here's your payment." ("open", "base", "base", "mid") call give_reward("You have received twenty gold", "interface/icons/gold.webp") - $ game.gold += 20 + $ states.env.gold += 20 gen "Well done [name_hermione_genie], fifteen points to Gryffindor." ("base", xpos="far_left", ypos="head") $ gryffindor += 15 @@ -131,7 +131,7 @@ label her_promoter_job_return: her "Here's your payment." ("open", "base", "base", "mid") call give_reward("You have received twenty gold", "interface/icons/gold.webp") - $ game.gold += 20 + $ states.env.gold += 20 gen "Well done [name_hermione_genie], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head") $ gryffindor += 20 @@ -172,7 +172,7 @@ label her_promoter_job_return: her "Here's your payment." ("open", "base", "base", "mid") call give_reward("You have received twenty gold", "interface/icons/gold.webp") - $ game.gold += 20 + $ states.env.gold += 20 gen "Well done [name_hermione_genie], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head") $ gryffindor += 20 @@ -209,7 +209,7 @@ label her_promoter_job_return: her "Here's your payment." ("open", "base", "base", "mid") call give_reward("You have received twenty gold", "interface/icons/gold.webp") - $ game.gold += 20 + $ states.env.gold += 20 gen "Well done [name_hermione_genie], twenty points to Gryffindor." ("base", xpos="far_left", ypos="head") $ gryffindor += 20 @@ -240,7 +240,7 @@ label her_promoter_job_return: her "Here's your payment." ("open", "base", "base", "mid") call give_reward("You have received twenty gold", "interface/icons/gold.webp") - $ game.gold += 20 + $ states.env.gold += 20 gen "Well done [name_hermione_genie], twenty-five points to Gryffindor." ("base", xpos="far_left", ypos="head") $ gryffindor += 25 diff --git a/game/scripts/characters/tonks/clothing_upgrades_NOT_IN_USE.txt b/game/scripts/characters/tonks/clothing_upgrades_NOT_IN_USE.txt index 98ca7d93..1880126d 100644 --- a/game/scripts/characters/tonks/clothing_upgrades_NOT_IN_USE.txt +++ b/game/scripts/characters/tonks/clothing_upgrades_NOT_IN_USE.txt @@ -115,11 +115,11 @@ label upgrades_menu(xx=150, yy=90): if __choice[1] != current_subcategory: $ current_subcategory = __choice[1] elif __choice[0] == "buy": - if game.gold >= __choice[1] and ton_friendship >= __choice[3]*25: + if states.env.gold >= __choice[1] and ton_friendship >= __choice[3]*25: python: renpy.play('sounds/money.ogg') - game.gold -= __choice[1] + states.env.gold -= __choice[1] _list = __choice[2] _iter = __choice[3] @@ -217,7 +217,7 @@ screen upgrades_menuitem(xx, yy): spacing 5 pos (18, 70) add "interface/icons/small/gold.webp" - text str(game.gold) size 15 ypos 4 + text str(states.env.gold) size 15 ypos 4 add "interface/icons/small/tonks.webp" text str(ton_friendship) size 15 ypos 4 @@ -254,7 +254,7 @@ screen upgrades_menuitem(xx, yy): xysize (95, 130) xpos 10 if x < len(i): - add Flatten(i[x].get_image()) align (1.0, 1.0) zoom 0.125 alpha (1.0 if ((game.gold >= actual_price and ton_friendship >= favor_req) or i[x].unlocked) else 0.5) + add Flatten(i[x].get_image()) align (1.0, 1.0) zoom 0.125 alpha (1.0 if ((states.env.gold >= actual_price and ton_friendship >= favor_req) or i[x].unlocked) else 0.5) if i[x].unlocked: add "interface/topbar/icon_check.webp" zoom 0.5 align (0.85, 1.0) else: @@ -268,6 +268,6 @@ screen upgrades_menuitem(xx, yy): xysize (50, 50) yalign 0.5 text ("" if (linear_price <= 0) else str(favor_req+25)+"{unicode}\u2764{/unicode}") color ("#b20000" if (ton_friendship < favor_req+25) else "#402313") size 14 align (0.5, 0.25) - text (str(linear_price)+"g" if linear_price > 0 else "Sold!") color ("#b20000" if (0 < linear_price > game.gold) else "#402313") size 14 align (0.5, 0.7) + text (str(linear_price)+"g" if linear_price > 0 else "Sold!") color ("#b20000" if (0 < linear_price > states.env.gold) else "#402313") size 14 align (0.5, 0.7) text "{unicode}\u0362{/unicode}" size 65 align (1.0, 0.5) xoffset 5 add gui.format("interface/achievements/{}/spacer.webp") yalign 1.0 xpos 274 xanchor 0.5 diff --git a/game/scripts/characters/tonks/events/clothing.rpy b/game/scripts/characters/tonks/events/clothing.rpy index 82fde1c8..01195318 100644 --- a/game/scripts/characters/tonks/events/clothing.rpy +++ b/game/scripts/characters/tonks/events/clothing.rpy @@ -69,13 +69,13 @@ label tonks_summon_setup: gen "Alright then... Let's see, how much are you worth to me..." ("base", xpos="far_left", ypos="head") menu: - "-Zero gold-" if game.gold <= 0: + "-Zero gold-" if states.env.gold <= 0: gen "Zero gold." ("base", xpos="far_left", ypos="head") ton @ cheeks heavy_blush hair horny "Seriously?" ("soft", "narrow", "raised", "mid") gen "Yes, I'm a cheap bastard." ("base", xpos="far_left", ypos="head") ton @ cheeks heavy_blush hair horny "Clearly..." ("upset", "narrow", "base", "mid") - "-One gold-" if game.gold > 0: + "-One gold-" if states.env.gold > 0: gen "A single gold coin, if anything..." ("base", xpos="far_left", ypos="head") ton @ cheeks heavy_blush hair horny "(Bastard... How humiliating.)" ("soft", "narrow", "worried", "up") gen "Well?" ("base", xpos="far_left", ypos="head") @@ -83,16 +83,16 @@ label tonks_summon_setup: gen "Shouldn't you be thanking me for this generous valuation?" ("base", xpos="far_left", ypos="head") ton @ cheeks heavy_blush hair horny "Oh... Thank you so much, [name_genie_tonks]." ("annoyed", "narrow", "base", "stare") gen "Don't mention it, [name_tonks_genie]." ("base", xpos="far_left", ypos="head") - $ game.gold -= 1 + $ states.env.gold -= 1 - "-Twenty gold-" if game.gold >= 20: + "-Twenty gold-" if states.env.gold >= 20: gen "How does twenty gold sound?" ("base", xpos="far_left", ypos="head") ton @ cheeks heavy_blush hair horny "(*Hmm*... I kind of expected more.)" ("annoyed", "narrow", "raised", "downR") ton @ cheeks heavy_blush hair horny "Thank you, [name_genie_tonks]." ("soft", "narrow", "base", "mid") gen "No, [name_tonks_genie]... Thank you." ("grin", xpos="far_left", ypos="head") - $ game.gold -= 20 + $ states.env.gold -= 20 - "-A hundred gold-" if game.gold >= 100: + "-A hundred gold-" if states.env.gold >= 100: gen "Does one hundred gold sound nice to you?" ("base", xpos="far_left", ypos="head") gen "With a body like that, you could earn a fortune at a strip club!" ("grin", xpos="far_left", ypos="head") ton @ cheeks heavy_blush hair horny "Really..." ("horny", "narrow", "shocked", "mid") @@ -102,7 +102,7 @@ label tonks_summon_setup: ton @ cheeks heavy_blush hair horny "Maybe the duelling stage could find some extra use..." ("base", "narrow", "shocked", "stare") ton @ cheeks heavy_blush hair horny "Perhaps some extra curricular activities for a couple of my favourite students could be arranged..." ("horny", "narrow", "raised", "up") gen "I'm sure they would all love to watch their perverted teacher strip!" ("grin", xpos="far_left", ypos="head") - $ game.gold -= 100 + $ states.env.gold -= 100 gen "Now..." ("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 13c89679..c2bb3952 100644 --- a/game/scripts/characters/tonks/events/clothing_old.txt +++ b/game/scripts/characters/tonks/events/clothing_old.txt @@ -81,27 +81,27 @@ label tonks_summon_setup: ton "How much am I worth to you, [ton_genie_name]?" ("base", "base", "raised", "mid") menu: - "-Zero gold-" if game.gold <= 0: + "-Zero gold-" if states.env.gold <= 0: gen "Zero gold." ("base", xpos="far_left", ypos="head") ton "Seriously?" ("angry", "base", "raised", "mid") gen "Yes, I'm a cheap bastard." ("base", xpos="far_left", ypos="head") ton "I can see that..." ("upset", "base", "base", "mid") - "-One gold-" if game.gold > 0: + "-One gold-" if states.env.gold > 0: gen "A single gold coin, if anything..." ("base", xpos="far_left", ypos="head") ton "(Bastard... How humiliating.)" ("base", "base", "raised", "ahegao") ton "Thank you so much, [ton_genie_name]." ("base", "base", "base", "mid") gen "Don't mention it, [tonks_name]." ("base", xpos="far_left", ypos="head") - $ game.gold -= 1 + $ states.env.gold -= 1 - "-Twenty gold-" if game.gold >= 20: + "-Twenty gold-" if states.env.gold >= 20: gen "How does twenty gold sound?" ("base", xpos="far_left", ypos="head") ton "(*Hmm*... I kind of expected more.)" ("base", "base", "base", "R") ton "Thank you, [ton_genie_name]." ("base", "base", "base", "mid") gen "No, [tonks_name]... Thank you." ("grin", xpos="far_left", ypos="head") - $ game.gold -= 20 + $ states.env.gold -= 20 - "-A hundred gold-" if game.gold >= 100: + "-A hundred gold-" if states.env.gold >= 100: gen "Does one hundred gold sound nice to you?" ("base", xpos="far_left", ypos="head") gen "With a body like that, you could earn a fortune at a strip club!" ("grin", xpos="far_left", ypos="head") ton "Really..." ("horny", "base", "raised", "mid") @@ -111,7 +111,7 @@ label tonks_summon_setup: ton "Maybe the duelling stage could find some extra use..." ("base", "base", "base", "R") ton "Perhaps some extra curricular activities for a couple of my favourite students could be arranged..." ("open", "base", "raised", "mid") gen "I'm sure they would all love to watch their perverted teacher strip!" ("grin", xpos="far_left", ypos="head") - $ game.gold -= 100 + $ states.env.gold -= 100 gen "Now..." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/events/Start.rpy b/game/scripts/events/Start.rpy index 2fc85d96..bb6ef6a6 100644 --- a/game/scripts/events/Start.rpy +++ b/game/scripts/events/Start.rpy @@ -24,7 +24,7 @@ label start_wt: menu: "NEW GAME+" "Would you like to carry over your hard earned gold from your previous playthrough?" "-Yes please-": - $ game.gold += (persistent.gold or 0) + $ states.env.gold += (persistent.gold or 0) nar "[persistent.gold] gold has been added to your funds." "-No need-": diff --git a/game/scripts/events/ending.rpy b/game/scripts/events/ending.rpy index 5e555dc8..faf75464 100644 --- a/game/scripts/events/ending.rpy +++ b/game/scripts/events/ending.rpy @@ -2876,7 +2876,7 @@ Farewell, my little [word_03].{/size} $ states.her.ev.yule_ball.complete = True $ persistent.game_complete = True - $ persistent.gold = game.gold + $ persistent.gold = states.env.gold if "public" in states.her.ev.yule_ball.variant: $ persistent.ending_02 = True diff --git a/game/scripts/interface/cheats.rpy b/game/scripts/interface/cheats.rpy index 94c45677..7fbe9d8a 100644 --- a/game/scripts/interface/cheats.rpy +++ b/game/scripts/interface/cheats.rpy @@ -15,7 +15,7 @@ label cheats: "-Inventory-": menu .general: "-Add 500 Gold-" (icon="interface/icons/small/gold.webp"): - $ game.gold += 500 + $ states.env.gold += 500 jump cheats.general "-Get all gifts-" (icon="interface/icons/small/gift.webp"): python: diff --git a/game/scripts/interface/inventory.rpy b/game/scripts/interface/inventory.rpy index 4f17bcd8..8b2a6d3f 100644 --- a/game/scripts/interface/inventory.rpy +++ b/game/scripts/interface/inventory.rpy @@ -268,7 +268,7 @@ screen inventory_menu(xx, yy): # Gold & Tokens null height 16 - text "{color=#daa520}Gold{/color} {outlinecolor=#ffffff00}[game.gold]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xpos 0.1 xanchor 0 + text "{color=#daa520}Gold{/color} {outlinecolor=#ffffff00}[states.env.gold]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xpos 0.1 xanchor 0 add gui.format("interface/achievements/{}/spacer_left.webp") text "{color=#2055da}Tokens{/color} {outlinecolor=#ffffff00}[tokens]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xpos 0.1 xanchor 0 add gui.format("interface/achievements/{}/spacer_left.webp") diff --git a/game/scripts/interface/letter.rpy b/game/scripts/interface/letter.rpy index 3242ff40..a27db783 100644 --- a/game/scripts/interface/letter.rpy +++ b/game/scripts/interface/letter.rpy @@ -56,7 +56,7 @@ init python: label letter_work_report: python: - game.gold += reports_gold + states.env.gold += reports_gold # Reset states.paperwork_reports = 0 diff --git a/game/scripts/interface/topbar.rpy b/game/scripts/interface/topbar.rpy index 789b7693..6a8b1ded 100644 --- a/game/scripts/interface/topbar.rpy +++ b/game/scripts/interface/topbar.rpy @@ -177,7 +177,7 @@ screen ui_stats(): hbox: xpos 140 ypos 11 # Display tokens in token shop - text "{size=-4}[game.gold]{/size}" + text "{size=-4}[states.env.gold]{/size}" style light_ui_stats_text: color "#000" diff --git a/game/scripts/minigames/cardgame/_twins_card_game_.rpy b/game/scripts/minigames/cardgame/_twins_card_game_.rpy index c441f87b..7c7ab969 100644 --- a/game/scripts/minigames/cardgame/_twins_card_game_.rpy +++ b/game/scripts/minigames/cardgame/_twins_card_game_.rpy @@ -120,7 +120,7 @@ label twins_random_duel: gen "Finished?" ("base", xpos="far_left", ypos="head") ger "Just a second..." ger "Done!" - if game.gold < 10: + if states.env.gold < 10: ger "Unfortunately we will have to refuse." gen "Why?" ("angry", xpos="far_left", ypos="head") fre "{size=-2}The further extension to fractional values of your current income in the first instance on the establishment of a method of algebraical evolution which bears the same relation to arithmetical evolution that algebraical division bears to arithmetical division gives unsatisfactory results.{/size}" @@ -154,7 +154,7 @@ label twins_random_duel: gen "Okay then... If you two win, then I'll give you ten gold." ("base", xpos="far_left", ypos="head") ger "One second, professor." nar "George takes out a calculator and starts calculating something." - if game.gold < 10: + if states.env.gold < 10: ger "We have to refuse." gen "Why?" ("base", xpos="far_left", ypos="head") fre "Long explanation or short?" @@ -238,7 +238,7 @@ label twins_duel_lost: gen "It would appear that I may have lost this one..." ("base", xpos="far_left", ypos="head") twi "It appears so." gen "Well then, here's your reward..." ("base", xpos="far_left", ypos="head") - $ game.gold -= 10 + $ states.env.gold -= 10 menu: "-Rematch-": diff --git a/game/scripts/minigames/mirror/events/a_dark_room_NOT_IN_USE.txt b/game/scripts/minigames/mirror/events/a_dark_room_NOT_IN_USE.txt index 8fd495bb..3d7e8254 100644 --- a/game/scripts/minigames/mirror/events/a_dark_room_NOT_IN_USE.txt +++ b/game/scripts/minigames/mirror/events/a_dark_room_NOT_IN_USE.txt @@ -49,7 +49,7 @@ label start_dark_room_game: "Would you like to delete your save and get gold coins for it?" "-Yes-": $ current_payout = DRgame.day*2 - $ game.gold += current_payout + $ states.env.gold += current_payout ">You have received {number=current_payout} gold.\n>Thank you for playing \"A Dark Room\"." call reset_dark_room_init jump dark_room_game_start_menu diff --git a/game/scripts/minigames/mirror/events/an_odd_circumstance.rpy b/game/scripts/minigames/mirror/events/an_odd_circumstance.rpy index 71de218d..f1878308 100644 --- a/game/scripts/minigames/mirror/events/an_odd_circumstance.rpy +++ b/game/scripts/minigames/mirror/events/an_odd_circumstance.rpy @@ -14,7 +14,7 @@ label an_odd_circumstance: $ states.env.daytime = False $ game.weather = "clear" $ game.day = 69 - $ game.gold = 420 + $ states.env.gold = 420 $ hermione.equip(her_outfit_default) call room("main_room") stop music fadeout 1 diff --git a/game/scripts/minigames/mirror/events/previously_at_hogwarts.rpy b/game/scripts/minigames/mirror/events/previously_at_hogwarts.rpy index c78cbd21..bb10865c 100644 --- a/game/scripts/minigames/mirror/events/previously_at_hogwarts.rpy +++ b/game/scripts/minigames/mirror/events/previously_at_hogwarts.rpy @@ -6,7 +6,7 @@ label prev_at_hogwarts: $ states.env.daytime = True $ game.weather = "clear" $ game.day = 1 - $ game.gold = 0 + $ states.env.gold = 0 $ desk_OBJ.idle = "desk_dumbledore" stop weather call room("main_room") diff --git a/game/scripts/rooms/main_room/objects/cupboard.rpy b/game/scripts/rooms/main_room/objects/cupboard.rpy index 1012e320..282fccf0 100644 --- a/game/scripts/rooms/main_room/objects/cupboard.rpy +++ b/game/scripts/rooms/main_room/objects/cupboard.rpy @@ -77,7 +77,7 @@ label examine_cupboard: label rum_block(item): if isinstance(item, int): - $ game.gold += item + $ states.env.gold += item call give_reward("You found [item] gold...", "interface/icons/gold.webp") elif item == "nothing": @@ -115,7 +115,7 @@ init python: 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: + if states.env.gold < int(170 * math.log(game.day)) and random_percent <= 56 - dr: return int(progress_factor * random_gold) else: filtered_list = [x for x in drop_list if x.owned <= 5] @@ -125,7 +125,7 @@ init python: 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: + if states.env.gold < int(120 * math.log(game.day)) and random_percent <= 38 - dr: return int(progress_factor * random_gold) else: filtered_list = [x for x in drop_list if x.owned <= 3] @@ -133,7 +133,7 @@ init python: if int(120 * math.log(game.day)) / 3 < random_item.price: chance = max(6 - (random_item.owned * 5), 1) - elif game.gold > random_item.price: + elif states.env.gold > random_item.price: chance = max(65 - (random_item.owned * 15), 5) else: chance = max(95 - (random_item.owned * 10), 15) @@ -146,14 +146,14 @@ init python: 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: + if states.env.gold < int(90 * math.log(game.day)) and random_percent <= 33 - dr: return int(progress_factor * random_gold) else: random_item = renpy.random.choice(drop_list) if int(90 * math.log(game.day)) / 3 < random_item.price: chance = max(3 - (random_item.owned * 5), 1) - elif game.gold > random_item.price: + elif states.env.gold > random_item.price: chance = max(40 - (random_item.owned * 15), 0) else: chance = max(75 - (random_item.owned * 10), 5) diff --git a/game/scripts/script.rpy b/game/scripts/script.rpy index b303af8d..fa17c396 100644 --- a/game/scripts/script.rpy +++ b/game/scripts/script.rpy @@ -29,7 +29,7 @@ label start_dev: version = version_float() states.env.difficulty = 2 states.env.cheats = True - game.gold = 100000 + states.env.gold = 100000 states.map.unlocked = True states.sna.unlocked = True states.ton.unlocked = True diff --git a/game/scripts/shops/dress/menu.rpy b/game/scripts/shops/dress/menu.rpy index 9ca396e7..26536503 100644 --- a/game/scripts/shops/dress/menu.rpy +++ b/game/scripts/shops/dress/menu.rpy @@ -42,14 +42,14 @@ label shop_dress_menu: elif __choice[0] == "buy": show screen blktone with d3 - if game.gold < __choice[1].price: + if states.env.gold < __choice[1].price: gen "(I don't have enough gold.)" ("base", xpos="far_left", ypos="head") else: if len(store_cart) < 5: $ renpy.call("purchase_outfit", __choice[1]) play sound "sounds/money.ogg" - $ game.gold -= __choice[1].price + $ states.env.gold -= __choice[1].price $ store_cart.add(__choice[1]) $ menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting) $ current_item = next(iter(menu_items), None) @@ -94,10 +94,10 @@ label shop_dress_menu: menu: maf "If you pay extra, I could hire a bunch of elves to speed things up..." - "\"Fine. ([packaging_fee] gold)\"" if game.gold >= packaging_fee: - $ game.gold -= packaging_fee + "\"Fine. ([packaging_fee] gold)\"" if states.env.gold >= packaging_fee: + $ states.env.gold -= packaging_fee $ transit_time = int(transit_time/2) - "\"Fine. ([packaging_fee] gold)\"" (style="disabled") if game.gold < packaging_fee: + "\"Fine. ([packaging_fee] gold)\"" (style="disabled") if states.env.gold < packaging_fee: maf "Sorry luv, but it appears you have no gold left." "-No thanks-": pass @@ -243,7 +243,7 @@ screen shop_dress_menuitem(): for item in menu_items: $ icon = Transform(item.image, crop=(215, 0, 680, 1200), mesh=True, gl_pixel_perfect=True) $ is_modded = item.is_modded() - $ is_affordable = bool(game.gold >= item.price) + $ is_affordable = bool(states.env.gold >= item.price) button: style "shop_outfit_button" diff --git a/game/scripts/shops/item/chitchats.rpy b/game/scripts/shops/item/chitchats.rpy index e893c4b1..0f1de5fc 100644 --- a/game/scripts/shops/item/chitchats.rpy +++ b/game/scripts/shops/item/chitchats.rpy @@ -5,7 +5,7 @@ label purchase_item(item): gen "(I don't have enough tokens.)" ("base", xpos="far_left", ypos="head") return else: - if game.gold < item.price: + if states.env.gold < item.price: gen "(I don't have enough gold.)" ("base", xpos="far_left", ypos="head") return @@ -87,7 +87,7 @@ label purchase_item(item): if item.currency == "tokens": $ tokens -= item.price else: - $ game.gold -= item.price + $ states.env.gold -= item.price $ item.owned += 1 python hide: diff --git a/game/scripts/shops/item/menu.rpy b/game/scripts/shops/item/menu.rpy index 76a22c92..96d653bc 100644 --- a/game/scripts/shops/item/menu.rpy +++ b/game/scripts/shops/item/menu.rpy @@ -164,7 +164,7 @@ screen shop_item_menuitem(xx, yy): text "Store" size 22 xalign 0.5 ypos 65 if current_item is None or current_item.currency == "gold": - text "{color=#daa520}G{/color} {outlinecolor=#ffffff00}[game.gold]{/outlinecolor}" size 16 pos (24, 70) outlines [ (2, "#000", 0, 0) ] + text "{color=#daa520}G{/color} {outlinecolor=#ffffff00}[states.env.gold]{/outlinecolor}" size 16 pos (24, 70) outlines [ (2, "#000", 0, 0) ] else: text "{color=#2055da}T{/color} {outlinecolor=#ffffff00}[tokens]{/outlinecolor}" size 16 pos (24, 70) outlines [ (2, "#000", 0, 0) ] @@ -212,7 +212,7 @@ screen shop_item_menuitem(xx, yy): add crop_image_zoom( menu_items[i].get_image(), 42, 42, - (menu_items[i].currency != "tokens" or tokens < menu_items[i].price) and (menu_items[i].owned >= 99 or game.gold < menu_items[i].price) + (menu_items[i].currency != "tokens" or tokens < menu_items[i].price) and (menu_items[i].owned >= 99 or states.env.gold < menu_items[i].price) ) align (0.5, 0.5) button: @@ -231,7 +231,7 @@ screen shop_item_menuitem(xx, yy): else: text "{color=#2055da}T{/color} {color=#ff0000}[price]{/color}" size 10 pos (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ] else: - if game.gold >= menu_items[i].price: + if states.env.gold >= menu_items[i].price: text "{color=#daa520}G{/color} [price]" size 10 pos (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ] else: text "{color=#daa520}G{/color} {color=#ff0000}[price]{/color}" size 10 pos (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ] @@ -249,7 +249,7 @@ screen shop_item_menuitem(xx, yy): add crop_image_zoom( current_item.get_image(), 84, 84, - (current_item.currency != "tokens" or tokens < current_item.price) and (current_item.owned >= 99 or game.gold < current_item.price) + (current_item.currency != "tokens" or tokens < current_item.price) and (current_item.owned >= 99 or states.env.gold < current_item.price) ) align (0.5, 0.5) add "interface/achievements/glass_selected.webp" pos (6, 6) @@ -262,7 +262,7 @@ screen shop_item_menuitem(xx, yy): else: text "{color=#2055da}T{/color} {color=#ff0000}[current_item.price]{/color}" size 14 pos (0.90, 0.90) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ] else: - if game.gold >= current_item.price: + if states.env.gold >= current_item.price: text "{color=#daa520}G{/color} [current_item.price]" size 14 pos (0.9, 0.9) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ] else: text "{color=#daa520}G{/color} {color=#ff0000}[current_item.price]{/color}" size 14 pos (0.90, 0.90) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ] @@ -280,7 +280,7 @@ screen shop_item_menuitem(xx, yy): xoffset 45 ypos 374 text_size 16 - sensitive ((current_item.currency == "tokens" and tokens >= current_item.price) or (current_item.owned < 99 and game.gold >= current_item.price)) + sensitive ((current_item.currency == "tokens" and tokens >= current_item.price) or (current_item.owned < 99 and states.env.gold >= current_item.price)) action Return("buy") hbox: diff --git a/game/scripts/shops/item/room.rpy b/game/scripts/shops/item/room.rpy index 726064cd..18981990 100644 --- a/game/scripts/shops/item/room.rpy +++ b/game/scripts/shops/item/room.rpy @@ -58,7 +58,7 @@ label item_store: ger "Here, your weekly cut." call give_reward("You've received "+str(int(shop_profit*states.twi.ev.cardgame.profit))+" gold.", "interface/icons/gold.webp") - $ game.gold += int(shop_profit*states.twi.ev.cardgame.profit) + $ states.env.gold += int(shop_profit*states.twi.ev.cardgame.profit) ger "..." twi "Did you need anything else?" else: diff --git a/game/scripts/utility/periodic_functions.rpy b/game/scripts/utility/periodic_functions.rpy index bb36b19a..bb12f08d 100644 --- a/game/scripts/utility/periodic_functions.rpy +++ b/game/scripts/utility/periodic_functions.rpy @@ -3,7 +3,7 @@ init python: if not hasattr(store, "achievements") or _in_replay: return - if not achievements.status('gold') and game.gold >= 10000: + if not achievements.status('gold') and states.env.gold >= 10000: achievements.unlock("gold") if not achievements.status('drunkard') and wine_ITEM.owned >= 25: