Difference between revisions of "ADnD: Dragons of Flame/Game Mechanics and Techniques"

From SDA Knowledge Base

Jump to: navigation, search
m (RNG)
(Magic)
Line 27: Line 27:
  
 
==Magic==
 
==Magic==
 +
Unlike in the previous game in the series, Heroes of the Lance, you need to enter the menu every time magic is used. It's therefore generally too time-consuming to cast in a speedrun considering the often moderate effect.<br /><br />
 +
 +
'''Raistlin's magic'''
 +
* ''Charm'' - Apparently renders humanoids docile. Of no interest in a speedrun.
 +
* ''Sleep'' - Freezes at least some enemies in place long enough to run past them. It works for example on trolls and is the fastest method (fewest menu presses) to get through them without taking damage. Of no interest for an optimized speedrun, but could be worth keeping in mind in a casual or marathon run.
 +
* ''Magic missile'' - Deals damage to enemies. It's by far the most efficient way to deal with Ember (the second-to-last boss). Otherwise not worth it (it doesn't deal enough damage to kill enemies in one shot).
 +
* ''Web'' - From a glance, seems to work similar to the sleep spell. It's possible it works on different enemies. Difficult to see any use in a speedrun though.
 +
* ''Burning hand'' - Deals damage to enemies. Since it doesn't have any special ability like the magic missiles, it's of no interest in a speedrun.
 +
* ''Fireball'' - Deals damage to enemies. Of no interest in a speedrun.
 +
<br />
 +
'''Goldmoon's magic'''
 +
* ''Cure light wounds'' - Restores 51HP (i.e. 20% of full health).
 +
* ''Hold person'' - Similar to sleep and web. It's possible it works on different enemies. Difficult to see any use in a speedrun though.
 +
* ''Spiritual hammer'' - Deals damage to enemies. Of no interest in a speedrun.
 +
* ''Blessing'' - Effect unknown. The manual describes it as "Protection From Evil" (PFE). PFE was a spell in Heroes of the Lance that greatly reduces the chance to get hit (and possibly the damage taken). The same effect has not been seen Dragons of Flame. It's possible it only works against certain enemies?
 +
* ''Dispel magic'' - Blocks enemy magic on screen and prevents enemies from casting new magic for a few seconds. It's only relevant against Bozak Draconians and Verminaard. Of no interest in a speedrun, but makes fighting Verminaard trivial.
 +
* ''Heal'' - Restores 127HP (i.e. 50% of full health).
 +
* ''Turn undead'' - Effect not investigated. According to the manual, it attacks or turns away undead. Of no interest in a speedrun.
 +
* ''Cure critical wounds'' - Restores 204HP (i.e. 80% of full health).
 +
* ''Raise dead'' - Unlike in Heroes of the Lance, you can now revive lost characters at any time and not only where they perished. Of no interest in a speedrun, but a good fail-safe to keep in mind in a casual or marathon run.
  
 
==RAM-addresses==
 
==RAM-addresses==

Revision as of 07:45, 6 September 2020

RNG

The RNG only matters for the overworld. The dungeon levels only depend on the player actions.
The RNG-addresses are $83 and $84. They're updated with a recursive formula, taking the global timer in $79 as entropy. The sub-routine starts at instruction $D016. The formula produces a sequence that doesn't appear to be possible to manipulate in real-time. Since the global timer in $79 starts running from power-on, it's essentially impossible to manipulate something even at the very start of the game.
Pressing the d-pad from a standstill position will move the player 16 pixels in the corresponding direction. The overworld can therefore be thought of as a grid of 16x16 pixel squares. Several of the events described below occur when the player occupy these corners. Below, these will be referred to as "intersections".

Enemy spawning (overworld)

If there are less than 3 enemies in the memory, the game does a random check every time the player reaches an intersection. The random check has a 25% chance of producing an enemy (the check starts at instruction $8DCD).

  • Note 1: If the player is standing still, the check will be done every frame!
  • Note 2: If there are no enemies or only one enemy, a check will be done for every missing enemy. So up to 3 enemies can spawn in a single frame.


