local BattleConst = {}

BattleConst.ROW_COUNT = 7
BattleConst.PVP_ROW_COUNT = 10
BattleConst.COLUMN_COUNT = 7
BattleConst.HALF_ROW_COUNT = 4 -- 计算偏移 math.ceil(ROW_COUNT / 2)
BattleConst.HALF_COLUMN_COUNT = 4 -- 计算偏移 math.ceil(COLUMN_COUNT / 2)
BattleConst.GRID_STEP_H = 94
BattleConst.ROW_STEP = 10
BattleConst.ONE_STEP_TIME = 0.1
BattleConst.ELEMENT_TYPE_COUNT = 5
BattleConst.ELEMENT_WIGHT = 100
BattleConst.MAX_ELEMENT_WIGHT = 500
BattleConst.SIDE_ATK = 1
BattleConst.SIDE_DEF = 2
BattleConst.SIDE_ATK_ALL = 8
BattleConst.SKILL_TYPE_ACTIVE = 1
BattleConst.SKILL_TYPE_NORMAL = 2
BattleConst.SKILL_TYPE_ASSISTING = 3
BattleConst.SKILL_TYPE_PASSIVE = 4
BattleConst.SKILL_SELECT_COUNT = 3
BattleConst.DEFAULT_FACTOR = 10000
BattleConst.PERCENT_FACTOR = 100
BattleConst.TIME_FACTOR = 1000
BattleConst.INIT_POS_X = 140      -- 战斗单位初始化的坐标
BattleConst.UNIT_FRONT_POS_X = 0  -- 战斗单位身前的坐标
BattleConst.UNIT_BODY_WIDTH = 240
BattleConst.UNIT_FRONT_DISTANCE = 50
BattleConst.MOVE_SPEED = 2000               -- 战斗单位攻击时的移动速度
BattleConst.MOVE_SPEED_ENTER = 500         -- 战斗单位入场时的移动速度
BattleConst.HURT_STATE_CRIT = 1				-- 暴击
BattleConst.EFFECT_COLOR_RED = 1
BattleConst.EFFECT_COLOR_GREEN = 2
BattleConst.EFFECT_COLOR_BLUE = 3
BattleConst.EFFECT_COLOR_WHILTE = 4
BattleConst.EFFECT_COLOR_SPECIAL = 5
BattleConst.EFFECT_TYPE_MOVE_L = 1
BattleConst.EFFECT_TYPE_MOVE_R = 2
BattleConst.EFFECT_TYPE_CRIT = 3
BattleConst.EFFECT_TYPE_BUFF = 4
BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_L = -526518883
BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_R = 445827326
BattleConst.ANIMATOR_HASH_NAME_NUMBER_CRIT = -1734531349
BattleConst.ANIMATOR_HASH_NAME_NUMBER_BUFF = 1364146828
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_1 = 123402348
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_2 = -1638684202
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_3 = -380331712
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_1_l = 1120937928
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_2_l = 1083611537
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_3_l = 1096086438
BattleConst.UNLOCK_SKILL_ROGUE_TYPE = 6
BattleConst.RECOVER_HP_COUNT = 3
BattleConst.RECOVER_HP_INTERVAL = 0.2
BattleConst.RECOVER_HP_PERCENT = 333
BattleConst.EFFECT_NUMBER_DELAY = 0.2
BattleConst.MAX_CACHE_SKILL_COUNT = 3
BattleConst.SKILL_ELIMINATION_TIME = 0.5
BattleConst.ELIMINATION_INTERVAL = 0.01
BattleConst.GRID_BREAK_EFFECT_INTERVAL = 0.1
BattleConst.COMBO_DEFAULT_POSITION = 0
BattleConst.EFFECT_NUMBER_INTERVAL = 0.2

BattleConst.BATTLE_ROUND_STEP = {
    WAIT_BEGIN = 0,             -- 等待开始
    ON_BEGIN = 1,               -- 回合开始
    ON_ELIMINATION_BEGIN = 3,   -- 消除开始
    ON_ELIMINATION = 4,         -- 等待消除
    ON_REFRESH_BOARD = 5,       -- 刷新棋盘
    ON_TEAM_ACTION = 6,         -- 队伍行动
    ON_ATK_STEP = 7,            -- 攻击方行动
    ON_DEF_STEP = 8,            -- 防守方行动
    ON_TEAM_ACTION_OVER = 9,    -- 攻击方行动结束(可能直接跳转到刷新棋盘/回合结束/进入下一个队伍行动)
    ON_END = 10,                -- 回合结束
}

BattleConst.TIME_SCALE = {
	LEVEL_0 = 0,
	LEVEL_1 = 1,
	LEVEL_2 = 1.5,
    LEVEL_3 = 2,
}

-- 为方便存储，这里使用字符串
BattleConst.BATTLE_TYPE = {
    STAGE = "1",
    DAILY_CHALLENGE = "2",
    DUNGEON_GOLD = "3",
    DUNGEON_SHARDS = "4",
    ARENA = "5",
    DUNGEON_WEAPON = "6",
    DUNGEON_ARMOR = "7",
    ACT_BOSS_RUSH = "8",
    DUNGEON_RUNE = "9",
    ACT_PVP = "11",
    FULL_MOON_SKIN = "10",
}

BattleConst.IS_PVP_BATTLE = {
    [BattleConst.BATTLE_TYPE.ARENA] = true,
    [BattleConst.BATTLE_TYPE.ACT_PVP] = true,
}

-- 编队
BattleConst.FORMATION_TYPE = {
    STAGE = "1",-- 主线章节
    ARENA_ATTACK = "2",-- 竞技场进攻
    ARENA_DEFEND = "3",-- 竞技场防守
    DUNGEON_WEAPON = "4", -- 武器副本
    DUNGEON_ARMOR = "5", -- 支线副本
    BOSS_RUSH = "6", -- boss rush
    DUNGEON_RUNE = "7", -- 符文副本
}

BattleConst.TYPEOF_LUA_COMP = {
	BATTLE_HERO_COMPONENT = "app/module/battle/component/battle_hero_comp",
	BATTLE_MONSTER_COMPONENT = "app/module/battle/component/battle_monster_comp",
    BATTLE_NUMBER_COMPONENT = "app/module/battle/component/battle_number_comp",
}

BattleConst.MIN_NODE_HEIGHT_DEFAULT = 69
BattleConst.MIN_NODE_HEIGHT = {
    [1] = 160,
    [2] = 69,
    [3] = 34
}

BattleConst.BUFF_TYPE = {
    SHIELD = 2,
    DIRECT_HURT = 3,
    CONTROL = 8,
}

BattleConst.BUFF_STACK_TYPE = {
    CANT_ADD = 0,
    ADD_ROUND = 1,
    ADD = 2,
    REMOVE_LAST = 3,
}

BattleConst.BUFF_DECR_TYPE = {
    INCREASE_GAIN = 1,
    REDUCE_GAIN = 2,
    NOT_INCREASE_DECREASE_GAIN = 3
}

BattleConst.SKILL_MOVE_TYPE = {
    MOVE = 1,           -- 移动到目标跟前使用
    STAND = 2,          -- 原地使用
}

