mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Merge branch 'pr/235'
This commit is contained in:
commit
28739c30fb
@ -2404,6 +2404,34 @@ export class WeatherBallTypeAttr extends VariableMoveTypeAttr {
|
||||
}
|
||||
}
|
||||
|
||||
export class TerrainPulseTypeAttr extends VariableMoveTypeAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if(!user.isGrounded)
|
||||
return false;
|
||||
|
||||
const currentTerrain = user.scene.arena.getTerrainType();
|
||||
const type = (args[0] as Utils.IntegerHolder);
|
||||
|
||||
switch (currentTerrain) {
|
||||
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);
|
||||
@ -6067,14 +6095,16 @@ export function initMoves() {
|
||||
.attr(SacrificialAttr)
|
||||
.target(MoveTarget.ALL_NEAR_OTHERS)
|
||||
.attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.MISTY && user.isGrounded() ? 1.5 : 1)
|
||||
.condition(failIfDampCondition),
|
||||
.condition(failIfDampCondition)
|
||||
.makesContact(false),
|
||||
new AttackMove(Moves.GRASSY_GLIDE, Type.GRASS, MoveCategory.PHYSICAL, 55, 100, 20, -1, 0, 8)
|
||||
.partial(),
|
||||
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) => user.scene.arena.getTerrainType() !== TerrainType.NONE && user.isGrounded() ? 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)
|
||||
|
Loading…
Reference in New Issue
Block a user