From 2583c9859bc45b634fc4bff5f64b049d560deec4 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Fri, 20 Jan 2023 21:51:06 +0100 Subject: [PATCH] feat(game): add check for combo skill --- .../Extensions/SkillInfoExtensions.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Core/NosSmooth.Game/Extensions/SkillInfoExtensions.cs diff --git a/Core/NosSmooth.Game/Extensions/SkillInfoExtensions.cs b/Core/NosSmooth.Game/Extensions/SkillInfoExtensions.cs new file mode 100644 index 0000000..23beea9 --- /dev/null +++ b/Core/NosSmooth.Game/Extensions/SkillInfoExtensions.cs @@ -0,0 +1,24 @@ +// +// SkillInfoExtensions.cs +// +// Copyright (c) František Boháček. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using NosSmooth.Data.Abstractions.Infos; + +namespace NosSmooth.Game.Extensions; + +/// +/// Extension methods for . +/// +public static class SkillInfoExtensions +{ + /// + /// Check whether the given skill is a combo skill. + /// + /// The info about the skill. + /// The morph to validate matches the morph of the skill. + /// Whether the skill is a combo skill. + public static bool IsComboSkill(this ISkillInfo skillInfo, int? morph = default) + => skillInfo.SpecialCost == 999 && skillInfo.CastId > 10 && (morph is null || skillInfo.MorphOrUpgrade == morph.Value); +} \ No newline at end of file -- 2.49.0