diff --git a/src/lpsim/server/patch/v44/cards/veterans_visage_4_4.py b/src/lpsim/server/patch/v44/cards/veterans_visage_4_4.py index acea8f07..6b6a0ee9 100644 --- a/src/lpsim/server/patch/v44/cards/veterans_visage_4_4.py +++ b/src/lpsim/server/patch/v44/cards/veterans_visage_4_4.py @@ -1,4 +1,6 @@ from typing import Dict, List, Literal + +from lpsim.server.event import MoveObjectEventArguments from ....struct import Cost from .....utils.class_registry import register_class @@ -6,7 +8,7 @@ from ....action import Actions, CreateDiceAction, DrawCardAction from ....match import Match from ....event import ReceiveDamageEventArguments -from ....card.equipment.artifact.base import RoundEffectArtifactBase +from ....card.equipment.artifact.base import ArtifactBase, RoundEffectArtifactBase from .....utils.desc_registry import DescDictType @@ -16,6 +18,12 @@ class VeteransVisage_4_4(RoundEffectArtifactBase): cost: Cost = Cost(any_dice_number=2) max_usage_per_round: int = 2 + def event_handler_MOVE_OBJECT( + self, event: MoveObjectEventArguments, match: Match + ) -> List[Actions]: + # veteran's visage will not reset usage when moved + return ArtifactBase.event_handler_MOVE_OBJECT(self, event, match) + def event_handler_RECEIVE_DAMAGE( self, event: ReceiveDamageEventArguments, match: Match ) -> List[Actions]: diff --git a/tests/server/bugfix/jsons/test_issue_106.json b/tests/server/bugfix/jsons/test_issue_106.json new file mode 100644 index 00000000..c7f89fdf --- /dev/null +++ b/tests/server/bugfix/jsons/test_issue_106.json @@ -0,0 +1,995 @@ +{ + "match_random_state": [ + "MT19937", + [ + 2147483648, + 852258933, + 3037751817, + 2843736348, + 2346345909, + 241038820, + 3630833971, + 322381140, + 1250305161, + 1459257731, + 3694471596, + 515911843, + 3937938455, + 2827679987, + 3950882980, + 3581943267, + 4151002148, + 1618076744, + 3274872619, + 2159583707, + 1559018499, + 1583145829, + 1179320338, + 3113356017, + 1931467408, + 2410284883, + 753436273, + 437428593, + 510572609, + 2706055346, + 879811753, + 825585750, + 2401349358, + 2490929089, + 3977100308, + 4231974237, + 3442070342, + 2600699322, + 3596477700, + 3408240710, + 3752939454, + 3842241914, + 2634979991, + 739520375, + 3739104881, + 2527561182, + 1297315978, + 1316945693, + 1727810483, + 3695100167, + 1453832382, + 979363388, + 3076017079, + 3732405838, + 1444648514, + 4151023880, + 2205533946, + 4261855231, + 4267702982, + 2647124900, + 1484461652, + 1998843354, + 4035414622, + 4156165081, + 322695412, + 2240084797, + 218965524, + 2620616784, + 2355246093, + 353075890, + 807460217, + 2080397923, + 2949113800, + 3746761770, + 4204485378, + 2925858822, + 940465313, + 2978225661, + 1552046939, + 3792670316, + 4122385657, + 3233513602, + 1380874839, + 984796113, + 886794804, + 4153798316, + 717328536, + 469185684, + 3765962743, + 4135056014, + 3479073223, + 3023129426, + 4222684062, + 3850877054, + 224467384, + 3087354214, + 1680195562, + 2193347842, + 2684173028, + 1880093036, + 3229242389, + 3049410427, + 1279447835, + 332094632, + 1579758630, + 3710374238, + 2337675471, + 115759493, + 4211910051, + 3915073058, + 1108976576, + 2071829022, + 3748361252, + 3666084797, + 3192128605, + 604670057, + 188878253, + 403907626, + 3217757074, + 1892194987, + 378411265, + 573022174, + 3720006947, + 254195013, + 1584935511, + 3553011007, + 1370455926, + 1537144829, + 2822387189, + 2441227067, + 1172427512, + 1810388875, + 597276150, + 3442654859, + 1319639025, + 1278428752, + 3109211997, + 3125310769, + 1778730908, + 2179046274, + 529756476, + 3028614397, + 390243483, + 2580809143, + 2253747482, + 645716549, + 4069787277, + 3392915288, + 1804927866, + 2998699909, + 3486738826, + 2249333105, + 2840926426, + 832811354, + 2642376678, + 2647298729, + 2972210951, + 3980432569, + 2414014267, + 3379616787, + 827881623, + 2006639651, + 2739098202, + 4142232454, + 1674001832, + 387416494, + 1242487127, + 3900036886, + 1084620969, + 4223529924, + 2384308612, + 2101645863, + 1707720038, + 3225537336, + 1571082365, + 4196493122, + 2164372558, + 3866850114, + 2805868839, + 675209309, + 4179066360, + 3625074731, + 3089956980, + 3293027876, + 3902965037, + 1224438018, + 1224895899, + 2575389666, + 3357949449, + 2384469209, + 3700336215, + 338019398, + 3289126851, + 2769703855, + 390722640, + 2704007496, + 2883292084, + 1965587089, + 1025300549, + 619699852, + 1043025444, + 3803785664, + 922193774, + 151167841, + 2126109206, + 3168147631, + 2865122591, + 3327041069, + 3373701209, + 9353399, + 473750565, + 3028380130, + 1467951504, + 4190922997, + 589795710, + 942553933, + 937635948, + 298315070, + 415821393, + 4041939848, + 372373022, + 3689582099, + 519737891, + 4233378103, + 1157474098, + 138790908, + 770838763, + 430623945, + 814484707, + 2853558444, + 3213795543, + 3845643860, + 2512330672, + 1336888278, + 572322181, + 1282342669, + 920514674, + 2038291972, + 3149365870, + 4102830575, + 3549173955, + 3684993693, + 1356278478, + 1775628726, + 213156443, + 2298969406, + 2717355438, + 1572856796, + 1513647543, + 2132855513, + 1986873076, + 3528225839, + 308723273, + 292601737, + 1277750001, + 1679680638, + 2785246156, + 3878540692, + 471870265, + 668186544, + 2580697021, + 2706131701, + 1695560777, + 2843565854, + 332232130, + 1424790421, + 2379530317, + 4168717850, + 974529721, + 2592398077, + 1897652930, + 1672473548, + 1312396662, + 1869749067, + 2084827226, + 73229630, + 1974021446, + 3205173810, + 874883708, + 2176709342, + 2290870532, + 2232221173, + 11665963, + 3617533180, + 2066756895, + 869614124, + 248729098, + 3168320955, + 2513792026, + 1546475412, + 3754194653, + 1731401296, + 669770116, + 1064448459, + 2396128651, + 1085107150, + 2799824622, + 1789749972, + 2034050724, + 2306132503, + 2368269703, + 338106206, + 3551116912, + 2236740658, + 3994225500, + 1393516086, + 814315152, + 4115786034, + 1931073526, + 3698510923, + 3264469706, + 1200777713, + 3605887842, + 537661941, + 99637609, + 739482224, + 4131737706, + 2971745240, + 1636938568, + 461809637, + 1293154012, + 2051347708, + 3415492749, + 309673494, + 1718449666, + 895136483, + 459169287, + 3758491237, + 1484777584, + 2985652876, + 3690529376, + 2814466466, + 3761286303, + 2906796347, + 1770927703, + 66989981, + 1227151467, + 740432923, + 1742669766, + 4108895627, + 1129792952, + 4217696861, + 1581599772, + 2822850338, + 1371889226, + 2928171633, + 337314434, + 1287812001, + 2566385880, + 1016557934, + 1521694314, + 1446569819, + 494280377, + 3605614928, + 1750373709, + 1917104935, + 1005209477, + 3290246820, + 2435278462, + 2392228341, + 1860566250, + 3604753061, + 1545385861, + 179541456, + 1095359, + 2235243074, + 3565546844, + 1848692563, + 3296532274, + 932183734, + 2678033798, + 2819310696, + 372402397, + 2849752546, + 3300638946, + 979341372, + 2027134812, + 3377292468, + 776160986, + 876596828, + 3411844979, + 3807986688, + 2828349004, + 2667246233, + 2887674321, + 3417530634, + 4192745201, + 1514743338, + 1486186234, + 3599480114, + 2220700932, + 877264426, + 3683620224, + 1791677875, + 1576589409, + 3371864729, + 239577320, + 664674279, + 97455638, + 671315040, + 4098637571, + 1233610174, + 2528631470, + 4181767203, + 4188289355, + 201010882, + 2613994903, + 3722085049, + 464425505, + 3872757292, + 1251239949, + 155862569, + 1690852071, + 958025955, + 3882516403, + 11720145, + 1377457109, + 611510219, + 4258313417, + 2145041081, + 230603729, + 108822725, + 2878554314, + 1764726348, + 2813464509, + 2430757019, + 1893470021, + 2345837745, + 3504885831, + 471263087, + 3448186974, + 91510807, + 1692101012, + 870758111, + 279967414, + 2975906051, + 831331682, + 714973860, + 895403271, + 1946906216, + 2175407141, + 294729832, + 663378707, + 4040948408, + 371079217, + 3849217943, + 3167620631, + 2106715634, + 4270851423, + 4180090782, + 2160180184, + 3446426895, + 3057856044, + 1623629695, + 1938845385, + 1992740005, + 2620458046, + 602642578, + 168172447, + 1859880120, + 3105244601, + 3397983984, + 4209231162, + 116203150, + 2166700138, + 679395399, + 1591101135, + 1511475060, + 3865776260, + 3861604114, + 2333630785, + 578347291, + 107805155, + 1281990800, + 2331362412, + 2805566554, + 1392433873, + 4113871053, + 1681686757, + 1317522404, + 263062625, + 3972207482, + 871540459, + 858793555, + 3378130229, + 1638925065, + 3644427872, + 425845250, + 4199381058, + 138738749, + 4064868817, + 641652061, + 3293641471, + 2781033146, + 2433876171, + 958379132, + 515825137, + 1920938822, + 508669000, + 1996074650, + 1132963176, + 112386699, + 4020276217, + 3307649861, + 712492536, + 752257327, + 703177072, + 655737206, + 1936095049, + 2870883815, + 750441059, + 531193802, + 3887354491, + 3768893981, + 758096438, + 763690471, + 1177380930, + 836758118, + 1370880236, + 2406562066, + 3117758426, + 38974763, + 729452259, + 563449846, + 2410187015, + 1585606395, + 4205777270, + 2173618669, + 3178196512, + 1074979883, + 4149809984, + 3286590086, + 2021554321, + 4088426121, + 3079684553, + 1917337899, + 2966649180, + 2899231799, + 1062888899, + 1306359486, + 876671599, + 3348080246, + 1542570792, + 3517583561, + 164390915, + 135607212, + 1392292837, + 1540942523, + 2587272281, + 974783651, + 3971944422, + 1315415300, + 1419043995, + 3194113563, + 495692306, + 3087088482, + 735847283, + 2418041689, + 2761711941, + 608441639, + 3606420410, + 2500421680, + 2129584375, + 4277314193, + 362285431, + 3829261316, + 3033449623, + 2726841579, + 2856071091, + 1282567563, + 1399900137, + 1288485551, + 1784276086, + 3203384342, + 2304811961, + 4188374470, + 2799600913, + 1668300233, + 3487044801, + 345405685, + 68861045, + 4149051636, + 630962370, + 3809297774, + 3497678965, + 2777356018, + 1131508456, + 3088811640, + 2916362619, + 3604683426, + 1367656029, + 3164360959, + 3464800203, + 2727920289, + 3993785877, + 410872094, + 933194096, + 1088600539, + 3511204625, + 818519978, + 4217773289, + 4016704403, + 2742865381, + 2118058332, + 2028824770, + 3585206344, + 3620279056, + 4291530408, + 748541778, + 1337473025, + 2734790168, + 2153414969, + 1554090190, + 4147260811, + 1053913480, + 4166858558, + 1486762641, + 34008703, + 2957308893, + 3461353779, + 3720643435, + 476418844, + 2092109162, + 1388524448 + ], + 623, + 0, + 0 + ], + "start_deck": [ + "default_version:4.5\ncharacter:AnemoMobMage@1.0\ncharacter:CryoMob@1.0\ncharacter:PyroMobMage@1.0\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\n", + "default_version:4.5\ncharacter:AnemoMobMage@1.0\ncharacter:CryoMob@1.0\ncharacter:PyroMobMage@1.0\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nBlessing of the Divine Relic's Installation@4.1\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nVeteran's Visage@4.4\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\nOcean-Hued Clam@4.2\n" + ], + "command_history": [ + [ + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 5", + "TEST 7 p0", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 5", + "TEST 7 p1", + "sw_card 3", + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 5", + "TEST 7 p0", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 5", + "TEST 7 p1", + "choose 0", + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 5", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 5", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "sw_char 1 15", + "TEST 1 10 7 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 5", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 4", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "card 1 1 14 13 12", + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 4", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 4", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "card 2 0", + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 4", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "sw_char 0 11", + "TEST 1 9 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 4", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "skill 1 10 9 8", + "TEST 1 9 10 10 6 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 3", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "skill 0 7 6 5", + "TEST 1 9 10 10 6 9 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 3", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "skill 0 4 3 2" + ], + [ + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 5", + "TEST 7 p0", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 5", + "TEST 7 p1", + "sw_card 2", + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 5", + "TEST 7 p0", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 5", + "TEST 7 p1", + "choose 0", + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 5", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 5", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "card 2 0 15 14", + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 5", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 4", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "skill 1 13 12 11", + "TEST 1 10 10 10 10 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 4", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "skill 0 10 9 8", + "TEST 1 9 10 10 6 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 4", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI ANEMO", + "card 1 0", + "TEST 1 9 10 10 6 10 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 3", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI ANEMO", + "sw_char 1 8", + "TEST 1 9 10 10 6 9 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 4", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "card 3 0", + "TEST 1 9 10 10 6 9 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI OMNI OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 3", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "sw_char 0 7", + "TEST 1 9 10 10 5 9 10", + "TEST 12 p0c0", + "TEST 12 p0c1", + "TEST 12 p0c2", + "TEST 6 p0 3", + "TEST 7 p0 OMNI OMNI", + "TEST 12 p1c0", + "TEST 12 p1c1", + "TEST 12 p1c2", + "TEST 6 p1 3", + "TEST 7 p1 OMNI OMNI OMNI OMNI OMNI OMNI OMNI", + "end" + ] + ], + "match_config": { + "random_first_player": false, + "player_go_first": 0, + "check_deck_restriction": false, + "initial_hand_size": 5, + "initial_card_draw": 2, + "initial_dice_number": 16, + "initial_dice_reroll_times": 1, + "card_number": null, + "max_same_card_number": null, + "character_number": null, + "max_round_number": 999, + "max_hand_size": 10, + "max_dice_number": 16, + "max_summon_number": 4, + "max_support_number": 4, + "make_skill_prediction": false, + "history_level": 10, + "compress_history": true, + "recreate_mode": false, + "random_object_information": [] + }, + "command_history_raw": [ + [ + [ + 2, + "sw_card 3", + 0 + ], + [ + 4, + "choose 0", + 2 + ], + [ + 7, + "sw_char 1 15", + 4 + ], + [ + 15, + "card 1 1 14 13 12", + 7 + ], + [ + 19, + "card 2 0", + 8 + ], + [ + 22, + "sw_char 0 11", + 9 + ], + [ + 27, + "skill 1 10 9 8", + 11 + ], + [ + 35, + "skill 0 7 6 5", + 14 + ], + [ + 44, + "skill 0 4 3 2", + 17 + ] + ], + [ + [ + 2, + "sw_card 2", + 1 + ], + [ + 4, + "choose 0", + 3 + ], + [ + 9, + "card 2 0 15 14", + 5 + ], + [ + 12, + "skill 1 13 12 11", + 6 + ], + [ + 24, + "skill 0 10 9 8", + 10 + ], + [ + 30, + "card 1 0", + 12 + ], + [ + 33, + "sw_char 1 8", + 13 + ], + [ + 39, + "card 3 0", + 15 + ], + [ + 42, + "sw_char 0 7", + 16 + ], + [ + 47, + "end", + 18 + ] + ] + ] +} \ No newline at end of file diff --git a/tests/server/bugfix/test_json_bugfix.py b/tests/server/bugfix/test_json_bugfix.py new file mode 100644 index 00000000..cde9159c --- /dev/null +++ b/tests/server/bugfix/test_json_bugfix.py @@ -0,0 +1,12 @@ +import os +from tests.utils_for_test import do_log_tests + + +def test_issue_106(): + json_fname = "test_issue_106.json" + json_path = os.path.join(os.path.dirname(__file__), "jsons", json_fname) + do_log_tests(json_path) + + +if __name__ == "__main__": + test_issue_106()