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

# Class TempCritBoosterModifier

Modifier used for party-wide items, namely Dire Hit, that temporarily increments the critical-hit stage

#### See

`apply`

#### Hierarchy (View Summary)

- LapsingPersistentModifier
  - TempCritBoosterModifier

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

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

  #### Parameters

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

  #### Returns TempCritBoosterModifier

  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 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(critLevel: NumberHolder ): boolean

  Increases the current critical-hit stage value by 1.

  #### Parameters

  - critLevel: NumberHolder

    `NumberHolder` that holds the resulting critical-hit level

  #### Returns boolean

  `true` if the critical-hit stage boost applies successfully

  Overrides LapsingPersistentModifier.apply

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

### clone

- clone(): TempCritBoosterModifier

  #### Returns TempCritBoosterModifier

  Overrides LapsingPersistentModifier.clone

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

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

### 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(critLevel?: NumberHolder ): boolean

  Checks if args contains the necessary elements.

  #### Parameters

  - `Optional` critLevel: NumberHolder

    `NumberHolder` that holds the resulting critical-hit level

  #### Returns boolean

  `true` if the critical-hit stage boost applies successfully

  Overrides LapsingPersistentModifier.shouldApply

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