Several fixes and improvements.

This commit is contained in:
2020-08-17 18:51:07 +02:00
parent 00cfd3c469
commit 743c63a99c
44 changed files with 378 additions and 419 deletions

View File

@@ -14,8 +14,9 @@ namespace PkmnLibSharpTests.Battling
protected override Pokemon Finalize(Species species, Forme forme, Item? heldItem, IReadOnlyCollection<LearnedMove> moves, Nature nature)
{
return new Pokemon(Library, species, forme!, Level, Experience, Uid, Gender, Coloring,
var pkmn = new Pokemon(Library, species, forme!, Level, Experience, Uid, Gender, Coloring,
heldItem, Nickname, HiddenAbility, (byte) AbilityIndex, moves, IVs, EVs, nature);
return pkmn;
}
}
}

View File

@@ -51,7 +51,7 @@ namespace PkmnLibSharpTests.Library
{
var p = new EffectParameter(10);
var ex = Assert.Throws<NativeException>(() => { p.AsString(); });
Assert.AreEqual("[CreatureLibLibrary] - '[CreatureLib_EffectParameter_AsString] [EffectParameter.hpp:54] Cast effect parameter to string, but was Int'", ex.Message);
Assert.AreEqual("[CreatureLibLibrary] - '[CreatureLib_EffectParameter_AsString] [EffectParameter.hpp:52] Cast effect parameter to string, but was Int'", ex.Message);
p.Dispose();
}
}