Combat Resolution: Working on Attacker Retreated

I’ve been working on the procedures associated with combat resolution, specifically, the programming of both GameEvents and UnitCounter update procedures supporting:

  • Combat Result: Attacker Eliminated
  • Combat Result: Defender Eliminated
  • Combat Result: Even Exchange
  • Combat Result: Attacker Retreated
  • Combat Result: Defender Retreated

I have completed the first three, to include the option for a unit to advance into an empty hex following the elimination of the opposing unit.

The following RIA window is my testbed for the next combat resolution method:  Attacker Retreat.  At this point, I’ve built the code for retreating an attacking unit and for advancing the opposing unit.  There are still several bugs that I’m working through…but, it (and the Defender Retreated routines) should be completed over the next week or so.   It will also support the displacement of a unit, to enable a friendly unit to retreat.

Install Microsoft Silverlight

Please feel free to leave any comments or feedback — always glad to hear everyone’s inputs.

Unit Testing Results to date:

  • One Infantry vs One Infantry – no other unit ZOCs:  Functions properly, unit retreats, defending unit advances at a slower speed
  • Two infantry vs one Infantry – no other unit ZOC’s:  Functions properly
  • One Artillery vs One Adjacent Artillery – no other unit ZOC’s:  does not function property (leaves checkmark, no retreat, no advance
  • One Artillery vs On NonAdjacent Artillery – no other unit ZOCs: does not function properly (leaves checkmark)
  • One Infantry and one non-adjacent Artillery vs One Infantry: Functions properly
  • One Infantry and One Adjacent Artillery vs one infantry:  Does not retreat the artillery
  • Two Infantry vs One infantry (surrounded, no available retreat path); Does not eliminate the unit
  • Unit Displacement still not developed
Powered by Wordpress | Designed by Elegant Themes