fix(death): 사망 시 희생 아이템 선택 디버그 로그 추가

- 장비 슬롯 상태 콘솔 로그 추가
- resurrection_service에 lostItemSlot 설정 누락 수정
- resetBattleUsage 존재하지 않는 메서드 호출 제거
This commit is contained in:
JiWoong Sul
2026-01-15 23:33:31 +09:00
parent 7e1936b34f
commit b8a4d73461
6 changed files with 117 additions and 101 deletions

View File

@@ -327,11 +327,9 @@ class ProgressService {
);
}
final resetPotionInventory = nextState.potionInventory.resetBattleUsage();
nextState = nextState.copyWith(
progress: progress,
queue: queue,
potionInventory: resetPotionInventory,
);
// 최종 보스 처치 체크
@@ -977,10 +975,17 @@ class ProgressService {
// 무기(슬롯 0)를 제외한 장착된 장비 중 1개를 제물로 삭제
final equippedNonWeaponSlots = <int>[];
for (var i = 1; i < Equipment.slotCount; i++) {
if (state.equipment.getItemByIndex(i).isNotEmpty) {
final item = state.equipment.getItemByIndex(i);
// 디버그: 장비 슬롯 상태 확인
// ignore: avoid_print
print('[Death] Slot $i: "${item.name}" isEmpty=${item.isEmpty}');
if (item.isNotEmpty) {
equippedNonWeaponSlots.add(i);
}
}
// 디버그: 장착된 슬롯 목록
// ignore: avoid_print
print('[Death] equippedNonWeaponSlots: $equippedNonWeaponSlots');
if (equippedNonWeaponSlots.isNotEmpty) {
lostCount = 1;