Use PCGRandom instead of System.Random, documentation
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
global using LevelInt = byte;
|
||||
|
||||
namespace PkmnLib.Dynamic;
|
||||
|
||||
/// <summary>
|
||||
/// Constants used in the dynamic library.
|
||||
/// </summary>
|
||||
public class Const
|
||||
{
|
||||
/// <summary>
|
||||
/// The max number of moves a Pokemon can have.
|
||||
/// </summary>
|
||||
public const int MovesCount = 4;
|
||||
}
|
||||
@@ -33,8 +33,13 @@ public interface IDynamicLibrary
|
||||
IMiscLibrary MiscLibrary { get; }
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public class DynamicLibraryImpl : IDynamicLibrary
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DynamicLibraryImpl"/> class, with the given
|
||||
/// plugins and static library.
|
||||
/// </summary>
|
||||
public static IDynamicLibrary Create(IStaticLibrary staticLibrary, IEnumerable<Plugin> plugins)
|
||||
{
|
||||
var registry = new ScriptRegistry();
|
||||
|
||||
@@ -4,6 +4,9 @@ using PkmnLib.Static;
|
||||
|
||||
namespace PkmnLib.Dynamic.Libraries;
|
||||
|
||||
/// <summary>
|
||||
/// Miscellaneous handlings for battles.
|
||||
/// </summary>
|
||||
public interface IMiscLibrary
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
namespace PkmnLib.Dynamic.Models;
|
||||
|
||||
/// <summary>
|
||||
/// A battle party is a wrapper around a Pokemon party that provides additional functionality for battles.
|
||||
/// It indicates for which side and position the party is responsible.
|
||||
/// </summary>
|
||||
public interface IBattleParty
|
||||
{
|
||||
/// <summary>
|
||||
/// The backing Pokemon party.
|
||||
/// </summary>
|
||||
IPokemonParty Party { get; }
|
||||
/// <summary>
|
||||
/// Whether the party is responsible for the specified side and position.
|
||||
/// </summary>
|
||||
bool IsResponsibleForIndex(byte side, byte position);
|
||||
|
||||
/// <summary>
|
||||
/// Whether the party has a living Pokemon left that is not in the field.
|
||||
/// </summary>
|
||||
bool HasPokemonNotInField();
|
||||
}
|
||||
@@ -2,6 +2,9 @@ using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Dynamic.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Random number generator for battles.
|
||||
/// </summary>
|
||||
public interface IBattleRandom : IRandom
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user