Files

1.8 KiB
Raw Permalink Blame History

MercanRey1.js — readProfile() (satır 478)

← MercanRey1.js · ← Master

Parça 1/2 · sonraki

function readProfile(entity)
{
    var text = entityText(entity);
    var archetype = detectArchetype(text);
    var tags = [];

    for (var i = 0; i < archetype.tags.length; i++)
    {
        pushUnique(tags, archetype.tags[i]);
    }

    addItemTags(text, tags);

    var gameMode = getGameMode(entity);

    if (gameMode === 3)
    {
        pushUnique(tags, "gm3");
        pushUnique(tags, "disappear");
    }

    if (isFlying(entity))
    {
        pushUnique(tags, "flight");
    }

    if (entity.isSneaking())
    {
        pushUnique(tags, "ambush");
    }

    var hpRatio = entity.getMaxHp() <= 0 ? 1 : entity.getHp() / entity.getMaxHp();
    var risk = 35;

    if (archetype.id !== "unknown") risk += 20;
    if (hasTag(tags, "spine")) risk += 22;
    if (hasTag(tags, "red_circle") || hasTag(tags, "circle")) risk += 18;
    if (hasTag(tags, "black_dimension") || hasTag(tags, "fantasma_dimension") || hasTag(tags, "abyss")) risk += 16;
    if (hasTag(tags, "data_break") || hasTag(tags, "glitch") || hasTag(tags, "crash")) risk += 15;
    if (hasTag(tags, "gm3") || hasTag(tags, "disappear") || hasTag(tags, "hologram")) risk += 14;
    if (hasTag(tags, "knockout") || hasTag(tags, "dismember")) risk += 12;
    if (entity.isSprinting() || movementScore(entity) > 0.18) risk += 8;
    if (hpRatio < 0.35) risk -= 8;

    var action = archetype.action;

    if (hasTag(tags, "gm3"))
    {
        action = "gm3/yok olma ile hedef acisini bozma";
    }
    else if (hasTag(tags, "spine"))
    {
        action = "spine gun ile baglayip hareketi kapatma";
    }
    else if (hasTag(tags, "red_circle") || hasTag(tags, "circle"))
    {