Implements more abilities
All checks were successful
Build / Build (push) Successful in 47s

This commit is contained in:
2025-06-09 12:10:25 +02:00
parent af0126e413
commit 00005aa4bf
50 changed files with 80425 additions and 20485 deletions

View File

@@ -89,6 +89,11 @@ public interface IForm : INamedValue
/// Check if the form has a specific flag set.
/// </summary>
bool HasFlag(string key);
/// <summary>
/// Check if the form is a battle-only form, meaning it should return to its original form after the battle ends.
/// </summary>
bool IsBattleOnlyForm { get; }
}
/// <inheritdoc />
@@ -97,7 +102,8 @@ public class FormImpl : IForm
/// <inheritdoc cref="FormImpl" />
public FormImpl(StringKey name, float height, float weight, uint baseExperience, IEnumerable<TypeIdentifier> types,
ImmutableStatisticSet<ushort> baseStats, IEnumerable<StringKey> abilities,
IEnumerable<StringKey> hiddenAbilities, ILearnableMoves moves, ImmutableHashSet<StringKey> flags)
IEnumerable<StringKey> hiddenAbilities, ILearnableMoves moves, ImmutableHashSet<StringKey> flags,
bool isBattleOnlyForm)
{
Name = name;
Height = height;
@@ -109,6 +115,7 @@ public class FormImpl : IForm
HiddenAbilities = [..hiddenAbilities];
Moves = moves;
Flags = flags;
IsBattleOnlyForm = isBattleOnlyForm;
if (Types.Count == 0)
throw new ArgumentException("A form must have at least one type.");
@@ -202,4 +209,7 @@ public class FormImpl : IForm
/// <inheritdoc />
public bool HasFlag(string key) => Flags.Contains(key);
/// <inheritdoc />
public bool IsBattleOnlyForm { get; }
}