AFTN.Game_loop
Main game loop and player actions
val complete_objective : Objective.objective_kind Objective.goal -> unit
val setup_final_mission : Character.character -> unit
Check if final mission criteria have been met, win game if so
val update_objectives : Character.character -> unit
Check uncleared objectives and clear them if conditions are met
Reduce morale by n
and check for morale-loss-reduction items and game over
val character_move :
Character.character ->
Map.room list ->
bool ->
Map.room option
Prompt player for room to move to, return None
if action canceled
val flee : Character.character -> unit
Force a character to move 3 spaces away
val string_of_action : action -> string
Get printable string
representation of an action
val actions : action list
List of actions to choose from
val single_player_actions : action list
val pickup : Character.character -> bool
Prompt player for item/scrap to pick up. If an item
is selected, true
is returned to indicate the turn is over, otherwise false
.
val drop : Character.character -> bool
Prompt the user to drop an item
in the room
they are located in
val view_inventory :
?print_name:bool ->
?print_location:bool ->
Character.character ->
unit
Show the active character's inventory
val craft : Character.character -> bool
Prompt the user to craft an item with scrap and add it to the active character's inventory
val perform_trade : Character.character -> Character.character -> bool
Performs the trade action between two characters
val trade_item : Character.character -> bool
Prompt user to trade items with another character
val use : Character.character -> bool
val view_room : Character.character -> unit
Print out room information
val trigger_encounter : Character.character -> unit
Draw an encounter card and execute it
val use_ability : Character.character -> bool * bool
Prompt player to use a character
's ability. Return whether the ability was used and whether it can be used again this turn
val turn : int -> Character.character -> unit