(how to get a) Notification for Trigger with "chance" element
-
I might hold a record for asking questions here on the forum
but do not despair, i am learning (slowly)How to get a Notification to all players, when a trigger is has the "Chance"
<attachment name="triggerAttachment_Activate_Daimyo_Turn2-5+10-15" attachTo="Minor" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentActivate_Turn2-5+10-15"/><option name="chance" value="1:4"/> <option name="purchase" value="Daimyo_" count="1"/> <option name="notification" value="Minor_Daimyo"/> <!--<option name="players" value="$AllPlayers$"/>--> <option name="when" value="after:minorNonCombatMove"/> </attachment>
So I cannot use the <option name="players" value="$AllPlayers$"/> as this would logically get all players the Daimyo placement,
so: I should make a seperate trigger for the notification only I guess...
BUT: how to connect this with the above trigger with the chance-element? ( hope you understand my point? ) -
Use a "switch" condition:
<attachment name="conditionAttachmentt_Activate_Daimyo_Turn2-5+10-15" attachTo="Minor"" javaClass="RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment>
Then add the change to you present trigger:
<attachment name="triggerAttachment_Activate_Daimyo_Turn2-5+10-15" attachTo="Minor" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentActivate_Turn2-5+10-15"/> <option name="chance" value="1:4"/> <option name="purchase" value="Daimyo_" count="1"/> <!-- <option name="notification" value="Minor_Daimyo"/> <option name="players" value="$AllPlayers$"/> --> <!-- Add switch change here --> <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachment_Activate_Daimyo_Turn2-5+10-15"/> <option name="playerProperty" value="switch" count="true"/> <!-- If successful change success switch to true --> <option name="when" value="after:minorNonCombatMove"/> </attachment>
Then the notification trigger:
<attachment name="triggerAttachment_Minor_Daimyo_Notice" attachTo="Minor" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Activate_Daimyo_Turn2-5+10-15"/> <option name="notification" value="Minor_Daimyo"/> <option name="players" value="$All-Players$"/> <!-- To use only once set uses --> <!-- <option name="uses" value="1"/> only do this once OR --> <!-- Reset switch back to false --> <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachment_Activate_Daimyo_Turn2-5+10-15"/> <option name="playerProperty" value="switch" count="false"/> <!-- Reset switch if you might need it again --> <option name="when" value="before:minorPlace"/> <!-- or which phase starts after Non-Combat movement --> </attachment>
Hope it helps!
Cheers...
-
@wc_sumpton : so again another case of using The Switch... hmmm... somehow the switch in my head fails to imply them well! muchas gracias again!
-