diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index c0130219..a309cf30 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -145,7 +145,6 @@ export class HeroViewComp extends CCComp { } /* 显示角色血量 */ this.node.getChildByName("top").getChildByName("hp").active = true; - this.add_shield(100) } update(dt: number){ diff --git a/assets/script/game/skills/SkillCom.ts b/assets/script/game/skills/SkillCom.ts index f281612b..96ac5d0f 100644 --- a/assets/script/game/skills/SkillCom.ts +++ b/assets/script/game/skills/SkillCom.ts @@ -4,7 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu import { smc } from "../common/SingletonModuleComp"; import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { GameEvent } from "../common/config/GameEvent"; -import { AType, DTType, EType, SkillSet, SType, TGroup } from "../common/config/SkillSet"; +import { AType, BuffAttr, DTType, EType, SkillSet, SType, TGroup } from "../common/config/SkillSet"; import { BoxSet, FacSet } from "../common/config/BoxSet"; import { HeroViewComp } from "../hero/HeroViewComp"; import { BezierMove } from "../BezierMove/BezierMove"; @@ -175,7 +175,7 @@ export class SkillCom extends CCComp { switch(this.skillConfig.SType){ case SType.shield: - this.caster.add_shield(this.skillConfig.buV) + this.caster.add_shield(this.caster[BuffAttr.HP_MAX]*(100+this.skillConfig.buV/100)) break; } }