# Class default

#### Hierarchy (view full)

- default
  - AttackMove
  - StatusMove
  - SelfStatusMove

#### Implements

- Localizable

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

#####
Index

### Constructors

constructor

### Properties

accuracy
attrs
category
chance
conditions
defaultType
effect
flags
generation
id
moveTarget
name
nameAppend
power
pp
priority
type

### Methods

addAttr
applyConditions
attr
ballBombMove
bitingMove
checkAllHits
checkFlag
condition
danceMove
findAttr
getAttrs
getFailedText
getTargetBenefitScore
getUserBenefitScore
hasAttr
hasFlag
hidesTarget
hidesUser
ignoresAbilities
ignoresProtect
ignoresVirtual
isAllyTarget
isMultiTarget
isTypeImmune
localize
makesContact
partial
powderMove
pulseMove
punchingMove
recklessMove
setFlag
slicingMove
soundBased
target
triageMove
unimplemented
windMove

## Constructors

### constructor

- new default(id, type, category, defaultMoveTarget, power, accuracy, pp, chance, priority, generation): default

- #### Parameters

  - id: Moves
  - type: Type
  - category: MoveCategory
  - defaultMoveTarget: MoveTarget
  - power: number
  - accuracy: number
  - pp: number
  - chance: number
  - priority: number
  - generation: number

  #### Returns default

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

## Properties

### accuracy

accuracy: number

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

### attrs

attrs: MoveAttr []

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

### category

category: MoveCategory

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

### chance

chance: number

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

### `Private` conditions

conditions: MoveCondition []

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

### defaultType

defaultType: Type

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

### effect

effect: string

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

### `Private` flags

flags: number

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

### generation

generation: number

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

### id

id: Moves

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

### moveTarget

moveTarget: MoveTarget

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

### name

name: string

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

### `Private` nameAppend

nameAppend: string

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

### power

power: number

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

### pp

pp: number

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

### priority

priority: number

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

### type

type: Type

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

## Methods

### addAttr

- addAttr(attrAdd): this

- Adds a new MoveAttr to the move (appends to the attr array) if the MoveAttr also comes with a condition, also adds that to the conditions array: `MoveCondition` Almost identical to attr, except you are passing in a MoveAttr object, instead of a constructor and it's arguments

  #### Parameters

  - attrAdd: MoveAttr

    `MoveAttr` the attribute to add

  #### Returns this

  the called object `Move`

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

### applyConditions

- applyConditions(user, target, move): boolean

- Applies each `MoveCondition` of this move to the params

  #### Parameters

  - user: default

    `Pokemon` to apply conditions to

  - target: default

    `Pokemon` to apply conditions to

  - move: default

    `Move` to apply conditions to

  #### Returns boolean

  boolean: false if any of the apply()'s return false, else true

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

### attr

- attr< T >(AttrType, ...args): this

- Adds a new MoveAttr to the move (appends to the attr array) if the MoveAttr also comes with a condition, also adds that to the conditions array: `MoveCondition`

  #### Type Parameters

  - T extends (new (...args) => MoveAttr )

  #### Parameters

  - AttrType: T

    `MoveAttr` the constructor of a MoveAttr class

  - `Rest` ...args: ConstructorParameters< T >

    the args needed to instantiate a the given class

  #### Returns this

  the called object `Move`

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

### ballBombMove

- ballBombMove(ballBombMove?): this

- Sets the `MoveFlags.BALLBOMB_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` ballBombMove: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.ELECTRO_BALL`

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

### bitingMove

- bitingMove(bitingMove?): this

- Sets the `MoveFlags.BITING_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` bitingMove: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.BITE`

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

### checkAllHits

- checkAllHits(checkAllHits?): this

