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

182 lines
6.1 KiB
C#
Raw Normal View History

2025-02-17 18:00:01 +08:00
using System.Collections.Generic;
using Game;
using Sirenix.OdinInspector;
2025-02-17 18:00:01 +08:00
using UnityEngine.Serialization;
namespace Game
{
2025-02-17 18:00:01 +08:00
[System.Serializable]
public class CharacterConfig
{
[LabelText("基本属性")] public BasicStats BasicStats = new BasicStats();
[LabelText("技能")] public Ability Ability = new Ability();
[LabelText("职业/羁绊")] public List<Profession> Professions = new List<Profession>();
}
/// <summary>
/// 基本属性Basic Stats
/// </summary>
[System.Serializable]
public class BasicStats
{
// 名称Name角色的名称。
[LabelText("名称")] public string Name;
// 描述Description角色的描述信息。
[LabelText("描述")] public string Description;
// 职业Class角色所属的职业比如剑士、法师、刺客等。
[LabelText("职业")] public ProfessionType Profession;
// 星级Star Level角色的星级1星、2星、3星等。星级影响角色的属性和技能强度最高为3星。
[LabelText("星级")] public StarLevelType StarLevel;
// 生命值Health角色的最大生命值。
[LabelText("生命值")] public List<int> Health = new List<int>(3);
// 攻击力Attack Damage角色每次普通攻击造成的伤害。
[LabelText("攻击力")] public List<int> AttackDamage = new List<int>(3);
// 攻击速度Attack Speed角色每秒能够进行多少次普通攻击。
[LabelText("攻击速度")] public List<float> AttackSpeed = new List<float>(3);
// 法力值Mana角色施放技能所需要的法力值。
[LabelText("法力值")] public List<int> Mana = new List<int>(3);
// 初始法力值Starting Mana角色在回合开始时已经拥有的法力值。
[LabelText("初始法力值")] public List<int> StartingMana;
// 攻击距离AttackRange
[LabelText("攻击距离")] public List<int> AttackRange = new List<int>(3);
// 暴击率Critical Hit Chance
[LabelText("暴击率")] public List<int> CriticalHitChance = new List<int>(3);
// 护甲Armor角色的物理防御减少来自普通攻击的伤害。
[LabelText("护甲")] public List<int> Armor = new List<int>(3);
// 魔抗Magic Resistance角色的魔法防御减少来自技能攻击的伤害。
[LabelText("魔抗")] public List<int> MagicResistance = new List<int>(3);
}
/// <summary>
/// 技能Ability
/// </summary>
[System.Serializable]
public class Ability
{
// 技能名称Ability Name每个角色都有一个独特的技能名称。
[LabelText("技能名称")] public string AbilityName;
// 技能描述Ability Description技能的具体效果例如造成伤害、治疗、增益等。
[LabelText("技能描述")] public string AbilityDescription;
// 触发方式TriggerMode主动、被动
[LabelText("触发方式")] public TriggerModeType TriggerMode;
// 技能伤害Ability Damage技能造成的伤害值通常受法术强度影响。
[LabelText("技能伤害")] public List<int> AbilityDamage = new List<int>(3);
// 技能冷却时间Cooldown技能施放后的冷却时间技能需要经过这个时间才能再次使用。
[LabelText("技能冷却时间(暂时弃用)")] public string Cooldown;
// 技能目标Target技能攻击的目标类型如单体目标、群体目标、指定区域等。
[LabelText("技能目标")] public TargetType Target;
}
/// <summary>
/// 装备Items
/// </summary>
[System.Serializable]
public class Items
{
// 装备类型Item Type每个装备的类别分为防御类、攻击类、辅助类等。
public string ItemType;
// 装备属性加成Item Attributes装备带来的属性加成例如增加攻击力、攻击速度、生命值、护甲、法术强度等。
public string ItemAttributes;
// 装备合成Item Crafting低级装备通过合成得到高级装备每种装备都有不同的合成公式。
public string ItemCrafting;
}
/// <summary>
/// 职业特性/羁绊Traits去掉种族
/// </summary>
[System.Serializable]
public class Profession
{
// 职业Class
// 每个角色都属于一个或多个职业,每个职业也有独特的特性。
// 例如:剑士、刺客、法师、坦克等。
[LabelText("羁绊名字")] public string Name;
// 职业描述
[LabelText("羁绊描述")] public string Description;
[LabelText("增幅类型")] public AmplifyType AmplifyType;
[LabelText("增幅目标类型")] public AmplifyTargetType AmplifyTargetType;
[LabelText("增幅时间类型")] public AmplifyTimeType AmplifyTimeType;
private bool isShowTime => AmplifyTimeType == AmplifyTimeType.;
[LabelText("增幅数值")] [ShowIf("isShowTime")]
public List<float> AmplifyTimes = new List<float>();
}
// 职业
public enum ProfessionType
{
= 0,
,
}
// 星级
public enum StarLevelType
{
= 0,
,
,
,
,
}
// 增幅类型
public enum AmplifyType
{
= 0,
,
,
,
,
,
,
,
}
// 增幅目标
public enum AmplifyTargetType
{
= 0,
,
}
// 增幅时间类型
public enum AmplifyTimeType
{
= 0,
,
}
public enum TriggerModeType
{
= 0,
,
}
public enum TargetType
{
= 0,
,
,
}
}