// constants.js : miroir cote client de server/constants.py
// si tu modifies une valeur ici, modifier aussi dans constants.py

export const ARENA_WIDTH  = 35;
export const ARENA_HEIGHT = 35;

export const SCALE = 16;

// rendu iso : ratio 2:1 classique
export const TILE_WIDTH  = 64;
export const TILE_HEIGHT = 32;

export const SOULGATE_X    = 0;
export const SOULGATE_Y    = -15;
export const PLAYER_SPAWN_X = 0;
export const PLAYER_SPAWN_Y = -10;

export const TICK_RATE     = 20;
export const TICK_DURATION = 0.05;

export const SOULGATE_MAX_HP = 100;

export const CLASS_COLORS = {
    kael:   0xe06060,
    seris:  0x6080e0,
    aldric: 0x60c080,
};

export const PREPARATION_DURATION = 20;

export const UPGRADE_CATALOG = {
    damage_up:     { name: "Frappe +",   desc: "+25% dégâts projectile",       cost: 30, max: 2 },
    cooldown_down: { name: "Cadence +",  desc: "-20% cooldown d'attaque",      cost: 25, max: 2 },
    hp_up:         { name: "Vitalité +", desc: "+30 PV max",                   cost: 35, max: 2 },
    speed_up:      { name: "Vitesse +",  desc: "+15% vitesse de déplacement",  cost: 20, max: 3 },
};

// cd des skills 1/2 par classe
export const ABILITY_COOLDOWNS = {
    kael:   [7.0, 12.0],
    seris:  [6.0, 10.0],
    aldric: [8.0, 15.0],
};

export const DISPLACEMENT_COOLDOWNS = { kael: 9.0, seris: 4.0, aldric: 14.0 };

// hitboxes (miroir constants.py, sert au debug visuel)
export const PLAYER_HITBOX_RADIUS   = 0.5;
export const ENEMY_HITBOX_RADIUS    = 0.5;
export const PROJECTILE_HIT_RADIUS  = 0.4;
export const SOULGATE_HITBOX_RADIUS = 1.0;

// rayons d'attaque Kael
export const KAEL_MELEE_RADIUS = 3.0;
export const KAEL_SLAM_RADIUS  = 3.5;
export const KAEL_SLAM_TICKS   = 8;
export const KAEL_STORM_RADIUS = 5.5;
export const KAEL_STORM_TICKS  = 20;

// Seris
export const SERIS_VOID_RADIUS  = 4.0;
export const SERIS_VOID_TICKS   = 10;

// Aldric
export const ALDRIC_HEAL_RADIUS  = 6.0;
export const ALDRIC_PULSE_RADIUS = 5.0;
export const ALDRIC_PULSE_TICKS  = 8;

export const DIVINE_POST_USE_COOLDOWN = 60.0;

// score
export const SCORE_PER_KILL = 10;
export const SCORE_PER_SOUL = 2;
export const SCORE_VICTORY  = 1000;
export const SCORE_PER_WAVE = 200;
