Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
V2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaa-bbaa committed Apr 16, 2020
1 parent 4e973cd commit a856fe1
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Setting.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Ѱ··½Ê½=BFS
QuickBFS=Enable
#×Ô¶¨Òå·Ö±æÂÊ=960 625
16 changes: 10 additions & 6 deletions game1_dev.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
@echo off 2>nul 3>nul
mode con cols=120 lines=48
setlocal enabledelayedexpansion
Set 寻路方式=BFS
for /f "eol=# delims== Tokens=1-2" %%i in (Setting.env) do (
Set "%%i=%%j"
)
Set SettingDFS_DebugMode=1|| REM 1显示搜索过程0不显示
if !SettingDFS_DebugMode!==1 (
set SettingDFS_Mode=Main
Expand Down Expand Up @@ -83,13 +85,16 @@ cls
Set image=draw cover 0 0
Set /p map=<level.txt
Set CustomIndex=1
for /l %%i in (1,1,!map!) do (
echo %%i.主线%%i
)
for /f %%i in ('dir /a:d /b 自定关卡') do (
echo N!CustomIndex!.%%i
Set CustomN!CustomIndex!=%%i
Set /a CustomIndex+=1
)

Echo 请输入想游玩的关卡:
Echo 请输入想游玩的关卡():
set /p stagechoose= Stage:
if "!stagechoose:~0,1!"=="N" (
if not defined Custom!stagechoose! (
Expand Down Expand Up @@ -1110,7 +1115,6 @@ if "!
Set /a "敌方EnityId_移动起始Y=!敌方单位Y!-!敌方EnityId_移动距离!"
Set /a "敌方EnityId_移动结束X=!敌方单位X!+!敌方EnityId_移动距离!"
Set /a "敌方EnityId_移动结束Y=!敌方单位Y!+!敌方EnityId_移动距离!"

Set /a "溜走血量=!NamePlayer_%敌方EnityId%_总血量!/3+1"
if !NamePlayer_%敌方EnityId%_血量! leq !溜走血量! (
if !敌方单位数量! geq 2 (
Expand Down Expand Up @@ -1421,7 +1425,9 @@ Set BFS_Next_Path_Y=!
:BFS_Main
if !BFS_X!==!最近单位X! (
if !BFS_Y!==!最近单位Y! (
REM Goto :BFS_Finish
if /i "!QuickBFS!"=="Enable" (
Goto :BFS_Finish
)
)
)
if !BFS_Queue_Length! equ 0 (
Expand Down Expand Up @@ -1514,8 +1520,6 @@ Set BFS_Next_Path_Y=!
)
:BFS_Finish
if not defined BFS_Path_%最近单位X%_%最近单位Y%_X (
echo %最近单位X%_%最近单位Y%
pause
Set "回合=敌方移动"
Set "SelectType=select"
Set Ban_!敌方EnityId!=true
Expand Down
Empty file removed var/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions 版本记录.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@
1.老刘一号提供的DFS优化
================2020/04/1(5)6 12:56=============
1.更换寻路算法为广度优先搜索!
2.敌方单位真的不再是人工智障
================================================
4 changes: 4 additions & 0 deletions 自定关卡/AI测试4GIF/Players.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#�ļ���ʽ��x,y,����,Ѫ��,����,��Ӫ,��������,�ƶ�����,�˺�,����
0,0,Ѱ·���Թ�����,100,dfsb,e,1,15,0,10
2,3,Ѱ·Ŀ���,100,wftk,f,1,15,0,10
#=============��ұ༭������=============
10 changes: 10 additions & 0 deletions 自定关卡/AI测试4GIF/main.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
16,17,16,16,16,16,16,17,16,17,16,17,16,16,16
16,17,16,17,16,17,16,16,16,16,16,17,16,16,16
16,17,16,17,16,17,16,16,17,16,17,17,17,17,16
16,17,16,17,17,17,16,16,16,16,16,16,16,17,16
16,17,17,17,16,17,16,17,17,17,16,17,16,17,16
16,16,16,16,16,17,16,16,16,16,16,17,16,17,16
16,16,16,16,16,16,16,17,16,17,16,17,16,16,16
16,17,16,16,16,17,16,17,16,17,16,16,16,17,16
16,17,17,17,16,17,16,17,16,17,16,16,16,17,16
16,16,16,17,16,17,16,16,17,16,16,17,17,17,16

0 comments on commit a856fe1

Please sign in to comment.