code: def pick_action_todo():
      for ndx, todo in enumerate(things_to_do):
          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]