Add Friendship

This commit is contained in:
Deukhoofd 2020-08-08 17:09:01 +02:00
parent 69ab7b197c
commit 00167ecbb4
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 17 additions and 2 deletions

View File

@ -35,6 +35,7 @@ namespace PkmnLibSharp.Battling
}
public BattleLibrary Library { get; private set; }
public Species Species
{
get
@ -47,6 +48,7 @@ namespace PkmnLibSharp.Battling
return _species;
}
}
public Forme Forme
{
get
@ -59,6 +61,7 @@ namespace PkmnLibSharp.Battling
return _forme;
}
}
public Species? DisplaySpecies
{
get
@ -72,6 +75,7 @@ namespace PkmnLibSharp.Battling
}
set => Creaturelib.Generated.Creature.SetDisplaySpecies(Ptr, value?.Ptr ?? IntPtr.Zero);
}
public Forme? DisplayForme
{
get
@ -85,6 +89,7 @@ namespace PkmnLibSharp.Battling
}
set => Creaturelib.Generated.Creature.SetDisplayVariant(Ptr, value?.Ptr ?? IntPtr.Zero);
}
public byte Level => Creaturelib.Generated.Creature.GetLevel(Ptr);
public uint Experience => Creaturelib.Generated.Creature.GetExperience(Ptr);
public Gender Gender => (Gender) Creaturelib.Generated.Creature.GetGender(Ptr);
@ -92,6 +97,11 @@ namespace PkmnLibSharp.Battling
public bool IsShiny => Pkmnlib.Generated.Pokemon.IsShiny(Ptr) == 1;
public uint CurrentHealth => Creaturelib.Generated.Creature.GetCurrentHealth(Ptr);
public uint MaxHealth => Creaturelib.Generated.Creature.GetMaxHealth(Ptr);
public byte Friendship
{
get => Pkmnlib.Generated.Pokemon.GetFriendship(Ptr);
set => Pkmnlib.Generated.Pokemon.SetFriendship(Ptr, value);
}
public string? ActiveAbility
{
@ -330,6 +340,11 @@ namespace PkmnLibSharp.Battling
Pkmnlib.Generated.Pokemon.ClearStatus(Ptr);
}
public void ChangeFriendship(sbyte amount)
{
Pkmnlib.Generated.Pokemon.ChangeFriendship(Ptr, amount);
}
private Species? _displaySpecies;
private Forme? _displayForme;
private Species? _species;