Cheaters do not prosper!

* Added rollback cheating detection for cardgame packs.
This commit is contained in:
LoafyLemon 2024-04-26 16:06:19 +01:00
parent eb70637a02
commit 22f831e424
2 changed files with 12 additions and 2 deletions

View File

@ -42,3 +42,4 @@ default states.paperwork_reports_times = 0
default states.healing_potions = 0 # TODO: This should probably be turned into an item.
default states.cardgame.unlocked = False
default states.cardgame.cheater = False

View File

@ -16,6 +16,15 @@ screen card_lootbox():
use ctc
label card_lootbox:
if renpy.in_rollback() and not states.cardgame.cheater:
$ states.cardgame.cheater = True
$ renpy.block_rollback()
gen "You cheating bastard!" ("grin", xpos="far_left", ypos="head")
gen "I'll allow it this time..." ("base", xpos="far_left", ypos="head")
jump card_lootbox
python:
card_loot = []
@ -35,14 +44,14 @@ label card_lootbox:
rand_card.copies += 1
card_loot.append(rand_card)
$ lootbox_ITEM.owned -= 1
show screen card_lootbox
with d3
pause
hide screen card_lootbox
with d3
$ lootbox_ITEM.owned -= 1
if lootbox_ITEM.owned > 0:
menu:
"-Open another pack-":