feat(hall-of-fame): 명예의 전당 대폭 개선 및 장비/아이템 직렬화
- HallOfFameEntry에 finalEquipmentDetails 추가 (상세 장비 정보) - EquipmentItem/ItemStats에 toJson/fromJson 직렬화 추가 - 명예의 전당 상세 다이얼로그 UI 대폭 개선 - Canvas 타운/워킹 애니메이션 컴포저 개선 - 캐릭터 생성 화면 UI 개선 - 게임 텍스트 다국어 지원 확장
This commit is contained in:
@@ -127,6 +127,52 @@ class ItemStats {
|
||||
/// 빈 스탯 (보너스 없음)
|
||||
static const empty = ItemStats();
|
||||
|
||||
/// JSON으로 직렬화
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'atk': atk,
|
||||
'def': def,
|
||||
'magAtk': magAtk,
|
||||
'magDef': magDef,
|
||||
'criRate': criRate,
|
||||
'evasion': evasion,
|
||||
'blockRate': blockRate,
|
||||
'parryRate': parryRate,
|
||||
'hpBonus': hpBonus,
|
||||
'mpBonus': mpBonus,
|
||||
'strBonus': strBonus,
|
||||
'conBonus': conBonus,
|
||||
'dexBonus': dexBonus,
|
||||
'intBonus': intBonus,
|
||||
'wisBonus': wisBonus,
|
||||
'chaBonus': chaBonus,
|
||||
'attackSpeed': attackSpeed,
|
||||
};
|
||||
}
|
||||
|
||||
/// JSON에서 역직렬화
|
||||
factory ItemStats.fromJson(Map<String, dynamic> json) {
|
||||
return ItemStats(
|
||||
atk: json['atk'] as int? ?? 0,
|
||||
def: json['def'] as int? ?? 0,
|
||||
magAtk: json['magAtk'] as int? ?? 0,
|
||||
magDef: json['magDef'] as int? ?? 0,
|
||||
criRate: (json['criRate'] as num?)?.toDouble() ?? 0.0,
|
||||
evasion: (json['evasion'] as num?)?.toDouble() ?? 0.0,
|
||||
blockRate: (json['blockRate'] as num?)?.toDouble() ?? 0.0,
|
||||
parryRate: (json['parryRate'] as num?)?.toDouble() ?? 0.0,
|
||||
hpBonus: json['hpBonus'] as int? ?? 0,
|
||||
mpBonus: json['mpBonus'] as int? ?? 0,
|
||||
strBonus: json['strBonus'] as int? ?? 0,
|
||||
conBonus: json['conBonus'] as int? ?? 0,
|
||||
dexBonus: json['dexBonus'] as int? ?? 0,
|
||||
intBonus: json['intBonus'] as int? ?? 0,
|
||||
wisBonus: json['wisBonus'] as int? ?? 0,
|
||||
chaBonus: json['chaBonus'] as int? ?? 0,
|
||||
attackSpeed: json['attackSpeed'] as int? ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
/// 두 스탯 합산
|
||||
///
|
||||
/// attackSpeed는 합산 대상 아님 (무기 슬롯 단일 값)
|
||||
|
||||
Reference in New Issue
Block a user