gpkm/pkm/pkm_builder
Types
pub type Pkm {
Pkm(
pid: Option(Int),
nickname: Option(String),
national_pokedex_id: Option(Int),
held_item: Option(String),
ot_name: Option(String),
ot_id: Option(Int),
ot_secret_id: Option(Int),
moves: Option(pkm_bytes.Moves),
ability: Option(String),
individual_values: Option(pkm_bytes.IndividualValues),
effort_values: Option(pkm_bytes.EffortValues),
experience_points: Option(Int),
friendship: Option(Int),
original_language: Option(String),
shiny: Option(Bool),
level: Option(Int),
nature: Option(String),
species: Option(String),
gender: Option(String),
hidden_power: Option(pkm_bytes.HiddenPower),
b64_pkm_data: String,
)
}
Constructors
-
Pkm( pid: Option(Int), nickname: Option(String), national_pokedex_id: Option(Int), held_item: Option(String), ot_name: Option(String), ot_id: Option(Int), ot_secret_id: Option(Int), moves: Option(pkm_bytes.Moves), ability: Option(String), individual_values: Option(pkm_bytes.IndividualValues), effort_values: Option(pkm_bytes.EffortValues), experience_points: Option(Int), friendship: Option(Int), original_language: Option(String), shiny: Option(Bool), level: Option(Int), nature: Option(String), species: Option(String), gender: Option(String), hidden_power: Option(pkm_bytes.HiddenPower), b64_pkm_data: String, )
Functions
pub fn get_nature(pid: Int) -> Result(String, Nil)
pub fn get_species(
national_pokedex_id: Int,
) -> Result(String, Nil)
pub fn with_ability(pkm: Pkm, ability: List(Int)) -> Pkm
pub fn with_effort_values(
pkm: Pkm,
bs: UnencryptedPkmBytes,
) -> Pkm
Uses the whole UnencryptedPkmBytes to build Pkm with effort values
As each effort_value is a field of UnencryptedPkmBytes
each effort_value will be extracted from the get_evs
function
pub fn with_experience_points(
pkm: Pkm,
experience_points: List(Int),
) -> Pkm
pub fn with_friendship(pkm: Pkm, friendship: List(Int)) -> Pkm
pub fn with_gender(
pkm: Pkm,
encounter_main_info: List(Int),
) -> Pkm
pub fn with_held_item(pkm: Pkm, held_item: List(Int)) -> Pkm
pub fn with_hidden_power(pkm: Pkm) -> Pkm
pub fn with_individual_values(
pkm: Pkm,
individual_values: List(Int),
) -> Pkm
pub fn with_level(pkm: Pkm, level: List(Int)) -> Pkm
pub fn with_moves(pkm: Pkm, bs: UnencryptedPkmBytes) -> Pkm
Uses the whole UnencryptedPkmBytes to build Pkm with moves
As each move/pp is a field of UnencryptedPkmBytes
each move/pp will be extracted from the get_moves
function
pub fn with_national_pokedex_id(
pkm: Pkm,
national_pokedex_id: List(Int),
) -> Pkm
pub fn with_nature(pkm: Pkm, pid: List(Int)) -> Pkm
pub fn with_nickname(pkm: Pkm, nickname: List(Int)) -> Pkm
pub fn with_original_language(
pkm: Pkm,
original_language: List(Int),
) -> Pkm
pub fn with_ot_id(pkm: Pkm, ot_id: List(Int)) -> Pkm
pub fn with_ot_name(pkm: Pkm, ot_name: List(Int)) -> Pkm
pub fn with_ot_secret_id(
pkm: Pkm,
ot_secret_id: List(Int),
) -> Pkm
pub fn with_shiny(
pkm: Pkm,
pid: List(Int),
ot_id: List(Int),
secret_id: List(Int),
) -> Pkm
pub fn with_species(
pkm: Pkm,
national_pokedex_id: List(Int),
) -> Pkm