spawningtool 3.0.0__tar.gz → 3.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spawningtool-3.0.0 → spawningtool-3.1.0}/CHANGELOG.md +5 -0
- {spawningtool-3.0.0/spawningtool.egg-info → spawningtool-3.1.0}/PKG-INFO +6 -1
- {spawningtool-3.0.0 → spawningtool-3.1.0}/setup.py +1 -1
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool/lotv_constants.py +25 -25
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool/parser.py +16 -15
- {spawningtool-3.0.0 → spawningtool-3.1.0/spawningtool.egg-info}/PKG-INFO +6 -1
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/__main__.py +36 -8
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/__pycache__/__main__.cpython-312.pyc +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_5_0_16.json +2 -2
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_5_0_16_hotfix.json +2 -2
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_5_0_16b.json +2 -2
- {spawningtool-3.0.0 → spawningtool-3.1.0}/LICENSE.md +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/MANIFEST.in +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/README.md +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/setup.cfg +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool/__init__.py +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool/__main__.py +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool/analyzer.py +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool/coop_constants.py +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool/exception.py +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool/hots_constants.py +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool.egg-info/SOURCES.txt +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool.egg-info/dependency_links.txt +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool.egg-info/entry_points.txt +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool.egg-info/requires.txt +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/spawningtool.egg-info/top_level.txt +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/__init__.py +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/gameheart.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/kerrigan.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_380_protoss.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_380_terran.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_380_zerg.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_400.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_4_6_0_pvt.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_4_9_2_zvt.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_5_0_10_pvz.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_5_0_11.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_5_0_13_tvp.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_5_0_14_tvp.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/patch_5_0_4_pvt.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/tlo_v_thorzain.json +0 -0
- {spawningtool-3.0.0 → spawningtool-3.1.0}/tests/update_expected_results.py +0 -0
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
* v3.1.0, November 23, 2026 -- update ladder data for balance patch 5.0.17 (October 7, 2026), which rolled most of 5.0.16 back to 5.0.15. Replays from the 5.0.16 era keep their 5.0.16 values:
|
|
5
|
+
* Warpgate Research no longer speeds up Gateway unit production
|
|
6
|
+
* Reaper 34->32, Adept 33->30. High/Dark Templar train time isn't mentioned in the notes, so it stays at 40
|
|
7
|
+
* a replay with no timestamp now gets its Warpgate Research modifier from its build number (5.0.16 = 97364, 5.0.16b = 97563, 5.0.17 = 98310, per Blizzard's s2protocol) instead of the current value
|
|
8
|
+
* starting supply is now read from the replay, so 5.0.16 games, which started with 8 workers, no longer report a starting supply of 6
|
|
4
9
|
* v3.0.0, July 29, 2026 -- build times are now selected by the date a replay was played, so replays are scored with the values that were live at the time rather than today's. Build order timings for older replays change as a result, hence the major version:
|
|
5
10
|
* `BUILD_TIME_CHANGES` in `lotv_constants.py` records every LotV build time change back to 3.8.0 (2016-11-22), sourced from the Blizzard patch notes. `BUILD_DATA_HISTORY` is derived from it, and each unit's recorded changes are verified at import to chain into its current value
|
|
6
11
|
* that check surfaced five errors: High/Dark Templar were raised 39->43 in 5.0.16 before the hotfix cut them to 40; the Void Ray was reduced 43->37 in 5.0.2 and restored to 43 in 5.0.9, which had been applied here in reverse; Hyperflight Rotors was left at 121s through both the 5.0.11 cut to 100s and the 5.0.15 cut to 79s; the Stalker's 5.0.14 cut from 30s to 27s was missing; and the March 25, 2019 balance update raised the Cybernetics Core air upgrades alongside the Forge ones to 129/154/179, which 5.0.11 then reduced for the Forge only, so air and ground now differ
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spawningtool
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: Build order parser for StarCraft 2 replays
|
|
5
5
|
Home-page: https://github.com/StoicLoofah/spawningtool
|
|
6
6
|
Author: Kevin Leung
|
|
@@ -95,6 +95,11 @@ Thanks To
|
|
|
95
95
|
Changes
|
|
96
96
|
=======
|
|
97
97
|
|
|
98
|
+
* v3.1.0, November 23, 2026 -- update ladder data for balance patch 5.0.17 (October 7, 2026), which rolled most of 5.0.16 back to 5.0.15. Replays from the 5.0.16 era keep their 5.0.16 values:
|
|
99
|
+
* Warpgate Research no longer speeds up Gateway unit production
|
|
100
|
+
* Reaper 34->32, Adept 33->30. High/Dark Templar train time isn't mentioned in the notes, so it stays at 40
|
|
101
|
+
* a replay with no timestamp now gets its Warpgate Research modifier from its build number (5.0.16 = 97364, 5.0.16b = 97563, 5.0.17 = 98310, per Blizzard's s2protocol) instead of the current value
|
|
102
|
+
* starting supply is now read from the replay, so 5.0.16 games, which started with 8 workers, no longer report a starting supply of 6
|
|
98
103
|
* v3.0.0, July 29, 2026 -- build times are now selected by the date a replay was played, so replays are scored with the values that were live at the time rather than today's. Build order timings for older replays change as a result, hence the major version:
|
|
99
104
|
* `BUILD_TIME_CHANGES` in `lotv_constants.py` records every LotV build time change back to 3.8.0 (2016-11-22), sourced from the Blizzard patch notes. `BUILD_DATA_HISTORY` is derived from it, and each unit's recorded changes are verified at import to chain into its current value
|
|
100
105
|
* that check surfaced five errors: High/Dark Templar were raised 39->43 in 5.0.16 before the hotfix cut them to 40; the Void Ray was reduced 43->37 in 5.0.2 and restored to 43 in 5.0.9, which had been applied here in reverse; Hyperflight Rotors was left at 121s through both the 5.0.11 cut to 100s and the 5.0.15 cut to 79s; the Stalker's 5.0.14 cut from 30s to 27s was missing; and the March 25, 2019 balance update raised the Cybernetics Core air upgrades alongside the Forge ones to 129/154/179, which 5.0.11 then reduced for the Forge only, so air and ground now differ
|
|
@@ -100,7 +100,7 @@ BUILD_DATA = {
|
|
|
100
100
|
'is_morph': False
|
|
101
101
|
},
|
|
102
102
|
"Reaper": {
|
|
103
|
-
"build_time":
|
|
103
|
+
"build_time": 32,
|
|
104
104
|
"built_from": [ "Barracks" ],
|
|
105
105
|
"display_name": "Reaper",
|
|
106
106
|
'race': RACE_TERRAN,
|
|
@@ -277,7 +277,7 @@ BUILD_DATA = {
|
|
|
277
277
|
'is_morph': False
|
|
278
278
|
},
|
|
279
279
|
"Adept": {
|
|
280
|
-
"build_time":
|
|
280
|
+
"build_time": 30,
|
|
281
281
|
"built_from": [ "Gateway", "WarpGate" ],
|
|
282
282
|
"display_name": "Adept",
|
|
283
283
|
'race': RACE_PROTOSS,
|
|
@@ -1635,7 +1635,7 @@ BUILD_DATA = {
|
|
|
1635
1635
|
# here, which is not necessarily what was live then. (HotS and WoL use
|
|
1636
1636
|
# hots_constants, which has no date handling at all.) Swept for build time
|
|
1637
1637
|
# changes: 3.8.0, the 2017-12-18/2019-03-25/2019-08-21 balance updates, 4.7.1,
|
|
1638
|
-
# 4.8.2, 4.11.0, 5.0.2, 5.0.9, and 5.0.11 through 5.0.
|
|
1638
|
+
# 4.8.2, 4.11.0, 5.0.2, 5.0.9, and 5.0.11 through 5.0.17. Not swept: 4.0-4.6,
|
|
1639
1639
|
# 4.8.0/1/3/4, 4.9.x, the rest of 4.10.x, 5.0.0/1, 5.0.3-5.0.8, 5.0.10, and the
|
|
1640
1640
|
# 5.0.11 hotfixes -- a gap there is no guarantee nothing changed, since 5.0.14 and
|
|
1641
1641
|
# 5.0.15 both held changes that went unnoticed for years.
|
|
@@ -1740,6 +1740,12 @@ BUILD_TIME_CHANGES = [
|
|
|
1740
1740
|
'HighTemplar': (43, 40),
|
|
1741
1741
|
'Reaper': (32, 34),
|
|
1742
1742
|
}),
|
|
1743
|
+
# Rolled most of 5.0.16 back to 5.0.15. The notes don't mention High/Dark
|
|
1744
|
+
# Templar train time, so they stay at the hotfix's 40s.
|
|
1745
|
+
('5.0.17', '2026-10-07', {
|
|
1746
|
+
'Adept': (33, 30),
|
|
1747
|
+
'Reaper': (34, 32),
|
|
1748
|
+
}),
|
|
1743
1749
|
]
|
|
1744
1750
|
|
|
1745
1751
|
|
|
@@ -1828,40 +1834,34 @@ def build_data_for_timestamp(timestamp):
|
|
|
1828
1834
|
return adjusted if adjusted is not None else BUILD_DATA
|
|
1829
1835
|
|
|
1830
1836
|
|
|
1831
|
-
# Warp Gate Research
|
|
1837
|
+
# Warp Gate Research sped up Gateway unit production once complete, as a
|
|
1832
1838
|
# fraction of the normal build time. Introduced in 5.0.16 at 40% off (0.6x);
|
|
1833
|
-
# 5.0.16b increased it to 50% off (0.5x).
|
|
1834
|
-
#
|
|
1839
|
+
# 5.0.16b increased it to 50% off (0.5x); 5.0.17 removed it (None). Oldest
|
|
1840
|
+
# first: (patch_label, effective_date, first_build, modifier). first_build is
|
|
1841
|
+
# from https://github.com/Blizzard/s2protocol and only matters for a replay
|
|
1842
|
+
# with no timestamp; the date decides otherwise, same as BUILD_TIME_CHANGES.
|
|
1835
1843
|
WARPGATE_MODIFIERS = [
|
|
1836
|
-
('5.0.16', '2026-06-22', 0.6),
|
|
1837
|
-
('5.0.16b', '2026-07-16', 0.5),
|
|
1844
|
+
('5.0.16', '2026-06-22', 97364, 0.6),
|
|
1845
|
+
('5.0.16b', '2026-07-16', 97563, 0.5),
|
|
1846
|
+
('5.0.17', '2026-10-07', 98310, None),
|
|
1838
1847
|
]
|
|
1839
1848
|
|
|
1840
|
-
# The percentage speedup itself only exists from the 5.0.16 build on.
|
|
1841
|
-
# WARPGATE_MODIFIERS says as much for a dated replay; this keeps an undated one,
|
|
1842
|
-
# which falls back to the current modifier, from getting a speedup that didn't
|
|
1843
|
-
# exist yet.
|
|
1844
|
-
WARPGATE_PERCENTAGE_BUILD = 97364
|
|
1845
|
-
|
|
1846
1849
|
_WARPGATE_MODIFIERS = [
|
|
1847
|
-
(_patch_timestamp(date), modifier) for _, date, modifier in WARPGATE_MODIFIERS
|
|
1850
|
+
(_patch_timestamp(date), build, modifier) for _, date, build, modifier in WARPGATE_MODIFIERS
|
|
1848
1851
|
]
|
|
1849
1852
|
|
|
1850
1853
|
|
|
1851
|
-
def warpgate_build_time_modifier(timestamp):
|
|
1854
|
+
def warpgate_build_time_modifier(timestamp, build):
|
|
1852
1855
|
"""
|
|
1853
1856
|
Fraction of the normal build time a Gateway unit takes once Warp Gate
|
|
1854
|
-
Research finishes, based on when the replay was played (unix seconds, UTC)
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1857
|
+
Research finishes, based on when the replay was played (unix seconds, UTC),
|
|
1858
|
+
or on its build number if it has no timestamp. None outside the 5.0.16 to
|
|
1859
|
+
5.0.17 window when the percentage modifier existed, which is also how the
|
|
1860
|
+
parser spells "doesn't apply" for HotS and co-op.
|
|
1858
1861
|
"""
|
|
1859
|
-
if not timestamp:
|
|
1860
|
-
return _WARPGATE_MODIFIERS[-1][1]
|
|
1861
|
-
|
|
1862
1862
|
modifier = None
|
|
1863
|
-
for effective, current in _WARPGATE_MODIFIERS:
|
|
1864
|
-
if timestamp < effective:
|
|
1863
|
+
for effective, first_build, current in _WARPGATE_MODIFIERS:
|
|
1864
|
+
if (timestamp < effective) if timestamp else (build < first_build):
|
|
1865
1865
|
break
|
|
1866
1866
|
modifier = current
|
|
1867
1867
|
return modifier
|
|
@@ -184,7 +184,6 @@ class GameParser(object):
|
|
|
184
184
|
tracked_abilities = None
|
|
185
185
|
build_data = None
|
|
186
186
|
warpgate_modifier = None
|
|
187
|
-
warpgate_percentage_build = None
|
|
188
187
|
|
|
189
188
|
def __init__(self, replay_file):
|
|
190
189
|
self.replay_file = replay_file
|
|
@@ -350,14 +349,20 @@ class GameParser(object):
|
|
|
350
349
|
for event in self.replay.tracker_events:
|
|
351
350
|
if event.frame > 1:
|
|
352
351
|
break
|
|
352
|
+
if (event.name != 'PlayerStatsEvent' or
|
|
353
|
+
event.pid not in self.parsed_data['players'] or
|
|
354
|
+
event.frame != 1):
|
|
355
|
+
continue
|
|
356
|
+
food_used = int(event.food_used)
|
|
353
357
|
# TODO this is a hack for early LotV replays done in HotS
|
|
354
358
|
# and also correctly sets early supply
|
|
355
|
-
if
|
|
356
|
-
event.pid in self.parsed_data['players'] and
|
|
357
|
-
event.frame == 1 and int(event.food_used) == 12):
|
|
358
|
-
self.parsed_data['players'][event.pid]['supply'][0][1] = 12
|
|
359
|
+
if food_used == 12:
|
|
359
360
|
self.parsed_data['expansion'] = 'LotV'
|
|
360
361
|
self.constants = lotv_constants
|
|
362
|
+
# LotV starts with 12 workers, except 5.0.16 through 5.0.17,
|
|
363
|
+
# which started with 8
|
|
364
|
+
if self.constants is lotv_constants and food_used:
|
|
365
|
+
self.parsed_data['players'][event.pid]['supply'][0][1] = food_used
|
|
361
366
|
|
|
362
367
|
self.frames_per_second = self.constants.FRAMES_PER_SECOND
|
|
363
368
|
self.bo_excluded = self.constants.BO_EXCLUDED
|
|
@@ -372,12 +377,11 @@ class GameParser(object):
|
|
|
372
377
|
timestamp = self.replay.unix_timestamp
|
|
373
378
|
if hasattr(self.constants, 'build_data_for_timestamp'):
|
|
374
379
|
self.build_data = self.constants.build_data_for_timestamp(timestamp)
|
|
375
|
-
self.warpgate_modifier = self.constants.warpgate_build_time_modifier(
|
|
376
|
-
|
|
380
|
+
self.warpgate_modifier = self.constants.warpgate_build_time_modifier(
|
|
381
|
+
timestamp, self.replay.build)
|
|
377
382
|
else:
|
|
378
383
|
self.build_data = self.constants.BUILD_DATA
|
|
379
384
|
self.warpgate_modifier = None
|
|
380
|
-
self.warpgate_percentage_build = None
|
|
381
385
|
|
|
382
386
|
def set_commander_talents(self):
|
|
383
387
|
"""
|
|
@@ -762,15 +766,12 @@ class GameParser(object):
|
|
|
762
766
|
|
|
763
767
|
build_time = cur_build_data['build_time'] * build_time_modifier
|
|
764
768
|
|
|
765
|
-
# Warp Gate Research
|
|
766
|
-
# 5.0.
|
|
767
|
-
#
|
|
768
|
-
#
|
|
769
|
-
# warpgate_modifier is None where this doesn't apply at all: HotS, co-op,
|
|
770
|
-
# and dated replays from before the mechanic existed.
|
|
769
|
+
# Warp Gate Research sped up Gateway unit production from 5.0.16 until
|
|
770
|
+
# 5.0.17 removed it, and 5.0.16b changed its size. warpgate_modifier is
|
|
771
|
+
# None where this doesn't apply at all: HotS, co-op, and replays from
|
|
772
|
+
# outside that window.
|
|
771
773
|
if self.warpgate_modifier is not None and \
|
|
772
774
|
player in self.warpgate_research_frame and \
|
|
773
|
-
self.replay.build >= self.warpgate_percentage_build and \
|
|
774
775
|
'Gateway' in cur_build_data.get('built_from', []):
|
|
775
776
|
warpgate_frame = self.warpgate_research_frame[player]
|
|
776
777
|
reduced_start = frame - build_time * self.warpgate_modifier
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spawningtool
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: Build order parser for StarCraft 2 replays
|
|
5
5
|
Home-page: https://github.com/StoicLoofah/spawningtool
|
|
6
6
|
Author: Kevin Leung
|
|
@@ -95,6 +95,11 @@ Thanks To
|
|
|
95
95
|
Changes
|
|
96
96
|
=======
|
|
97
97
|
|
|
98
|
+
* v3.1.0, November 23, 2026 -- update ladder data for balance patch 5.0.17 (October 7, 2026), which rolled most of 5.0.16 back to 5.0.15. Replays from the 5.0.16 era keep their 5.0.16 values:
|
|
99
|
+
* Warpgate Research no longer speeds up Gateway unit production
|
|
100
|
+
* Reaper 34->32, Adept 33->30. High/Dark Templar train time isn't mentioned in the notes, so it stays at 40
|
|
101
|
+
* a replay with no timestamp now gets its Warpgate Research modifier from its build number (5.0.16 = 97364, 5.0.16b = 97563, 5.0.17 = 98310, per Blizzard's s2protocol) instead of the current value
|
|
102
|
+
* starting supply is now read from the replay, so 5.0.16 games, which started with 8 workers, no longer report a starting supply of 6
|
|
98
103
|
* v3.0.0, July 29, 2026 -- build times are now selected by the date a replay was played, so replays are scored with the values that were live at the time rather than today's. Build order timings for older replays change as a result, hence the major version:
|
|
99
104
|
* `BUILD_TIME_CHANGES` in `lotv_constants.py` records every LotV build time change back to 3.8.0 (2016-11-22), sourced from the Blizzard patch notes. `BUILD_DATA_HISTORY` is derived from it, and each unit's recorded changes are verified at import to chain into its current value
|
|
100
105
|
* that check surfaced five errors: High/Dark Templar were raised 39->43 in 5.0.16 before the hotfix cut them to 40; the Void Ray was reduced 43->37 in 5.0.2 and restored to 43 in 5.0.9, which had been applied here in reverse; Hyperflight Rotors was left at 121s through both the 5.0.11 cut to 100s and the 5.0.15 cut to 79s; the Stalker's 5.0.14 cut from 30s to 27s was missing; and the March 25, 2019 balance update raised the Cybernetics Core air upgrades alongside the Forge ones to 129/154/179, which 5.0.11 then reduced for the Forge only, so air and ground now differ
|
|
@@ -289,21 +289,49 @@ class LotVBuildDataHistoryTest(unittest.TestCase):
|
|
|
289
289
|
self.assertEqual(self.seconds(after, 'Adept'), 33)
|
|
290
290
|
self.assertEqual(self.seconds(after, 'Reaper'), 34)
|
|
291
291
|
|
|
292
|
+
def test_5_0_17_rollback(self):
|
|
293
|
+
"""
|
|
294
|
+
5.0.17 put the Reaper and Adept back to their 5.0.15 values; High/Dark
|
|
295
|
+
Templar keep the hotfix's 40s
|
|
296
|
+
"""
|
|
297
|
+
before = self.timestamp('2026-10-06')
|
|
298
|
+
after = self.timestamp('2026-10-07')
|
|
299
|
+
self.assertEqual(self.seconds(before, 'Adept'), 33)
|
|
300
|
+
self.assertEqual(self.seconds(before, 'Reaper'), 34)
|
|
301
|
+
self.assertEqual(self.seconds(after, 'Adept'), 30)
|
|
302
|
+
self.assertEqual(self.seconds(after, 'Reaper'), 32)
|
|
303
|
+
self.assertEqual(self.seconds(after, 'HighTemplar'), 40)
|
|
304
|
+
|
|
292
305
|
def test_undated_replay_uses_current_build_times(self):
|
|
293
306
|
build_data = lotv_constants.build_data_for_timestamp(None)
|
|
294
307
|
self.assertIs(build_data, lotv_constants.BUILD_DATA)
|
|
295
308
|
|
|
296
309
|
def test_warpgate_modifier_by_date(self):
|
|
297
|
-
modifier
|
|
310
|
+
def modifier(date):
|
|
311
|
+
return lotv_constants.warpgate_build_time_modifier(self.timestamp(date), 0)
|
|
298
312
|
# Before 5.0.16 there was no percentage modifier, only separate warp-in
|
|
299
313
|
# build times, so this doesn't apply rather than defaulting to 40%
|
|
300
|
-
self.assertIsNone(modifier(
|
|
301
|
-
self.assertIsNone(modifier(
|
|
302
|
-
self.assertEqual(modifier(
|
|
303
|
-
self.assertEqual(modifier(
|
|
304
|
-
self.assertEqual(modifier(
|
|
305
|
-
self.assertEqual(modifier(
|
|
306
|
-
|
|
314
|
+
self.assertIsNone(modifier('2016-01-01'))
|
|
315
|
+
self.assertIsNone(modifier('2026-06-21'))
|
|
316
|
+
self.assertEqual(modifier('2026-06-25'), 0.6) # 5.0.16, 40%
|
|
317
|
+
self.assertEqual(modifier('2026-07-15'), 0.6)
|
|
318
|
+
self.assertEqual(modifier('2026-07-16'), 0.5) # 5.0.16b, 50%
|
|
319
|
+
self.assertEqual(modifier('2026-08-01'), 0.5)
|
|
320
|
+
# 5.0.17 removed the speedup again
|
|
321
|
+
self.assertIsNone(modifier('2026-10-07'))
|
|
322
|
+
|
|
323
|
+
def test_undated_warpgate_modifier_by_build(self):
|
|
324
|
+
"""
|
|
325
|
+
a replay with no timestamp falls back to its build number
|
|
326
|
+
"""
|
|
327
|
+
def modifier(build):
|
|
328
|
+
return lotv_constants.warpgate_build_time_modifier(None, build)
|
|
329
|
+
self.assertIsNone(modifier(96883)) # 5.0.15
|
|
330
|
+
self.assertEqual(modifier(97364), 0.6) # 5.0.16
|
|
331
|
+
self.assertEqual(modifier(97425), 0.6) # 5.0.16 hotfix
|
|
332
|
+
self.assertEqual(modifier(97563), 0.5) # 5.0.16b
|
|
333
|
+
self.assertIsNone(modifier(98310)) # 5.0.17
|
|
334
|
+
self.assertIsNone(modifier(98745))
|
|
307
335
|
|
|
308
336
|
|
|
309
337
|
if __name__ == '__main__':
|
|
Binary file
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"supply": [
|
|
30
30
|
[
|
|
31
31
|
0,
|
|
32
|
-
|
|
32
|
+
8
|
|
33
33
|
],
|
|
34
34
|
[
|
|
35
35
|
1,
|
|
@@ -22274,7 +22274,7 @@
|
|
|
22274
22274
|
"supply": [
|
|
22275
22275
|
[
|
|
22276
22276
|
0,
|
|
22277
|
-
|
|
22277
|
+
8
|
|
22278
22278
|
],
|
|
22279
22279
|
[
|
|
22280
22280
|
1,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|