AFTN.Game_loopMain game loop and player actions
val complete_objective : Objective.objective_kind Objective.goal -> unitval setup_final_mission : Character.character -> unitCheck if final mission criteria have been met, win game if so
val update_objectives : Character.character -> unitCheck 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 optionPrompt player for room to move to, return None if action canceled
val flee : Character.character -> unitForce a character to move 3 spaces away
val string_of_action : action -> stringGet printable string representation of an action
val actions : action listList of actions to choose from
val single_player_actions : action listval pickup : Character.character -> boolPrompt 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 -> boolPrompt the user to drop an item in the room they are located in
val view_inventory :
?print_name:bool ->
?print_location:bool ->
Character.character ->
unitShow the active character's inventory
val craft : Character.character -> boolPrompt the user to craft an item with scrap and add it to the active character's inventory
val perform_trade : Character.character -> Character.character -> boolPerforms the trade action between two characters
val trade_item : Character.character -> boolPrompt user to trade items with another character
val use : Character.character -> boolval view_room : Character.character -> unitPrint out room information
val trigger_encounter : Character.character -> unitDraw an encounter card and execute it
val use_ability : Character.character -> bool * boolPrompt 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