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

# Class DoubleBattleChanceBoosterModifier

Modifier used for passive items, specifically lures, that temporarily increases the chance of a double battle.

#### See

`apply`

#### Hierarchy (View Summary)

- LapsingPersistentModifier
  - DoubleBattleChanceBoosterModifier

- Defined in src/modifier/modifier.ts:456

##### Index

### Constructors

constructor

### Properties

stackCount
type
virtualStackCount

### Methods

add
apply
clone
getArgs
getBattleCount
getIcon
getIconStackText
getMaxBattles
getMaxStackCount
getStackCount
incrementStack
isIconVisible
lapse
match
resetBattleCount
setNewBattleCount
shouldApply

## Constructors

### constructor

- new DoubleBattleChanceBoosterModifier(
  type: ModifierType ,
  maxBattles: number,
  battleCount?: number,
  stackCount?: number,
  ): DoubleBattleChanceBoosterModifier

  #### Parameters

  - type: ModifierType
  - maxBattles: number
  - `Optional` battleCount: number
  - `Optional` stackCount: number

  #### Returns DoubleBattleChanceBoosterModifier

  Inherited from LapsingPersistentModifier.constructor

  - Defined in src/modifier/modifier.ts:350

## Properties

### stackCount

stackCount: number

Inherited from LapsingPersistentModifier.stackCount

- Defined in src/modifier/modifier.ts:186

### type

type: DoubleBattleChanceBoosterModifierType

Overrides LapsingPersistentModifier.type

- Defined in src/modifier/modifier.ts:457

### virtualStackCount

virtualStackCount: number

Inherited from LapsingPersistentModifier.virtualStackCount

- Defined in src/modifier/modifier.ts:187

## Methods

### add

- add(modifiers: PersistentModifier [], _virtual: boolean): boolean

  Goes through existing modifiers for any that match the selected modifier, which will then either add it to the existing modifiers if none were found or, if one was found, it will refresh battleCount.

  #### Parameters

  - modifiers: PersistentModifier []

    `PersistentModifier` array of the player's modifiers

  - _virtual: boolean

    N/A

  #### Returns boolean

  `true` if the modifier was successfully added or applied, false otherwise

  Inherited from LapsingPersistentModifier.add

  - Defined in src/modifier/modifier.ts:366

### apply

- apply(doubleBattleChance: NumberHolder ): boolean

  Increases the chance of a double battle occurring

  #### Parameters

  - doubleBattleChance: NumberHolder

    `NumberHolder` for double battle chance

  #### Returns boolean

  true

  Overrides LapsingPersistentModifier.apply

  - Defined in src/modifier/modifier.ts:477

### clone

- clone(): DoubleBattleChanceBoosterModifier

  #### Returns DoubleBattleChanceBoosterModifier

  Overrides LapsingPersistentModifier.clone

  - Defined in src/modifier/modifier.ts:463

### getArgs

- getArgs(): any[]

  #### Returns any[]

  Inherited from LapsingPersistentModifier.getArgs

  - Defined in src/modifier/modifier.ts:440

### getBattleCount

- getBattleCount(): number

  #### Returns number

  Inherited from LapsingPersistentModifier.getBattleCount

  - Defined in src/modifier/modifier.ts:420

### getIcon

- getIcon(): Container

  #### Returns Container

  Inherited from LapsingPersistentModifier.getIcon

  - Defined in src/modifier/modifier.ts:394

### getIconStackText

- getIconStackText(_virtual?: boolean): null | BitmapText

  #### Parameters

  - `Optional`_virtual: boolean

  #### Returns null | BitmapText

  Inherited from LapsingPersistentModifier.getIconStackText

  - Defined in src/modifier/modifier.ts:416

### getMaxBattles

- getMaxBattles(): number

  #### Returns number

  Inherited from LapsingPersistentModifier.getMaxBattles

  - Defined in src/modifier/modifier.ts:436

### getMaxStackCount

- getMaxStackCount(_forThreshold?: boolean): number

  #### Parameters

  - `Optional`_forThreshold: boolean

  #### Returns number

  Inherited from LapsingPersistentModifier.getMaxStackCount

  - Defined in src/modifier/modifier.ts:444

### getStackCount

- getStackCount(): number

  #### Returns number

  Inherited from LapsingPersistentModifier.getStackCount

  - Defined in src/modifier/modifier.ts:229

### incrementStack

- incrementStack(amount: number, virtual: boolean): boolean

  #### Parameters

  - amount: number
  - virtual: boolean

  #### Returns boolean

  Inherited from LapsingPersistentModifier.incrementStack

  - Defined in src/modifier/modifier.ts:216

### isIconVisible

- isIconVisible(): boolean

  #### Returns boolean

  Inherited from LapsingPersistentModifier.isIconVisible

  - Defined in src/modifier/modifier.ts:235

### lapse

- lapse(..._args: unknown[]): boolean

  Lapses the battleCount by 1.

  #### Parameters

  - ..._args: unknown[]

    passed arguments (not in use here)

  #### Returns boolean

  `true` if the battleCount is greater than 0

  Inherited from LapsingPersistentModifier.lapse

  - Defined in src/modifier/modifier.ts:389

### match

- match(modifier: Modifier ): boolean

  #### Parameters

  - modifier: Modifier

  #### Returns boolean

  Overrides LapsingPersistentModifier.match

  - Defined in src/modifier/modifier.ts:459

### resetBattleCount

- resetBattleCount(): void

  #### Returns void

  Inherited from LapsingPersistentModifier.resetBattleCount

  - Defined in src/modifier/modifier.ts:424

### setNewBattleCount

- setNewBattleCount(count: number): void

  Updates an existing modifier with a new `maxBattles` and `battleCount`.

  #### Parameters

  - count: number

  #### Returns void

  Inherited from LapsingPersistentModifier.setNewBattleCount

  - Defined in src/modifier/modifier.ts:431

### shouldApply

- shouldApply(..._args: [doubleBattleChance: NumberHolder ]): boolean

  Checks if `Modifier` should be applied

  #### Parameters

  - ..._args: [doubleBattleChance: NumberHolder ]

    parameters passed to `Modifier.apply`

  #### Returns boolean

  always `true` by default

  Inherited from LapsingPersistentModifier.shouldApply

  - Defined in src/modifier/modifier.ts:174