Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    Making a unit attack alone

    Map Making
    2
    3
    42
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RogerCooper
      RogerCooper last edited by

      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?
      
      W 1 Reply Last reply Reply Quote 3
      • W
        wc_sumpton @RogerCooper last edited by wc_sumpton

        @rogercooper

        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...

        RogerCooper 1 Reply Last reply Reply Quote 2
        • RogerCooper
          RogerCooper @wc_sumpton last edited by

          @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.

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums