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

Fixes for flame based infantry bugs #4867

Merged
merged 12 commits into from
Nov 9, 2023
Merged

Conversation

neoancient
Copy link
Member

@neoancient neoancient commented Nov 2, 2023

This fixes a number of related bugs with flame-based infantry weapons.
The most extensive change is the introduction of a subclass of Mounted that tracks both primary and secondary weapons and the movement of mode queries into Mounted. This was done because the flame-based effects are in play regardless of which weapon has the F attribute and the Mounted for the attack only had access to the weapon that is used to calculate the range.

For flame-based weapons that are capable of indirect fire, I added a new Indirect/Heat mode (and added indirect fire to the non-inferno mortar while I was at it).

InfantryHeatWeaponHandler needed significant revisions. As it is now, infantry would do heat but no damage to mechs if the BMM flamer option is checked (which should do heat + damage) and damage but no heat in all other situations. My changes have it doing heat + damage to all heat-tracking units (mechs, ASF, small craft) when the BMM option is checked, heat only to those units when not checked, and damage to all other units. If the weapon is in non-heat mode the InfantryWeaponHandler is used instead to do damage only.

Update: the heat+damage mode is now an unofficial option separate from BMM flamers.

Fixes #4793
Fixes #4213

Copy link
Member

@NickAragua NickAragua left a comment

Choose a reason for hiding this comment

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

Looks good, some minor thoughts.

megamek/src/megamek/common/Entity.java Show resolved Hide resolved
megamek/src/megamek/common/Mounted.java Outdated Show resolved Hide resolved
megamek/src/megamek/common/actions/WeaponAttackAction.java Outdated Show resolved Hide resolved
@neoancient neoancient marked this pull request as draft November 4, 2023 23:08
@neoancient
Copy link
Member Author

Converting to draft pending implementing ruling about BMM heat option and non-Mech units.

@neoancient neoancient marked this pull request as ready for review November 5, 2023 02:51
@HammerGS
Copy link
Member

HammerGS commented Nov 6, 2023

Curious if Princess will be able to use IDF with infantry/BA once this is done?

@neoancient neoancient merged commit 5e796cb into master Nov 9, 2023
4 checks passed
@neoancient neoancient deleted the infantry_weapon_modes branch December 12, 2023 18:01
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.

Flame Based Infantry Bugs RFE: Add CI indirect fire for mortars
3 participants