Implement Soak, Forest's Curse, and Trick-or-Treat
Updates the UI and type effectiveness to support three types, and makes old moves that change types update the UI.
This commit is contained in:
1 parent
e94b17bbf5
commit
9dfd5a1e6e
4 files changed
+78
-7
No files matched your search
@@ -745,7 +745,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
if (!types.length)
|
||||
types.push(Type.NORMAL);
|
||||
types.push(Type.UNKNOWN);
|
||||
|
||||
return types;
|
||||
}
|
||||
@@ -859,7 +859,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
if (moveType === Type.STELLAR)
|
||||
return this.isTerastallized() ? 2 : 1;
|
||||
const types = this.getTypes(true, true);
|
||||
let multiplier = getTypeDamageMultiplier(moveType, types[0]) * (types.length > 1 ? getTypeDamageMultiplier(moveType, types[1]) : 1) as TypeDamageMultiplier;
|
||||
let multiplier = getTypeDamageMultiplier(moveType, types[0]) * (types.length > 1 ? getTypeDamageMultiplier(moveType, types[1]) : 1) * (types.length > 2 ? getTypeDamageMultiplier(moveType, types[2]) : 1) as TypeDamageMultiplier;
|
||||
// Handle strong winds lowering effectiveness of types super effective against pure flying
|
||||
if (this.scene.arena.weather?.weatherType === WeatherType.STRONG_WINDS && !this.scene.arena.weather.isEffectSuppressed(this.scene) && multiplier >= 2 && this.isOfType(Type.FLYING) && getTypeDamageMultiplier(moveType, Type.FLYING) === 2)
|
||||
multiplier /= 2;
|
||||
|
||||
Reference in new issue
Block a user