Skip to content

hide justsu with move tag while immobilized#1368

Draft
Phrosfire wants to merge 1 commit into
mainfrom
move-prevent-rework
Draft

hide justsu with move tag while immobilized#1368
Phrosfire wants to merge 1 commit into
mainfrom
move-prevent-rework

Conversation

@Phrosfire

@Phrosfire Phrosfire commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Please fill: what was implemented, why, possibly include screenshots, are any of the changes breaking, etc.

License

By making this pull request, I confirm that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the Studie-Tech ApS organization has the copyright to use and modify my contribution for perpetuity.

Summary by CodeRabbit

Bug Fixes

  • Characters affected by immobilization during combat can no longer execute movement-based abilities or actions
  • Movement-restricting effects now properly expire once their active duration ends, restoring full character mobility
  • Combat immobilization mechanics have been refined to prevent movement abilities from being used while effects remain active

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
the-ninja-ai Ready Ready Preview, Comment Jun 20, 2026 3:25pm
tnr Ready Ready Preview, Comment Jun 20, 2026 3:25pm

Request Review

@github-actions github-actions Bot added the size:S 10-29 effective changed lines (test files excluded in mixed PRs). label Jun 19, 2026
@Phrosfire Phrosfire closed this Jun 19, 2026
@Phrosfire Phrosfire reopened this Jun 19, 2026
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2fb3d391-7dcb-4583-992e-09a3a473260f

📥 Commits

Reviewing files that changed from the base of the PR and between 89e2016 and 5b2a771.

📒 Files selected for processing (2)
  • app/src/libs/combat/actions.ts
  • app/src/libs/combat/util.ts

Walkthrough

Two coordinated fixes to combat immobilization: isUserImmobilized in util.ts now requires rounds > 0 on moveprevent effects before returning true, and availableUserActions in actions.ts filters out injected jutsus that contain a "move" effect when the user is immobilized.

Changes

Immobilization and movement jutsu filtering

Layer / File(s) Summary
moveprevent rounds guard and movement jutsu exclusion
app/src/libs/combat/util.ts, app/src/libs/combat/actions.ts
isUserImmobilized adds rounds existence and rounds > 0 checks to the moveprevent predicate, narrowing when immobilization is detected. availableUserActions uses that result to exclude jutsus containing a "move" effect type from the available action list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇 Hoppity-hop, but not today,
A ninja frozen cannot sway!
rounds > 0 keeps the check precise,
No movement jutsus — isn't that nice?
The bunny stamps the diff with glee,
Immobilized? Then movement's fee! 🥷

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete. The required section 'what was implemented, why, possibly include screenshots, are any of the changes breaking, etc.' was not filled out with actual details. Add specific details about what was implemented, explain the rationale for the changes, clarify if there are any breaking changes, and provide relevant context about the move-prevent-rework effort.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: hiding jutsus with move tags while immobilized, which directly corresponds to the code modifications in both files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch move-prevent-rework

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 and usage tips.

@theeneon theeneon added the 20 SS label Jun 20, 2026
@greptile-apps

greptile-apps Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Both changes are small, well-scoped, and follow existing patterns in the file — safe to merge.

The isUserImmobilized fix closes a real gap where an expired moveprevent effect could still block movement, and the new jutsu filter in availableUserActions mirrors the summon-prevention guard exactly. No new edge cases are introduced.

No files require special attention.

Important Files Changed

Filename Overview
app/src/libs/combat/util.ts Adds "rounds" in e && e.rounds && e.rounds > 0 guards to isUserImmobilized, bringing it in line with isUserStealthed and isUserSummonPrevented. Previously the function could return true for a moveprevent effect with rounds = 0, which would incorrectly block movement after the effect expired.
app/src/libs/combat/actions.ts Adds a new filter in availableUserActions that hides jutsus with a "move" effect type when the user is immobilized, following the same guard pattern already used for stealth and summon-prevention filtering.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[availableUserActions called] --> B{isImmobilized?}
    B -- "no" --> D[Include basicMove & replacement technique]
    B -- "yes" --> E[Exclude basicMove & replacement technique]
    E --> F[Filter jutsu list]
    D --> F
    F --> G{isStealth?}
    G -- "yes" --> H[Exclude offensive-tagged jutsus]
    G -- "no" --> I{isSummonPrevented?}
    H --> I
    I -- "yes" --> J[Exclude summon-tagged jutsus]
    I -- "no" --> K{isImmobilized?}
    J --> K
    K -- "yes" --> L[Exclude move-tagged jutsus NEW]
    K -- "no" --> M[Apply elemental seal filter]
    L --> M
    M --> N[Return available actions]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[availableUserActions called] --> B{isImmobilized?}
    B -- "no" --> D[Include basicMove & replacement technique]
    B -- "yes" --> E[Exclude basicMove & replacement technique]
    E --> F[Filter jutsu list]
    D --> F
    F --> G{isStealth?}
    G -- "yes" --> H[Exclude offensive-tagged jutsus]
    G -- "no" --> I{isSummonPrevented?}
    H --> I
    I -- "yes" --> J[Exclude summon-tagged jutsus]
    I -- "no" --> K{isImmobilized?}
    J --> K
    K -- "yes" --> L[Exclude move-tagged jutsus NEW]
    K -- "no" --> M[Apply elemental seal filter]
    L --> M
    M --> N[Return available actions]
Loading

Reviews (1): Last reviewed commit: "hide justsu with move tag while immobili..." | Re-trigger Greptile

@Phrosfire Phrosfire marked this pull request as draft June 21, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

20 SS size:S 10-29 effective changed lines (test files excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants