<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[trigger question - unit with hit]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I plan a trigger that finally let a unit (battleship) with a hit appear</p>
<p dir="auto">that's how I wrote that commandos:</p>
<p dir="auto">&lt;attachment name="conditionAttachmentPearlHarbour" attachTo="Americans_west" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"&gt;<br />
&lt;option name="directPresenceTerritories" value="map"/&gt;<br />
&lt;option name="unitPresence" value="Americans_west:battleship" count="0"/&gt;<br />
&lt;option name="rounds" value="1"/&gt;<br />
&lt;option name="players" value="Americans_west"/&gt;<br />
&lt;/attachment&gt;</p>
<p dir="auto">&lt;attachment name="triggerAttachmentBBrefloating_PearlHarbour" attachTo="Americans_west" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"&gt;<br />
&lt;option name="conditions" value="conditionAttachmentPearlHarbour"/&gt;<br />
&lt;option name="when" value="after:americans_westCombatMove"/&gt;<br />
&lt;option name="placement" value="53 Sea Zone:Americans_west:battleship" count="1"/&gt;<br />
&lt;/attachment&gt;</p>
<p dir="auto">not necessary to mention - I does not work this way!</p>
<p dir="auto">a) it does not even work with<br />
&lt;option name="placement" value="53 Sea Zone:americans_west:battleship" count="1"/&gt;</p>
<p dir="auto">in this case there is no error message, but in the game the trigger is not working - why?</p>
<p dir="auto">b) what do I have to type to get a battleship with a hit instead of regular battleship?</p>
<p dir="auto">c) I want this unit have a cost, let's say 10 IPC.</p>
<p dir="auto">So I need a trigger the reduces the income of tha chosen player by 10<br />
So I wrote:</p>
<p dir="auto">&lt;attachment name="triggerAttachmentBBrefloating_costs" attachTo="Americans_west" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"&gt;<br />
&lt;option name="conditions" value="conditionAttachmentPearlHarbour"/&gt;<br />
&lt;option name="resource" value="PUs"/&gt;<br />
&lt;option name="resourceCount" value="-10"/&gt;<br />
&lt;option name="when" value="before:americans_westPlace"/&gt;<br />
&lt;/attachment&gt;</p>
<p dir="auto">could this work? or is -10 not possible? If, how else?</p>
]]></description><link>https://forums.triplea-game.org/topic/2465/trigger-question-unit-with-hit</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 11:44:19 GMT</lastBuildDate><atom:link href="https://forums.triplea-game.org/topic/2465.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Nov 2020 15:07:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to trigger question - unit with hit on Mon, 03 May 2021 18:54:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/numetalfan" aria-label="Profile: numetalfan">@<bdi>numetalfan</bdi></a>  I would try using "unitPresence"  and"directPresenceTerritories" instead . Something like</p>
<p dir="auto">&lt;option name="directPresenceTerritories" value="53 Sea Zone" count="1"/&gt;</p>
<p dir="auto">&lt;option name="unitPresence" value="battleship" count="1"/&gt;</p>
]]></description><link>https://forums.triplea-game.org/post/49883</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49883</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Mon, 03 May 2021 18:54:08 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Mon, 03 May 2021 14:35:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I tried</p>
<p dir="auto">&lt;attachment name="conditionAttachmentPearlHarbour" attachTo="Americans_west" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"&gt;<br />
&lt;option name="directExclusionTerritories" value="53 Sea Zone" count="1"/&gt;<br />
&lt;option name="rounds" value="1"/&gt;<br />
&lt;/attachment&gt;</p>
<p dir="auto">I thought this coding would check how the status of 53 sea zone is:<br />
If Japan did not attack or the attack failed, this condition should be wrong, there would still be an unit (battleship) of the American_west there</p>
<p dir="auto">If the Japanese are succesful, there are no more allied ships left, so the condition would be true.</p>
<p dir="auto">yet, it doesn't work correctly. I wonder why</p>
]]></description><link>https://forums.triplea-game.org/post/49876</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49876</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Mon, 03 May 2021 14:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Sat, 24 Apr 2021 11:30:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/numetalfan" aria-label="Profile: numetalfan">@<bdi>numetalfan</bdi></a>  hmm...yea when the BB is hit it still calls it a BB when you hover on it so Idk ... you could try making the BB turn into a different unit when hit and then search for that.</p>
<p dir="auto">Sort of what we were trying earlier with the "BattleshipDamaged"</p>
]]></description><link>https://forums.triplea-game.org/post/49699</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49699</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Sat, 24 Apr 2021 11:30:36 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Sat, 24 Apr 2021 10:37:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">That was just an example. My trigger has a when...</p>
<p dir="auto">Yeah. If there is a battleship in thst sea zone the trigger works. Is there a BB with a hit it doesn't. And ...battleship_hit..   causes an immediate error, the game will not start.</p>
]]></description><link>https://forums.triplea-game.org/post/49697</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49697</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Sat, 24 Apr 2021 10:37:56 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Fri, 23 Apr 2021 23:46:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/numetalfan" aria-label="Profile: numetalfan">@<bdi>numetalfan</bdi></a>  do you have "when" set for your trigger ? If so , might need to play around with which phase.</p>
<p dir="auto">It does find the BB, just not the damaged one ?</p>
]]></description><link>https://forums.triplea-game.org/post/49688</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49688</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Fri, 23 Apr 2021 23:46:21 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Fri, 23 Apr 2021 20:09:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">Trigger question.</p>
<p dir="auto">First trigger condition....something like</p>
<p dir="auto">name='conditionAttachmentJapaneseBattleships' attachTo='Japanese' javaClass='RulesAttachment' type='player'&gt;<br />
&lt;option name='directPresenceTerritories' value='map' count='1'/&gt;<br />
&lt;option name='unitPresence' value='battleship' count='1'/&gt;</p>
<p dir="auto">Second trigger condition</p>
<p dir="auto">name='conditionAttachmentJapaneseBattleships' attachTo='Japanese' javaClass='RulesAttachment' type='player'&gt;<br />
&lt;option name='directPresenceTerritories' value='map' count='1'/&gt;<br />
&lt;option name='unitPresence' value='battleship_hit' count='1'/&gt;</p>
<p dir="auto">It does not work! There is an error</p>
<p dir="auto">So how make a condition that checks the presence of a regular battleship but that has already got a hit in a defined territory??</p>
]]></description><link>https://forums.triplea-game.org/post/49684</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49684</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Fri, 23 Apr 2021 20:09:55 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Thu, 22 Apr 2021 15:25:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">thx</p>
]]></description><link>https://forums.triplea-game.org/post/49669</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49669</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Thu, 22 Apr 2021 15:25:46 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Thu, 22 Apr 2021 14:39:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/numetalfan" aria-label="Profile: numetalfan">@<bdi>numetalfan</bdi></a>  yea that'd be cool. I'd make a Feature request as WC suggested then, because edit is the only way to do it for now.</p>
<p dir="auto">There's been a few more developers active lately. If it's easy, maybe someone will take it on sooner than later.</p>
<p dir="auto">Might request at git also <a href="https://github.com/triplea-game/triplea/issues" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/triplea-game/triplea/issues</a> then add Feature Request from the Label menu. Might get more visibility that way. I'd post it here too.</p>
]]></description><link>https://forums.triplea-game.org/post/49668</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49668</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Thu, 22 Apr 2021 14:39:17 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Thu, 22 Apr 2021 14:17:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">that was excatly my first programming, but this way of doing it restricts the game. I want the user to decide what he does.</p>
<p dir="auto">If he decides to move the damaged BB to a shore next to factory it should be repaired, if the player decides to attack with it, it should be possible too.</p>
<p dir="auto">I think the programmers should enlarge the "placement" function by the battleship_hit.</p>
]]></description><link>https://forums.triplea-game.org/post/49667</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49667</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Thu, 22 Apr 2021 14:17:17 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Thu, 22 Apr 2021 11:07:43 GMT]]></title><description><![CDATA[<p dir="auto">Ok so have the DamagedBB placed when your trigger sees all the BBs sunk. Might as well make it a A0 D0 M0 since it's not going anywhere. Then your -10 PU trigger fires when he sees it's there. Then at the start of JPNs turn have a trigger remove it. That way if JPN attacks again it won't be there to soak a hit.</p>
]]></description><link>https://forums.triplea-game.org/post/49663</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49663</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Thu, 22 Apr 2021 11:07:43 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Thu, 22 Apr 2021 11:00:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a>  hmm...yea I don't think that's gonna work either. Because you can't place your BB then w/out a Damaged one. What is the exact scenario again ? Is this for the PH attack ? Or you want to be able to do this anywhere ?</p>
<p dir="auto">Edit<br />
Ok I just went through th thread again and I think WC is right, you can't place a damaged unit in game. Might be able to figure out away to make your scenario still work though. I'm gonna think on it some more</p>
]]></description><link>https://forums.triplea-game.org/post/49662</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49662</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Thu, 22 Apr 2021 11:00:54 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Thu, 22 Apr 2021 10:19:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a>  Still not quite sure how it works</p>
<p dir="auto">consumesUnits						<br />
values: requires that a unit be present in a territory, then when this unit is placed the other units are destroyed / upgraded into this unit.  Can have multiple instances of this, which means it consumes multiple types of units.</p>
]]></description><link>https://forums.triplea-game.org/post/49661</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49661</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Thu, 22 Apr 2021 10:19:38 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Thu, 22 Apr 2021 10:13:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/numetalfan" aria-label="Profile: numetalfan">@<bdi>numetalfan</bdi></a>  yea so unfortunately, that's not gonna work. If i edit the damaged BB to have 1 hit point of damage, then it does. But if we could do that we wouldn't need it anyway. So back to the same issue.</p>
<p dir="auto">I suggest looking at how "Hulls" work in Total World War. I'm gonna take a look at it myself. It seems as if you ought to be able to make something work with the Hulls. I'm not real familiar with them but think you place them and make it turn into a BB by using "consumesUnits" somehow.</p>
<p dir="auto">Here's what he has</p>
<p dir="auto">&lt;attachment name="unitAttachment" attachTo="germanBattleship" javaClass="UnitAttachment" type="unitType"&gt;<br />
&lt;option name="movement" value="2"/&gt;<br />
&lt;option name="attack" value="6"/&gt;<br />
&lt;option name="defense" value="5"/&gt;<br />
&lt;option name="attackRolls" value="2"/&gt;<br />
&lt;option name="defenseRolls" value="2"/&gt;<br />
&lt;option name="canBombard" value="true"/&gt;<br />
&lt;option name="isSea" value="true"/&gt;<br />
&lt;option name="hitPoints" value="2"/&gt;<br />
&lt;option name="bombard" value="5"/&gt;<br />
&lt;option name="requiresUnits" value="germanDocks:germanFactory"/&gt;<br />
&lt;option name="consumesUnits" value="1:germanHull"/&gt;<br />
&lt;option name="whenHitPointsDamagedChangesInto" value="1:true:germanBattleship-damaged"/&gt;<br />
&lt;/attachment&gt;</p>
<p dir="auto">I'm not sure how it changes. I'm gonna read up on it</p>
]]></description><link>https://forums.triplea-game.org/post/49660</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49660</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Thu, 22 Apr 2021 10:13:13 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Thu, 22 Apr 2021 06:57:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">I still miss something, everythings works fine, but the repairing ist not happening</p>
<p dir="auto"><img src="/assets/uploads/files/1619073542655-7bacbcf2-c9d7-46c9-aaf4-07b7c8f68048-grafik.png" alt="7bacbcf2-c9d7-46c9-aaf4-07b7c8f68048-grafik.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">here you see the new unit adjacant to a factory, but it was not repaired</p>
<p dir="auto">the codes are:</p>
<ol>
<li>
<p dir="auto">&lt;property name="Units Repair Hits End Turn" value="true" editable="true"&gt;<br />
&lt;boolean/&gt;<br />
&lt;/property&gt;</p>
</li>
<li>
<p dir="auto">&lt;property name="Two hit battleship" value="true" editable="false"&gt;<br />
&lt;boolean/&gt;<br />
&lt;/property&gt;</p>
</li>
<li>
<p dir="auto">&lt;property name='Two HitPoint Units Require Repair Facilities' value='true' editable='true'&gt;<br />
&lt;boolean/&gt;<br />
&lt;/property&gt;</p>
</li>
<li>
<p dir="auto">&lt;attachment name="unitAttachment" attachTo="factory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"&gt;<br />
&lt;option name="isFactory" value="true"/&gt;<br />
&lt;option name="isAAforBombingThisUnitOnly" value="true"/&gt;<br />
&lt;option name='repairsUnits' value='battleship:battleship-damaged'/&gt;<br />
&lt;/attachment&gt;</p>
</li>
<li>
<p dir="auto">&lt;attachment name="unitAttachment" attachTo="battleship-damaged" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"&gt;<br />
&lt;option name="movement" value="2"/&gt;<br />
&lt;option name="attack" value="4"/&gt;<br />
&lt;option name="defense" value="4"/&gt;<br />
&lt;option name="isSea" value="true"/&gt;<br />
&lt;option name="canBombard" value="true"/&gt;<br />
&lt;option name="hitPoints" value="2"/&gt;<br />
&lt;option name="whenHitPointsRepairedChangesInto" value="0:true:battleship"/&gt;<br />
&lt;/attachment&gt;</p>
</li>
</ol>
<p dir="auto">I wonder what is missing</p>
]]></description><link>https://forums.triplea-game.org/post/49659</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49659</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Thu, 22 Apr 2021 06:57:11 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Wed, 21 Apr 2021 18:57:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a><br />
that's it</p>
<p dir="auto">&lt;!-- BattleShip-damaged --&gt;</p>
<p dir="auto">&lt;attachment name="unitAttachment" attachTo="battleship-damaged" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"&gt;</p>
<p dir="auto">&lt;option name="movement" value="2"/&gt;</p>
<p dir="auto">&lt;option name="attack" value="4"/&gt;</p>
<p dir="auto">&lt;option name="defense" value="4"/&gt;</p>
<p dir="auto">&lt;option name="isSea" value="true"/&gt;</p>
<p dir="auto">&lt;option name="canBombard" value="true"/&gt;<br />
&lt;option name="hitPoints" value="2"/&gt;</p>
<p dir="auto">&lt;option name="whenHitPointsRepairedChangesInto" value="0:true:battleship"/&gt;</p>
<p dir="auto">&lt;/attachment&gt;</p>
<p dir="auto">My "special unit" was very similar, but the most important coding is:</p>
<p dir="auto">&lt;option name="whenHitPointsRepairedChangesInto" value="0:true:battleship"/&gt;</p>
<p dir="auto">that is what I missed<br />
thx</p>
]]></description><link>https://forums.triplea-game.org/post/49652</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49652</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Wed, 21 Apr 2021 18:57:16 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Wed, 21 Apr 2021 14:32:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a>  not sure what units you're using but I have Global 40 ones in Global 40 House Rules if you want to just copy them</p>
]]></description><link>https://forums.triplea-game.org/post/49644</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49644</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Wed, 21 Apr 2021 14:32:14 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Wed, 21 Apr 2021 14:28:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/numetalfan" aria-label="Profile: numetalfan">@<bdi>numetalfan</bdi></a>  so if i understand right you want a BB with 1 hit placed with your trgger ? If so make a unit such as in the above post "BattleShip-damaged"</p>
<p dir="auto">I think the Factory will auto repair it but if not add the<br />
&lt;option name="repairsUnits" value="battleship-damaged"/&gt;<br />
to the Factory</p>
<p dir="auto">so you shouldn't need a second trigger</p>
<p dir="auto">Edit<br />
yea disregard the stuff about the Harbour. I was confusing it with what I did. You just want the Factory to auto repair same as any damaged BB</p>
]]></description><link>https://forums.triplea-game.org/post/49643</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49643</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Wed, 21 Apr 2021 14:28:07 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Wed, 21 Apr 2021 14:10:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">I am afraid this is the way to go.</p>
<p dir="auto">Then I need a second trigger, one that is activated when that special unit ends its turn adjacant to a factory. Then I will repair it by exchange it with a normal battleship.</p>
<p dir="auto">Any idea how to do this?</p>
]]></description><link>https://forums.triplea-game.org/post/49642</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49642</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Wed, 21 Apr 2021 14:10:02 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Wed, 21 Apr 2021 13:41:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/numetalfan" aria-label="Profile: numetalfan">@<bdi>numetalfan</bdi></a>  ahh yea that is different. Sadly that doesn't work then. I guess you'll have to use a special unit.</p>
]]></description><link>https://forums.triplea-game.org/post/49641</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49641</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Wed, 21 Apr 2021 13:41:44 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Wed, 21 Apr 2021 08:40:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">thx for the advice, but one difference ist clear.</p>
<p dir="auto">My coding</p>
<p dir="auto">&lt;attachment name="triggerAttachmentBBrefloating_PearlHarbour" attachTo="Americans_west" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"&gt;<br />
&lt;option name="when" value="before:americans_westNonCombatMove"/&gt;	<br />
&lt;option name="conditions" value="conditionAttachmentPearlHarbour"/&gt;<br />
&lt;option name="placement" value="56 Sea Zone:battleship" hitsTaken="1" count="1"/&gt;<br />
&lt;option name='uses' value='1'/&gt;<br />
&lt;/attachment&gt;</p>
<p dir="auto">is part of a trigger, while your code</p>
<p dir="auto">&lt;unitPlacement unitType="battleship" territory="95 Sea Zone" quantity="1" owner="Italians" hitsTaken="1"/&gt;</p>
<p dir="auto">is part of the initial setup.</p>
<p dir="auto">..</p>
<p dir="auto"><em>★<br />
unitPlacement<br />
Define initial unit placement<br />
An object withinunitInitialize<br />
Parameters:<br />
unitType: Any unit in the unitList<br />
territory: Any territory in map<br />
quantity: integer<br />
owner: Any player in playerList<br />
These units will already be on the map when the game begins.</em></p>
]]></description><link>https://forums.triplea-game.org/post/49639</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49639</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Wed, 21 Apr 2021 08:40:47 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Tue, 20 Apr 2021 21:07:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/numetalfan" aria-label="Profile: numetalfan">@<bdi>numetalfan</bdi></a> said in <a href="/post/49623">trigger question - unit with hit</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">&lt;unitPlacement unitType="battleship" territory="118 Sea Zone" quantity="1" owner="Germans" hitsTaken="1"/&gt;</p>
<p dir="auto">works,</p>
<p dir="auto">but you get a "normal" battleship, not the one with a hit</p>
</blockquote>
<p dir="auto">Idk why that's not working. That's what I used in Oztea 41.</p>
]]></description><link>https://forums.triplea-game.org/post/49634</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49634</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Tue, 20 Apr 2021 21:07:24 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Tue, 20 Apr 2021 21:25:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/numetalfan" aria-label="Profile: numetalfan">@<bdi>numetalfan</bdi></a>  yea Idk how to do it without a special unit. I did it like hepps in TWW and ended up with</p>
<p dir="auto">&lt;!-- BattleShip-damaged --&gt;<br />
&lt;attachment name="unitAttachment" attachTo="battleship-damaged" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"&gt;<br />
&lt;option name="movement" value="2"/&gt;<br />
&lt;option name="attack" value="4"/&gt;<br />
&lt;option name="defense" value="4"/&gt;<br />
&lt;option name="isSea" value="true"/&gt;<br />
&lt;option name="canBombard" value="true"/&gt;<br />
&lt;option name="bombard" value="2"/&gt;<br />
&lt;option name="hitPoints" value="2"/&gt;<br />
&lt;option name="whenHitPointsRepairedChangesInto" value="0:true:battleship"/&gt;<br />
&lt;/attachment&gt;</p>
<p dir="auto">Then for your repair unit you could try removing it from repairsUnits in Harbour</p>
<p dir="auto">&lt;option name="repairsUnits" value="battleship:carrier:battleship-damaged"/&gt;</p>
<p dir="auto">and add it to your repair unit which would require a harbour to place. That still would work when harbour was damaged though. You might be able to try and have it place only with undamaged harbour. Idk if you can do that though. If you already had a repair unit placed, it'd still repair as well.</p>
<p dir="auto">Edit<br />
Yea actually it does work by not allowing you to place the repair unit in a damaged harbour or factory. That's what I did with "Factory Limited" in Global 40 House Rules.</p>
]]></description><link>https://forums.triplea-game.org/post/49633</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49633</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Tue, 20 Apr 2021 21:25:03 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Tue, 20 Apr 2021 13:10:25 GMT]]></title><description><![CDATA[<p dir="auto">Repair problem:</p>
<p dir="auto">In case of a soultion where you drop a special unit by a trigger and that unit represents a BB with a hit, you have to define in the xml a way how to repair it.</p>
<p dir="auto">so in the trigger you replace that unit with a regular BB and everything is fine.</p>
<p dir="auto">My problem here is the trigger condition,<br />
because you never know where the user will move the special unit on the map.</p>
<p dir="auto">E.g. around UK there are already five sea zones connected with the factory. At the start of AA41 the allies have 9 sea zones adjancent to a factory. And each buy of a new factory increases that number.</p>
<p dir="auto">And any sea zone like that would be OK to repair because</p>
<p dir="auto">&lt;property name="Two hit battleship" value="true" editable="false"&gt;<br />
&lt;boolean/&gt;<br />
&lt;/property&gt;<br />
&lt;property name='Two HitPoint Units Require Repair Facilities' value='true' editable='true'&gt;<br />
&lt;boolean/&gt;<br />
&lt;/property&gt;</p>
<p dir="auto">are both active.</p>
<p dir="auto">So what would be the coding in the condition to "repair"(get replaced) such a special unit if it ends its turn adjacent to an allied factory?</p>
]]></description><link>https://forums.triplea-game.org/post/49625</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49625</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Tue, 20 Apr 2021 13:10:25 GMT</pubDate></item><item><title><![CDATA[Reply to trigger question - unit with hit on Tue, 20 Apr 2021 11:57:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">&lt;unitPlacement unitType="battleship" territory="118 Sea Zone" quantity="1" owner="Germans" hitsTaken="1"/&gt;</p>
<p dir="auto">works,</p>
<p dir="auto">but you get a "normal" battleship, not the one with a hit</p>
<p dir="auto">&lt;unitPlacement unitType="battleship_hit" territory="118 Sea Zone" quantity="1" owner="Germans"/&gt;</p>
<p dir="auto">is also wrong</p>
<p dir="auto">I still look for a way to place a BB with a hit by a trigger, without creating special units</p>
]]></description><link>https://forums.triplea-game.org/post/49623</link><guid isPermaLink="true">https://forums.triplea-game.org/post/49623</guid><dc:creator><![CDATA[Numetalfan]]></dc:creator><pubDate>Tue, 20 Apr 2021 11:57:53 GMT</pubDate></item></channel></rss>