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

Fix for wrong bot chase behavior #1100

Merged

Conversation

NickAragua
Copy link
Member

This fixes a bot behavior that's been annoying me for quite a while. Normally, bot units under "forced withdrawal" don't fire until fired upon, but, when the bot is under "immediate withdrawal" rules, that goes out the window.

Best way to test this is to give the bot a tank of some kind, yourself a unit with a lot of low damage/clustering weapons (SRMs, small lasers, MGs). Set 'forced withdrawal' to on and give the bot a 'destination edge'.

The expected behavior is that it'll shoot at you normally. When you cripple it (armor breach, immobilized, etc), it should not shoot at you the following round.

If you shoot or kick it subsequently, it should return fire on the following round.

@NickAragua
Copy link
Member Author

Let's hold off on this until I make the unit tests pass.

@NickAragua
Copy link
Member Author

Ok, unit tests are working now, but I'm going to wait until the gradle branch gets merged in to make that PR.

Copy link
Member

@neoancient neoancient left a comment

Choose a reason for hiding this comment

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

We shouldn't be merging anything into master that won't compile. If you have fixes for the unit tests in another branch you should be able to cherry-pick them into this one.

@NickAragua NickAragua mentioned this pull request Aug 20, 2018
@NickAragua
Copy link
Member Author

Ok. Put up a separate PR with just the unit test changes cherry-picked.

@NickAragua NickAragua merged commit f582657 into MegaMek:master Aug 21, 2018
NickAragua added a commit that referenced this pull request Aug 21, 2018
@NickAragua NickAragua deleted the fix_for_wrong_bot_chase_behavior branch August 25, 2018 02:05
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.

None yet

3 participants