LambdaHack-0.2.10.5: A roguelike game engine in early and active development

Safe HaskellNone

Game.LambdaHack.Common.AtomicCmd

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/kosmikus/LambdaHack/wiki/Client-server-architecture.

Synopsis

Documentation

data CmdAtomic Source

Abstract syntax of atomic commands.

Constructors

CreateActorA !ActorId !Actor ![(ItemId, Item)] 
DestroyActorA !ActorId !Actor ![(ItemId, Item)] 
CreateItemA !ItemId !Item !Int !Container 
DestroyItemA !ItemId !Item !Int !Container 
SpotActorA !ActorId !Actor ![(ItemId, Item)] 
LoseActorA !ActorId !Actor ![(ItemId, Item)] 
SpotItemA !ItemId !Item !Int !Container 
LoseItemA !ItemId !Item !Int !Container 
MoveActorA !ActorId !Point !Point 
WaitActorA !ActorId !Time !Time 
DisplaceActorA !ActorId !ActorId 
MoveItemA !ItemId !Int !Container !Container 
AgeActorA !ActorId !Time 
HealActorA !ActorId !Int 
HasteActorA !ActorId !Speed 
PathActorA !ActorId !(Maybe [Vector]) !(Maybe [Vector]) 
ColorActorA !ActorId !Color !Color 
QuitFactionA !FactionId !(Maybe Actor) !(Maybe Status) !(Maybe Status) 
LeadFactionA !FactionId !(Maybe ActorId) !(Maybe ActorId) 
DiplFactionA !FactionId !FactionId !Diplomacy !Diplomacy 
AlterTileA !LevelId !Point !(Id TileKind) !(Id TileKind) 
SearchTileA !ActorId !Point !(Id TileKind) !(Id TileKind) 
SpotTileA !LevelId ![(Point, Id TileKind)] 
LoseTileA !LevelId ![(Point, Id TileKind)] 
AlterSmellA !LevelId !Point !(Maybe Time) !(Maybe Time) 
SpotSmellA !LevelId ![(Point, Time)] 
LoseSmellA !LevelId ![(Point, Time)] 
AgeLevelA !LevelId !Time 
AgeGameA !Time 
DiscoverA !LevelId !Point !ItemId !(Id ItemKind) 
CoverA !LevelId !Point !ItemId !(Id ItemKind) 
PerceptionA !LevelId !PerActor !PerActor 
RestartA !FactionId !Discovery !FactionPers !State !DebugModeCli !Text 
RestartServerA !State 
ResumeA !FactionId !FactionPers 
ResumeServerA !State 
KillExitA !FactionId 
SaveBkpA 
MsgAllA !Msg