54 lines
2.9 KiB
C#
54 lines
2.9 KiB
C#
namespace BardFrontline.Core;
|
|
|
|
// IDs and rotation predicates are referenced from the local RSR ActionId/Status/Rotation.resx
|
|
// and BardRotation.cs. No RSR assembly or source project is linked.
|
|
public enum Skill : uint
|
|
{
|
|
Guard = 29054, Elixir = 29055, Purify = 29056, Sprint = 29057,
|
|
PowerfulShot = 29391, PitchPerfect = 29392, ApexArrow = 29393, BlastArrow = 29394,
|
|
SilentNocturne = 29395, RepellingShot = 29399, WardensPaean = 29400,
|
|
FinalFantasia = 29401, Recuperate = 29711, HarmonicArrow = 41464,
|
|
EncoreOfLight = 41467, Dervish = 43249, Bravery = 43250, EagleEyeShot = 43251,
|
|
}
|
|
|
|
public static class Statuses
|
|
{
|
|
public const uint Guard = 3054, Repertoire = 3137, March = 3138, BlastReady = 3142,
|
|
Fantasia = 3144, EncoreReady = 4312, Sprint = 1342, Dervish = 4478, Bravery = 4479,
|
|
RoleDervish = 4489, RoleBravery = 4490, RoleEagle = 4491, Warmachina = 1420;
|
|
public static readonly uint[] Controls = [1343, 1344, 1345, 1347, 3219, 3085];
|
|
// Named invincibilities from RSR's status data; damage reduction (e.g. Phalanx) is not immunity.
|
|
public static readonly HashSet<uint> Invincible =
|
|
[82, 325, 394, 529, 656, 671, 775, 776, 895, 969, 981, 1302, 1570, 1697, 1829, 4410, 4539, 4875];
|
|
|
|
public static bool IsInvulnerability(uint statusId, uint icon) => statusId != Guard
|
|
&& (Invincible.Contains(statusId) || icon == 15024);
|
|
}
|
|
|
|
public static class Actions
|
|
{
|
|
public static readonly Skill[] All = Enum.GetValues<Skill>();
|
|
public static bool Matches(Skill skill, uint adjustedId) => adjustedId == (uint)skill
|
|
|| skill == Skill.HarmonicArrow && adjustedId is 41465 or 41466 or 41964;
|
|
public static bool IsHostile(Skill s) => s is Skill.PowerfulShot or Skill.PitchPerfect or Skill.ApexArrow
|
|
or Skill.BlastArrow or Skill.SilentNocturne or Skill.RepellingShot or Skill.HarmonicArrow
|
|
or Skill.EncoreOfLight or Skill.EagleEyeShot;
|
|
public static uint Root(Skill s) => (uint)(s switch
|
|
{
|
|
Skill.PitchPerfect => Skill.PowerfulShot,
|
|
Skill.BlastArrow => Skill.ApexArrow,
|
|
Skill.EncoreOfLight => Skill.FinalFantasia,
|
|
_ => s,
|
|
});
|
|
public static string Name(Skill s) => s switch
|
|
{
|
|
Skill.Guard => "防御 Guard", Skill.Elixir => "军用圣灵药", Skill.Purify => "净化",
|
|
Skill.Sprint => "冲刺", Skill.Recuperate => "自疗 Recuperate", Skill.WardensPaean => "光阴神的礼赞",
|
|
Skill.FinalFantasia => "英雄的幻想曲(极限技)", Skill.RepellingShot => "后跃射击",
|
|
Skill.PowerfulShot => "强力射击", Skill.PitchPerfect => "完美音调", Skill.ApexArrow => "绝峰箭",
|
|
Skill.BlastArrow => "爆破箭", Skill.HarmonicArrow => "和弦箭", Skill.SilentNocturne => "默者的夜曲",
|
|
Skill.EncoreOfLight => "英雄的安可 Encore of Light", Skill.Bravery => "Bravery", Skill.Dervish => "Dervish",
|
|
Skill.EagleEyeShot => "Eagle Eye Shot", _ => s.ToString(),
|
|
};
|
|
}
|