Skip to content

Adjust Gateway unit build times after Warpgate Research#67

Merged
StoicLoofah merged 4 commits into
masterfrom
warpgate-research-build-time
Jun 25, 2026
Merged

Adjust Gateway unit build times after Warpgate Research#67
StoicLoofah merged 4 commits into
masterfrom
warpgate-research-build-time

Conversation

@StoicLoofah

@StoicLoofah StoicLoofah commented Jun 25, 2026

Copy link
Copy Markdown
Owner

https://news.blizzard.com/en-us/article/24259080/starcraft-ii-5-0-16-patch-notes

Warpgate Research speeds up Gateway unit production time by 40%.

Summary

  • Track when each player completes Warpgate Research (WarpGateResearch upgrade event frame)
  • Apply a 40% build time reduction when back-calculating start frames for Gateway units produced after research completes
  • Conservatively handle the edge case where a unit's estimated start time falls near the research completion frame — only apply the reduction when the reduced start is clearly after research completed

Test plan

  • Verify existing tests still pass (3 pre-existing failures + 1 error are unchanged)
  • Test with a replay where a Protoss player completes Warpgate Research and produces Gateway units before and after

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for the StarCraft II 5.0.16 change where completing WarpGate Research reduces Gateway-trained unit build times by 40% when back-calculating build-order start frames from tracker events.

Changes:

  • Track each player’s WarpGateResearch completion frame from UpgradeCompleteEvent.
  • Adjust adjust_build_time() to apply a 0.6x build-time factor for Gateway units produced after Warpgate completes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread spawningtool/parser.py Outdated
Comment on lines +748 to +754
# Warpgate Research speeds up Gateway unit production by 40%
if player in self.warpgate_research_frame and \
'Gateway' in cur_build_data.get('built_from', []):
warpgate_frame = self.warpgate_research_frame[player]
reduced_start = frame - build_time * 0.6
if reduced_start >= warpgate_frame:
build_time = build_time * 0.6
Comment thread spawningtool/parser.py
Comment on lines +749 to +754
if player in self.warpgate_research_frame and \
'Gateway' in cur_build_data.get('built_from', []):
warpgate_frame = self.warpgate_research_frame[player]
reduced_start = frame - build_time * 0.6
if reduced_start >= warpgate_frame:
build_time = build_time * 0.6
Kevin Leung and others added 2 commits June 24, 2026 21:54
Warpgate Research now speeds up Gateway unit production by 40%.
Track when each player completes WarpGateResearch, then apply the
reduced build time when back-calculating unit start frames. Uses a
conservative check for the edge case where a unit starts building
around the time research completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gate the 40% Gateway unit speedup to build >= 97364 (patch 5.0.16+)
so older replays are not affected. Add a replay and golden JSON test
for the new patch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@StoicLoofah StoicLoofah force-pushed the warpgate-research-build-time branch from 38c9be7 to e924605 Compare June 25, 2026 04:54
Kevin Leung and others added 2 commits June 24, 2026 22:02
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@StoicLoofah StoicLoofah merged commit c844e07 into master Jun 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants