Implement getAttackTypeEffectiveness check
This commit is contained in:
1 parent
e17aee5d48
commit
e94b17bbf5
2 files changed
+2
-2
No files matched your search
@@ -1221,7 +1221,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
const cancelled = new Utils.BooleanHolder(false);
|
||||
const typeless = !!move.getAttrs(TypelessAttr).length;
|
||||
const typeMultiplier = new Utils.NumberHolder(!typeless && (moveCategory !== MoveCategory.STATUS || move.getAttrs(StatusMoveTypeImmunityAttr).find(attr => types.includes((attr as StatusMoveTypeImmunityAttr).immuneType)))
|
||||
? getTypeDamageMultiplier(type, types[0]) * (types.length > 1 ? getTypeDamageMultiplier(type, types[1]) : 1)
|
||||
? this.getAttackTypeEffectiveness(type)
|
||||
: 1);
|
||||
applyMoveAttrs(VariableMoveTypeMultiplierAttr, source, this, move, typeMultiplier);
|
||||
if (typeless)
|
||||
|
||||
Reference in new issue
Block a user