Prev: 87F6 Up: Map Next: 8820
8813: Fire Random Shot
Used by the routines at UpdateType13 and UpdateType19.
Occasionally fires a shot from an object, when the flag at A1D7 is set.
Input
IX Address of the object
FireRandomShot 8813 LD A,($A1D7) Fetch the flag from A1D7.
8816 AND A Test it.
8817 RET Z Return if it is clear.
8818 LD A,($9BCB) Fetch the first byte of the random seed.
881B AND %00101111 Keep only some of the bits.
881D RET NZ Return if any are set, so a shot is only fired now and then.
881E JR FireShot Jump to FireShot.
Prev: 87F6 Up: Map Next: 8820