mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 05:22:44 +02:00
Fixed shell bell in ability.ts (why is it here?)
This commit is contained in:
parent
34864b51b8
commit
565d75225a
@ -35,7 +35,7 @@ import {
|
|||||||
} from "#app/data/moves/move";
|
} from "#app/data/moves/move";
|
||||||
import { allMoves } from "../data-lists";
|
import { allMoves } from "../data-lists";
|
||||||
import { ArenaTagSide } from "#app/data/arena-tag";
|
import { ArenaTagSide } from "#app/data/arena-tag";
|
||||||
import { BerryModifier, HitHealModifier, PokemonHeldItemModifier } from "#app/modifier/modifier";
|
import { BerryModifier, PokemonHeldItemModifier } from "#app/modifier/modifier";
|
||||||
import { TerrainType } from "#app/data/terrain";
|
import { TerrainType } from "#app/data/terrain";
|
||||||
import {
|
import {
|
||||||
SpeciesFormChangeAbilityTrigger,
|
SpeciesFormChangeAbilityTrigger,
|
||||||
@ -90,6 +90,7 @@ import type { BattlerIndex } from "#app/battle";
|
|||||||
import type Move from "#app/data/moves/move";
|
import type Move from "#app/data/moves/move";
|
||||||
import type { ArenaTrapTag, SuppressAbilitiesTag } from "#app/data/arena-tag";
|
import type { ArenaTrapTag, SuppressAbilitiesTag } from "#app/data/arena-tag";
|
||||||
import { noAbilityTypeOverrideMoves } from "../moves/invalid-moves";
|
import { noAbilityTypeOverrideMoves } from "../moves/invalid-moves";
|
||||||
|
import { HeldItemId } from "#enums/held-item-id";
|
||||||
|
|
||||||
export class BlockRecoilDamageAttr extends AbAttr {
|
export class BlockRecoilDamageAttr extends AbAttr {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -7413,11 +7414,9 @@ class ForceSwitchOutHelper {
|
|||||||
* @returns The amount of health recovered by Shell Bell.
|
* @returns The amount of health recovered by Shell Bell.
|
||||||
*/
|
*/
|
||||||
function calculateShellBellRecovery(pokemon: Pokemon): number {
|
function calculateShellBellRecovery(pokemon: Pokemon): number {
|
||||||
const shellBellModifier = pokemon.getHeldItems().find(m => m instanceof HitHealModifier);
|
// Returns 0 if no Shell Bell is present
|
||||||
if (shellBellModifier) {
|
const shellBellStack = pokemon.heldItemManager.getStack(HeldItemId.SHELL_BELL);
|
||||||
return toDmgValue(pokemon.turnData.totalDamageDealt / 8) * shellBellModifier.stackCount;
|
return toDmgValue(pokemon.turnData.totalDamageDealt / 8) * shellBellStack;
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user