diff --git a/assets/bundles/first/config/Battlebuff.json b/assets/bundles/first/config/Battlebuff.json index cbb2b3b..216c060 100644 --- a/assets/bundles/first/config/Battlebuff.json +++ b/assets/bundles/first/config/Battlebuff.json @@ -538,8 +538,8 @@ "targetpar": "1,1,13", "functiontype": 101, "functionpar": 20000, - "functiontype1": 107, - "functionpar1": "2203|2303|2403|2503,3", + "functiontype1": 113, + "functionpar1": 3, "weight": 1, "price": 0 }, @@ -810,8 +810,8 @@ "targetpar": "1,1,13", "functiontype": 101, "functionpar": 20000, - "functiontype1": 107, - "functionpar1": "3101|3201|3301|3401|3501,3", + "functiontype1": 113, + "functionpar1": 3, "weight": 1, "price": 0 }, @@ -1130,8 +1130,8 @@ "targetpar": "1,1,13", "functiontype": 101, "functionpar": 20000, - "functiontype1": 107, - "functionpar1": "4202|4302|4402|4502,3", + "functiontype1": 113, + "functionpar1": 3, "weight": 1, "price": 0 }, @@ -1450,8 +1450,8 @@ "targetpar": "1,1,13", "functiontype": 101, "functionpar": 20000, - "functiontype1": 110, - "functionpar1": "5203|5303|5403|5503,3", + "functiontype1": 113, + "functionpar1": 3, "weight": 1, "price": 0 }, @@ -1738,8 +1738,8 @@ "targetpar": "1,7,13", "functiontype": 101, "functionpar": 20000, - "functiontype1": 107, - "functionpar1": "6203|6303|6403|6503,3", + "functiontype1": 113, + "functionpar1": 3, "weight": 1, "price": 0 }, diff --git a/assets/bundles/first/config/Skill.json b/assets/bundles/first/config/Skill.json index e30f1ae..2ed42bd 100644 --- a/assets/bundles/first/config/Skill.json +++ b/assets/bundles/first/config/Skill.json @@ -947,7 +947,7 @@ }, { "id": 210101, - "name": "", + "name": "飞剑1级", "desc": "每隔一定时间自动发射1道飞剑攻击(瞬发,无动作)", "icon": "", "type": 1, @@ -969,7 +969,7 @@ }, { "id": 220101, - "name": "", + "name": "飞剑2级", "desc": "每隔一定时间自动发射1道飞剑攻击(瞬发,无动作)", "icon": "", "type": 1, @@ -991,7 +991,7 @@ }, { "id": 220201, - "name": "", + "name": "剑气2级", "desc": "造成伤害概率发出1道剑气攻击", "icon": "", "type": 2, @@ -1013,7 +1013,7 @@ }, { "id": 220301, - "name": "", + "name": "剑阵2级", "desc": "造成伤害概率触发剑阵", "icon": "", "type": 2, @@ -1035,7 +1035,7 @@ }, { "id": 230101, - "name": "", + "name": "飞剑3级", "desc": "每隔一定时间自动发射2道飞剑攻击(瞬发,无动作,交错出现)", "icon": "", "type": 1, @@ -1057,7 +1057,7 @@ }, { "id": 230201, - "name": "", + "name": "剑气3级", "desc": "造成伤害概率发出2道剑气攻击", "icon": "", "type": 2, @@ -1079,7 +1079,7 @@ }, { "id": 230301, - "name": "", + "name": "剑阵3级", "desc": "造成伤害概率触发剑阵", "icon": "", "type": 2, @@ -1101,7 +1101,7 @@ }, { "id": 240101, - "name": "", + "name": "飞剑4级", "desc": "每隔一定时间自动发射3道飞剑攻击(瞬发,无动作,交错出现)", "icon": "", "type": 1, @@ -1123,7 +1123,7 @@ }, { "id": 240201, - "name": "", + "name": "剑气4级", "desc": "造成伤害概率发出2道剑气攻击", "icon": "", "type": 2, @@ -1145,7 +1145,7 @@ }, { "id": 240301, - "name": "", + "name": "剑阵4级", "desc": "造成伤害概率触发剑阵", "icon": "", "type": 2, @@ -1167,7 +1167,7 @@ }, { "id": 250101, - "name": "", + "name": "飞剑5级", "desc": "每隔一定时间自动发射4道飞剑攻击(瞬发,无动作,交错出现)", "icon": "", "type": 1, @@ -1189,7 +1189,7 @@ }, { "id": 250201, - "name": "", + "name": "剑气5级", "desc": "造成伤害概率发出2道剑气攻击", "icon": "", "type": 2, @@ -1211,7 +1211,7 @@ }, { "id": 250301, - "name": "", + "name": "剑阵5级", "desc": "造成伤害概率触发剑阵", "icon": "", "type": 2, @@ -1233,7 +1233,7 @@ }, { "id": 310101, - "name": "", + "name": "飞棍1级", "desc": "丢出旋转的飞棍,持续攻击(瞬发,无动作)", "icon": "", "type": 1, @@ -1255,7 +1255,7 @@ }, { "id": 320101, - "name": "", + "name": "飞棍2级", "desc": "丢出旋转的飞棍,持续攻击(瞬发,无动作)", "icon": "", "type": 1, @@ -1277,7 +1277,7 @@ }, { "id": 320201, - "name": "", + "name": "棍舞2级", "desc": "持续挥舞飞棍,持续造成伤害(悟空大招,动作需要循环,时间表格配置)", "icon": "", "type": 1, @@ -1299,7 +1299,7 @@ }, { "id": 320301, - "name": "", + "name": "狠击2级", "desc": "连续挥舞飞棍,砸击多个目标", "icon": "", "type": 1, @@ -1321,7 +1321,7 @@ }, { "id": 330101, - "name": "", + "name": "飞棍3级", "desc": "丢出旋转的飞棍,持续攻击(瞬发,无动作)", "icon": "", "type": 1, @@ -1343,7 +1343,7 @@ }, { "id": 330201, - "name": "", + "name": "棍舞3级", "desc": "持续旋转木棍,持续造成伤害", "icon": "", "type": 1, @@ -1365,7 +1365,7 @@ }, { "id": 330301, - "name": "", + "name": "狠击3级", "desc": "连续挥舞飞棍,砸击多个目标", "icon": "", "type": 1, @@ -1387,7 +1387,7 @@ }, { "id": 340101, - "name": "", + "name": "飞棍4级", "desc": "丢出旋转的飞棍,持续攻击(瞬发,无动作)", "icon": "", "type": 1, @@ -1409,7 +1409,7 @@ }, { "id": 340201, - "name": "", + "name": "棍舞4级", "desc": "持续旋转木棍,持续造成伤害", "icon": "", "type": 1, @@ -1431,7 +1431,7 @@ }, { "id": 340301, - "name": "", + "name": "狠击4级", "desc": "连续挥舞飞棍,砸击多个目标", "icon": "", "type": 1, @@ -1453,7 +1453,7 @@ }, { "id": 350101, - "name": "", + "name": "飞棍5级", "desc": "丢出旋转的飞棍,持续攻击(瞬发,无动作)", "icon": "", "type": 1, @@ -1475,7 +1475,7 @@ }, { "id": 350201, - "name": "", + "name": "棍舞5级", "desc": "持续旋转木棍,持续造成伤害", "icon": "", "type": 1, @@ -1497,7 +1497,7 @@ }, { "id": 350301, - "name": "", + "name": "狠击5级", "desc": "连续挥舞飞棍,砸击多个目标", "icon": "", "type": 1, @@ -1519,7 +1519,7 @@ }, { "id": 410101, - "name": "", + "name": "冰锥1级", "desc": "额外发射1枚冰锥,概率冰冻目标(瞬发,无动作)", "icon": "", "type": 1, @@ -1541,7 +1541,7 @@ }, { "id": 420101, - "name": "", + "name": "冰锥2级", "desc": "额外发射2枚冰锥,概率冰冻目标(瞬发,最大发射2枚,根据范围内怪物数量,无动作)", "icon": "", "type": 1, @@ -1563,7 +1563,7 @@ }, { "id": 420201, - "name": "", + "name": "暴风雪2级", "desc": "释放暴风雪,对区域目标造成伤害并减速(参考war3,人族大法师的暴风雪技能)", "icon": "", "type": 1, @@ -1585,7 +1585,7 @@ }, { "id": 420301, - "name": "", + "name": "分裂弹2级", "desc": "水球命中目标后,额外分裂2道冰锥(根据范围内怪物数量)", "icon": "", "type": 2, @@ -1607,7 +1607,7 @@ }, { "id": 430101, - "name": "", + "name": "冰锥3级", "desc": "额外发射3枚冰锥,概率冰冻目标", "icon": "", "type": 1, @@ -1629,7 +1629,7 @@ }, { "id": 430201, - "name": "", + "name": "暴风雪3级", "desc": "释放暴风雪,对区域目标造成伤害并减速", "icon": "", "type": 1, @@ -1651,7 +1651,7 @@ }, { "id": 430301, - "name": "", + "name": "分裂弹3级", "desc": "水球命中目标后,额外分裂3道冰锥(根据范围内怪物数量)", "icon": "", "type": 2, @@ -1673,7 +1673,7 @@ }, { "id": 440101, - "name": "", + "name": "冰锥4级", "desc": "额外发射4枚冰锥,概率冰冻目标", "icon": "", "type": 1, @@ -1695,7 +1695,7 @@ }, { "id": 440201, - "name": "", + "name": "暴风雪4级", "desc": "释放暴风雪,对区域目标造成伤害并减速", "icon": "", "type": 1, @@ -1717,7 +1717,7 @@ }, { "id": 440301, - "name": "", + "name": "分裂弹4级", "desc": "水球命中目标后,额外分裂4道冰锥(根据范围内怪物数量)", "icon": "", "type": 2, @@ -1739,7 +1739,7 @@ }, { "id": 450101, - "name": "", + "name": "冰锥5级", "desc": "额外发射5枚冰锥,概率冰冻目标", "icon": "", "type": 1, @@ -1761,7 +1761,7 @@ }, { "id": 450201, - "name": "", + "name": "暴风雪5级", "desc": "释放暴风雪,对区域目标造成伤害并减速", "icon": "", "type": 1, @@ -1783,7 +1783,7 @@ }, { "id": 450301, - "name": "", + "name": "分裂弹5级", "desc": "水球命中目标后,额外分裂5道冰锥(根据范围内怪物数量)", "icon": "", "type": 2, @@ -1805,7 +1805,7 @@ }, { "id": 510101, - "name": "", + "name": "燃烧1级", "desc": "造成伤害后点燃目标", "icon": "", "type": 2, @@ -1827,7 +1827,7 @@ }, { "id": 520101, - "name": "", + "name": "燃烧2级", "desc": "造成伤害小范围爆炸,点燃目标", "icon": "", "type": 2, @@ -1849,7 +1849,7 @@ }, { "id": 520201, - "name": "", + "name": "火龙击2级", "desc": "造成伤害概率召唤火龙攻击", "icon": "", "type": 2, @@ -1871,7 +1871,7 @@ }, { "id": 520301, - "name": "", + "name": "箭雨2级", "desc": "发射多道箭矢,概率眩晕或击退(王母大招)", "icon": "", "type": 1, @@ -1893,7 +1893,7 @@ }, { "id": 530101, - "name": "", + "name": "燃烧3级", "desc": "造成伤害小范围爆炸,点燃目标", "icon": "", "type": 2, @@ -1915,7 +1915,7 @@ }, { "id": 530201, - "name": "", + "name": "火龙击3级", "desc": "造成伤害概率召唤火龙攻击", "icon": "", "type": 2, @@ -1937,7 +1937,7 @@ }, { "id": 530301, - "name": "", + "name": "箭雨3级", "desc": "发射多道箭矢,概率眩晕或击退", "icon": "", "type": 1, @@ -1959,7 +1959,7 @@ }, { "id": 540101, - "name": "", + "name": "燃烧4级", "desc": "造成伤害范围爆炸,点燃目标", "icon": "", "type": 2, @@ -1981,7 +1981,7 @@ }, { "id": 540201, - "name": "", + "name": "火龙击4级", "desc": "造成伤害概率召唤火龙攻击", "icon": "", "type": 2, @@ -2003,7 +2003,7 @@ }, { "id": 540301, - "name": "", + "name": "箭雨4级", "desc": "发射多道箭矢,概率眩晕或击退", "icon": "", "type": 1, @@ -2025,7 +2025,7 @@ }, { "id": 550101, - "name": "", + "name": "燃烧5级", "desc": "造成伤害范围爆炸,点燃目标", "icon": "", "type": 2, @@ -2047,7 +2047,7 @@ }, { "id": 550201, - "name": "", + "name": "火龙击5级", "desc": "造成伤害概率召唤火龙攻击", "icon": "", "type": 2, @@ -2069,7 +2069,7 @@ }, { "id": 550301, - "name": "", + "name": "箭雨5级", "desc": "发射多道箭矢,概率眩晕或击退", "icon": "", "type": 1, @@ -2091,7 +2091,7 @@ }, { "id": 610101, - "name": "", + "name": "增幅1级", "desc": "攻击距离+1,伤害增加(伤害加值在武器表里配置)", "icon": "", "type": 2, @@ -2113,7 +2113,7 @@ }, { "id": 620101, - "name": "", + "name": "增幅2级", "desc": "攻击距离+1,伤害增加(伤害加值在武器表里配置)", "icon": "", "type": 2, @@ -2135,7 +2135,7 @@ }, { "id": 620201, - "name": "", + "name": "冲锋2级", "desc": "扔出长枪,冲锋攻击(参考哪吒技能,但不需要占用单位输出时间,飞枪飞出后独立)", "icon": "", "type": 1, @@ -2157,7 +2157,7 @@ }, { "id": 620301, - "name": "", + "name": "土刺2级", "desc": "击杀怪物,额外发射2道土刺(哪吒火尖枪效果,爆炸火球特效调整为土刺)", "icon": "", "type": 2, @@ -2179,7 +2179,7 @@ }, { "id": 630101, - "name": "", + "name": "增幅3级", "desc": "攻击距离+1,伤害增加", "icon": "", "type": 2, @@ -2201,7 +2201,7 @@ }, { "id": 630201, - "name": "", + "name": "冲锋3级", "desc": "扔出长枪,冲锋攻击", "icon": "", "type": 1, @@ -2223,7 +2223,7 @@ }, { "id": 630301, - "name": "", + "name": "土刺3级", "desc": "击杀怪物,额外发射3道土刺", "icon": "", "type": 2, @@ -2245,7 +2245,7 @@ }, { "id": 640101, - "name": "", + "name": "增幅4级", "desc": "攻击距离+1,伤害增加(伤害加值在武器表里配置)", "icon": "", "type": 2, @@ -2267,7 +2267,7 @@ }, { "id": 640201, - "name": "", + "name": "冲锋4级", "desc": "扔出长枪,冲锋攻击", "icon": "", "type": 1, @@ -2289,7 +2289,7 @@ }, { "id": 640301, - "name": "", + "name": "土刺4级", "desc": "击杀怪物,额外发射4道土刺", "icon": "", "type": 2, @@ -2311,7 +2311,7 @@ }, { "id": 650101, - "name": "", + "name": "增幅5级", "desc": "攻击距离+1,伤害增加(伤害加值在武器表里配置)", "icon": "", "type": 2, @@ -2333,7 +2333,7 @@ }, { "id": 650201, - "name": "", + "name": "冲锋5级", "desc": "扔出长枪,冲锋攻击", "icon": "", "type": 1, @@ -2355,7 +2355,7 @@ }, { "id": 650301, - "name": "", + "name": "土刺5级", "desc": "击杀怪物,额外发射8道土刺", "icon": "", "type": 2, diff --git a/assets/script/battle/combat/BattleBuffDamageHook.ts b/assets/script/battle/combat/BattleBuffDamageHook.ts index 308f252..f1ae776 100644 --- a/assets/script/battle/combat/BattleBuffDamageHook.ts +++ b/assets/script/battle/combat/BattleBuffDamageHook.ts @@ -31,7 +31,7 @@ function listHasSkill(ids: readonly number[], skillId: number): boolean { } /** - * 局内数字 buff + 被动 condition7/8 result21 伤害预调。 + * 局内数字 buff(含 107/113 技能倍率)+ 被动 condition7/8 result21 伤害预调。 */ export class BattleBuffDamageHook { /** 注册到 DamagePipeline */ diff --git a/assets/script/battle/combat/BattleBuffDigitStatHost.ts b/assets/script/battle/combat/BattleBuffDigitStatHost.ts index 4c6b45a..45d79f4 100644 --- a/assets/script/battle/combat/BattleBuffDigitStatHost.ts +++ b/assets/script/battle/combat/BattleBuffDigitStatHost.ts @@ -23,7 +23,7 @@ const DIGIT_STAT_SOURCE = 'battle_buff_digit_'; /** 单塔战斗侧额外效果(105+) */ export interface DigitCombatFlags { - /** 107:技能伤害倍数 */ + /** 107/113:技能伤害倍数(113 为 Hero.skill_id) */ skillMuls: { skillIds: number[]; mul: number }[]; /** 110:技能必暴(convert=暴击率转爆伤) */ forceCritSkills: { skillIds: number[]; convert: boolean }[]; @@ -60,7 +60,7 @@ interface DigitUnitSnap { } /** - * 局内 functiontype 101~112:按 target/targetpar 给数字塔属性/技能/战斗标记。 + * 局内 functiontype 101~113:按 target/targetpar 给数字塔属性/技能/战斗标记。 */ export class BattleBuffDigitStatHost { private _battle: DigitStatBattleRef | null = null; @@ -220,6 +220,7 @@ export class BattleBuffDigitStatHost { } const grantSkills: number[] = []; const flags = this._emptyFlags(); + const defaultSkillId = Math.floor(Number(hero.skill_id) || 0); const passives = BattleBuffCarryStore.getPassives(pid); for (let i = 0; i < passives.length; i++) { const row = passives[i].row as ITableBattlebuff | undefined; @@ -227,8 +228,8 @@ export class BattleBuffDigitStatHost { if (!BattleBuffTargetParse.matches(row.target, row.targetpar, heroType, level, rank)) continue; const ft = Math.floor(Number(row.functiontype) || 0); const ft1 = Math.floor(Number(row.functiontype1) || 0); - this._applyPrimary(session, entityId, row, ft, i, grantSkills, flags); - this._applySecondary(row, ft1, flags); + this._applyPrimary(session, entityId, row, ft, i, grantSkills, flags, defaultSkillId); + this._applySecondary(row, ft1, flags, defaultSkillId); } this._setFlags(entityId, flags); getPassiveSkillHost().syncBuffSkills(session, entityId, grantSkills); @@ -242,6 +243,7 @@ export class BattleBuffDigitStatHost { index: number, grantSkills: number[], flags: DigitCombatFlags, + defaultSkillId: number, ): void { const source = `${DIGIT_STAT_SOURCE}${row.id}_${index}`; const nums = parseFunctionParNums(row.functionpar); @@ -320,11 +322,25 @@ export class BattleBuffDigitStatHost { return; } flags.skillMuls.push({ skillIds: this._expandWeaponSkillIds(parsed.skillIds), mul: parsed.mul }); + return; + } + if (ft === BattleBuffFunctionType.DigitDefaultSkillDmgMul) { + this._pushDefaultSkillMul(row, row.functionpar, flags, defaultSkillId); } } - private _applySecondary(row: ITableBattlebuff, ft1: number, flags: DigitCombatFlags): void { + /** + * @param row Battlebuff 行 + * @param ft1 functiontype1 + * @param flags 塔战斗标记 + * @param defaultSkillId 该数字 Hero.skill_id + */ + private _applySecondary(row: ITableBattlebuff, ft1: number, flags: DigitCombatFlags, defaultSkillId: number): void { if (!(ft1 > 0)) return; + if (ft1 === BattleBuffFunctionType.DigitDefaultSkillDmgMul) { + this._pushDefaultSkillMul(row, row.functionpar1, flags, defaultSkillId); + return; + } const parsed = parseBattleBuffSkillListMul(row.functionpar1); if (!parsed) { console.warn('[BattleBuffDigitStat] functiontype1 参数无效', row.id, ft1, row.functionpar1); @@ -342,6 +358,32 @@ export class BattleBuffDigitStatHost { console.warn('[BattleBuffDigitStat] 未知 functiontype1', row.id, ft1); } + /** + * 113:对锁定数字的 Hero.skill_id 技能施加伤害倍数。 + * @param row Battlebuff 行 + * @param raw functionpar / functionpar1(倍数) + * @param flags 塔战斗标记 + * @param defaultSkillId Hero.skill_id + */ + private _pushDefaultSkillMul( + row: ITableBattlebuff, + raw: string | number | null | undefined, + flags: DigitCombatFlags, + defaultSkillId: number, + ): void { + const nums = parseFunctionParNums(raw); + const mul = nums.length > 0 ? Math.floor(nums[0]) : 0; + if (!(mul > 0)) { + console.warn('[BattleBuffDigitStat] ft113 倍数无效', row.id, raw); + return; + } + if (!(defaultSkillId > 0)) { + console.warn('[BattleBuffDigitStat] ft113 目标数字无 skill_id', row.id); + return; + } + flags.skillMuls.push({ skillIds: [defaultSkillId], mul }); + } + /** * Weapon.id 列表展开为 act_skill(Skill.id),便于伤害管线按 Ability 匹配。 * @param weaponIds Weapon.id @@ -446,7 +488,8 @@ export class BattleBuffDigitStatHost { || ft === BattleBuffFunctionType.DigitChanceMulDmg || ft === BattleBuffFunctionType.DigitCondForceCrit || ft === BattleBuffFunctionType.DigitSkillDmgMul - || ft === BattleBuffFunctionType.DigitSkillForceCrit; + || ft === BattleBuffFunctionType.DigitSkillForceCrit + || ft === BattleBuffFunctionType.DigitDefaultSkillDmgMul; } private _resolveElementType(weapon1Id: number, hero: ITableHero): number { diff --git a/assets/script/manager/battleBuff/BattleBuffTypes.ts b/assets/script/manager/battleBuff/BattleBuffTypes.ts index fce3e07..926740c 100644 --- a/assets/script/manager/battleBuff/BattleBuffTypes.ts +++ b/assets/script/manager/battleBuff/BattleBuffTypes.ts @@ -68,6 +68,8 @@ export enum BattleBuffFunctionType { DigitChanceMulDmg = 111, /** 条件必暴(毒/减速/霸王气,见 target 五行) */ DigitCondForceCrit = 112, + /** 锁定数字默认 skill_id 技能伤害×N(多用 functiontype1;par=倍数) */ + DigitDefaultSkillDmgMul = 113, } /** 携带即生效、不走局内 CD 遮罩的 functiontype */ @@ -96,6 +98,7 @@ const PASSIVE_NO_BATTLE_CD_FUNCTION_TYPES: readonly BattleBuffFunctionType[] = [ BattleBuffFunctionType.DigitExtraArrow, BattleBuffFunctionType.DigitChanceMulDmg, BattleBuffFunctionType.DigitCondForceCrit, + BattleBuffFunctionType.DigitDefaultSkillDmgMul, ]; /** diff --git a/docs/方案-Battlebuff扩展105-112.md b/docs/方案-Battlebuff扩展105-112.md index 0d79605..7081d70 100644 --- a/docs/方案-Battlebuff扩展105-112.md +++ b/docs/方案-Battlebuff扩展105-112.md @@ -15,8 +15,9 @@ | 110 | 指定技能必暴+暴击转爆伤(多用 `functiontype1`) | `WeaponId\|…,倍数(占位)` | | 111 | 概率多倍伤害 | `概率万分比,倍数` | | 112 | 条件必暴 | 空;按 `target` 五行:木=毒/水=减速/火=霸王气 | +| 113 | 锁定数字默认 `Hero.skill_id` 技能伤害×N(多用 `functiontype1`) | 倍数(如 `3`) | -双槽:`functiontype` + `functiontype1` / `functionpar1`。橙品质增幅多为 `101` + `107|110`。 +双槽:`functiontype` + `functiontype1` / `functionpar1`。橙品质增幅多为 `101` + `107|110|113`。 `targetpar` 类型2:场上同五行等级最高的 N 个(`2,N`)。 @@ -45,8 +46,8 @@ ## 3. 代码入口 -- `BattleBuffDigitStatHost`:101–112 刷新、挂 Skill、战斗标记 -- `BattleBuffDamageHook`:107/110/111/112 伤害预调 +- `BattleBuffDigitStatHost`:101–113 刷新、挂 Skill、战斗标记 +- `BattleBuffDamageHook`:107/110/111/112/113 伤害预调(113 写入 skillMuls) - `PassiveSkillHost.syncBuffSkills`:ft=105 - `Skill` / `Gong`:108 穿透、109 额外箭