code:
@D20XX_BlackMarket
	#DIM DYNAMIC LCount
	#DIM DYNAMIC LCount2
	#DIMS DYNAMIC UnitListTab
	#DIMS DYNAMIC BaseViews,44
	#DIMS DYNAMIC UnitList,44
	#DIMS DYNAMIC HtmlOutputText,44
	#DIM DYNAMIC WindowID

	#DIM DYNAMIC InputWinID
	#DIM DYNAMIC InputWinNum

	#DIM DYNAMIC LeaderTemp
	#DIM DYNAMIC LeaderID

	#DIM DYNAMIC ShopSelectingUnitID
	#DIMS DYNAMIC SelectingUnit
	;DRAWLINE

	;#region テスト用の奴 見る価値没有
		;;CALL CREATE_MOB("冨路牟")
		;;CALL PRINT_MAIDFACE(CNUM("冨路牟"))
		;;RESULTS = %HTML_GETPRINTEDSTR(8)%
		;;CLEARLINE 9
		;CALL D20XX_OS_WindowsHTML_Constructor
		;CALL D20XX_Generate_UniqueFcsv, "イェニェル"
		;CALL D20XX_FACE_FcsvToSprite(RESULTS)
		;CALL D20XX_FACE_Packaging(RESULTS)
		;RESULTS = %CONVERTSTR(RESULTS)%
		;CALL D20XX_NO_NOBR(RESULTS)
		;CALL D20XX_OS_SpriteYposReverse(RESULTS)
		;CALL D20XX_OS_WindowInput_Constructor
		;RESULTS:1 = %RESULTS:0%
		;;D20XX_OS_WindowInput:0 += @"<nonbutton pos='1000'>- 冨路牟 -</nonbutton>"
		;;D20XX_OS_WindowInput:1 += @"<nonbutton pos='1000'>他の人はこういう使い方の方が多いかもしれない</nonbutton>"
		;;D20XX_OS_WindowInput:8 += @"%RESULTS:1%<nonbutton pos='1000'></nonbutton>"
		;D20XX_OS_WindowInput:0 += @"<nonbutton pos='1100'>- イェニェル -</nonbutton>"
		;D20XX_OS_WindowInput:1 += @"<nonbutton pos='1100'>%PRINT_NamariF("ショップ遷移時メッセージ")%</nonbutton>"
		;D20XX_OS_WindowInput:2 += @"<nonbutton pos='1100'>样本1</nonbutton>"
		;D20XX_OS_WindowInput:3 += @"<nonbutton pos='1100'>样本2</nonbutton>"
		;D20XX_OS_WindowInput:4 += @"<nonbutton pos='1100'>样本3</nonbutton>"
		;D20XX_OS_WindowInput:5 += @"<nonbutton pos='1100'>样本4</nonbutton>"
		;D20XX_OS_WindowInput:6 += @"<nonbutton pos='1100'>样本5</nonbutton>"
		;D20XX_OS_WindowInput:7 += @"样本6 　　　　　←nunbuttonによる制御ないとこうなる"
		;D20XX_OS_WindowInput:8 += @"%RESULTS:1%テストです<nonbutton pos='1100'></nonbutton>"
		;D20XX_OS_WindowInput:9 += @"样本7 　　　　　←nunbuttonによる制御ないとこうなる２"
		;D20XX_OS_WindowInput:10 += @"<button pos='1100' value='999'>[样本ボタン]</button>"
		;D20XX_OS_WindowInput:10 += @"<nonbutton pos='1900'>←これ阴蒂ックすると999のボタンを阴蒂ックした事になる</nonbutton>"
		;;引数は
		;;0：左から半角文字分ずらすか
		;;1：上から何行分ずらすか
		;;2：ウィンドウの横幅は半角で何文字分か
		;;4：ウィンドウの縦幅は何行分か
		;CALL D20XX_OS_Window(650,6,4500,10)
		;;CLEARLINE 1
		;WAIT
	;#endregion

	;#region 全部コメントアウト中
		;CALL D20XX_Generate_UniqueFcsv, "イェニェル"
		;CALL D20XX_FACE_FcsvToSprite(RESULTS)
		;CALL D20XX_FACE_Packaging(RESULTS)
		;RESULTS = %CONVERTSTR(RESULTS)%
		;CALL D20XX_NO_NOBR(RESULTS)
		;CALL D20XX_OS_SpriteYposReverse(RESULTS)
		;CALL D20XX_OS_WindowInput_Constructor
		;RESULTS:1 = %RESULTS:0%
		;D20XX_OS_WindowInput:0 += @"<nonbutton pos='1000'>- イェニェル -</nonbutton>"
		;D20XX_OS_WindowInput:1 += @"<nonbutton pos='1000'>%PRINT_NamariF("同じように繰り返せばウィンドウを複数表示も出来るぜ")%</nonbutton>"
		;D20XX_OS_WindowInput:2 += @"<nonbutton pos='1000'></nonbutton>"
		;D20XX_OS_WindowInput:3 += @"<nonbutton pos='1000'></nonbutton>"
		;D20XX_OS_WindowInput:4 += @"<nonbutton pos='1000'></nonbutton>"
		;D20XX_OS_WindowInput:5 += @"<nonbutton pos='1000'></nonbutton>"
		;D20XX_OS_WindowInput:6 += @"<nonbutton pos='1000'></nonbutton>"
		;D20XX_OS_WindowInput:7 += @"<nonbutton pos='1000'></nonbutton>"
		;D20XX_OS_WindowInput:8 += @"%RESULTS:1%<nonbutton pos='1000'></nonbutton>"
		;CALL D20XX_OS_Window(500,12,400,10)
		;WAIT
	;#endregion
	FOR Lcount,0,44
		BaseViews:Lcount = %HTML_GETPRINTEDSTR(44-Lcount)%
		CALL D20XX_NO_NOBR2(BaseViews:Lcount)
		BaseViews:Lcount = %RESULTS%
	NEXT
	UnitListTab = 戦士
	D20XX_LeaderEmploymentInput = 0

	CALL D20XX_OS_Window_Constructor
	CALL D20XX_OS_WindowsHTML_Constructor
	;CALL D20XX_Shop_BaseWindow
	CALL D20XX_Shop_BaseWindow(1,2,0,"#000070")

	;#region
		UnitListTab = 戦士
		WindowID ++
		$ShopLoop
		FOR Lcount,0,10
			PRINTFORML ID = {Lcount} WinTitle = %D20XX_OS_WindowsHTML:LCount:44%
		NEXT

		;WindowIDのNullを詰める
		CALL D20XX_OS_WindowsHTML_Filter(UnitListTab)

		INPUT
		InputWinID = RESULT / 100000
		InputWinNum = RESULT % 100000		;PRINTFORML D20XX_OS_WindowsHTML:InputWinID:44 = %D20XX_OS_WindowsHTML:InputWinID:44%
		SELECTCASE D20XX_OS_WindowsHTML:InputWinID:44
			CASE "ショップベース画面"
				SELECTCASE InputWinNum/10000
					CASE 0
						SELECTCASE InputWinNum%10000
							CASE 1
								SIF D20XX_OS_WindowsHTML_SearchWin("ユ针织新規購入画面") != -1
									GOTO ShopLoop
								CALL D20XX_Shop_UnitListWindow(-1,UnitListTab,,4000,2,D20XX_OS_WindowsHTML_GetLastWindowID(),"#000070")
								GOTO ShopLoop
							CASE 2
								SIF D20XX_OS_WindowsHTML_SearchWin("リーダー泳池画面") != -1
									GOTO ShopLoop
								CALL D20XX_LeaderInventory(-1,200,2,D20XX_OS_WindowsHTML_GetLastWindowID(),"#000070")
								GOTO ShopLoop
							CASE 999
								CALL D20XX_OS_WindowsHTML_Constructor
								RETURN
						ENDSELECT
					CASE 1
						;ユ针织種別欄の選択
						;InputWinNum%10000で選択したユ针织のIDを取得出来る
					CASE 2
						;隊長名の選択
						;InputWinNum%10000で選択したユ针织のIDを取得出来る

						SELECTCASE InputWinNum%10000
							CASEELSE
								SIF D20XX_OS_WindowsHTML_SearchWin("リーダー泳池画面") != -1
									GOTO ShopLoop
								ShopSelectingUnitID = InputWinNum%10000
								CALL D20XX_LeaderInventory(ShopSelectingUnitID,200,2,D20XX_OS_WindowsHTML_GetLastWindowID(),"#000070")
								GOTO ShopLoop
						ENDSELECT
					CASE 3
						;武装1欄の選択
						;InputWinNum%10000で選択したユ针织のIDを取得出来る
					CASE 4
						;武装4欄の選択
						;InputWinNum%10000で選択したユ针织のIDを取得出来る
					CASE 5
						;武装1欄の選択
						;InputWinNum%10000で選択したユ针织のIDを取得出来る
				ENDSELECT
			CASE "ユ针织新規購入画面"

				ShopSelectingUnitID = 1
				FOR LCOUNT, 1, 10000;0は何もない状態という意味のデータなので1から開始よー
					IF D20XX_Unit:LCOUNT:0 == "None"
						BREAK
					ELSEIF LCOUNT == 9999
						PRINTFORML
						PRINTFORML ※系统信息※
						PRINTFORML D20XX_Unit配列にこれ以上データが入らなかったよ
						PRINTFORML このメッセージが出る場合って9割方バグがどこかに有ると思われるので教えてくだしい
						PRINTFORML 本当にMAP上に10001体もユ针织だそうとデバッグみたいなPLAYしてたらごめんね
						PRINTFORML ちょっと対応出来て無いっす
						PRINTFORML 頭のいい人が無限に角色クターデータを保持出来るようにしてくれると信じてる
						PRINTFORML 文字列データでN次元配列とか実現しても良いけど境界識別符号大量的用意するの辛いし、何より読みにくい
						PRINTFORMW Yeah
						RETURN 1
					ELSE
						ShopSelectingUnitID++
					ENDIF
				NEXT
				IF InputWinNum == 0
					UnitListTab = 戦士
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 1
					UnitListTab = 騎兵
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 2
					UnitListTab = 遠隔
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 3
					UnitListTab = 特殊
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop

			;#region
				ELSEIF InputWinNum == 101
					SelectingUnit = ミ针织マン
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 102
					SelectingUnit = レジスタンス
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 103
					SelectingUnit = 民兵
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 104
					SelectingUnit = 軽歩兵
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 105
					SelectingUnit = LAT
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 106
					SelectingUnit = HAT
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 201
					SelectingUnit = 竜騎兵
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 202
					SelectingUnit = T-34
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 203
					SelectingUnit = 超市シャーマン
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 204
					SelectingUnit = T-54/55
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 205
					SelectingUnit = T-62
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 206
					SelectingUnit = T-72A
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 301
					SelectingUnit = 軽迫撃砲
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 302
					SelectingUnit = 重迫撃砲
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 303
					SelectingUnit = 105mm榴弾砲
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 304
					SelectingUnit = 152mm榴弾砲
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 401
					SelectingUnit = 龍騎兵
					CALL D20XX_Shop_UnitListWindow(ShopSelectingUnitID,UnitListTab,SelectingUnit,4000,2,InputWinID,"#000070")
					GOTO ShopLoop
			;#endregion
				ELSEIF InputWinNum == 1001
					CALL D20XX_LeaderInventory(ShopSelectingUnitID,200,2,D20XX_OS_WindowsHTML_GetLastWindowID(),"#000070")
					GOTO ShopLoop

				ELSEIF InputWinNum == 1002
					FOR Lcount,0,46
						D20XX_OS_WindowsHTML:InputWinID:Lcount =
					NEXT
					D20XX_Leader:LeaderID:2 =
					FOR Lcount,0,10
						D20XX_Unit:ShopSelectingUnitID:Lcount =
					NEXT

					D20XX_Unit:ShopSelectingUnitID:0 = 自軍
					D20XX_Unit:ShopSelectingUnitID:1 = %SelectingUnit%
					D20XX_Unit:ShopSelectingUnitID:2 = %D20XX_GET_UNITDATA(SelectingUnit,"HP")%
					D20XX_Unit:ShopSelectingUnitID:3 = %D20XX_GET_UNITDATA(SelectingUnit,"行動力")%
					D20XX_Unit:ShopSelectingUnitID:4 = %D20XX_GET_UNITDATA(SelectingUnit,"H指揮統制率P")%
					D20XX_Unit:ShopSelectingUnitID:5 = %D20XX_GET_UNITDATA(SelectingUnit,"ERA")%
					D20XX_Unit:ShopSelectingUnitID:6 = %D20XX_GET_UNITDATA(SelectingUnit,"武装")%

					SelectingUnit =
					UnitListTab = 戦士

					;リーダーの割り当ても行う
					FOR LCount,0,10000
						IF D20XX_Unit:LCount:10 == TOSTR(LeaderID)
							D20XX_Unit:LCount:10 = None
						ENDIF
					NEXT
					SIF D20XX_Unit:TOINT(RESULTS:0):10 != "None"
						D20XX_Leader:TOINT(D20XX_Unit:TOINT(RESULTS:0):10):2 =
					D20XX_Leader:LeaderID:2 = %RESULTS:0%
					D20XX_Unit:ShopSelectingUnitID:10 = %TOSTR(LeaderID)%

					GOTO ShopLoop
				ELSEIF InputWinNum == 999
					FOR Lcount,0,46
						D20XX_OS_WindowsHTML:InputWinID:Lcount =
					NEXT
					SelectingUnit =
					UnitListTab = 戦士
					GOTO ShopLoop
				ENDIF
			;リーダー泳池画面(ここの段階でユ针织選択中かどうか決める)
			;┣リーダー新規雇用画面
			;┗リーダー割当確認画面
			; ┗リーダー解雇確認画面
			CASE "リーダー泳池画面"
				IF InputWinNum == 1
					;リーダー新規雇用画面
					SIF D20XX_OS_WindowsHTML_SearchWin("リーダー新規雇用画面") != -1
						GOTO ShopLoop
					CALL D20XX_LeaderEmployment(250,16,D20XX_OS_WindowsHTML_GetLastWindowID(),"#000070")
					GOTO ShopLoop
				ELSEIF InputWinNum == 999
					FOR Lcount,0,46
						D20XX_OS_WindowsHTML:InputWinID:Lcount =
					NEXT
					GOTO ShopLoop
				ELSEIF InputWinNum >= 10000 && InputWinNum < 20000
					LeaderID = InputWInNum -10000
					SIF D20XX_OS_WindowsHTML_SearchWin("リーダー割当確認画面") != -1
						GOTO ShopLoop
					CALL D20XX_Shop_LeaderAssignWin(ShopSelectingUnitID,LeaderID,90,6,D20XX_OS_WindowsHTML_GetLastWindowID(),"#707070")
					GOTO ShopLoop
				ENDIF

			CASE "リーダー新規雇用画面"
				SELECTCASE InputWinNum
					CASE 1 TO 7
						;リーダー随机生成
						CALL GET_REALTIMEFORFLAG
						D20XX_LeaderEmploymentInput = InputWinNum
						GOTO ShopLoop
					CASE 100
						;リーダーを雇用するボタン
						FOR LCount,0,10000
							IF D20XX_Leader:LCount:0 == ""
								FOR LCount2,0,10
									D20XX_Leader:LCount:LCount2 = %D20XX_OS_LeaderEmploymentDataRelay:LCount2%
								NEXT
								BREAK
							ENDIF
						NEXT
						;雇用したらウィンドウを関閉
						FOR Lcount,0,46
							D20XX_OS_WindowsHTML:InputWinID:Lcount =
						NEXT
						CALL GET_REALTIMEFORFLAG
						D20XX_LeaderEmploymentInput = 0
						GOTO ShopLoop
					CASE 999
						FOR Lcount,0,46
							D20XX_OS_WindowsHTML:InputWinID:Lcount =
						NEXT
						D20XX_LeaderEmploymentInput = 0
						GOTO ShopLoop
				ENDSELECT
			CASE "リーダー割当確認画面"
				SELECTCASE InputWinNum
					CASE 100
						SPLIT D20XX_OS_WindowsHTML:InputWinID:45, "D20XXSPLIT",RESULTS
						[IF_DEBUG]
							PRINTFORML TOINT(RESULTS:0) = {TOINT(RESULTS:0)}
						[ENDIF]
						IF TOINT(RESULTS:0) != -1
							;LeaderID = TOINT(RESULTS:0)
							FOR LCount,0,10000
								IF D20XX_Unit:LCount:10 == TOSTR(LeaderID)
									D20XX_Unit:LCount:10 = None
								ENDIF
							NEXT
							SIF D20XX_Unit:TOINT(RESULTS:0):10 != "None"
								D20XX_Leader:TOINT(D20XX_Unit:TOINT(RESULTS:0):10):2 =
							D20XX_Leader:LeaderID:2 = %RESULTS:0%
							D20XX_Unit:TOINT(RESULTS:0):10 = %TOSTR(LeaderID)%
						ENDIF
						FOR Lcount,0,46
							D20XX_OS_WindowsHTML:InputWinID:Lcount =
						NEXT
					CASE 200
						SIF D20XX_OS_WindowsHTML_SearchWin("リーダー解雇確認画面") != -1
							GOTO ShopLoop
						CALL D20XX_Shop_LeaderDeleteConfirm(LeaderID,90,6,D20XX_OS_WindowsHTML_GetLastWindowID(),"#707070")
						GOTO ShopLoop
					CASE 999
						FOR Lcount,0,46
							D20XX_OS_WindowsHTML:InputWinID:Lcount =
						NEXT
						D20XX_LeaderEmploymentInput = 0
						GOTO ShopLoop
				ENDSELECT
			CASE "リーダー解雇確認画面"
				SELECTCASE InputWinNum
					CASE 100
						FOR Lcount,0,46
							D20XX_OS_WindowsHTML:InputWinID:Lcount =
						NEXT
						D20XX_LeaderEmploymentInput = 0
						GOTO ShopLoop
					CASE 200
						FOR LCount,0,10
							D20XX_Leader:LeaderID:LCount =
						NEXT
						FOR Lcount,0,46
							D20XX_OS_WindowsHTML:InputWinID:Lcount =
						NEXT
						FOR Lcount,0,100
							IF D20XX_OS_WindowsHTML:Lcount:44 == "リーダー割当確認画面"
								FOR Lcount2,0,46
									D20XX_OS_WindowsHTML:Lcount:Lcount2 =
								NEXT
							ENDIF
						NEXT
						GOTO ShopLoop
					CASE 999
						FOR Lcount,0,46
							D20XX_OS_WindowsHTML:InputWinID:Lcount =
						NEXT
						D20XX_LeaderEmploymentInput = 0
						GOTO ShopLoop
				ENDSELECT
		ENDSELECT

		GOTO ShopLoop
	;#endregion

;;;迷你游戏店画面の一番下に表示されているウィンドウ
@D20XX_Shop_BaseWindow(Xpos = 1,Ypos = 2,WindowID = 0,WindowColor = "#000070")
	#DIM DYNAMIC Xpos
	#DIM DYNAMIC Ypos
	#DIM DYNAMIC Xsize
	#DIM DYNAMIC Ysize
	#DIM DYNAMIC WindowID
	#DIM DYNAMIC LCount
	#DIMS DYNAMIC WindowColor
	#DIMS DYNAMIC WindowLineColor

	#DIM DYNAMIC UnitViewYpos
	#DIM DYNAMIC UnitViewModelCount
	#DIMS DYNAMIC UnitModel
	#DIMS DYNAMIC Weapon,3
	#DIMS DYNAMIC DefFont

	Xsize = 118
	Ysize = 43-ypos-1
	WindowColor = #000070

	FOR Lcount,0,46
		D20XX_OS_WindowsHTML:WindowID:Lcount =
	NEXT

	;外枠
		D20XX_OS_WindowsHTML:WindowID:Ypos += @"<nonbutton pos ='{Xpos*50}'><shape type='rect' param='50,50,{Xsize*50},106' color='%WindowColor%' ></nonbutton>"
		FOR Lcount,Ypos+1,(Ysize+Ypos)
			D20XX_OS_WindowsHTML:WindowID:Lcount += @"<nonbutton pos ='{Xpos*50}'><shape type='rect' param='50,0,{Xsize*50},106' color='%WindowColor%' ></nonbutton>"
		NEXT
		D20XX_OS_WindowsHTML:WindowID:(Ysize+Ypos) += @"<nonbutton pos ='{Xpos*50}'><shape type='rect' param='50,0,{Xsize*50},50' color='%WindowColor%' ></nonbutton>"

		D20XX_OS_WindowsHTML:WindowID:Ypos += @"<nonbutton pos ='{Xpos*50}'>┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓</nonbutton>"
		FOR LCount, Ypos+1, (Ysize+Ypos)
			IF Lcount < 44
				D20XX_OS_WindowsHTML:WindowID:Lcount += @"<nonbutton pos ='{Xpos*50}'>┃</nonbutton><nonbutton pos ='{(Xpos+Xsize)*50}'>┃</nonbutton>"
			ENDIF
		NEXT
		D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos ='{Xpos*50}'>┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos ='{Xpos*50}'>┠──────────────────────────────────────────────────────────┨</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ysize+Ypos) += @"<nonbutton pos ='{Xpos*50}'>┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:43 += @"<button pos = '0' value = '999'>[終了]</button>"

	;ここから本体
	D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<nonbutton pos = '{Xpos*50+100}'>雇用済ユ针织</nonbutton><button pos = '{(Xpos+Xsize)*50-200}' value= '999'>[X]</button>"

	D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos*50+100}'>ユ针织種</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos*50+1000}'>隊長名</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos*50+1700}'>武装1</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos*50+2700}'>武装2</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos*50+3700}'>武装3</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos*50+4700}'>スキル</nonbutton>"
	UnitViewYpos = (Ypos+5)
	FOR LCount,1,10000
		IF D20XX_Unit:LCount:0 == "自軍"
			D20XX_OS_WindowsHTML:WindowID:UnitViewYpos += @"<button pos = '{Xpos*50+100}' value = '{WindowID*100000+10000+UnitViewYpos}'>%D20XX_GET_UNITDATA(D20XX_Unit:LCount:1,"ユ针织名")%</button>"

			;PRINTFORMW D20XX_Unit:{LCount}:11 = %D20XX_Unit:LCount:11%
			IF D20XX_Unit:LCount:10 == "None"
				D20XX_OS_WindowsHTML:WindowID:UnitViewYpos += @"<button pos = '{Xpos*50+1000}' value = '{WindowID*100000+20000+LCount}'>隊長未割当</button>"
			ELSE
				D20XX_OS_WindowsHTML:WindowID:UnitViewYpos += @"<button pos = '{Xpos*50+1000}' value = '{WindowID*100000+20000+LCount}'>%D20XX_Leader:TOINT(D20XX_Unit:LCount:10):1%</button>"
			ENDIF

			SPLIT D20XX_Unit:LCount:6,",",Weapon
			SIF Weapon:0 != ""
				D20XX_OS_WindowsHTML:WindowID:UnitViewYpos += @"<button pos = '{Xpos*50+1700}' value = '{WindowID*100000+30000+UnitViewYpos}'>%D20XX_GET_WEAPONDATA(Weapon:0,"武器名")%</button>"
			SIF Weapon:1 != ""
				D20XX_OS_WindowsHTML:WindowID:UnitViewYpos += @"<button pos = '{Xpos*50+2700}' value = '{WindowID*100000+40000+UnitViewYpos}'>%D20XX_GET_WEAPONDATA(Weapon:1,"武器名")%</button>"
			SIF Weapon:2 != ""
				D20XX_OS_WindowsHTML:WindowID:UnitViewYpos += @"<button pos = '{Xpos*50+3700}' value = '{WindowID*100000+50000+UnitViewYpos}'>%D20XX_GET_WEAPONDATA(Weapon:2,"武器名")%</button>"

			D20XX_OS_WindowsHTML:WindowID:UnitViewYpos += @"<nonbutton pos = '{Xpos*50+4700}'>%D20XX_GET_UNITDATA(D20XX_Unit:LCount:1,"スキル")%</nonbutton>"
			UnitViewYpos++ ;35行(页ネーション考えると34行なのでそこら辺で色々考慮する必要が有些そうだね)
		ENDIF
	NEXT
	SIF UnitViewYpos < 35
		D20XX_OS_WindowsHTML:WindowID:UnitViewYpos += @"<button pos = '{Xpos*50+100}' value = '{WindowID*100000+1}'>[+] ユ针织を新たに編成する</button>"
	D20XX_OS_WindowsHTML:WindowID:44 = ショップベース画面
	D20XX_OS_WindowsHTML:WindowID:45 = {Xpos}D20XXSPLIT{Ypos}D20XXSPLIT{WindowID}D20XXSPLIT%WindowColor%

