riverwanderer / ccnapoleonics

Commands & Colors: Napoleonics on vassalengine.org
https://boardgamegeek.com/boardgame/62222/commands-and-colors-napoleonics
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Artillery Reposition offered for a unit from an earlier combat #281

Closed riverwanderer closed 2 months ago

riverwanderer commented 2 months ago

Module V5.1.0a815 Vassal V3.7.14

Artillery Reposition offered for a unit from an earlier combat, as well as the existing one.

The actual location of Attack markers needs to be taken into account. Including AddArt markers though.

Sample game - a815 GG.

riverwanderer commented 2 months ago

canPlay and tcSelect / tcTgt Attachment conditions require MarkerLevel check to confirm that the unit is connected to current attack markers; by this point the unit's own MarkerLevel may be cBattle (>0):

(tcId == 0 && Side == gCombatLead && (gPhaseLock !~ ORDERregex ? cp_MarkerLevel < 0 : Moved)

Tested fix in a816. Also noted that canPlay requires that gCombatSide is blank (ie Combat over, including optional retreat).