Skip to content

Pushes, pulls and charges, which nothing read - #2309

Open
denislauri1999 wants to merge 1 commit into
NosCoreIO:masterfrom
denislauri1999:pr/forced-movement
Open

Pushes, pulls and charges, which nothing read#2309
denislauri1999 wants to merge 1 commit into
NosCoreIO:masterfrom
denislauri1999:pr/forced-movement

Conversation

@denislauri1999

Copy link
Copy Markdown
Contributor

BCard type 40. Three of its subtypes are used by the game's skills — 134 declarations between them — and all three move somebody:

11: Push your opponent back %s fields.         49
21: Draws enemies to %s fields away from you.  64
31: Charge at enemies within %s fields.        21

Subtype 21 is a pull, not a taunt

The enum called it FocusEnemies. The file says "Draws enemies to %s fields away from you", the value is a distance — 0 to 4 across the whole file, and 25 of the 64 say zero, which is "up against you" — and the skills carrying it are named Drawing Shot, Rotating Hammer and Spider King's Draw.

A taunt has nothing to do with a number of fields. Renamed to DrawEnemies.

The rule is the same for all three

Walk cell by cell and stop in front of the first obstacle. Jumping to the destination would put somebody inside a wall or past the edge of the map, and from there they cannot get out — the client and the server would stop agreeing about where they are.

The geometry is its own class rather than a private method, for two reasons: it is the part that can be wrong quietly (a step too many puts you in a wall, a step too few makes a charge stop short), and the part around it can only move a real ECS bundle — the position lives on a component and the interface exposes it read-only, so a test double would never budge and would prove nothing.

Left out, with the reason

Subtypes 41 "Run Away!" and 51 "Hide" are declared by no skill in the file. There would be nothing to check an implementation against.

Checked by breaking it

Ignoring the wall fails three tests; stopping one cell short of the named distance fails three.

TryApplyHit becomes async, the same change #2304 makes for the same reason — I gave both the identical comment so the two merge cleanly rather than colliding on a difference that means nothing.

BCard type 40. Three of its subtypes are used by the game's skills, 134
declarations between them, and all three move somebody:

    11: Push your opponent back %s fields.        49
    21: Draws enemies to %s fields away from you.  64
    31: Charge at enemies within %s fields.        21

SUBTYPE 21 IS A PULL, NOT A TAUNT, and the enum said otherwise: it was called
FocusEnemies. The file says "Draws enemies to %s fields away from you", the
value is a distance of 0 to 4 across the whole file - 25 of the 64 say zero,
which is "up against you" - and the skills carrying it are called Drawing Shot,
Rotating Hammer and Spider King's Draw. A taunt has nothing to do with a number
of fields. Renamed to DrawEnemies.

The rule is the same for all three: walk cell by cell and stop in front of the
first obstacle. Jumping to the destination would put somebody inside a wall or
past the edge of the map, and from there they cannot get out - client and server
would disagree about where they are.

The geometry is its own class rather than a private method, because it is the
part that can be wrong quietly, and because the part around it can only move a
real ECS bundle: the position lives on a component and the interface exposes it
read-only, so a test double would never budge and would prove nothing.

Subtypes 41 "Run Away!" and 51 "Hide" are declared by no skill in the file. They
are not here: there would be nothing to check them against.

Ignoring the wall fails three tests, stopping one cell short fails three.
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 16 minutes.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4c843e05-6463-4912-a30b-90365a0838ed

📥 Commits

Reviewing files that changed from the base of the PR and between 55dc38c and 26b4393.

📒 Files selected for processing (4)
  • src/NosCore.Data/Enumerations/Buff/AdditionalTypes.cs
  • src/NosCore.GameObject/Services/BattleService/ForcedMovement.cs
  • src/NosCore.GameObject/Services/BattleService/HitQueue.cs
  • test/NosCore.GameObject.Tests/Services/BattleService/ForcedMovementTests.cs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant