fix(model): copyWith currentCombat null 초기화 버그 수정 및 테스트 추가
- ProgressState.copyWith에 clearCurrentCombat 파라미터 추가 - death_handler, resurrection_service에서 clearCurrentCombat 사용 - death_handler 테스트 14개 추가 - item_service 테스트 33개 추가 - skill_data 주석 스킬 개수 70→68 수정
This commit is contained in:
@@ -2,7 +2,7 @@ import 'package:asciineverdie/src/core/model/skill.dart';
|
||||
|
||||
/// 게임 내 스킬 정의
|
||||
///
|
||||
/// PQ 스펠 70개를 전투 스킬로 매핑
|
||||
/// PQ 스펠을 기반으로 68개 전투 스킬로 재구성
|
||||
/// 스펠 이름(영문)으로 스킬 조회 가능
|
||||
class SkillData {
|
||||
SkillData._();
|
||||
|
||||
@@ -72,7 +72,7 @@ class DeathHandler {
|
||||
|
||||
// 전투 상태 초기화 및 사망 횟수 증가
|
||||
final progress = state.progress.copyWith(
|
||||
currentCombat: null,
|
||||
clearCurrentCombat: true,
|
||||
deathCount: state.progress.deathCount + 1,
|
||||
bossLevelingEndTime: bossLevelingEndTime,
|
||||
);
|
||||
|
||||
@@ -78,7 +78,7 @@ class ResurrectionService {
|
||||
);
|
||||
|
||||
// 전투 상태 초기화
|
||||
final progress = state.progress.copyWith(currentCombat: null);
|
||||
final progress = state.progress.copyWith(clearCurrentCombat: true);
|
||||
|
||||
return state.copyWith(
|
||||
equipment: newEquipment,
|
||||
|
||||
@@ -160,6 +160,7 @@ class ProgressState {
|
||||
bool? pendingActCompletion,
|
||||
int? bossLevelingEndTime,
|
||||
bool clearBossLevelingEndTime = false,
|
||||
bool clearCurrentCombat = false,
|
||||
}) {
|
||||
return ProgressState(
|
||||
task: task ?? this.task,
|
||||
@@ -173,7 +174,9 @@ class ProgressState {
|
||||
plotHistory: plotHistory ?? this.plotHistory,
|
||||
questHistory: questHistory ?? this.questHistory,
|
||||
currentQuestMonster: currentQuestMonster ?? this.currentQuestMonster,
|
||||
currentCombat: currentCombat ?? this.currentCombat,
|
||||
currentCombat: clearCurrentCombat
|
||||
? null
|
||||
: (currentCombat ?? this.currentCombat),
|
||||
monstersKilled: monstersKilled ?? this.monstersKilled,
|
||||
deathCount: deathCount ?? this.deathCount,
|
||||
finalBossState: finalBossState ?? this.finalBossState,
|
||||
|
||||
Reference in New Issue
Block a user