fix(ui): 사망 화면 장비 슬롯명 표시 및 기타 수정
- 사망 시 잃은 아이템에 슬롯명 표시 추가 - progress_service 마이너 수정 - 관련 테스트 업데이트
This commit is contained in:
@@ -187,6 +187,7 @@ class ActProgressionService {
|
||||
level: bossLevel,
|
||||
atk: (bossStats.atk * 1.5).round(), // Boss 보정 (1.5배)
|
||||
def: (bossStats.def * 1.5).round(),
|
||||
magDef: (bossStats.def * 1.8).round(), // 보스 마법 방어 (물리 대비 1.2배)
|
||||
hpMax: (bossStats.hp * 2.0).round(), // HP는 2.0배 (보스다운 전투 시간)
|
||||
hpCurrent: (bossStats.hp * 2.0).round(),
|
||||
criRate: 0.05,
|
||||
|
||||
@@ -970,6 +970,8 @@ class ProgressService {
|
||||
// 보스전 사망이 아닐 경우에만 장비 손실
|
||||
var newEquipment = state.equipment;
|
||||
var lostCount = 0;
|
||||
String? lostItemName;
|
||||
EquipmentSlot? lostItemSlot;
|
||||
|
||||
if (!isBossDeath) {
|
||||
// 무기(슬롯 0)를 제외한 장착된 장비 중 1개를 제물로 삭제
|
||||
@@ -987,12 +989,16 @@ class ProgressService {
|
||||
equippedNonWeaponSlots[state.rng.nextInt(
|
||||
equippedNonWeaponSlots.length,
|
||||
)];
|
||||
final slot = EquipmentSlot.values[sacrificeIndex];
|
||||
|
||||
// 제물로 바칠 아이템 정보 저장
|
||||
final lostItem = state.equipment.getItemByIndex(sacrificeIndex);
|
||||
lostItemName = lostItem.name;
|
||||
lostItemSlot = EquipmentSlot.values[sacrificeIndex];
|
||||
|
||||
// 해당 슬롯을 빈 장비로 교체
|
||||
newEquipment = newEquipment.setItemByIndex(
|
||||
sacrificeIndex,
|
||||
EquipmentItem.empty(slot),
|
||||
EquipmentItem.empty(lostItemSlot),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1002,6 +1008,8 @@ class ProgressService {
|
||||
cause: cause,
|
||||
killerName: killerName,
|
||||
lostEquipmentCount: lostCount,
|
||||
lostItemName: lostItemName,
|
||||
lostItemSlot: lostItemSlot,
|
||||
goldAtDeath: state.inventory.gold,
|
||||
levelAtDeath: state.traits.level,
|
||||
timestamp: state.skillSystem.elapsedMs,
|
||||
|
||||
Reference in New Issue
Block a user