-
Notifications
You must be signed in to change notification settings - Fork 707
Fix predictable SAM hit patterns #2532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…d factors Previously SAM missiles had deterministic hit/miss patterns based solely on build order, since they were seeded only with the unit ID. This made gameplay predictable. Now the random seed combines game ticks, SAM ID, and target ID for less predictable but still deterministic results, improving game balance while maintaining replayability.
WalkthroughThe PR modifies SAMLauncherExecution.ts to change how the pseudoRandom number generator is seeded. Instead of early initialization with just the SAM identifier, seeding now occurs after targeting decisions, using a composite seed of ticks, SAM identifier, and selected target ID. This ties random behavior to dynamic targeting choices. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (8)📓 Common learnings📚 Learning: 2025-08-24T11:13:08.495ZApplied to files:
📚 Learning: 2025-10-20T20:15:28.858ZApplied to files:
📚 Learning: 2025-10-18T17:54:01.311ZApplied to files:
📚 Learning: 2025-10-27T09:47:26.395ZApplied to files:
📚 Learning: 2025-10-20T11:02:16.969ZApplied to files:
📚 Learning: 2025-05-18T23:36:12.847ZApplied to files:
📚 Learning: 2025-05-18T23:36:12.847ZApplied to files:
🧬 Code graph analysis (1)src/core/execution/SAMLauncherExecution.ts (1)
🔇 Additional comments (1)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I think we're planning on removing the hit/miss chance altogether? |
|
yes, consider this a hotfix until thats the case. |
Description:
Previously SAM missiles had deterministic hit/miss patterns based solely on build order, since they were seeded only with the unit ID. This made gameplay predictable.
Now the random seed combines game ticks, SAM ID, and target ID for less predictable results.
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
DISCORD_USERNAME