BattleConst.UNIT_STATE = {
	INIT = 0,                       -- 初始化
    IDLE = 1,			            -- 待机
    NORMAL_ATTACK = 2,	            -- 普通攻击
    SKILL_ATTACK = 3,               -- 技能攻击
	DEAD = 4,			            -- 死亡
    ENTER_BATTLEFIELD = 5,          -- 进入战场
    SWITCH_IN = 6,                  -- 入场
    SWITCH_OUT = 7,                 -- 离场
    ASSISTING_ATTACK = 8,           -- 协助攻击
    WAIT = 9,                       -- 等待
    RECOVER_HP_WAVE = 10,           -- 波次之间回血
    FROZEN = 11,                    -- 冻结状态
    VERITGO = 12,                   -- 昏睡
    REBIRTH = 13,                   -- 复活中
}

BattleConst.ATTACK_ACTION_STATE = {
    NORMAL = "normal",
    COUNTERATTACK = "counterattack",
}

BattleConst.MATCH_DMG_ADDITION_NAME = {
    [0] = "dmg_addition_none",
    [1] = "dmg_addition_red",
    [2] = "dmg_addition_yellow",
    [3] = "dmg_addition_green",
    [4] = "dmg_addition_blue",
    [5] = "dmg_addition_purple",
}

BattleConst.MATCH_DMG_DEC_NAME = {
    [0] = "dmg_dec_none",
    [1] = "dmg_dec_red",
    [2] = "dmg_dec_yellow",
    [3] = "dmg_dec_green",
    [4] = "dmg_dec_blue",
    [5] = "dmg_dec_purple",
}

BattleConst.MATCH_DEC_DMG_NAME = {
    [0] = "dec_dmg_none",
    [1] = "dec_dmg_red",
    [2] = "dec_dmg_yellow",
    [3] = "dec_dmg_green",
    [4] = "dec_dmg_blue",
    [5] = "dec_dmg_purple",
}

BattleConst.MATCH_WEAKNESS_NAME = {
    [0] = "weakness_none",
    [1] = "weakness_red",
    [2] = "weakness_yellow",
    [3] = "weakness_green",
    [4] = "weakness_blue",
    [5] = "weakness_purple",
}

BattleConst.BUFF_MATCH_NAME = {
    ["atkp"] = {
        [1] = "atkp_red_add",
        [2] = "atkp_yellow_add",
        [3] = "atkp_green_add",
        [4] = "atkp_blue_add",
        [5] = "atkp_purple_add",
    },
}

BattleConst.SPINE_ANIMATION_NAME = {
	IDLE = "idle",
    ATTACK = "attack01",
    MOVE = "move",
    HIT = "suffer",
    HIT_2 = "suffer02",
    DEAD = "death",
    BORN = "born",
    OUT = "out",
    BLOCK = "block",
    FROZEN = "frozen",
    VERTIGO = "vertigo",
}

BattleConst.EFFECT_TYPE = {
	DIRECT = 1,				-- 直接伤害
	DOT = 2,			    -- 间接伤害
	HEAL = 101,
	HOT = 102,
    REBOUND = 201,          -- 反弹
}

---- 特殊的伤害类型，其余都是buffname
BattleConst.SPECIAL_DAMAGE_OR_CURE_TYPE = {
    ROUND_BEGIN_HEAL = "round_begin_heal",
    KILL_MAX_ELEMENT_AND_HEAL = "kill_max_element_and_heal",
    BE_SUCKED = "be_sucked",

    AD_REBIRTH = "ad_rebirth",
}

BattleConst.SKILL_RECORD_DATA_NAME = {
    HP_LOWER_THAN = 1
}

BattleConst.SKILL_CONDITION_TYPE = {
    STATE = "state",        -- 状态
    ATTR = "attr",          -- 属性
}

BattleConst.SKILL_CONDITION_REL_TYPE = {
    AND = 1,
    OR = 2,
}

BattleConst.SKILL_CONDITION_RESULT = {
    NO_CONDITION = 0,
    CONDITION_PASS = 1,
    NOT_PASS = 2,
}

BattleConst.PASSIVE_EVENT = {
    ON_UNIT_PREPARE_OVER = 2,   -- 新单位出场时
    ON_UNI_ATTACK_START = 3,    -- 攻击开始前
    HP_LOWER_THAN = 4,          -- 血量低于X%
    USE_NORMAL_SKILL = 5,       -- 使用普攻
    ACTIVE_SKILL_HIT = 6,       -- 主动技能命中
    ON_ACTIVE_SKILL_BEFORE = 7,   -- 主动技能释放前
    ON_DEAD_BY_BURN = 8,        -- 有敌人死于灼烧伤害时触发
    ON_DEAD_BY_SKILL = 9,       -- 有敌人死于技能时触发
    ON_DEAD_WITH_BLEED = 10,     -- 死亡时带有流血buff
    ON_DEAD = 11,                -- 死亡时
}

local BUFF_NAME = {
    ATKP_ADD = "atkp_add",
    ATKP_COLOR_ADD = "atkp_color_add",
    ATKP_RED_ADD = "atkp_red_add",
    ATKP_YELLOW_ADD = "atkp_yellow_add",
    ATKP_GREEN_ADD = "atkp_green_add",
    ATKP_BLUE_ADD = "atkp_blue_add",
    ATKP_PURPLE_ADD = "atkp_purple_add",
    DEC_DMG_RED_ADD = "dec_dmg_red_add",
    DEC_DMG_YELLOW_ADD = "dec_dmg_yellow_add",
    DEC_DMG_GREEN_ADD = "dec_dmg_green_add",
    DEC_DMG_BLUE_ADD = "dec_dmg_blue_add",
    DEC_DMG_PURPLE_ADD = "dec_dmg_purple_add",
    DEC_DMG_ALL_ADD = "dec_dmg_all_add",
    WEAKNESS_RED_ADD = "weakness_red_add",
    WEAKNESS_YELLOW_ADD = "weakness_yellow_add",
    WEAKNESS_GREEN_ADD = "weakness_green_add",
    WEAKNESS_BLUE_ADD = "weakness_blue_add",
    WEAKNESS_PURPLE_ADD = "weakness_purple_add",
    WEAKNESS_ALL_ADD = "weakness_all_add",
    DMG_ADDITION_RED_ADD = "dmg_addition_red_add",
    DMG_ADDITION_YELLOW_ADD = "dmg_addition_yellow_add",
    DMG_ADDITION_GREEN_ADD = "dmg_addition_green_add",
    DMG_ADDITION_BLUE_ADD = "dmg_addition_blue_add",
    DMG_ADDITION_PURPLE_ADD = "dmg_addition_purple_add",
    DMG_ADDITION_ALL_ADD = "dmg_addition_all_add",
    DMG_DEC_RED_ADD = "dmg_dec_red_add",
    DMG_DEC_YELLOW_ADD = "dmg_dec_yellow_add",
    DMG_DEC_GREEN_ADD = "dmg_dec_green_add",
    DMG_DEC_BLUE_ADD = "dmg_dec_blue_add",
    DMG_DEC_PURPLE_ADD = "dmg_dec_purple_add",
    DMG_DEC_ALL_ADD = "dmg_dec_all_add",
    STUN = "stun",
    SHIELD = "shield",
    NORMAL_ATTACK_DEC = "normal_attack_dec",
    NORMAL_ATTACK_ADD = "normal_attack_add",
    BLOCK = "block",
    HPP_ADD = "hpp_add",
    CRIT_ADD = "crit_add",
    CRIT_TIME_ADD = "crit_time_add",
    EXP_TIME_ADD = "exp_time_add",
    CURED_ADD = "cured_add",
    CURED_DEC = "cured_dec",
    ADD_SKILL = "add_skill",
    SKILL_FIRE_TIMES = "skill_fire_times",
    SHIELD_REBOUND_200 = "shield_rebound_200",
    BURN = "burn",
    VULNERABLE = "vulnerable",
    FROZEN = "frozen",
    POISON = "poison",
    IMPRISON = "imprison",
    CORRUPT = "corrupt",
    BLEED = "bleed",
    WEAKEN = "weaken",
    LETHARGY = "lethargy",
    CURSE = "curse",
    LOCK = "lock",
    UNDEAD = "undead",
    THORNS = "thorns",
    FIRST_HAND = "first_hand",
    COUNTER_ATTACK = "counterattack",
    SKILL_HURT_ADD = "skill_hurt_add",
    DEATH_SUMMON = "death_summon",
    LOCK = "lock",
    SHIELD_REBOUND_400 = "shield_rebound_400",
    SHIELD_ICE = "shield_ice",
    SHIELD_ICE_REBOUND_400 = "shield_ice_rebound_400",
    INVALID_CONTROL = "invalid_control",
    END_DMG_ADDITION_ALL_ADD = "end_dmg_addition_all_add",
    END_DMG_DEC_ALL_ADD = "end_dmg_dec_all_add",
    INVINCIBLE_SHIELD = "invincible_shield",
    SHIELD_ICE_02 = "shield_ice_02",
    SKILL_HURT_ADD_SHOW = "skill_hurt_add_show",
    SHIELD_ICE_REBOUND_200 = "shield_ice_rebound_200",
    SHIELD_REBOUND_100 = "shield_rebound_100",
    REBIRTH = "rebirth",
    OCEAN_SHIELD = "ocean_shield",
    SELF_HEAL = "self_heal",
    CHARM = "charm",
    IMMUNE = "immune",
    FOREVER_FIRST_HAND = "forever_first_hand",
    FOREVER_COUNTERATTACK = "forever_counterattack",
    FOREVER_DEC_DMG_RED_ADD = "forever_dec_dmg_red_add",
    FOREVER_DEC_DMG_YELLOW_ADD = "forever_dec_dmg_yellow_add",
    FOREVER_DEC_DMG_GREEN_ADD = "forever_dec_dmg_green_add",
    FOREVER_DEC_DMG_BLUE_ADD = "forever_dec_dmg_blue_add",
    FOREVER_DEC_DMG_PURPLE_ADD = "forever_dec_dmg_purple_add",
    FOREVER_DEC_DMG_ALL_ADD = "forever_dec_dmg_all_add",
    FOREVER_THORNS = "forever_thorns",
}
BattleConst.BUFF_NAME = BUFF_NAME


