182 lines
6.1 KiB
C#
182 lines
6.1 KiB
C#
|
using System.Collections.Generic;
|
|||
|
using Game;
|
|||
|
using Sirenix.OdinInspector;
|
|||
|
using UnityEngine.Serialization;
|
|||
|
|
|||
|
namespace Game
|
|||
|
{
|
|||
|
[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,
|
|||
|
群体目标,
|
|||
|
指定区域,
|
|||
|
}
|
|||
|
}
|