![]() |
Routines |
| Prev: 9138 | Up: Map | Next: 9171 |
|
Bits 4 to 6 of byte 4 of each record are the sides; sharing one ends the handler that called this with SUCCEEDED clear -- it would not work. The player alone can turn on a friend: attacked by the player, a character on the player's side (bit 4) is taken off it first, so the attack goes ahead and it is an enemy from then on.
|
||||
| SAME_SIDE | 914A | LD IX,(TARGET_RECORD) | The player attacking a friend: no longer a friend | |
| 914E | LD A,(ACTING) | |||
| 9151 | AND A | |||
| 9152 | JR NZ,SAME_SIDE_0 | |||
| 9154 | BIT 4,(IX+$04) | |||
| 9158 | JR Z,SAME_SIDE_0 | |||
| 915A | RES 4,(IX+$04) | |||
| SAME_SIDE_0 | 915E | LD A,(IX+$04) | Sharing a side? Then no: out of the caller, would not work | |
| 9161 | AND $70 | |||
| 9163 | LD IX,(ACTOR) | |||
| 9167 | AND (IX+$04) | |||
| 916A | RET Z | |||
| 916B | POP HL | |||
| 916C | XOR A | |||
| 916D | LD (SUCCEEDED),A | |||
| 9170 | RET | |||
| Prev: 9138 | Up: Map | Next: 9171 |