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

# Class TempExtraModifierModifier

Modifier used for timed boosts to the player's shop item rewards.

#### See

`apply`

#### Hierarchy (View Summary)

- LapsingPersistentModifier
  - TempExtraModifierModifier

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

##### 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 TempExtraModifierModifier(
  type: ModifierType ,
  maxBattles: number,
  battleCount?: number,
  stackCount?: number,
  ): TempExtraModifierModifier

  #### Parameters

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

  #### Returns TempExtraModifierModifier

  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: ModifierType

Inherited from LapsingPersistentModifier.type

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

### 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 Silver Pokeball, which will then add the max count of the new item to the existing count of the current item. If no existing Silver Pokeballs are found, will add a new one.

  #### 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

  Overrides LapsingPersistentModifier.add

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

### apply

- apply(count: NumberHolder ): boolean

  Increases the current rewards in the battle by the `stackCount`.

  #### Parameters

  - count: NumberHolder

    `NumberHolder` that holds the resulting shop item reward count

  #### Returns boolean

  `true` if the shop reward number modifier applies successfully

  Overrides LapsingPersistentModifier.apply

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

### clone

- clone(): TempExtraModifierModifier

  #### Returns TempExtraModifierModifier

  Overrides LapsingPersistentModifier.clone

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

### 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:3457

### 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: [count: NumberHolder ]): boolean

  Checks if `Modifier` should be applied

  #### Parameters

  - ..._args: [count: NumberHolder ]

    parameters passed to `Modifier.apply`

  #### Returns boolean

  always `true` by default

  Inherited from LapsingPersistentModifier.shouldApply

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