~ruther/NosSmooth

ref: bbb771c93b1b4b8b76f8c70e5ae298a045250324 NosSmooth/Core/NosSmooth.Game/Extensions/SkillInfoExtensions.cs -rw-r--r-- 930 bytes
bbb771c9 — Rutherther Merge pull request #80 from plsfixrito/ilivingenitityvnum 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;

/// <summary>
/// Extension methods for <see cref="ISkillInfo"/>.
/// </summary>
public static class SkillInfoExtensions
{
    /// <summary>
    /// Check whether the given skill is a combo skill.
    /// </summary>
    /// <param name="skillInfo">The info about the skill.</param>
    /// <param name="morph">The morph to validate matches the morph of the skill.</param>
    /// <returns>Whether the skill is a combo skill.</returns>
    public static bool IsComboSkill(this ISkillInfo skillInfo, int? morph = default)
        => skillInfo.SpecialCost == 999 && skillInfo.CastId > 10 && (morph is null || skillInfo.MorphOrUpgrade == morph.Value);
}
Do not follow this link