yyl
2025-09-30 d1d7db670b09a507cb73f71f99d2ca22c96307a5
125 战斗 1.治疗问题 2.死亡时受击不播放
2个文件已修改
24 ■■■■ 已修改文件
Main/System/Battle/BattleObject/BattleObject.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/Skill/SkillBase.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleObject/BattleObject.cs
@@ -268,11 +268,11 @@
        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);
        }
@@ -280,12 +280,12 @@
    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);
    }
    //  闪避开始
@@ -360,8 +360,12 @@
            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);
Main/System/Battle/Skill/SkillBase.cs
@@ -441,6 +441,7 @@
    {
        // 伤害分布 (万分比)
        // Debug.LogError("skillConfig.DamageDivide.Count " + skillConfig.DamageDivide.Length + " _hitIndex " + _hitIndex);
        bool isLastHit = _hitIndex >= skillConfig.DamageDivide.Length - 1;
        int[] damageDivide = skillConfig.DamageDivide[_hitIndex];
        long totalDamage = GeneralDefine.GetFactValue(hurt.HurtHP, hurt.HurtHPEx);
@@ -458,7 +459,12 @@
        //    TODO YYL AttackTypes  要表现成什么样呢? 支持多种类型并存,如无视防御且暴击同时被格挡,二进制或运算最终值;0-失败;1-普通;2-回血;5-格挡;6-无视防御;7-暴击;9-闪避
        target.Hurt(damageList, totalDamage, hurt, skillConfig);
        List<HB422_tagMCTurnFightObjDead> deadPacks = BattleUtility.FindDeadPack(packList);
        bool isTargetDead = deadPacks.Exists(p => p.ObjID == target.ObjID);
        bool playAnimation = !(isLastHit && isTargetDead);
        target.Hurt(damageList, totalDamage, hurt, skillConfig, playAnimation);
        //    TODO YYL 这里是要做统一计算后再hurt跟suckhp还是怎样
        caster.SuckHp(hurt.SuckHP, skillConfig);//    吸血