PKHeX/PKHeX.Core/Ribbons/RibbonIndex.cs
Kurt 5bcccc6d92
HOME 2.0.0: Handle conversion behavior & restrictions (#3506)
* Revises legality checks to account for traveling between the three game islands (PLA/BDSP/SWSH)
* Adds conversion mechanisms between the three formats, as well as flexible conversion options to backfill missing data (thanks GameFreak/ILCA for opting for lossy conversion instead of updating the games).
* Adds API abstractions for HOME data storage format (EKH/PKH format 1, aka EH1/PH1).
* Revises some APIs for better usage:
  - `PKM` now exposes a `Context` to indicate the isolation context for legality purposes.
  - Some method signatures have changed to accept `Context` or `GameVersion` instead of a vague `int` for Generation.
  - Evolution History is now tracked in the Legality parse for specific contexts, rather than only per generation.
2022-05-30 21:43:52 -07:00

132 lines
3.1 KiB
C#

namespace PKHeX.Core
{
/// <summary>
/// Ribbon Indexes for Generation 8
/// </summary>
public enum RibbonIndex
{
ChampionKalos,
ChampionG3,
ChampionSinnoh,
BestFriends,
Training,
BattlerSkillful,
BattlerExpert,
Effort,
Alert,
Shock,
Downcast,
Careless,
Relax,
Snooze,
Smile,
Gorgeous,
Royal,
GorgeousRoyal,
Artist,
Footprint,
Record,
Legend,
Country,
National,
Earth,
World,
Classic,
Premier,
Event,
Birthday,
Special,
Souvenir,
Wishing,
ChampionBattle,
ChampionRegional,
ChampionNational,
ChampionWorld,
CountMemoryContest,
CountMemoryBattle,
ChampionG6Hoenn,
ContestStar,
MasterCoolness,
MasterBeauty,
MasterCuteness,
MasterCleverness,
MasterToughness,
ChampionAlola,
BattleRoyale,
BattleTreeGreat,
BattleTreeMaster,
ChampionGalar,
TowerMaster,
MasterRank,
MarkLunchtime,
MarkSleepyTime,
MarkDusk,
MarkDawn,
MarkCloudy,
MarkRainy,
MarkStormy,
MarkSnowy,
MarkBlizzard,
MarkDry,
MarkSandstorm,
MarkMisty,
MarkDestiny,
MarkFishing,
MarkCurry,
MarkUncommon,
MarkRare,
MarkRowdy,
MarkAbsentMinded,
MarkJittery,
MarkExcited,
MarkCharismatic,
MarkCalmness,
MarkIntense,
MarkZonedOut,
MarkJoyful,
MarkAngry,
MarkSmiley,
MarkTeary,
MarkUpbeat,
MarkPeeved,
MarkIntellectual,
MarkFerocious,
MarkCrafty,
MarkScowling,
MarkKindly,
MarkFlustered,
MarkPumpedUp,
MarkZeroEnergy,
MarkPrideful,
MarkUnsure,
MarkHumble,
MarkThorny,
MarkVigor,
MarkSlump,
Pioneer,
TwinklingStar,
MAX_COUNT,
}
public static class RibbonIndexExtensions
{
public static bool GetRibbonIndex(this IRibbonIndex x, RibbonIndex r) => x.GetRibbon((int)r);
public static void SetRibbonIndex(this IRibbonIndex x, RibbonIndex r, bool value = true) => x.SetRibbon((int)r, value);
public static AreaWeather8 GetWeather8(this RibbonIndex x) => x switch
{
RibbonIndex.MarkCloudy => AreaWeather8.Overcast,
RibbonIndex.MarkRainy => AreaWeather8.Raining,
RibbonIndex.MarkStormy => AreaWeather8.Thunderstorm,
RibbonIndex.MarkDry => AreaWeather8.Intense_Sun,
RibbonIndex.MarkSnowy => AreaWeather8.Snowing,
RibbonIndex.MarkBlizzard => AreaWeather8.Snowstorm,
RibbonIndex.MarkSandstorm => AreaWeather8.Sandstorm,
RibbonIndex.MarkMisty => AreaWeather8.Heavy_Fog,
_ => AreaWeather8.None,
};
}
}