# Class PostTurnLootAbAttr

After the turn ends, try to create an extra item

#### Hierarchy (view full)

- PostTurnAbAttr
  - PostTurnLootAbAttr

- Defined in src/data/ability.ts:2541

#####
Index

### Constructors

constructor

### Properties

itemType
procChance
showAbility

### Methods

addCondition
apply
applyPostTurn
createEatenBerry
getCondition
getTriggerMessage

## Constructors

### constructor

- new PostTurnLootAbAttr(itemType, procChance): PostTurnLootAbAttr

- #### Parameters

  - itemType: "EATEN_BERRIES" | "HELD_BERRIES"

    The type of item to create

  - procChance: ((pokemon) => number)

    Chance to create an item

    - - (pokemon): number

      - #### Parameters

        - pokemon: default

        #### Returns number

  #### Returns PostTurnLootAbAttr

  #### See

  `()`

  Overrides PostTurnAbAttr.constructor

  - Defined in src/data/ability.ts:2547

## Properties

### `Private` itemType

itemType: "EATEN_BERRIES" | "HELD_BERRIES"

Extend itemType to add more options

- Defined in src/data/ability.ts:2549

### `Private` procChance

procChance: ((pokemon) => number)

Chance to create an item

#### Type declaration

- - (pokemon): number

  - #### Parameters

    - pokemon: default

    #### Returns number

- Defined in src/data/ability.ts:2550

### showAbility

showAbility: boolean

Inherited from PostTurnAbAttr.showAbility

- Defined in src/data/ability.ts:126

## Methods

### addCondition

- addCondition(condition): AbAttr

- #### Parameters

  - condition: AbAttrCondition

  #### Returns AbAttr

  Inherited from PostTurnAbAttr.addCondition

  - Defined in src/data/ability.ts:145

### apply

- apply(pokemon, passive, cancelled, args): boolean | Promise<boolean>

- #### Parameters

  - pokemon: default
  - passive: boolean
  - cancelled: BooleanHolder
  - args: any[]

  #### Returns boolean | Promise<boolean>

  Inherited from PostTurnAbAttr.apply

  - Defined in src/data/ability.ts:133

### applyPostTurn

- applyPostTurn(pokemon, passive, args): boolean

- #### Parameters

  - pokemon: default
  - passive: boolean
  - args: any[]

  #### Returns boolean

  Overrides PostTurnAbAttr.applyPostTurn

  - Defined in src/data/ability.ts:2555

### createEatenBerry

- createEatenBerry(pokemon): boolean

- Create a new berry chosen randomly from the berries the pokemon ate this battle

  #### Parameters

  - pokemon: default

    The pokemon with this ability

  #### Returns boolean

  whether a new berry was created

  - Defined in src/data/ability.ts:2574

### getCondition

- getCondition(): AbAttrCondition

- #### Returns AbAttrCondition

  Inherited from PostTurnAbAttr.getCondition

  - Defined in src/data/ability.ts:141

### getTriggerMessage

- getTriggerMessage(pokemon, abilityName, ...args): string

- #### Parameters

  - pokemon: default
  - abilityName: string
  - `Rest` ...args: any[]

  #### Returns string

  Inherited from PostTurnAbAttr.getTriggerMessage

  - Defined in src/data/ability.ts:137