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.healing_potions = 0 # TODO: This should probably be turned into an item.
|
||||||
|
|
||||||
default states.cardgame.unlocked = False
|
default states.cardgame.unlocked = False
|
||||||
|
default states.cardgame.cheater = False
|
||||||
|
@ -16,6 +16,15 @@ screen card_lootbox():
|
|||||||
use ctc
|
use ctc
|
||||||
|
|
||||||
label card_lootbox:
|
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:
|
python:
|
||||||
card_loot = []
|
card_loot = []
|
||||||
|
|
||||||
@ -35,14 +44,14 @@ label card_lootbox:
|
|||||||
rand_card.copies += 1
|
rand_card.copies += 1
|
||||||
card_loot.append(rand_card)
|
card_loot.append(rand_card)
|
||||||
|
|
||||||
$ lootbox_ITEM.owned -= 1
|
|
||||||
|
|
||||||
show screen card_lootbox
|
show screen card_lootbox
|
||||||
with d3
|
with d3
|
||||||
pause
|
pause
|
||||||
hide screen card_lootbox
|
hide screen card_lootbox
|
||||||
with d3
|
with d3
|
||||||
|
|
||||||
|
$ lootbox_ITEM.owned -= 1
|
||||||
|
|
||||||
if lootbox_ITEM.owned > 0:
|
if lootbox_ITEM.owned > 0:
|
||||||
menu:
|
menu:
|
||||||
"-Open another pack-":
|
"-Open another pack-":
|
||||||
|
Loading…
Reference in New Issue
Block a user