BattleConst.FINAL_WORK_BUFF = {
    [BUFF_NAME.REBIRTH] = true,
}

local ATTR_NAME = {
    HP = "hp",
    MAX_HP = "max_hp",
    ATK = "atk",
    ATK_RED = "atk_red",
    ATK_YELLOW = "atk_yellow",
    ATK_GREEN = "atk_green",
    ATK_BLUE = "atk_blue",
    ATK_PURPLE = "atk_purple",
    HP_RED = "attr_hp_red",
    HP_YELLOW = "attr_hp_yellow",
    HP_GREEN = "attr_hp_green",
    HP_BLUE = "attr_hp_blue",
    HP_PURPLE = "attr_hp_purple",
    DEC_DMG_RED = "dec_dmg_red",
    DEC_DMG_YELLOW = "dec_dmg_yellow",
    DEC_DMG_GREEN = "dec_dmg_green",
    DEC_DMG_BLUE = "dec_dmg_blue",
    DEC_DMG_PURPLE = "dec_dmg_purple",
    DEC_DMG_ALL = "dec_dmg_all",
    WEAKNESS_RED = "weakness_red",
    WEAKNESS_YELLOW = "weakness_yellow",
    WEAKNESS_GREEN = "weakness_green",
    WEAKNESS_BLUE = "weakness_blue",
    WEAKNESS_PURPLE = "weakness_purple",
    WEAKNESS_ALL = "weakness_all",
    DMG_ADDITION_RED = "dmg_addition_red",
    DMG_ADDITION_YELLOW = "dmg_addition_yellow",
    DMG_ADDITION_GREEN = "dmg_addition_green",
    DMG_ADDITION_BLUE = "dmg_addition_blue",
    DMG_ADDITION_PURPLE = "dmg_addition_purple",
    DMG_ADDITION_ALL = "dmg_addition_all",
    DMG_DEC_RED = "dmg_dec_red",
    DMG_DEC_YELLOW = "dmg_dec_yellow",
    DMG_DEC_GREEN = "dmg_dec_green",
    DMG_DEC_BLUE = "dmg_dec_blue",
    DMG_DEC_PURPLE = "dmg_dec_purple",
    DMG_DEC_ALL = "dmg_dec_all",
    NORMAL_ATTACK_COUNT = "normal_attack_count",
    BLOCK = "block",
    CRIT = "crit",
    CRIT_TIME = "crit_time",
    EXP_TIME = "exp_time",
    CURE_ADDITION = "cure_addition",
    CURE_DEC = "cure_dec",
    SHIELD_REBOUND = "shield_rebound",
    BE_DMG_TO_HEAL = "be_dmg_to_heal",
    BE_SUCKED = "be_sucked",
    LETHARGY = "lethargy",
    UNDEAD = "undead",
    THORNS = "thorns",
    FIRST_HAND = "first_hand",
    COUNTER_ATTACK = "counterattack",
    SKILL_HURTP = "skill_hurtp",
    DEATH_SUMMON = "death_summon",
    BLEED = "bleed",
    INVALID_CONTROL = "invalid_control",
    END_DMG_ADDITION_ALL = "end_dmg_addition_all",
    END_DMG_DEC_ALL = "end_dmg_dec_all",
    ATTR_CRIT_RED = "attr_crit_red",
    ATTR_CRIT_YELLOW = "attr_crit_yellow",
    ATTR_CRIT_GREEN = "attr_crit_green",
    ATTR_CRIT_BLUE = "attr_crit_blue",
    ATTR_CRIT_PURPLE = "attr_crit_purple",
    ATTR_CRIT_TIME_RED = "attr_crit_time_red",
    ATTR_CRIT_TIME_YELLOW = "attr_crit_time_yellow",
    ATTR_CRIT_TIME_GREEN = "attr_crit_time_green",
    ATTR_CRIT_TIME_BLUE = "attr_crit_time_blue",
    ATTR_CRIT_TIME_PURPLE = "attr_crit_time_purple",
    ATTR_CURED_RED = "attr_cured_red",
    ATTR_CURED_YELLOW = "attr_cured_yellow",
    ATTR_CURED_GREEN = "attr_cured_green",
    ATTR_CURED_BLUE = "attr_cured_blue",
    ATTR_CURED_PURPLE = "attr_cured_purple",
    ATTR_ATKP_RED = "attr_atkp_red",
    ATTR_ATKP_YELLOW = "attr_atkp_yellow",
    ATTR_ATKP_GREEN = "attr_atkp_green",
    ATTR_ATKP_BLUE = "attr_atkp_blue",
    ATTR_ATKP_PURPLE = "attr_atkp_purple",
    ATTR_HPP_RED = "attr_hpp_red",
    ATTR_HPP_YELLOW = "attr_hpp_yellow",
    ATTR_HPP_GREEN = "attr_hpp_green",
    ATTR_HPP_BLUE = "attr_hpp_blue",
    ATTR_HPP_PURPLE = "attr_hpp_purple",
    ATTR_NORMAL_HURT_RED = "attr_normal_hurt_red",
    ATTR_NORMAL_HURT_YELLOW = "attr_normal_hurt_yellow",
    ATTR_NORMAL_HURT_GREEN = "attr_normal_hurt_green",
    ATTR_NORMAL_HURT_BLUE = "attr_normal_hurt_blue",
    ATTR_NORMAL_HURT_PURPLE = "attr_normal_hurt_purple",
    ATTR_SKILL_HURT_RED = "attr_skill_hurt_red",
    ATTR_SKILL_HURT_YELLOW = "attr_skill_hurt_yellow",
    ATTR_SKILL_HURT_GREEN = "attr_skill_hurt_green",
    ATTR_SKILL_HURT_BLUE = "attr_skill_hurt_blue",
    ATTR_SKILL_HURT_PURPLE = "attr_skill_hurt_purple",
    ATTR_NORMAL_HURTP_RED = "attr_normal_hurtp_red",
    ATTR_NORMAL_HURTP_YELLOW = "attr_normal_hurtp_yellow",
    ATTR_NORMAL_HURTP_GREEN = "attr_normal_hurtp_green",
    ATTR_NORMAL_HURTP_BLUE = "attr_normal_hurtp_blue",
    ATTR_NORMAL_HURTP_PURPLE = "attr_normal_hurtp_purple",
    ATTR_SKILL_HURTP_RED = "attr_skill_hurtp_red",
    ATTR_SKILL_HURTP_YELLOW = "attr_skill_hurtp_yellow",
    ATTR_SKILL_HURTP_GREEN = "attr_skill_hurtp_green",
    ATTR_SKILL_HURTP_BLUE = "attr_skill_hurtp_blue",
    ATTR_SKILL_HURTP_PURPLE = "attr_skill_hurtp_purple",
    ATTR_ALL_HURTP_RED = "attr_all_hurtp_red",
    ATTR_ALL_HURTP_YELLOW = "attr_all_hurtp_yellow",
    ATTR_ALL_HURTP_GREEN = "attr_all_hurtp_green",
    ATTR_ALL_HURTP_BLUE = "attr_all_hurtp_blue",
    ATTR_ALL_HURTP_PURPLE = "attr_all_hurtp_purple",
    ATTR_ATKP_RED_ALL = "attr_atkp_red_all",
    ATTR_ATKP_YELLOW_ALL = "attr_atkp_yellow_all",
    ATTR_ATKP_GREEN_ALL = "attr_atkp_green_all",
    ATTR_ATKP_BLUE_ALL = "attr_atkp_blue_all",
    ATTR_ATKP_PURPLE_ALL = "attr_atkp_purple_all",

    INVINCIBLE_SHIELD = "invincible_shield",
    REBIRTH = "rebirth",
    IMMUNE_REDUCTION_BENEFIT = "immune_reduction_benefit", -- 免疫减益
}
BattleConst.ATTR_NAME = ATTR_NAME

