/**
 * Every `enemies.type` slug from `backend/migrations/000006b_enemy_data.sql` (220 rows).
 * Regenerate when that migration is regenerated.
 */
export const ENEMY_TEMPLATE_SLUGS: readonly string[] = [
  'wolf_l1_1_meadow',
  'wolf_l1_1_forest',
  'wolf_l2_2_forest',
  'wolf_l2_2_ruins',
  'wolf_l3_3_ruins',
  'wolf_l3_3_canyon',
  'wolf_l4_4_canyon',
  'wolf_l4_4_swamp',
  'wolf_l5_5_volcanic',
  'wolf_l5_5_astral',
  'boar_l2_2_meadow',
  'boar_l2_2_forest',
  'boar_l3_3_forest',
  'boar_l3_3_ruins',
  'boar_l4_4_ruins',
  'boar_l4_4_canyon',
  'boar_l5_5_canyon',
  'boar_l5_5_swamp',
  'boar_l6_6_volcanic',
  'boar_l6_6_astral',
  'zombie_l3_4_meadow',
  'zombie_l3_4_forest',
  'zombie_l5_5_forest',
  'zombie_l5_5_ruins',
  'zombie_l6_6_ruins',
  'zombie_l6_6_canyon',
  'zombie_l7_7_canyon',
  'zombie_l7_7_swamp',
  'zombie_l8_8_volcanic',
  'zombie_l8_8_astral',
  'spider_l4_5_meadow',
  'spider_l4_5_forest',
  'spider_l6_6_forest',
  'spider_l6_6_ruins',
  'spider_l7_7_ruins',
  'spider_l7_7_canyon',
  'spider_l8_8_canyon',
  'spider_l8_8_swamp',
  'spider_l9_9_volcanic',
  'spider_l9_9_astral',
  'orc_l5_6_meadow',
  'orc_l5_6_forest',
  'orc_l7_8_forest',
  'orc_l7_8_ruins',
  'orc_l9_10_ruins',
  'orc_l9_10_canyon',
  'orc_l11_11_canyon',
  'orc_l11_11_swamp',
  'orc_l12_12_volcanic',
  'orc_l12_12_astral',
  'skeleton_l6_7_meadow',
  'skeleton_l6_7_forest',
  'skeleton_l8_9_forest',
  'skeleton_l8_9_ruins',
  'skeleton_l10_11_ruins',
  'skeleton_l10_11_canyon',
  'skeleton_l12_13_canyon',
  'skeleton_l12_13_swamp',
  'skeleton_l14_14_volcanic',
  'skeleton_l14_14_astral',
  'battle_lizard_l7_8_meadow',
  'battle_lizard_l7_8_forest',
  'battle_lizard_l9_10_forest',
  'battle_lizard_l9_10_ruins',
  'battle_lizard_l11_12_ruins',
  'battle_lizard_l11_12_canyon',
  'battle_lizard_l13_14_canyon',
  'battle_lizard_l13_14_swamp',
  'battle_lizard_l15_15_volcanic',
  'battle_lizard_l15_15_astral',
  'element_l18_20_meadow',
  'element_l12_14_forest',
  'element_l21_22_forest',
  'element_l15_16_ruins',
  'element_l23_24_ruins',
  'element_l17_18_canyon',
  'element_l25_26_canyon',
  'element_l19_20_swamp',
  'element_l27_28_volcanic',
  'element_l21_22_astral',
  'demon_l10_12_meadow',
  'demon_l10_12_forest',
  'demon_l13_14_forest',
  'demon_l13_14_ruins',
  'demon_l15_16_ruins',
  'demon_l15_16_canyon',
  'demon_l17_18_canyon',
  'demon_l17_18_swamp',
  'demon_l19_20_volcanic',
  'demon_l19_20_astral',
  'skeleton_king_l15_17_meadow',
  'skeleton_king_l15_17_forest',
  'skeleton_king_l18_19_forest',
  'skeleton_king_l18_19_ruins',
  'skeleton_king_l20_21_ruins',
  'skeleton_king_l20_21_canyon',
  'skeleton_king_l22_23_canyon',
  'skeleton_king_l22_23_swamp',
  'skeleton_king_l24_25_volcanic',
  'skeleton_king_l24_25_astral',
  'forest_warden_l20_22_meadow',
  'forest_warden_l20_22_forest',
  'forest_warden_l23_24_forest',
  'forest_warden_l23_24_ruins',
  'forest_warden_l25_26_ruins',
  'forest_warden_l25_26_canyon',
  'forest_warden_l27_28_canyon',
  'forest_warden_l27_28_swamp',
  'forest_warden_l29_30_volcanic',
  'forest_warden_l29_30_astral',
  'titan_l25_27_meadow',
  'titan_l25_27_forest',
  'titan_l28_29_forest',
  'titan_l28_29_ruins',
  'titan_l30_31_ruins',
  'titan_l30_31_canyon',
  'titan_l32_33_canyon',
  'titan_l32_33_swamp',
  'titan_l34_35_volcanic',
  'titan_l34_35_astral',
  'golem_l8_10_meadow',
  'golem_l8_10_forest',
  'golem_l11_12_forest',
  'golem_l11_12_ruins',
  'golem_l13_14_ruins',
  'golem_l13_14_canyon',
  'golem_l15_16_canyon',
  'golem_l15_16_swamp',
  'golem_l17_18_volcanic',
  'golem_l17_18_astral',
  'wraith_l5_6_meadow',
  'wraith_l5_6_forest',
  'wraith_l7_8_forest',
  'wraith_l7_8_ruins',
  'wraith_l9_10_ruins',
  'wraith_l9_10_canyon',
  'wraith_l11_12_canyon',
  'wraith_l11_12_swamp',
  'wraith_l13_14_volcanic',
  'wraith_l13_14_astral',
  'bandit_l4_5_meadow',
  'bandit_l4_5_forest',
  'bandit_l6_7_forest',
  'bandit_l6_7_ruins',
  'bandit_l8_9_ruins',
  'bandit_l8_9_canyon',
  'bandit_l10_11_canyon',
  'bandit_l10_11_swamp',
  'bandit_l12_12_volcanic',
  'bandit_l12_12_astral',
  'cultist_l6_8_meadow',
  'cultist_l6_8_forest',
  'cultist_l9_10_forest',
  'cultist_l9_10_ruins',
  'cultist_l11_12_ruins',
  'cultist_l11_12_canyon',
  'cultist_l13_14_canyon',
  'cultist_l13_14_swamp',
  'cultist_l15_16_volcanic',
  'cultist_l15_16_astral',
  'treant_l18_20_meadow',
  'treant_l18_20_forest',
  'treant_l21_23_forest',
  'treant_l21_23_ruins',
  'treant_l24_26_ruins',
  'treant_l24_26_canyon',
  'treant_l27_28_canyon',
  'treant_l27_28_swamp',
  'treant_l29_30_volcanic',
  'treant_l29_30_astral',
  'basilisk_l9_11_meadow',
  'basilisk_l9_11_forest',
  'basilisk_l12_13_forest',
  'basilisk_l12_13_ruins',
  'basilisk_l14_15_ruins',
  'basilisk_l14_15_canyon',
  'basilisk_l16_17_canyon',
  'basilisk_l16_17_swamp',
  'basilisk_l18_19_volcanic',
  'basilisk_l18_19_astral',
  'wyvern_l12_14_meadow',
  'wyvern_l12_14_forest',
  'wyvern_l15_17_forest',
  'wyvern_l15_17_ruins',
  'wyvern_l18_20_ruins',
  'wyvern_l18_20_canyon',
  'wyvern_l21_22_canyon',
  'wyvern_l21_22_swamp',
  'wyvern_l23_24_volcanic',
  'wyvern_l23_24_astral',
  'harpy_l6_7_meadow',
  'harpy_l6_7_forest',
  'harpy_l8_9_forest',
  'harpy_l8_9_ruins',
  'harpy_l10_11_ruins',
  'harpy_l10_11_canyon',
  'harpy_l12_13_canyon',
  'harpy_l12_13_swamp',
  'harpy_l14_15_volcanic',
  'harpy_l14_15_astral',
  'manticore_l14_16_meadow',
  'manticore_l14_16_forest',
  'manticore_l17_19_forest',
  'manticore_l17_19_ruins',
  'manticore_l20_22_ruins',
  'manticore_l20_22_canyon',
  'manticore_l23_24_canyon',
  'manticore_l23_24_swamp',
  'manticore_l25_26_volcanic',
  'manticore_l25_26_astral',
  'shade_l10_12_meadow',
  'shade_l10_12_forest',
  'shade_l13_15_forest',
  'shade_l13_15_ruins',
  'shade_l16_18_ruins',
  'shade_l16_18_canyon',
  'shade_l19_20_canyon',
  'shade_l19_20_swamp',
  'shade_l21_22_volcanic',
  'shade_l21_22_astral',
] as const;

/** Narrow union of all valid `enemies.type` template slugs (optional stricter typing). */
export type EnemyTemplateSlug = (typeof ENEMY_TEMPLATE_SLUGS)[number];

export const ENEMY_TEMPLATE_SLUG_SET = new Set<string>(ENEMY_TEMPLATE_SLUGS);

export function isKnownEnemyTemplateSlug(slug: string): boolean {
  return slug !== '' && ENEMY_TEMPLATE_SLUG_SET.has(slug);
}

/**
 * Element rows that use the ice anchor (ice_slow in DB). Others use water (slow).
 */
export const ELEMENT_ICE_TEMPLATE_SLUG_SET = new Set<string>([
  'element_l12_14_forest',
  'element_l15_16_ruins',
  'element_l17_18_canyon',
  'element_l19_20_swamp',
  'element_l21_22_astral',
]);
