I think this option would be much better if it would offer a numerical value at which the unit suicides, with a boolean for determining if this value is influenced by supports (and maybe splitting the options between attack and defence and between regular attack and AA ones).
The current behaviour would be a subset, where you set such value equal to the attack/defence value (so that it suicides only when it hits).
This way, the regular suicide option would become redundant too (and could be deprecated or refactored as a shortcut for generating such option with value equal to the dice sides), as it could be covered by the above option, setting the value equal to the dice sides.
Moreover, I understand this would fully cover this feature request, as well:
https://forums.triplea-game.org/topic/1579/suicide-munitions-unit-with-support
And I also understand it would allow supporting suicide units (for example, for representing ammunition consumption).
Practically, instead of having:
<attachment name="unitAttachment" attachTo="germanNavalMine" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="attack" value="0"/> <option name="defense" value="0"/> <option name="isSea" value="true"/> <option name="isSub" value="true"/> <option name="isAAforCombatOnly" value="true"/> <option name="mayOverStackAA" value="true"/> <option name="typeAA" value="navalmine"/> <option name="targetsAA" value="Battleship:Cruiser:Destroyer:Submarine:Transport"/> <option name="maxAAattacks" value="1"/> <option name="maxRoundsAA" value="1"/> <option name="movement" value="0"/> <option name="attackAA" value="2"/> <option name="damageableAA" value="true"/> <option name="canInvadeOnlyFrom" value="none"/> <option name="isSuicideOnHit" value="true"/> </attachment>you would have:
<attachment name="unitAttachment" attachTo="germanNavalMine" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="attack" value="0"/> <option name="defense" value="0"/> <option name="isSea" value="true"/> <option name="isSub" value="true"/> <option name="isAAforCombatOnly" value="true"/> <option name="mayOverStackAA" value="true"/> <option name="typeAA" value="navalmine"/> <option name="targetsAA" value="Battleship:Cruiser:Destroyer:Submarine:Transport"/> <option name="maxAAattacks" value="1"/> <option name="maxRoundsAA" value="1"/> <option name="movement" value="0"/> <option name="attackAA" value="2"/> <option name="damageableAA" value="true"/> <option name="canInvadeOnlyFrom" value="none"/> <option name="isSuicideOnRolling" value="2"/> </attachment>
