"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Game_1 = require("./Game");
const Character_1 = require("./Character");
const Player_1 = require("./Player");
let G;
let character;
let sameOwner;
let sameParty;
let randomPlayer;
beforeAll(async () => {
    G = await Game_1.Game.getGData();
    character = new Character_1.Character(undefined, undefined, undefined, G, { region: "ASIA", name: "I", addr: "test", port: 0, players: 0, key: "ASIAI" });
    character.updateCharacter({
        id: "earthPri",
        party: "earthMer",
        owner: "12345",
        abs: false,
        afk: "code",
        age: 404,
        angle: -85.76360520094116,
        apiercing: 9,
        armor: 162,
        attack: 4149,
        blast: 0,
        c: {},
        cash: 3036,
        cc: 6.5,
        cid: 60164,
        controller: "",
        courage: 2,
        crit: 0.75,
        critdamage: 0,
        ctype: "priest",
        cx: {},
        dex: 48,
        dreturn: 1,
        emx: { drop_egg: 1 },
        esize: 28,
        evasion: 3.5,
        explosion: 0,
        fear: 0,
        firesistance: 0,
        for: 30.25,
        frequency: 1.1786382113821139,
        fzresistance: 1,
        going_x: 671,
        going_y: -225,
        gold: 1000793,
        goldm: 1.2,
        hp: 11262,
        in: "mtunnel",
        int: 399,
        isize: 42,
        items: [{ name: "computer" }, { name: "tracker" }, { q: 999, name: "mpot1" }, { q: 1000, name: "hpot1" }],
        level: 86,
        lifesteal: 2.5,
        luckm: 1.4849999999999999,
        m: 451,
        manasteal: 0,
        map: "mtunnel",
        max_hp: 11262,
        max_mp: 7525,
        max_xp: 6200000000,
        mcourage: 19,
        miss: 0,
        move_num: 18588709,
        moving: true,
        mp: 7125,
        mp_cost: 56,
        mp_reduction: 0,
        name: "earthPri",
        pcourage: 2,
        pdps: 181472.0016944313,
        pnresistance: 0,
        q: {},
        range: 214,
        reflection: 5,
        resistance: 363,
        rip: false,
        rpiercing: 91,
        s: { mlifesteal: { ms: 3521515 }, mluck: { ms: 3567460, f: "earthMer", strong: true } },
        skin: "fpriest",
        slots: {
            amulet: { level: 5, name: "intamulet" },
            belt: { level: 4, name: "intbelt" },
            cape: { acc: 35946, ps: ["festive"], name: "angelwings", level: 8, ach: "festive", p: "festive" },
            chest: { name: "wattire", level: 9, p: "shiny", stat_type: "int" },
            earring1: { level: 5, name: "intearring" },
            earring2: { level: 5, name: "intearring" },
            elixir: { expires: "2021-01-10T00:58:46.062Z", name: "elixirluck", ex: true },
            gloves: { stat_type: "int", name: "wgloves", level: 9 },
            helmet: { name: "wcap", level: 9, stat_type: "int" },
            mainhand: { acc: 1, name: "firestaff", level: 9 },
            offhand: { name: "wbook1", level: 3 },
            orb: { name: "jacko", level: 4 },
            pants: { acc: 3076803, name: "wbreeches", level: 9, ach: "gooped", stat_type: "int" },
            ring1: { name: "intring", level: 4 },
            ring2: { level: 4, name: "intring" },
            shoes: { level: 9, stat_type: "int", name: "wshoes" }
        },
        speed: 69,
        str: 52,
        stun: 0,
        target: "2067865",
        targets: 0,
        tax: 0.01,
        vit: 111,
        x: 667.4007558893662,
        xp: 2890596969.9000006,
        xpm: 1.19,
        xrange: 25,
        y: -176.41020450644513,
    });
    sameOwner = new Player_1.Player({
        id: "test_same_owner",
        party: undefined,
        owner: "12345",
        x: 10,
        y: 10,
        map: "main",
        abs: false,
        angle: 90,
        armor: 100,
        attack: 100,
        c: {},
        cid: 1,
        cx: {},
        frequency: 1,
        going_x: 10,
        going_y: 10,
        hp: 1000,
        max_hp: 1000,
        mp: 500,
        max_mp: 500,
        level: 50,
        pdps: 20000,
        q: {},
        range: 100,
        resistance: 100,
        rip: false,
        s: {},
        skin: "fpriest",
        slots: {
            amulet: { level: 5, name: "intamulet" },
            belt: { level: 4, name: "intbelt" },
            cape: { acc: 35946, ps: ["festive"], name: "angelwings", level: 8, ach: "festive", p: "festive" },
            chest: { name: "wattire", level: 9, p: "shiny", stat_type: "int" },
            earring1: { level: 5, name: "intearring" },
            earring2: { level: 5, name: "intearring" },
            elixir: { expires: "2021-01-10T00:58:46.062Z", name: "elixirluck", ex: true },
            gloves: { stat_type: "int", name: "wgloves", level: 9 },
            helmet: { name: "wcap", level: 9, stat_type: "int" },
            mainhand: { acc: 1, name: "firestaff", level: 9 },
            offhand: { name: "wbook1", level: 3 },
            orb: { name: "jacko", level: 4 },
            pants: { acc: 3076803, name: "wbreeches", level: 9, ach: "gooped", stat_type: "int" },
            ring1: { name: "intring", level: 4 },
            ring2: { level: 4, name: "intring" },
            shoes: { level: 9, stat_type: "int", name: "wshoes" }
        },
        speed: 50,
        ctype: "priest",
    }, "main", G);
    sameParty = new Player_1.Player({
        id: "test_same_party",
        party: "earthMer",
        owner: "99999",
        x: 10,
        y: 10,
        map: "main",
        abs: false,
        angle: 90,
        armor: 100,
        attack: 100,
        c: {},
        cid: 1,
        cx: {},
        frequency: 1,
        going_x: 10,
        going_y: 10,
        hp: 1000,
        max_hp: 1000,
        mp: 500,
        max_mp: 500,
        level: 50,
        pdps: 20000,
        q: {},
        range: 100,
        resistance: 100,
        rip: false,
        s: {},
        skin: "fpriest",
        slots: {
            amulet: { level: 5, name: "intamulet" },
            belt: { level: 4, name: "intbelt" },
            cape: { acc: 35946, ps: ["festive"], name: "angelwings", level: 8, ach: "festive", p: "festive" },
            chest: { name: "wattire", level: 9, p: "shiny", stat_type: "int" },
            earring1: { level: 5, name: "intearring" },
            earring2: { level: 5, name: "intearring" },
            elixir: { expires: "2021-01-10T00:58:46.062Z", name: "elixirluck", ex: true },
            gloves: { stat_type: "int", name: "wgloves", level: 9 },
            helmet: { name: "wcap", level: 9, stat_type: "int" },
            mainhand: { acc: 1, name: "firestaff", level: 9 },
            offhand: { name: "wbook1", level: 3 },
            orb: { name: "jacko", level: 4 },
            pants: { acc: 3076803, name: "wbreeches", level: 9, ach: "gooped", stat_type: "int" },
            ring1: { name: "intring", level: 4 },
            ring2: { level: 4, name: "intring" },
            shoes: { level: 9, stat_type: "int", name: "wshoes" }
        },
        speed: 50,
        ctype: "priest",
    }, "main", G);
    randomPlayer = new Player_1.Player({
        id: "test_random_player",
        party: "funPartyTime",
        owner: "99999",
        x: 10,
        y: 10,
        map: "main",
        abs: false,
        angle: 90,
        armor: 100,
        attack: 100,
        c: {},
        cid: 1,
        cx: {},
        frequency: 1,
        going_x: 10,
        going_y: 10,
        hp: 1000,
        max_hp: 1000,
        mp: 500,
        max_mp: 500,
        level: 50,
        pdps: 20000,
        q: {},
        range: 100,
        resistance: 100,
        rip: false,
        s: {},
        skin: "fpriest",
        slots: {
            amulet: { level: 5, name: "intamulet" },
            belt: { level: 4, name: "intbelt" },
            cape: { acc: 35946, ps: ["festive"], name: "angelwings", level: 8, ach: "festive", p: "festive" },
            chest: { name: "wattire", level: 9, p: "shiny", stat_type: "int" },
            earring1: { level: 5, name: "intearring" },
            earring2: { level: 5, name: "intearring" },
            elixir: { expires: "2021-01-10T00:58:46.062Z", name: "elixirluck", ex: true },
            gloves: { stat_type: "int", name: "wgloves", level: 9 },
            helmet: { name: "wcap", level: 9, stat_type: "int" },
            mainhand: { acc: 1, name: "firestaff", level: 9 },
            offhand: { name: "wbook1", level: 3 },
            orb: { name: "jacko", level: 4 },
            pants: { acc: 3076803, name: "wbreeches", level: 9, ach: "gooped", stat_type: "int" },
            ring1: { name: "intring", level: 4 },
            ring2: { level: 4, name: "intring" },
            shoes: { level: 9, stat_type: "int", name: "wshoes" }
        },
        speed: 50,
        ctype: "priest",
    }, "main", G);
}, 30000);
afterAll(async () => {
    Game_1.Game.disconnect();
});
test("Player.isFriendly", async () => {
    expect(sameOwner.isFriendly(character)).toBe(true);
    expect(sameParty.isFriendly(character)).toBe(true);
    expect(randomPlayer.isFriendly(character)).toBe(false);
});
test("Player.isScared", async () => {
    expect(character.isScared()).toBe(false);
});
//# sourceMappingURL=Player.test.js.map