mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 08:22:16 +02:00
Finish Missing Docs
This commit is contained in:
parent
6fe3183c52
commit
eeb1ff5760
@ -746,6 +746,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates and retrieves the final value of a stat considering any held
|
||||
* items, move effects, opponent abilities, and whether there was a critical
|
||||
* hit.
|
||||
* @param stat the desired {@linkcode EffectiveStat}
|
||||
* @param opponent the target {@linkcode Pokemon}
|
||||
* @param move the {@linkcode Move} being used
|
||||
* @param isCritical determines whether a critical hit has occurred or not (`false` by default)
|
||||
* @returns the final in-battle value of a stat
|
||||
*/
|
||||
getEffectiveStat(stat: EffectiveStat, opponent?: Pokemon, move?: Move, isCritical: boolean = false): integer {
|
||||
const statValue = new Utils.NumberHolder(this.getStat(stat, false));
|
||||
this.scene.applyModifiers(StatBoosterModifier, this.isPlayer(), this, stat, statValue);
|
||||
@ -1958,7 +1968,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
*
|
||||
* Note that this does not apply to evasion or accuracy
|
||||
* @see {@linkcode getAccuracyMultiplier}
|
||||
* @param
|
||||
* @param stat the desired {@linkcode EffectiveStat}
|
||||
* @param opponent the target {@linkcode Pokemon}
|
||||
* @param move the {@linkcode Move} being used
|
||||
* @param isCritical determines whether a critical hit has occurred or not (`false` by default)
|
||||
* @return the stat stage multiplier to be used for effective stat calculation
|
||||
*/
|
||||
getStatStageMultiplier(stat: EffectiveStat, opponent?: Pokemon, move?: Move, isCritical: boolean = false): number {
|
||||
|
@ -2876,7 +2876,7 @@ export class EnemyFusionChanceModifier extends EnemyPersistentModifier {
|
||||
* - The player
|
||||
* - The enemy
|
||||
* @param scene current {@linkcode BattleScene}
|
||||
* @param isPlayer {@linkcode boolean} for whether the the player (`true`) or enemy (`false`) is being overridden
|
||||
* @param isPlayer {@linkcode boolean} for whether the player (`true`) or enemy (`false`) is being overridden
|
||||
*/
|
||||
export function overrideModifiers(scene: BattleScene, isPlayer: boolean = true): void {
|
||||
const modifiersOverride: ModifierTypes.ModifierOverride[] = isPlayer ? Overrides.STARTING_MODIFIER_OVERRIDE : Overrides.OPP_MODIFIER_OVERRIDE;
|
||||
|
@ -281,6 +281,11 @@ export class OverridesHelper extends GameManagerHelper {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the items rolled at the end of a battle
|
||||
* @param items the items to be rolled
|
||||
* @returns this
|
||||
*/
|
||||
itemRewards(items: ModifierOverride[]) {
|
||||
vi.spyOn(Overrides, "ITEM_REWARD_OVERRIDE", "get").mockReturnValue(items);
|
||||
this.log("Item rewards set to:", items);
|
||||
|
Loading…
Reference in New Issue
Block a user