Intro sequence - stray pixels
Maroc's astral projection descends to the Gatehouse Level in the short intro sequence at the start of a new game.
There are a few stray pixels which create 'holes' in the silhouetted landscape. As a result the lightning flashes are visible through the silhouetted backdrop.
Stray pixels in intro sequence
These are caused by Maroc's graphic - or more specifically, the top pixels of his hat and staff - having a starting position a bit too high up on the screen.
Fix with POKE 49219,81 (or any number a little above 80) to lower Maroc's starting position.
Intro sequence - lightning effect colour bleeds into border
In the intro sequence, there's some colour bleed in the left hand border with the lightning effect:
lightning effect in intro sequence
This is because the left and right borders are included in the blanket screen colour changes in the 'lightning flash' routine (E610) is run.
Instructions at E629 and E633 check/set screen attributes that are INK 0, PAPER 6 when flashing from yellow to blue. This includes a bit of the left border.
A simple fix is to change the colour to one not used in the border, e.g. POKE 58928,56; POKE 58932,56 for white.
fixed lightning effect in intro sequence
Attribute bleed on left of screen
Avalon has some colour clash, as coloured graphics are drawn over other graphics.
We all know this is difficult to avoid on the Spectrum. But having different colour graphics in the game, rather than single-attribute-colour screens, brings Avalon to life.
However, there is some avoidable clash. Occasionally the colour of a creature or item may bleed into the left of the playing area:
attribute bleed on left of screen
(Note the cyan tinge on the left hand door from the goblin warrior)
The routine at E3FD calculates the screen attribute address position from each graphic's vertical/horizontal pixel position when it is erased/drawn.
At E40C the ADD A,9 adds 9 to the pixel position (in the character square) before dividing by 8 using RRA x 3.
This would be fine if the horizontal pixel position was 1-8, but it's 0-7. So if graphics land in certain, very specific screen positions, this will miscalculate the attribute display address.
The instruction can be fixed by using ADD A,8 instead. Fix with POKE 58381,8.
Stray pixels - Door
The bottom of the side walls door has a stray pixel which means it isn't quite parallel to the top of the door (though this may be deliberate!).
door graphics issue door graphics issue fixed
Fix with POKE 40338,48; POKE 40339,12
** 29/11/2022 - Update note from Steve Turner ** (Twitter link):
"The pixels of the doors were deliberately rough to suggest cracks."
...I did wonder whether including this one was a bit pedantic..! I think as the same door graphic was carried forward to Dragontorc without correction should've given me the hint...
Switching between 'effect' spells doesn't reduce a spell's charges
shield spell active effect
The player deactivates an active 'effect' spell - such as SHIELD or UNSEEN - by casting the same spell again.
These types of spell slowly, but constantly, drain Maroc's energy. So the player will need to deactivate the spell after a short time.
Unlike other types of spell, 'effect' spell charges aren't reduced when the spell is activated. Instead they're reduced on the second casting that removes/deactivates the effect.
This means the player can toggle between different effect spells (e.g. SHIELD --> UNSEEN --> SHIELD) without losing any spell charges for these spells.
...But surely you'll have to deactivate ONE of those spells eventually, and lose a charge, right? After all, these sorts of spell drain energy so can't be permanently active.
Fortunately, there are effect spells with unlimited charges, such as WRAITHBANE and AMULET.
This means you can cast SHIELD - then once you're finished with it, instead of casting SHIELD again to deactivate it (and lose a charge), cast WRAITHBANE, then immediately cast WRAITHBANE again (to deactivate it).
You'll have used your SHIELD spell without depleting any spell charges.
Typos in spell messages
There are a couple of typos in the messages at 6FBC that are displayed when spells are cast.
typo in spell message for unseen spell
UNSEEN spell - "TO GO UNOTICED" (difficult to correct with a POKE as there's no space to insert an extra byte!)
DISPEL spell - "UNBEWITCHMEMT" (POKE 28928,13 to correct)
Locked door on Gatehouse Level
In room 4 on the Gatehouse Level (containing two goblins) there is a locked door.
You can't open this door during the game, but it causes a crash if Maroc goes through it.
The connecting room number for this door (stored at 67B8) is set to 0, which isn't valid. The game crashes while trying to read the indecipherable room data.
room glitch on gatehouse level
Additionally, if Maroc waits in room 4 for long enough, a WRAITH will enter - through the locked door..!
Periodic checks are made for creatures in adjacent rooms, and they'll wander into Maroc's room after a while, though it takes much longer than when they follow him out of a room.
The byte holding the creature room data is added to the creature room table at 6B8C. However, room 0 doesn't exist.
As room 1 was intended to be the first entry, to create an address offset, this byte is decremented at the start of the check at C93D.
This results in 27532 + 255 = 27787. This address is way past all the standard creature room data at 6B8C. So the routine ends up looking for creature information at 27787, well into the warlock data tables at 6C7C.
The byte at 27787 contains a value of 2. At 6B8C you can see that this represents 2 wraiths.
To change how this door works:
POKE 26555,0 - to unlock the door
POKE 26553,n - where n is the room number the door takes you to
-----
** 29/11/2022 - Update note from Steve Turner ** (Twitter link):
"The door is to the surface and is blocked by fallen rock. In the first batch made if you sat in that room till a warlord appears it fired a magic missile that accidently opened the door. Then if you went through the game crashed."
...I guess this is another way of getting the door open..! Though warlock #1 doesn't fire missiles very frequently, so it's likely that one of the aforementioned wraiths will open the door before it's conveniently hit by a missile.
The spider and the floating scroll
When Maroc kills the spider in room 142 (Goblin Warrens) a scroll is revealed, which then floats off screen in the last direction in which the spider was moving.
The scroll's spell is undefined, and the scroll itself is uncollectable regardless, as it's not defined as magic.
bug with uncollectable scroll in room 142
Strangely, this spider doesn't cause any damage to Maroc, so its intention is unclear.
To create a collectable spell after killing the spider:
POKE 30639,64
POKE 30632,spell number (from table at 6DFC, e.g. 9 for UNSEEN)
** 29/11/2022 - Update note from Steve Turner ** (Twitter link):
"The spider scroll flying off I can't remember, I will look it up."
...I suspect this one will remain a mystery..! There are some other creature 'items' in the game that can be dispelled, though some of these are just for additional spells.
Hijinks with the WAYSTONE spell
When Maroc casts the WAYSTONE spell, he instantly teleports to an adjacent room. In fact, this is his current room number +1. This can get him out of some scrapes if he's being chased while scrolling in his spell list.
Normally the player wouldn't know what room number they're in, though if they do, they can use it to pass through locked doors, and even jump between levels.
One particular occasion where WAYSTONE can be used to interesting effect:
THE PORTAL ROOM
Room 82 contains a floor marking - Maroc needs to put the 4 elemental symbols onto this to create the portal that will take him to the High Temple of Chaos.
The room this portal leads to is room number 83. So Maroc doesn't need to bother looking for the elemental symbols - he can just cast WAYSTONE to take him there.
casting waystone to reach the high temple of chaos
This means that as soon as Maroc obtains Caliburn, he's able to go and finish the game.
** 29/11/2022 - Update note from Steve Turner ** (Twitter link):
"There are often more than one way to do things solving problems gives you shortcuts such as the portal which had to be there in case you ran out of the spell.."
...I suppose this should probably have been put in the 'trivia' section (it's not really a bug). The WAYSTONE spell is a great spell for players to experiment with - most of the time they'll teleport to a nearby room, but jumping between dungeon areas is possible, depending on the arrangement of their respective room numbers.
Too many creatures in a room
The table at 6B8C holds the number of creatures in each room, with the type and number of creatures being stored in a single byte.
This means that the room (in theory) could hold 3 of each type of creature (= 12 creatures). However, there is a limit of THREE creatures in a room at any one time. This is possibly for performance reasons but it also prevents Maroc from gaining an entourage of pursuing creatures in a single screen..!
So if Maroc exits a room containing 2 creatures into another room with 2 creatures, only one creature will pursue him into the room. If Maroc subsequently destroys one of the three creatures in the room, another one can then enter.
However, the data for rooms 144 and 211 puts too many creatures in the room to begin with, so not all of them appear.
One upshot of this is that as there are too many creatures in room 211 (in the High Temple of Chaos), the demon that would normally appear in that room cannot materialize, unless Maroc destroys at least one of the creatures present (goblins warrior, missile thrower or guardian of chaos).
Teleport spells
When Maroc casts a teleport spell such as PORTAL, WAYSTONE or SUMMON, his new room number (EAB0) is immediately calculated at the point of casting (D8CE).
This change to his room number is picked up at DA31 and his new X/Y room co-ordinates set.
Maroc appears in the top left of the room, at the position of the left wall/floor vertical connector.
Maroc's position after teleporting to another room
Although his horizontal positioning in the room is fine, it may be that his viewport/room vertical positions have been mixed up.
To place Maroc 'properly' within the new room after a teleport:
POKE 55869,48
Maroc's position after teleporting to another room
Frozen creatures can follow Maroc between rooms
Maroc can stop creatures from moving by casting the FREEZE spell, to give him breathing space.
However, frozen creatures are still able to somehow follow him from room to room, as there's no check in place for the FREEZE spell.
Creatures can pursue Maroc even when affected by the freeze spell
...While you might accept that a frozen creature could see Maroc exiting a room, they shouldn't really be able to follow him through multiple rooms whilst not being able to move.
Similarly, casting UNSEEN does not stop creatures from pursuing Maroc.
To stop creatures following Maroc between rooms when the FREEZE spell is active:
POKE 51494,156; POKE 51495,236; POKE 51497,0; POKE 51498,32
Or, to stop creatures following Maroc between rooms when the UNSEEN spell is active:
POKE 51494,233; POKE 51595,234; POKE 51497,9; POKE 51498,40
** 29/11/2022 - Update note from Steve Turner ** (Twitter link):
"The freeze spell freezes time around Maroc so enemies are released when he goes out the room, that was designed."
...I retract my earlier comment...! It's a nice idea that the FREEZE spell would work like an 'area effect' spell. Though this wouldn't explain why creatures would follow Maroc when he has the UNSEEN spell activated.
Certain room positions make Maroc untouchable
It's possible for Maroc to get himself into positions (e.g. the corners of rooms) where chasing creatures can't quite get to him to do him damage.
This is because Maroc has a slightly greater movement speed precision (i.e. he has the ability to move in smaller speed increments) than some creatures.
On the whole creature speed needs to be set quite high, otherwise the creatures wouldn't be able to chase Maroc very well. However, a side effect of this is that it lets Maroc squeeze closer to room boundaries than creatures can get to.
Maroc avoiding a scorpion by moving to the corner of a room
In the above animated image, the routine at E067 triggers a boundary breach for the scorpion moving left against the side wall. It's not quite able to creep any further to the left without bouncing off it.
You can also see how, shortly afterwards, the scorpion gets destroyed by the warlock's missile, which also fails to reach Maroc's position..!
The issue mainly affects creatures and items (like the warlock's bolt) that are calculated to head straight towards Maroc's position. Other creatures, that have a random aspect to their movement, may be able to eventually reach him.
Throw me a bone! Warlock stealing and transforming room items
In room 38 in the Great Halls of the Deep, there's a BONE - it's an illusion. Maroc can cast DISPEL on it to obtain a key.
However, there's a warlock on this level too. Because the bone appears on a wall, if the warlock appears in this room, there's a chance it might move over the object and take it.
This isn't too surprising - the servant doesn't need to be involved for a trade event check, as the event/collision is between the object and the warlock. For example, the servant can throw/drop an object on the warlock and the event trigger is flagged as positive.
warlock transforming and teleporting the bone/key
Warlocks teleport unwanted objects to the current room number +3.
If Maroc follows where the item has gone - in the animated image this is by use of WAYSTONE x3 - he finds it's been transformed into the key.
So what's going on?
So although it happens too fast to see during the game, two positive event/collision checks actually occur - the first (as above) transforms the key, due to an unlikely match with the very specific DISPEL spell value.
The second is the warlock trade event check - the key isn't of value to the warlock, which teleports it 3 rooms away.
This scenario highlights the fluid, interesting, and - at times - unpredictable nature of the event/transform system in Avalon.
A similar event/collision check can cause an open door to be slammed shut if a creature missile hits one after rebounding off Maroc's active shield/barrier spell.
** 29/11/2022 - Update note from Steve Turner ** (Twitter link):
"The throwing the bone thing was designed around the saying throw the dog a bone."
...I'm not quite convinced by this explanation, though there are some nice animal-based interactions in both Avalon and Dragontorc. Objects that flash/change colour in Avalon are usually a clue that they are illusionary and can be 'seen' properly using the DISPEL spell.