Combatant

scalata.domain.entities.components.Combatant
trait Combatant[E]

Entity that can engage in combat.

  • attackPower – base damage dealt by the entity.

  • attack – pure function: returns a new instance of the opponent after damage has been applied.

Type parameters

E

concrete opponent type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Enemy
class Player

Members list

Value members

Abstract methods

def attack(opponent: E): E

Resolve an attack against opponent.

Resolve an attack against opponent.

Attributes

Abstract fields

val attackPower: Int