style: dart format 적용
- 전체 Dart 소스 및 테스트 파일 포매팅 통일 - trailing comma, 줄바꿈, 인덴트 정리
This commit is contained in:
@@ -57,46 +57,64 @@ class CombatStats with _$CombatStats {
|
||||
// 기본 스탯
|
||||
/// 힘: 물리 공격력 보정
|
||||
required int str,
|
||||
|
||||
/// 체력: HP, 방어력 보정
|
||||
required int con,
|
||||
|
||||
/// 민첩: 회피율, 크리티컬율, 명중률, 공격 속도
|
||||
required int dex,
|
||||
|
||||
/// 지능: 마법 공격력, MP
|
||||
required int intelligence,
|
||||
|
||||
/// 지혜: 마법 방어력, MP 회복
|
||||
required int wis,
|
||||
|
||||
/// 매력: 상점 가격, 드롭률 보정
|
||||
required int cha,
|
||||
// 파생 스탯 (전투용)
|
||||
/// 물리 공격력
|
||||
required int atk,
|
||||
|
||||
/// 물리 방어력
|
||||
required int def,
|
||||
|
||||
/// 마법 공격력
|
||||
required int magAtk,
|
||||
|
||||
/// 마법 방어력
|
||||
required int magDef,
|
||||
|
||||
/// 크리티컬 확률 (0.0 ~ 1.0)
|
||||
required double criRate,
|
||||
|
||||
/// 크리티컬 데미지 배율 (1.5 ~ 3.0)
|
||||
required double criDamage,
|
||||
|
||||
/// 회피율 (0.0 ~ 0.5)
|
||||
required double evasion,
|
||||
|
||||
/// 명중률 (0.8 ~ 1.0)
|
||||
required double accuracy,
|
||||
|
||||
/// 방패 방어율 (0.0 ~ 0.4)
|
||||
required double blockRate,
|
||||
|
||||
/// 무기로 쳐내기 확률 (0.0 ~ 0.3)
|
||||
required double parryRate,
|
||||
|
||||
/// 공격 딜레이 (밀리초)
|
||||
required int attackDelayMs,
|
||||
// 자원
|
||||
/// 최대 HP
|
||||
required int hpMax,
|
||||
|
||||
/// 현재 HP
|
||||
required int hpCurrent,
|
||||
|
||||
/// 최대 MP
|
||||
required int mpMax,
|
||||
|
||||
/// 현재 MP
|
||||
required int mpCurrent,
|
||||
}) = _CombatStats;
|
||||
|
||||
@@ -41,36 +41,52 @@ class ItemStats with _$ItemStats {
|
||||
const factory ItemStats({
|
||||
/// 물리 공격력 보정
|
||||
@Default(0) int atk,
|
||||
|
||||
/// 물리 방어력 보정
|
||||
@Default(0) int def,
|
||||
|
||||
/// 마법 공격력 보정
|
||||
@Default(0) int magAtk,
|
||||
|
||||
/// 마법 방어력 보정
|
||||
@Default(0) int magDef,
|
||||
|
||||
/// 크리티컬 확률 보정 (0.0 ~ 1.0)
|
||||
@Default(0.0) double criRate,
|
||||
|
||||
/// 회피율 보정 (0.0 ~ 1.0)
|
||||
@Default(0.0) double evasion,
|
||||
|
||||
/// 방패 방어율 (방패 전용, 0.0 ~ 1.0)
|
||||
@Default(0.0) double blockRate,
|
||||
|
||||
/// 무기 쳐내기 확률 (무기 전용, 0.0 ~ 1.0)
|
||||
@Default(0.0) double parryRate,
|
||||
|
||||
/// HP 보너스
|
||||
@Default(0) int hpBonus,
|
||||
|
||||
/// MP 보너스
|
||||
@Default(0) int mpBonus,
|
||||
|
||||
/// STR 보너스
|
||||
@Default(0) int strBonus,
|
||||
|
||||
/// CON 보너스
|
||||
@Default(0) int conBonus,
|
||||
|
||||
/// DEX 보너스
|
||||
@Default(0) int dexBonus,
|
||||
|
||||
/// INT 보너스
|
||||
@Default(0) int intBonus,
|
||||
|
||||
/// WIS 보너스
|
||||
@Default(0) int wisBonus,
|
||||
|
||||
/// CHA 보너스
|
||||
@Default(0) int chaBonus,
|
||||
|
||||
/// 무기 공격속도 (밀리초, 무기 전용)
|
||||
///
|
||||
/// 0이면 기본값(1000ms) 사용, 값이 클수록 느린 공격.
|
||||
|
||||
@@ -121,16 +121,18 @@ class MonetizationState with _$MonetizationState {
|
||||
List<Map<String, dynamic>>? _statsListToJson(List<Stats>? stats) {
|
||||
if (stats == null) return null;
|
||||
return stats
|
||||
.map((s) => {
|
||||
'str': s.str,
|
||||
'con': s.con,
|
||||
'dex': s.dex,
|
||||
'int': s.intelligence,
|
||||
'wis': s.wis,
|
||||
'cha': s.cha,
|
||||
'hpMax': s.hpMax,
|
||||
'mpMax': s.mpMax,
|
||||
})
|
||||
.map(
|
||||
(s) => {
|
||||
'str': s.str,
|
||||
'con': s.con,
|
||||
'dex': s.dex,
|
||||
'int': s.intelligence,
|
||||
'wis': s.wis,
|
||||
'cha': s.cha,
|
||||
'hpMax': s.hpMax,
|
||||
'mpMax': s.mpMax,
|
||||
},
|
||||
)
|
||||
.toList();
|
||||
}
|
||||
|
||||
|
||||
@@ -62,9 +62,7 @@ class Potion {
|
||||
///
|
||||
/// 보유 물약 수량 관리 (쿨타임은 CombatState에서 관리)
|
||||
class PotionInventory {
|
||||
const PotionInventory({
|
||||
this.potions = const {},
|
||||
});
|
||||
const PotionInventory({this.potions = const {}});
|
||||
|
||||
/// 보유 물약 (물약 ID → 수량)
|
||||
final Map<String, int> potions;
|
||||
@@ -99,11 +97,7 @@ class PotionInventory {
|
||||
/// 빈 인벤토리
|
||||
static const empty = PotionInventory();
|
||||
|
||||
PotionInventory copyWith({
|
||||
Map<String, int>? potions,
|
||||
}) {
|
||||
return PotionInventory(
|
||||
potions: potions ?? this.potions,
|
||||
);
|
||||
PotionInventory copyWith({Map<String, int>? potions}) {
|
||||
return PotionInventory(potions: potions ?? this.potions);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,10 +28,7 @@ class ChestReward {
|
||||
|
||||
/// 장비 보상 생성
|
||||
factory ChestReward.equipment(EquipmentItem item) {
|
||||
return ChestReward._(
|
||||
type: ChestRewardType.equipment,
|
||||
equipment: item,
|
||||
);
|
||||
return ChestReward._(type: ChestRewardType.equipment, equipment: item);
|
||||
}
|
||||
|
||||
/// 포션 보상 생성
|
||||
@@ -45,18 +42,12 @@ class ChestReward {
|
||||
|
||||
/// 골드 보상 생성
|
||||
factory ChestReward.gold(int amount) {
|
||||
return ChestReward._(
|
||||
type: ChestRewardType.gold,
|
||||
gold: amount,
|
||||
);
|
||||
return ChestReward._(type: ChestRewardType.gold, gold: amount);
|
||||
}
|
||||
|
||||
/// 경험치 보상 생성
|
||||
factory ChestReward.experience(int amount) {
|
||||
return ChestReward._(
|
||||
type: ChestRewardType.experience,
|
||||
experience: amount,
|
||||
);
|
||||
return ChestReward._(type: ChestRewardType.experience, experience: amount);
|
||||
}
|
||||
|
||||
/// 보상 타입
|
||||
|
||||
Reference in New Issue
Block a user