diff --git a/library/Structures/Pokemon5.cs b/library/Structures/Pokemon5.cs index ff332c9f..33a43490 100644 --- a/library/Structures/Pokemon5.cs +++ b/library/Structures/Pokemon5.cs @@ -105,7 +105,7 @@ namespace PkmnFoundations.Structures m_genderless = (forme & 0x04) != 0; FormID = (byte)(forme >> 3); - byte nature = block[25]; // todo: which nature is real? Do they both need to match? + m_nature = block[25]; // todo: which nature is real? Do they both need to match? m_bw_flags = BitConverter.ToUInt16(block, 26); HiddenAbility = (m_bw_flags & 0x01) != 0; N = (m_bw_flags & 0x02) != 0; @@ -184,6 +184,15 @@ namespace PkmnFoundations.Structures get { return Generations.Generation5; } } + private byte m_nature; + public override Natures Nature + { + get + { + return (Natures)(m_nature % 25u); + } + } + private ushort m_bw_flags; public bool HiddenAbility { get; set; } public bool N { get; set; } diff --git a/library/Structures/PokemonBase.cs b/library/Structures/PokemonBase.cs index d315965f..42834da4 100644 --- a/library/Structures/PokemonBase.cs +++ b/library/Structures/PokemonBase.cs @@ -123,7 +123,7 @@ namespace PkmnFoundations.Structures public IList Moves { get { return m_moves; } } public uint TrainerID { get; set; } public uint Personality { get; set; } - public Natures Nature { get { return (Natures)(Personality % 25u); } } + public virtual Natures Nature { get { return (Natures)(Personality % 25u); } } public byte Happiness { get; set; } public Languages Language { get; set; } public IvStatValues IVs { get; set; }