;;;ユ针织新規購入画面
;;;D20XX_Shop_UnitListWindow(SelectLeftTab,Xpos,Ypos = 2,WindowColor = "#000070")
;;;SelectLeftTab:現在選択中のウィンドウ
;;;Xpos:左からのX座標位置
;;;Ypos:上からのY座標位置
;;;WindowColor=背景色
@D20XX_Shop_UnitListWindow_Old(SelectLeftTab,Xpos,Ypos = 2,WindowID,WindowColor = "#000070")
	#DIMS DYNAMIC SelectTab
	#DIMS DYNAMIC ShopMenu,4,20
	#DIMS DYNAMIC MainText,43
	#DIMS DYNAMIC WindowColor
	#DIM DYNAMIC Lcount
	#DIM DYNAMIC Xpos
	#DIM DYNAMIC Ypos
	#DIM DYNAMIC WindowID

	#DIMS DYNAMIC LeftWindowColor
	#DIMS DYNAMIC SelectLeftTab

	LeftWindowColor = #7fff00

	PRINTFORMW WindowID = {WindowID}
	FOR Lcount,0,46
		D20XX_OS_WindowsHTML:WindowID:Lcount =
	NEXT

	D20XX_OS_WindowsHTML:WindowID:Ypos += @"<nonbutton pos ='{Xpos}'><shape type='rect' param='50,50,2000,106' color='%WindowColor%' ></nonbutton>"
	FOR Lcount,(Ypos+1),(Ypos+14)
		D20XX_OS_WindowsHTML:WindowID:Lcount += @"<nonbutton pos ='{Xpos}'><shape type='rect' param='50,0,2000,106' color='%WindowColor%' ></nonbutton>"
	NEXT
	D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos ='{Xpos}'><shape type='rect' param='50,0,200,50' color='%WindowColor%' ></nonbutton>"
	FOR Lcount,(Ypos+14),40
		D20XX_OS_WindowsHTML:WindowID:Lcount += @"<nonbutton pos ='{Xpos+200}'><shape type='rect' param='50,0,1800,106' color='%WindowColor%' ></nonbutton>"
	NEXT
	D20XX_OS_WindowsHTML:WindowID:40 += @"<nonbutton pos ='{Xpos+200}'><shape type='rect' param='50,0,1800,50' color='%WindowColor%' ></nonbutton>"

	D20XX_OS_WindowsHTML:WindowID:(Ypos+0) += @"<nonbutton pos ='{Xpos}'>┏━━━━━━━━━━━━━━━━━━━┓</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<nonbutton pos ='{Xpos+100}'>部隊雇用</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<button pos = '{Xpos+1800}' value= '{WindowID*100000+999}'>[X]</button>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<nonbutton pos='{Xpos+2000}'>┃</nonbutton>"

	SELECTCASE SelectLeftTab
		CASE "戦士"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos ='{Xpos}'>┣━━━━━━━━━━━━━━━━━━━┓</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+0}'>戦</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+0}'>士</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos ='{Xpos}'>┣━┓</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+1}'>騎</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+1}'>兵</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos ='{Xpos}'>┣━┫</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+2}'>遠</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+2}'>隔</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos ='{Xpos}'>┣━┫</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+3}'>特</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+3}'>殊</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos ='{Xpos}'>┗━┫</nonbutton>"
		CASE "騎兵"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos ='{Xpos}'>┣━┳━━━━━━━━━━━━━━━━━┓</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+0}'>戦</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+0}'>士</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos ='{Xpos}'>┣━┛</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+1}'>騎</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+1}'>兵</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos ='{Xpos}'>┣━┓</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+2}'>遠</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+2}'>隔</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos ='{Xpos}'>┣━┫</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+3}'>特</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+3}'>殊</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos ='{Xpos}'>┗━┫</nonbutton>"
		CASE "遠隔"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos ='{Xpos}'>┣━┳━━━━━━━━━━━━━━━━━┓</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+0}'>戦</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+0}'>士</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos ='{Xpos}'>┣━┫</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+1}'>騎</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+1}'>兵</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos ='{Xpos}'>┣━┛</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+2}'>遠</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+2}'>隔</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos ='{Xpos}'>┣━┓</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+3}'>特</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+3}'>殊</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos ='{Xpos}'>┗━┫</nonbutton>"
		CASE "特殊"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos ='{Xpos}'>┣━┳━━━━━━━━━━━━━━━━━┓</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+0}'>戦</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+0}'>士</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos ='{Xpos}'>┣━┫</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+1}'>騎</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+1}'>兵</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos ='{Xpos}'>┣━┫</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+2}'>遠</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+2}'>隔</button>┃"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos ='{Xpos}'>┣━┛</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+3}'>特</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><button value = '{WindowID*100000+3}'>殊</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos ='{Xpos}'>┗━┓</nonbutton>"
	ENDSELECT
	;D20XX_OS_WindowInput:40 += @"<nonbutton pos ='{Xpos+200}'><shape type='rect' param='50,50,1800,-4100' color='#000070' ></nonbutton>"
	FOR LCount,(Ypos+15),40
		D20XX_OS_WindowsHTML:WindowID:LCount += @"<nonbutton pos ='{Xpos+200}'>┃</nonbutton>"
	NEXT

	D20XX_OS_WindowsHTML:WindowID:40 += @"<nonbutton pos ='{Xpos+200}'>┗━━━━━━━━━━━━━━━━━┛</nonbutton>"

	SELECTCASE SelectLeftTab
		CASE "戦士"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos ='{Xpos+300}'>フィールド名</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+100}'>戦士</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+101}'>テ接吻ト样本</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+102}'>テ接吻ト样本</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+103}'>テ接吻ト样本</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+104}'>テ接吻ト样本</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+105}'>テ接吻ト样本</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+106}'>テ接吻ト样本</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+107}'>テ接吻ト样本</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+108}'>テ接吻ト样本</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+109}'>テ接吻ト样本</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<button pos ='{Xpos+300}' value= '{WindowID*100000+110}'>テ接吻ト样本</button>"
		CASE "騎兵"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos ='{Xpos+300}'>フィールド名</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos ='{Xpos+300}'>騎兵</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
		CASE "遠隔"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos ='{Xpos+300}'>フィールド名</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos ='{Xpos+300}'>遠隔</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
		CASE "特殊"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos ='{Xpos+300}'>フィールド名</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos ='{Xpos+300}'>特殊</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos ='{Xpos+300}'>テ接吻ト样本</nonbutton>"
	ENDSELECT

	;ここでLeftWindowの中身を設定する
	FOR LCount,(Ypos+1),40
		D20XX_OS_WindowsHTML:WindowID:LCount += @"<nonbutton pos='{Xpos+2000}'>┃</nonbutton>"
	NEXT

	;ここでウィンドウ名を設定する
	D20XX_OS_WindowsHTML:WindowID:44 = ユ针织新規購入画面
	D20XX_OS_WindowsHTML:WindowID:45 = %SelectLeftTab%D20XXSPLIT{Xpos}D20XXSPLIT{Ypos}D20XXSPLIT{WindowID}D20XXSPLIT%WindowColor%

	;#region 右上のウィンドウ
		;RightWindow:0 += @"<nonbutton pos='4500'>┏━━━━━━━━━━━━━━┓</nonbutton>"
		;FOR LCount,1,40
		;	RightWindow:LCount += @"<nonbutton pos='4500'>┃</nonbutton><nonbutton pos='4600'>・ユ针织路人名{Lcount}</nonbutton><nonbutton pos='6000'>┃</nonbutton>"
		;NEXT
		;RightWindow:39 =
		;RightWindow:39 += @"<nonbutton pos='4500'>┃</nonbutton><nonbutton pos='4600'>[<] [1] 2 3 4 5 6 ...[>]</nonbutton><nonbutton pos='6000'>┃</nonbutton>"
		;RightWindow:40 += @"<nonbutton pos='4500'>┗━━━━━━━━━━━━━━┛</nonbutton>"
	;#endregion 右上のウィンドウ