-- buff->{属性名，是否按百分比乘法加成}
BattleConst.BUFF_NAME_TO_ATTR = {
    [BUFF_NAME.ATKP_ADD] = {ATTR_NAME.ATK, true},
    [BUFF_NAME.ATKP_RED_ADD] = {ATTR_NAME.ATK_RED, true},
    [BUFF_NAME.ATKP_YELLOW_ADD] = {ATTR_NAME.ATK_YELLOW, true},
    [BUFF_NAME.ATKP_GREEN_ADD] = {ATTR_NAME.ATK_GREEN, true},
    [BUFF_NAME.ATKP_BLUE_ADD] = {ATTR_NAME.ATK_BLUE, true},
    [BUFF_NAME.ATKP_PURPLE_ADD] = {ATTR_NAME.ATK_PURPLE, true},
    [BUFF_NAME.DEC_DMG_RED_ADD] = {ATTR_NAME.DEC_DMG_RED, false},
    [BUFF_NAME.DEC_DMG_YELLOW_ADD] = {ATTR_NAME.DEC_DMG_YELLOW, false},
    [BUFF_NAME.DEC_DMG_GREEN_ADD] = {ATTR_NAME.DEC_DMG_GREEN, false},
    [BUFF_NAME.DEC_DMG_BLUE_ADD] = {ATTR_NAME.DEC_DMG_BLUE, false},
    [BUFF_NAME.DEC_DMG_PURPLE_ADD] = {ATTR_NAME.DEC_DMG_PURPLE, false},
    [BUFF_NAME.DEC_DMG_ALL_ADD] = {ATTR_NAME.DEC_DMG_ALL, false},
    [BUFF_NAME.WEAKNESS_RED_ADD] = {ATTR_NAME.WEAKNESS_RED, false},
    [BUFF_NAME.WEAKNESS_YELLOW_ADD] = {ATTR_NAME.WEAKNESS_YELLOW, false},
    [BUFF_NAME.WEAKNESS_GREEN_ADD] = {ATTR_NAME.WEAKNESS_GREEN, false},
    [BUFF_NAME.WEAKNESS_BLUE_ADD] = {ATTR_NAME.WEAKNESS_BLUE, false},
    [BUFF_NAME.WEAKNESS_PURPLE_ADD] = {ATTR_NAME.WEAKNESS_PURPLE, false},
    [BUFF_NAME.WEAKNESS_ALL_ADD] = {ATTR_NAME.WEAKNESS_ALL, false},
    [BUFF_NAME.DMG_ADDITION_RED_ADD] = {ATTR_NAME.DMG_ADDITION_RED, false},
    [BUFF_NAME.DMG_ADDITION_YELLOW_ADD] = {ATTR_NAME.DMG_ADDITION_YELLOW, false},
    [BUFF_NAME.DMG_ADDITION_GREEN_ADD] = {ATTR_NAME.DMG_ADDITION_GREEN, false},
    [BUFF_NAME.DMG_ADDITION_BLUE_ADD] = {ATTR_NAME.DMG_ADDITION_BLUE, false},
    [BUFF_NAME.DMG_ADDITION_PURPLE_ADD] = {ATTR_NAME.DMG_ADDITION_PURPLE, false},
    [BUFF_NAME.DMG_ADDITION_ALL_ADD] = {ATTR_NAME.DMG_ADDITION_ALL, false},
    [BUFF_NAME.DMG_DEC_RED_ADD] = {ATTR_NAME.DMG_DEC_RED, false},
    [BUFF_NAME.DMG_DEC_YELLOW_ADD] = {ATTR_NAME.DMG_DEC_YELLOW, false},
    [BUFF_NAME.DMG_DEC_GREEN_ADD] = {ATTR_NAME.DMG_DEC_GREEN, false},
    [BUFF_NAME.DMG_DEC_BLUE_ADD] = {ATTR_NAME.DMG_DEC_BLUE, false},
    [BUFF_NAME.DMG_DEC_PURPLE_ADD] = {ATTR_NAME.DMG_DEC_PURPLE, false},
    [BUFF_NAME.DMG_DEC_ALL_ADD] = {ATTR_NAME.DMG_DEC_ALL, false},
    [BUFF_NAME.BLOCK] = {ATTR_NAME.BLOCK, false},
    [BUFF_NAME.CRIT_ADD] = {ATTR_NAME.CRIT, false},
    [BUFF_NAME.CRIT_TIME_ADD] = {ATTR_NAME.CRIT_TIME, false},
    [BUFF_NAME.EXP_TIME_ADD] = {ATTR_NAME.EXP_TIME, false},
    [BUFF_NAME.CURED_ADD] = {ATTR_NAME.CURE_ADDITION, false},
    [BUFF_NAME.VULNERABLE] = {ATTR_NAME.WEAKNESS_ALL, false},
    [BUFF_NAME.CORRUPT] = {ATTR_NAME.CURE_DEC, false},
    [BUFF_NAME.CURED_DEC] = {ATTR_NAME.CURE_DEC, false},
    [BUFF_NAME.WEAKEN] = {ATTR_NAME.DMG_DEC_ALL, false},
    [BUFF_NAME.CURSE] = {ATTR_NAME.BE_DMG_TO_HEAL, false},
    [BUFF_NAME.THORNS] = {ATTR_NAME.THORNS, false},
    [BUFF_NAME.FIRST_HAND] = {ATTR_NAME.FIRST_HAND, false},
    [BUFF_NAME.COUNTER_ATTACK] = {ATTR_NAME.COUNTER_ATTACK, false},
    [BUFF_NAME.SKILL_HURT_ADD] = {ATTR_NAME.SKILL_HURTP, false},
    [BUFF_NAME.END_DMG_ADDITION_ALL_ADD] = {ATTR_NAME.END_DMG_ADDITION_ALL, false},
    [BUFF_NAME.END_DMG_DEC_ALL_ADD] = {ATTR_NAME.END_DMG_DEC_ALL, false},
    [BUFF_NAME.SKILL_HURT_ADD_SHOW] = {ATTR_NAME.SKILL_HURTP, false},
    [BUFF_NAME.IMMUNE] = {ATTR_NAME.IMMUNE_REDUCTION_BENEFIT, false},
    [BUFF_NAME.FOREVER_FIRST_HAND] = {ATTR_NAME.FIRST_HAND, false},
    [BUFF_NAME.FOREVER_COUNTERATTACK] = {ATTR_NAME.COUNTER_ATTACK, false},
    [BUFF_NAME.FOREVER_DEC_DMG_RED_ADD] = {ATTR_NAME.DEC_DMG_RED, false},
    [BUFF_NAME.FOREVER_DEC_DMG_YELLOW_ADD] = {ATTR_NAME.DEC_DMG_YELLOW, false},
    [BUFF_NAME.FOREVER_DEC_DMG_GREEN_ADD] = {ATTR_NAME.DEC_DMG_GREEN, false},
    [BUFF_NAME.FOREVER_DEC_DMG_BLUE_ADD] = {ATTR_NAME.DEC_DMG_BLUE, false},
    [BUFF_NAME.FOREVER_DEC_DMG_PURPLE_ADD] = {ATTR_NAME.DEC_DMG_PURPLE, false},
    [BUFF_NAME.FOREVER_DEC_DMG_ALL_ADD] = {ATTR_NAME.DEC_DMG_ALL, false},
    [BUFF_NAME.FOREVER_THORNS] = {ATTR_NAME.THORNS, false},
}

