Unit Option Which Suicides Only When It Registers A Hit (Mines)


  • Admin

    Title pretty much says it all.

    Would love to see a unit that dies only if it registers a hit.

    If used on its own it could be valuable in creating a variety of units.

    If used in conjunction with some existing unit attachments it can be used to solve one of the most challenging unit designs no map has ever mastered. =)

    Things that need added:

    1. New unit attribute: isSuicideOnHit
    2. Engine needs to ability to determine which units get hits
    3. Any units having this property would need to be grouped by type and roll dice for each group for LL so you know which units get the hits. For example in LL, if I have say 2 mineA and 2 mineB then I have to add values for mineA's and roll, then add values for mineB's and roll.

    PR: https://github.com/triplea-game/triplea/pull/2543

    Example:
    <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>


  • Admin

    @hepps u think to much :)


  • Admin

    @prastle I'm like middle bowl of porridge in the bears house... not too hot... not too cold....

    Just right.


  • Admin

    @hepps didnt ya make us think to much the first time?
    :)


  • Admin

    @hepps Yeah, this one will be interesting. I'll add it to the list but have a feeling it'll be fairly difficult. Think about this using LL and that will make you realize that it requires the following things:

    1. Engine needs to ability to determine which units get hits
    2. Any units having this property would need to be grouped by type and roll dice for each group for LL so you know which units get the hits. For example in LL, if I have say 2 mineA and 2 mineB then I have to add values for mineA's and roll, then add values for mineB's and roll.
    3. New unit attribute: isSuicideOnHit

  • Admin

    @redrum Oh I never said this was an easy one.

    Also in LL if you have 2 units and you end with 1 successful hit... then only one of the two units would be expected to die.


  • Admin

    @hepps Yeah. For LL, it'll add up all attack/defense for each type of unit that has this property and then based on number of hits then kill off that many of the units. So if you had say 5 mines @ 3d12 in LL then you get 1 hit plus one roll @ 3. If you miss then 1 mine dies, if you hit then 2 mines die.


  • Admin

    @redrum Yup.


  • Admin

    @redrum hmm are we overthinking this? maybe he gives a prerelease
    ;)


  • Admin

    @prastle there is nothing "over" about it. If there is a better way to define a mine... please share it with me. If there is one already designed that functions reasonably good... point me in that direction... I will DL it and try it out. =)


  • Admin

    @hepps I was just thinking that perhaps frostion's mortar/rocket = amo code could be reconfigured possibly from Tribes.


  • Admin

    @prastle Don't see how those would help in this situation. That is definitely good as a solution for a bombard capability and is a feature already included in GD in various ways. Explain to me how you would alter its behavior in an XML to perform as a mine?



  • Very new to this whole thing, but would there be a way to utilize anything that the battleship or sub uses?

    Instead of a mine think more like a minefield. So when the containing territory is attacked it can roll for damage like a battleship would at the very beginning of a battle? Maybe have movement similar to an AA gun? And speaking of AA gun, it could just work like that but for ground units instead of air.

    Or if you want it to be more like a unit, maybe it could work kinda like a sub works where there is a roll before the traditional combat and but it dies instead of submerging? In this way you could later have a minesweeper unit instead of a destroyer to counter it.

    All this being said, I don't really know how to go about creating a new unit type, I just downloaded the code and haven't begun to look at it at all so I have no idea how feasible that would be, but I really like the idea!


  • Admin

    @combaticus Yah exactly what we are trying to achieve.

    And to be clear... when I say a mine unit... what we are really saying is it is a group of mines or a mine field represented by a single unit on the map.


  • Admin

    @hepps Do you have any examples of unit attachments that would use the new "isSuicideOnHit" attribute? Just want to make sure I can test something close to what you are looking to use.


  • Admin

    @redrum Age of Tribes mortar shells would be an example but doesn't work for what he wants


  • Admin

    Is this thread still “alive”? =) Something defiantly needs to be done about the way suicide units work. At least in two of the maps I have made (or actually all my maps using suicide units) they don’t work as I would like them to. As @prastle mentions, the Mortars ammo units of Age of Tribes are among them:

        <attachment name="unitAttachment" attachTo="Mortar-Bombardment" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
            <option name="attack" value="2"/>
            <option name="defense" value="2"/>
            <option name="movement" value="1"/>
            <option name="isAir" value="true"/>
            <option name="isSuicide" value="true"/>
            <option name="isKamikaze" value="true"/>
            <option name="isStrategicBomber" value="true"/>
            <option name="bombingMaxDieSides" value="2"/>
        </attachment>
    

    If the above bombard ammo unit is part of a defense force, and their territory is attacked by a sole enemy Mortar-Bombardment, then it triggers (as Defending Suicide and Munition Units Do Not Fire = false) and it dies. So bombing a territory with just one bombard ammo unit actually triggers ALL the defenders bombard ammo to go of needlessly... BOOM!

    The problem is I cant avoid this. If “Defending Suicide and Munition Units Do Not Fire = true” then not even a full scale enemy attack with troops would trigger the suicide units, and of course suicide units should be usable as defense.

    I would think that this is also an issue for all kamikaze planes, at least in Iron War. (Iron War’s Kamikaze planes have “Defending Suicide and Munition Units Do Not Fire = true”, and this bugs me.)

    So maybe suicide units should not be able to be triggered enemy suicide unit, only by normal units?

    I mean if a sole suicide unit attacks another suicide unit or a force containing a suicide unit, it would make sense that if the sole attacker misses the target and dies, the opposing suicide unit would not think of doing the same against the already dead enemy.

    But if the attacking suicide unit had brought along normal troops, then it would make sense for the defending suicide unit to be a part of the defense, and thereby also being sure to die trying.


  • Admin

    @frostion This was intended to be handled with the "canHide" feature request. =)


Log in to reply
 

Looks like your connection to TripleA Forum was lost, please wait while we try to reconnect.