The player actions determine to a certain extent where the new enemy will spawn:

- If the player is moving to the right, the enemies will spawn at the bottom of the screen
- If the player is moving to the left, the enemies will spawn at the left of the screen
- If the player is moving up, the enemies will spawn at the top of the screen
- If the player is moving down, the enemies will spawn at the bottom of the screen
- If the player is standing still, the enemies will spawn in any of the 4 sides of the screen with equal probability

Once the side of the screen has been determined, the game randomly calculates the other coordinate. If the calculated spawning position coincides with an object, the spawn is cancelled.

  • Note: The only possibility for an enemy to spawn on the right side of the screen is if the player is standing still (and then it's a 25% probability).

Enemy movement (overworld)

The general movement of enemies is "2 steps towards the player, 1 random step, 2 steps towards the player, 1 random step, etc". This pattern results from the check that starts at instruction $8EBA. The movement direction is updated every time both the player and the enemy are at intersections. A few observations:

- When the enemy is running into an obstacle, the movement direction is recalculated every frame until a direction moving away from the object is found.
- If you make small pauses and thereby get out of sync with the enemy movements, you will notice they will also make brief stops, waiting for the positions to sync (same thing happens if they run into obstacles).
- When the x- and y-distance to the player is equal, the x-movement is preferred. This means it's relatively safe to try and run past an enemy above or below, but risky to do it a square to the left or right of the enemy.

Enemies

Magic

Unlike in the previous game in the series, Heroes of the Lance, you need to enter the menu every time magic is used. It's therefore generally too time-consuming to cast in a speedrun considering the often moderate effect.

Raistlin's magic

  • Charm - Apparently renders humanoids docile. Of no interest in a speedrun.
  • Sleep - Freezes at least some enemies in place long enough to run past them. It works for example on trolls and is the fastest method (fewest menu presses) to get through them without taking damage. Of no interest for an optimized speedrun, but could be worth keeping in mind in a casual or marathon run.
  • Magic missile - Deals damage to enemies. It's by far the most efficient way to deal with Ember (the second-to-last boss). Otherwise not worth it (it doesn't deal enough damage to kill enemies in one shot).
  • Web - From a glance, seems to work similar to the sleep spell. It's possible it works on different enemies. Difficult to see any use in a speedrun though.
  • Burning hand - Deals damage to enemies. Since it doesn't have any special ability like the magic missiles, it's of no interest in a speedrun.
  • Fireball - Deals damage to enemies. Of no interest in a speedrun.


Goldmoon's magic

  • Cure light wounds - Restores 51HP (i.e. 20% of full health).
  • Hold person - Similar to sleep and web. It's possible it works on different enemies. Difficult to see any use in a speedrun though.
  • Spiritual hammer - Deals damage to enemies. Of no interest in a speedrun.
  • Blessing - Effect unknown. The manual describes it as "Protection From Evil" (PFE). PFE was a spell in Heroes of the Lance that greatly reduces the chance to get hit (and possibly the damage taken). The same effect has not been seen Dragons of Flame. It's possible it only works against certain enemies?
  • Dispel magic - Blocks enemy magic on screen and prevents enemies from casting new magic for a few seconds. It's only relevant against Bozak Draconians and Verminaard. Of no interest in a speedrun, but makes fighting Verminaard trivial.
  • Heal - Restores 127HP (i.e. 50% of full health).
  • Turn undead - Effect not investigated. According to the manual, it attacks or turns away undead. Of no interest in a speedrun.
  • Cure critical wounds - Restores 204HP (i.e. 80% of full health).
  • Raise dead - Unlike in Heroes of the Lance, you can now revive lost characters at any time and not only where they perished. Of no interest in a speedrun, but a good fail-safe to keep in mind in a casual or marathon run.

RAM-addresses

Personal tools