fix(hero): 调整英雄技能配置与调试模式
1. 全局替换proc_skill技能结构为timed_buff相关配置 2. 修正技能参数数值与日志打印格式 3. 调整SCastSystem与CHeroComp的调试模式开关
This commit is contained in:
@@ -544,7 +544,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
5001: {
|
||||
uuid: 5001, name: "叠甲骑士", path: "hk1", fac: FacSet.HERO, rarity: 1, lv: 1, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, hp: HERO_ROLE_BASE[HRole.Tank].hp + 20, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def + 10,
|
||||
skills: {
|
||||
6004: { uuid: 6004, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: {"ap":100,"proc_skill":{"s_uuid":6001,"chance":100,"overrides":{"crt":100}}}, desc: "挥剑对{target}造成攻击力{ap}%伤害",
|
||||
6004: { uuid: 6004, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: {"ap":100,"timed_buff_id":7010,"buff_chance":50}, desc: "挥剑对{target}造成攻击力{ap}%伤害",
|
||||
lv_entries: [
|
||||
{ lv: 2, s_lv: SkillLv.Lv2, overrides: {"ap":120}, desc: "普通攻击造成 120% 攻击伤害" },
|
||||
],
|
||||
@@ -651,8 +651,8 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
},
|
||||
6103: { uuid: 6103, name: "闪电斩", lv: 1, cd: 8, ccd: 0, overrides: {"ap":150}, desc: "高速斩击{target},造成攻击力{ap}%伤害",
|
||||
lv_entries: [
|
||||
{ lv: 8, s_lv: SkillLv.Lv2, overrides: {"ap":250,"timed_buff_id":7007}, desc: "高速斩击{target},造成攻击力{ap}%,并使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" },
|
||||
{ lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":350,"para":50,"timed_buff_id":7007,"buff_value":60}, desc: "高速斩击{target},造成攻击力{ap}%,附带 50% 概率麻痹,并使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" },
|
||||
{ lv: 8, s_lv: SkillLv.Lv2, overrides: {"ap":250,"timed_buff_id":7007,"buff_value":40}, desc: "高速斩击{target},造成攻击力{ap}%,并使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" },
|
||||
{ lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":350,"timed_buff_id":7007,"buff_value":60}, desc: "高速斩击{target},造成攻击力{ap}%,附带 50% 概率麻痹,并使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" },
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -846,7 +846,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
skills: {
|
||||
6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Normal].cd, ccd: 0,
|
||||
lv_entries: [
|
||||
{ lv: 2, s_lv: SkillLv.Lv2, overrides: {"proc_skill":{"s_uuid":6503,"chance":20,"overrides":{"buff_value":20}}} },
|
||||
{ lv: 2, s_lv: SkillLv.Lv2, overrides: {"timed_buff_id":7029,"buff_value":10,"buff_chance":20} },
|
||||
],
|
||||
},
|
||||
6515: { uuid: 6515, name: "荆棘护盾", lv: 1, cd: 8, ccd: 0, overrides: {"buff_value":20,"TGroup": TGroup.Ally,"hit_count":3,"buff_duration":5},
|
||||
@@ -872,7 +872,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
skills: {
|
||||
6004: { uuid: 6004, name: "普攻强化", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Normal].cd, ccd: 0,
|
||||
lv_entries: [
|
||||
{ lv: 2, s_lv: SkillLv.Lv2, overrides: {"proc_skill":{"s_uuid":6518,"chance":20,"overrides":{"buff_value":30}}} },
|
||||
{ lv: 2, s_lv: SkillLv.Lv2, overrides: {"timed_buff_id":7030,"buff_value":10,"buff_chance":20} },
|
||||
],
|
||||
},
|
||||
6100: { uuid: 6100, name: "寒冰斩", lv: 1, cd: 8, ccd: 0, overrides: {"ap":200,"timed_buff_id":7030,"buff_value":50},
|
||||
|
||||
@@ -33,7 +33,7 @@ import { BuffList } from "../common/config/BuffSet";
|
||||
@ecs.register('SCastSystem')
|
||||
export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate {
|
||||
static instance: SCastSystem | null = null;
|
||||
debugMode: boolean = false; // 是否启用调试模式
|
||||
debugMode: boolean = true; // 是否启用调试模式
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@@ -147,7 +147,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
}
|
||||
}
|
||||
|
||||
mLogger.log(this.debugMode, "SCastSystem", "forceCastCardSkill: casting skill", s_uuid, "castTimes", castTimes, "targetPos", targetPos, "isFriendly", isFriendly, "buff_value", config.buff_value, "timed_buff_id", config.timed_buff_id);
|
||||
mLogger.log(this.debugMode, "SCastSystem", `[卡牌施法] 释放技能「${config.name}」(s_uuid:${s_uuid}) rarity:${rarity} castTimes:${castTimes} targetPos:${targetPos ? `(${targetPos.x.toFixed(0)},${targetPos.y.toFixed(0)})` : "none"} isFriendly:${isFriendly}`);
|
||||
for (let i = 0; i < castTimes; i++) {
|
||||
// 多发/召唤按间隔错峰执行:i=0 立即,其余延迟 i*SUMMON_INTERVAL(卡牌无施法主体,用 setTimeout 并在回调内做效期校验)
|
||||
const exec = () => {
|
||||
@@ -322,9 +322,10 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
const castTimes = Math.max(summonCount, 1 + cNum);
|
||||
let val = ""
|
||||
if (castTimes > 1) {
|
||||
val = "*" + castTimes.toString
|
||||
val = "*" + castTimes.toString()
|
||||
}
|
||||
heroView.skill_name(val, s_uuid)
|
||||
mLogger.log(this.debugMode, "SCastSystem", `[触发施法] ${heroAttrs.hero_name}(uuid:${heroAttrs.hero_uuid}) 触发类型:${triggerType ?? "none"} 释放技能「${config.name}」(s_uuid:${s_uuid}) lv:${skillLv} ${isFriendly ? "友方" : "对敌"} castTimes:${castTimes}`);
|
||||
for (let i = 0; i < castTimes; i++) {
|
||||
if (!heroView.node || !heroView.node.isValid) return;
|
||||
// 多发/召唤按间隔错峰执行:i=0 立即,其余延迟 i*SUMMON_INTERVAL
|
||||
@@ -396,11 +397,14 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
|
||||
config = mergeSkillParams(config, overrides);
|
||||
|
||||
// 召唤数量由技能 prefab 的 SkillView.summon_count 决定;召唤类技能(>1)默认不再触发风怒
|
||||
// 召唤数量由技能 prefab 的 SkillView.summon_count 决定;召唤类技能(summon_count>1)不再触发风怒
|
||||
const summonCount = this.resolveSummonCount(config);
|
||||
const isSummonSkill = summonCount > 1;
|
||||
// 多发次数由 overrides.num 提供(技能卡差异化多发),限制在 [0, 2];召唤类技能屏蔽风怒多发
|
||||
const cNum = isSummonSkill ? 0 : Math.min(2, Math.max(0, Math.floor(overrides?.num ?? 0)));
|
||||
const castTimes = Math.max(summonCount, 1 + cNum);
|
||||
|
||||
mLogger.log(this.debugMode, "SCastSystem", `[施法] ${heroAttrs.hero_name}(uuid:${heroAttrs.hero_uuid}) 释放技能「${config.name}」(s_uuid:${s_uuid}) lv:${skillLv} ${castPlan.isFriendly ? "友方" : "对敌"} castTimes:${castTimes}`);
|
||||
|
||||
//播放前摇技能动画
|
||||
heroView.playReady(config.readyAnm);
|
||||
@@ -424,7 +428,6 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
heroView.scheduleOnce(() => {
|
||||
if (!smc.mission.play || smc.mission.pause || !smc.mission.in_fight) return;
|
||||
if (!heroView.node || !heroView.node.isValid || heroAttrs.is_dead) return;
|
||||
const castTimes = Math.max(summonCount, 1 + cNum);
|
||||
for (let i = 0; i < castTimes; i++) {
|
||||
// 多发/召唤按间隔错峰执行:i=0 立即,其余延迟 i*SUMMON_INTERVAL
|
||||
heroView.scheduleOnce(() => {
|
||||
|
||||
@@ -37,7 +37,7 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('CHeroComp')
|
||||
@ecs.register('CHeroComp', false)
|
||||
export class CHeroComp extends CCComp {
|
||||
private debugMode: boolean = true;
|
||||
private debugMode: boolean = false;
|
||||
|
||||
// ======================== 编辑器绑定节点 ========================
|
||||
|
||||
|
||||
@@ -24,13 +24,8 @@
|
||||
"cdExpr": "AtkSpeedSet[AtkSpeedLv.Slow].cd",
|
||||
"overrides": {
|
||||
"ap": 100,
|
||||
"proc_skill": {
|
||||
"s_uuid": 6001,
|
||||
"chance": 100,
|
||||
"overrides": {
|
||||
"crt": 100
|
||||
}
|
||||
}
|
||||
"timed_buff_id": 7010,
|
||||
"buff_chance": 50
|
||||
},
|
||||
"desc": "挥剑对{target}造成攻击力{ap}%伤害",
|
||||
"lv_entries": [
|
||||
@@ -462,7 +457,8 @@
|
||||
"s_lv": 2,
|
||||
"overrides": {
|
||||
"ap": 250,
|
||||
"timed_buff_id": 7007
|
||||
"timed_buff_id": 7007,
|
||||
"buff_value": 40
|
||||
},
|
||||
"desc": "高速斩击{target},造成攻击力{ap}%,并使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)"
|
||||
},
|
||||
@@ -471,7 +467,6 @@
|
||||
"s_lv": 3,
|
||||
"overrides": {
|
||||
"ap": 350,
|
||||
"para": 50,
|
||||
"timed_buff_id": 7007,
|
||||
"buff_value": 60
|
||||
},
|
||||
@@ -1271,13 +1266,9 @@
|
||||
"lv": 2,
|
||||
"s_lv": 2,
|
||||
"overrides": {
|
||||
"proc_skill": {
|
||||
"s_uuid": 6503,
|
||||
"chance": 20,
|
||||
"overrides": {
|
||||
"buff_value": 20
|
||||
}
|
||||
}
|
||||
"timed_buff_id": 7029,
|
||||
"buff_value": 10,
|
||||
"buff_chance": 20
|
||||
},
|
||||
"desc": ""
|
||||
}
|
||||
@@ -1382,13 +1373,9 @@
|
||||
"lv": 2,
|
||||
"s_lv": 2,
|
||||
"overrides": {
|
||||
"proc_skill": {
|
||||
"s_uuid": 6518,
|
||||
"chance": 20,
|
||||
"overrides": {
|
||||
"buff_value": 30
|
||||
}
|
||||
}
|
||||
"timed_buff_id": 7030,
|
||||
"buff_value": 10,
|
||||
"buff_chance": 20
|
||||
},
|
||||
"desc": ""
|
||||
}
|
||||
@@ -2060,4 +2047,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user