51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Cielonos.MainGame
|
|
{
|
|
public static class Breakthrough
|
|
{
|
|
public enum Type
|
|
{
|
|
None = 0,
|
|
Weak = 10,
|
|
Medium = 20,
|
|
Heavy = 30,
|
|
Disruption = 40,
|
|
Forced = 50,
|
|
Unstoppable = 100 // 不可用于攻击,只能用于防御状态,表示无法被打断。
|
|
}
|
|
|
|
public static readonly List<Type> Types = new List<Type>()
|
|
{
|
|
Type.None,
|
|
Type.Weak,
|
|
Type.Medium,
|
|
Type.Heavy,
|
|
Type.Disruption,
|
|
Type.Forced,
|
|
Type.Unstoppable
|
|
};
|
|
|
|
public static List<Type> GetLowerTypes(Type type)
|
|
{
|
|
return Types.Where(t => t < type).ToList();
|
|
}
|
|
|
|
public static List<Type> GetEqualOrLowerTypes(Type type)
|
|
{
|
|
return Types.Where(t => t <= type).ToList();
|
|
}
|
|
|
|
public static List<Type> GetHigherTypes(Type type)
|
|
{
|
|
return Types.Where(t => t > type).ToList();
|
|
}
|
|
|
|
public static List<Type> GetEqualOrHigherTypes(Type type)
|
|
{
|
|
return Types.Where(t => t >= type).ToList();
|
|
}
|
|
}
|
|
}
|