-
Notifications
You must be signed in to change notification settings - Fork 291
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
dont allow bot to deploy industrial mech in to water depth 2 or greater #4764
dont allow bot to deploy industrial mech in to water depth 2 or greater #4764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A couple of questions.
&& !movingUnit.hasEnvironmentalSealing() | ||
&& (movingUnit.getEngine().getEngineType() == Engine.COMBUSTION_ENGINE) | ||
&& hex.depth() >= 2 | ||
&& step.equals(lastStep)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So a mech can move through super deep water and not flood the engine as long as it ends the movement with the engine above water?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The full rules from the footnote on TW page 52 are interesting, and unusual compared to the rules for various other non-fully-sealed units winding up underwater. To stay underwater indefinitely, Industrialmechs need environmental sealing and an underwater-capable engine type. However, IMs that don't meet these requirements can still enter a hex where they will be fully underwater, but they are destroyed if they remain fully underwater in the end phase of the turn after they initially entered the water. In other words, a non-sealed ICE IM could walk into depth 2 water and end its movement there on one turn and survive as long as it managed to climb out the next turn. They would be considered destroyed if they failed to leave the deep water after one turn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, so maybe then the criteria should be "if the move path both starts and ends under water", rather than just "if the move path ends under water".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think going into depth 2 water is also dangerous, so it should be weighted also. you many not be allowed to move out of it and end up dead earlier than if you were out of water.
I should also add a smaller weight for going into depth 1 water, since if you then go prone there for 2 rounds you will die.
* Returns true if the specified hex contains some sort of deadly | ||
* terrain. | ||
*/ | ||
public boolean isLocationDeadly(Coords c) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume implementing this for other unit types is a "future development" type thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, also to make it similar to isLocationProhibited()
fixes #4550