This commit is contained in:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user