The enemies

Every enemy is a person just like the agent: walks, ducks, jumps and shoots with the same code (mueve_persona, 0x2D3F). The difference is that nobody presses its joypad: on its turn (the four enemy slots think in order, one per frame) it runs through three batches of rules and the first one that holds in each batch adds a direction or a button to its virtual joypad (0xC051). Between turns it repeats whatever it decided last.

There are nine kinds (states 0x0A to 0x12). Which one comes out of each slot depends on the round (table 0x023B); once time runs out, the last row is used:

round slot 1 slot 2 slot 3 slot 4
1 0x0A 0x0E 0x0B —
2 0x0E 0x0B 0x0C —
3 0x0B 0x0C 0x0D —
4 0x0C 0x0D 0x10 —
5 onwards 0x0D 0x10 0x11 —
time up 0x0D 0x10 0x11 0x12

The rules of each kind

The batches, in the order the game checks them. In each batch the first rule that holds wins.

Kind 0x0A

  1. at the foot of a staircase, takes it towards the agent; in front of a door, sometimes goes in.
  2. near the edge of the building, turns round; with the agent in a car near the top, heads for the lift; sometimes, right next to the agent, turns round; standing still, starts walking.
  3. one time in eight, at the agent's height, shoots; with a gap ahead, turns round or waits; inside a car, gets out away from the agent; in an empty car at the bottom, gets out or stays.

Kind 0x0B

  1. at the foot of a staircase, takes it towards the agent; sometimes, with an agent's bullet at his height, ducks; crouching with no agent's bullets flying, stands up; crouching at another height from the agent, stands up; in front of a door, sometimes goes in.
  2. near the edge of the building, turns round; sometimes, right next to the agent, turns round; standing still, starts walking.
  3. with the agent's bullets flying, shoots at his height; in a car and facing the agent, shoots; one time in eight, at the agent's height, shoots; with a car ahead, waits; inside a car, goes up, down or out towards the agent; in an empty car at the bottom, gets out or stays.

Kind 0x0C

  1. at the foot of a staircase, takes it towards the agent; with an agent's bullet at his height, ducks; crouching while the agent goes up or down, stands up; crouching at another height from the agent, stands up; in front of a door, sometimes goes in.
  2. near the edge of the building, turns round; sometimes, right next to the agent, turns round; standing still, starts walking.
  3. with the agent's bullets flying, shoots at his height; in a car and facing the agent, shoots; less than 40 pixels from the agent, shoots; one time in eight, at the agent's height, shoots; stops whenever he stands on floor types 1 to 3 (see Secrets and bugs); inside a car, goes up, down or out towards the agent; in an empty car at the bottom, gets out or stays.

Kind 0x0D

  1. standing in front of the agent, ducks; crouching with no agent in front, stands up; crouching with a bullet close, jumps; crouching, far from the agent and facing him, jumps; at the foot of a staircase, takes it towards the agent; in front of a door, sometimes goes in; crouching at another height from the agent, stands up.
  2. near the edge of the building, turns round; sometimes, right next to the agent, turns round; standing still, starts walking.
  3. with the agent's bullets flying, shoots at his height; in the air at the agent's height, shoots; in a car and facing the agent, shoots; less than 40 pixels from the agent, shoots; with a car ahead, waits; inside a car, goes up, down or out towards the agent; in an empty car at the bottom, gets out or stays.

Kind 0x0E

  1. in front of a door with the agent's bullets flying, goes in; at the foot of a staircase, takes it towards the agent.
  2. near the edge of the building, turns round; with the agent in a car near the top, heads for the lift; sometimes, right next to the agent, turns round; standing still, starts walking.
  3. less than 40 pixels from the agent, shoots; one time in eight, at the agent's height, shoots; with the edge or a car ahead, waits; inside a car, goes up, down or out towards the agent; in an empty car at the bottom, gets out or stays.

Kind 0x0F

  1. sometimes, with an agent's bullet at his height, ducks; crouching with no agent's bullets flying, stands up; crouching at another height from the agent, stands up; at the foot of a staircase, takes it towards the agent.
  2. near the edge of the building, turns round; sometimes, right next to the agent, turns round; standing still, starts walking.
  3. with the agent's bullets flying, shoots at his height; one time in eight, at the agent's height, shoots; with the edge or a car ahead, waits; inside a car, goes up, down or out towards the agent; in an empty car at the bottom, gets out or stays.

Kind 0x10

  1. with an agent's bullet at his height, ducks; one time in four, in front of the agent, ducks; crouching with no agent's bullets flying, stands up; crouching at another height from the agent, stands up; at the foot of a staircase, takes it towards the agent; in front of a door, sometimes goes in.
  2. near the edge of the building, turns round; sometimes, right next to the agent, turns round; standing still, starts walking.
  3. in a car and facing the agent, shoots; with the agent's bullets flying, shoots at his height; less than 40 pixels from the agent, shoots; one time in eight, at the agent's height, shoots; with a car ahead, waits; inside a car, goes up, down or out towards the agent; in an empty car at the bottom, gets out or stays.

Kind 0x11

  1. one time in four, in front of the agent, ducks; crouching with no agent in front, stands up; crouching, far from the agent and facing him, jumps; crouching with a bullet close, jumps; at the foot of a staircase, takes it towards the agent; in front of a door, sometimes goes in.
  2. near the edge of the building, turns round; sometimes, right next to the agent, turns round; standing still, starts walking.
  3. in the air at the agent's height, shoots; with a car ahead, waits; inside a car, goes up, down or out towards the agent; in an empty car at the bottom, gets out or stays.

Kind 0x12

  1. in front of a door, sometimes goes in; standing in front of the agent, ducks; crouching with no agent in front, stands up; crouching with a bullet close, jumps; crouching, far from the agent and facing him, jumps; crouching at another height from the agent, stands up; at the foot of a staircase, takes it towards the agent.
  2. near the edge of the building, turns round; sometimes, right next to the agent, turns round; standing still, starts walking.
  3. in the air at the agent's height, shoots; in a car and facing the agent, shoots; less than 40 pixels from the agent, shoots; with a car ahead, waits; inside a car, goes up, down or out towards the agent; in an empty car at the bottom, gets out or stays.