package com.tiedup.remake.util;

/**
 *
 * Contains all magic numbers extracted from across the codebase
 * for better maintainability and easier tuning.
 */
public final class GameConstants {

    private GameConstants() {
        // Utility class - no instantiation
    }

    // ==================== Time Conversions ====================

    /** Minecraft ticks per second */
    public static final int TICKS_PER_SECOND = 20;

    /** Minecraft ticks per second (float for calculations) */
    public static final float TICKS_PER_SECOND_F = 20.0f;

    // ==================== Shock System ====================

    /** Default shock damage when no custom value specified */
    public static final float DEFAULT_SHOCK_DAMAGE = 3.0f;

    /** Number of particles spawned during shock effect */
    public static final int SHOCK_PARTICLE_COUNT = 20;

    /** Y offset for shock particle spawn position */
    public static final double SHOCK_PARTICLE_Y_OFFSET = 1.0;

    /** X spread for shock particles */
    public static final double SHOCK_PARTICLE_X_SPREAD = 0.3;

    /** Y spread for shock particles */
    public static final double SHOCK_PARTICLE_Y_SPREAD = 0.5;

    /** Z spread for shock particles */
    public static final double SHOCK_PARTICLE_Z_SPREAD = 0.3;

    /** Speed/motion for shock particles */
    public static final double SHOCK_PARTICLE_SPEED = 0.1;

    /** Volume for shock sound effect */
    public static final float SHOCK_SOUND_VOLUME = 1.0f;

    /** Pitch for shock sound effect */
    public static final float SHOCK_SOUND_PITCH = 1.0f;

    // ==================== Chloroform Effects ====================

    /** Movement slowdown amplifier for chloroform (127 = max) */
    public static final int CHLOROFORM_SLOWDOWN_AMPLIFIER = 127;

    /** Dig slowdown amplifier for chloroform (127 = max) */
    public static final int CHLOROFORM_DIG_SLOWDOWN_AMPLIFIER = 127;

    /** Blindness amplifier for chloroform (127 = max) */
    public static final int CHLOROFORM_BLINDNESS_AMPLIFIER = 127;

    /** Jump amplifier for chloroform (negative jump) */
    public static final int CHLOROFORM_JUMP_AMPLIFIER = 150;

    // ==================== Safety Thresholds ====================

    /** Minimum health threshold - damage won't reduce below this */
    public static final float MIN_HEALTH_THRESHOLD = 0.5f;

    // ==================== Movement Restrictions ====================

    /** Break speed multiplier when player is tied */
    public static final float TIED_BREAK_SPEED_MULTIPLIER = 0.1f;

    // ==================== Tick Intervals ====================

    /** Ticks between shock collar checks */
    public static final int SHOCK_COLLAR_CHECK_INTERVAL = 10;

    /** Ticks between movement restriction checks */
    public static final int MOVEMENT_CHECK_INTERVAL = 5;

    // ==================== Struggle System ====================

    /** Duration of struggle animation in ticks (4 seconds) */
    public static final int STRUGGLE_ANIMATION_DURATION_TICKS = 80;

    // ==================== Gag Talk System ====================

    /** Message length threshold that triggers suffocation effects */
    public static final int GAG_MAX_MESSAGE_LENGTH_BEFORE_SUFFOCATION = 40;

    /** Duration of slowness effect from suffocation (ticks) */
    public static final int GAG_SUFFOCATION_SLOWNESS_DURATION = 40;

    /** Chance of blindness when suffocating from long message */
    public static final float GAG_SUFFOCATION_BLINDNESS_CHANCE = 0.3f;

    /** Duration of blindness effect from suffocation (ticks) */
    public static final int GAG_SUFFOCATION_BLINDNESS_DURATION = 20;

    /** Base chance of critical fail when speaking through gag */
    public static final float GAG_BASE_CRITICAL_FAIL_CHANCE = 0.05f;

    /** Additional critical fail chance per character of message */
    public static final float GAG_LENGTH_CRITICAL_FACTOR = 0.005f;

    // ==================== Merchant Particles ====================

    /** Chance per tick of spawning golden sparkle particles on merchant */
    public static final float MERCHANT_SPARKLE_PARTICLE_CHANCE = 0.15F;

    /** Horizontal spread (X/Z) for merchant sparkle particles */
    public static final double MERCHANT_PARTICLE_SPREAD_XZ = 0.6;

    /** Vertical spread (Y) for merchant sparkle particles */
    public static final double MERCHANT_PARTICLE_SPREAD_Y = 1.8;
}
