JinChanChan/Assets/Scripts/Game/Config/BuffConfig.cs

93 lines
3.0 KiB
C#
Raw Normal View History

2025-02-17 18:00:01 +08:00
using System.Collections.Generic;
using Sirenix.OdinInspector;
namespace Game
{
2025-02-17 18:00:01 +08:00
// public enum BuffType
// {
// Buff,
// DeBuff,
// // None,
// // 加血,
// // 加蓝,
// // 加攻击力,
// // 加防御力,
// // 加攻击速度,
// // 加回蓝速度,
// // 加回血速度,
// }
//
// [System.Serializable]
// public class BuffConfig
// {
// /// <summary>
// /// Buff ID
// /// </summary>
// public int BuffId;
//
// /// <summary>
// /// Buff名字
// /// </summary>
// public string BuffName;
//
// /// <summary>
// /// Buff类型
// /// </summary>
// public BuffType BuffType;
//
// /// <summary>
// /// 持续时间
// /// </summary>
// public float Duration;
//
// /// <summary>
// /// 每次Tick造成5点伤害
// /// </summary>
// public float DamagePerTick = 5;
//
// /// <summary>
// /// 每1秒Tick一次
// /// </summary>
// public float TickInterval = 1;
//
// /// <summary>
// /// 最大层数
// /// </summary>
// public int MaxLayerNumber = 1;
// }
[System.Serializable]
public class BuffConfig
{
2025-02-17 18:00:01 +08:00
[LabelText("Buff的名称")] public string Name; // Buff的名称例如"战士"、"游侠"等
[LabelText("Buff的描述")] public string Description; // Buff的描述
[LabelText("Buff带来的效果可以是多个效果")] public List<BuffEffect> Effects; // Buff带来的效果可以是多个效果
}
[System.Serializable]
2025-02-17 18:00:01 +08:00
public class BuffEffect
{
2025-02-17 18:00:01 +08:00
[LabelText("效果类型")] public BuffEffectType EffectType; // 增加攻击力、增加生命值等
[LabelText("效果值,可以是百分比或固定数值")] public float Value; // 效果值,可以是百分比或固定数值
[LabelText("是否是百分比增益")] public bool IsPercentage; // 是否是百分比增益
2025-02-17 18:00:01 +08:00
public BuffEffect(BuffEffectType effectType, float value, bool isPercentage)
{
EffectType = effectType;
Value = value;
IsPercentage = isPercentage;
}
}
2025-02-17 18:00:01 +08:00
public enum BuffEffectType
{
[LabelText("增加攻击力")] AttackDamage = 0, // 增加攻击力
[LabelText("增加护甲")] Armor, // 增加护甲
[LabelText("增加魔抗")] MagicResist, // 增加魔抗
[LabelText("增加生命值")] Health, // 增加生命值
[LabelText("增加攻击速度")] AttackSpeed, // 增加攻击速度
[LabelText("增加法术强度")] AbilityPower, // 增加法术强度
[LabelText("增加暴击几率")] CritChance, // 增加暴击几率
[LabelText("吸血效果")] Lifesteal, // 吸血效果
[LabelText("法力恢复")] ManaRegen // 法力恢复
}
}