Move data and data loading to plugin libraries.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
namespace PkmnLib.Dynamic.Libraries.DataLoaders.Models;
|
||||
|
||||
public class SerializedAbility
|
||||
{
|
||||
public string? Effect { get; set; }
|
||||
public Dictionary<string, JsonNode> Parameters { get; set; } = new();
|
||||
public string[] Flags { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace PkmnLib.Dynamic.Libraries.DataLoaders.Models;
|
||||
|
||||
public class SerializedItem
|
||||
{
|
||||
public string Name { get; set; } = null!;
|
||||
public string ItemType { get; set; } = null!;
|
||||
public string BattleType { get; set; } = null!;
|
||||
public string[] Flags { get; set; } = null!;
|
||||
public int Price { get; set; }
|
||||
public SerializedMoveEffect? Effect { get; set; }
|
||||
public SerializedMoveEffect? BattleEffect { get; set; }
|
||||
|
||||
public Dictionary<string, JsonNode>? AdditionalData { get; set; } = null!;
|
||||
|
||||
[JsonExtensionData] public Dictionary<string, JsonElement>? ExtensionData { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace PkmnLib.Dynamic.Libraries.DataLoaders.Models;
|
||||
|
||||
public class SerializedMoveDataWrapper
|
||||
{
|
||||
public SerializedMove[] Data { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class SerializedMove
|
||||
{
|
||||
public string Name { get; set; } = null!;
|
||||
public string Type { get; set; } = null!;
|
||||
public byte Power { get; set; }
|
||||
public byte PP { get; set; }
|
||||
public byte Accuracy { get; set; }
|
||||
public sbyte Priority { get; set; }
|
||||
public string Target { get; set; } = null!;
|
||||
public string Category { get; set; } = null!;
|
||||
public string[] Flags { get; set; } = null!;
|
||||
public SerializedMoveEffect? Effect { get; set; }
|
||||
|
||||
[JsonExtensionData] public Dictionary<string, JsonElement>? ExtensionData { get; set; }
|
||||
}
|
||||
|
||||
public class SerializedMoveEffect
|
||||
{
|
||||
public string Name { get; set; } = null!;
|
||||
public float? Chance { get; set; }
|
||||
public Dictionary<string, JsonNode>? Parameters { get; set; } = null!;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace PkmnLib.Dynamic.Libraries.DataLoaders.Models;
|
||||
|
||||
public class SerializedSpecies
|
||||
{
|
||||
public string Species { get; set; } = null!;
|
||||
public ushort Id { get; set; }
|
||||
public float GenderRatio { get; set; }
|
||||
public string GrowthRate { get; set; } = null!;
|
||||
public byte BaseHappiness { get; set; }
|
||||
public byte CatchRate { get; set; }
|
||||
public string Color { get; set; } = null!;
|
||||
public bool GenderDifference { get; set; }
|
||||
public string[] EggGroups { get; set; } = null!;
|
||||
public int EggCycles { get; set; }
|
||||
public string[] Flags { get; set; } = [];
|
||||
public Dictionary<string, SerializedForm> Formes { get; set; } = null!;
|
||||
public SerializedEvolution[] Evolutions { get; set; } = [];
|
||||
|
||||
[JsonExtensionData] public Dictionary<string, JsonElement>? ExtensionData { get; set; }
|
||||
}
|
||||
|
||||
public class SerializedForm
|
||||
{
|
||||
public string[] Abilities { get; set; } = null!;
|
||||
public string[] HiddenAbilities { get; set; } = [];
|
||||
public SerializedStats BaseStats { get; set; } = null!;
|
||||
public SerializedStats EVReward { get; set; } = null!;
|
||||
public string[] Types { get; set; } = null!;
|
||||
public float Height { get; set; }
|
||||
public float Weight { get; set; }
|
||||
public uint BaseExp { get; set; }
|
||||
public bool IsMega { get; set; }
|
||||
public SerializedMoves Moves { get; set; } = null!;
|
||||
public string[] Flags { get; set; } = [];
|
||||
|
||||
[JsonExtensionData] public Dictionary<string, JsonElement>? ExtensionData { get; set; }
|
||||
}
|
||||
|
||||
public class SerializedEvolution
|
||||
{
|
||||
public string Species { get; set; } = null!;
|
||||
public string Method { get; set; } = null!;
|
||||
public JsonNode Data { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class SerializedStats
|
||||
{
|
||||
public ushort Hp { get; set; }
|
||||
public ushort Attack { get; set; }
|
||||
public ushort Defense { get; set; }
|
||||
public ushort SpecialAttack { get; set; }
|
||||
public ushort SpecialDefense { get; set; }
|
||||
public ushort Speed { get; set; }
|
||||
}
|
||||
|
||||
public class SerializedLevelMove
|
||||
{
|
||||
public string Name { get; set; } = null!;
|
||||
public uint Level { get; set; }
|
||||
}
|
||||
|
||||
public class SerializedMoves
|
||||
{
|
||||
public SerializedLevelMove[]? LevelMoves { get; set; } = null!;
|
||||
public string[]? EggMoves { get; set; } = null!;
|
||||
public string[]? TutorMoves { get; set; } = null!;
|
||||
public string[]? Machine { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user