feat(ui): 사망 화면 잃은 아이템 희귀도 색상 표시
- DeathInfo에 lostItemRarity 필드 추가 - 사망 처리 시 아이템 희귀도 저장 - 사망 오버레이에서 희귀도별 색상 적용 - Common: 회색, Uncommon: 녹색, Rare: 파랑 - Epic: 보라, Legendary: 주황
This commit is contained in:
@@ -16,6 +16,7 @@ import 'package:asciineverdie/src/core/model/combat_stats.dart';
|
||||
import 'package:asciineverdie/src/core/model/equipment_item.dart';
|
||||
import 'package:asciineverdie/src/core/model/equipment_slot.dart';
|
||||
import 'package:asciineverdie/src/core/model/game_state.dart';
|
||||
import 'package:asciineverdie/src/core/model/item_stats.dart';
|
||||
import 'package:asciineverdie/src/core/model/monster_combat_stats.dart';
|
||||
import 'package:asciineverdie/src/core/model/monster_grade.dart';
|
||||
import 'package:asciineverdie/src/core/model/potion.dart';
|
||||
@@ -970,6 +971,7 @@ class ProgressService {
|
||||
var lostCount = 0;
|
||||
String? lostItemName;
|
||||
EquipmentSlot? lostItemSlot;
|
||||
ItemRarity? lostItemRarity;
|
||||
|
||||
if (!isBossDeath) {
|
||||
// 무기(슬롯 0)를 제외한 장착된 장비 중 1개를 제물로 삭제
|
||||
@@ -999,6 +1001,7 @@ class ProgressService {
|
||||
final lostItem = state.equipment.getItemByIndex(sacrificeIndex);
|
||||
lostItemName = lostItem.name;
|
||||
lostItemSlot = EquipmentSlot.values[sacrificeIndex];
|
||||
lostItemRarity = lostItem.rarity;
|
||||
|
||||
// 해당 슬롯을 빈 장비로 교체
|
||||
newEquipment = newEquipment.setItemByIndex(
|
||||
@@ -1015,6 +1018,7 @@ class ProgressService {
|
||||
lostEquipmentCount: lostCount,
|
||||
lostItemName: lostItemName,
|
||||
lostItemSlot: lostItemSlot,
|
||||
lostItemRarity: lostItemRarity,
|
||||
goldAtDeath: state.inventory.gold,
|
||||
levelAtDeath: state.traits.level,
|
||||
timestamp: state.skillSystem.elapsedMs,
|
||||
|
||||
Reference in New Issue
Block a user