| | |
| | | public const int BattleChaseAttack = 100005; // 追击 |
| | | |
| | | public const int BattleStun = 100006; // 击晕 |
| | | |
| | | public const int BreakArmor = 100007; // 贯穿 |
| | | |
| | | public const int Parry = 100008; // 招架 |
| | | |
| | | #endregion |
| | | |
| | |
| | | public const int BlockEffectID = 19999; // 格挡特效ID |
| | | |
| | | public const int RebornEffectID = 10025; // 复活特效ID |
| | | |
| | | public const int BreakArmorEffectID = 10026; // 贯穿特效ID |
| | | |
| | | public const int ParryEffectID = 10027; // 招架特效ID |
| | | |
| | | #endregion |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | // 需要输出一下当前执行的死亡操作里的人员名单maybe |
| | | |
| | | // 只处理有效的死亡消息 |
| | | if (validDeadList.Count > 0) |
| | | { |
| | | DeathRecordAction recordAction = new DeathRecordAction(this, validDeadList); |
| | | DeathRecordAction recordAction = new DeathRecordAction(this, validDeadList, causingRecordAction); |
| | | // 如果有导致死亡的技能,将DeathRecordAction作为其子节点,并设置为WaitingPlay |
| | | if (causingRecordAction != null) |
| | | { |
| | |
| | | recordPlayer.ImmediatelyPlay(recordAction); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | convertedAttackTypes |= (int)DamageType.Damage; |
| | | break; |
| | | |
| | | case ServerDamageType.BreakArmor: |
| | | convertedAttackTypes |= (int)DamageType.BreakArmor; |
| | | break; |
| | | |
| | | case ServerDamageType.Parry: |
| | | convertedAttackTypes |= (int)DamageType.Parry; |
| | | break; |
| | | |
| | | default: |
| | | Debug.LogError($"[BattleDmgInfo] 未知的服务器伤害类型: {serverDamageType}({serverValue})"); |
| | | break; |
| | |
| | | targetDamageList.Add(new BattleDmg { damage = damage, attackType = attackType }); |
| | | } |
| | | |
| | | protected static List<DamageType> ExcludeDamageTypes = new List<DamageType> |
| | | { |
| | | DamageType.SuckHpReverse, |
| | | DamageType.Parry, |
| | | DamageType.BreakArmor, |
| | | }; |
| | | |
| | | /// <summary> |
| | | /// 验证并修复攻击类型 |
| | | /// </summary> |
| | |
| | | attackType &= ~(int)DamageType.Stunned; |
| | | } |
| | | |
| | | if (IsType(DamageType.SuckHpReverse)) |
| | | foreach (var excludeType in ExcludeDamageTypes) |
| | | { |
| | | attackType &= ~(int)DamageType.SuckHpReverse; |
| | | if (IsType(excludeType)) |
| | | { |
| | | attackType &= ~(int)excludeType; |
| | | } |
| | | } |
| | | |
| | | if (DamageNumConfig.Get(attackType) != null) |
| | |
| | | SuckHpReverse = 2048,//吸血毒药 (2^11 序号11) |
| | | SelfHarm = 4096,//自残 (2^12 序号12) |
| | | Protected = 8192,//本次伤害有受保护标记 (2^13 序号13) |
| | | |
| | | IngoreSheild = 16384,//无视护盾 (2^14 序号14) |
| | | |
| | | BreakArmor = 32768,//破甲伤害 (2^15 序号15) |
| | | |
| | | Parry = 65536,//招架 (2^16 序号16) |
| | | } |
| | | |
| | | public enum DamageType |
| | |
| | | CritRealdamage = Crit + Realdamage, //暴击真伤 |
| | | |
| | | SuckHpReverse = 8192, //吸血反转为伤害 |
| | | |
| | | BreakArmor = 32768,//破甲伤害 (2^15 序号15) |
| | | |
| | | Parry = 65536,//招架 (2^16 序号16) |
| | | } |
| | | |
| | |
| | | DamageNumConfig hintConfig = DamageNumConfig.Get(BattleConst.BattleStun); |
| | | Hint(caster, hintConfig); |
| | | } |
| | | |
| | | for (int i = 0; i < hitList.Count; i++) |
| | | { |
| | | var hurt = hitList[i]; |
| | | |
| | | if ((hurt.AttackTypes & (int)DamageType.BreakArmor) == (int)DamageType.BreakArmor) |
| | | { |
| | | BattleObject battleObject = caster.battleField.battleObjMgr.GetBattleObject((int)hurt.ObjID); |
| | | if (battleObject != null) |
| | | { |
| | | DamageNumConfig hintConfig = DamageNumConfig.Get(BattleConst.BreakArmor); |
| | | Hint(battleObject, hintConfig); |
| | | battleField.battleEffectMgr.PlayEffect(battleObject, |
| | | BattleConst.BreakArmorEffectID, battleObject.heroRectTrans, battleObject.Camp, |
| | | battleObject.teamHero.modelScale); |
| | | } |
| | | } |
| | | else if ((hurt.AttackTypes & (int)DamageType.Parry) == (int)DamageType.Parry) |
| | | { |
| | | BattleObject battleObject = caster.battleField.battleObjMgr.GetBattleObject((int)hurt.ObjID); |
| | | if (battleObject != null) |
| | | { |
| | | DamageNumConfig hintConfig = DamageNumConfig.Get(BattleConst.Parry); |
| | | Hint(battleObject, hintConfig); |
| | | battleField.battleEffectMgr.PlayEffect(battleObject, |
| | | BattleConst.ParryEffectID, battleObject.heroRectTrans, battleObject.Camp, |
| | | battleObject.teamHero.modelScale); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |