Horizontal Movement

The X sub-pixel position 02D4 does not reset to zero or any other value. It changes only via changes in the X sub-speed value.

Walking

Kuros is walking when status address 03D8 has value 0x01. When accelerating on level ground, the X sub-speed address 0370 increases by 0x10 each frame. The X speed address 038A increases by 1 after 0370 reaches its maximum. This continues up to maximum values based on the costume worn, as per the following table:
CostumeMax SpeedMax Sub-speed
Any Knight20x00
Thief 120x40
Thief 220x80
Thief 330x00
Any Wizard10x80
Jumping does not interfere with the pattern of the increasing values, but the actual speed while jumping is slower; see below.
If you press and hold the direction button opposite to the direction Kuros is facing, sub-speed decreases by 0x3C each frame until speed and sub-speed reach 0. Then Kuros turns around and begins to accelerate in the forward direction as explained above.
If speed or sub-speed are non-zero and neither left nor right is pressed, sub-speed decreases by 0x1E each frame until the speed and sub-speed reach 0.
When entering a new area or when pressing B while moving, the speed and sub-speed are set to 0.

Crouching

Kuros is crouching when status address 03D8 has value 0x08. When moving horizontally while crouching, speed has a constant value of 1 and sub-speed a constant value of 0. No deceleration occurs when changing direction while crouch-moving; Kuros turns to face the opposite direction immediately and maintains speed 1 and sub-speed 0.
When you start to crouch by pressing down, the speed and sub-speed values are set depending on which other directional buttons are pressed:
Other ButtonsSpeedSub-speed
None00
Forward10
Backward10
Any acceleration or deceleration related to those buttons continues until the new values are set.
When you leave the crouching state, speed and sub-speed are set to 0, with the following exceptions:

Jumping and Falling

Kuros is jumping when status address 03D8 has value 0x02. He is falling when status address 03D8 has value 0x06. The speed and sub-speed values change as per the walking process, but the horizontal position actually changes by only 75% of those values each frame while jumping or falling. Thus, jumping and falling are slower than walking. After landing, the horizontal position changes by the full speed and sub-speed values.
Because crouch-jumping sets the speed to 1 right away and continues to increase it from there to the maximum, it is faster than walking up until the frame at which walking would reach 75% of the maximum speed.
After prolonged falling, status address 03D8 changes to value 0x07. Specifically, this occurs when the counter at address 008E reaches a value of 0x46. Continuing to fall for too long past this point causes damage upon landing. While in status 0x07, the sub-speed value changes each frame by amounts that depend on which directional buttons are pressed:
Button PressedChange in Sub-speed
NoneDecrease by 0x0A
ForwardIncrease by 0x06
BackwardDecrease by 0x46
This is still a falling state, so horizontal position only changes by 75% of the speed and sub-speed values.
If neither left nor right is being pressed when landing, the speed and sub-speed are set to 0.

Damage

When taking damage from an enemy, the speed is set to 0xFD, the sub-speed to 0, and the status address 03D8 to 0x02. Changes then proceed according to the jumping and falling process.

Slopes

Kuros is sliding down a slope when status address 03D8 has value 0x0C. The speed is set to a constant value of 1 or 2, depending on the type of slope. The sub-speed is set to 0. This applies to all costumes, so the wizards can move faster than maximum speed on certain slopes. After reaching the end of the slope, speed and sub-speed change according to the walking process. Horizontal position changes by the full speed and sub-speed values.

Vertical Movement

When not standing on solid ground, Kuros's vertical position changes by the Y speed (03BE) and Y sub-speed (03A4) values each frame. Unlike the X sub-pixel position, the Y sub-pixel position 0322 resets to zero frequently, such as when landing on solid ground.

Jumping

When Kuros begins to jump, the Y speed address 03BE and Y sub-speed address 03A4 are set to values that depend on the costume worn:
CostumeSpeedSub-speed
Starting Knight30x80
Any Guild Knight30xA0
Any Thief30x60
Wizard 130xC0
Wizard 230xE0
Wizard 340x00
While in the jumping state (03D8 = 0x02), the sub-speed decreases depending on whether or not the jump button A is pressed. If A is not pressed, the sub-speed decreases by 0x3F per frame. If A is pressed, the sub-speed decreases by 0x15 for seven frames and by 0x2A every eighth frame. Specifically, the decrease is 0x2A when the three lowest bits of address 0091 are clear and 0x15 when any of them is set. When speed and sub-speed both reach zero, Kuros enters the falling state.

Falling

While in the falling state (03D8 = 0x06 or 0x07), the sub-speed 03A4 increases by 0x1A every frame until reaching a maximum speed and sub-speed of 4 and 0, respectively.

Damage

When taking damage from an enemy, the speed is set to 2, the sub-speed to 0, and the status address 03D8 to 0x02. Changes then proceed according to the jumping and falling process.

GameResources/NES/WizardsAndWarriors3 last edited by Dacicus on 10/31/2020 8:15 PM
Page History Latest diff List referrers View Source