---- 格子类型
BattleConst.GRID_TYPE = {
    EMPTY = 0,
    OBSTACLE = 1,
    SNOW_BOX = 2,
    SOLID_SNOW = 3,
    VINES = 4,
    ICE = 5,
    LOCK = 6,
    JELLY = 13,
}

BattleConst.GRID_BREAK_CONDITION = {
    AROUND = 1,
    LINE = 2,
    SKILL = 3,
}

BattleConst.GRID_EFFECT_TYPE = {
    DIRECTION_ELIMINATION = 1,
    CROSS_SPREAD = 2,
    SELECT_COMMON_SKILL = 3,
    REWARD_BOX = 4,
    CROSS_SPREAD_NOT_BREAK = 5,
    CROSS_MOVE_NOT_BREAK = 6,
}

BattleConst.GRID_EFFECT_TRIGGER_TYPE = {
    ON_ROUND_BEGIN = 1,
    ON_GRID_BREAK = 2,
}

---- 元素类型
BattleConst.ELEMENT_TYPE = {
    NONE = 0,
    RED = 1,
    YELLOW = 2,
    GREEN = 3,
    BLUE = 4,
    PURPLE = 5
}

BattleConst.ELEMENT_COLOR = {
    [BattleConst.ELEMENT_TYPE.RED] = "#FF9898",
    [BattleConst.ELEMENT_TYPE.YELLOW] = "#FFFC28",
    [BattleConst.ELEMENT_TYPE.GREEN] = "#3CFF28",
    [BattleConst.ELEMENT_TYPE.BLUE] = "#28FFF7",
    [BattleConst.ELEMENT_TYPE.PURPLE] = "#FFAEED"
}

BattleConst.ELEMENT_ICON = {
    [BattleConst.ELEMENT_TYPE.RED] = "red_1",
    [BattleConst.ELEMENT_TYPE.YELLOW] = "yellow_1",
    [BattleConst.ELEMENT_TYPE.GREEN] = "green_1",
    [BattleConst.ELEMENT_TYPE.BLUE] = "blue_1",
    [BattleConst.ELEMENT_TYPE.PURPLE] = "purple_1"
}

BattleConst.SKILL_ELEMENT_BG = {
    [BattleConst.ELEMENT_TYPE.RED] = "battle_skill_bg_red_1",
    [BattleConst.ELEMENT_TYPE.YELLOW] = "battle_skill_bg_yellow_1",
    [BattleConst.ELEMENT_TYPE.GREEN] = "battle_skill_bg_green_1",
    [BattleConst.ELEMENT_TYPE.BLUE] = "battle_skill_bg_blue_1",
    [BattleConst.ELEMENT_TYPE.PURPLE] = "battle_skill_bg_purple_1"
}

BattleConst.SKILL_ELEMENT_BG_2 = {
    skill = "battle_skill_colorful",
    [BattleConst.ELEMENT_TYPE.RED] = "battle_skill_bg_red_2",
    [BattleConst.ELEMENT_TYPE.YELLOW] = "battle_skill_bg_yellow_2",
    [BattleConst.ELEMENT_TYPE.GREEN] = "battle_skill_bg_green_2",
    [BattleConst.ELEMENT_TYPE.BLUE] = "battle_skill_bg_blue_2",
    [BattleConst.ELEMENT_TYPE.PURPLE] = "battle_skill_bg_purple_2"
}

BattleConst.SIDE_OBJ_TO_MATCH_TYPE = {
    [3] = BattleConst.ELEMENT_TYPE.RED,
    [4] = BattleConst.ELEMENT_TYPE.YELLOW,
    [5] = BattleConst.ELEMENT_TYPE.GREEN,
    [6] = BattleConst.ELEMENT_TYPE.BLUE,
    [7] = BattleConst.ELEMENT_TYPE.PURPLE,
}

BattleConst.POS_ID_2_RC = {}
BattleConst.RC_2_POS_ID = {}

---- 格子位置
BattleConst.GRID_POS = {}

