scalata.domain.entities

Members list

Type members

Classlikes

final case class Enemy(id: String, name: String, enemyType: EnemyClasses, position: Point2D, health: Int, maxHealth: Int, attackPower: Int) extends Entity, Alive[Enemy], Movable[Enemy], Combatant[Player]

Hostile creature.

Hostile creature.

  • enemyType – family/glyph (goblin, pig, …).

  • position – current tile.

  • health / maxHealth – hit-points pool.

  • attackPower – raw damage inflicted to a player.

All mutators return a new Enemy; no in-place changes.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Combatant[Player]
trait Movable[Enemy]
trait Alive[Enemy]
trait Entity
class Object
trait Matchable
class Any
Show all
trait Entity

Base type for any in-game object that must be identifiable.

Base type for any in-game object that must be identifiable.

  • id – unique key, stable for the whole run

  • name – human-readable label

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Enemy
trait Item
class Dust
class ExitDoor
class Potion
class Sign
class Weapon
class Player
Show all
trait Item extends Entity, Interactable

Base trait for every pick-able game object (potions, weapons, etc.).

Base trait for every pick-able game object (potions, weapons, etc.).

Attributes

Supertypes
trait Interactable
trait Entity
class Object
trait Matchable
class Any
Known subtypes
class Dust
class ExitDoor
class Potion
class Sign
class Weapon
final case class Player(id: String, name: String, role: PlayerClasses, health: Int, maxHealth: Int, position: Point2D, weapon: Option[Weapon], inventory: List[Item], attackPower: Int) extends Entity, Movable[Player], Alive[Player], Combatant[Enemy], Inventory[Player]

Playable hero.

Playable hero.

  • Stats depend on the chosen role (reach, visibility).

  • Pure API: every mutator returns a new Player.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Inventory[Player]
trait Combatant[Enemy]
trait Alive[Player]
trait Movable[Player]
trait Entity
class Object
trait Matchable
class Any
Show all