pull/352/merge
ReneGV 2024-05-15 12:29:21 -05:00 committed by GitHub
commit 3558bb06b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 26 additions and 2 deletions

View File

@ -2733,6 +2733,29 @@ export class WeatherBallTypeAttr extends VariableMoveTypeAttr {
}
}
export class TerrainPulseTypeAttr extends VariableMoveTypeAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const type = (args[0] as Utils.IntegerHolder);
switch (user.scene.arena.terrain?.terrainType) {
case TerrainType.MISTY:
type.value = Type.FAIRY
break;
case TerrainType.ELECTRIC:
type.value = Type.ELECTRIC;
break;
case TerrainType.GRASSY:
type.value = Type.GRASS
break;
case TerrainType.PSYCHIC:
type.value = Type.PSYCHIC
break;
default:
return false;
}
return true;
}
}
export class HiddenPowerTypeAttr extends VariableMoveTypeAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const type = (args[0] as Utils.IntegerHolder);
@ -6649,8 +6672,9 @@ export function initMoves() {
new AttackMove(Moves.RISING_VOLTAGE, Type.ELECTRIC, MoveCategory.SPECIAL, 70, 100, 20, -1, 0, 8)
.attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.ELECTRIC && target.isGrounded() ? 2 : 1),
new AttackMove(Moves.TERRAIN_PULSE, Type.NORMAL, MoveCategory.SPECIAL, 50, 100, 10, -1, 0, 8)
.pulseMove()
.partial(),
.attr(TerrainPulseTypeAttr)
.attr(MovePowerMultiplierAttr, (user, target, move) => ([TerrainType.ELECTRIC, TerrainType.GRASSY, TerrainType.MISTY, TerrainType.PSYCHIC].includes(user.scene.arena.terrain?.terrainType) ? 2 : 1))
.pulseMove(),
new AttackMove(Moves.SKITTER_SMACK, Type.BUG, MoveCategory.PHYSICAL, 70, 90, 10, 100, 0, 8)
.attr(StatChangeAttr, BattleStat.SPATK, -1),
new AttackMove(Moves.BURNING_JEALOUSY, Type.FIRE, MoveCategory.SPECIAL, 70, 100, 5, 100, 0, 8)