PKHeX/PKHeX.Core/PKM/Shared/IFormArgument.cs
Kurt 37cb15749e Update FormArgument handling for gen6/7
Disassociate pk4/pk6 backing byte[] when converting to pk5|pk7, as we no longer make a copy of the byte[] in the pkm's constructor.

Change UpdatePKM to include isParty, as we want it optional to update FormArgument too.

Change FormArgument saving to be handled by FormConverter; kinda not really good to have it there, but nothing else is handling FormArgument values.

Expand IFormArgument to have all FormArgument values exposed. "Maximum" is furfrou only.
PK6: Max is in the "FormArgument" u32, and the remain/elapsed is in party stats (hence the reverting when boxed)
PK7: u8 remain, u8 elapsed, u8 max, u8 unused.
PK8: assumedly the same as PK7, given the disassembly hints that it's the same as past games (even though Furfrou and Hoopa are not in SWSH).
2021-02-08 20:26:53 -08:00

35 lines
No EOL
1.4 KiB
C#

namespace PKHeX.Core
{
/// <summary>
/// Alternate form data has an associated value.
/// </summary>
/// <remarks>
/// <see cref="Species.Furfrou"/> How long (days) the form can last before reverting to Form-0 (5 days max)
/// <see cref="Species.Hoopa"/>: How long (days) the form can last before reverting to Form-0 (3 days max)
/// <see cref="Species.Alcremie"/>: Topping (Strawberry, Star, etc); [0,7]
/// <see cref="Species.Yamask"/> How much damage the Pokémon has taken as Yamask-1 [0,9999].
/// <see cref="Species.Runerigus"/> How much damage the Pokémon has taken as Yamask-1 [0,9999].
/// </remarks>
public interface IFormArgument
{
/// <summary>
/// Argument for the associated <see cref="PKM.Form"/>
/// </summary>
uint FormArgument { get; set; }
/// <summary>
/// Amount of days the timed <see cref="PKM.Form"/> will remain active for.
/// </summary>
byte FormArgumentRemain { get; set; }
/// <summary>
/// Amount of days the timed <see cref="PKM.Form"/> has been active for.
/// </summary>
byte FormArgumentElapsed { get; set; }
/// <summary>
/// Maximum amount of days the <see cref="Species.Furfrou"/> has maintained a <see cref="PKM.Form"/> without reverting to its base form.
/// </summary>
byte FormArgumentMaximum { get; set; }
}
}