style: dart format 적용

This commit is contained in:
JiWoong Sul
2026-01-14 23:07:03 +09:00
parent 249394f548
commit de20183b73
8 changed files with 68 additions and 43 deletions

View File

@@ -64,7 +64,9 @@ void main() {
final diagnosis = sim.winRate >= targetWinRate
? '✓ 적정'
: '✗ 조정필요 (목표: ${(targetWinRate * 100).toStringAsFixed(0)}%)';
print('레벨 $level (${tier.name}): 승률 ${(sim.winRate * 100).toStringAsFixed(0)}% $diagnosis');
print(
'레벨 $level (${tier.name}): 승률 ${(sim.winRate * 100).toStringAsFixed(0)}% $diagnosis',
);
}
print('\n${'=' * 80}');
@@ -88,7 +90,9 @@ void main() {
final minDamage = (monster.atk * 0.8 - player.def * 0.3).round();
final maxDamage = (monster.atk * 1.2 - player.def * 0.3).round();
print('- 몬스터 데미지: $minDamage ~ $maxDamage');
print('- 플레이어 생존 히트: ${(player.hp / maxDamage).floor()} ~ ${(player.hp / minDamage).ceil()}');
print(
'- 플레이어 생존 히트: ${(player.hp / maxDamage).floor()} ~ ${(player.hp / minDamage).ceil()}',
);
print('\n#### 적용된 밸런스 수정');
print('1. 플레이어 HP 스케일링 상향:');
@@ -136,7 +140,8 @@ _PlayerEstimate _estimatePlayerStats(int level) {
// 장비 스탯 추정 (레벨 * 0.8 수준의 common 장비 10개)
final equipLevel = (level * 0.8).round().clamp(1, level);
final equipBaseValue = (equipLevel * 1.2 * ItemRarity.common.multiplier).round();
final equipBaseValue = (equipLevel * 1.2 * ItemRarity.common.multiplier)
.round();
// 무기 ATK (speedMultiplier 1.0 가정)
final weaponAtk = equipBaseValue;
@@ -182,8 +187,14 @@ _CombatSimulation _simulateCombat(int level) {
// 데미지 계산 (combat_calculator 평균)
// damage = ATK * 1.0 - DEF * 0.5 (DEF 감산율 상향)
final monsterDamage = (monster.atk * 1.0 - player.def * 0.5).round().clamp(1, 9999);
final playerDamage = (player.atk * 1.0 - monster.def * 0.5).round().clamp(1, 9999);
final monsterDamage = (monster.atk * 1.0 - player.def * 0.5).round().clamp(
1,
9999,
);
final playerDamage = (player.atk * 1.0 - monster.def * 0.5).round().clamp(
1,
9999,
);
// 생존 히트 수
final playerHits = (player.hp / monsterDamage).ceil();
@@ -194,8 +205,8 @@ _CombatSimulation _simulateCombat(int level) {
final winRate = playerHits > monsterHits
? 0.95 // 압도적 유리
: playerHits == monsterHits
? 0.65 // 동등 (선공 이점)
: (playerHits / monsterHits).clamp(0.2, 0.9);
? 0.65 // 동등 (선공 이점)
: (playerHits / monsterHits).clamp(0.2, 0.9);
return _CombatSimulation(
monsterDamage: monsterDamage,

View File

@@ -55,8 +55,16 @@ void main() {
final oldAtk = 10 + level * 12;
final newAtk = MonsterBaseStats.forLevel(level).atk;
final ratio = newAtk / oldAtk;
expect(ratio, lessThan(0.45), reason: 'Level $level should be < 45% of old');
expect(ratio, greaterThan(0.25), reason: 'Level $level should be > 25% of old');
expect(
ratio,
lessThan(0.45),
reason: 'Level $level should be < 45% of old',
);
expect(
ratio,
greaterThan(0.25),
reason: 'Level $level should be > 25% of old',
);
}
// 레벨 1~5는 추가 완화 (기존 대비 더 낮음)
@@ -64,8 +72,16 @@ void main() {
final oldAtk = 10 + level * 12;
final newAtk = MonsterBaseStats.forLevel(level).atk;
final ratio = newAtk / oldAtk;
expect(ratio, lessThan(0.35), reason: 'Early level $level should be < 35% of old');
expect(ratio, greaterThan(0.15), reason: 'Early level $level should be > 15% of old');
expect(
ratio,
lessThan(0.35),
reason: 'Early level $level should be < 35% of old',
);
expect(
ratio,
greaterThan(0.15),
reason: 'Early level $level should be > 15% of old',
);
}
});
});