Files
optolith-client/src/Rated/Skill.mli
T
Lukas Obermann d91164ca39 refactor: started comparing decoding schemes
Compare decoders with current state of database schemes.
2021-07-23 19:11:08 +02:00

91 lines
2.5 KiB
OCaml

(** This module contains definitions and simple utility functions for both the
dynamic and the static parts of a skill. *)
module Static : sig
type linked_activatable = {
id : IdGroup.Activatable.t;
(** The identifier of the entry that grants the application or use. *)
options : IdGroup.SelectOption.t list;
(** The application or use may only be granted by specific select
options. *)
level : int option;
(** The application or use may only be granted at a certain minimum
level. *)
}
(** The entry that grants the application or use it is part of. *)
(** Application of a skill. *)
module Application : sig
type t = {
id : IdGroup.Application.t;
name : string;
prerequisite : linked_activatable option;
(** If a [Some], the entry that needs to be active to enable this
application. If [None], the application is always part of the
skill. *)
}
end
(** Use of a skill. *)
module Use : sig
type t = {
id : int;
name : string;
prerequisite : linked_activatable;
(** The entry that needs to be active to enable this use. *)
}
end
(** Define how encumbrance affects skill checks on this skill. *)
type encumbrance =
| True (** Always. *)
| False (** Never. *)
| Maybe of string
(** Depending on the context, which is explained in the associated
localized string. *)
type t = {
id : Id.Skill.t;
name : string;
check : Check.t;
applications : Application.t IdGroup.Application.Map.t;
applications_input : string option;
uses : Use.t IntMap.t;
encumbrance : encumbrance;
tools : string option;
quality : string;
failed : string;
critical : string;
botch : string;
improvement_cost : ImprovementCost.t;
gr : int;
src : PublicationRef.list;
errata : Erratum.list;
}
module Decode : sig
val make_assoc :
regions:Region.t Id.Region.Map.t ->
diseases:Disease.t Id.Disease.Map.t ->
(Id.Skill.t, t) Parsing.make_assoc
end
end
module Dynamic :
Rated.Dynamic.S with type id = Id.Skill.t and type static = Static.t
(** Skill group definitions. *)
module Group : sig
type t = {
id : int;
check : Check.t;
(** The skill group's check for the optional rule Skill Group Checks. *)
name : string;
fullName : string;
}
module Decode : sig
val make_assoc : (int, t) Parsing.make_assoc
end
end