Skip to content
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

Scouts, Scout: Refactored StratCon Scenario Deployment to Support Scout Role Behavior #5362

Merged
merged 2 commits into from
Dec 15, 2024

Conversation

IllianiCBT
Copy link
Collaborator

It has long been a point of frustration for players that when scouting a StratCon strategic map, with a force assigned to the scout role, if a random scenario spawns it will spawn on top of the scouts forcing them into often uneven fights. While there is a degree of realism there, it doesn't offer the best play experience.

Now, when scouting, if a random scenario is spawned it will spawn in an empty adjacent empty hex (if possible). Only if all adjacent are occupied (highly unlikely) will the scenario spawn on top of the scout force.

While I recognize there may be some desire for scouts to occasionally fail to evade enemy forces, or to have scout suitable scenarios, I opted for this system as we do not currently categorize scenario templates based on force role suitability. This would be a non-zero effort implementation.

Implemented logic to relocate scout forces to adjacent unoccupied hexes during scenario generation. Added a utility function to identify suitable adjacent coordinates, prioritizing player-allied facilities and forces when applicable. Additionally, cleaned up comments and improved clarity in deployment processing.
Replaced redundant logic with streamlined utility calls for selecting random items and simplified adjacent coordinate checks. Removed unused parameters and dead code to improve maintainability and clarify functionality.
@IllianiCBT IllianiCBT added the StratCon Bugs relating strictly to StratCon label Dec 14, 2024
@IllianiCBT IllianiCBT self-assigned this Dec 14, 2024
@HammerGS
Copy link
Member

I think this is a starting point, but we should look at having scouting fails that lead them into combat at some point.

@HammerGS HammerGS merged commit b4f7559 into MegaMek:master Dec 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
StratCon Bugs relating strictly to StratCon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants