| | |
| | | return true; |
| | | } |
| | | |
| | | public virtual void Hurt(List<long> damageValues, long _totalDamage, HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig) |
| | | public virtual void Hurt(List<long> damageValues, long _totalDamage, HB427_tagSCUseSkill.tagSCUseSkillHurt hurt, SkillConfig skillConfig, bool playAnimation = true) |
| | | { |
| | | BattleDmgInfo dmgInfo = PopDamage(damageValues, _totalDamage, hurt, skillConfig); |
| | | |
| | | if (dmgInfo.IsType(DamageType.Damage) || dmgInfo.IsRealdamage()) |
| | | if ((dmgInfo.IsType(DamageType.Damage) || dmgInfo.IsRealdamage()) && playAnimation) |
| | | { |
| | | motionBase.PlayAnimation(MotionName.hit, false); |
| | | } |
| | |
| | | |
| | | public void SuckHp(uint suckHP, SkillConfig skillConfig) |
| | | { |
| | | |
| | | teamHero.curHp = Math.Min(teamHero.maxHp, teamHero.curHp + (int)suckHP); |
| | | } |
| | | |
| | | public void HurtByReflect(uint bounceHP, SkillConfig skillConfig) |
| | | { |
| | | |
| | | teamHero.curHp = Math.Max(0, teamHero.curHp - (int)bounceHP); |
| | | } |
| | | |
| | | // 闪避开始 |
| | |
| | | currentHurtHp += (int)damageValues[i]; |
| | | } |
| | | |
| | | heroInfoBar.UpdateHP(teamHero.curHp, Math.Max(0, teamHero.curHp - currentHurtHp), teamHero.maxHp); |
| | | teamHero.curHp = Math.Max(0, teamHero.curHp - currentHurtHp); |
| | | bool isRecovery = battleDmgInfo.IsType(DamageType.Recovery); |
| | | |
| | | long toHp = Math.Max(0, teamHero.curHp + (isRecovery ? currentHurtHp : -currentHurtHp)); |
| | | |
| | | heroInfoBar.UpdateHP(teamHero.curHp, toHp, teamHero.maxHp); |
| | | teamHero.curHp = toHp; |
| | | |
| | | // YYL TODO 是否需要挂在在自身的follow点上 |
| | | EventBroadcast.Instance.Broadcast(EventName.BATTLE_DAMAGE_TAKEN, battleDmgInfo); |