@@ -167,7 +167,9 @@ def __call__(self, data, replay):
167
167
ai_build = data .read_bits (8 if replay .base_build >= 38749 else 7 )
168
168
if replay .base_build >= 23925
169
169
else None ,
170
- handicap = data .read_bits (7 ),
170
+ handicap = data .read_bits (
171
+ 32 if replay .base_build >= 80669 else 7
172
+ ),
171
173
observe = data .read_bits (2 ),
172
174
logo_index = data .read_uint32 ()
173
175
if replay .base_build >= 32283
@@ -270,6 +272,9 @@ def __call__(self, data, replay):
270
272
ac_enemy_wave_type = data .read_uint32 ()
271
273
if replay .base_build >= 77379
272
274
else None ,
275
+ selected_commander_prestige = data .read_uint32 ()
276
+ if replay .base_build >= 80871
277
+ else None ,
273
278
)
274
279
for i in range (data .read_bits (5 ))
275
280
],
@@ -2196,6 +2201,65 @@ def set_sync_playing(self, data):
2196
2201
return dict (sync_load = data .read_uint32 ())
2197
2202
2198
2203
2204
+ class GameEventsReader_80669 (GameEventsReader_65895 ):
2205
+ # this is almost the same as `command_event` from previous build
2206
+ # the only addition is introduction of extra command flag:
2207
+ # > https://news.blizzard.com/en-us/starcraft2/23471116/starcraft-ii-4-13-0-ptr-patch-notes
2208
+ # > New order command flag: Attack Once
2209
+ # > When issuing an attack order, it is now allowed to issue an “attack once” order with order command flags.
2210
+ # > const int c_cmdAttackOnce = 26;
2211
+ # ideally this part of the code should be more generic so it doesn't have to copy-pasted as a whole
2212
+ # every time there's a tiny change in one of the sub-structs
2213
+ def command_event (self , data ):
2214
+ return dict (
2215
+ flags = data .read_bits (27 ),
2216
+ ability = dict (
2217
+ ability_link = data .read_uint16 (),
2218
+ ability_command_index = data .read_bits (5 ),
2219
+ ability_command_data = data .read_uint8 () if data .read_bool () else None ,
2220
+ )
2221
+ if data .read_bool ()
2222
+ else None ,
2223
+ data = { # Choice
2224
+ 0 : lambda : ("None" , None ),
2225
+ 1 : lambda : (
2226
+ "TargetPoint" ,
2227
+ dict (
2228
+ point = dict (
2229
+ x = data .read_bits (20 ),
2230
+ y = data .read_bits (20 ),
2231
+ z = data .read_uint32 () - 2147483648 ,
2232
+ )
2233
+ ),
2234
+ ),
2235
+ 2 : lambda : (
2236
+ "TargetUnit" ,
2237
+ dict (
2238
+ flags = data .read_uint16 (),
2239
+ timer = data .read_uint8 (),
2240
+ unit_tag = data .read_uint32 (),
2241
+ unit_link = data .read_uint16 (),
2242
+ control_player_id = data .read_bits (4 )
2243
+ if data .read_bool ()
2244
+ else None ,
2245
+ upkeep_player_id = data .read_bits (4 )
2246
+ if data .read_bool ()
2247
+ else None ,
2248
+ point = dict (
2249
+ x = data .read_bits (20 ),
2250
+ y = data .read_bits (20 ),
2251
+ z = data .read_uint32 () - 2147483648 ,
2252
+ ),
2253
+ ),
2254
+ ),
2255
+ 3 : lambda : ("Data" , dict (data = data .read_uint32 ())),
2256
+ }[data .read_bits (2 )](),
2257
+ sequence = data .read_uint32 () + 1 ,
2258
+ other_unit_tag = data .read_uint32 () if data .read_bool () else None ,
2259
+ unit_group = data .read_uint32 () if data .read_bool () else None ,
2260
+ )
2261
+
2262
+
2199
2263
class TrackerEventsReader (object ):
2200
2264
def __init__ (self ):
2201
2265
self .EVENT_DISPATCH = {
0 commit comments