Cheaters do not prosper!
* Added rollback cheating detection for cardgame packs.
This commit is contained in:
parent
eb70637a02
commit
22f831e424
@ -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
|
||||
|
@ -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-":
|
||||
|
Loading…
Reference in New Issue
Block a user