2022-05-16 23:48:22 +00:00
|
|
|
screen card_lootbox():
|
|
|
|
tag card_lootbox
|
|
|
|
zorder 9
|
|
|
|
|
|
|
|
use blktone
|
|
|
|
|
2022-09-29 21:19:55 +00:00
|
|
|
for i in range(len(card_loot)):
|
2022-05-16 23:48:22 +00:00
|
|
|
if card_loot[i] in cards_realm:
|
|
|
|
frame:
|
|
|
|
style "empty"
|
|
|
|
xpos 110+125*i
|
|
|
|
ypos 116
|
|
|
|
add "interface/achievements/glow.webp" align (0.5, 0.5) zoom 0.5 alpha 0.7 at rotate_circular
|
|
|
|
use cardrender(card_loot[i],228+125*i,200, interact=False, cardzoom=0.375)
|
|
|
|
|
|
|
|
use ctc
|
|
|
|
|
|
|
|
label card_lootbox:
|
2024-04-26 15:06:19 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2022-05-16 23:48:22 +00:00
|
|
|
python:
|
|
|
|
card_loot = []
|
|
|
|
|
|
|
|
cards_choice = [card_iris, card_jasmine, card_azalea, card_dahlia, card_aladdin, card_maslab, card_lilly, card_rasul, card_jafar, card_her_schoolgirl, card_lun_schoolgirl, card_sus_schoolgirl, card_cho_schoolgirl]
|
|
|
|
rand_card = None
|
|
|
|
|
2022-09-29 21:19:55 +00:00
|
|
|
for i in range(5):
|
2022-05-16 23:48:22 +00:00
|
|
|
rand_card = random.choice(cards_items)
|
|
|
|
|
|
|
|
if i == 4:
|
|
|
|
if random.randint(0, 103) <= 24: # 22.5% chance
|
|
|
|
rand_card = random.choice(cards_choice)
|
|
|
|
|
|
|
|
if not card_exist(unlocked_cards, rand_card):
|
|
|
|
unlocked_cards += [rand_card]
|
|
|
|
else:
|
|
|
|
rand_card.copies += 1
|
|
|
|
card_loot.append(rand_card)
|
|
|
|
|
|
|
|
show screen card_lootbox
|
|
|
|
with d3
|
|
|
|
pause
|
|
|
|
hide screen card_lootbox
|
|
|
|
with d3
|
|
|
|
|
2024-04-26 15:06:19 +00:00
|
|
|
$ lootbox_ITEM.owned -= 1
|
|
|
|
|
2022-05-16 23:48:22 +00:00
|
|
|
if lootbox_ITEM.owned > 0:
|
|
|
|
menu:
|
|
|
|
"-Open another pack-":
|
|
|
|
jump card_lootbox
|
|
|
|
"-Enough is enough-":
|
|
|
|
jump main_room_menu
|
|
|
|
|
|
|
|
jump main_room_menu
|