LootJS.modifiers((event) => {


    // 1. REGULAR AMMO (15% Chance, 5-15 count)
    const regularAmmo = [ "immersiveengineering:nugget_aluminum", "immersiveengineering:nugget_silver", "immersiveengineering:nugget_nickel", "immersiveengineering:nugget_steel", "immersiveengineering:bullet_casull", "immersiveengineering:bullet_buckshot"
     
    ];

    // 2. HEAVY AMMO (8% Chance, 1-5 count)
    const heavyAmmo = [ "immersiveengineering:light_bulb", "immersiveengineering:electron_tube", "immersiveengineering:component_electronic"
     
    ];

    // 3. EXPLOSIVES (5% Chance, 1-2 count)
    const explosives = [ "immersiveengineering:wire_aluminum", "immersiveengineering:wire_steel", "immersiveengineering:wire_lead", "immersiveengineering:wire_copper", "immersiveengineering:circuit_board"
        

    ];

    // 4. THE GUNS (30%)
    const allGuns = [ "immersiveengineering:revolver"
               ];

    const targets = event.addTableModifier([
        "big_lost_city:chests/tier_3",
        "big_lost_city:chests/tier_4"
      

    ]);
            // AMMO & EXPLOSIVES: type dih very annoying
    regularAmmo.forEach(id => { targets.addLoot(LootEntry.of(id).limitCount(1, 3).when(c => c.randomChance(0.05))) });
    heavyAmmo.forEach(id => { targets.addLoot(LootEntry.of(id).limitCount(1, 2).when(c => c.randomChance(0.02))) });
    explosives.forEach(id => { targets.addLoot(LootEntry.of(id).limitCount(1, 2).when(c => c.randomChance(0.005))) });

           // GUNS
    allGuns.forEach(id => {
        targets.addLoot(
            LootEntry.of(id)
                .when(c => c.randomChance(0.04 / allGuns.length))
        );
    });
});