---- 每个格子外围一格距离的格子
BattleConst.GRID_OUT_LINE_POS_ID = {
    [11] = {[21] = true, [22] = true, [12] = true},
    [12] = {[21] = true, [22] = true, [23] = true, [11] = true, [13] = true},
    [13] = {[22] = true, [23] = true, [24] = true, [12] = true, [14] = true},
    [14] = {[23] = true, [24] = true, [25] = true, [13] = true, [15] = true},
    [15] = {[24] = true, [25] = true, [26] = true, [14] = true, [16] = true},
    [16] = {[25] = true, [26] = true, [27] = true, [15] = true, [17] = true},
    [17] = {[26] = true, [27] = true, [16] = true},
    [21] = {[31] = true, [32] = true, [22] = true, [11] = true, [12] = true},
    [22] = {[31] = true, [32] = true, [33] = true, [21] = true, [23] = true, [11] = true, [12] = true, [13] = true},
    [23] = {[32] = true, [33] = true, [34] = true, [22] = true, [24] = true, [12] = true, [13] = true, [14] = true},
    [24] = {[33] = true, [34] = true, [35] = true, [23] = true, [25] = true, [13] = true, [14] = true, [15] = true},
    [25] = {[34] = true, [35] = true, [36] = true, [24] = true, [26] = true, [14] = true, [15] = true, [16] = true},
    [26] = {[35] = true, [36] = true, [37] = true, [25] = true, [27] = true, [15] = true, [16] = true, [17] = true},
    [27] = {[36] = true, [37] = true, [26] = true, [16] = true, [17] = true},
    [31] = {[41] = true, [42] = true, [32] = true, [21] = true, [22] = true},
    [32] = {[41] = true, [42] = true, [43] = true, [31] = true, [33] = true, [21] = true, [22] = true, [23] = true},
    [33] = {[42] = true, [43] = true, [44] = true, [32] = true, [34] = true, [22] = true, [23] = true, [24] = true},
    [34] = {[43] = true, [44] = true, [45] = true, [33] = true, [35] = true, [23] = true, [24] = true, [25] = true},
    [35] = {[44] = true, [45] = true, [46] = true, [34] = true, [36] = true, [24] = true, [25] = true, [26] = true},
    [36] = {[45] = true, [46] = true, [47] = true, [35] = true, [37] = true, [25] = true, [26] = true, [27] = true},
    [37] = {[46] = true, [47] = true, [36] = true, [26] = true, [27] = true},
    [41] = {[51] = true, [52] = true, [42] = true, [31] = true, [32] = true},
    [42] = {[51] = true, [52] = true, [53] = true, [41] = true, [43] = true, [31] = true, [32] = true, [33] = true},
    [43] = {[52] = true, [53] = true, [54] = true, [42] = true, [44] = true, [32] = true, [33] = true, [34] = true},
    [44] = {[53] = true, [54] = true, [55] = true, [43] = true, [45] = true, [33] = true, [34] = true, [35] = true},
    [45] = {[54] = true, [55] = true, [56] = true, [44] = true, [46] = true, [34] = true, [35] = true, [36] = true},
    [46] = {[55] = true, [56] = true, [57] = true, [45] = true, [47] = true, [35] = true, [36] = true, [37] = true},
    [47] = {[56] = true, [57] = true, [46] = true, [36] = true, [37] = true},
    [51] = {[61] = true, [62] = true, [52] = true, [41] = true, [42] = true},
    [52] = {[61] = true, [62] = true, [63] = true, [51] = true, [53] = true, [41] = true, [42] = true, [43] = true},
    [53] = {[62] = true, [63] = true, [64] = true, [52] = true, [54] = true, [42] = true, [43] = true, [44] = true},
    [54] = {[63] = true, [64] = true, [65] = true, [53] = true, [55] = true, [43] = true, [44] = true, [45] = true},
    [55] = {[64] = true, [65] = true, [66] = true, [54] = true, [56] = true, [44] = true, [45] = true, [46] = true},
    [56] = {[65] = true, [66] = true, [67] = true, [55] = true, [57] = true, [45] = true, [46] = true, [47] = true},
    [57] = {[66] = true, [67] = true, [56] = true, [46] = true, [47] = true},
    [61] = {[71] = true, [72] = true, [62] = true, [51] = true, [52] = true},
    [62] = {[71] = true, [72] = true, [73] = true, [61] = true, [63] = true, [51] = true, [52] = true, [53] = true},
    [63] = {[72] = true, [73] = true, [74] = true, [62] = true, [64] = true, [52] = true, [53] = true, [54] = true},
    [64] = {[73] = true, [74] = true, [75] = true, [63] = true, [65] = true, [53] = true, [54] = true, [55] = true},
    [65] = {[74] = true, [75] = true, [76] = true, [64] = true, [66] = true, [54] = true, [55] = true, [56] = true},
    [66] = {[75] = true, [76] = true, [77] = true, [65] = true, [67] = true, [55] = true, [56] = true, [57] = true},
    [67] = {[76] = true, [77] = true, [66] = true, [56] = true, [57] = true},
    [71] = {[81] = true, [82] = true, [72] = true, [61] = true, [62] = true},
    [72] = {[81] = true, [82] = true, [83] = true, [71] = true, [73] = true, [61] = true, [62] = true, [63] = true},
    [73] = {[82] = true, [83] = true, [84] = true, [72] = true, [74] = true, [62] = true, [63] = true, [64] = true},
    [74] = {[83] = true, [84] = true, [85] = true, [73] = true, [75] = true, [63] = true, [64] = true, [65] = true},
    [75] = {[84] = true, [85] = true, [86] = true, [74] = true, [76] = true, [64] = true, [65] = true, [66] = true},
    [76] = {[85] = true, [86] = true, [87] = true, [75] = true, [77] = true, [65] = true, [66] = true, [67] = true},
    [77] = {[86] = true, [87] = true, [76] = true, [66] = true, [67] = true},
    [81] = {[91] = true, [92] = true, [82] = true, [71] = true, [72] = true},
    [82] = {[91] = true, [92] = true, [93] = true, [81] = true, [83] = true, [71] = true, [72] = true, [73] = true},
    [83] = {[92] = true, [93] = true, [94] = true, [82] = true, [84] = true, [72] = true, [73] = true, [74] = true},
    [84] = {[93] = true, [94] = true, [95] = true, [83] = true, [85] = true, [73] = true, [74] = true, [75] = true},
    [85] = {[94] = true, [95] = true, [96] = true, [84] = true, [86] = true, [74] = true, [75] = true, [76] = true},
    [86] = {[95] = true, [96] = true, [97] = true, [85] = true, [87] = true, [75] = true, [76] = true, [77] = true},
    [87] = {[96] = true, [97] = true, [86] = true, [76] = true, [77] = true},
    [91] = {[101] = true, [102] = true, [92] = true, [81] = true, [82] = true},
    [92] = {[101] = true, [102] = true, [103] = true, [91] = true, [93] = true, [81] = true, [82] = true, [83] = true},
    [93] = {[102] = true, [103] = true, [104] = true, [92] = true, [94] = true, [82] = true, [83] = true, [84] = true},
    [94] = {[103] = true, [104] = true, [105] = true, [93] = true, [95] = true, [83] = true, [84] = true, [85] = true},
    [95] = {[104] = true, [105] = true, [106] = true, [94] = true, [96] = true, [84] = true, [85] = true, [86] = true},
    [96] = {[105] = true, [106] = true, [107] = true, [95] = true, [97] = true, [85] = true, [86] = true, [87] = true},
    [97] = {[106] = true, [107] = true, [96] = true, [86] = true, [87] = true},
    [101] = {[102] = true, [91] = true, [92] = true},
    [102] = {[101] = true, [103] = true, [91] = true, [92] = true, [93] = true},
    [103] = {[102] = true, [104] = true, [92] = true, [93] = true, [94] = true},
    [104] = {[103] = true, [105] = true, [93] = true, [94] = true, [95] = true},
    [105] = {[104] = true, [106] = true, [94] = true, [95] = true, [96] = true},
    [106] = {[105] = true, [107] = true, [95] = true, [96] = true, [97] = true},
    [107] = {[106] = true, [96] = true, [97] = true},
}

