-
Notifications
You must be signed in to change notification settings - Fork 1
스토리 분기 엔진 데이터화 (전면 표준화 Phase 4) #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
The head ref may contain hidden characters: "20260808_\uC2A4\uD1A0\uB9AC_\uC804\uC774_\uADDC\uCE59_\uB370\uC774\uD130\uD654"
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| { | ||
| "_comment": [ | ||
| "스토리 전이 규칙. 원래는 컴포넌트에 숫자 조건문 60줄로 박혀 있었다.", | ||
| "", | ||
| "구조: stages[스테이지번호].scenes[씬인덱스] = 전이 규칙 배열", | ||
| " - 배열을 위에서부터 평가해 첫 번째로 조건을 만족하는 규칙을 따른다", | ||
| " - when 없는 규칙은 항상 참 (기본값 역할)", | ||
| " - when.scoreMin / when.scoreMax 로 점수 구간 지정 (Max는 미만)", | ||
| " - to: 다음 씬 인덱스 / exit: 화면 이동", | ||
| "", | ||
| "규칙이 없는 씬은 index + 1 로 순서대로 진행한다.", | ||
| "stageExit: 스테이지를 마쳤을 때 선택지에 따라 갈리는 다음 스테이지", | ||
| "", | ||
| "값의 근거는 docs/GAME-FLOW.md, 검증은 src/game/storyFlow.test.js" | ||
| ], | ||
|
|
||
| "stages": { | ||
| "2": { | ||
| "scenes": { | ||
| "0": [ | ||
| { "when": { "scoreMin": 15, "scoreMax": 40 }, "to": 1 }, | ||
| { "when": { "scoreMax": 15 }, "to": 2 }, | ||
| { "to": 3 } | ||
| ], | ||
| "1": [{ "to": 3 }], | ||
| "2": [{ "to": 3 }] | ||
| }, | ||
| "stageExit": { | ||
| "_comment": "카페에서 '돈을 줍는다'(첫 선택지)를 고르면 우산 경로가 열린다", | ||
| "byChoice": { "0": "/main4" }, | ||
| "default": "/main3" | ||
| } | ||
| }, | ||
|
|
||
| "3": { | ||
| "scenes": { | ||
| "1": [ | ||
| { "when": { "scoreMin": 60 }, "to": 2 }, | ||
| { "when": { "scoreMin": 20 }, "to": 3 }, | ||
| { "to": 4 } | ||
| ], | ||
| "2": [{ "to": 5 }], | ||
| "3": [{ "to": 5 }], | ||
| "4": [{ "to": 5 }] | ||
| } | ||
| }, | ||
|
|
||
| "4": { | ||
| "scenes": { | ||
| "2": [ | ||
| { | ||
| "_comment": "데이터의 love:60 선언과 달리 실제 임계치는 70이다 (동작 유지)", | ||
| "when": { "scoreMin": 70 }, | ||
| "to": 3 | ||
| }, | ||
| { "to": 4 } | ||
| ] | ||
| } | ||
| }, | ||
|
|
||
| "5": { | ||
| "scenes": { | ||
| "2": [{ "exit": "/result" }] | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
종료 경로 규칙이 선택지 발생 씬을 식별하지 못합니다. 현재 선택지마다 종료 경로를 계산하지만 규칙과 API 모두 씬 인덱스를 사용하지 않습니다. 마지막 선택지가 우연히 값을 덮어쓰는 현재 구조는 씬 추가 또는 순서 변경 후 잘못된 최종 경로를 만들 수 있습니다.
src/data/stageRules.json#L28-L32:stageExit를 완료 씬 인덱스별 규칙으로 변경하세요.src/game/storyFlow.js#L67-L71:resolveStageExit가 씬 인덱스를 받고, 해당 씬의byChoice만 조회하도록 변경하세요. 호출부와 회귀 테스트도 함께 변경하세요.docs/GAME-FLOW.md#L121-L121: 구현이 씬별 종료 규칙을 보장한 후에만 “JSON만 고치면 된다”는 설명을 유지하세요.📍 Affects 3 files
src/data/stageRules.json#L28-L32(this comment)src/game/storyFlow.js#L67-L71docs/GAME-FLOW.md#L121-L121🤖 Prompt for AI Agents