Stats
A stat refers to any of several parameters pertaining to Pokémon that can affect turn order, move success, and damage output during a battle. With exception to the HP stat, a Pokémon's stat can also be temporarily raised or lowered in stages during battle through various effects.
See more on Bulbapedia.
Methods
getStatValue()
Returns the Pokémon's final stat value regarding parameters sent.
Signature
getStatValue(params: GetStatValueParams) => number
Parameter | Type | Required | Description |
---|---|---|---|
params | GetStatValueParams | Yes | The general parameters used for Pokémon's stat calculation. |
params.base | number | Yes | The Pokémon's base stat value (HP, Attack, Defense, Special Attack, Special Defense, or Speed). |
params.ev | number | No | The Pokémon's Effort Value (EV) for given stat. |
params.iv | number | No | The Pokémon's Individual Value (IV) for given stat. |
params.isHp | boolean | No | True if evaluating HP stat value for given Pokémon. |
params.level | number | No | The Pokémon's level. |
params.nature | NatureStatType | No | If the Pokémon has a hindering, neutral, or enhancing nature. |
params.isShedinja | boolean | No | True if evaluating a stat for Shedinja. |
Returns
A number with the Pokémon's final stat value.
Examples
getStatValue({
base: 100,
ev: 255,
}); // returns 328
getStatValue({
base: 100,
ev: 255,
isHp: true,
}); // returns 404
getStatValue({
base: 100,
iv: 0,
isHp: true,
}); // returns 310
getStatValue({
base: 100,
isHp: true,
isShedinja: true,
}); // returns 1
getMaxStatValue()
Returns the Pokémon's final maximum possible stat value regarding parameters sent.
Signature
getMaxStatValue(params: Omit<GetStatValueParams, 'iv' | 'ev' | 'nature'>) => number
Parameter | Type | Required | Description |
---|---|---|---|
params | Omit<GetStatValueParams, 'iv' | 'ev' | 'nature'> | Yes | The general parameters used for Pokémon's maximum possible stat calculation. |
params.base | number | Yes | The Pokémon's base stat value (HP, Attack, Defense, Special Attack, Special Defense, or Speed). |
params.isHp | boolean | No | True if evaluating HP stat value for given Pokémon. |
params.level | number | No | The Pokémon's level. |
params.isShedinja | boolean | No | True if evaluating a stat for Shedinja. |
Returns
A number with the Pokémon's final maximum possible stat value.
Example
getMaxStatValue({
base: 100,
}); // returns 328
getMaxStatValue({
base: 100,
isHp: true,
}); // returns 404
getMinStatValue()
Returns the Pokémon's final minimum possible stat value regarding parameters sent.
Signature
getMinStatValue(params: Omit<GetStatValueParams, 'iv' | 'ev' | 'nature'>) => number
Parameter | Type | Required | Description |
---|---|---|---|
params | Omit<GetStatValueParams, 'iv' | 'ev' | 'nature'> | Yes | The general parameters used for Pokémon's maximum possible stat calculation. |
params.base | number | Yes | The Pokémon's base stat value (HP, Attack, Defense, Special Attack, Special Defense, or Speed). |
params.isHp | boolean | No | True if evaluating HP stat value for given Pokémon. |
params.level | number | No | The Pokémon's level. |
params.isShedinja | boolean | No | True if evaluating a stat for Shedinja. |
Returns
A number with the Pokémon's final minimum possible stat value.
Example
getMinStatValue({
base: 100,
}); // returns 184
getMinStatValue({
base: 100,
isHp: true,
}); // returns 310
getPriorGenIIIStatValue()
Returns the Pokémon's final stat value regarding parameters sent for Pokémon Red, Blue, Yellow, Gold, Silver, and Crystal games.
Signature
getPriorGenIIIStatValue(params: Omit<GetStatValueParams, 'nature' | 'isShedinja'>) => number
Parameter | Type | Required | Description |
---|---|---|---|
params | Omit<GetStatValueParams, 'nature' | 'isShedinja'> | Yes | The general parameters used for Pokémon's stat calculation. |
params.base | number | Yes | The Pokémon's base stat value (HP, Attack, Defense, Special Attack, Special Defense, or Speed). |
params.ev | number | Yes | The Pokémon's Effort Value (EV) for given stat. |
params.iv | number | Yes | The Pokémon's Individual Value (IV) for given stat. |
params.isHp | boolean | No | True if evaluating HP stat value for given Pokémon. |
params.level | number | No | The Pokémon's level. |
Returns
A number with the Pokémon's final stat value.
Example
getPriorGenIIIStatValue({
isHp: true,
level: 81,
base: 35,
iv: 7,
ev: 22850,
}); // returns 189
getLegendsArceusStatValue()
Returns the Pokémon's final stat value regarding parameters sent for Pokémon Legends Arceus game.
Signature
getLegendsArceusStatValue(params: GetLegendsArceusStatValueParams) => number
Parameter | Type | Required | Description |
---|---|---|---|
params | GetLegendsArceusStatValueParams | Yes | The general parameters used for Pokémon's stat calculation. |
params.base | number | Yes | The Pokémon's base stat value (HP, Attack, Defense, Special Attack, Special Defense, or Speed). |
params.effortLevel | number | Yes | The Pokémon's Effort Level for given stat. |
params.nature | NatureStatType | Yes | If the Pokémon has a hindering, neutral, or enhancing nature. |
params.isHp | boolean | No | True if evaluating HP stat value for given Pokémon. |
params.level | number | No | The Pokémon's level. |
Returns
A number with the Pokémon's final stat value.
Example
getLegendsArceusStatValue({
isHp: true,
level: 100,
base: 120,
effortLevel: 10,
}); // returns 490
getLegendsArceusStatValue({
level: 100,
base: 120,
effortLevel: 10,
}) // returns 390
getPLAEfforLevelMultiplier()
Returns the Pokémon's Effort Level Multiplier for Pokémon Legends Arceus game.
Signature
getPLAEfforLevelMultiplier(effortLevel: number) => number
Parameter | Type | Required | Description |
---|---|---|---|
effortLevel | number | Yes | The Pokémon's Effort Level (a number between 0 and 10). |
Returns
A number with the multiplier for given effort level.
Example
getPLAEfforLevelMultiplier(0); // returns 0
getPLAEfforLevelMultiplier(10); // returns 25
getLetsGoPikachuStatValue()
Returns the Pokémon's final stat value regarding parameters sent for Pokémon: Let's Go, Pikachu! and Let's Go, Eevee! games.
Signature
getLetsGoPikachuStatValue(params: GetLetsGoPikachuStatValueParams) => number
Parameter | Type | Required | Description |
---|---|---|---|
params | GetLetsGoPikachuStatValueParams | Yes | The general parameters used for Pokémon's stat calculation. |
params.base | number | Yes | The Pokémon's base stat value (HP, Attack, Defense, Special Attack, Special Defense, or Speed). |
params.isHp | boolean | No | True if evaluating HP stat value for given Pokémon. |
params.av | `number | No | The Pokémon's Awakening Value (AV), also known as Go Power bonus, for given stat. |
params.iv | number | No | The Pokémon's Individual Vale (IV) for given stat. |
params.level | number | No | The Pokémon's level. |
params.friendship | number | No | The Pokémon's friendship level. |
params.nature | NatureStatType | No | If the Pokémon has a hindering, neutral, or enhancing nature. |
Returns
A number with the Pokemon's final stat value.
Example
getLetsGoPikachuStatValue({
isHp: true,
level: 100,
base: 100,
}); // returns 341
getLGPFriendshipMultiplier()
Returns the Pokémon's Effort Level Multiplier in Pokémon: Let's Go, Pikachu! and Let's Go, Eevee! games.
Signature
getLGPFriendshipMultiplier(friendship: number) => number
Parameter | Type | Required | Description |
---|---|---|---|
friendship | number | Yes | The Pokémon's friendship Level. |
Returns
A number with the Pokémon's friendship level.
Example
getLGPFriendshipMultiplier(0); // returns 1
getLGPFriendshipMultiplier(255); // returns 1.1
getCPValue()
Returns the Pokémon's Combat Power in Pokémon: Let's Go, Pikachu! and Let's Go, Eevee! games.
Signature
getCPValue(params: GetCPValueParams) => number
Parameter | Type | Required | Description |
---|---|---|---|
params | object | Yes | The general parameters used for Pokémon's stat calculation. |
params.stat | number | Yes | The Pokémon's base stats. |
params.stat.hp | number | Yes | The Pokémon's HP stat value. |
params.stat.attack | number | Yes | The Pokémon's Attack stat value. |
params.stat.defense | number | Yes | The Pokémon's Defense stat value. |
params.stat.specialAttack | number | Yes | The Pokémon's Special Attack stat value. |
params.stat.specialDefense | number | Yes | The Pokémon's Special Defense stat value. |
params.stat.speed | number | Yes | The Pokémon's Speed stat value. |
params.totalAv | number | No | The Pokémon's total Awakening Values. |
params.level | number | No | The Pokémon's level. |
Returns
A number representing the Pokémon's Combat Power.
Example
getCPValue({
level: 50,
totalAv: 0,
stat: {
hp: 110,
attack: 75,
defense: 60,
specialAttack: 70,
specialDefense: 70,
speed: 110,
},
}); // returns 1485
getStatWithStage()
Returns the final Pokémon's stat value after applying a scale of stage multipliers.
See more on Bulbapedia.
Signature
getStatWithStage(statValue: number, multiplier: StageMultiplier) => number
Parameter | Type | Required | Description |
---|---|---|---|
statValue | number | Yes | The Pokémon stat value to apply stage multiplier. |
multiplier | StageMultiplier | Yes | The stage multiplier to apply on Pokémon stat. |
Returns
A number with the stat after stage multiplier applied.
Example
getStatWithStage(300, 1); // returns 450
getStatWithStage(300, -2); // returns 75
Type Definitions
GetStatValueParams
An interface to determine the Pokémon's final stat value with getStatValue()
.
Type |
---|
Interface |
Properties
Name | Required | Type |
---|---|---|
base | Yes | number |
iv | No | number |
ev | No | number |
level | No | number |
isHp | No | boolean |
isShedinja | No | boolean |
nature | No | NatureStatType |
GetLegendsArceusStatValueParams
An interface to determine the Pokémon's final stat value with getLegendsArceusStatValue()
.
Type |
---|
Interface |
Properties
Name | Required | Type |
---|---|---|
base | Yes | number |
level | No | number |
effortLevel | No | number |
isHp | No | boolean |
nature | No | NatureStatType |
GetLetsGoPikachuStatValueParams
An interface to determine the Pokémon's final stat value with getLetsGoPikachuStatValue()
.
Type |
---|
Interface |
Properties
Name | Required | Type |
---|---|---|
base | Yes | number |
level | No | number |
iv | No | number |
av | No | number |
friendship | No | number |
isHp | No | boolean |
nature | No | NatureStatType |
GetCPValueParams
An interface to determine the Pokémon's Combat Power value with getCPValue()
.
Type |
---|
Interface |
Properties
Name | Required | Type |
---|---|---|
stat | Yes | object |
stat.hp | Yes | number |
stat.attack | Yes | number |
stat.defense | Yes | number |
stat.specialAttack | Yes | number |
stat.specialDefense | Yes | number |
stat.speed | Yes | number |
level | No | number |
totalAv | No | number |
NatureStatType
A string value describing how the Nature affects the stat.
Type |
---|
enum('enhancing' , 'hindering' , 'neutral' ) |
StageMultiplier
A number value representing the stat stage multiplier.
Type |
---|
enum(-6 , -5 , -4 , -3 , -2 , -1 , 1 , 2 , 3 , 4 , 5 , 6 ) |