feat(护盾系统): 完善护盾功能并添加吸收提示
- 在GameSet.ts中添加shield类型提示 - HeroViewComp新增shield_tip方法显示护盾吸收值 - 修改HeroAttrsComp移除护盾值上限限制 - TooltipCom添加shield类型提示处理 - 调整SACastSystem中治疗和护盾技能计算方式 - HeroAtkSystem优化护盾吸收逻辑并添加吸收提示
This commit is contained in:
@@ -9,6 +9,7 @@ import { smc } from "../common/SingletonModuleComp";
|
||||
import { TalComp } from "./TalComp";
|
||||
import { TalEffet, TriType } from "../common/config/TalSet";
|
||||
import { BoxSet } from "../common/config/GameSet";
|
||||
import { Attrs } from "../common/config/HeroAttrs";
|
||||
|
||||
/**
|
||||
* ==================== 自动施法系统 ====================
|
||||
@@ -389,14 +390,14 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
* 执行治疗技能
|
||||
*/
|
||||
private executeHealSkill(casterEntity: ecs.Entity, s_uuid: number, heroView: HeroViewComp, hset: HSSet): boolean {
|
||||
const heroAttrs = casterEntity.get(HeroAttrsComp);
|
||||
const hAttrsCom = casterEntity.get(HeroAttrsComp);
|
||||
const config = SkillSet[s_uuid];
|
||||
if (!config) return false;
|
||||
|
||||
const targets = this.sHealTargets(heroView, heroAttrs, config);
|
||||
const targets = this.sHealTargets(heroView, hAttrsCom, config);
|
||||
if (targets.length === 0) return false;
|
||||
|
||||
const healAmount = config.ap;
|
||||
const healAmount = config.ap * hAttrsCom.Attrs[Attrs.HP_MAX];
|
||||
const delay = 0.3;
|
||||
|
||||
heroView.scheduleOnce(() => {
|
||||
@@ -417,14 +418,14 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat
|
||||
* 执行护盾技能
|
||||
*/
|
||||
private executeShieldSkill(casterEntity: ecs.Entity, s_uuid: number, heroView: HeroViewComp, hset: HSSet): boolean {
|
||||
const heroAttrs = casterEntity.get(HeroAttrsComp);
|
||||
const hAttrsCom = casterEntity.get(HeroAttrsComp);
|
||||
const config = SkillSet[s_uuid];
|
||||
if (!config) return false;
|
||||
|
||||
const targets = this.sShieldTargets(heroView, heroAttrs, config);
|
||||
const targets = this.sShieldTargets(heroView, hAttrsCom, config);
|
||||
if (targets.length === 0) return false;
|
||||
|
||||
const shieldAmount = config.ap;
|
||||
const shieldAmount = config.ap * hAttrsCom.Attrs[Attrs.HP_MAX];
|
||||
const delay = 0.3;
|
||||
|
||||
heroView.scheduleOnce(() => {
|
||||
|
||||
Reference in New Issue
Block a user