Files
zeling_v2/Assets/Scripts/Combat/ShieldConfigSO.cs
2026-05-12 15:34:08 +08:00

30 lines
1.2 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 UnityEngine;
namespace BaseGames.Combat
{
/// <summary>
/// 护盾配置资产(架构 06_CombatModule §6 ShieldSystem
/// 可通过 Assets/Create/Combat/ShieldConfig 创建。
/// </summary>
[CreateAssetMenu(menuName = "Combat/ShieldConfig", fileName = "ShieldConfig")]
public class ShieldConfigSO : ScriptableObject
{
[Header("护盾数值")]
public int MaxShieldHP = 0; // 0 = 无护盾(默认禁用)
[Range(0f, 1f)]
public float DamageAbsorptionRatio = 1.0f; // 1.0 = 全吸收;<1.0 = 部分穿透
public float RechargeDelay = 2.0f; // 受击后延迟多久才开始再生(秒)
public float RechargeRate = 20f; // 每秒再生 HP
[Header("破碎惩罚")]
public float BrokenPenaltyDuration = 3.0f; // 护盾破碎后不可再生的惩罚时长(秒)
[Header("存档点")]
public bool FullRechargeOnSavePoint = true; // 抵达存档点时是否完全恢复护盾
[Header("弹反加成")]
[Range(0f, 1f)]
public float ParryRestoreRatio = 0.3f; // 弹反成功后恢复护盾比例(占 MaxShieldHP
}
}