├── .gitignore ├── image ├── sidai.png ├── hs_icon.png ├── start_v.png ├── win_sign.png ├── defeat_sign.png ├── main_menu.png ├── queue_sign.png ├── cancel_button.png ├── shibai_sidai.png ├── confirm_button.png ├── start_hs_button.png ├── surrender_button.png ├── start_game_button.png └── surrender_none_button.png ├── __pycache__ ├── tools.cpython-38.pyc └── restart_hs.cpython-38.pyc ├── tools.py ├── Readme.md ├── restart_hs.py ├── main.py └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /.venv/ 2 | /.idea/ 3 | /杂项/ 4 | /output/ 5 | -------------------------------------------------------------------------------- /image/sidai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/sidai.png -------------------------------------------------------------------------------- /image/hs_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/hs_icon.png -------------------------------------------------------------------------------- /image/start_v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/start_v.png -------------------------------------------------------------------------------- /image/win_sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/win_sign.png -------------------------------------------------------------------------------- /image/defeat_sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/defeat_sign.png -------------------------------------------------------------------------------- /image/main_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/main_menu.png -------------------------------------------------------------------------------- /image/queue_sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/queue_sign.png -------------------------------------------------------------------------------- /image/cancel_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/cancel_button.png -------------------------------------------------------------------------------- /image/shibai_sidai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/shibai_sidai.png -------------------------------------------------------------------------------- /image/confirm_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/confirm_button.png -------------------------------------------------------------------------------- /image/start_hs_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/start_hs_button.png -------------------------------------------------------------------------------- /image/surrender_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/surrender_button.png -------------------------------------------------------------------------------- /image/start_game_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/start_game_button.png -------------------------------------------------------------------------------- /image/surrender_none_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/image/surrender_none_button.png -------------------------------------------------------------------------------- /__pycache__/tools.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/__pycache__/tools.cpython-38.pyc -------------------------------------------------------------------------------- /__pycache__/restart_hs.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tg111/hearthstone_auto_concede/HEAD/__pycache__/restart_hs.cpython-38.pyc -------------------------------------------------------------------------------- /tools.py: -------------------------------------------------------------------------------- 1 | from PIL import ImageGrab 2 | import numpy as np 3 | import cv2 4 | import pyautogui 5 | 6 | 7 | # 模板匹配函数,用于识别屏幕上某个阶段的图像 8 | def match_template(template_path, threshold=0.9): 9 | # 截取当前屏幕并转换为numpy数组 10 | screen = np.array(ImageGrab.grab()) 11 | # 读取模板图片 12 | screen_gray = cv2.cvtColor(screen, cv2.COLOR_BGR2GRAY) 13 | template = cv2.imread(template_path, 0) 14 | try: 15 | # 使用cv2.matchTemplate进行模板匹配 16 | res = cv2.matchTemplate(screen_gray, template, cv2.TM_CCOEFF_NORMED) 17 | except cv2.error: 18 | return None 19 | min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res) 20 | 21 | if max_val >= threshold: 22 | return max_loc # 返回匹配位置 23 | else: 24 | return None 25 | 26 | 27 | # 点击给定的坐标 28 | def click(x, y): 29 | pyautogui.moveTo(x, y) 30 | pyautogui.click() 31 | 32 | 33 | # 模拟按键 34 | def press_key(key): 35 | pyautogui.press(key) 36 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # 炉石传说自动投降脚本 2 | 3 | ## 项目简介 4 | 本项目是一个用于《炉石传说》的自动化投降脚本,通过图像识别和模拟鼠标点击实现自动开始游戏并投降的功能。脚本会循环执行以下几个阶段: 5 | 1. **准备阶段**:识别到“开始游戏”按钮后,点击进入匹配阶段。 6 | 2. **匹配中阶段**:识别到“排队”字样后,点击取消匹配并返回准备阶段。 7 | 3. **选牌阶段**:进入选牌界面后,按下ESC并自动点击投降按钮。 8 | 4. **投降结束阶段**:识别到失败字样后,点击屏幕以返回准备阶段,重新开始循环。 9 | 10 | 其它功能: 11 | + 检测游戏3分钟无响应,自动重启游戏,需战网客户端在任务栏常驻。 12 | 13 | ## 环境配置 14 | 15 | ### 所需库 16 | - `pyautogui`: 用于模拟鼠标点击和键盘操作 17 | - `opencv-python`: 用于图像识别 18 | - `pillow`: 用于截图 19 | - `numpy`: 用于处理图像数据 20 | - `psutil` : 用于检测游戏进程 21 | ### 编译exe文件下载 22 | 23 | [点击跳转百度网盘下载](https://pan.baidu.com/s/1DHMqIFpUhRC0oZHAK_s1vA?pwd=qwf8) 24 | 25 | ### 安装步骤 26 | 使用以下命令安装所需库: 27 | ```bash 28 | pip install pyautogui opencv-python pillow numpy psutil 29 | ``` 30 | ### 免责声明 31 | 32 | 本脚本仅供学习和技术交流使用,任何因使用本脚本导致的《炉石传说》账号被封、损失等后果,作者不承担任何责任。请谨慎使用,切勿滥用本脚本进行违规操作。 33 | 34 | > 使用本脚本即表示您已接受上述免责声明。 35 | 36 | ### 注意事项 37 | 38 | - 作者分辨率为1920x1080窗口化,其他分辨率可能需要重新截图。 39 | - 请确保截取的按钮或字样图片准确清晰,以保证脚本的识别率。 40 | - 不同设备和游戏分辨率下,图像识别的效果可能有所差异,请根据实际情况调整截图和匹配阈值。 41 | - 使用该脚本可能违反游戏的服务条款,存在封号风险。请自行承担相关风险。 42 | 43 | ### 待办事项 44 | 45 | - [ ] 集成OCR文字识别功能,用于识别“失败”字样,进一步提升流程速度 46 | - [x] 优化进入游戏后快速投降的逻辑,缩短响应时间 47 | - [ ] 增加点击位置的随机偏移值,避免每次点击同一位置被检测到,提升安全性 48 | - [x] 游戏崩溃、无响应后重启游戏 49 | -------------------------------------------------------------------------------- /restart_hs.py: -------------------------------------------------------------------------------- 1 | import pygetwindow as gw 2 | import time 3 | import tools 4 | import psutil 5 | 6 | 7 | # 根据进程名称杀死战网进程 8 | def kill_process_by_name(process_name): 9 | for proc in psutil.process_iter(['pid', 'name']): 10 | if process_name.lower() in proc.info['name'].lower(): 11 | print(f"正在终止进程: {proc.info['name']} (PID: {proc.info['pid']})") 12 | proc.terminate() # 尝试优雅终止进程 13 | proc.wait(timeout=5) # 等待最多5秒确认进程已终止 14 | if proc.is_running(): 15 | print(f"无法优雅终止,强制终止 {proc.info['name']}") 16 | proc.kill() # 如果无法优雅终止,则强制终止 17 | print(f"进程 {proc.info['name']} 已终止") 18 | time.sleep(3) 19 | return True 20 | return False 21 | 22 | 23 | def activate_window(windowTitle): 24 | print('激活战网窗口') 25 | windows = gw.getWindowsWithTitle(windowTitle) 26 | if windows: 27 | window = windows[0] 28 | if window.isMinimized: 29 | window.restore() 30 | elif not window.isActive: 31 | window.activate() 32 | time.sleep(2) 33 | 34 | 35 | def start_game_from_battle_net(): 36 | hs_icon = tools.match_template('image/hs_icon.png') 37 | if hs_icon: 38 | tools.click(hs_icon[0] + 10, hs_icon[1] + 10) # 切换到炉石tab 39 | start_button = tools.match_template('image/start_hs_button.png') 40 | if start_button: 41 | tools.click(start_button[0] + 10, start_button[1] + 10) # 点击启动游戏按钮 42 | time.sleep(2) 43 | else: 44 | print("未找到启动按钮") 45 | exit() 46 | 47 | 48 | def main(): 49 | # 杀死进程 50 | kill_process_by_name('Hearthstone') 51 | # 激活战网窗口 52 | activate_window('战网') 53 | # 开始游戏 54 | start_game_from_battle_net() 55 | 56 | 57 | if __name__ == '__main__': 58 | main() 59 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import time 2 | import tools 3 | import restart_hs 4 | 5 | # 重试次数 6 | retry_count = 0 7 | # 最大重试次数 8 | max_retry_count = 180 9 | 10 | 11 | # 主页 12 | def main_menu(): 13 | main_menu_button = tools.match_template('image/main_menu.png') 14 | if main_menu_button: 15 | reset_retry_count() 16 | print('主页,进入传统对战') 17 | tools.click(main_menu_button[0] + 10, main_menu_button[1] + 10) # 点击开始游戏按钮 18 | time.sleep(2) 19 | 20 | 21 | # 准备阶段:点击开始游戏按钮 22 | def start_game(): 23 | start_button = tools.match_template('image/start_game_button.png') 24 | if start_button: 25 | reset_retry_count() 26 | print("开始匹配") 27 | tools.click(start_button[0] + 10, start_button[1] + 10) # 点击开始游戏按钮 28 | time.sleep(2) 29 | 30 | 31 | # 匹配中阶段:如果看到排队字样,取消匹配并返回准备阶段 32 | def cancel_queue(): 33 | cancel_button = tools.match_template('image/cancel_button.png') # 取消按钮 34 | if cancel_button: 35 | reset_retry_count() 36 | print("匹配中...") 37 | # 识别"排队"字样的图片 38 | queue_sign = tools.match_template('image/queue_sign.png') 39 | if queue_sign: 40 | print("检测到排队计时,取消匹配") 41 | cancel_button = tools.match_template('image/cancel_button.png') # 匹配“取消”按钮 42 | if cancel_button: 43 | tools.click(cancel_button[0] + 10, cancel_button[1] + 10) # 点击取消按钮 44 | time.sleep(2) 45 | 46 | 47 | # 选牌阶段:按ESC并点击投降 48 | def concede_game(): 49 | confirm_button = tools.match_template('image/confirm_button.png') 50 | start_v = tools.match_template('image/start_v.png') 51 | if confirm_button or start_v: 52 | reset_retry_count() 53 | print("选牌阶段,执行投降") 54 | # 重试5次投降操作 55 | for i in range(0, 5): 56 | tools.press_key('esc') # 按下ESC 57 | time.sleep(0.5) 58 | # 检测esc是否点早了 59 | surrender_none_button = tools.match_template('image/surrender_none_button.png') 60 | if surrender_none_button: 61 | print('esc点早了,重置') 62 | tools.press_key('esc') 63 | time.sleep(0.5) 64 | continue 65 | surrender_button = tools.match_template('image/surrender_button.png') 66 | if surrender_button: 67 | tools.click(surrender_button[0] + 10, surrender_button[1] + 10) # 点击投降按钮 68 | time.sleep(2) 69 | break 70 | 71 | 72 | # 投降结束阶段:点击失败两个字 73 | def finish_game(): 74 | shibai_sidai = tools.match_template('image/shibai_sidai.png') 75 | if shibai_sidai: 76 | reset_retry_count() 77 | print("结束,失败丝带,点击继续") 78 | tools.click(shibai_sidai[0] + 10, shibai_sidai[1] + 10) # 点击失败的字样 79 | time.sleep(2) 80 | defeat_sign = tools.match_template('image/defeat_sign.png') 81 | win_sign = tools.match_template('image/win_sign.png') 82 | if defeat_sign or win_sign: 83 | reset_retry_count() 84 | print("结束,点击继续") 85 | click_btn = defeat_sign if defeat_sign else win_sign 86 | tools.click(click_btn[0] + 10, click_btn[1] + 10) # 点击失败的字样 87 | time.sleep(2) 88 | sidai = tools.match_template('image/sidai.png') 89 | if sidai: 90 | reset_retry_count() 91 | print("结束丝带,点击继续") 92 | tools.click(sidai[0] + 10, sidai[1] + 10) # 点击失败的字样 93 | time.sleep(2) 94 | 95 | 96 | # 重置重试次数 97 | def reset_retry_count(): 98 | global retry_count 99 | retry_count = 0 100 | 101 | 102 | # 自动循环过程 103 | def auto_concede(): 104 | global retry_count 105 | global max_retry_count 106 | while True: 107 | if retry_count >= max_retry_count: 108 | print("程序{}分钟无响应,重启程序".format(str(int(max_retry_count / 60)))) 109 | restart_hs.main() 110 | reset_retry_count() 111 | continue 112 | print('识别中...') 113 | main_menu() # 检测是否在主页,是则进入对战选牌 114 | start_game() # 检测是否在准备阶段,并点击开始游戏 115 | cancel_queue() # 检测是否匹配中,是否需要取消匹配 116 | concede_game() # 检测是否进入选牌阶段,并执行投降操作 117 | finish_game() # 检测是否结束游戏,并点击返回准备阶段 118 | time.sleep(1) # 等待一段时间后重新开始循环 119 | retry_count += 1 120 | 121 | 122 | if __name__ == "__main__": 123 | auto_concede() 124 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------