![]() |
Routines |
| Prev: C52F | Up: Map | Next: C54A |
|
Meant to try both antibody records against the thing at IX, returning with carry set and IY on the antibody that touches it. But the loop loads the size of a record into DE and never adds it to IY, so it tries the first record twice and never the second: an antibody thrown while another is still in flight goes through monsters and the creature without harming them. Used by the creature (CREATURE_UPDATE), the monsters of 112-127 (MONSTER112_UPDATE) and those of 64-79 (WANDERING_MONSTER).
Measured: with an antibody on a monster in the first record, carry; the same antibody in the second record, no carry, IY still on the first.
|
||||||||||||||
| ANTIBODY_STRIKE | C538 | LD IY,ANTIBODIES | IY = the first antibody record; two tries | |||||||||||
| C53C | LD B,$02 | |||||||||||||
| ANTIBODY_STRIKE_0 | C53E | PUSH BC | touching? carry | |||||||||||
| C53F | CALL ANTIBODY_TOUCHING | |||||||||||||
| C542 | POP BC | |||||||||||||
| C543 | RET C | |||||||||||||
| C544 | LD DE,$0010 | the step to the next record is loaded, but never added | ||||||||||||
| C547 | DJNZ ANTIBODY_STRIKE_0 | |||||||||||||
| C549 | RET | |||||||||||||
| Prev: C52F | Up: Map | Next: C54A |