Skip to content

feat: [1091] 判定系のカスタム関数の引数にレーン番号を追加#2114

Merged
cwtickle merged 2 commits into
developfrom
feature/1091-judg-lanenum
May 17, 2026
Merged

feat: [1091] 判定系のカスタム関数の引数にレーン番号を追加#2114
cwtickle merged 2 commits into
developfrom
feature/1091-judg-lanenum

Conversation

@cwtickle
Copy link
Copy Markdown
Owner

@cwtickle cwtickle commented May 16, 2026

🔨 変更内容 / Details of Changes

1. 判定系のカスタム関数の引数にレーン番号を追加

  • 判定系のカスタム関数(g_customJsObj.judg_XXX)の引数にレーン番号(_j)を追加しました。
  • 差分フレーム数、レーン番号の順に引数を受けると、取得できるようになります。

🔖 関連Issue, 変更理由 / Related Issues, Reason for Changes

  1. Discordでの要望より。
    https://discord.com/channels/698460971231870977/944491021918683196/1505190030132383835

📷 スクリーンショット / Screenshot

📝 その他コメント / Other Comments

  • 従来通りの引数でも動作すると思いますが、アップグレードガイドへ追記する予定です。

@cwtickle cwtickle added func20:Main プレイ画面全般 Discord / Gitter Discord (Gitter)での議論あり labels May 16, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 18e11002-636e-401d-b50c-e923a06fbf35

📥 Commits

Reviewing files that changed from the base of the PR and between 1e1689f and 4157edb.

📒 Files selected for processing (1)
  • js/danoni_main.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • js/danoni_main.js

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Updated internal gameplay judgment system architecture to improve code organization and maintainability.

Note: This release contains internal code improvements with no direct user-facing changes to gameplay, features, or interface.

Walkthrough

Lane index _j is propagated through the judgment pipeline. Core judgment functions (judgeRecovery, judgeDamage, and concrete judges) now accept _j and forward it to safeExecuteCustomHooks. All gameplay judgment call sites—arrow/freeze events, key-up/next-target reassignment, and result dispatch—pass _j into these functions.

Changes

Lane Index Propagation Through Judgment Pipeline

Layer / File(s) Summary
Core judgment function signatures
js/danoni_main.js
judgeRecovery and judgeDamage now accept (_name, _difFrame, _j) and forward _j into safeExecuteCustomHooks. Concrete judgment functions (judgeIi, judgeShakin, judgeMatari, judgeShobon, judgeUwan, judgeKita, judgeIknai) now accept (_difFrame, _j) and pass _j into their helper and hook calls.
Judgment invocation sites
js/danoni_main.js
Arrow ON/OFF, freeze ON/OFF, dummy-arrow/dummy-frz hooks, key-up failure paths, next-target reassignment, and arrow judgment result dispatch are updated to call judgment functions and result callbacks with _j (e.g., resultFunc(_difFrame, _j), judgeIknai(_cnt, _j)).

🎯 4 (Complex) | ⏱️ ~45 minutes

  • cwtickle/danoniplus#2087: Touches js/danoni_main.js dummy-arrow/dummy-freeze judgment and hook pathways; closely related at the code-path level.
  • cwtickle/danoniplus#1744: Modifies freeze-arrow judgment logic in js/danoni_main.js; related to freeze judgment timing/triggering changes.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding lane number as an argument to judgment-type custom functions, which matches the primary modification in the changeset.
Description check ✅ Passed The description explains the change (adding lane number argument to judgment custom functions) and provides context (Discord request), demonstrating relevance to the changeset.
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 feature/1091-judg-lanenum

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.

🔧 ast-grep (0.42.2)
js/danoni_main.js

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
js/danoni_main.js (1)

14176-14193: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Some judgment paths still drop _j.

judgeUwan in the auto-miss path, the freeze-start resultFunc(...) branch, and g_customJsObj.judg_frzHit still run without the lane index. That makes the new (_difFrame, _j) contract inconsistent, so lane-aware custom hooks will break on those paths.

Suggested fix
 		arrowOFF: (_j, _arrowName, _cnt) => {
 			if (_cnt < (-1) * g_judgObj.arrowJ[g_judgPosObj.shobon]) {
-				judgeUwan(_cnt);
+				judgeUwan(_cnt, _j);
 				judgeObjDelete.arrow(_j, _arrowName);
 			}
 		},
 			if (g_headerObj.frzStartjdgUse) {
 				const [resultFunc] = checkJudgment(_difCnt);
-				resultFunc(_difFrame);
+				resultFunc(_difFrame, _j);
 				displayDiff(_difFrame);
 			} else {
-	safeExecuteCustomHooks(`g_customJsObj.judg_${_name}Hit`, g_customJsObj[`judg_${_name}Hit`], _difFrame);
+	safeExecuteCustomHooks(`g_customJsObj.judg_${_name}Hit`, g_customJsObj[`judg_${_name}Hit`], _difFrame, _j);

Also applies to: 15409-15474, 15557-15580, 15713-15823

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@js/danoni_main.js` around lines 14176 - 14193, Some judgment paths drop the
lane index (_j) causing the new ( _difFrame, _j ) contract to be violated;
update all places that call judgeUwan, the freeze-start resultFunc(...) branch,
and g_customJsObj.judg_frzHit so they pass the lane index. Specifically, in
arrowOFF/arrowON flows and the freeze-start code paths replace calls like
judgeUwan(_cnt) and resultFunc(..., _difFrame) or g_customJsObj.judg_frzHit(...)
with judgeUwan(_cnt, _j), resultFunc(..., _difFrame, _j) and
g_customJsObj.judg_frzHit(_difFrame, _j) (or equivalent ordering used elsewhere)
so every judge invocation receives both _difFrame and _j consistently. Ensure
the same change is applied to the other indicated regions (around the other
ranges) so all judgment hooks are lane-aware.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@js/danoni_main.js`:
- Around line 14176-14193: Some judgment paths drop the lane index (_j) causing
the new ( _difFrame, _j ) contract to be violated; update all places that call
judgeUwan, the freeze-start resultFunc(...) branch, and
g_customJsObj.judg_frzHit so they pass the lane index. Specifically, in
arrowOFF/arrowON flows and the freeze-start code paths replace calls like
judgeUwan(_cnt) and resultFunc(..., _difFrame) or g_customJsObj.judg_frzHit(...)
with judgeUwan(_cnt, _j), resultFunc(..., _difFrame, _j) and
g_customJsObj.judg_frzHit(_difFrame, _j) (or equivalent ordering used elsewhere)
so every judge invocation receives both _difFrame and _j consistently. Ensure
the same change is applied to the other indicated regions (around the other
ranges) so all judgment hooks are lane-aware.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9e2cacd2-a169-433c-8d2e-909eb01caf67

📥 Commits

Reviewing files that changed from the base of the PR and between 05c0247 and 1e1689f.

📒 Files selected for processing (1)
  • js/danoni_main.js

@cwtickle
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cwtickle cwtickle merged commit e230192 into develop May 17, 2026
4 checks passed
@cwtickle cwtickle deleted the feature/1091-judg-lanenum branch May 17, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Discord / Gitter Discord (Gitter)での議論あり func20:Main プレイ画面全般

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant