Prev: 53003 Up: Map Next: 53080
53054: Goblin warrior - check if movement is affected by Maroc's magic power
Used by the routine at 52695.
goblin reacting to FLAME spell
Goblin warriors become apprehensive of Maroc if he's cast any slightly powerful spell (also see Trivia - Creatures spooked by Maroc's magic. This affects their movement patterns and can keep them at bay.
53054 LD A,(60238) (Creature) properties byte
53057 AND 1 Bit 0 (1) indicates whether the creature is visible on-screen
53059 JR Z,53003 If not, don't need to do anything to change the creature's movement (yet)
53061 LD A,(60140) Get the currently active spell
53064 CP 5 Check if spell number >=5
53066 JP NC,52815 If so, goblin will be nervous..! Change goblin movement pattern
Maroc is not wielding powerful magic, so the goblin can continue its standard movement pattern - this is a continuous horizontal movement, with vertical movement zig-zagging every 8th game cycle:
goblin warrior movement pattern
53069 LD A,(60074) Game timer/counter
53072 AND 7 Check bits 0-2 (values 0-7)
53074 JP Z,53003 If zero, it's an 8th game cycle so change vertical direction
53077 JP 53323 ...Otherwise continue in same direction
Prev: 53003 Up: Map Next: 53080