mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
Update move.ts
This commit is contained in:
parent
1b7f4f5449
commit
077f6175d8
@ -2278,15 +2278,23 @@ export class WeatherBallTypeAttr extends VariableMoveTypeAttr {
|
|||||||
/**
|
/**
|
||||||
* Changes the move's type to match the current terrain.
|
* Changes the move's type to match the current terrain.
|
||||||
* Has no effect if the user is not grounded.
|
* Has no effect if the user is not grounded.
|
||||||
* @returns whether the type change was successful
|
* @extends VariableMoveTypeAttr
|
||||||
|
* @see {@linkcode apply}
|
||||||
*/
|
*/
|
||||||
export class TerrainPulseTypeAttr extends VariableMoveTypeAttr {
|
export class TerrainPulseTypeAttr extends VariableMoveTypeAttr {
|
||||||
|
/**
|
||||||
|
* @param user {@linkcode Pokemon} using this move
|
||||||
|
* @param target N/A
|
||||||
|
* @param move N/A
|
||||||
|
* @param args [0] {@linkcode Utils.IntegerHolder} The move's type to be modified
|
||||||
|
* @returns true if the function succeeds
|
||||||
|
*/
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
if(!user.isGrounded)
|
if(!user.isGrounded)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const currentTerrain = user.scene.arena.getTerrainType();
|
const currentTerrain = user.scene.arena.getTerrainType();
|
||||||
const type = (args[0] as Utils.IntegerHolder); // the move's type
|
const type = (args[0] as Utils.IntegerHolder);
|
||||||
|
|
||||||
switch (currentTerrain) {
|
switch (currentTerrain) {
|
||||||
case TerrainType.MISTY:
|
case TerrainType.MISTY:
|
||||||
|
Loading…
Reference in New Issue
Block a user