//Priority: 1
/**
 * @file        _config.js  
 * @description Global configuration for the entire loot system.
 * @modpack     Monumental Experience
 * @author      KnightDexx
 * @version     1.2
 * @copyright   KnightDexx's Modded Minecraft World
 * @license     All Rights Reserved
 */

// ═══════════════════════════════════════════════════════════
// GLOBAL LOOT SYSTEM CONFIGURATION
// ═══════════════════════════════════════════════════════════

const AOF_LOOT_CONFIG = {

  // ─────────────────────────────────────────────────────────
  // SYSTEM INFO
  // ─────────────────────────────────────────────────────────

  VERSION: '1.2',
  AUTHOR: 'KnightDexx',
  MODPACK: 'Monumental Experience',

  // ─────────────────────────────────────────────────────────
  // FEATURE TOGGLES
  // ─────────────────────────────────────────────────────────

  FEATURES: {
    CHEST_BALANCE: true,      // Enable chest loot nerfs
    MOB_CURRENCY: true,       // Enable mob money drops
    MOB_ITEMS: true,          // Enable custom mob item drops
    FISHING_LOOT: true,       // Enable fishing loot balance (Aquaculture 2)
    WATER_CREATURES: true,    // Enable water creature neptunium drops
    BLOCK_DROPS: false,       // Ore bonuses (mining is earned, not stolen!)
    BOSS_REWARDS: true        // Special boss drops
  },

  // ─────────────────────────────────────────────────────────
  // CURRENCY SYSTEM
  // ─────────────────────────────────────────────────────────

  CURRENCY: {
    // Banknote IDs (kubejs items)
    NOTES: {
      N1: 'kubejs:note_1',
      N2: 'kubejs:note_2',
      N5: 'kubejs:note_5',
      N10: 'kubejs:note_10',
      N20: 'kubejs:note_20',
      N50: 'kubejs:note_50',
      N100: 'kubejs:note_100',
      N200: 'kubejs:note_200',
      N500: 'kubejs:note_500',
      N1000: 'kubejs:note_1000'
    }
  },

  // ─────────────────────────────────────────────────────────
  // FISHING LOOT CONFIGURATION
  // ─────────────────────────────────────────────────────────

  FISHING: {
    // Use same blacklist as chests (allthemodium, tools, armor, etc.)
    USE_CHEST_BLACKLIST: true,

    // Neptune's Bounty special handling
    NEPTUNES_BOUNTY: {
      ENABLED: true,
      REMOVE_GEAR: true,        // Remove tools/weapons/armor from Neptune's Bounty
      KEEP_INGOTS: true,        // Keep neptunium_ingot (needed for crafting)
      INCREASE_RATE: false,     // ❌ DISABLED - Now drops from water creatures!
    },

    // Items to specifically KEEP from fishing (won't be removed)
    WHITELIST: [
      'aquaculture:neptunium_ingot',
      'aquaculture:neptunium_nugget'
      // neptunes_bounty removed - now drops from water creatures!
    ],

    // Aquaculture-specific blacklist (in addition to global patterns)
    EXTRA_BLACKLIST: [
      'aquaculture:neptunium_axe',
      'aquaculture:neptunium_pickaxe',
      'aquaculture:neptunium_shovel',
      'aquaculture:neptunium_hoe',
      'aquaculture:neptunium_sword',
      'aquaculture:neptunium_helmet',
      'aquaculture:neptunium_chestplate',
      'aquaculture:neptunium_leggings',
      'aquaculture:neptunium_boots',
      'aquaculture:neptunium_bow',
      'aquaculture:neptunium_fishing_rod',
      'aquaculture:neptunium_fillet_knife'
    ]
  },

  // ─────────────────────────────────────────────────────────
  // WATER CREATURES DROP SYSTEM
  // ─────────────────────────────────────────────────────────

  WATER_CREATURES: {
    ENABLED: true,

    // Drop configuration for different creature tiers
    DROPS: {
      // Boss-tier (Elder Guardian, modded bosses)
      BOSS: {
        NEPTUNES_BOUNTY_CHANCE: 0.07,    // 7% - Rare drop
        NEPTUNIUM_GEAR_CHANCE: 0.15,    // 15% - Random tool/armor piece
        NEPTUNIUM_INGOT_MIN: 1,         // 1-3 ingots
        NEPTUNIUM_INGOT_MAX: 3
      },

      // Large mobs (Guardian, modded large fish)
      LARGE: {
        NEPTUNES_BOUNTY_CHANCE: 0.05,   // 5% - Rare
        NEPTUNIUM_GEAR_CHANCE: 0.10,    // 10% - Random tool/armor piece
        NEPTUNIUM_INGOT_CHANCE: 0.20,   // 20% - 1-2 ingots
        NEPTUNIUM_INGOT_MIN: 1,
        NEPTUNIUM_INGOT_MAX: 2
      },

      // Medium fish (modded fish)
      MEDIUM: {
        NEPTUNIUM_INGOT_CHANCE: 0.05,   // 5% - 1 ingot
        NEPTUNIUM_NUGGET_CHANCE: 0.10,  // 10% - 1-3 nuggets
        NEPTUNIUM_NUGGET_MIN: 1,
        NEPTUNIUM_NUGGET_MAX: 3
      },

      // Small fish (vanilla + modded small fish)
      SMALL: {
        NEPTUNIUM_NUGGET_CHANCE: 0.03,  // 3% - 1-2 nuggets
        NEPTUNIUM_NUGGET_MIN: 1,
        NEPTUNIUM_NUGGET_MAX: 2
      }
    },

    // Neptunium gear pool (random selection)
    GEAR_POOL: [
      'aquaculture:neptunium_axe',
      'aquaculture:neptunium_pickaxe',
      'aquaculture:neptunium_shovel',
      'aquaculture:neptunium_hoe',
      'aquaculture:neptunium_sword',
      'aquaculture:neptunium_helmet',
      'aquaculture:neptunium_chestplate',
      'aquaculture:neptunium_leggings',
      'aquaculture:neptunium_boots',
      'aquaculture:neptunium_bow',
      'aquaculture:neptunium_fishing_rod',
      'aquaculture:neptunium_fillet_knife'
    ]
  },

  // ─────────────────────────────────────────────────────────
  // MOB CURRENCY DROP RATES
  // ─────────────────────────────────────────────────────────

  MOB_DROPS: {
    // Tier 1: Easy Mobs – 65% drop chance
    TIER_1: {
      N1_CHANCE: 0.35,   // 35% for $1
      N2_CHANCE: 0.20,   // 20% for $2  (total 55%)
      N5_CHANCE: 0.10    // 10% for $5  (total 65%)
    },

    // Tier 2: Medium Mobs – 85% drop chance
    TIER_2: {
      N5_CHANCE: 0.45,   // 45% for $5
      N10_CHANCE: 0.25,  // 25% for $10 (total 70%)
      N20_CHANCE: 0.15   // 15% for $20 (total 85%)
    },

    // Tier 3: Hard Mobs – 95% drop chance
    TIER_3: {
      N20_CHANCE: 0.50,  // 50% for $20
      N50_CHANCE: 0.30,  // 30% for $50 (total 80%)
      N100_CHANCE: 0.15  // 15% for $100 (total 95%)
    },

    // Tier 4: Elite Mobs – 90% drop chance
    TIER_4: {
      N50_CHANCE: 0.70,  // 70% for $50
      N100_CHANCE: 0.40, // 40% for $100
      N200_CHANCE: 0.20  // 20% for $200 (total 90%)
    }
  },

  // ─────────────────────────────────────────────────────────
  // BLACKLISTED ITEMS (Never in chest loot)
  // ─────────────────────────────────────────────────────────

  BLACKLIST: {
    MODS: [
      'allthemodium',
      'allthecompressed'
    ],

    ITEMS: [
      'minecraft:enchanted_golden_apple',
      'minecraft:netherite_ingot',
      'minecraft:netherite_scrap',
      'minecraft:elytra',
      'minecraft:shulker_box'
    ],

    PATTERNS: [
      /.*:.*_pickaxe/,
      /.*:.*_axe/,
      /.*:.*_shovel/,
      /.*:.*_hoe/,
      /.*:.*_sword/,
      /.*:.*_helmet/,
      /.*:.*_chestplate/,
      /.*:.*_leggings/,
      /.*:.*_boots/
    ]
  },

  // ─────────────────────────────────────────────────────────
  // LOGGING
  // ─────────────────────────────────────────────────────────

  DEBUG: {
    ENABLED: true,
    VERBOSE: false
  }

}

// ═══════════════════════════════════════════════════════════
// EXPORT CONFIGURATION
// ═══════════════════════════════════════════════════════════

// Make config globally accessible
global.AOF_LOOT = AOF_LOOT_CONFIG

console.info('═══════════════════════════════════════════════════════')
console.info('[AOF] Loot System Configuration Loaded')
console.info(`[AOF] Version: ${AOF_LOOT_CONFIG.VERSION}`)
console.info(`[AOF] Author: ${AOF_LOOT_CONFIG.AUTHOR}`)
console.info('[AOF] Active Features:')
Object.entries(AOF_LOOT_CONFIG.FEATURES).forEach(([key, value]) => {
  console.info(`[AOF]   ${key}: ${value ? '✓' : '✗'}`)
})
console.info('[AOF] MOB CURRENCY RATES: BUFFED EDITION – 65-95% DROP CHANCE!')
console.info('═══════════════════════════════════════════════════════')