var listBonus = [];
var LANG = navigator.language.substr(0, 2).toLowerCase();
var SPEED_GAME = 1;
const MYSELF = 'myself';
const SHIELD_PER_SECOND = 5;
const COLOR_ATTACK = 0xff0000;
const COLOR_MOVE = 0x0000ff;
const COLOR_CONDITION = 0x0e0e0e;
const COLOR_RED = 0xff0000;
const COLOR_ORANGE = 0xff7f00;
const COLOR_GREEN = 0x008000;
const COLOR_RANGE = 0x008000;
const COLOR_SPEED_RELOAD = 0x7f00ff;

const COLOR_MYSELF = 0x6666ff;
const WIDTH_WINDOW = $(document).width() - 20;
const HEIGHT_WINDOW = $(document).height() - 20;
const WIDTH_MAP = WIDTH_WINDOW < HEIGHT_WINDOW ? WIDTH_WINDOW * 0.8 : HEIGHT_WINDOW * 0.8;
const OFFX_MAP = WIDTH_WINDOW / 20;
const OFFY_MAP = (HEIGHT_WINDOW - WIDTH_MAP) / 2;
const CENTERX_TREE = WIDTH_WINDOW / 4 * 3;
const OFFX_TREE = WIDTH_WINDOW / 10;
const OFFY_TREE = HEIGHT_WINDOW / 6;
const WIDTH_BUTTON = WIDTH_MAP / 10;

const HEIGHT_NODE = HEIGHT_WINDOW / 6;

const LIFE = 100;
const SHIELD = 100;

const VALUE_MAX_BAR = 5;

const SPEED = WIDTH_MAP / 1000;
const SPEED_BASE = 1;
const SPEED_BEGIN = 3;

const RANGE = WIDTH_MAP / 16;
const RANGE_BASE = 3;
const RANGE_BEGIN = 2;

const SPEED_RELOAD = 4000;
const SPEED_RELOAD_BASE = 2;
const SPEED_RELOAD_BEGIN = 3;

const DAMAGE = 2;
const DAMAGE_BASE = 10;
const DAMAGE_BEGIN = 2;

const HEIGHT_BONUS = WIDTH_MAP / 10;
const HEIGHT_DAMAGE = WIDTH_MAP / 20;
const DURATION_DAMAGE = 700;