feat(技能): 新增驻场技能系统并集成到游戏机制中
- 在英雄配置中增加驻场技能字段,支持八种全局加成类型 - 实现驻场技能数值计算,影响召唤/死亡/战斗开始结束技能触发次数 - 集成驻场技能到金币收益系统,提升每回合和卖出英雄的金币获取 - 为战斗结束治疗添加驻场技能加成,增强队伍恢复效果
This commit is contained in:
@@ -10,6 +10,7 @@ import { GameEvent } from "../common/config/GameEvent";
|
||||
import { Attrs} from "../common/config/HeroAttrs";
|
||||
import { MoveComp } from "./MoveComp";
|
||||
import { mLogger } from "../common/Logger";
|
||||
import { FieldSkillType } from "../common/config/SkillSet";
|
||||
/** 英雄实体:负责英雄节点创建、属性初始化、入场动画与销毁流程 */
|
||||
@ecs.register(`Hero`)
|
||||
|
||||
@@ -200,14 +201,19 @@ export class Hero extends ecs.Entity {
|
||||
|
||||
// 落地后触发 call 技能
|
||||
if (model && model.call && model.call.length > 0) {
|
||||
model.call.forEach(uuid => {
|
||||
oops.message.dispatchEvent(GameEvent.TriggerSkill, {
|
||||
s_uuid: uuid,
|
||||
heroAttrs: model,
|
||||
heroView: view,
|
||||
triggerType: 'call'
|
||||
let triggerCount = 1 + HeroAttrsComp.getFieldSkillTotalValue(FieldSkillType.SummonCount);
|
||||
triggerCount = Math.max(1, Math.floor(triggerCount));
|
||||
|
||||
for (let i = 0; i < triggerCount; i++) {
|
||||
model.call.forEach(uuid => {
|
||||
oops.message.dispatchEvent(GameEvent.TriggerSkill, {
|
||||
s_uuid: uuid,
|
||||
heroAttrs: model,
|
||||
heroView: view,
|
||||
triggerType: 'call'
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.start();
|
||||
|
||||
Reference in New Issue
Block a user