internal static void ToJson(this IPBEPokemon pkmn, JsonTextWriter w) { w.WriteStartObject(); w.WritePropertyName(nameof(IPBEPokemon.Species)); PBESpecies species = pkmn.Species; w.WriteValue(species.ToString()); if (PBEDataUtils.HasForms(species, true)) { w.WritePropertyName(nameof(IPBEPokemon.Form)); w.WriteValue(PBEDataUtils.GetNameOfForm(species, pkmn.Form)); } w.WritePropertyName(nameof(IPBEPokemon.Nickname)); w.WriteValue(pkmn.Nickname); w.WritePropertyName(nameof(IPBEPokemon.Level)); w.WriteValue(pkmn.Level); w.WritePropertyName(nameof(IPBEPokemon.EXP)); w.WriteValue(pkmn.EXP); w.WritePropertyName(nameof(IPBEPokemon.Friendship)); w.WriteValue(pkmn.Friendship); w.WritePropertyName(nameof(IPBEPokemon.Shiny)); w.WriteValue(pkmn.Shiny); w.WritePropertyName(nameof(IPBEPokemon.Pokerus)); w.WriteValue(pkmn.Pokerus); w.WritePropertyName(nameof(IPBEPokemon.Ability)); w.WriteValue(pkmn.Ability.ToString()); w.WritePropertyName(nameof(IPBEPokemon.Nature)); w.WriteValue(pkmn.Nature.ToString()); w.WritePropertyName(nameof(IPBEPokemon.CaughtBall)); w.WriteValue(pkmn.CaughtBall.ToString()); w.WritePropertyName(nameof(IPBEPokemon.Gender)); w.WriteValue(pkmn.Gender.ToString()); w.WritePropertyName(nameof(IPBEPokemon.Item)); w.WriteValue(pkmn.Item.ToString()); w.WritePropertyName(nameof(IPBEPokemon.EffortValues)); pkmn.EffortValues.ToJson(w); w.WritePropertyName(nameof(IPBEPokemon.IndividualValues)); pkmn.IndividualValues.ToJson(w); w.WritePropertyName(nameof(IPBEPokemon.Moveset)); pkmn.Moveset.ToJson(w); w.WriteEndObject(); }
public static PBEType GetHiddenPowerType(this IPBEReadOnlyStatCollection stats) { return(PBEDataUtils.GetHiddenPowerType(stats.HP, stats.Attack, stats.Defense, stats.SpAttack, stats.SpDefense, stats.Speed)); }
public static byte GetHiddenPowerBasePower(this IPBEReadOnlyStatCollection stats, PBESettings settings) { return(PBEDataUtils.GetHiddenPowerBasePower(stats.HP, stats.Attack, stats.Defense, stats.SpAttack, stats.SpDefense, stats.Speed, settings)); }
/// <summary>Temporary check to see if a move is usable, can be removed once all moves are added</summary> public static bool IsMoveUsable(this IPBEMoveData mData) { return(PBEDataUtils.IsMoveUsable(mData.Effect)); }
public static bool IsWeatherMove(this IPBEMoveData mData) { return(PBEDataUtils.IsWeatherMove(mData.Effect)); }
public static bool IsSpreadMove(this IPBEMoveData mData) { return(PBEDataUtils.IsSpreadMove(mData.Targets)); }
public static bool IsSetDamageMove(this IPBEMoveData mData) { return(PBEDataUtils.IsSetDamageMove(mData.Effect)); }
public static bool IsMultiHitMove(this IPBEMoveData mData) { return(PBEDataUtils.IsMultiHitMove(mData.Effect)); }
public static bool IsHPRestoreMove(this IPBEMoveData mData) { return(PBEDataUtils.IsHPRestoreMove(mData.Effect)); }
public static bool HasSecondaryEffects(this IPBEMoveData mData, PBESettings settings) { return(PBEDataUtils.HasSecondaryEffects(mData.Effect, settings)); }
internal PBEReadOnlyPartyMovesetSlot(PBESettings settings, PBEMove move, byte ppUps) { Move = move; PP = PBEDataUtils.CalcMaxPP(move, ppUps, settings); PPUps = ppUps; }