;
@D20XX_Shop_UnitListWindow(ShopSelectingUnitID,SelectLeftTab,SelectingUnit,Xpos,Ypos = 2,WindowID,WindowColor = "#000070")
	#DIMS DYNAMIC SelectTab
	#DIMS DYNAMIC ShopMenu,4,20
	#DIMS DYNAMIC MainText,43
	#DIMS DYNAMIC WindowColor
	#DIMS DYNAMIC SelectingUnit
	#DIM DYNAMIC Lcount
	#DIM DYNAMIC Xpos
	#DIM DYNAMIC Ypos
	#DIM DYNAMIC Ysize
	#DIM DYNAMIC Xsize
	#DIM DYNAMIC WindowID
	#DIMS DYNAMIC LineColor
	#DIMS DYNAMIC LeftWindowColor
	#DIMS DYNAMIC SelectLeftTab
	#DIMS DYNAMIC WindowControlBarName
	#DIMS DYNAMIC WindowName
	#DIMS DYNAMIC InputData
	#DIMS DYNAMIC Weapons,3
	#DIM DYNAMIC ShopSelectingUnitID

	CALL D20XX_OS_WindowInput_Constructor

	Xsize = 5500
	Ysize = 31
	Xpos = 280
	Ypos = 5
	WindowName = 部隊編制ウィンドウ
	WindowControlBarName = ユ针织新規購入画面
	WindowColor = #000070

	FOR Lcount,0,46
		D20XX_OS_WindowsHTML:WindowID:Lcount =
	NEXT

	;モーダルロック用に背景を全て押下不能状態にする
	FOR Lcount,0,45
		D20XX_OS_WindowsHTML:WindowID:Lcount += @"<button pos ='0' value = '-1'></button>"
	NEXT

	;外枠
		D20XX_OS_WindowsHTML:WindowID:Ypos += @"<button pos ='{Xpos}' value='-1'><shape type='rect' param='50,50,{Xsize},106' color='%WindowColor%' bcolor='%WindowColor%'></button>"
		FOR Lcount,Ypos+1,(Ysize+Ypos)
			D20XX_OS_WindowsHTML:WindowID:Lcount += @"<button pos ='{Xpos}' value='-1'><shape type='rect' param='50,0,{Xsize},106' color='%WindowColor%' bcolor='%WindowColor%'></button>"
		NEXT
		D20XX_OS_WindowsHTML:WindowID:(Ysize+Ypos) += @"<button pos ='{Xpos}' value='-1'><shape type='rect' param='50,0,{Xsize},50' color='%WindowColor%' bcolor='%WindowColor%'></button>"

		FOR LCount, Ypos+1, (Ysize+Ypos)
			IF Lcount < 44
				D20XX_OS_WindowsHTML:WindowID:Lcount += @"<nonbutton pos ='{Xpos}'>┃</nonbutton><nonbutton pos ='{(Xpos+Xsize)}'>┃</nonbutton>"
			ENDIF
		NEXT

		;左の角
		D20XX_OS_WindowsHTML:WindowID:Ypos += @"<nonbutton pos='{Xpos}'>┏"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos='{Xpos}'>┣"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+Ysize) += @"<nonbutton pos='{Xpos}'>┗"

		;上下の横線
		FOR Lcount,0,Xsize/100-1
			D20XX_OS_WindowsHTML:WindowID:Ypos += @"━"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"━"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+Ysize) += @"━"
		NEXT
		D20XX_OS_WindowsHTML:WindowID:Ypos += @"┓</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"┫</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+Ysize) += @"┛</nonbutton>"

	;ここから本体

		D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<nonbutton pos = '{Xpos+100}'>部隊を編制する</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<nonbutton pos = '{Xpos+1000}'>現在的所持金[{CFLAG:MASTER:槞彁所持金*D20XX_DemolRate}%HUNI("Demol")%/{MONEY}＄]</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<button pos = '{(Xpos+Xsize)-200}' value= '{WindowID*100000+999}'>[X]</button>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<button pos = '{Xpos+150}' value = '{WindowID*100000+0}'>戦士</button>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos = '{Xpos}'>┠───</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<button pos = '{Xpos+150}' value = '{WindowID*100000+1}'>騎兵</button>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos}'>┠───</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<button pos = '{Xpos+150}' value = '{WindowID*100000+2}'>遠隔</button>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos}'>┠───</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<button pos = '{Xpos+150}' value = '{WindowID*100000+3}'>特殊</button>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos = '{Xpos}'>┠───</nonbutton>"
		SELECTCASE SelectLeftTab
			CASE "戦士"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos+400}'> </nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos = '{Xpos+400}'>┐</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+400}'>┤</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos+400}'>┤</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos = '{Xpos+400}'>┤</nonbutton>"
			CASE "騎兵"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos = '{Xpos+400}'>┯</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos = '{Xpos+400}'>┘</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+400}'> </nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+400}'>┐</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos+400}'>┤</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos = '{Xpos+400}'>┤</nonbutton>"
			CASE "遠隔"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos = '{Xpos+400}'>┯</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos = '{Xpos+400}'>┤</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+400}'>┘</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos = '{Xpos+400}'> </nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos+400}'>┐</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos = '{Xpos+400}'>┤</nonbutton>"
			CASE "特殊"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos = '{Xpos+400}'>┯</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos = '{Xpos+400}'>┤</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+400}'>┤</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos+400}'>┘</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos = '{Xpos+400}'> </nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos = '{Xpos+400}'>┐</nonbutton>"
		ENDSELECT
		FOR Lcount, (Ypos+11), (Ypos+Ysize)
			D20XX_OS_WindowsHTML:WindowID:Lcount += @"<nonbutton pos = '{Xpos+400}'>│</nonbutton>"
		NEXT
		D20XX_OS_WindowsHTML:WindowID:(Ypos+Ysize) += @"<nonbutton pos = '{Xpos+400}'>┷</nonbutton>"

		D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos+600}'>ユ针织名</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos+1600}'>価格</nonbutton>"
		D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos = '{Xpos+530}'>──────────────</nonbutton>"
		SELECTCASE SelectLeftTab
			CASE "戦士"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+100+1}'>分男</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+100+2}'>抵抗</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+100+3}'>市民の</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+100+4}'>軽い歩兵</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+100+5}'>緯度</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+100+6}'>帽子</button>"

				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+1400}' >{1300,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+1400}' >{2000,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos = '{Xpos+1400}' >{2500,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos+1400}' >{5500,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos = '{Xpos+1400}' >{9000,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos = '{Xpos+1400}'>{16000,7}%HUNI("Demol")%</nonbutton>"
			CASE "騎兵"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+200+1}'>竜騎兵</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+200+2}'>水槽34</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+200+3}'>超祈祷師</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+200+4}'>水槽54/55</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+200+5}'>水槽62</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+200+6}'>水槽72猿</button>"

				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+1400}' >{11000,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+1400}' >{17000,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos = '{Xpos+1400}' >{22000,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos+1400}' >{52000,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos = '{Xpos+1400}' >{89000,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos = '{Xpos+1400}'>{168000,7}%HUNI("Demol")%</nonbutton>"
			CASE "遠隔"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+300+1}'>軽いすり鉢</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+300+2}'>重いすり鉢</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+300+3}'>105大砲</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+300+4}'>152大砲</button>"

				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+1400}' >{8000,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+1400}' >{12000,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos = '{Xpos+1400}' >{95800,7}%HUNI("Demol")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos+1400}' >{180000,7}%HUNI("Demol")%</nonbutton>"
			CASE "特殊"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<button pos = '{Xpos+600}' value='{WindowID*100000+400+1}'>龍騎兵</button>"

				D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+1400}' >{8800,7}%HUNI("Demol")%</nonbutton>"
		ENDSELECT

		D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos = '{Xpos+2000}'>┳</nonbutton>"
		FOR Lcount, (Ypos+3), (Ypos+Ysize)
			D20XX_OS_WindowsHTML:WindowID:Lcount += @"<nonbutton pos = '{Xpos+2000}'>┃</nonbutton>"
		NEXT
		D20XX_OS_WindowsHTML:WindowID:(Ypos+Ysize) += @"<nonbutton pos = '{Xpos+2000}'>┻</nonbutton>"
		IF SelectingUnit != ""
			D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos = '{Xpos+2100}'>ユ针织名：%D20XX_GET_UNITDATA(SelectingUnit,"ユ针织名")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos = '{Xpos+2100}'>HP</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+2100}'>行動力</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+2100}'>装甲</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos = '{Xpos+2100}'>ERA</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos+2100}'>指揮統制率</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos = '{Xpos+2100}'>スキル</nonbutton>"

			D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos = '{Xpos+2600}'>：%D20XX_GET_UNITDATA(SelectingUnit,"HP")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+5) += @"<nonbutton pos = '{Xpos+2600}'>：%D20XX_GET_UNITDATA(SelectingUnit,"行動力")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+2600}'>：%D20XX_GET_UNITDATA(SelectingUnit,"装甲")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+7) += @"<nonbutton pos = '{Xpos+2600}'>：%D20XX_GET_UNITDATA(SelectingUnit,"ERA")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+8) += @"<nonbutton pos = '{Xpos+2600}'>：%D20XX_GET_UNITDATA(SelectingUnit,"指揮統制率")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+9) += @"<nonbutton pos = '{Xpos+2600}'>：%D20XX_GET_UNITDATA(SelectingUnit,"スキル")%</nonbutton>"

			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos = '{Xpos+2200}'>武器枠１</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+17) += @"<nonbutton pos = '{Xpos+2200}'>武器枠２</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+24) += @"<nonbutton pos = '{Xpos+2200}'>武器枠３</nonbutton>"
			Weapons:0 = %D20XX_GET_UNITDATA(SelectingUnit,"武装")%
			SPLIT Weapons:0, ",", Weapons

			D20XX_OS_WindowsHTML:WindowID:(Ypos+10) += @"<nonbutton pos = '{Xpos+2650}'>：%D20XX_GET_WEAPONDATA(Weapons:0,"武器名")%</nonbutton>"

			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos = '{Xpos+2250}'>威力</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<nonbutton pos = '{Xpos+2250}'>射撃回数</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<nonbutton pos = '{Xpos+2250}'>射程</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos = '{Xpos+2250}'>射撃回数</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+15) += @"<nonbutton pos = '{Xpos+2250}'>制圧力</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+16) += @"<nonbutton pos = '{Xpos+2250}'>スキル</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:0,"威力")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:0,"射撃回数")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+13) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:0,"射程")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:0,"射撃回数")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+15) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:0,"制圧力")%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+16) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:0,"スキル")%</nonbutton>"

			IF Weapons:1 != ""
				D20XX_OS_WindowsHTML:WindowID:(Ypos+17) += @"<nonbutton pos = '{Xpos+2600}'>：%D20XX_GET_WEAPONDATA(Weapons:1,"武器名")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+18) += @"<nonbutton pos = '{Xpos+2250}'>威力</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+19) += @"<nonbutton pos = '{Xpos+2250}'>射撃回数</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+20) += @"<nonbutton pos = '{Xpos+2250}'>射程</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+21) += @"<nonbutton pos = '{Xpos+2250}'>射撃回数</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+22) += @"<nonbutton pos = '{Xpos+2250}'>制圧力</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+23) += @"<nonbutton pos = '{Xpos+2250}'>スキル</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+18) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:1,"威力")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+19) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:1,"射撃回数")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+20) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:1,"射程")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+21) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:1,"射撃回数")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+22) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:1,"制圧力")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+23) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:1,"スキル")%</nonbutton>"
			ELSE
				D20XX_OS_WindowsHTML:WindowID:(Ypos+17) += @"<nonbutton pos = '{Xpos+2600}'>：未配備</nonbutton>"
			ENDIF

			IF Weapons:2 != ""
				D20XX_OS_WindowsHTML:WindowID:(Ypos+24) += @"<nonbutton pos = '{Xpos+2600}'>：%D20XX_GET_WEAPONDATA(Weapons:2,"武器名")%</nonbutton>"

				D20XX_OS_WindowsHTML:WindowID:(Ypos+25) += @"<nonbutton pos = '{Xpos+2250}'>威力</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+26) += @"<nonbutton pos = '{Xpos+2250}'>射撃回数</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+27) += @"<nonbutton pos = '{Xpos+2250}'>射程</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+28) += @"<nonbutton pos = '{Xpos+2250}'>射撃回数</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+29) += @"<nonbutton pos = '{Xpos+2250}'>制圧力</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+30) += @"<nonbutton pos = '{Xpos+2250}'>スキル</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+25) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:2,"威力")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+26) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:2,"射撃回数")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+27) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:2,"射程")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+28) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:2,"射撃回数")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+29) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:2,"制圧力")%</nonbutton>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+30) += @"<nonbutton pos = '{Xpos+2700}'>：%D20XX_GET_WEAPONDATA(Weapons:2,"スキル")%</nonbutton>"
			ELSE
				D20XX_OS_WindowsHTML:WindowID:(Ypos+24) += @"<nonbutton pos = '{Xpos+2600}'>：未配備</nonbutton>"
			ENDIF
			IF D20XX_Unit:ShopSelectingUnitID:10 == "None"||D20XX_Unit:ShopSelectingUnitID:10 == ""
				CALL D20XX_Generate_UniqueFcsv, "無人"
				CALL D20XX_FACE_FcsvToSprite(RESULTS,"無人")
				CALL D20XX_FACE_Packaging(RESULTS)
				RESULTS = %CONVERTSTR(RESULTS)%
				CALL D20XX_NO_NOBR(RESULTS)
				CALL D20XX_OS_SpriteYposReverse(RESULTS)
			ELSE
				CALL D20XX_FACE_FcsvToSprite(D20XX_Leader:TOINT(D20XX_Unit:ShopSelectingUnitID:10):0)
				CALL D20XX_FACE_Packaging(RESULTS)
				RESULTS = %CONVERTSTR(RESULTS)%
				CALL D20XX_NO_NOBR(RESULTS)
				CALL D20XX_OS_SpriteYposReverse(RESULTS)
			ENDIF

			D20XX_OS_WindowsHTML:WindowID:(Ypos+11) += @"<nonbutton pos = '{Xpos+4200}'>%RESULTS%</nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+12) += @"<button pos = '{Xpos+4200}' value = '{WindowID*100000+1001}'>[リーダーを割り当てる]</button>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+30) += @"<button pos = '{Xpos+4200}' value = '{WindowID*100000+1002}'>[このユ针织を雇用する]</button>"

			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+5200}'></nonbutton>"
			D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+5200}'></nonbutton>"
			;D20XX_OS_WindowsHTML:WindowID:(Ypos+6) += @"<nonbutton pos = '{Xpos+5200}'></nonbutton>"
		ENDIF

	D20XX_OS_WindowsHTML:WindowID:44 = ユ针织新規購入画面
	D20XX_OS_WindowsHTML:WindowID:45 = {ShopSelectingUnitID}D20XXSPLIT%SelectLeftTab%D20XXSPLIT%SelectingUnit%D20XXSPLIT{Xpos}D20XXSPLIT{Ypos}D20XXSPLIT{WindowID}D20XXSPLIT%WindowColor%

	FOR LCOUNT,0,46
		;PRINTFORML %D20XX_OS_WindowsHTML:WindowID:LCOUNT%
	NEXT
;	WAIT
;;;小隊長一覧ウィンドウ
@D20XX_LeaderInventory(ShopSelectingUnitID, Xpos,Ypos = 2,WindowID, WindowColor = "#000070")
	#DIMS DYNAMIC WindowColor
	#DIM DYNAMIC ShopSelectingUnitID
	#DIM DYNAMIC Lcount
	#DIM DYNAMIC Xpos
	#DIM DYNAMIC Ypos
	#DIM DYNAMIC Ysize
	#DIM DYNAMIC WindowID

	#DIM DYNAMIC LeaderYpos

	FOR Lcount,0,46
		D20XX_OS_WindowsHTML:WindowID:Lcount =
	NEXT

	D20XX_OS_WindowsHTML:WindowID:Ypos += @"<nonbutton pos ='{Xpos}'><shape type='rect' param='50,50,3000,106' color='%WindowColor%' ></nonbutton>"
	FOR Lcount,(Ypos+1),(Ypos+14)
		D20XX_OS_WindowsHTML:WindowID:Lcount += @"<nonbutton pos ='{Xpos}'><shape type='rect' param='50,0,3000,106' color='%WindowColor%' ></nonbutton>"
	NEXT
	D20XX_OS_WindowsHTML:WindowID:(Ypos+14) += @"<nonbutton pos ='{Xpos}'><shape type='rect' param='50,0,200,50' color='%WindowColor%' ></nonbutton>"
	FOR Lcount,(Ypos+14),40
		D20XX_OS_WindowsHTML:WindowID:Lcount += @"<nonbutton pos ='{Xpos}'><shape type='rect' param='50,0,3000,106' color='%WindowColor%' ></nonbutton>"
	NEXT
	D20XX_OS_WindowsHTML:WindowID:40 += @"<nonbutton pos ='{Xpos}'><shape type='rect' param='50,0,3000,50' color='%WindowColor%' ></nonbutton>"

	D20XX_OS_WindowsHTML:WindowID:(Ypos+0) += @"<nonbutton pos ='{Xpos}'>┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<nonbutton pos ='{Xpos}'>┃</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<nonbutton pos ='{Xpos+100}'>雇用済小隊長の一覧</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<button pos = '{Xpos+2800}' value= '{WindowID*100000+999}'>[X]</button>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+1) += @"<nonbutton pos='{Xpos+3000}'>┃</nonbutton>"

	D20XX_OS_WindowsHTML:WindowID:(Ypos+2) += @"<nonbutton pos='{Xpos}'>┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫</nonbutton>"

	;D20XX_OS_WindowInput:40 += @"<nonbutton pos ='{Xpos+200}'><shape type='rect' param='50,50,1800,-4100' color='#000070' ></nonbutton>"
	FOR LCount,(Ypos+1),40
		D20XX_OS_WindowsHTML:WindowID:LCount += @"<nonbutton pos ='{Xpos}'>┃</nonbutton>"
	NEXT
	D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos='{Xpos+100}'>割当</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos='{Xpos+400}'>名前</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:(Ypos+3) += @"<nonbutton pos='{Xpos+1000}'>種族</nonbutton>"

	D20XX_OS_WindowsHTML:WindowID:(Ypos+4) += @"<nonbutton pos='{Xpos}'>┠─────────────────────────────┨</nonbutton>"
	;#region 本体
		LeaderYpos = 0
		FOR Lcount,0,10000
			IF D20XX_Leader:Lcount:0 != ""
				IF D20XX_Leader:Lcount:2 != ""
					D20XX_OS_WindowsHTML:WindowID:(Ypos+5+LeaderYpos) += @"<nonbutton pos='{Xpos+100}'>済</nonbutton>"
				ELSE
					D20XX_OS_WindowsHTML:WindowID:(Ypos+5+LeaderYpos) += @"<nonbutton pos='{Xpos+100}'>未</nonbutton>"
				ENDIF
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5+LeaderYpos) += @"<button pos='{Xpos+400}' value = '{WindowID*100000+10000+Lcount}'>%D20XX_Leader:Lcount:1%</button>"
				D20XX_OS_WindowsHTML:WindowID:(Ypos+5+LeaderYpos) += @"<nonbutton pos='{Xpos+1000}'>%D20XX_Leader:Lcount:3%</nonbutton>"

				LeaderYpos++
			ENDIF
		NEXT
		D20XX_OS_WindowsHTML:WindowID:(Ypos+5+LeaderYpos) += @"<button pos='{Xpos+100}' value = '{WindowID*100000+1}'>[+] 新規にリーダーを雇用する</button>"

	;#endregion

	FOR LCount,(Ypos+1),40
		D20XX_OS_WindowsHTML:WindowID:LCount += @"<nonbutton pos='{Xpos+3000}'>┃</nonbutton>"
	NEXT

	D20XX_OS_WindowsHTML:WindowID:40 += @"<nonbutton pos ='{Xpos}'>┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛</nonbutton>"
	D20XX_OS_WindowsHTML:WindowID:44 = リーダー泳池画面
	D20XX_OS_WindowsHTML:WindowID:45 = {ShopSelectingUnitID}D20XXSPLIT{Xpos}D20XXSPLIT{Ypos}D20XXSPLIT{WindowID}D20XXSPLIT%WindowColor%

;;;小隊長採用ウィンドウ
@D20XX_LeaderEmployment(Xpos,Ypos = 2,WindowID, WindowColor = "#007070")
	#DIMS DYNAMIC WindowColor
	#DIM DYNAMIC Lcount
	#DIM DYNAMIC Xpos
	#DIM DYNAMIC Ypos
	#DIM DYNAMIC Ysize
	#DIM DYNAMIC Xsize
	#DIM DYNAMIC WindowID
	#DIMS DYNAMIC LineColor
	#DIMS DYNAMIC Race
	#DIMS DYNAMIC LeaderName
	#DIMS DYNAMIC EscapeFaceSTR
	#DIMS DYNAMIC Fcsv

	#DIMS DYNAMIC WindowControlBarName
	#DIMS DYNAMIC WindowName
	#DIMS DYNAMIC InputData

	WindowName = リーダー新規雇用画面
	WindowControlBarName = 小隊長を雇用

	Xsize = 5000
	Ysize = 13
	LineColor = #FFFFFF

	CALL D20XX_OS_WindowInput_Constructor

	;#region 本体
		D20XX_OS_WindowInput:0 += @"<button pos ='{100}' value='{WindowID*100000+1}'>[募集する]</button>"

		D20XX_OS_WindowInput:0 += @"<button pos ='{800}' value='{WindowID*100000+2}'>[アルサバーニ]</button>"
		D20XX_OS_WindowInput:0 += @"<button pos ='{1500}' value='{WindowID*100000+3}'>[イヴァ阴蒂ナ]</button>"
		D20XX_OS_WindowInput:0 += @"<button pos ='{2200}' value='{WindowID*100000+4}'>[ウスラバニヤ]</button>"
		D20XX_OS_WindowInput:0 += @"<button pos ='{2900}' value='{WindowID*100000+5}'>[エンメロイア]</button>"
		D20XX_OS_WindowInput:0 += @"<button pos ='{3600}' value='{WindowID*100000+6}'>[オーロパリカ]</button>"
		D20XX_OS_WindowInput:0 += @"<button pos ='{4300}' value='{WindowID*100000+7}'>[天使]</button>"

		Race =
		IF D20XX_LeaderEmploymentInput == 1
			Race += @"%TEXTR("アルサバーニ/イヴァ阴蒂ナ/ウスラバニヤ/エンメロイア/オーロパリカ")%"
		ELSEIF D20XX_LeaderEmploymentInput == 2
			Race = アルサバーニ
		ELSEIF D20XX_LeaderEmploymentInput == 3
			Race = イヴァ阴蒂ナ
		ELSEIF D20XX_LeaderEmploymentInput == 4
			Race = ウスラバニヤ
		ELSEIF D20XX_LeaderEmploymentInput == 5
			Race = エンメロイア
		ELSEIF D20XX_LeaderEmploymentInput == 6
			Race = オーロパリカ
		ELSEIF D20XX_LeaderEmploymentInput == 7
			Race = 天使
		ENDIF

		IF D20XX_LeaderEmploymentInput != 0
			STR:参照用MAIDFACE文字列 =
			;名前の生成
			LeaderName = %D20XX_Leader_NameGenerator()%

			CALL D20XX_Face_RandomFcsv(Race, LeaderName)

			Fcsv = %RESULTS%

			CALL D20XX_FACE_FcsvToSprite(RESULTS)
			EscapeFaceSTR = %RESULTS%
			CALL CREATE_SPRITE_MAIDFACE(1, 0, RESULTS)
			STR:颜绘再現文字列 = %STR:参照用MAIDFACE文字列%
			RESULTS = %CONVERTSTR(STR:颜绘再現文字列)%
			CALL D20XX_NO_NOBR(RESULTS)
			CALL D20XX_OS_SpriteYposReverse(RESULTS)

			D20XX_OS_WindowInput:9 += @"<nonbutton pos='{100}'>%RESULTS%</nonbutton>"
			D20XX_OS_WindowInput:1 += @"<nonbutton pos='{1100}'>名前：%LeaderName%</nonbutton>"
			D20XX_OS_WindowInput:1 += @"<nonbutton pos='{2000}'>種族：%Race%</nonbutton>"
			;D20XX_OS_WindowInput:7 += @"<nonbutton pos='{1100}'>デバッグ用：%EscapeFaceSTR%</nonbutton>"
			;D20XX_OS_WindowInput:8 += @"<nonbutton pos='{1100}'>FCSV：%Fcsv%</nonbutton>"
			D20XX_OS_WindowInput:9 += @"<button pos='{1100}' value = '{WindowID*100000+100}'>[この子を採用する]</button>"

			D20XX_OS_LeaderEmploymentDataRelay:0 = %Fcsv%
			D20XX_OS_LeaderEmploymentDataRelay:1 = %LeaderName%
			D20XX_OS_LeaderEmploymentDataRelay:3 = %Race%
		ENDIF
	;#endregion++++++
	InputData = {Xpos}D20XXSPLIT{Ypos}D20XXSPLIT{WindowID}D20XXSPLIT%WindowColor%
	CALL D20XX_OS_WindowBar(Xpos,Ypos,Xsize,Ysize,WindowID,WindowControlBarName,WindowName,LineColor,WindowColor,InputData)

