Files
zeling_v2/Assets/_Game/Scripts/Combat/CombatEnums.cs
Joywayer 0491e3f919 fix(combat): 统一受击无敌闸门并修复 DoT 失效
将无敌判定收口到 PlayerController.TakeDamage(DamageInfo) 单一闸门并认 DamageFlags.IgnoreIFrame,PlayerStats 拆出原始扣血 ApplyDamage;新增 DamageFlags.IsDoT,持续伤害只扣血不打断硬直、不授予无敌。修复 DoT 绕过 HurtBox 时被 flag-blind 的整数 TakeDamage 静默吞没、且 FinalDamage 未结算(恒为0)的双重失效;敌人侧 DoT 标记 IsDoT 避免每 Tick 重置硬直。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 16:30:56 +08:00

91 lines
3.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
namespace BaseGames.Combat
{
// ── 元素/物理属性 ───────────────────────────────────────────────────────
public enum DamageType { Normal, True, Fire, Poison, Ice, Lightning, Void }
// ── 来源分类 ────────────────────────────────────────────────────────────
public enum DamageCategory
{
NormalAttack = 0,
SoulSkill = 1,
SpiritSkill = 2,
Projectile = 3,
EnvironmentTrap = 4,
StatusEffect = 5,
FallDamage = 6,
Reflected = 7,
}
// ── 行为标志 ────────────────────────────────────────────────────────────
[Flags]
public enum DamageFlags
{
None = 0,
Unblockable = 1 << 0,
CanBeParried = 1 << 1,
IgnoreIFrame = 1 << 2,
PerfectParryOnly = 1 << 3,
IsProjectile = 1 << 4,
CanClash = 1 << 5,
ForceBreak = 1 << 6,
NoKnockback = 1 << 7,
/// <summary>击飞:使敌人进入 KnockUp 状态(腾空 + 落地)。仅在伤害量 &gt;= HitTierConfig.launchThreshold 时生效。</summary>
Launch = 1 << 8,
/// <summary>
/// 持续伤害DoT。承伤方据此区分"持续伤害"与"一次性打击"
/// 只扣血,不触发受击硬直/打断,也不授予新的无敌帧。
/// 通常与 <see cref="IgnoreIFrame"/> 同时设置DoT 既不被无敌挡、也不刷新无敌)。
/// </summary>
IsDoT = 1 << 9,
}
// ── 交互标签 ────────────────────────────────────────────────────────────
[Flags]
public enum DamageTags : uint
{
None = 0,
MeleeHit = 1 << 0,
RangedHit = 1 << 1,
SkillHit = 1 << 2,
ElementFire = 1 << 3,
ElementPoison = 1 << 4,
ElementVoid = 1 << 5,
AfterParry = 1 << 6,
ChargedAttack = 1 << 7,
SkyFormOnly = 1 << 8,
EarthFormOnly = 1 << 9,
DeathFormOnly = 1 << 10,
BreakLight = 1 << 11,
BreakMedium = 1 << 12,
BreakHeavy = 1 << 13,
BreakBreaker = 1 << 14,
}
public enum HitFxType { Spark, Slash, Blood, Magic, Heavy, Crit, Void, Heal, Parry, Fire, Ice }
// ── 攻击方打断等级 ──────────────────────────────────────────────────────
public enum BreakLevel
{
None = 0,
Light = 1,
Medium = 2,
Heavy = 3,
Breaker = 4,
}
// ── 承受方霸体等级 ──────────────────────────────────────────────────────
public enum PoiseLevel
{
None = 0,
Light = 1,
Medium = 2,
Heavy = 3,
Unbreakable = 100,
}
// ── 攻击方向PlayerCombat / WeaponSO 使用)────────────────────────────
public enum AttackDirection { Ground, Up, Down, Air }
}