# EndureAttr | pokemon-rogue-battle
Documentation for pokemon-rogue-battle

# Class EndureAttr

Base class defining all Move Effect Attributes

#### See

`apply`

#### Hierarchy (view full)

- ProtectAttr
  - EndureAttr

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

#####
Index

### Constructors

constructor

### Properties

firstHitOnly
selfTarget
tagType
trigger
turnCountMax
turnCountMin

### Methods

apply
canApply
getCondition
getFailedText
getTagChance
getTagTargetBenefitScore
getTargetBenefitScore
getUserBenefitScore

## Constructors

### constructor

- new EndureAttr(): EndureAttr

- #### Returns EndureAttr

  Overrides ProtectAttr.constructor

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

## Properties

### firstHitOnly

firstHitOnly: boolean

Should this effect only apply on the first hit?

Inherited from ProtectAttr.firstHitOnly

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

### selfTarget

selfTarget: boolean

Should this `Move` target the user?

Inherited from ProtectAttr.selfTarget

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

### tagType

tagType: BattlerTagType

Inherited from ProtectAttr.tagType

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

### trigger

trigger: MoveEffectTrigger

Defines when this effect should trigger in the move's effect order

#### See

MoveEffectPhase.start

Inherited from ProtectAttr.trigger

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

### turnCountMax

turnCountMax: number

Inherited from ProtectAttr.turnCountMax

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

### turnCountMin

turnCountMin: number

Inherited from ProtectAttr.turnCountMin

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

## Methods

### apply

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

- Applies move effects so long as they are able based on `canApply`

  #### Parameters

  - user: default
  - target: default
  - move: default
  - args: any[]

  #### Returns boolean

  Inherited from ProtectAttr.apply

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

### canApply

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

- Determines whether the `Move`'s effects are valid to `apply`

  #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` target of the move

  - move: default

    `Move` with this attribute

  - args: any[]

    Set of unique arguments needed by this attribute

  #### Returns boolean

  true if basic application of the ability attribute should be possible

  Inherited from ProtectAttr.canApply

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

### getCondition

- getCondition(): MoveConditionFunc

- #### Returns MoveConditionFunc

  the `MoveCondition` or MoveConditionFunc for this `Move`

  Inherited from ProtectAttr.getCondition

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

### 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 ProtectAttr.getFailedText

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

### getTagChance

- getTagChance(user, target, move): number

- #### Parameters

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

  #### Returns number

  Inherited from ProtectAttr.getTagChance

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

### getTagTargetBenefitScore

- getTagTargetBenefitScore(user, target, move): number

- #### Parameters

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

  #### Returns number

  Inherited from ProtectAttr.getTagTargetBenefitScore

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

### 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 ProtectAttr.getTargetBenefitScore

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

### 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 ProtectAttr.getUserBenefitScore

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