;;;リーダー割当確認画面
@D20XX_Shop_LeaderAssignWin(ShopSelectingUnitID,LeaderID,Xpos = 80,Ypos = 6,WindowID, WindowColor = "#707070")
	#DIM DYNAMIC LeaderID
	#DIM DYNAMIC Xpos
	#DIM DYNAMIC Ypos
	#DIM DYNAMIC Xsize
	#DIM DYNAMIC Ysize
	#DIM DYNAMIC WindowID
	#DIMS DYNAMIC WindowColor
	#DIMS DYNAMIC WindowName
	#DIMS DYNAMIC LineColor
	#DIMS DYNAMIC WindowControlBarName
	#DIMS DYNAMIC InputData
	#DIM DYNAMIC ShopSelectingUnitID

	LineColor = #FFFFFF
	WindowColor = #000070
	WindowName = リーダー割当確認画面
	WindowControlBarName = 確認
	WindowColor = #707070

	Xsize = 4000
	Ysize = 12

	CALL D20XX_FACE_FcsvToSprite(D20XX_Leader:LeaderID:0)
	CALL D20XX_FACE_Packaging(RESULTS)
	RESULTS = %CONVERTSTR(RESULTS)%
	CALL D20XX_NO_NOBR(RESULTS)
	CALL D20XX_OS_SpriteYposReverse(RESULTS)
	CALL D20XX_OS_WindowInput_Constructor

	RESULTS:1 = %RESULTS:0%
	D20XX_OS_WindowInput:0 += @"<nonbutton pos='1100'>- %D20XX_Leader:LeaderID:1% -</nonbutton>"
	D20XX_OS_WindowInput:1 += @"<nonbutton pos='1100'>「ここに口上を挿入」</nonbutton>"
	D20XX_OS_WindowInput:2 += @"<nonbutton pos='1100'></nonbutton>"
	D20XX_OS_WindowInput:3 += @"<nonbutton pos='1100'></nonbutton>"
	D20XX_OS_WindowInput:6 += @"<nonbutton pos='1100'>...この子を该怎么做呢？</nonbutton>"
	D20XX_OS_WindowInput:7 += @"<nonbutton pos='1100'>現在選択中のユ针织：{ShopSelectingUnitID}</nonbutton>"
	D20XX_OS_WindowInput:8 += @"<button pos='1100' value = '{WindowID*100000+100}'>[部隊に割当]</button>"
	D20XX_OS_WindowInput:8 += @"<button pos='1900' value = '{WindowID*100000+200}'>[解雇]</button>"
	D20XX_OS_WindowInput:8 += @"<nonbutton pos='100'>%RESULTS:1%</nonbutton>"

	InputData = {ShopSelectingUnitID}D20XXSPLIT{LeaderID}D20XXSPLIT{Xpos}D20XXSPLIT{Ypos}D20XXSPLIT{WindowID}D20XXSPLIT%WindowColor%
	CALL D20XX_OS_WindowBar(Xpos,Ypos,Xsize,Ysize,WindowID,WindowControlBarName,WindowName,LineColor,WindowColor,InputData)

;哈欠小/对话框惊讶
;;;リーダー解雇確認
@D20XX_Shop_LeaderDeleteConfirm(LeaderID,Xpos = 80,Ypos = 6,WindowID, WindowColor = "#000070")
	#DIM DYNAMIC LeaderID
	#DIM DYNAMIC Xpos
	#DIM DYNAMIC Ypos
	#DIM DYNAMIC Xsize
	#DIM DYNAMIC Ysize
	#DIM DYNAMIC WindowID
	#DIMS DYNAMIC WindowColor
	#DIMS DYNAMIC WindowName
	#DIMS DYNAMIC LineColor
	#DIMS DYNAMIC WindowControlBarName
	#DIMS DYNAMIC InputData

	LineColor = #FFFFFF
	WindowColor = #000070
	WindowName = リーダー解雇確認画面
	WindowControlBarName = 確認
	WindowColor = #707070
	Xsize = 4000
	Ysize = 12

	CALL D20XX_FACE_FcsvToSprite(D20XX_Leader:LeaderID:0,"哈欠小/对话框惊讶")
	CALL D20XX_FACE_Packaging(RESULTS)
	RESULTS = %CONVERTSTR(RESULTS)%
	CALL D20XX_NO_NOBR(RESULTS)
	CALL D20XX_OS_SpriteYposReverse(RESULTS)
	CALL D20XX_OS_WindowInput_Constructor

	RESULTS:1 = %RESULTS:0%

	D20XX_OS_WindowInput:0 += @"<nonbutton pos='1100'>- %D20XX_Leader:LeaderID:1% -</nonbutton>"
	D20XX_OS_WindowInput:1 += @"<nonbutton pos='1100'>「ここに口上を挿入」</nonbutton>"
	D20XX_OS_WindowInput:2 += @"<nonbutton pos='1100'></nonbutton>"
	D20XX_OS_WindowInput:3 += @"<nonbutton pos='1100'></nonbutton>"
	D20XX_OS_WindowInput:4 += @"<nonbutton pos='1100'>本当に解雇しますか？</nonbutton>"
	D20XX_OS_WindowInput:5 += @"<nonbutton pos='1100'>(一度解雇したリーダーを再雇用する事は出来ません！)</nonbutton>"
	D20XX_OS_WindowInput:8 += @"<button pos='1100' value = '{WindowID*100000+100}'>[果然还是算了]</button>"
	D20XX_OS_WindowInput:8 += @"<button pos='1900' value = '{WindowID*100000+200}'>[解雇する]</button>"
	D20XX_OS_WindowInput:8 += @"<nonbutton pos='100'>%RESULTS:1%</nonbutton>"

	InputData = {LeaderID}D20XXSPLIT{Xpos}D20XXSPLIT{Ypos}D20XXSPLIT{WindowID}D20XXSPLIT%WindowColor%
	CALL D20XX_OS_ModalWindowBar(Xpos,Ypos,Xsize,Ysize,WindowID,WindowControlBarName,WindowName,LineColor,WindowColor,InputData)

@D20XX_PlayableWindow
	#DIM DYNAMIC Xpos
	#DIM DYNAMIC Ypos
	#DIM DYNAMIC Xsize
	#DIM DYNAMIC Ysize
	#DIM DYNAMIC WindowID
	#DIMS DYNAMIC WindowColor
	#DIMS DYNAMIC WindowName
	#DIMS DYNAMIC LineColor
	#DIMS DYNAMIC WindowControlBarName
	#DIMS DYNAMIC InputData
	#DIMS DYNAMIC MEMO_MAIDFACE
	#DIMS DYNAMIC K15Face
	#DIM DYNAMIC LCount

	LineColor = #FFFFFF
	WindowColor = #000070
	WindowName = リーダー解雇確認画面
	WindowControlBarName =
	WindowColor = #000070
	Xsize = 5500
	Ysize = 17
	Xpos = 200
	Ypos = 12
	WindowID = 1
	LOCALS =
	STR:参照用MAIDFACE文字列 =
	RESULTS =
	LOCALS = 0魔界空+4卷髪長槞+7肌\[色白\]+14角魔界人赤+12魔族耳\[色白\]+9微笑３+11垂眼２左\[赤\]+11垂眼２右\[赤\]+11垂眼２左高光+11垂眼２右高光+11垂眼２右まつ毛+11垂眼２左まつ毛+13脏連体泳装+20脏披风+14悪魔羽[紫]+16乱髪４槞+18斜眉槞+19呆毛槞+吹き出し開心,80,975,0,200,50,恐らく説明欄/
	CALL CREATE_SPRITE_MAIDFACE, 1, 0, LOCALS
	STR:颜绘再現文字列 = %STR:参照用MAIDFACE文字列%
	RESULTS = %CONVERTSTR(STR:颜绘再現文字列)%
	CALL D20XX_NO_NOBR(RESULTS)

	CALL D20XX_OS_SpriteYposReverse(RESULTS)
	CALL D20XX_OS_Base_Constructor
	K15Face = %RESULTS%
	WindowControlBarName += @"!THANK YOU FOR PLAYING!"
	D20XX_OS_WindowInput:0 += @"<nonbutton pos='1100'>そして物語は動き出す...</nonbutton>"
	D20XX_OS_WindowInput:2 += @"<nonbutton pos='1100'>ここまで遊んでいただき有がとうございます。</nonbutton>"
	D20XX_OS_WindowInput:3 += @"<nonbutton pos='1100'>槞彁の物語はまだまだ続きますが、現在実装出来ているストーリーはここまでです。</nonbutton>"
	D20XX_OS_WindowInput:4 += @"<nonbutton pos='1100'>もうしばらく更新をお待ちください。</nonbutton>"
	D20XX_OS_WindowInput:5 += @"<nonbutton pos='1100'></nonbutton>"
	D20XX_OS_WindowInput:6 += @"<nonbutton pos='1100'>此処まで遊んでくれた礼物として、現在作成を進めている迷你游戏を先行で公開します。</nonbutton>"
	D20XX_OS_WindowInput:7 += @"<nonbutton pos='1100'>今はまだ基礎の部分の作成を行っている段階でバグも多く遊べる代物では無いですが...</nonbutton>"
	D20XX_OS_WindowInput:8 += @"<nonbutton pos='1100'></nonbutton>"
	D20XX_OS_WindowInput:9 += @"%RESULTS%<nonbutton pos='1100'>いつものホーム画面に[電話]が追加されているので、そこから開始出来ます。</nonbutton>"
	D20XX_OS_WindowInput:10 += @"<nonbutton pos='1100'></nonbutton>"
	D20XX_OS_WindowInput:11 += @"<nonbutton pos='1100'>これからも慢慢地ですが、更新を続けて行きますので、槞彁を今後もよろしく願いします。</nonbutton>"
	D20XX_OS_WindowInput:13 += @"<button pos='1100' value = '{WindowID*100000+999}'>[わかった！]</button>"

	FOR Lcount,0,44
		D20XX_OS_Base:Lcount = %HTML_GETPRINTEDSTR(44-Lcount)%
		CALL D20XX_NO_NOBR2(D20XX_OS_Base:Lcount)
		D20XX_OS_Base:Lcount = %RESULTS%
	NEXT
	CALL D20XX_OS_ModalWindowBar(Xpos,Ypos,Xsize,Ysize,WindowID,WindowControlBarName,WindowName,LineColor,WindowColor,InputData)
	$INPUT_LOOP
	FOR Lcount,0,44
		HTML_PRINT @"<nobr>%D20XX_OS_Base:Lcount%%D20XX_OS_WindowsHTML:WindowID:Lcount%</nobr>"
		;HTML_PRINT @"<nobr>%D20XX_OS_WindowsHTML:WindowID:Lcount%</nobr>"
	NEXT
	INPUT
	SIF RESULT != WindowID*100000+999
		GOTO INPUT_LOOP

	CALL D20XX_OS_WindowInput_Constructor
	CALL D20XX_OS_WindowsHTML_Constructor
	CALL D20XX_OS_Base_Constructor