BattleConst.UP_DOWN_LEFT_RIGHT = {
    [11] = {21, 12},
    [12] = {22, 11, 13},
    [13] = {23, 12, 14},
    [14] = {24, 13, 15},
    [15] = {25, 14, 16},
    [16] = {26, 15, 17},
    [17] = {27, 16, },
    [21] = {11, 31, 22},
    [22] = {12, 32, 21, 23},
    [23] = {13, 33, 22, 24},
    [24] = {14, 34, 23, 25},
    [25] = {15, 35, 24, 26},
    [26] = {16, 36, 25, 27},
    [27] = {17, 37, 26, },
    [31] = {21, 41, 32},
    [32] = {22, 42, 31, 33},
    [33] = {23, 43, 32, 34},
    [34] = {24, 44, 33, 35},
    [35] = {25, 45, 34, 36},
    [36] = {26, 46, 35, 37},
    [37] = {27, 47, 36, },
    [41] = {31, 51, 42},
    [42] = {32, 52, 41, 43},
    [43] = {33, 53, 42, 44},
    [44] = {34, 54, 43, 45},
    [45] = {35, 55, 44, 46},
    [46] = {36, 56, 45, 47},
    [47] = {37, 57, 46, },
    [51] = {41, 61, 52},
    [52] = {42, 62, 51, 53},
    [53] = {43, 63, 52, 54},
    [54] = {44, 64, 53, 55},
    [55] = {45, 65, 54, 56},
    [56] = {46, 66, 55, 57},
    [57] = {47, 67, 56, },
    [61] = {51, 71, 62},
    [62] = {52, 72, 61, 63},
    [63] = {53, 73, 62, 64},
    [64] = {54, 74, 63, 65},
    [65] = {55, 75, 64, 66},
    [66] = {56, 76, 65, 67},
    [67] = {57, 77, 66, },
    [71] = {61, 81, 72},
    [72] = {62, 82, 71, 73},
    [73] = {63, 83, 72, 74},
    [74] = {64, 84, 73, 75},
    [75] = {65, 85, 74, 76},
    [76] = {66, 86, 75, 77},
    [77] = {67, 87, 76, },
    [81] = {71, 91, 82},
    [82] = {72, 92, 81, 83},
    [83] = {73, 93, 82, 84},
    [84] = {74, 94, 83, 85},
    [85] = {75, 95, 84, 86},
    [86] = {76, 96, 85, 87},
    [87] = {77, 97, 86, },
    [91] = {81, 101, 92},
    [92] = {82, 102, 91, 93},
    [93] = {83, 103, 92, 94},
    [94] = {84, 104, 93, 95},
    [95] = {85, 105, 94, 96},
    [96] = {86, 106, 95, 97},
    [97] = {87, 107, 96, },
    [101] = {91, 102},
    [102] = {92, 101, 103},
    [103] = {93, 102, 104},
    [104] = {94, 103, 105},
    [105] = {95, 104, 106},
    [106] = {96, 105, 107},
    [107] = {97, 106, },
}


---- 上一排填充的顺序
BattleConst.UP_LINE_FILL_LIST = {
    [11] = {},
    [12] = {},
    [13] = {},
    [14] = {},
    [15] = {},
    [16] = {},
    [17] = {},
    [21] = {11, 12},
    [22] = {12, 11, 13},
    [23] = {13, 12, 14},
    [24] = {14, 13, 15},
    [25] = {15, 14, 16},
    [26] = {16, 15, 17},
    [27] = {17, 16},
    [31] = {21, 22},
    [32] = {22, 21, 23},
    [33] = {23, 22, 24},
    [34] = {24, 23, 25},
    [35] = {25, 24, 26},
    [36] = {26, 25, 27},
    [37] = {27, 26},
    [41] = {31, 32},
    [42] = {32, 31, 33},
    [43] = {33, 32, 34},
    [44] = {34, 33, 35},
    [45] = {35, 34, 36},
    [46] = {36, 35, 37},
    [47] = {37, 36},
    [51] = {41, 42},
    [52] = {42, 41, 43},
    [53] = {43, 42, 44},
    [54] = {44, 43, 45},
    [55] = {45, 44, 46},
    [56] = {46, 45, 47},
    [57] = {47, 46},
    [61] = {51, 52},
    [62] = {52, 51, 53},
    [63] = {53, 52, 54},
    [64] = {54, 53, 55},
    [65] = {55, 54, 56},
    [66] = {56, 55, 57},
    [67] = {57, 56},
    [71] = {61, 62},
    [72] = {62, 61, 63},
    [73] = {63, 62, 64},
    [74] = {64, 63, 65},
    [75] = {65, 64, 66},
    [76] = {66, 65, 67},
    [77] = {67, 66},
    [81] = {71, 72},
    [82] = {72, 71, 73},
    [83] = {73, 72, 74},
    [84] = {74, 73, 75},
    [85] = {75, 74, 76},
    [86] = {76, 75, 77},
    [87] = {77, 76},
    [91] = {81, 82},
    [92] = {82, 81, 83},
    [93] = {83, 82, 84},
    [94] = {84, 83, 85},
    [95] = {85, 84, 86},
    [96] = {86, 85, 87},
    [97] = {87, 86},
    [101] = {91, 92},
    [102] = {92, 91, 93},
    [103] = {93, 92, 94},
    [104] = {94, 93, 95},
    [105] = {95, 94, 96},
    [106] = {96, 95, 97},
    [107] = {97, 96},
}

---- 下一排填充的顺序
BattleConst.DOWN_LINE_FILL_LIST = {
    [11] = {21, 22},
    [12] = {22, 23, 21},
    [13] = {23, 24, 22},
    [14] = {24, 25, 23},
    [15] = {25, 26, 24},
    [16] = {26, 27, 25},
    [17] = {27, 26},
    [21] = {31, 32},
    [22] = {32, 33, 31},
    [23] = {33, 34, 32},
    [24] = {34, 35, 33},
    [25] = {35, 36, 34},
    [26] = {36, 37, 35},
    [27] = {37, 36},
    [31] = {41, 42},
    [32] = {42, 43, 41},
    [33] = {43, 44, 42},
    [34] = {44, 45, 43},
    [35] = {45, 46, 44},
    [36] = {46, 47, 45},
    [37] = {47, 46},
    [41] = {51, 52},
    [42] = {52, 53, 51},
    [43] = {53, 54, 52},
    [44] = {54, 55, 53},
    [45] = {55, 56, 54},
    [46] = {56, 57, 55},
    [47] = {57, 56},
    [51] = {61, 62},
    [52] = {62, 63, 61},
    [53] = {63, 64, 62},
    [54] = {64, 65, 63},
    [55] = {65, 66, 64},
    [56] = {66, 67, 65},
    [57] = {67, 66},
    [61] = {71, 72},
    [62] = {72, 73, 71},
    [63] = {73, 74, 72},
    [64] = {74, 75, 73},
    [65] = {75, 76, 74},
    [66] = {76, 77, 75},
    [67] = {77, 76},
    [71] = {81, 82},
    [72] = {82, 83, 81},
    [73] = {83, 84, 82},
    [74] = {84, 85, 83},
    [75] = {85, 86, 84},
    [76] = {86, 87, 85},
    [77] = {87, 86},
    [81] = {91, 92},
    [82] = {92, 93, 91},
    [83] = {93, 94, 92},
    [84] = {94, 95, 93},
    [85] = {95, 96, 94},
    [86] = {96, 97, 95},
    [87] = {97, 96},
    [91] = {101, 102},
    [92] = {102, 103, 101},
    [93] = {103, 104, 102},
    [94] = {104, 105, 103},
    [95] = {105, 106, 104},
    [96] = {106, 107, 105},
    [97] = {107, 106},
    [101] = {},
    [102] = {},
    [103] = {},
    [104] = {},
    [105] = {},
    [106] = {},
    [107] = {},
}

