Making a unit attack alone
-
I am working on mod for the game "East & West" that has an atomic bomb unit. Under the rules, atomic bombs can't attack with other units. I don't think I can prevent that from happening but I can discourage by penalizing units attacking with the bomb and enhancing the defender.
Here is my code
<attachment name="unitAttachment" attachTo="fusion_bomb" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="movement" value="6"/> <option name="attack" value="6"/> <option name="attackRolls" value="10"/> <option name="defense" value="0"/> <option name="attackAA" value="0"/> <option name="offensiveAttackAA" value="1"/> <option name="offensiveAttackAAmaxDieSides" value="6"/> <option name="maxAAattacks" value="-1"/> <option name="isAAforCombatOnly" value="true"/> <option name="typeAA" value="nuclearBlast"/> <option name="targetsAA" value="fighter:bomber"/> <option name="isAir" value="true"/> <option name="canAirBattle" value="false"/> <option name="isSuicideOnAttack" value="true"/> </attachment> <attachment name="supportAttachmentAtomicInterference1" attachTo="fission_bomb" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType"> <option name="unitType" value="infantry:armor:heavy_armor:fighter:bomber:battleship:cruiser:carrier:submarine:self-propelled_artillery"/> <option name="faction" value="allied"/> <option name="side" value="offence"/> <option name="dice" value="strength"/> <option name="bonus" value="-6"/> <option name="number" value="99"/> <option name="bonusType" value="nuclear"/> <option name="players" value="Soviet_Union:Britain:Western_Europe:United_States"/> </attachment> <attachment name="supportAttachmentAtomicInterference2" attachTo="fission_bomb" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType"> <option name="unitType" value="infantry:armor:heavy_armor:fighter:bomber:battleship:cruiser:carrier:submarine:self-propelled_artillery"/> <option name="faction" value="enemy"/> <option name="side" value="offence"/> <option name="dice" value="strength"/> <option name="bonus" value="6"/> <option name="number" value="99"/> <option name="bonusType" value="nuclear"/> <option name="players" value="Soviet_Union:Britain:Western_Europe:United_States"/> </attachment> The first two attachments work properly. The last one doesn't seem to have an effect. I am doing anything wrong? -
I'm trying to understand what you are saying compared to what is being presented. Why is there AA options for the fusion_bomb? What I'm not seeing is any options for <canNotTarget> or <canNotBeTargetedBy>, so does the fusion_bomb have the ability to attack fighter:bomber twice during a combat round? Once during the AA combat and again during normal combat?
As to the <supportAttachment>s, the first one reads; While the fusion_bomb is on offence for the listed players, it can apply 99 "nuclear" bonuses of a -6 value to the list of allied units which can receive the "nuclear" bonus only once.
The second one reads; While the fusion_bomb is on offence for the listed players, it can apply 99 "nuclear" bonuses of a 6 value to the list of enemy units which can receive the "nuclear" bonus only once.The problem is with "isSuicideOnAttack". The fusion_bomb will be removed after its attack roll so there will be no bonuses given to enemy units because the fusion_bomb will not be there.
Cheers...
-
@wc_sumpton said in Making a unit attack alone:
The problem is with "isSuicideOnAttack". The fusion_bomb will be removed after its attack roll so there will be no bonuses given to enemy units because the fusion_bomb will not be there.
Thanks for the help. The first support attachment should be good enough.
The AA attack reflects an EMP attack effect from the "East & West" game.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login