Implements more move effects

This commit is contained in:
2025-03-07 16:16:22 +01:00
parent 2c987e32ee
commit a6c73a9c04
15 changed files with 251 additions and 11 deletions

View File

@@ -80,6 +80,12 @@ public interface ILearnedMove : IDeepCloneable
/// Restore the remaining PP by a certain amount. Will prevent it from going above max PP.
/// </summary>
void RestoreUses(byte amount);
/// <summary>
/// Forcibly set the remaining PP to a certain amount.
/// </summary>
/// <param name="uses"></param>
void SetCurrentPP(byte uses);
}
/// <inheritdoc />
@@ -136,4 +142,10 @@ public class LearnedMoveImpl : ILearnedMove
/// 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);
/// <inheritdoc />
public void SetCurrentPP(byte uses)
{
CurrentPp = Math.Min(uses, MaxPp);
}
}

View File

@@ -1091,6 +1091,7 @@ public class PokemonImpl : ScriptSource, IPokemon
Types = Form.Types;
OverrideAbility = null;
AbilitySuppressed = false;
RecalculateFlatStats();
}
}
}