Fix issue with getting abilities
This commit is contained in:
@@ -109,10 +109,10 @@ public class FormImpl : IForm
|
||||
Height = height;
|
||||
Weight = weight;
|
||||
BaseExperience = baseExperience;
|
||||
Types = [..types];
|
||||
Types = [.. types];
|
||||
BaseStats = baseStats;
|
||||
Abilities = [..abilities];
|
||||
HiddenAbilities = [..hiddenAbilities];
|
||||
Abilities = [.. abilities];
|
||||
HiddenAbilities = [.. hiddenAbilities];
|
||||
Moves = moves;
|
||||
Flags = flags;
|
||||
IsBattleOnlyForm = isBattleOnlyForm;
|
||||
@@ -197,7 +197,7 @@ public class FormImpl : IForm
|
||||
{
|
||||
var array = index.IsHidden ? HiddenAbilities : Abilities;
|
||||
if (index.Index >= array.Count)
|
||||
throw new OutOfRangeException("Ability", index.Index, array.Count);
|
||||
return array.Last();
|
||||
return array[index.Index];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user