package game

import (
	"testing"
	"time"
)

func TestAttackIntervalRespectsMinimumCap(t *testing.T) {
	got := attackInterval(10.0)
	want := minAttackInterval * combatPaceMultiplier
	if got != want {
		t.Fatalf("expected min interval %s, got %s", want, got)
	}
}

func TestAttackIntervalForNormalSpeed(t *testing.T) {
	got := attackInterval(2.0)
	// 1/2 s per attack at 2 APS, scaled by combatPaceMultiplier
	want := 500 * time.Millisecond * combatPaceMultiplier
	if got != want {
		t.Fatalf("expected %s, got %s", want, got)
	}
}