- Sets the `MoveFlags.CHECK_ALL_HITS` flag for the calling Move

  #### Parameters

  - `Optional` checkAllHits: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.TRIPLE_AXEL`

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

### checkFlag

- checkFlag(flag, user, target): boolean

- Checks if the move flag applies to the pokemon(s) using/receiving the move

  #### Parameters

  - flag: MoveFlags

    `MoveFlags` MoveFlag to check on user and/or target

  - user: default

    `Pokemon` the Pokemon using the move

  - target: default

    `Pokemon` the Pokemon receiving the move

  #### Returns boolean

  boolean

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

### condition

- condition(condition): this

- Adds a move condition to the move

  #### Parameters

  - condition: MoveCondition | MoveConditionFunc

    `MoveCondition` or MoveConditionFunc, appends to conditions array a new MoveCondition object

  #### Returns this

  the called object `Move`

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

### danceMove

- danceMove(danceMove?): this

- Sets the `MoveFlags.DANCE_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` danceMove: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.PETAL_DANCE`

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

### findAttr

- findAttr(attrPredicate): MoveAttr

- Takes as input a boolean function and returns the first MoveAttr in attrs that matches true

  #### Parameters

  - attrPredicate: ((attr) => boolean)
    - - (attr): boolean

      - #### Parameters

        - attr: MoveAttr

        #### Returns boolean

  #### Returns MoveAttr

  the first `MoveAttr` element in attrs that makes the input function return true

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

### getAttrs

- getAttrs< T >(attrType): T []

- Get all move attributes that match `attrType`

  #### Type Parameters

  - T extends MoveAttr

  #### Parameters

  - attrType: (new (...args) => T )

    any attribute that extends `MoveAttr`

    - - new (...args): T

      - #### Parameters

        - `Rest` ...args: any[]

        #### Returns T

  #### Returns T []

  Array of attributes that match `attrType`, Empty Array if none match.

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

### getFailedText

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

