Function getBodypartsPower

  • Compute the power of active bodyparts for a given action

    Parameters

    • body: readonly ({} | {} | {} | {} | {} | {} | {} | {})[]

      Array of bodyparts Creep.body

    • action: "harvest" | "build" | "repair" | "dismantle" | "upgradeController" | "attack" | "rangedAttack" | "heal" | "rangedHeal"

      expected action

    Returns number

    power for the given action

Generated using TypeDoc