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

47.14 On-map artillery not allowed to pre-designate autohit hexes when unofficial rule is engaged. #2477

Closed
orcmaul opened this issue Dec 4, 2020 · 6 comments
Labels
Bug Help Wanted The Core developers are unlikely to work on this and are open to community help Unofficial Anything that is not an official BT rule

Comments

@orcmaul
Copy link

orcmaul commented Dec 4, 2020

Found in Megamek Windows 0.47.14.

When (Unofficial) Allow artillery units on-map to pre-designate autohit hexes is set to true and an artillery equipped unit is deployed on the map at the start of the game the game does not start with a phase for designating autohit hexes. Tested with artillery deploying after the start of the game and issue persists. Off-map artillery working as intended with pre-designating autohit hexes phase.

Repro:
1: Set (Unofficial) Allow artillery units on-map to pre-designate autohit hexes to true.
2: Add a unit with an artillery piece to your side. (I tested with Thor artillery vehicle and Sniper artillery vehicle).
3: Start Game. Game immediately proceeds to deployment phase and regular play continues from there. The phase for pre-designating autohit hexes never occurs.

Speculation:
Because the unit is deploying on-map in the deployment phase the preceding pre-designating phase is not being triggered. Unfortunately, it doesn't happen in subsequent turns either so I guess it's not checking to see if that ever happened.

@SJuliez SJuliez added Bug Unofficial Anything that is not an official BT rule labels Dec 7, 2020
@sixlettervariables sixlettervariables added the Help Wanted The Core developers are unlikely to work on this and are open to community help label Dec 18, 2020
@sixlettervariables
Copy link
Contributor

Unofficial rules are at the low end of our support structure, so I've tagged this Help Wanted. It is unlikely any of the core team will get to this in the near future, but we always welcome help!

@neoancient
Copy link
Member

The problem is in Entity::isEligibleFor(IGame.Phase). The first statement returns false for any unit that's not deployed if it's not the deployment phase. Offboard artillery is considered deployed, so it gets to be eligible for PHASE_SET_ARTYAUTOHEXES.

@neoancient
Copy link
Member

PHASE_STARTING_SCENARIO is only used for scenarios and is not used for regular games.

@TenkawaBC
Copy link
Contributor

Thanks Neoancient. I've been digging further at it, but good to know.

@TenkawaBC
Copy link
Contributor

Branch created and pull request submitted with potential fix.

@Windchild292
Copy link
Contributor

Fixed in #2558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Help Wanted The Core developers are unlikely to work on this and are open to community help Unofficial Anything that is not an official BT rule
Projects
None yet
Development

No branches or pull requests

6 participants