Remove FluentResults, documentation
This commit is contained in:
@@ -81,6 +81,7 @@ public class LearnedMoveImpl : ILearnedMove
|
||||
{
|
||||
private byte _maxPpModification = 0;
|
||||
|
||||
/// <inheritdoc cref="LearnedMoveImpl" />
|
||||
public LearnedMoveImpl(IMoveData moveData, MoveLearnMethod learnMethod)
|
||||
{
|
||||
MoveData = moveData;
|
||||
@@ -97,8 +98,15 @@ public class LearnedMoveImpl : ILearnedMove
|
||||
/// <inheritdoc />
|
||||
public MoveLearnMethod LearnMethod { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The available power points for this move.
|
||||
/// </summary>
|
||||
public byte CurrentPp { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Try to use the move. This subtracts the amount of PP from the current PP. If the amount requested is
|
||||
/// higher than the current PP, this will return false, and the PP will not be reduced.
|
||||
/// </summary>
|
||||
public bool TryUse(byte amount = 1)
|
||||
{
|
||||
if (CurrentPp < amount)
|
||||
@@ -108,7 +116,13 @@ public class LearnedMoveImpl : ILearnedMove
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restore the PP to the maximum amount of PP.
|
||||
/// </summary>
|
||||
public void RestoreAllUses() => CurrentPp = MaxPp;
|
||||
|
||||
/// <summary>
|
||||
/// Restore the PP by a certain amount. This will prevent the PP from going above the maximum PP.
|
||||
/// </summary>
|
||||
public void RestoreUses(byte amount) => CurrentPp = (byte)Math.Min(CurrentPp + amount, MaxPp);
|
||||
}
|
||||
Reference in New Issue
Block a user