Safe Haskell | None |
---|---|
Language | Haskell2010 |
Abstract syntax of server commands. See https://github.com/LambdaHack/LambdaHack/wiki/Client-server-architecture.
- type RequestAI = (ReqAI, Maybe ActorId)
- data ReqAI
- type RequestUI = (ReqUI, Maybe ActorId)
- data ReqUI
- data RequestTimed :: Ability -> * where
- ReqMove :: Vector -> RequestTimed AbMove
- ReqMelee :: ActorId -> ItemId -> CStore -> RequestTimed AbMelee
- ReqDisplace :: ActorId -> RequestTimed AbDisplace
- ReqAlter :: Point -> RequestTimed AbAlter
- ReqWait :: RequestTimed AbWait
- ReqWait10 :: RequestTimed AbWait
- ReqMoveItems :: [(ItemId, Int, CStore, CStore)] -> RequestTimed AbMoveItem
- ReqProject :: Point -> Int -> ItemId -> CStore -> RequestTimed AbProject
- ReqApply :: ItemId -> CStore -> RequestTimed AbApply
- data RequestAnyAbility = RequestAnyAbility (RequestTimed a)
- data ReqFailure
- = MoveNothing
- | MeleeSelf
- | MeleeDistant
- | DisplaceDistant
- | DisplaceAccess
- | DisplaceProjectiles
- | DisplaceDying
- | DisplaceBraced
- | DisplaceImmobile
- | DisplaceSupported
- | AlterUnskilled
- | AlterUnwalked
- | AlterDistant
- | AlterBlockActor
- | AlterBlockItem
- | AlterNothing
- | EqpOverfull
- | EqpStackFull
- | ApplyUnskilled
- | ApplyRead
- | ApplyOutOfReach
- | ApplyCharging
- | ApplyNoEffects
- | ItemNothing
- | ItemNotCalm
- | NotCalmPrecious
- | ProjectUnskilled
- | ProjectAimOnself
- | ProjectBlockTerrain
- | ProjectBlockActor
- | ProjectLobable
- | ProjectOutOfReach
- | TriggerNothing
- | NoChangeDunLeader
- impossibleReqFailure :: ReqFailure -> Bool
- showReqFailure :: ReqFailure -> Text
- timedToUI :: RequestTimed a -> ReqUI
- permittedPrecious :: Bool -> Bool -> ItemFull -> Either ReqFailure Bool
- permittedProject :: Bool -> Int -> Bool -> [Char] -> ItemFull -> Either ReqFailure Bool
- permittedProjectAI :: Int -> Bool -> ItemFull -> Bool
- permittedApply :: Time -> Int -> Bool -> [Char] -> ItemFull -> Either ReqFailure Bool
Documentation
Client-server requests sent by AI clients.
Client-server requests sent by UI clients.
data RequestTimed :: Ability -> * where Source #
Client-server requests that take game time. Sent by both AI and UI clients.
ReqMove :: Vector -> RequestTimed AbMove | |
ReqMelee :: ActorId -> ItemId -> CStore -> RequestTimed AbMelee | |
ReqDisplace :: ActorId -> RequestTimed AbDisplace | |
ReqAlter :: Point -> RequestTimed AbAlter | |
ReqWait :: RequestTimed AbWait | |
ReqWait10 :: RequestTimed AbWait | |
ReqMoveItems :: [(ItemId, Int, CStore, CStore)] -> RequestTimed AbMoveItem | |
ReqProject :: Point -> Int -> ItemId -> CStore -> RequestTimed AbProject | |
ReqApply :: ItemId -> CStore -> RequestTimed AbApply |
Show (RequestTimed a) Source # | |
data ReqFailure Source #
showReqFailure :: ReqFailure -> Text Source #
timedToUI :: RequestTimed a -> ReqUI Source #
permittedPrecious :: Bool -> Bool -> ItemFull -> Either ReqFailure Bool Source #