Module AFTN.Character

Character information

type ability_output = {
  1. used_action : bool;
    (*

    Whether this ability used an action

    *)
  2. can_use_again_this_turn : bool;
    (*

    Whether this ability can be used again this turn

    *)
  3. moved_character_index : int option;
    (*

    If a character was moved, then the index into the global character list of the character that was moved

    *)
}

Information about the state of the game after an ability is used

val default_ability_output : ability_output
type character = {
  1. first_name : string;
  2. last_name : string;
  3. rank : string;
  4. max_actions : int;
    (*

    Max # of actions per turn

    *)
  5. ability_description : string option;
    (*

    string representation of optional character ability

    *)
  6. ability : (Map.map -> character -> character list -> ability_output) option;
    (*

    Function that takes in current game state (map, activate character, all characters) and performs an action

    *)
}

Character information

type ability_function = Map.map -> character -> character list -> ability_output
val ch_eq : character -> character -> bool
val ch_update : (character -> 'a) -> character -> 'a -> character -> 'a
val ch_neq : character -> character -> bool
val string_of_character : character -> string