自愈、海洋护盾buff

This commit is contained in:
xiekaidong 2023-08-04 16:19:59 +08:00
parent 1620d69548
commit 82823526d9
12 changed files with 139 additions and 9 deletions

View File

@ -723,6 +723,29 @@ local buff = {
["stack"]=2,
["decr"]=1,
["icon"]="skill_hurt_add"
},
[82]={
["id"]=82,
["name"]="rebirth"
},
[83]={
["id"]=83,
["name"]="ocean_shield",
["buff_type"]=2,
["decr"]=3,
["icon"]="shield_ice",
["fx_continued"]={
24
}
},
[84]={
["id"]=84,
["name"]="self_heal",
["buff_type"]=6,
["stack"]=2,
["decr"]=1,
["formula"]=3,
["icon"]="shield_ice"
}
}
local keys = {
@ -807,12 +830,15 @@ local keys = {
["end_dmg_dec_all_add"]=buff[78],
["invincible_shield"]=buff[79],
["shield_ice_02"]=buff[80],
["skill_hurt_add_show"]=buff[81]
["skill_hurt_add_show"]=buff[81],
["rebirth"]=buff[82],
["ocean_shield"]=buff[83],
["self_heal"]=buff[84]
}
}
local config = {
data=buff,
keys=keys,
count=81
count=84
}
return config

View File

