Struggling with the Ev(il) Ed – Part 3: MASAF

The Allied PO’s handling of MASAF (Mediterranean Allied Strategic Air Force) provided a new challenge. The background: MASAF should be activated when the German player occupies one or more hexes within a certain radius from Anzio (by a ‘Force 2 occupies’ event). I assume this to happen in the context of a general counteroffensive against the beachhead as was the case historically. However some more conditions must be met for the actual activation of MASAF:

  1. MASAF should be activated when the German player occupies one or more hexes within a certain area centered around Anzio – Nettuno.
  2. MASAF should not be activated on a storm turn, but on the next non-storm turn after condition no. 1 has been met. (re storm turns and the weather engine please read the previous post)
  3. MASAF should not be activated prematurely due to a local attack early in the game.

This means we will have to trigger an event by more than one trigger. Colin Wright, who encountered a similar challenge (see his post at TDG), inspired me to use a combination of ‘Set Ownership’ events and a ‘Blocking Unit’.

This is what i came up with – again i added the weather engine’s triggering events (#74 – #79):

Actually the event sequence for the activation of MASAF is splitted in two parts. The first part is from event #622 to event #627, the following, second part follows the usual activation patterns as for MATBF.

Let’s begin with the first part. It is essentially a loop that sets an ‘off map’ hex (hex 45/62 – see the picture below) to ‘Ownership 2’ on the pre-dawn turn and back to ‘Ownership 1’  on the morning turn.

For this the loop is tied to the weather engine’s perpetual loop which also fulfills condition no. 3 as the weather engine starts not until turn 25. The hex is occupied by a Force 1 unit, so that the ‘Ownership 2’ event (#622) can not trigger until the unit is withdrawn. When the German player fulfills condition no. 1 (event #626) that blocking unit is withdrawn. On the next pre-dawn turn the ‘Ownership 2’ event (#622) can fire –  note that it can only fire on a pre-dawn turn (event #74, which it is tied to, is activated each pre-dawn turn) and that it is repetitive. Also note that it fires on each pre-dawn turn due to the repetitive ‘Ownership 1’ event (#623). This is to enable a synced activation of MASAF. We don’t want the PO to use MASAF on PM turns due to the severe PM air shock. By the way, the Force 1 supply point in the off-map hex that prevents the blocking unit from starving and eventual evaporation doesn’t influence the ‘Ownership’ events.

Now for the second part. There is not much to say that hasn’t already been said in part 2 of this series as it follows the same pattern as MATBF (3)’s activation. When the ‘off-map’ hex (45/62) changes ownership to Force 2 it triggers a ‘Force 2 occupies’ event (#630) which triggers the PO activation of MASAF. This event can, as outlined above, only be triggered on pre-dawn turns and due to events #628 and #629 only on non-storm turns (fulfilling condition no. 2).

Advertisements

One thought on “Struggling with the Ev(il) Ed – Part 3: MASAF

  1. Thanks ! This series is/will be very helpful – although (deep sigh), the only real way to learn this is to (more angst), write code, do not blow up the computer, trace code and effects, re-write code… Does that loop ever finish ? (No.)

    I came in to finally snaggle a copy of the Evil Ed doc, and was surprised and pleased to see this series. Very helpful or could be – if I knew a little of what I was doing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s