Blu3wolf / CNA-Assistant

A tool to keep track of unit information and status for the board game, Campaign for North Africa.
GNU General Public License v3.0
1 stars 0 forks source link

Lifetime of a Unit #3

Open Blu3wolf opened 5 years ago

Blu3wolf commented 5 years ago

A Unit is created (instantiated) either at the Setup of the Scenario, or when it arrives via Reinforcements or Replacements. Units at creation may be attached and assigned to a parent unit. The parent unit should then instantiate child units as required.

After creation, units have certain game functions, handled by public Methods. These allow the unit to move, perform , attach to or detach from a parent, assign to an attached parent, consume supplies, attach or detach truck points, pick up or drop off supplies (in attached trucks, or in TOE Strength Points), be integrated into a receiving unit (in the case of Replacements), perform Construction, etc.

Many of these functions only make sense to do in specific game phases or stages.

Unit stats are tracked in public Properties. Some of these properties are reset in certain game stages or phases, others are permanent. Others may change on a limited basis (CPA is a good example, in the case of infantry units).

Once a (combat) Unit is eliminated completely from Combat (zero TOE Strength points remaining), it can be deleted, unless it is a HQ unit. HQ units are only deleted if they have fewer than 50% of their assigned units surviving and unattached to other units. Replacement Units are deleted when they are integrated into their assigned unit.