feat(技能系统): 新增获取金币技能功能

新增金币类型技能枚举与配置字段,添加6303号获取金币技能配置;新增通用的技能结束动画播放逻辑,当技能配置了endAnm时自动播放;完善施法系统的金币技能处理逻辑,计算并添加对应金币;新增对应的技能prefab资源文件。
This commit is contained in:
walkpan
2026-05-23 12:29:26 +08:00
parent 88d7bdae47
commit fce7646de6
4 changed files with 311 additions and 6 deletions

View File

@@ -11,6 +11,7 @@ import { BoxSet, FacSet, FightSet } from "../common/config/GameSet";
import { oops } from "db://oops-framework/core/Oops";
import { GameEvent, SkillTriggerType } from "../common/config/GameEvent";
import { SkillTriggerHelper } from "./SkillTriggerHelper";
import { MissionEconomy } from "../map/MissionEconomy";
/**
* ==================== 自动施法系统 ====================
@@ -421,6 +422,11 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
if (!target.ent) return;
const model = target.ent.get(HeroAttrsComp);
if (!model || model.is_dead) return;
if (config.endAnm && config.endAnm !== "") {
target.playEnd(config.endAnm);
}
if (kind === SkillKind.Heal && sAp !== 0) {
const addHp = Math.floor(sAp*_cAttrsComp.ap/100);
model.add_hp(addHp);
@@ -432,6 +438,12 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
} else if (kind === SkillKind.Shield && sAp !== 0) {
const addShield = Math.max(0, Math.floor(sAp));
model.add_shield(addShield);
} else if (kind === SkillKind.Gold) {
const baseGold = config.gold ?? config.ap;
const addGold = baseGold + (sUp.ap);
if (addGold > 0) {
MissionEconomy.addCoin(addGold);
}
}
if (!config.buffs || config.buffs.length === 0) return;
for (const buffConf of config.buffs) {