- Sees if, given the target pokemon, a move fails on it (by looking at each `MoveAttr` of this move

  #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` receiving the move

  - move: default

    `Move` using the move

  - cancelled: BooleanHolder

    `Utils.BooleanHolder` to hold boolean value

  #### Returns string

  string of the failed text, or null

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

### getTargetBenefitScore

- getTargetBenefitScore(user, target, move): number

- Calculates the targetBenefitScore across all the attributes

  #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` receiving the move

  - move: default

    `Move` using the move

  #### Returns number

  integer representing the total benefitScore

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

### getUserBenefitScore

- getUserBenefitScore(user, target, move): number

- Calculates the userBenefitScore across all the attributes and conditions

  #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` receiving the move

  - move: default

    `Move` using the move

  #### Returns number

  integer representing the total benefitScore

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

### hasAttr

- hasAttr< T >(attrType): boolean

- Check if a move has an attribute that matches `attrType`

  #### Type Parameters

  - T extends MoveAttr

  #### Parameters

  - attrType: (new (...args) => T )

    any attribute that extends `MoveAttr`

    - - new (...args): T

      - #### Parameters

        - `Rest` ...args: any[]

        #### Returns T

  #### Returns boolean

  true if the move has attribute `attrType`

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

### hasFlag

- hasFlag(flag): boolean

- Getter function that returns if this Move has a MoveFlag

  #### Parameters

  - flag: MoveFlags

    `MoveFlags` to check

  #### Returns boolean

  boolean

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

### hidesTarget

- hidesTarget(hidesTarget?): this

- Sets the `MoveFlags.HIDE_TARGET` flag for the calling Move

  #### Parameters

  - `Optional` hidesTarget: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.WHIRLWIND`

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

### hidesUser

- hidesUser(hidesUser?): this

- Sets the `MoveFlags.HIDE_USER` flag for the calling Move

  #### Parameters

  - `Optional` hidesUser: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.TELEPORT`

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

### ignoresAbilities

- ignoresAbilities(ignoresAbilities?): this

- Sets the `MoveFlags.IGNORE_ABILITIES` flag for the calling Move

  #### Parameters

  - `Optional` ignoresAbilities: boolean

    sThe value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.SUNSTEEL_STRIKE`

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

### ignoresProtect

- ignoresProtect(ignoresProtect?): this

- Sets the `MoveFlags.IGNORE_PROTECT` flag for the calling Move

  #### Parameters

  - `Optional` ignoresProtect: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.CURSE`

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

### ignoresVirtual

- ignoresVirtual(ignoresVirtual?): this

- Sets the `MoveFlags.IGNORE_VIRTUAL` flag for the calling Move

  #### Parameters

  - `Optional` ignoresVirtual: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.NATURE_POWER`

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

### isAllyTarget

- isAllyTarget(): boolean

- Getter function that returns if the move targets itself or an ally

  #### Returns boolean

  boolean

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

### isMultiTarget

- isMultiTarget(): boolean

- Getter function that returns if the move hits multiple targets

  #### Returns boolean

  boolean

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

### isTypeImmune

- isTypeImmune(type): boolean

- Checks if the move is immune to certain types currently only look at case of Grass types and powder moves

  #### Parameters

  - type: Type

    `Type` enum

  #### Returns boolean

  boolean

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

### localize

- localize(): void

- #### Returns void

  Implementation of Localizable.localize

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

### makesContact

- makesContact(makesContact?): this

- Sets the `MoveFlags.MAKES_CONTACT` flag for the calling Move

  #### Parameters

  - `Optional` makesContact: boolean

    The value (boolean) to set the flag to

  #### Returns this

  The `Move` that called this function

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

### partial

- partial(): this

- Marks the move as "partial": appends texts to the move name

  #### Returns this

  the called object `Move`

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

### powderMove

- powderMove(powderMove?): this

- Sets the `MoveFlags.POWDER_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` powderMove: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.STUN_SPORE`

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

### pulseMove

- pulseMove(pulseMove?): this

- Sets the `MoveFlags.PULSE_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` pulseMove: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.WATER_PULSE`

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

### punchingMove

- punchingMove(punchingMove?): this

- Sets the `MoveFlags.PUNCHING_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` punchingMove: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.DRAIN_PUNCH`

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

### recklessMove

- recklessMove(recklessMove?): this

- Sets the `MoveFlags.RECKLESS_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` recklessMove: boolean

    The value to set the flag to

  #### Returns this

  The `Move` that called this function

  #### See

  `Abilities.RECKLESS`

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

### `Private` setFlag

- setFlag(flag, on): void

- Sets the flags of the move

  #### Parameters

  - flag: MoveFlags

    `MoveFlags`

  - on: boolean

    a boolean, if True, then "ORs" the flag onto existing ones, if False then "XORs" the flag onto existing ones

  #### Returns void

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

### slicingMove

- slicingMove(slicingMove?): this

- Sets the `MoveFlags.SLICING_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` slicingMove: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.X_SCISSOR`

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

### soundBased

- soundBased(soundBased?): this

- Sets the `MoveFlags.SOUND_BASED` flag for the calling Move

  #### Parameters

  - `Optional` soundBased: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.UPROAR`

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

### target

- target(moveTarget): this

- Sets the move target of this move

  #### Parameters

  - moveTarget: MoveTarget

    `MoveTarget` the move target to set

  #### Returns this

  the called object `Move`

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

### triageMove

- triageMove(triageMove?): this

- Sets the `MoveFlags.TRIAGE_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` triageMove: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.ABSORB`

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

### unimplemented

- unimplemented(): this

- Marks the move as "unimplemented": appends texts to the move name

  #### Returns this

  the called object `Move`

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

### windMove

- windMove(windMove?): this

- Sets the `MoveFlags.WIND_MOVE` flag for the calling Move

  #### Parameters

  - `Optional` windMove: boolean

    The value (boolean) to set the flag to example:

  #### Returns this

  The `Move` that called this function

  #### See

  `Moves.HURRICANE`

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