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

# Class ContactHeldItemTransferChanceModifier

Modifier for held items that add a chance to steal items from the target of a successful attack.

#### See

- `[GRIP_CLAW]`
- `HeldItemTransferModifier`

#### Hierarchy (View Summary)

- HeldItemTransferModifier
  - ContactHeldItemTransferChanceModifier

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

##### Index

### Constructors

constructor

### Properties

chance
isTransferable
pokemonId
stackCount
type
virtualStackCount

### Methods

add
apply
clone
getArgs
getIcon
getIconStackText
getMaxHeldItemCount
getMaxStackCount
getPokemon
getScoreMultiplier
getStackCount
getTargets
getTransferMessage
getTransferredItemCount
incrementStack
isIconVisible
match
matchType
shouldApply

## Constructors

### constructor

- new ContactHeldItemTransferChanceModifier(
  type: ModifierType ,
  pokemonId: number,
  chancePercent: number,
  stackCount?: number,
  ): ContactHeldItemTransferChanceModifier

  #### Parameters

  - type: ModifierType
  - pokemonId: number
  - chancePercent: number
  - `Optional` stackCount: number

  #### Returns ContactHeldItemTransferChanceModifier

  Overrides HeldItemTransferModifier.constructor

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

## Properties

### `Readonly` chance

chance: number

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

### isTransferable

isTransferable: boolean = true

Inherited from HeldItemTransferModifier.isTransferable

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

### pokemonId

pokemonId: number

Inherited from HeldItemTransferModifier.pokemonId

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

### stackCount

stackCount: number

Inherited from HeldItemTransferModifier.stackCount

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

### type

type: ModifierType

Inherited from HeldItemTransferModifier.type

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

### virtualStackCount

virtualStackCount: number

Inherited from HeldItemTransferModifier.virtualStackCount

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

## Methods

### add

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

  #### Parameters

  - modifiers: PersistentModifier []
  - virtual: boolean

  #### Returns boolean

  Inherited from HeldItemTransferModifier.add

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

### apply

- apply(pokemon: default , target?: default , ..._args: unknown[]): boolean

  Steals an item from a set of target Pokemon. This prioritizes high-tier held items when selecting the item to steal.

  #### Parameters

  - pokemon: default

    The `Pokemon` holding this item

  - `Optional` target: default

    The `Pokemon` to steal from (optional)

  - ..._args: unknown[]

    N/A

  #### Returns boolean

  `true` if an item was stolen; false otherwise.

  Inherited from HeldItemTransferModifier.apply

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

### clone

- clone(): ContactHeldItemTransferChanceModifier

  #### Returns ContactHeldItemTransferChanceModifier

  Overrides HeldItemTransferModifier.clone

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

### getArgs

- getArgs(): any[]

  #### Returns any[]

  Overrides HeldItemTransferModifier.getArgs

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

### getIcon

- getIcon(forSummary?: boolean): Container

  #### Parameters

  - `Optional` forSummary: boolean

  #### Returns Container

  Inherited from HeldItemTransferModifier.getIcon

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

### getIconStackText

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

  #### Parameters

  - `Optional` virtual: boolean

  #### Returns null | BitmapText

  Inherited from HeldItemTransferModifier.getIconStackText

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

### getMaxHeldItemCount

- getMaxHeldItemCount(_pokemon: default ): number

  #### Parameters

  - _pokemon: default

  #### Returns number

  Overrides HeldItemTransferModifier.getMaxHeldItemCount

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

### getMaxStackCount

- getMaxStackCount(forThreshold?: boolean): number

  #### Parameters

  - `Optional` forThreshold: boolean

  #### Returns number

  Inherited from HeldItemTransferModifier.getMaxStackCount

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

### getPokemon

- getPokemon(): undefined | default

  #### Returns undefined | default

  Inherited from HeldItemTransferModifier.getPokemon

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

### getScoreMultiplier

- getScoreMultiplier(): number

  #### Returns number

  Inherited from HeldItemTransferModifier.getScoreMultiplier

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

### getStackCount

- getStackCount(): number

  #### Returns number

  Inherited from HeldItemTransferModifier.getStackCount

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

### getTargets

- getTargets(_holderPokemon: default , targetPokemon: default ): default []

  Determines the target to steal items from when this applies.

  #### Parameters

  - _holderPokemon: default

    The `Pokemon` holding this item

  - targetPokemon: default

    The `Pokemon` the holder is targeting with an attack

  #### Returns default []

  The target `Pokemon` as array for further use in `apply` implementations

  Overrides HeldItemTransferModifier.getTargets

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

### getTransferMessage

- getTransferMessage(
  pokemon: default ,
  targetPokemon: default ,
  item: ModifierType ,
  ): string

  #### Parameters

  - pokemon: default
  - targetPokemon: default
  - item: ModifierType

  #### Returns string

  Overrides HeldItemTransferModifier.getTransferMessage

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

### getTransferredItemCount

- getTransferredItemCount(): number

  #### Returns number

  Overrides HeldItemTransferModifier.getTransferredItemCount

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

### incrementStack

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

  #### Parameters

  - amount: number
  - virtual: boolean

  #### Returns boolean

  Inherited from HeldItemTransferModifier.incrementStack

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

### isIconVisible

- isIconVisible(): boolean

  #### Returns boolean

  Inherited from HeldItemTransferModifier.isIconVisible

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

### match

- match(modifier: Modifier ): boolean

  #### Parameters

  - modifier: Modifier

  #### Returns boolean

  Inherited from HeldItemTransferModifier.match

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

### matchType

- matchType(modifier: Modifier ): boolean

  #### Parameters

  - modifier: Modifier

  #### Returns boolean

  Overrides HeldItemTransferModifier.matchType

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

### shouldApply

- shouldApply(pokemon?: default , ..._args: unknown[]): boolean

  Checks if `PokemonHeldItemModifier` should be applied.

  #### Parameters

  - `Optional` pokemon: default

    The `Pokemon` that holds the item

  - ..._args: unknown[]

    N/A

  #### Returns boolean

  if `PokemonHeldItemModifier` should be applied

  Inherited from HeldItemTransferModifier.shouldApply

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