Rework constructors to remove the Create pattern.
This commit is contained in:
@@ -16,7 +16,7 @@ namespace PkmnLibSharpTests.Battling
|
||||
{
|
||||
if (_cache != null) return _cache;
|
||||
|
||||
_cache = BattleLibrary.Create(BuildStatic(), new StatCalculator(), new DamageLibrary(),
|
||||
_cache = new BattleLibrary(BuildStatic(), new StatCalculator(), new DamageLibrary(),
|
||||
new ExperienceLibrary(),
|
||||
new AngelScriptResolver(), new MiscLibrary());
|
||||
return _cache;
|
||||
@@ -26,22 +26,22 @@ namespace PkmnLibSharpTests.Battling
|
||||
{
|
||||
var settings = new LibrarySettings(100, 4, 4096);
|
||||
var species = new SpeciesLibrary(10);
|
||||
species.Insert("testSpecies", Species.Create(1, "testSpecies",
|
||||
Forme.Create("default", 10f, 10f, 100, new byte[] {0, 1}, 100,
|
||||
species.Insert("testSpecies", new Species(1, "testSpecies",
|
||||
new Forme("default", 10f, 10f, 100, new byte[] {0, 1}, 100,
|
||||
100, 100, 100, 100, 100, new[] {"testAbility", "testAbility2"},
|
||||
new[] {"testHiddenAbility"}, LearnableMoves.Create(100)), 0.5f, "growthRate",
|
||||
new[] {"testHiddenAbility"}, new LearnableMoves(100)), 0.5f, "growthRate",
|
||||
20, 100));
|
||||
|
||||
var moves = MoveLibrary.Create(10);
|
||||
moves.Insert("testMove", MoveData.Create("testMove", 0, MoveCategory.Physical, 100,
|
||||
var moves = new MoveLibrary(10);
|
||||
moves.Insert("testMove", new MoveData("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,
|
||||
moves.Insert("testMove2", new MoveData("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,
|
||||
items.Insert("testItem", new Item("testItem", ItemCategory.MiscItem, BattleItemCategory.None,
|
||||
500, new string[] { }, 20));
|
||||
var gr = new GrowthRateLibrary(10);
|
||||
gr.AddGrowthRate("growthRate",
|
||||
@@ -52,7 +52,7 @@ namespace PkmnLibSharpTests.Battling
|
||||
types.RegisterType("fighting");
|
||||
var natures = new NatureLibrary(10);
|
||||
natures.LoadNature("testNature", new Nature());
|
||||
var lib = PokemonLibrary.Create(settings, species, moves, items, gr, types, natures);
|
||||
var lib = new PokemonLibrary(settings, species, moves, items, gr, types, natures);
|
||||
return lib;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user