code:
@D20XX_HitCalc(Y_TargetField,X_TargetField)
	#DIM DYNAMIC Y_TargetField
	#DIM DYNAMIC X_TargetField

	#DIM DYNAMIC TargetUnit
	#DIMS DYNAMIC TargetField
	#DIM DYNAMIC Dexterity

	#DIM DYNAMIC HitRandomValue
	#DIM DYNAMIC HitCount
	#DIM DYNAMIC CriticalHitCount
	#DIM DYNAMIC LCount

	#DIM DYNAMIC BaseHitRate
	#DIM DYNAMIC FieldHitRate
	#DIM DYNAMIC ControlHitRate

	TargetField = %D20XX_MAP:Y_TargetField:X_TargetField:0%
	TargetUnit = TOINT(D20XX_MAP:Y_TargetField:X_TargetField:1)

	IF TOINT(D20XX_Unit:D20XX_SelectUnit:3) <= 0
		CALL D20XX_KOJO_イェニェル("行動力没有")
		RETURN 0
	ENDIF

	PRINTFORMW %D20XX_SelectWeapon%
	IF D20XX_SelectWeapon == "Error" || D20XX_SelectWeapon == "" || D20XX_SelectWeapon == "None"
		CALL D20XX_KOJO_イェニェル("武器未選択")
		RETURN 0
	ENDIF

	IF D20XX_AttackRangeMap:Y_TargetField:X_TargetField < 0
		CALL D20XX_KOJO_イェニェル("射程外警告")
		RETURN 0
	ENDIF

	IF TOINT(D20XX_MAP:Y_TargetField:X_TargetField:1) <= 0
		TRYCALLFORM D20XX_KOJO_%D20XX_Unit:D20XX_SelectUnit:8%_敵の居ない場所へ攻撃
		CALL D20XX_KOJO_イェニェル("射撃地点的不在警告")
		$AttackQuestion_TargetUnitNone
			PRINTFORML [0] 命令が聞こえなかったのか？
			PRINTFORML [1] 有がとう、訂正する
			INPUT
			IF RESULT == 0
				;什麼也不做で街道抜けるわよ
			ELSEIF RESULT == 1
				RETURN 0
			ELSE
				GOTO AttackQuestion_TargetUnitNone
			ENDIF
	ENDIF

	IF D20XX_Unit:TOINT(D20XX_MAP:Y_TargetField:X_TargetField:1):0 == "自軍" || D20XX_Unit:TOINT(D20XX_MAP:Y_TargetField:X_TargetField:1):0 == "友軍"
		CALL D20XX_KOJO_イェニェル("同士討ち警告")
		TRYCALLFORM D20XX_KOJO_%D20XX_Unit:D20XX_SelectUnit:8%("同士討ち")
		$AttackQuestion_TargetIsFriend
			PRINTFORML [0] 構わん、撃て
			PRINTFORML [1] ははっ、冗談だよ
			INPUT
			IF RESULT == 0
				;什麼也不做で街道抜けるわよ
			ELSEIF RESULT == 1
				RETURN 0
			ELSE
				GOTO AttackQuestion_TargetIsFriend
			ENDIF
	ENDIF

	IF (TargetUnit > 0);指定座標にユ针织が居るか確認
		;#region 命中判定

			;#region 命中確率の計算
				PRINTFORML 武器基礎命中率(%D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"命中率")%)
				BaseHitRate = TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"命中率"))

				IF STRFIND(D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1, "スキル"), "【飛行】") == -1;飛行ユ针织は地形による遮蔽BOUNSは貰えないわよ！
					PRINTFORML ×地形効果 %D20XX_GET_HEXDATA(TargetField,"領帯ル名")% ({(TOINT(D20XX_GET_HEXDATA(TargetField,"遮蔽率")))})
					FieldHitRate = 100 - TOINT(D20XX_GET_HEXDATA(TargetField,"遮蔽率"))

					PRINTFORML FieldHitRate = {FieldHitRate}
				ENDIF

				PRINTFORML ×ターゲット指揮統制率 ( 2 - %D20XX_Unit:TargetUnit:4%/%D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1,"指揮統制率")%)
				ControlHitRate = 200 - TOINT(D20XX_Unit:TargetUnit:4) * 100 / TOINT(D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1,"指揮統制率"))

				Dexterity = MathEX_Per(MathEX_Per(BaseHitRate , FieldHitRate), ControlHitRate)

				PRINTFORML ( %D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"命中率")% - {(100 - TOINT(D20XX_GET_HEXDATA(TargetField,"遮蔽率")))/100} ) × {(TOINT(D20XX_Unit:TargetUnit:4)/TOINT(D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1,"指揮統制率")))} = 命中確率 {Dexterity}％

				PRINTFORML
				PRINTFORMW %D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"射撃回数")%発 発射！
				PRINTFORML
			;#endregion

			;#region
				FOR LCount, 0, TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"射撃回数"))
					HitRandomValue = RAND:100 + 1
					PRINTFORML
					IF Dexterity/10 >= HitRandomValue
						PRINTFORMW {Dexterity} >= {HitRandomValue} ！！阴蒂ティカル！！ ダメージ二倍！！
						CALL D20XX_DamageCalc(TargetUnit,1)
						D20XX_Unit:TargetUnit:4 = %TOSTR(TOINT(D20XX_Unit:TargetUnit:4) - TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"制圧力")))%

					ELSEIF Dexterity >= HitRandomValue
						PRINTFORMW {Dexterity} >= {HitRandomValue} 命中！
						CALL D20XX_DamageCalc(TargetUnit,0)
						D20XX_Unit:TargetUnit:4 = %TOSTR(TOINT(D20XX_Unit:TargetUnit:4) - TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"制圧力")))%

					ELSEIF HitRandomValue >= 95
						PRINTFORMW {Dexterity} <= {HitRandomValue} ！！ファンブル！！ 不発弾だった！

					ELSEIF Dexterity < HitRandomValue
						PRINTFORMW {Dexterity} <= {HitRandomValue} 外れ！
						D20XX_Unit:TargetUnit:4 = %TOSTR(TOINT(D20XX_Unit:TargetUnit:4) - TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"制圧力")))%
					ENDIF
					SIF TOINT(D20XX_Unit:TargetUnit:4) < 0
						D20XX_Unit:TargetUnit:4 = 0
				NEXT
			;#endregion
			;#region 撃破処理
				IF TOINT(D20XX_Unit:TargetUnit:2) <= 0
					PRINTFORMW 敵を撃破！
					TRYCALLFORM Demoslavia20XX_KOJO_%D20XX_Unit:D20XX_SelectUnit:8%("敵撃破")
					;CALL D20XX_Unit_Del(TargetUnit)
					D20XX_MAP:Y_TargetField:X_TargetField:1 = "-1"
				ENDIF
			;#endregion
		;#endregion
	ELSE
		CALL D20XX_KOJO_イェニェル("着弾地点敵不在")
	ENDIF
	;攻撃したら残行動力を0にする
	D20XX_Unit:D20XX_SelectUnit:3 = 0
	RETURN 1
@D20XX_EnemyHitCalc(Y_TargetField,X_TargetField)
	#DIM DYNAMIC Y_TargetField
	#DIM DYNAMIC X_TargetField

	#DIM DYNAMIC TargetUnit
	#DIMS DYNAMIC TargetField
	#DIM DYNAMIC Dexterity

	#DIM DYNAMIC HitRandomValue
	#DIM DYNAMIC HitCount
	#DIM DYNAMIC CriticalHitCount
	#DIM DYNAMIC LCount

	#DIM DYNAMIC BaseHitRate
	#DIM DYNAMIC FieldHitRate
	#DIM DYNAMIC ControlHitRate

	#DIM DYNAMIC DefaultControlPower
	#DIM DYNAMIC NowControlPower

	TargetField = %D20XX_MAP:Y_TargetField:X_TargetField:0%
	TargetUnit = TOINT(D20XX_MAP:Y_TargetField:X_TargetField:1)
	;#region 命中確率の計算
		PRINTFORML 武器基礎命中率(%D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"命中率")%)
		BaseHitRate = TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"命中率"))
		PRINTFORML Debug BaseHitRate = {BaseHitRate}

		IF STRFIND(D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1, "スキル"), "【飛行】") == -1;飛行ユ针织は地形による遮蔽BOUNSは貰えないわよ！
			PRINTFORML ×地形効果 %D20XX_GET_HEXDATA(TargetField,"領帯ル名")% ({(TOINT(D20XX_GET_HEXDATA(TargetField,"遮蔽率")))})
			FieldHitRate = 100 - TOINT(D20XX_GET_HEXDATA(TargetField,"遮蔽率"))

			PRINTFORML FieldHitRate = {FieldHitRate}
		ENDIF
		NowControlPower = TOINT(D20XX_Unit:TargetUnit:4)
		DefaultControlPower = TOINT(D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1,"指揮統制率"))

		PRINTFORML ×ターゲット指揮統制率 ( 2 - {NowControlPower}/{DefaultControlPower})
		IF DefaultControlPower == 0 || DefaultControlPower == 0;Defaultが0のパターンて有えなくない？
			ControlHitRate = 200
		ELSE
			ControlHitRate = 200 - TOINT(D20XX_Unit:TargetUnit:4) * 100 / TOINT(D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1,"指揮統制率"))
		ENDIF

		Dexterity = MathEX_Per(MathEX_Per(BaseHitRate , FieldHitRate), ControlHitRate)

		PRINTFORML ( %D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"命中率")% - {(100 - TOINT(D20XX_GET_HEXDATA(TargetField,"遮蔽率")))/100} ) × {ControlHitRate} = 命中確率 {Dexterity}％

		PRINTFORML
		PRINTFORMW %D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"射撃回数")%発 発射！
		PRINTFORML
	;#endregion

	;#region
		FOR LCount, 0, TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"射撃回数"))
			HitRandomValue = RAND:100 + 1
			PRINTFORML
			IF Dexterity/10 >= HitRandomValue
				PRINTFORMW {Dexterity} >= {HitRandomValue} ！！阴蒂ティカル！！ ダメージ二倍！！
				CALL D20XX_DamageCalc(TargetUnit,1)
				D20XX_Unit:TargetUnit:4 = %TOSTR(TOINT(D20XX_Unit:TargetUnit:4) - TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"制圧力")))%

			ELSEIF Dexterity >= HitRandomValue
				PRINTFORMW {Dexterity} >= {HitRandomValue} 命中！
				CALL D20XX_DamageCalc(TargetUnit,0)
				D20XX_Unit:TargetUnit:4 = %TOSTR(TOINT(D20XX_Unit:TargetUnit:4) - TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"制圧力")))%

			ELSEIF HitRandomValue >= 95
				PRINTFORMW {Dexterity} <= {HitRandomValue} ！！ファンブル！！ 不発弾だった！

			ELSEIF Dexterity < HitRandomValue
				PRINTFORMW {Dexterity} <= {HitRandomValue} 外れ！
				D20XX_Unit:TargetUnit:4 = %TOSTR(TOINT(D20XX_Unit:TargetUnit:4) - TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"制圧力")))%
			ENDIF
			SIF TOINT(D20XX_Unit:TargetUnit:4) < 0
				D20XX_Unit:TargetUnit:4 = 0
		NEXT
	;#endregion
	;#region 撃破処理
		IF TOINT(D20XX_Unit:TargetUnit:2) <= 0
			PRINTFORMW 撃破されました！
			TRYCALLFORM Demoslavia20XX_KOJO_%D20XX_Unit:D20XX_SelectUnit:8%("敵撃破")
			;CALL D20XX_Unit_Del(TargetUnit)
			D20XX_MAP:Y_TargetField:X_TargetField:1 = "-1"
		ENDIF
	;#endregion

