LambdaHack-0.9.4.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Atomic.CmdAtomic

Description

A set of atomic commands shared by client and server. These are the largest building blocks that have no components that can be observed in isolation.

We try to make atomic commands respect the laws of energy and mass conservation, unless they really can't, e.g., monster spawning. For example item removal from inventory is not an atomic command, but item dropped from the inventory to the ground is. This makes it easier to undo the commands. In principle, the commands are the only way to affect the basic game state (State).

See https://github.com/LambdaHack/LambdaHack/wiki/Client-server-architecture.

Synopsis

Documentation

data CmdAtomic Source #

Abstract syntax of atomic commands, that is, atomic game state transformations.

Constructors

UpdAtomic UpdAtomic

atomic updates

SfxAtomic SfxAtomic

atomic special effects

Instances
Show CmdAtomic Source # 
Instance details

Defined in Game.LambdaHack.Atomic.CmdAtomic

data UpdAtomic Source #

Abstract syntax of atomic updates, that is, atomic commands that really change the State. Most of them are an encoding of a game state diff, though they also carry some intentional hints that help clients determine whether and how to communicate it to players.

Constructors

UpdCreateActor ActorId Actor [(ItemId, Item)] 
UpdDestroyActor ActorId Actor [(ItemId, Item)] 
UpdCreateItem ItemId Item ItemQuant Container 
UpdDestroyItem ItemId Item ItemQuant Container 
UpdSpotActor ActorId Actor [(ItemId, Item)] 
UpdLoseActor ActorId Actor [(ItemId, Item)] 
UpdSpotItem Bool ItemId Item ItemQuant Container 
UpdLoseItem Bool ItemId Item ItemQuant Container 
UpdSpotItemBag Container ItemBag [(ItemId, Item)] 
UpdLoseItemBag Container ItemBag [(ItemId, Item)] 
UpdMoveActor ActorId Point Point 
UpdWaitActor ActorId Watchfulness Watchfulness 
UpdDisplaceActor ActorId ActorId 
UpdMoveItem ItemId Int ActorId CStore CStore 
UpdRefillHP ActorId Int64 
UpdRefillCalm ActorId Int64 
UpdTrajectory ActorId (Maybe ([Vector], Speed)) (Maybe ([Vector], Speed)) 
UpdQuitFaction FactionId (Maybe Status) (Maybe Status) (Maybe (FactionAnalytics, GenerationAnalytics)) 
UpdLeadFaction FactionId (Maybe ActorId) (Maybe ActorId) 
UpdDiplFaction FactionId FactionId Diplomacy Diplomacy 
UpdTacticFaction FactionId Tactic Tactic 
UpdAutoFaction FactionId Bool 
UpdRecordKill ActorId (ContentId ItemKind) Int 
UpdAlterTile LevelId Point (ContentId TileKind) (ContentId TileKind) 
UpdAlterExplorable LevelId Int 
UpdAlterGold Int 
UpdSearchTile ActorId Point (ContentId TileKind) 
UpdHideTile ActorId Point (ContentId TileKind) 
UpdSpotTile LevelId [(Point, ContentId TileKind)] 
UpdLoseTile LevelId [(Point, ContentId TileKind)] 
UpdSpotEntry LevelId [(Point, PlaceEntry)] 
UpdLoseEntry LevelId [(Point, PlaceEntry)] 
UpdAlterSmell LevelId Point Time Time 
UpdSpotSmell LevelId [(Point, Time)] 
UpdLoseSmell LevelId [(Point, Time)] 
UpdTimeItem ItemId Container ItemTimer ItemTimer 
UpdAgeGame [LevelId] 
UpdUnAgeGame [LevelId] 
UpdDiscover Container ItemId (ContentId ItemKind) AspectRecord 
UpdCover Container ItemId (ContentId ItemKind) AspectRecord 
UpdDiscoverKind Container ItemKindIx (ContentId ItemKind) 
UpdCoverKind Container ItemKindIx (ContentId ItemKind) 
UpdDiscoverAspect Container ItemId AspectRecord 
UpdCoverAspect Container ItemId AspectRecord 
UpdDiscoverServer ItemId AspectRecord 
UpdCoverServer ItemId AspectRecord 
UpdPerception LevelId Perception Perception 
UpdRestart FactionId PerLid State Challenge ClientOptions StdGen 
UpdRestartServer State 
UpdResume FactionId PerLid 
UpdResumeServer State 
UpdKillExit FactionId 
UpdWriteSave 
UpdHearFid FactionId HearMsg 
Instances
Show UpdAtomic Source # 
Instance details

Defined in Game.LambdaHack.Atomic.CmdAtomic

data HearMsg Source #

Symbolic representation of text messages about heard noises, sent by server to clients and shown to players and used by AI.

Instances
Show HearMsg Source # 
Instance details

Defined in Game.LambdaHack.Atomic.CmdAtomic