This commit is contained in:
innerthunder 2024-10-01 16:17:20 -07:00
parent 8c1adbc2f0
commit 4562699e84

View File

@ -1538,8 +1538,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
* @returns The type damage multiplier, indicating the effectiveness of the move * @returns The type damage multiplier, indicating the effectiveness of the move
*/ */
getMoveEffectiveness(source: Pokemon, move: Move, ignoreAbility: boolean = false, simulated: boolean = true, cancelled?: Utils.BooleanHolder): TypeDamageMultiplier { getMoveEffectiveness(source: Pokemon, move: Move, ignoreAbility: boolean = false, simulated: boolean = true, cancelled?: Utils.BooleanHolder): TypeDamageMultiplier {
if (!Utils.isNullOrUndefined(this.turnData.moveEffectiveness)) { if (!Utils.isNullOrUndefined(this.turnData?.moveEffectiveness)) {
return this.turnData.moveEffectiveness; return this.turnData?.moveEffectiveness;
} }
if (move.hasAttr(TypelessAttr)) { if (move.hasAttr(TypelessAttr)) {