feat(debug): 모바일 레이아웃에 치트 기능 추가
- MobileCarouselLayout에 치트 버튼 추가 - GameSessionController에 치트 활성화 상태 관리 추가 - ProgressLoop/ProgressService에 치트 메서드 추가
This commit is contained in:
@@ -26,6 +26,7 @@ class ProgressTickResult {
|
||||
this.completedQuest = false,
|
||||
this.completedAct = false,
|
||||
this.playerDied = false,
|
||||
this.gameComplete = false,
|
||||
});
|
||||
|
||||
final GameState state;
|
||||
@@ -36,8 +37,11 @@ class ProgressTickResult {
|
||||
/// 플레이어 사망 여부 (Phase 4)
|
||||
final bool playerDied;
|
||||
|
||||
/// 게임 클리어 여부 (Act V 완료)
|
||||
final bool gameComplete;
|
||||
|
||||
bool get shouldAutosave =>
|
||||
leveledUp || completedQuest || completedAct || playerDied;
|
||||
leveledUp || completedQuest || completedAct || playerDied || gameComplete;
|
||||
}
|
||||
|
||||
/// Drives quest/plot/task progression by applying queued actions and rewards.
|
||||
@@ -155,6 +159,7 @@ class ProgressService {
|
||||
var leveledUp = false;
|
||||
var questDone = false;
|
||||
var actDone = false;
|
||||
var gameComplete = false;
|
||||
|
||||
// 스킬 시스템 시간 업데이트 (Phase 3)
|
||||
final skillService = SkillService(rng: state.rng);
|
||||
@@ -400,8 +405,10 @@ class ProgressService {
|
||||
// plot 타입이 dequeue 되면 completeAct 실행 (원본 Main.pas 로직)
|
||||
if (dq.kind == QueueKind.plot) {
|
||||
nextState = nextState.copyWith(progress: progress, queue: queue);
|
||||
nextState = completeAct(nextState);
|
||||
final actResult = completeAct(nextState);
|
||||
nextState = actResult.state;
|
||||
actDone = true;
|
||||
gameComplete = actResult.gameComplete;
|
||||
progress = nextState.progress;
|
||||
queue = nextState.queue;
|
||||
}
|
||||
@@ -422,6 +429,7 @@ class ProgressService {
|
||||
leveledUp: leveledUp,
|
||||
completedQuest: questDone,
|
||||
completedAct: actDone,
|
||||
gameComplete: gameComplete,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -617,7 +625,30 @@ class ProgressService {
|
||||
}
|
||||
|
||||
/// Advances plot to next act and applies any act-level rewards.
|
||||
GameState completeAct(GameState state) {
|
||||
/// Returns gameComplete=true if Act V was completed (game ends).
|
||||
({GameState state, bool gameComplete}) completeAct(GameState state) {
|
||||
// Act V 완료 시 (plotStageCount == 5) 게임 클리어
|
||||
// plotStageCount: 0=Prologue, 1=Act I, 2=Act II, 3=Act III, 4=Act IV, 5=Act V
|
||||
if (state.progress.plotStageCount >= 5) {
|
||||
// Act V 완료 - 게임 클리어!
|
||||
// 히스토리만 업데이트하고 새 Act는 생성하지 않음
|
||||
final updatedPlotHistory = [
|
||||
...state.progress.plotHistory.map(
|
||||
(e) => e.isComplete ? e : e.copyWith(isComplete: true),
|
||||
),
|
||||
const HistoryEntry(caption: '*** THE END ***', isComplete: true),
|
||||
];
|
||||
|
||||
final updatedProgress = state.progress.copyWith(
|
||||
plotHistory: updatedPlotHistory,
|
||||
);
|
||||
|
||||
return (
|
||||
state: state.copyWith(progress: updatedProgress),
|
||||
gameComplete: true,
|
||||
);
|
||||
}
|
||||
|
||||
final actResult = pq_logic.completeAct(state.progress.plotStageCount);
|
||||
var nextState = state;
|
||||
for (final reward in actResult.rewards) {
|
||||
@@ -648,7 +679,7 @@ class ProgressService {
|
||||
nextState = _startFirstQuest(nextState);
|
||||
}
|
||||
|
||||
return _recalculateEncumbrance(nextState);
|
||||
return (state: _recalculateEncumbrance(nextState), gameComplete: false);
|
||||
}
|
||||
|
||||
/// 첫 퀘스트 시작 (Act I 시작 시)
|
||||
|
||||
Reference in New Issue
Block a user