Adds new NativePtrArray class to deal with native arrays easier.
This commit is contained in:
@@ -32,6 +32,13 @@ namespace PkmnLibSharpTests.Battling
|
||||
20, 100));
|
||||
|
||||
var moves = MoveLibrary.Create(10);
|
||||
moves.Insert("testMove", MoveData.Create("testMove", 0, MoveCategory.Physical, 100,
|
||||
100, 20, MoveTarget.Any, 0, 0f, "",
|
||||
new EffectParameter[0], new string[0]));
|
||||
moves.Insert("testMove2", MoveData.Create("testMove2", 0, MoveCategory.Physical, 100,
|
||||
100, 20, MoveTarget.Any, 0, 0f, "",
|
||||
new EffectParameter[0], new string[0]));
|
||||
|
||||
var items = new ItemLibrary(10);
|
||||
items.Insert("testItem", Item.Create("testItem", ItemCategory.MiscItem, BattleItemCategory.None,
|
||||
500, new string[] { }, 20));
|
||||
|
||||
@@ -36,5 +36,17 @@ namespace PkmnLibSharpTests.Battling
|
||||
Assert.AreEqual(Gender.Female, pokemon.Gender);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void BuildPokemonWithMoves()
|
||||
{
|
||||
var lib = BattleLibraryHelper.GetLibrary();
|
||||
var pokemon = new PokemonBuilder(lib, "testSpecies", 50)
|
||||
.LearnMove("testMove", MoveLearnMethod.Unknown)
|
||||
.LearnMove("testMove2", MoveLearnMethod.Level)
|
||||
.Build();
|
||||
Assert.AreEqual("testMove", pokemon.GetMoves()[0].Move.Name);
|
||||
Assert.AreEqual("testMove2", pokemon.GetMoves()[1].Move.Name);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user