export {
  BOSS_DEATH_DESPAWN_SECONDS,
  BOSS_DEATH_FADE_SECONDS,
  BOSS_DEATH_HOLD_SECONDS,
  bossDeathOpacity,
} from "../../game/bossDeath";

export const BOSS_INDICATOR_DEATH_FADE_MS = 250;

export function bossCanTrackTarget(hp: number) {
  return hp > 0;
}

export function advanceBossIndicatorOpacity(current: number, defeated: boolean, deltaSeconds: number) {
  if (!defeated) return 1;
  return Math.max(0, current - (deltaSeconds * 1_000) / BOSS_INDICATOR_DEATH_FADE_MS);
}
