Spaces:
Running
Running
Codex Claude Opus 4.8 commited on
Commit ·
7e0483e
1
Parent(s): a33d5b8
Warm boss card art in battle (GPU free post-draft) so boss plays show art instantly
Browse files
ui.py
CHANGED
|
@@ -385,9 +385,11 @@ def battle_opening_steps(
|
|
| 385 |
)
|
| 386 |
draw_cards(duel.player, OPENING_HAND_SIZE)
|
| 387 |
draw_cards(duel.enemy, OPENING_HAND_SIZE)
|
| 388 |
-
#
|
| 389 |
-
#
|
|
|
|
| 390 |
warm_card_art(art_client, duel.player.hand)
|
|
|
|
| 391 |
state = replace(
|
| 392 |
state,
|
| 393 |
enemy_deck=enemy_deck,
|
|
@@ -435,8 +437,10 @@ def collect_ready_battle(
|
|
| 435 |
def warm_battle_art(art_client: ArtClient | None, state: RunState) -> None:
|
| 436 |
if state.duel is None:
|
| 437 |
return
|
| 438 |
-
#
|
|
|
|
| 439 |
warm_card_art(art_client, state.duel.player.hand)
|
|
|
|
| 440 |
warm_card_art(art_client, tuple(card for _, card in state.showcase))
|
| 441 |
|
| 442 |
|
|
|
|
| 385 |
)
|
| 386 |
draw_cards(duel.player, OPENING_HAND_SIZE)
|
| 387 |
draw_cards(duel.enemy, OPENING_HAND_SIZE)
|
| 388 |
+
# Warm the player's hand first, then the boss's: the draft is over, so the GPU
|
| 389 |
+
# is free to illustrate the boss's cards ahead of time — they show art the
|
| 390 |
+
# moment the boss plays them instead of shimmering in.
|
| 391 |
warm_card_art(art_client, duel.player.hand)
|
| 392 |
+
warm_card_art(art_client, duel.enemy.hand)
|
| 393 |
state = replace(
|
| 394 |
state,
|
| 395 |
enemy_deck=enemy_deck,
|
|
|
|
| 437 |
def warm_battle_art(art_client: ArtClient | None, state: RunState) -> None:
|
| 438 |
if state.duel is None:
|
| 439 |
return
|
| 440 |
+
# Post-draft the GPU is free: warm the player's hand, the boss's hand (so its
|
| 441 |
+
# plays show art instantly), and the played-card showcase.
|
| 442 |
warm_card_art(art_client, state.duel.player.hand)
|
| 443 |
+
warm_card_art(art_client, state.duel.enemy.hand)
|
| 444 |
warm_card_art(art_client, tuple(card for _, card in state.showcase))
|
| 445 |
|
| 446 |
|