# Class IncrementMovePriorityAttr

Attribute used for moves that change priority in a turn given a condition, e.g. Grassy Glide Called when move order is calculated in TurnStartPhase.

#### See

`apply`

#### Hierarchy (view full)

- MoveAttr
  - IncrementMovePriorityAttr

- Defined in src/data/move.ts:1505

#####
Index

### Constructors

constructor

### Properties

increaseAmount
moveIncrementFunc
selfTarget

### Methods

apply
getCondition
getFailedText
getTargetBenefitScore
getUserBenefitScore

## Constructors

### constructor

- new IncrementMovePriorityAttr(moveIncrementFunc, increaseAmount?): IncrementMovePriorityAttr

- #### Parameters

  - moveIncrementFunc: ((pokemon, target, move) => boolean)
    - - (pokemon, target, move): boolean

      - #### Parameters

        - pokemon: default
        - target: default
        - move: default

        #### Returns boolean

  - increaseAmount: number = 1

  #### Returns IncrementMovePriorityAttr

  Overrides MoveAttr.constructor

  - Defined in src/data/move.ts:1511

## Properties

### `Private` increaseAmount

increaseAmount: number

The amount to increment priority by, if condition passes.

- Defined in src/data/move.ts:1509

### `Private` moveIncrementFunc

moveIncrementFunc: ((pokemon, target, move) => boolean)

The condition for a move's priority being incremented

#### Type declaration

- - (pokemon, target, move): boolean

  - #### Parameters

    - pokemon: default
    - target: default
    - move: default

    #### Returns boolean

- Defined in src/data/move.ts:1507

### selfTarget

selfTarget: boolean

Should this `Move` target the user?

Inherited from MoveAttr.selfTarget

- Defined in src/data/move.ts:718

## Methods

### apply

- apply(user, target, move, args): boolean

- Increments move priority by set amount if condition passes

  #### Parameters

  - user: default

    `Pokemon` using this move

  - target: default

    `Pokemon` target of this move

  - move: default

    `Move` being used

  - args: any[]

    [0] `Utils.IntegerHolder` for move priority.

  #### Returns boolean

  true if function succeeds

  Overrides MoveAttr.apply

  - Defined in src/data/move.ts:1526

### getCondition

- getCondition(): MoveCondition | MoveConditionFunc

- #### Returns MoveCondition | MoveConditionFunc

  the `MoveCondition` or MoveConditionFunc for this `Move`

  Inherited from MoveAttr.getCondition

  - Defined in src/data/move.ts:742

### getFailedText

- getFailedText(user, target, move, cancelled): string

- #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` target of the move

  - move: default

    `Move` with this attribute

  - cancelled: BooleanHolder

    `Utils.BooleanHolder` which stores if the move should fail

  #### Returns string

  the string representing failure of this `Move`

  Inherited from MoveAttr.getFailedText

  - Defined in src/data/move.ts:754

### getTargetBenefitScore

- getTargetBenefitScore(user, target, move): number

- Used by the Enemy AI to rank an attack based on a given target

  #### Parameters

  - user: default
  - target: default
  - move: default

  #### Returns number

  #### See

  `EnemyPokemon.getNextMove`

  Inherited from MoveAttr.getTargetBenefitScore

  - Defined in src/data/move.ts:772

### getUserBenefitScore

- getUserBenefitScore(user, target, move): number

- Used by the Enemy AI to rank an attack based on a given user

  #### Parameters

  - user: default
  - target: default
  - move: default

  #### Returns number

  #### See

  `EnemyPokemon.getNextMove`

  Inherited from MoveAttr.getUserBenefitScore

  - Defined in src/data/move.ts:763