feat(技能系统): 优化技能逻辑并添加新技能配置
- 将hasAllyInSkillRange重命名为hasTeamInSkillRange以更好反映功能 - 修正治疗和护盾技能的计算公式,改为基于最大生命值的百分比 - 为所有技能添加10点消耗值 - 新增6102和6103两个团队增益技能配置 - 注释掉物理调试绘制代码 - 添加游戏设计文档初始内容
This commit is contained in:
@@ -63,7 +63,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
if (config.SType === SType.damage) {
|
||||
if (!this.hasEnemyInSkillRange(heroView, heroAttrs, skill.dis)) continue;
|
||||
} else if (config.SType === SType.heal || config.SType === SType.shield) {
|
||||
if (!this.hasAllyInSkillRange(heroView, heroAttrs, skill.dis)) continue;
|
||||
if (!this.hasTeamInSkillRange(heroView, heroAttrs, skill.dis)) continue;
|
||||
}
|
||||
|
||||
// ✅ 开始执行施法
|
||||
@@ -364,7 +364,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
/**
|
||||
* 检查技能范围内是否有友军
|
||||
*/
|
||||
private hasAllyInSkillRange(heroView: HeroViewComp, heroAttrs: HeroAttrsComp, skillDistance: number): boolean {
|
||||
private hasTeamInSkillRange(heroView: HeroViewComp, heroAttrs: HeroAttrsComp, skillDistance: number): boolean {
|
||||
if (!heroView || !heroView.node) return false;
|
||||
|
||||
const currentPos = heroView.node.position;
|
||||
@@ -397,7 +397,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
const targets = this.sHealTargets(heroView, hAttrsCom, config);
|
||||
if (targets.length === 0) return false;
|
||||
|
||||
const healAmount = config.ap * hAttrsCom.Attrs[Attrs.HP_MAX];
|
||||
const healAmount = config.ap * hAttrsCom.Attrs[Attrs.HP_MAX]/100;
|
||||
const delay = 0.3;
|
||||
|
||||
heroView.scheduleOnce(() => {
|
||||
@@ -425,7 +425,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
const targets = this.sShieldTargets(heroView, hAttrsCom, config);
|
||||
if (targets.length === 0) return false;
|
||||
|
||||
const shieldAmount = config.ap * hAttrsCom.Attrs[Attrs.HP_MAX];
|
||||
const shieldAmount = config.ap * hAttrsCom.Attrs[Attrs.HP_MAX]/100;
|
||||
const delay = 0.3;
|
||||
|
||||
heroView.scheduleOnce(() => {
|
||||
|
||||
Reference in New Issue
Block a user