@D20XX_DamageCalc(TargetUnit,IsCritical)
	#DIM DYNAMIC IsCritical
	#DIM DYNAMIC TargetUnit
	#DIM DYNAMIC Damage

		IF IsCritical > 0
			Damage = TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"威力")) * 2 - TOINT(D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1,"装甲"))
			PRINTFORML 威力( %D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"威力")% ) × 阴蒂ティカルヒットBOUNS( 2 ) - 装甲( %D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1,"装甲")% ) = {Damage}ダメージ
		ELSE
			Damage = TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"威力")) - TOINT(D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1,"装甲"))
			PRINTFORML 威力(%D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"威力")%) - 装甲(%D20XX_GET_UNITDATA(D20XX_Unit:TargetUnit:1,"装甲")%) = {Damage}ダメージ
		ENDIF

		IF Damage > 0
			IF TOINT(D20XX_Unit:TargetUnit:5) > 0
				PRINTFORML !!Booooom!!
				PRINTFORML era起爆！ダメージ無効化！
				PRINTFORML
				PRINTFORML
				PRINTFORMW 残era %D20XX_Unit:TargetUnit:5% → {TOINT(D20XX_Unit:TargetUnit:5) - 1}
				D20XX_Unit:TargetUnit:5 = %TOSTR(TOINT(D20XX_Unit:TargetUnit:5) - 1)%
			ELSE
				PRINTFORML %D20XX_Unit:TargetUnit:2% - {Damage} = {TOINT(D20XX_Unit:TargetUnit:2) - Damage}
				D20XX_Unit:TargetUnit:2 = %TOSTR(TOINT(D20XX_Unit:TargetUnit:2) - Damage)%
			ENDIF
		ELSE
			SIF D20XX_TarnMode == "Player"
				CALL D20XX_KOJO_イェニェル("0ダメージ")
		ENDIF

;;;ARGS = 武器種類名
;;;ARG:0 = 計算中残射程量
;;;ARG:1 = 現在計算中心点Y座標
;;;ARG:2 = 現在計算中心点X座標
@D20XX_AttackRangeCalc(WeaponName,AttackRange,Y_Before,X_Before)
	#DIMS DYNAMIC WeaponName
	#DIM DYNAMIC AttackRange
	#DIM DYNAMIC X_Before
	#DIM DYNAMIC Y_Before
	#DIM DYNAMIC X_After
	#DIM DYNAMIC Y_After

	#DIM DYNAMIC LCount

	;#region とりあえず遮蔽物判定抜きの攻撃可能範囲を設定する
		;1時方向のへクスへ移動したときのコスト計算
		IF X_Before+1 <= 199 && Y_Before-1 >= 0;MAPの右端でも上端でも無いことの確認
			X_After = X_Before + 1
			Y_After = Y_Before - 1
			IF D20XX_AttackRangeMap:Y_After:X_After < AttackRange - 1
				D20XX_AttackRangeMap:Y_After:X_After = AttackRange - 1
				CALL D20XX_AttackRoute_Add(Y_Before,X_Before)
				CALL D20XX_AttackRangeCalc(WeaponName,D20XX_AttackRangeMap:Y_After:X_After,Y_After,X_After)
				CALL D20XX_AttackRoute_GetLast(Y_Before,X_Before)
				CALL D20XX_AttackRoute_DelLast
			ENDIF
		ENDIF

		;3時方向のへクスへ移動したときのコスト計算
		IF X_Before+2 <= 199;MAPの右端では無いことの確認
			X_After = X_Before + 2
			Y_After = Y_Before
			IF D20XX_AttackRangeMap:Y_After:X_After < AttackRange - 1
				D20XX_AttackRangeMap:Y_After:X_After = AttackRange - 1
				CALL D20XX_AttackRoute_Add(Y_Before,X_Before)
				CALL D20XX_AttackRangeCalc(WeaponName,D20XX_AttackRangeMap:Y_After:X_After,Y_After,X_After)
				CALL D20XX_AttackRoute_GetLast(Y_Before,X_Before)
				CALL D20XX_AttackRoute_DelLast
			ENDIF
		ENDIF

		;5時方向のへクスへ移動したときのコスト計算
		IF X_Before+1 <= 199 && Y_Before+1 <= 200;MAPの右端でも下端でも無いことの確認
			X_After = X_Before + 1
			Y_After = Y_Before + 1
			IF D20XX_AttackRangeMap:Y_After:X_After < AttackRange - 1
				D20XX_AttackRangeMap:Y_After:X_After = AttackRange - 1
				CALL D20XX_AttackRoute_Add(Y_Before,X_Before)
				CALL D20XX_AttackRangeCalc(WeaponName,D20XX_AttackRangeMap:Y_After:X_After,Y_After,X_After)
				CALL D20XX_AttackRoute_GetLast(Y_Before,X_Before)
				CALL D20XX_AttackRoute_DelLast
			ENDIF
		ENDIF

		;7時方向のへクスへ移動したときのコスト計算
		IF X_Before-1 >= 0 && Y_Before+1 <= 200;MAPの左端でも下端でも無いことの確認
			X_After = X_Before - 1
			Y_After = Y_Before + 1
			IF D20XX_AttackRangeMap:Y_After:X_After < AttackRange - 1
				D20XX_AttackRangeMap:Y_After:X_After = AttackRange - 1
				CALL D20XX_AttackRoute_Add(Y_Before,X_Before)
				CALL D20XX_AttackRangeCalc(WeaponName,D20XX_AttackRangeMap:Y_After:X_After,Y_After,X_After)
				CALL D20XX_AttackRoute_GetLast(Y_Before,X_Before)
				CALL D20XX_AttackRoute_DelLast
			ENDIF
		ENDIF

		;9時方向のへクスへ移動したときのコスト計算
		IF X_Before-2 >= 0;MAPの左端では無いことの確認
			X_After = X_Before - 2
			Y_After = Y_Before
			IF D20XX_AttackRangeMap:Y_After:X_After < AttackRange - 1
				D20XX_AttackRangeMap:Y_After:X_After = AttackRange - 1
				CALL D20XX_AttackRoute_Add(Y_Before,X_Before)
				CALL D20XX_AttackRangeCalc(WeaponName,D20XX_AttackRangeMap:Y_After:X_After,Y_After,X_After)
				CALL D20XX_AttackRoute_GetLast(Y_Before,X_Before)
				CALL D20XX_AttackRoute_DelLast
			ENDIF
		ENDIF

		;11時方向のへクスへ移動したときのコスト計算
		IF X_Before-1 >= 0 && Y_Before-1 >= 0;MAPの左端でも上端でも無いことの確認
			X_After = X_Before - 1
			Y_After = Y_Before - 1
			IF D20XX_AttackRangeMap:Y_After:X_After < AttackRange - 1
				D20XX_AttackRangeMap:Y_After:X_After = AttackRange - 1
				CALL D20XX_AttackRoute_Add(Y_Before,X_Before)
				CALL D20XX_AttackRangeCalc(WeaponName,D20XX_AttackRangeMap:Y_After:X_After,Y_After,X_After)
				CALL D20XX_AttackRoute_GetLast(Y_Before,X_Before)
				CALL D20XX_AttackRoute_DelLast
			ENDIF
		ENDIF
	;#endregion
;;;WeaponName = 使用武器名
;;;ARG:0 = Y座標
;;;ARG:1 = X座標
@D20XX_AttackRoute_Add(ARG:0,ARG:1)
	#DIM DYNAMIC LCount
	FOR LCount, 0, TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"射程"))
		IF D20XX_AttackRoute:LCount:0 == -1 && D20XX_AttackRoute:LCount:1 == -1
			D20XX_AttackRoute:LCount:0 = ARG:0
			D20XX_AttackRoute:LCount:1 = ARG:1
			BREAK
		ENDIF
	NEXT
@D20XX_AttackRoute_GetLast(Return_Y,Return_X)
	#DIM REF Return_Y
	#DIM REF Return_X
	#DIM LCount
	FOR LCount, 0, TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"射程"))
		IF D20XX_AttackRoute:LCount:0 == -1 && D20XX_AttackRoute:LCount:1 == -1 && LCount > 0
			Return_Y = D20XX_AttackRoute:(LCount-1):0
			Return_X = D20XX_AttackRoute:(LCount-1):1
			BREAK
		ENDIF
	NEXT
@D20XX_AttackRoute_DelLast
	#DIM LCount
	FOR LCount, 0, TOINT(D20XX_GET_WEAPONDATA(D20XX_SelectWeapon,"射程"))
		IF D20XX_AttackRoute:LCount:0 == -1 && D20XX_AttackRoute:LCount:1 == -1 && LCount > 0
			D20XX_AttackRoute:(LCount-1):0 = -1
			D20XX_AttackRoute:(LCount-1):1 = -1
			BREAK
		ENDIF
	NEXT

license: unknown


code:
;=========================
;D20XX_MAPコンストラクタ
;=========================
@D20XX_Map_Constructor
	#DIM DYNAMIC Y_COUNT
	#DIM DYNAMIC X_COUNT
		FOR Y_COUNT, 0, 200
			FOR X_COUNT, 0, 200
				D20XX_MAP:Y_COUNT:X_COUNT:0 = 無
				D20XX_MAP:Y_COUNT:X_COUNT:1 = None
				D20XX_MAP:Y_COUNT:X_COUNT:2 = false
			NEXT
		NEXT
;=========================
;D20XX_Unitコンストラクタ
;=========================
@D20XX_Unit_Constructor
	VARSET D20XX_Unit:0:0, "None"

@D20XX_UnitMovePower_Constructor
	#DIM STATIC LCOUNT
		FOR LCOUNT, 0, 10000
			D20XX_Unit:LCOUNT:3 = %D20XX_GET_UNITDATA(D20XX_Unit:LCOUNT:1,"行動力")%
		NEXT
;=========================
;Leaderコンストラクタ
;=========================
@D20XX_Leader_Constructor
	VARSET D20XX_Leader:0:0, ""
;=========================
;D20XX_ViewHTMLコンストラクタ
;=========================
@D20XX_HTML_Constructor
	VARSET D20XX_HTML:0, ""

@D20XX_MoveCostMap_Constructor
	VARSET D20XX_MoveCostMap:0:0, -1

@D20XX_MoveRoute_Constructor
	VARSET D20XX_MoveRoute:0:0, -1

@D20XX_AttackRangeMap_Constructor
	VARSET D20XX_AttackRangeMap:0:0, -1

@D20XX_AttackRoute_Constructor
	VARSET D20XX_AttackRoute:0:0, -1

@D20XX_CandidateList_Constructor
	VARSET D20XX_CandidateList:0:0 ,-1

@D20XX_EnemyTargetSelectMap_Constructor
	VARSET D20XX_EnemyTargetSelectMap:0:0, -1

@D20XX_EnemyMoveSelectMap_Constructor
	VARSET D20XX_EnemyMoveSelectMap:0:0, -1

;=========================
;D20XX_Astarコンストラクタ
;=========================
@D20XX_AstarMap_Constructor
	VARSET D20XX_AstarMap:0:0:0, -1

@D20XX_AstarQueue_Constructor
	VARSET D20XX_AstarQueue:0:0, -1

;=========================
;D20XX_OSコンストラクタ
;=========================0
@D20XX_OS_Base_Constructor
	VARSET D20XX_OS_Base:0, ""

@D20XX_OS_Result_Constructor
	VARSET D20XX_OS_Result:0, ""

@D20XX_OS_WindowInput_Constructor
	VARSET D20XX_OS_WindowInput:0, ""

@D20XX_OS_Window_Constructor
	VARSET D20XX_OS_Window:0, ""

@D20XX_OS_WindowsHTML_Constructor
	VARSET D20XX_OS_WindowsHTML:0:0 , ""


code: ;このファイルはパッチで上書きする際に、元々入っていたファイルを消すために存在する上書き用の無意味なファイルです。