nodes: 0, module; 1, function_definition; 2, function_name:pick_action_todo; 3, parameters; 4, block; 5, expression_statement; 6, for_statement; 7, return_statement; 8, comment:"""
      only for testing and AI - user will usually choose an action
      Sort of works
      """; 9, pattern_list; 10, call; 11, comment:#print('todo = ', todo); 12, block; 13, subscript; 14, identifier:ndx; 15, identifier:todo; 16, identifier:enumerate; 17, argument_list; 18, if_statement; 19, identifier:actions; 20, integer:3; 21, identifier:things_to_do; 22, call; 23, block; 24, identifier:roll_dice; 25, argument_list; 26, expression_statement; 27, if_statement; 28, if_statement; 29, subscript; 30, assignment; 31, boolean_operator; 32, block; 33, boolean_operator; 34, block; 35, identifier:todo; 36, string:"chance"; 37, identifier:cur_act; 38, subscript; 39, comparison_operator:todo["WHERE_COL"] == "energy"; 40, comparison_operator:my_char["energy"] > todo["WHERE_VAL"]; 41, return_statement; 42, comparison_operator:todo["WHERE_COL"] == "gold"; 43, comparison_operator:my_char["gold"] > todo["WHERE_VAL"]; 44, return_statement; 45, identifier:actions; 46, call; 47, subscript; 48, string:"energy"; 49, subscript; 50, subscript; 51, identifier:cur_act; 52, subscript; 53, string:"gold"; 54, subscript; 55, subscript; 56, identifier:cur_act; 57, identifier:get_action_by_name; 58, argument_list; 59, identifier:todo; 60, string:"WHERE_COL"; 61, identifier:my_char; 62, string:"energy"; 63, identifier:todo; 64, string:"WHERE_VAL"; 65, identifier:todo; 66, string:"WHERE_COL"; 67, identifier:my_char; 68, string:"gold"; 69, identifier:todo; 70, string:"WHERE_VAL"; 71, subscript; 72, identifier:todo; 73, string:"name"
code: def pick_action_todo():
      """
      only for testing and AI - user will usually choose an action
      Sort of works
      """
      for ndx, todo in enumerate(things_to_do):
          #print('todo = ', todo)
          if roll_dice(todo["chance"]):
              cur_act = actions[get_action_by_name(todo["name"])]
              if todo["WHERE_COL"] == "energy" and my_char["energy"] > todo["WHERE_VAL"]:
                  return cur_act
              if todo["WHERE_COL"] == "gold" and my_char["gold"] > todo["WHERE_VAL"]:
                  return cur_act
  
  
      return actions[3]