BattleConst.BOARD_RANGE_TYPE = {
    RANDOM = 0,
    UP = 1,
    DOWN = 2,
    LEFT = 3,
    RIGHT = 4,
    LEFT_UP = 5,
    LEFT_DOWN = 6,
    RIGHT_UP = 7,
    RIGHT_DOWN = 8,
}

BattleConst.SKILL_TYPE = {
    NORMAL = 0,
    ELIMINATION = 1,
    CHANGE_AROUND = 2,
    RELEASE_GRID_TYPE = 3,
    ELIMINATION_GRID_AND_ELEMENT = 4,
    CHANGE_ALL_ELEMENT_TYPE = 5,
    RANDOM_KILL_SKILL_GRID = 6,
    SHUFFLE_BOARD = 7,
    RANDOM_KILL_ROW_OR_COLUMN = 8,
    KILL_MAX_ELEMENT_AND_HEAL = 9,
    KILL_ROW_AND_COLUMN = 10,
    ADD_SKILL_ENERGY = 11,
    CHANGE_ELEMENT_TYPE = 12,
}

BattleConst.ATTACK_OVER_ACTIVE_SKILL_TYPE = {
    [BattleConst.SKILL_TYPE.RELEASE_GRID_TYPE] = true,
    [BattleConst.SKILL_TYPE.CHANGE_ALL_ELEMENT_TYPE] = true,
    [BattleConst.SKILL_TYPE.RANDOM_KILL_SKILL_GRID] = true,
    [BattleConst.SKILL_TYPE.SHUFFLE_BOARD] = true,
    [BattleConst.SKILL_TYPE.RANDOM_KILL_ROW_OR_COLUMN] = true,
    [BattleConst.SKILL_TYPE.KILL_MAX_ELEMENT_AND_HEAL] = true,
    [BattleConst.SKILL_TYPE.KILL_ROW_AND_COLUMN] = true,
    [BattleConst.SKILL_TYPE.ADD_SKILL_ENERGY] = true,
    [BattleConst.SKILL_TYPE.CHANGE_ELEMENT_TYPE] = true,
}

BattleConst.NO_EFFECT_GRID_SKILL_TYPE = {
    [BattleConst.SKILL_TYPE.CHANGE_AROUND] = true
}

BattleConst.SKILL_METHOD_TYPE = {
    ON_ENTER = 1,
    ON_FINAL = 2,
}

BattleConst.INSTRUCTION_NAME = {
    ADD_CUR_ROUND_ATTR = "add_cur_round_attr",
    ASSISTING = "assisting",
    GENERAL_ATTACK = "general_attack",
    PLAY_SKILL = "play_skill",
}

BattleConst.OUTLINE_SFX = {
    [BattleConst.ELEMENT_TYPE.RED] = "sfx_piece_qizi_b03",
    [BattleConst.ELEMENT_TYPE.YELLOW] = "sfx_piece_qizi_b02",
    [BattleConst.ELEMENT_TYPE.GREEN] = "sfx_piece_qizi_b04",
    [BattleConst.ELEMENT_TYPE.BLUE] = "sfx_piece_qizi_b05",
    [BattleConst.ELEMENT_TYPE.PURPLE] = "sfx_piece_qizi_b01",
    skill = "sfx_piece_qizi_b06",
}

BattleConst.SKILL_LIGHT_POINT_SFX = "assets/prefabs/effects/battle/sfx_skill_b05.prefab"
BattleConst.SKILL_LIGHT_LINE_SFX = "assets/prefabs/effects/battle/sfx_skill_b04.prefab"
BattleConst.LINE_SFX = "assets/prefabs/effects/battle/sfx_piece_line_b01.prefab"
BattleConst.CHANGE_ELEMENT_SFX = "assets/prefabs/effects/battle/sfx_skill_b02.prefab"
BattleConst.LINK_SMOKE = "assets/prefabs/effects/battle/sfx_piece_smoke_b01.prefab"
BattleConst.LINK_SMOKE = "assets/prefabs/effects/battle/sfx_piece_smoke_b01.prefab"
BattleConst.GRID_KILL_SFX = {
    [BattleConst.ELEMENT_TYPE.RED] = "assets/prefabs/effects/battle/sfx_piece_qizi_posui_b04.prefab",
    [BattleConst.ELEMENT_TYPE.YELLOW] = "assets/prefabs/effects/battle/sfx_piece_qizi_posui_b05.prefab",
    [BattleConst.ELEMENT_TYPE.GREEN] = "assets/prefabs/effects/battle/sfx_piece_qizi_posui_b02.prefab",
    [BattleConst.ELEMENT_TYPE.BLUE] = "assets/prefabs/effects/battle/sfx_piece_qizi_posui_b01.prefab",
    [BattleConst.ELEMENT_TYPE.PURPLE] = "assets/prefabs/effects/battle/sfx_piece_qizi_posui_b03.prefab",
    skill = "assets/prefabs/effects/battle/sfx_piece_skill_posui_b01.prefab",
    line = "assets/prefabs/effects/battle/sfx_piece_xiaochu_b01.prefab",
}

BattleConst.BATTLE_TASK_FIELD = {
    PASS_WAVE = "pass_wave",                      -- 通关波数 1
    KILL_BOSS = "kills_boss",                     -- boss击杀数量 2
    KILL_NORMAL_MONSTER = "kills_monster",        -- 击杀小怪数量 3
    ELIMINATION_COUNT = "clear_elements",         -- 累计消除元素个数 4
    LINK_COUNT_OVER_6 = "clear_6_combo",          -- 6连消个数 5
    LINK_COUNT_OVER_8 = "clear_8_combo",          -- 8连消个数 6
    COMBO_OVER_10 = "clear_10_hit",               -- 10连击以上次数 7
    BOARD_SKILL_RELEASE_COUNT = "skill_cast",     -- 释放技能次数 8
    SKILL_BOX_OPEN = "skill_box",                 -- 技能宝箱打开次数(神灯) 9
    KILLS_BOSS_TURN = "kills_boss_turn",          -- 多少回合击杀最终boss 10
    SPARE_HP = "spare_hp",                        -- 剩余血量百分比(100) 11
    TOTAL_TURN = "total_turn",                    -- 总回合数 12
}

return BattleConst