import { world } from "@minecraft/server";
import { getRandomNumber } from "./utils";
const overworld = world.getDimension("overworld");
const scp513RingPlayersEqo = {
    tags: ["dtr_scp513_ringing"]
};
const fatalPoisonEffectOptions = {
    amplifier: 0
};
const miningFatigueEffectOptions = {
    amplifier: 0
};
let ticksUntilNextJumpscare;
export function simulateScp513() {
    if (ticksUntilNextJumpscare > 0) {
        ticksUntilNextJumpscare--;
    }
    else {
        const scp513RingPlayers = overworld.getPlayers(scp513RingPlayersEqo);
        scp513RingPlayers.forEach(player => {
            overworld.spawnEntity("lc:dtr_scp513_1", player.location);
            player.runCommand("playsound scpdtr.scp513.ring @a[r=15] ~~~");
            player.addEffect('fatal_poison', 2, fatalPoisonEffectOptions);
            player.addEffect('mining_fatigue', 20, miningFatigueEffectOptions);
        });
        ticksUntilNextJumpscare = getRandomNumber(1900, 2900);
    }
}

//# sourceMappingURL=../../../../_scpdtr_scriptingDebug/scpdtr/copyPasteEverytime/scp513.js.map
