mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Add individual Move#_PP $suggest
#2603 add in "secret" heal/healPP actions -- do ".Heal=$suggest" to refresh all stats like it was healed at the pokecenter. I can't think of a good way to handle invoking of methods (">", but what about parameters?)
This commit is contained in:
parent
87fbdf8222
commit
ecabbfff53
2 changed files with 31 additions and 0 deletions
|
@ -412,6 +412,20 @@ namespace PKHeX.Core
|
|||
|
||||
return ModifyResult.Modified;
|
||||
|
||||
case nameof(PKM.Heal):
|
||||
pk.Heal();
|
||||
return ModifyResult.Modified;
|
||||
case nameof(PKM.HealPP):
|
||||
pk.HealPP();
|
||||
return ModifyResult.Modified;
|
||||
|
||||
case nameof(PKM.Move1_PP):
|
||||
case nameof(PKM.Move2_PP):
|
||||
case nameof(PKM.Move3_PP):
|
||||
case nameof(PKM.Move4_PP):
|
||||
pk.SetSuggestedMovePP(name[4] - '1'); // 0-3 int32
|
||||
return ModifyResult.Modified;
|
||||
|
||||
case nameof(PKM.Moves):
|
||||
return SetMoves(pk, pk.GetMoveSet(la: info.Legality));
|
||||
|
||||
|
|
|
@ -616,6 +616,23 @@ namespace PKHeX.Core
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refreshes the Move PP for the desired move.
|
||||
/// </summary>
|
||||
/// <param name="pk">Pokémon to modify.</param>
|
||||
/// <param name="index">Move PP to refresh.</param>
|
||||
public static void SetSuggestedMovePP(this PKM pk, int index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: pk.Move1_PP = pk.GetMovePP(pk.Move1, pk.Move1_PPUps); return;
|
||||
case 1: pk.Move2_PP = pk.GetMovePP(pk.Move2, pk.Move2_PPUps); return;
|
||||
case 2: pk.Move3_PP = pk.GetMovePP(pk.Move3, pk.Move3_PPUps); return;
|
||||
case 3: pk.Move4_PP = pk.GetMovePP(pk.Move4, pk.Move4_PPUps); return;
|
||||
default: throw new ArgumentException(nameof(index));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Force hatches a PKM by applying the current species name and a valid Met Location from the origin game.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in a new issue