style: dart format 적용
- 전체 Dart 소스 및 테스트 파일 포매팅 통일 - trailing comma, 줄바꿈, 인덴트 정리
This commit is contained in:
@@ -9,7 +9,7 @@ void main() {
|
||||
group('playerAttackMonster', () {
|
||||
test('데미지 = (ATK * variation) - (DEF * 0.4)', () {
|
||||
// 고정 시드로 예측 가능한 결과
|
||||
final rng = DeterministicRandom( 42);
|
||||
final rng = DeterministicRandom(42);
|
||||
final calculator = CombatCalculator(rng: rng);
|
||||
|
||||
final player = CombatStats.empty().copyWith(
|
||||
@@ -49,7 +49,7 @@ void main() {
|
||||
|
||||
test('크리티컬 발동 시 데미지 배율 적용', () {
|
||||
// 크리티컬이 항상 발동하도록 criRate = 1.0
|
||||
final rng = DeterministicRandom( 123);
|
||||
final rng = DeterministicRandom(123);
|
||||
final calculator = CombatCalculator(rng: rng);
|
||||
|
||||
final player = CombatStats.empty().copyWith(
|
||||
@@ -87,7 +87,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('회피 발동 시 0 데미지', () {
|
||||
final rng = DeterministicRandom( 42);
|
||||
final rng = DeterministicRandom(42);
|
||||
final calculator = CombatCalculator(rng: rng);
|
||||
|
||||
final player = CombatStats.empty().copyWith(
|
||||
@@ -130,7 +130,7 @@ void main() {
|
||||
test('블록 발동 시 70% 감소', () {
|
||||
// 블록이 발동하는 시드 찾기
|
||||
// blockRate = 1.0으로 항상 블록
|
||||
final rng = DeterministicRandom( 99);
|
||||
final rng = DeterministicRandom(99);
|
||||
final calculator = CombatCalculator(rng: rng);
|
||||
|
||||
final monster = MonsterCombatStats(
|
||||
@@ -170,7 +170,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('패리 발동 시 50% 감소', () {
|
||||
final rng = DeterministicRandom( 77);
|
||||
final rng = DeterministicRandom(77);
|
||||
final calculator = CombatCalculator(rng: rng);
|
||||
|
||||
final monster = MonsterCombatStats(
|
||||
@@ -212,7 +212,7 @@ void main() {
|
||||
|
||||
group('estimateCombatDurationMs', () {
|
||||
test('범위 2000~30000ms 내 반환', () {
|
||||
final rng = DeterministicRandom( 42);
|
||||
final rng = DeterministicRandom(42);
|
||||
final calculator = CombatCalculator(rng: rng);
|
||||
|
||||
final player = CombatStats.empty().copyWith(
|
||||
@@ -247,7 +247,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('고레벨 몬스터는 더 긴 전투 시간', () {
|
||||
final rng = DeterministicRandom( 42);
|
||||
final rng = DeterministicRandom(42);
|
||||
final calculator = CombatCalculator(rng: rng);
|
||||
|
||||
final player = CombatStats.empty().copyWith(
|
||||
@@ -305,7 +305,7 @@ void main() {
|
||||
|
||||
group('evaluateDifficulty', () {
|
||||
test('범위 0.0~1.0 내 반환', () {
|
||||
final rng = DeterministicRandom( 42);
|
||||
final rng = DeterministicRandom(42);
|
||||
final calculator = CombatCalculator(rng: rng);
|
||||
|
||||
final player = CombatStats.empty().copyWith(
|
||||
|
||||
@@ -125,7 +125,10 @@ void main() {
|
||||
// ATK 100 * 2.0 - DEF 50 * 0.3 = 200 - 15 = 185
|
||||
expect(result.result.success, isTrue);
|
||||
expect(result.result.damage, equals(185));
|
||||
expect(result.updatedPlayer.mpCurrent, equals(20)); // 50 - 30 (mpCost 30)
|
||||
expect(
|
||||
result.updatedPlayer.mpCurrent,
|
||||
equals(20),
|
||||
); // 50 - 30 (mpCost 30)
|
||||
expect(result.updatedMonster.hpCurrent, equals(315)); // 500 - 185
|
||||
});
|
||||
|
||||
@@ -349,10 +352,7 @@ void main() {
|
||||
|
||||
const skill = SkillData.memoryDump;
|
||||
// baseDotDamage: 10, baseDotDurationMs: 6000, baseDotTickMs: 1000
|
||||
final player = CombatStats.empty().copyWith(
|
||||
mpMax: 100,
|
||||
mpCurrent: 50,
|
||||
);
|
||||
final player = CombatStats.empty().copyWith(mpMax: 100, mpCurrent: 50);
|
||||
final skillSystem = SkillSystemState.empty().copyWith(elapsedMs: 5000);
|
||||
|
||||
final result = service.useDotSkill(
|
||||
@@ -379,10 +379,7 @@ void main() {
|
||||
final service = SkillService(rng: rng);
|
||||
|
||||
const skill = SkillData.memoryDump;
|
||||
final player = CombatStats.empty().copyWith(
|
||||
mpMax: 100,
|
||||
mpCurrent: 50,
|
||||
);
|
||||
final player = CombatStats.empty().copyWith(mpMax: 100, mpCurrent: 50);
|
||||
final skillSystem = SkillSystemState.empty().copyWith(elapsedMs: 5000);
|
||||
|
||||
final result = service.useDotSkill(
|
||||
@@ -403,10 +400,7 @@ void main() {
|
||||
final service = SkillService(rng: rng);
|
||||
|
||||
const skill = SkillData.memoryDump;
|
||||
final player = CombatStats.empty().copyWith(
|
||||
mpMax: 100,
|
||||
mpCurrent: 50,
|
||||
);
|
||||
final player = CombatStats.empty().copyWith(mpMax: 100, mpCurrent: 50);
|
||||
final skillSystem = SkillSystemState.empty().copyWith(elapsedMs: 5000);
|
||||
|
||||
final result = service.useDotSkill(
|
||||
@@ -555,10 +549,7 @@ void main() {
|
||||
final service = SkillService(rng: rng);
|
||||
|
||||
const skill = SkillData.debugMode; // ATK +25% 버프, mpCost: 100
|
||||
final player = CombatStats.empty().copyWith(
|
||||
mpMax: 200,
|
||||
mpCurrent: 150,
|
||||
);
|
||||
final player = CombatStats.empty().copyWith(mpMax: 200, mpCurrent: 150);
|
||||
final skillSystem = SkillSystemState.empty().copyWith(elapsedMs: 5000);
|
||||
|
||||
final result = service.useBuffSkill(
|
||||
@@ -569,10 +560,7 @@ void main() {
|
||||
|
||||
expect(result.result.success, isTrue);
|
||||
expect(result.result.appliedBuff, isNotNull);
|
||||
expect(
|
||||
result.result.appliedBuff!.effect.atkModifier,
|
||||
equals(0.25),
|
||||
);
|
||||
expect(result.result.appliedBuff!.effect.atkModifier, equals(0.25));
|
||||
expect(result.updatedSkillSystem.activeBuffs.length, equals(1));
|
||||
expect(result.updatedPlayer.mpCurrent, equals(50)); // 150 - 100
|
||||
});
|
||||
@@ -582,10 +570,7 @@ void main() {
|
||||
final service = SkillService(rng: rng);
|
||||
|
||||
const skill = SkillData.debugMode;
|
||||
final player = CombatStats.empty().copyWith(
|
||||
mpMax: 100,
|
||||
mpCurrent: 50,
|
||||
);
|
||||
final player = CombatStats.empty().copyWith(mpMax: 100, mpCurrent: 50);
|
||||
final existingBuff = const ActiveBuff(
|
||||
effect: BuffEffect(
|
||||
id: 'debug_mode_buff',
|
||||
|
||||
@@ -26,10 +26,7 @@ void main() {
|
||||
final race = RaceTraits(
|
||||
raceId: 'test_race',
|
||||
name: 'Test Race',
|
||||
statModifiers: const {
|
||||
StatType.str: 2,
|
||||
StatType.intelligence: -1,
|
||||
},
|
||||
statModifiers: const {StatType.str: 2, StatType.intelligence: -1},
|
||||
);
|
||||
|
||||
// 보정 없는 클래스
|
||||
@@ -73,10 +70,7 @@ void main() {
|
||||
const klass = ClassTraits(
|
||||
classId: 'test_class',
|
||||
name: 'Test Class',
|
||||
statModifiers: {
|
||||
StatType.con: 3,
|
||||
StatType.dex: 1,
|
||||
},
|
||||
statModifiers: {StatType.con: 3, StatType.dex: 1},
|
||||
);
|
||||
|
||||
final result = calculator.applyModifiers(
|
||||
@@ -248,10 +242,7 @@ void main() {
|
||||
name: 'Test Class',
|
||||
statModifiers: {},
|
||||
passives: [
|
||||
ClassPassive(
|
||||
type: ClassPassiveType.evasionBonus,
|
||||
value: 0.15,
|
||||
),
|
||||
ClassPassive(type: ClassPassiveType.evasionBonus, value: 0.15),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -265,10 +256,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('물리 공격력 보너스 적용', () {
|
||||
final combatStats = CombatStats.empty().copyWith(
|
||||
atk: 100,
|
||||
def: 20,
|
||||
);
|
||||
final combatStats = CombatStats.empty().copyWith(atk: 100, def: 20);
|
||||
|
||||
const race = RaceTraits(
|
||||
raceId: 'test_race',
|
||||
@@ -322,10 +310,7 @@ void main() {
|
||||
name: 'Test Class',
|
||||
statModifiers: {},
|
||||
passives: [
|
||||
ClassPassive(
|
||||
type: ClassPassiveType.postCombatHeal,
|
||||
value: 0.05,
|
||||
),
|
||||
ClassPassive(type: ClassPassiveType.postCombatHeal, value: 0.05),
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user