style: dart format 적용
- 전체 Dart 소스 및 테스트 파일 포매팅 통일 - trailing comma, 줄바꿈, 인덴트 정리
This commit is contained in:
@@ -12,7 +12,7 @@ import 'package:asciineverdie/src/core/util/deterministic_random.dart';
|
||||
/// 상자 내용물 생성 및 오픈 로직 담당
|
||||
class ChestService {
|
||||
ChestService({DeterministicRandom? rng})
|
||||
: _rng = rng ?? DeterministicRandom(DateTime.now().millisecondsSinceEpoch);
|
||||
: _rng = rng ?? DeterministicRandom(DateTime.now().millisecondsSinceEpoch);
|
||||
|
||||
final DeterministicRandom _rng;
|
||||
|
||||
@@ -100,7 +100,9 @@ class ChestService {
|
||||
rarity: rarity,
|
||||
);
|
||||
|
||||
debugPrint('[ChestService] Equipment reward: ${item.name} (${rarity.name})');
|
||||
debugPrint(
|
||||
'[ChestService] Equipment reward: ${item.name} (${rarity.name})',
|
||||
);
|
||||
return ChestReward.equipment(item);
|
||||
}
|
||||
|
||||
@@ -132,7 +134,10 @@ class ChestService {
|
||||
ChestReward _generateGoldReward(int playerLevel) {
|
||||
final baseGold = playerLevel * _goldPerLevel;
|
||||
final variance = _rng.nextInt(_goldVariance * 2 + 1) - _goldVariance;
|
||||
final gold = (baseGold + (baseGold * variance / 100)).round().clamp(10, 99999);
|
||||
final gold = (baseGold + (baseGold * variance / 100)).round().clamp(
|
||||
10,
|
||||
99999,
|
||||
);
|
||||
|
||||
debugPrint('[ChestService] Gold reward: $gold');
|
||||
return ChestReward.gold(gold);
|
||||
@@ -142,7 +147,10 @@ class ChestService {
|
||||
ChestReward _generateExperienceReward(int playerLevel) {
|
||||
final baseExp = playerLevel * _expPerLevel;
|
||||
final variance = _rng.nextInt(_expVariance * 2 + 1) - _expVariance;
|
||||
final exp = (baseExp + (baseExp * variance / 100)).round().clamp(10, 999999);
|
||||
final exp = (baseExp + (baseExp * variance / 100)).round().clamp(
|
||||
10,
|
||||
999999,
|
||||
);
|
||||
|
||||
debugPrint('[ChestService] Experience reward: $exp');
|
||||
return ChestReward.experience(exp);
|
||||
@@ -208,49 +216,49 @@ class ChestService {
|
||||
|
||||
return switch (slot) {
|
||||
EquipmentSlot.weapon => ItemStats(
|
||||
atk: baseValue * 2,
|
||||
criRate: 0.01 * (level ~/ 5),
|
||||
parryRate: 0.005 * level,
|
||||
),
|
||||
atk: baseValue * 2,
|
||||
criRate: 0.01 * (level ~/ 5),
|
||||
parryRate: 0.005 * level,
|
||||
),
|
||||
EquipmentSlot.shield => ItemStats(
|
||||
def: baseValue,
|
||||
blockRate: 0.02 * (level ~/ 3).clamp(1, 10),
|
||||
),
|
||||
def: baseValue,
|
||||
blockRate: 0.02 * (level ~/ 3).clamp(1, 10),
|
||||
),
|
||||
EquipmentSlot.helm => ItemStats(
|
||||
def: baseValue ~/ 2,
|
||||
magDef: baseValue ~/ 2,
|
||||
intBonus: level ~/ 10,
|
||||
),
|
||||
def: baseValue ~/ 2,
|
||||
magDef: baseValue ~/ 2,
|
||||
intBonus: level ~/ 10,
|
||||
),
|
||||
EquipmentSlot.hauberk => ItemStats(def: baseValue, hpBonus: level * 2),
|
||||
EquipmentSlot.brassairts => ItemStats(
|
||||
def: baseValue ~/ 2,
|
||||
strBonus: level ~/ 15,
|
||||
),
|
||||
def: baseValue ~/ 2,
|
||||
strBonus: level ~/ 15,
|
||||
),
|
||||
EquipmentSlot.vambraces => ItemStats(
|
||||
def: baseValue ~/ 2,
|
||||
dexBonus: level ~/ 15,
|
||||
),
|
||||
def: baseValue ~/ 2,
|
||||
dexBonus: level ~/ 15,
|
||||
),
|
||||
EquipmentSlot.gauntlets => ItemStats(
|
||||
atk: baseValue ~/ 2,
|
||||
def: baseValue ~/ 4,
|
||||
),
|
||||
atk: baseValue ~/ 2,
|
||||
def: baseValue ~/ 4,
|
||||
),
|
||||
EquipmentSlot.gambeson => ItemStats(
|
||||
def: baseValue ~/ 2,
|
||||
conBonus: level ~/ 15,
|
||||
),
|
||||
def: baseValue ~/ 2,
|
||||
conBonus: level ~/ 15,
|
||||
),
|
||||
EquipmentSlot.cuisses => ItemStats(
|
||||
def: baseValue ~/ 2,
|
||||
evasion: 0.005 * level,
|
||||
),
|
||||
def: baseValue ~/ 2,
|
||||
evasion: 0.005 * level,
|
||||
),
|
||||
EquipmentSlot.greaves => ItemStats(
|
||||
def: baseValue ~/ 2,
|
||||
evasion: 0.003 * level,
|
||||
),
|
||||
def: baseValue ~/ 2,
|
||||
evasion: 0.003 * level,
|
||||
),
|
||||
EquipmentSlot.sollerets => ItemStats(
|
||||
def: baseValue ~/ 3,
|
||||
evasion: 0.002 * level,
|
||||
dexBonus: level ~/ 20,
|
||||
),
|
||||
def: baseValue ~/ 3,
|
||||
evasion: 0.002 * level,
|
||||
dexBonus: level ~/ 20,
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user