Implements more move effects
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1091,6 +1091,7 @@ public class PokemonImpl : ScriptSource, IPokemon
|
||||
Types = Form.Types;
|
||||
OverrideAbility = null;
|
||||
AbilitySuppressed = false;
|
||||
RecalculateFlatStats();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface IScriptSet : IEnumerable<ScriptContainer>
|
||||
/// Adds a script with a name to the set. If the script with that name already exists in this
|
||||
/// set, this makes that script stack instead. The return value here is that script.
|
||||
/// </summary>
|
||||
ScriptContainer? StackOrAdd(StringKey scriptKey, Func<Script> instantiation);
|
||||
ScriptContainer? StackOrAdd(StringKey scriptKey, Func<Script?> instantiation);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a script from the set using its unique name.
|
||||
|
||||
Reference in New Issue
Block a user