Class

cwinter.codecraft.core.api

DroneSpec

Related Doc: package api

Permalink

case class DroneSpec(storageModules: Int = 0, missileBatteries: Int = 0, constructors: Int = 0, engines: Int = 0, shieldGenerators: Int = 0) extends Product with Serializable

Specifies the modules equipped by a drone and computes various properties of a Drone with this configuration of modules.

Currently, the total number of modules is currently limited to 10 but this restriction will likely be lifted in the future.

storageModules

Number of storage modules. Allows for storage of mineral crystals and energy globes.

missileBatteries

Number of missile batteries. Allows for firing homing missiles.

constructors

Number of constructors. Allows for constructing new drones and moving minerals from/to other drones.

engines

Number of engines. Increases move speed.

shieldGenerators

Number of shield generators. Gives the drone an additional 7 hitpoints each. Shields regenerate over time.

Annotations
@JSExportAll()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DroneSpec
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DroneSpec()

    Permalink
  2. new DroneSpec(storageModules: Int = 0, missileBatteries: Int = 0, constructors: Int = 0, engines: Int = 0, shieldGenerators: Int = 0)

    Permalink

    storageModules

    Number of storage modules. Allows for storage of mineral crystals and energy globes.

    missileBatteries

    Number of missile batteries. Allows for firing homing missiles.

    constructors

    Number of constructors. Allows for constructing new drones and moving minerals from/to other drones.

    engines

    Number of engines. Increases move speed.

    shieldGenerators

    Number of shield generators. Gives the drone an additional 7 hitpoints each. Shields regenerate over time.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def buildTime: Int

    Permalink

    Returns the number of timesteps it will take to build a drone of this size.

    Returns the number of timesteps it will take to build a drone of this size. This time will be reduced if the constructing drone has more than one constructor module, e.g. with two constructor modules it will take half as long.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val constructors: Int

    Permalink

    Number of constructors.

    Number of constructors. Allows for constructing new drones and moving minerals from/to other drones.

  8. val engines: Int

    Permalink

    Number of engines.

    Number of engines. Increases move speed.

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. def maxHitpoints: Int

    Permalink

    Returns the amount of hitpoints that a drone with this spec will have when it is at full health.

  14. def maxSpeed: Float

    Permalink

    Returns the speed of a drone with this spec, measured in units distance per timestep.

  15. val missileBatteries: Int

    Permalink

    Number of missile batteries.

    Number of missile batteries. Allows for firing homing missiles.

  16. val moduleCount: Int

    Permalink

    Total number of modules.

  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. val radius: Float

    Permalink

    Returns the radius for a drone with this spec.

    Returns the radius for a drone with this spec. The radius is used to compute collisions with projectiles or other drones.

  21. def resourceCost: Int

    Permalink

    Returns the amount of resources it will cost to build a drone with this spec.

  22. val shieldGenerators: Int

    Permalink

    Number of shield generators.

    Number of shield generators. Gives the drone an additional 7 hitpoints each. Shields regenerate over time.

  23. val sides: Int

    Permalink

    The number of sides that the drone will have.

    The number of sides that the drone will have. E.g. a drone with two modules will be rectangular shaped and therefore has 4 sides.

  24. val storageModules: Int

    Permalink

    Number of storage modules.

    Number of storage modules. Allows for storage of mineral crystals and energy globes.

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def weight: Int

    Permalink

    Returns the weight of a drone with this spec.

    Returns the weight of a drone with this spec. Weight increases with sides and module count and a higher weight leads to a slower movement speed.

  30. def withConstructors(constructors: Int): DroneSpec

    Permalink

    Returns a copy of this object with constructors set to the specified value.

  31. def withEngines(engines: Int): DroneSpec

    Permalink

    Returns a copy of this object with engines set to the specified value.

  32. def withMissileBatteries(missileBatteries: Int): DroneSpec

    Permalink

    Returns a copy of this object with missileBatteries set to the specified value.

  33. def withShieldGenerators(shieldGenerators: Int): DroneSpec

    Permalink

    Returns a copy of this object with shieldGenerators set to the specified value.

  34. def withStorageModules(storageModules: Int): DroneSpec

    Permalink

    Returns a copy of this object with storageModules set to the specified value.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped