Fix incorrect defensive properties on Terastallized Pokemon

This commit is contained in:
innerthunder 2024-09-06 11:17:28 -07:00
parent deac3141a1
commit 6a6f8827e1

View File

@ -1049,6 +1049,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const teraType = this.getTeraType();
if (teraType !== Type.UNKNOWN) {
types.push(teraType);
if (forDefend) {
return types;
}
}
}
@ -1368,7 +1371,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
: 1);
applyMoveAttrs(VariableMoveTypeMultiplierAttr, source, this, move, typeMultiplier);
if (this.getTypes().find(t => move.isTypeImmune(source, this, t))) {
if (this.getTypes(true, true).find(t => move.isTypeImmune(source, this, t))) {
typeMultiplier.value = 0;
}