Unit Option Can Submerge/Hide for Land Units (Partisan/Guerrilla/Spy/Diplomat/Munition)
-
"Is Stealth" (ie. a submerge or hide ability) available for land units.
Phases
1. Allowing the existing system to work for land/air units
2. Breaking isSub and isDestroyer into smaller attributes so more fine grained control can be achieved (canHide, firstStrike, canTarget, canBeTargetedBy, etc)
3. Rework some of the global XML sub properties so that they make more sense and for some be specified at the unit level: https://forums.triplea-game.org/topic/355/sub-xml-properties
Separate isSub Functions
- canEvade - submerge
- isFirstStrike - roll and take casualties before regular units
- canNotTarget - can't target specific units like air units
- canNotBeTargetedBy - can't be targeted by specific units like air units
- canMoveThroughEnemies - unblockable, Treat Hostile Territories as Friendly
- canBeMovedThroughByEnemies - enemies can move through territories if only these types of units are present (would also need blitz for enemy land territories)
Most functionality will now work for land/air subs but there are still some further changes need especially for canNotTarget and canNotBeTargetedBy as these are hardcoded to just check if empty or not.
Sub Properties
The sub properties outlined here will then be tied to the following unit attributes: https://forums.triplea-game.org/topic/355/sub-xml-propertiescanEvade
6. Sub Retreat Before Battle
7. Submarines Defending May Submerge Or Retreat
8. Submersible Subs (determines if withdraws to same territory or neighboring territories)isFirstStrike
_1. Super Sub Defence Bonus - If "true" adds 0-1 to the submarines defensive value if and when SuperSubs tech is activated.
5. Defending Subs Sneak AttackcanNotTarget
NONEcanNotBeTargetedBy
2. Air Attack Sub RestrictedcanMoveThroughEnemies
8. Submersible Subs
10. Subs Can End NonCombat Move With EnemiescanBeMovedThroughByEnemies
3. Submarines Prevent Unescorted Amphibious Assaults
4. Ignore Sub In Movement
9. Sub Control Sea Zone RestrictedProperties with 'isSub' that set new unit options
2. Air Attack Sub Restricted - if unit hasisSub
and this is true then setcanNotBeTargetedBy
to all air unit types
4. Ignore Sub In Movement - if unit hasisSub
and this is true then setcanBeMovedThroughEnemies
to true
8. Submersible Subs - if unit hasisSub
and this is true then setcanMoveThroughEnemies
to true
PRs
- Land and air units can have isSub and isDestroyer: https://github.com/triplea-game/triplea/pull/4829
- Divide isSub into attributes: https://github.com/triplea-game/triplea/pull/4831
-
@hepps Can you provide a little more detail around the design of the units you are thinking of using this for? Would you need isDestroyer available on land units as well to counter them?
-
@redrum Here is the conceptual idea for the Partisan
<attachment name="unitAttachment" attachTo="exilledalliesPartisan" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="movement" value="1"/> <option name="attack" value="0"/> <option name="defense" value="1"/> <option name="canHide" value="true"/> <option name="isAAforCombatOnly" value="true"/> <option name="isAAforBombingThisUnitOnly" value="false"/> <option name="isAAforFlyOverOnly" value="false"/> <option name="typeAA" value="partisansupriseattack"/> <option name="offensiveAttackAA" value="2"/> <option name="targetsAA" value="germanInfantry:germanCombatEngineer:germanAlpineInfantry:germanMarine"/> <option name="maxAAattacks" value="1"/> <option name="maxRoundsAA" value="-1"/> <option name="mayOverStackAA" value="true"/> <option name="isLandTransportable" value="true"/> <option name="transportCost" value="2"/> <option name="isStrategicBomber" value="true"/> <option name="bombingMaxDieSides" value="4"/> <option name="bombingBonus" value="-2"/> <option name="bombingTargets" value="Truck:Material:Train:Rail:Factory:Aircraftplant:Barracks:Researchcenter:Airfield"/> <option name="requiresUnits" value="germanOccupiedCity"/> <option name="requiresUnits" value="italianOccupiedCity"/> <option name="requiresUnits" value="japaneseOccupiedCity"/> <option name="canInvadeOnlyFrom" value="none"/> <option name="unitPlacementOnlyAllowedIn" value="Paris:Bordeaux:Brest:LeHavre:Lyon:Amsterdam:Brussels:Warsaw:Lwow:Wilna:Copenhagen:Oslo:Trondheim:Bergen"/>
-
@hepps Intriguing. Both AA attack and SBR but very little attack/defense. I like the concept. Now I need the counter unit
-
@redrum uh oh Spies and Anti-Spies, Guerillas and Command units.. more Tylenol required
-
@redrum Will provide tonight. Just had to get this to you since you made me stay up half the night thinking about it.
-
@hepps Whatever do you mean I let you two brainstorm?
Wife dragging me to bed was a good thing
-
btw I read the convo EXCELLENT THOUGHTS! about clarifications etc
-
@prastle Yes was a very productive convo.
-
@redrum Ok I couldn't wait.
<attachment name="unitAttachment" attachTo="germanSpy" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="movement" value="1"/> <option name="attack" value="0"/> <option name="defense" value="0"/> <option name="canHide" value="true"/> <option name="cancelsHide" value="Partisan:1:Spy:1"/> <option name="isAAforCombatOnly" value="true"/> <option name="isAAforBombingThisUnitOnly" value="false"/> <option name="isAAforFlyOverOnly" value="false"/> <option name="typeAA" value="Spyespionageattack"/> <option name="offensiveAttackAA" value="2"/> <option name="attackAA" value="3"/> <option name="targetsAA" value="Diplomat:Spy:Patrisan"/> <option name="maxAAattacks" value="1"/> <option name="maxRoundsAA" value="-1"/> <option name="mayOverStackAA" value="true"/> <option name="transportCost" value="1"/> <option name="isStrategicBomber" value="true"/> <option name="bombingMaxDieSides" value="4"/> <option name="bombingBonus" value="-2"/> <option name="bombingTargets" value="Truck:Material:Train:Rail:Factory:Aircraftplant:Barracks:Researchcenter:Airfield"/> <option name="isLandTransportable" value="true"/> <option name="isAirTransportable" value="true"/> <option name="requiresUnits" value="germanCity:germanBarracks"/> <option name="canInvadeOnlyFrom" value="none"/> <option name="canBeGivenByTerritoryTo" value="Germany"/> <option name="unitPlacementOnlyAllowedIn" value="Berlin:Hamburg:Stettin:Hannover:Bremen:Cologne:Breslau:Prague:Vienna:Munich:East Prussia"/> </attachment>
-
-
-
... Just taking a stroll through some over grown untended gardens...
-
@hepps Guess someone should tend to the gardens...
-
@redrum Hopefully you know of a man with the shears enough to cut through the brambles.
-
@hepps Let's say I know a guy that definitely has the gardening skills... I hear he takes bribes...
-
@redrum This sounds suspiciously like extortion.
-
@hepps More like a capitalistic way for him to appropriately prioritize which gardens to tend...
-
@redrum Boy the gardener definitely let the vines grow thick in these gardens. The brambles have grown over everything.
-
@hepps The only reason I followed up with a post in this thread was because I was reminded of it while revamping the sub/destroyer mechanics. Made me think it might be better to approach this idea with a broader scope in mind. As far as looking all the behaviors associated with this and how they are dealt with across all units (land/sea/air).