import 'package:test/test.dart';
import 'package:wolf_3d_dart/wolf_3d_data_types.dart';

void main() {
  group('Difficulty incoming damage scaling', () {
    test('baby mode applies canonical heavy reduction', () {
      expect(Difficulty.baby.scaleIncomingEnemyDamage(1), 1);
      expect(Difficulty.baby.scaleIncomingEnemyDamage(4), 1);
      expect(Difficulty.baby.scaleIncomingEnemyDamage(8), 2);
      expect(Difficulty.baby.scaleIncomingEnemyDamage(16), 4);
      expect(Difficulty.baby.scaleIncomingEnemyDamage(63), 15);
    });

    test('easy and above preserve full incoming damage', () {
      expect(Difficulty.easy.scaleIncomingEnemyDamage(16), 16);
      expect(Difficulty.medium.scaleIncomingEnemyDamage(16), 16);
      expect(Difficulty.hard.scaleIncomingEnemyDamage(16), 16);
    });

    test('non-positive damage stays non-positive', () {
      expect(Difficulty.baby.scaleIncomingEnemyDamage(0), 0);
      expect(Difficulty.hard.scaleIncomingEnemyDamage(0), 0);
    });
  });
}
