@@ -401,6 +401,38 @@ def test_mega_pack_second_selection_closes(self, client: httpx.Client) -> None:
401401 gamestate = assert_gamestate_response (result , state = "SHOP" )
402402 assert "pack" not in gamestate
403403
404+ def test_mega_pack_both_selections_with_targets (self , client : httpx .Client ) -> None :
405+ """Test mega pack where both selections require targets.
406+
407+ Pack contents (seed VEBROR8):
408+ [0] c_wheel_of_fortune
409+ [1] c_sun
410+ [2] c_star
411+ [3] c_hanged_man - requires 2 targets (first selection)
412+ [4] c_chariot - requires 1 target (second selection)
413+ """
414+ load_fixture (
415+ client ,
416+ "pack" ,
417+ "seed-VEBROR8--state-SMODS_BOOSTER_OPENED--pack.key-p_arcana_mega_1" ,
418+ )
419+
420+ result = api (client , "pack" , {"card" : 3 , "targets" : [0 , 1 ]})
421+ gamestate = assert_gamestate_response (result , state = "SMODS_BOOSTER_OPENED" )
422+
423+ # After first selection, pack should still be open (mega packs allow 2 selections)
424+ # The Hanged Man was removed, so cards shifted:
425+ # [0] c_wheel_of_fortune, [1] c_sun, [2] c_star, [3] c_chariot
426+ assert "pack" in gamestate
427+ assert len (gamestate ["pack" ]["cards" ]) == 4
428+
429+ # Second selection: card index 3 is now c_chariot (requires 1 target)
430+ result = api (client , "pack" , {"card" : 3 , "targets" : [0 ]})
431+ gamestate = assert_gamestate_response (result , state = "SHOP" )
432+
433+ # After second selection, pack should be closed
434+ assert "pack" not in gamestate
435+
404436
405437# =============================================================================
406438# Skip Tests
0 commit comments