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