mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-24 00:09:31 +02:00
fix undefined property error
This commit is contained in:
parent
01f3b00bc4
commit
8c1adbc2f0
@ -1538,9 +1538,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
* @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 {
|
||||
if (this.turnData.moveEffectiveness !== null) {
|
||||
if (!Utils.isNullOrUndefined(this.turnData.moveEffectiveness)) {
|
||||
return this.turnData.moveEffectiveness;
|
||||
}
|
||||
|
||||
if (move.hasAttr(TypelessAttr)) {
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user