@ -5,7 +5,8 @@ local grid_type = {
[1]={
["icon"]="battle_hinder_1",
["cant_link"]=1,
["element_invalid"]=1
["element_invalid"]=1,
["cant_upset"]=1
},
[2]={
["icon"]="battle_obstacle_stone_2",
@ -17,6 +18,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_za_b01"
},
[3]={
@ -29,6 +31,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_za_b01"
},
[4]={
@ -39,6 +42,7 @@ local grid_type = {
3
},
["break_count"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_za_b03"
},
[5]={
@ -51,6 +55,7 @@ local grid_type = {
["break_count"]=1,
["break_stay_element"]=1,
["cant_link"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_za_b02"
},
[6]={
@ -69,6 +74,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_zhuqiantk_b01"
},
[8]={
@ -81,6 +87,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["effect"]=1,
["effect_sfx"]="sfx_piece_huojian_b01",
["sfx_flow"]=1,
@ -99,6 +106,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["effect"]=1,
["effect_sfx"]="sfx_piece_huojian_b01",
["sfx_flow"]=1,
@ -117,6 +125,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["effect"]=1,
["effect_sfx"]="sfx_piece_huojian_b01",
["sfx_flow"]=1,
@ -135,6 +144,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["effect"]=1,
["effect_sfx"]="sfx_piece_huojian_b01",
["sfx_flow"]=1,
@ -154,6 +164,7 @@ local grid_type = {
["break_stay_element"]=1,
["can_fall"]=1,
["cant_link"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_kucao_b01"
},
[13]={
@ -168,6 +179,7 @@ local grid_type = {
["can_fall"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_guodong_b01",
["effect"]=5,
["effect_sfx"]="sfx_piece_guodong_b02",
@ -186,6 +198,7 @@ local grid_type = {
["bftc_time"]=0.4,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_shendeng_b01",
["effect"]=3,
["effect_trigger"]=2
@ -207,6 +220,7 @@ local grid_type = {
["bftc_time"]=0.3,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_baoxiang_b01",
["effect"]=4,
["effect_trigger"]=2
@ -224,7 +238,8 @@ local grid_type = {
["spine_change"]="idle1_1",
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1
["element_invalid"]=1,
["cant_upset"]=1
},
[17]={
["icon"]="battle_obstacle_chest_1",
@ -239,7 +254,8 @@ local grid_type = {
["spine_change"]="idle1",
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1
["element_invalid"]=1,
["cant_upset"]=1
},
[18]={
["icon"]="battle_obstacle_stump_1",
@ -251,6 +267,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_muzhuang_b01"
},
[19]={
@ -263,6 +280,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_muzhuang_b01"
},
[20]={
@ -275,6 +293,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_muzhuang_b01"
},
[21]={
@ -289,6 +308,7 @@ local grid_type = {
["can_fall"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_shuipao_b01",
["effect"]=5,
["effect_sfx"]="sfx_piece_shuipao_b02",
@ -306,6 +326,7 @@ local grid_type = {
["can_fall"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_yuni_b01",
["effect"]=5,
["effect_sfx"]="sfx_piece_yuni_b02",
@ -323,6 +344,7 @@ local grid_type = {
["can_fall"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_duwu_b01",
["effect"]=5,
["effect_sfx"]="sfx_piece_duwu_b02",
@ -338,6 +360,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_jitang_b01"
},
[25]={
@ -350,6 +373,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_jitang_b01"
},
[26]={
@ -362,6 +386,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_jitang_b01"
},
[27]={
@ -372,6 +397,7 @@ local grid_type = {
3
},
["break_count"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_fazhen_b01"
},
[28]={
@ -384,6 +410,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_zhongrushi_b01"
},
[29]={
@ -396,6 +423,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_zhongrushi_b01"
},
[30]={
@ -408,6 +436,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_zhongrushi_b01"
},
[31]={
@ -420,6 +449,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_tiexie_b01"
},
[32]={
@ -432,6 +462,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_tiexie_b01"
},
[33]={
@ -444,6 +475,7 @@ local grid_type = {
["break_count"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_tiexie_b01"
},
[34]={
@ -458,6 +490,7 @@ local grid_type = {
["can_fall"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_rongyan_b01",
["effect"]=5,
["effect_sfx"]="sfx_piece_rongyan_b02",
@ -474,6 +507,7 @@ local grid_type = {
["break_stay_element"]=1,
["can_fall"]=1,
["cant_link"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_caocong_b01"
},
[36]={
@ -485,6 +519,7 @@ local grid_type = {
["can_fall"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_rongyan_b01",
["effect"]=6,
["effect_trigger"]=1
@ -498,6 +533,7 @@ local grid_type = {
["can_fall"]=1,
["cant_link"]=1,
["element_invalid"]=1,
["cant_upset"]=1,
["break_sfx"]="sfx_piece_duwu_b01",
["effect"]=6,
["effect_trigger"]=1

View File

@ -432,6 +432,7 @@ local LocalizationGlobalConst =
SKIN_GOT_TIPS = "SKIN_GOT_TIPS",
GOTO_COIN_STORE_DESC = "GOTO_COIN_STORE_DESC",
HERO_DESC_12 = "HERO_DESC_12",
SKIN_COLLECT = "SKIN_COLLECT",
}
return LocalizationGlobalConst

View File

@ -2242,7 +2242,7 @@ local skill = {
["eliminate_effect"]={
{
["type"]="dmg_addition_all_add",
["num"]=5000,
["num"]=2000,
["ratio"]=10000,
["round"]=1
}
@ -3478,7 +3478,7 @@ local skill = {
["eliminate_effect"]={
{
["type"]="dmg_addition_all_add",
["num"]=5000,
["num"]=2000,
["ratio"]=10000,
["round"]=1
}

View File

@ -31,6 +31,12 @@ local skin = {
},
[1400201]={
["qlt"]=3,
["bonus"]={
{
["type"]="attr_skill_hurt_red",
["num"]=1000
}
},
["got"]=2,
["skin_point"]=2,
["hero_id"]=14002,
@ -92,6 +98,12 @@ local skin = {
},
[3400101]={
["qlt"]=4,
["bonus"]={
{
["type"]="attr_crit_green",
["num"]=500
}
},
["got"]=1,
["skin_point"]=2,
["hero_id"]=34001,
@ -166,6 +178,12 @@ local skin = {
},
[5400101]={
["qlt"]=4,
["bonus"]={
{
["type"]="attr_crit_purple",
["num"]=500
}
},
["got"]=1,
["skin_point"]=2,
["hero_id"]=54001,

View File

@ -432,6 +432,7 @@ local localization_global =
["SKIN_GOT_TIPS"] = "解锁皮肤可领取",
["GOTO_COIN_STORE_DESC"] = "是否前往商城购买金币",
["HERO_DESC_12"] = "竞技场{0}解锁",
["SKIN_COLLECT"] = "皮肤收集",
}
return localization_global

View File

@ -341,6 +341,9 @@ local BUFF_NAME = {
INVINCIBLE_SHIELD = "invincible_shield",
SHIELD_ICE_02 = "shield_ice_02",
SKILL_HURT_ADD_SHOW = "skill_hurt_add_show",
REBIRTH = "rebirth",
OCEAN_SHIELD = "ocean_shield",
SELF_HEAL = "self_heal",
}
BattleConst.BUFF_NAME = BUFF_NAME
@ -444,6 +447,8 @@ local ATTR_NAME = {
ATTR_SKILL_HURTP_BLUE = "attr_skill_hurtp_blue",
ATTR_SKILL_HURTP_PURPLE = "attr_skill_hurtp_purple",
INVINCIBLE_SHIELD = "invincible_shield",
REBIRTH = "rebirth",
IMMUNE_REDUCTION_BENEFIT = "immune_reduction_benefit", -- 免疫减益
}
BattleConst.ATTR_NAME = ATTR_NAME

View File

@ -1504,6 +1504,10 @@ function BattleUnitComp:takeEffect(buff, target, conditionResult)
end
end
if buff:isDecreaseGain() and self.unitEntity:getIsImmuneReductionBenefit() then -- 有免疫减益属性
return false
end
if self:getIsFrozen() and buff:isIncreaseGain() then -- 冻结状态缓存增益buff
if buff:getRound() > 0 then
local buffEffect = BattleHelper:getBuffEffect()

View File

@ -159,6 +159,13 @@ BattleBuffHandle.addShield = {
target.unitEntity:addAttr(ATTR_NAME.SHIELD_REBOUND, 40000, false)
return shieldNum
end,
-- 海洋护盾
[BUFF_NAME.OCEAN_SHIELD] = function(unitComp, buff, target, buffEffect)
local shieldNum = target.unitEntity:getMaxHp() * buff:getEffectNum() // DEFAULT_FACTOR
target:addShield(shieldNum, buffEffect)
target.unitEntity:addAttr(ATTR_NAME.IMMUNE_REDUCTION_BENEFIT, 1, false)
return shieldNum
end,
}
BattleBuffHandle.removeShield = {
@ -166,14 +173,19 @@ BattleBuffHandle.removeShield = {
target.unitEntity:addAttr(ATTR_NAME.SHIELD_REBOUND, -20000, false)
target:removeShield(buffEffect)
end,
[BUFF_NAME.SHIELD_REBOUND_400] = function(unitComp, target, buff, buffEffect)
[BUFF_NAME.SHIELD_REBOUND_400] = function(buffSender, target, buff, buffEffect)
target.unitEntity:addAttr(ATTR_NAME.SHIELD_REBOUND, -40000, false)
target:removeShield(buffEffect)
end,
[BUFF_NAME.SHIELD_ICE_REBOUND_400] = function(unitComp, target, buff, buffEffect)
[BUFF_NAME.SHIELD_ICE_REBOUND_400] = function(buffSender, target, buff, buffEffect)
target.unitEntity:addAttr(ATTR_NAME.SHIELD_REBOUND, -40000, false)
target:removeShield(buffEffect)
end,
-- 海洋护盾
[BUFF_NAME.OCEAN_SHIELD] = function(buffSender, target, buff, buffEffect)
target:removeShield(buffEffect)
target.unitEntity:addAttr(ATTR_NAME.IMMUNE_REDUCTION_BENEFIT, -1, false)
end,
}
local function _takeEffectShield(unitComp, buff, target, buffEffect)

View File

@ -129,6 +129,23 @@ local function _invincibleShieldOff(buffSender, target, buff, buffEffect)
return 1
end
local function _rebirthOn(buffSender, buff, target, buffEffect)
local atk = target.unitEntity:getAtk()
target.unitEntity:setAttr(ATTR_NAME.REBIRTH, atk, false)
return 1
end
local function _rebirthOff(buffSender, buff, target, buffEffect)
-- 回血
local damage, hurtStatus = BattleFormula:getDamageOrCureResult(target, buff, target)
if damage <= 0 then
damage = 1
end
target:takeDamageOrCure(buffEffect.sender, damage, EFFECT_TYPE.HEAL, hurtStatus, buff:getName())
target.unitEntity:setAttr(ATTR_NAME.REBIRTH, 0)
return 1
end
local _handleOn = {
[BUFF_NAME.ADD_SKILL] = _addSkillOn, -- 添加技能
[BUFF_NAME.SKILL_FIRE_TIMES] = _skillFireTimesOn, -- 技能额外使用次数
@ -139,6 +156,7 @@ local _handleOn = {
[BUFF_NAME.LOCK] = _lockOn, -- 锁定
[BUFF_NAME.INVALID_CONTROL] = _invalidControlOn, -- 无控
[BUFF_NAME.INVINCIBLE_SHIELD] = _invincibleShieldOn, -- 层数护盾
[BUFF_NAME.REBIRTH] = _rebirthOn, -- 重生
}
local _handleOff = {
@ -151,6 +169,7 @@ local _handleOff = {
[BUFF_NAME.LOCK] = _lockOff, -- 锁定
[BUFF_NAME.INVALID_CONTROL] = _invalidControlOff, -- 无控
[BUFF_NAME.INVINCIBLE_SHIELD] = _invincibleShieldOff, -- 层数护盾
[BUFF_NAME.REBIRTH] = _rebirthOff, -- 重生
}
local _handleWork = {

View File

@ -96,6 +96,10 @@ function BattleBuffEntity:isIncreaseGain()
return self:getDecr() == BattleConst.BUFF_DECR_TYPE.INCREASE_GAIN
end
function BattleBuffEntity:isDecreaseGain()
return self:getDecr() == BattleConst.BUFF_DECR_TYPE.REDUCE_GAIN
end
function BattleBuffEntity:getIcon()
return self.buffInfo.icon
end

View File

@ -459,6 +459,10 @@ function BattleUnitEntity:getEndDmgDecAll()
return self:getAttrValue(GConst.BattleConst.ATTR_NAME.END_DMG_DEC_ALL)
end
function BattleUnitEntity:getIsImmuneReductionBenefit()
return self.team:getAttrValue(GConst.BattleConst.ATTR_NAME.IMMUNE_REDUCTION_BENEFIT) > 0
end
function BattleUnitEntity:getAttrValue(attr)
return self.team:getAttrValue(attr)
end