Skip to content

Acrobat creating incorrect skill buffers #672

@Casdiss

Description

@Casdiss

In lines 10-14 of Acrobat.s, the active unit is loaded and checked for 0. If the active unit is 0, then r2 is mov’d to r0 and used as the unit argument instead.

the comment on line 14 says “if the active unit is 0, we're being called from dangerzone.” This erroneously assumes Acrobat is only called when a unit is selected or the danger zone is checked.

Acrobat is also checked every time there is a REDA in which case r2 contains an unrelated movement table. These REDA movement tables contain only FF and 01 and so in many scenarios will attempt to create a skill buffer for unit 01. If unit 01 is not yet loaded when a REDA occurs, it’ll create an empty skill buffer for them.

Since skill buffers are only regenerated if the unit being checked doesn’t already match the buffer, this can cause specifically unit 01 (usually the lord) to fail their next skill check if they are then loaded and tested fot skill.

To test, go to the skill buffer $2026BB0 during a REDA while unit 01 isn’t loaded. The skill buffer should become “01 00 00 00” Should unit then be loaded and tested for any skills, they will automatically fail them due to the pre-generated empty buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssues pertaining to bugs.Core FeaturesIssues pertaining to the core functions of the Skill System, its skills, or its dependencies.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions