public static Sprite GetMinisprite(PBESpecies species, PBEForm form, PBEGender gender, bool shiny) { string speciesStr = PBEDataUtils.GetNameOfForm(species, form) ?? species.ToString(); string genderStr = gender == PBEGender.Female && HasFemaleSprite(species, true) ? "_F" : string.Empty; return(Sprite.LoadOrGet("Pkmn.PKMN_" + speciesStr + (shiny ? "_S" : string.Empty) + genderStr + ".png")); }
public static Bitmap GetMinispriteBitmap(PBESpecies species, PBEForm form, PBEGender gender, bool shiny) { string speciesStr = PBEDataUtils.GetNameOfForm(species, form) ?? species.ToString(); string genderStr = gender == PBEGender.Female && HasFemaleSprite(species, true) ? "_F" : string.Empty; return(new Bitmap(GetResourceStream("PKMN.PKMN_" + speciesStr + (shiny ? "_S" : string.Empty) + genderStr + ".png"))); }
public TestPokemon(PBESettings settings, PBESpecies species, PBEForm form, byte level, params PBEMove[] moves) { Species = species; Form = form; Level = level; Nickname = species.ToString(); Gender = PBERandom.RandomGender(PBEPokemonData.GetData(species, form).GenderRatio); EffortValues = new PBEStatCollection(0, 0, 0, 0, 0, 0); IndividualValues = new PBEStatCollection(0, 0, 0, 0, 0, 0); Moveset = new TestMoveset(settings, moves); }
public TestPokemon(PBESettings settings, PBESpecies species, PBEForm form, byte level, params PBEMove[] moves) { Species = species; Form = form; Level = level; Nickname = species.ToString(); Gender = PBEDataProvider.GlobalRandom.RandomGender(PBEDataProvider.Instance.GetPokemonData(species, form).GenderRatio); CaughtBall = PBEItem.PokeBall; EffortValues = new PBEStatCollection(0, 0, 0, 0, 0, 0); IndividualValues = new PBEStatCollection(0, 0, 0, 0, 0, 0); Moveset = new TestMoveset(settings, moves); }
public static Sprite GetPokemonSprite(PBESpecies species, PBEForm form, PBEGender gender, bool shiny, bool backSprite, bool behindSubstitute) { if (behindSubstitute) { return(backSprite ? _substituteBackSprite : _substituteFrontSprite); } else { string speciesStr = PBEDataUtils.GetNameOfForm(species, form) ?? species.ToString(); string orientation = backSprite ? "_B" : "_F"; string genderStr = gender == PBEGender.Female && HasFemaleSprite(species, false) ? "_F" : string.Empty; return(Sprite.LoadOrGet("Pkmn.PKMN_" + speciesStr + orientation + (shiny ? "_S" : string.Empty) + genderStr + ".gif")); } }
public TestPartyPokemon(PBESettings settings, PBESpecies species, PBEForm form, byte level, params PBEMove[] moves) { Species = species; Form = form; Level = level; EXP = PBEDataProvider.Instance.GetEXPRequired(PBEDataProvider.Instance.GetPokemonData(species, form).GrowthRate, level); Nickname = species.ToString(); Gender = PBEDataProvider.GlobalRandom.RandomGender(PBEDataProvider.Instance.GetPokemonData(species, form).GenderRatio); CaughtBall = PBEItem.PokeBall; EffortValues = new PBEStatCollection(0, 0, 0, 0, 0, 0); IndividualValues = new PBEStatCollection(0, 0, 0, 0, 0, 0); Moveset = new TestPartyMoveset(settings, moves); HP = PBEDataUtils.CalculateStat(species, form, PBEStat.HP, Nature, EffortValues.GetStat(PBEStat.HP), IndividualValues.GetStat(PBEStat.HP), level, settings); }
public static string GetPkmnDirectoryName(PBESpecies species, PBEForm form) { string dir; if (form == 0) { dir = species.ToString(); } else { dir = PBEDataUtils.GetNameOfForm(species, form); } return(dir); }
public static string GetPokemonSprite(PBESpecies species, PBEForm form, bool shiny, PBEGender gender, bool behindSubstitute, bool backSprite) { string orientation = backSprite ? "_B" : "_F"; if (behindSubstitute) { return(ImageURL + "STATUS2_Substitute" + orientation + ".gif"); } else { string speciesStr = PBEDataUtils.GetNameOfForm(species, form) ?? species.ToString(); string genderStr = gender == PBEGender.Female && HasFemaleSprite(species) ? "_F" : string.Empty; return(ImageURL + "PKMN_" + speciesStr + orientation + (shiny ? "_S" : string.Empty) + genderStr + ".gif"); } }
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(); }