Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ActionExecutor<A, E, R, AV>

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

  • Parameters

    • Optional action: IActionDescription<A, E>
    • Default value type: undefined | number = action && action.type!

    Returns ActionExecutor

Properties

Readonly event

event: IEventEmitter<this, ActionEvents> = new EventEmitter<this, E>(this)

Readonly type

Accessors

actionStack

  • Returns ActionType[]

executor

  • get executor(): E
  • Returns E

lastAction

  • Returns ActionType

Methods

addItems

  • addItems(...addItems: Array<Item | undefined>): this
  • Parameters

    • Rest ...addItems: Array<Item | undefined>

    Returns this

addSkillGains

  • addSkillGains(...skills: Array<[]>): this
  • addSkillGains(skill: SkillType, amount?: undefined | number, actionTier?: undefined | number, bypass?: undefined | true): this
  • Parameters

    • Rest ...skills: Array<[]>

    Returns this

  • Parameters

    • skill: SkillType
    • Optional amount: undefined | number
    • Optional actionTier: undefined | number
    • Optional bypass: undefined | true

    Returns this

cancelPaddling

  • cancelPaddling(item: Item): this

confirmItemsBroken

  • confirmItemsBroken(): Promise<any>
  • Returns Promise<any>

execute

  • execute(actionApi: IActionApi<E>, ...args: AV): R
  • execute(executor: E, ...args: AV): R
  • Parameters

    Returns R

  • Parameters

    • executor: E
    • Rest ...args: AV

    Returns R

getItems

  • getItems(): Stream<Item>
  • Returns Stream<Item>

isArgumentType

  • isArgumentType<AA>(argument: any, index: number, argumentType: AA): argument is ActionArgumentTypeMap<AA>
  • Type parameters

    Parameters

    • argument: any
    • index: number
    • argumentType: AA

    Returns argument is ActionArgumentTypeMap<AA>

removeItems

  • removeItems(...items: Array<Item | undefined>): this
  • Parameters

    • Rest ...items: Array<Item | undefined>

    Returns this

setDelay

  • setDelay(delay: number, replace?: undefined | false | true): this
  • Parameters

    • delay: number
    • Optional replace: undefined | false | true

    Returns this

setItemsUsed

  • setItemsUsed(used?: boolean): this
  • Parameters

    • Default value used: boolean = true

    Returns this

setMilestone

  • setMilestone(milestone: Milestone, data?: undefined | number): this
  • Parameters

    • milestone: Milestone
    • Optional data: undefined | number

    Returns this

setParticle

  • setParticle(color: IRGB, inFront?: undefined | false | true): this
  • setParticle(color: IRGB, count?: undefined | number, inFront?: undefined | false | true): this
  • setParticle(particle: IActionParticle): this
  • Parameters

    • color: IRGB
    • Optional inFront: undefined | false | true

    Returns this

  • Parameters

    • color: IRGB
    • Optional count: undefined | number
    • Optional inFront: undefined | false | true

    Returns this

  • Parameters

    Returns this

setPassTurn

  • setPassTurn(turnType?: TurnType): this
  • Parameters

    Returns this

setReputationChange

  • setReputationChange(amount: number): this
  • Parameters

    • amount: number

    Returns this

setSoundEffect

  • setSoundEffect(soundEffect: IActionSoundEffect): this
  • setSoundEffect(type: SfxType, inFront?: undefined | false | true): this

setStaminaReduction

  • setStaminaReduction(reduction?: SkillType, actionTier?: undefined | number): this
  • Parameters

    • Optional reduction: SkillType
    • Optional actionTier: undefined | number

    Returns this

setUpdateRender

  • setUpdateRender(): this

setUpdateTablesAndWeight

  • setUpdateTablesAndWeight(): this

setUpdateView

  • setUpdateView(updateFov?: boolean): this
  • Parameters

    • Default value updateFov: boolean = false

    Returns this

skipConfirmation

  • skipConfirmation(): this
  • Returns this

Static executeMultiplayer

Static get

  • get<D>(action: D): D extends IActionDescription<infer A, infer E, infer R, infer AV> ? ActionExecutor<A, E, R, AV> : never
  • Gets an action by its description. If you're using the Action class for constructing the descriptions, just pass the action instance.

    Note: Prefer IActionApi.get if you're calling this from within another action.

    Type parameters

    Parameters

    • action: D

    Returns D extends IActionDescription<infer A, infer E, infer R, infer AV> ? ActionExecutor<A, E, R, AV> : never

Generated using TypeDoc