code:
;-------------------------------------------------
;# _COM_AUTOSELECT_3_コマンドの優先度設定
;-------------------------------------------------
@COM_AUTOSELECT_SET_COM_PRIORITY(MAIN_PLAYER, MAIN_TARGET)
#DIM MAIN_PLAYER
#DIM MAIN_TARGET
#DIM L_COUNTER							;FOR文のカウンタ
#DIM COM_AUTO_CATEGORY_PRIORITY_SUM		;コマンド実行優先度の計算に使う一時変数の補助
#DIM SEXUAL_PREFERENCE_ADD, 4			;性癖設定を反映させるための補正
#DIM SEXUAL_PREFERENCE_MULTI, 4

;-------------------------------------------------
;## リセット
;-------------------------------------------------
VARSET COM_AUTO_COM_PRIORITY, 0
VARSET COM_AUTO_COM_OPTION_PRIORITY, 0

;-------------------------------------------------
;## 各コマンドの優先度リスト読み込み
;-------------------------------------------------
FOR L_COUNTER, 1, COM_AUTO_CATEGORY_NUM_MAX + 1
	CALLFORM COM_AUTOSELECT_SET_COM_PRIORITY_{L_COUNTER}(MAIN_PLAYER, MAIN_TARGET)
NEXT

;-------------------------------------------------
;## デバッグ コマンド優先度 禁止前
;-------------------------------------------------
;チェックが多すぎると読みにくいのでコメントアウトしている
;何か変だったときコメントアウトを外して確認する用
; [IF_DEBUG]
; DEBUGPRINTFORML
; DEBUGPRINTFORML #### DEBUG コマンド優先度 禁止前
; DEBUGPRINTFORM      前回実行
; IF TFLAG:調教経過時間 != 0
; 	IF PREVCOM_TYPE == 0
; 		DEBUGPRINTFORML {PREVCOM}.%@"%TRAINNAME:PREVCOM%させる", 26, LEFT%
; 	ELSEIF PREVCOM_TYPE == 1
; 		DEBUGPRINTFORML {PREVCOM}.%@"%TRAINNAME:PREVCOM%する", 26, LEFT%
; 	ELSE
; 		DEBUGPRINTFORML {PREVCOM}.%@"第三者が%TRAINNAME:PREVCOM%", 26, LEFT%
; 	ENDIF
; ELSE
; 	DEBUGPRINTFORML なし
; ENDIF
; DEBUGPRINTFORM      潤滑は
; IF COM_AUTOSELECT_IS_WET_ENOUGH(MAIN_TARGET)
; 	DEBUGPRINTFORML 充分  PALAM {PALAM:MAIN_TARGET:潤滑}
; ELSE
; 	DEBUGPRINTFORML 不足  PALAM {PALAM:MAIN_TARGET:潤滑}
; ENDIF

; FOR L_COUNTER, 0, 1000
; 	SIF TRAINNAME:L_COUNTER == ""
; 		CONTINUE
; 	SIF COM_AUTO_COM_PRIORITY:L_COUNTER <= 0
; 		CONTINUE
; 	DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:L_COUNTER%する", 26, LEFT% %NUM_FORMAT(COM_AUTO_COM_PRIORITY:L_COUNTER), 10, RIGHT%
; NEXT
; FOR L_COUNTER, ADD_NUM_対象が実行, ADD_NUM_対象が実行 + 1000
; 	SIF TRAINNAME:(L_COUNTER - ADD_NUM_対象が実行) == ""
; 		CONTINUE
; 	SIF COM_AUTO_COM_PRIORITY:L_COUNTER <= 0
; 		CONTINUE
; 	DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:(L_COUNTER - ADD_NUM_対象が実行)%させる", 26, LEFT% %NUM_FORMAT(COM_AUTO_COM_PRIORITY:L_COUNTER), 10, RIGHT%
; NEXT
; [ENDIF]

;-------------------------------------------------
;## 除外 カテゴリ優先度0未満
;-------------------------------------------------
FOR L_COUNTER, 0, ADD_NUM_対象が実行 + 1000
	IF COM_AUTO_CATEGORY_PRIORITY:(COM_AUTO_COM_CATEGORY:L_COUNTER) <= 0
		COM_AUTO_COM_PRIORITY:L_COUNTER = -1
	ENDIF
NEXT

;-------------------------------------------------
;## 補正 前回実行
;	優先度を1/4にする
;-------------------------------------------------
IF TFLAG:調教経過時間 != 0
	IF PREVCOM >= 0
		IF PREVCOM_TYPE == 0 && COM_AUTO_COM_PRIORITY:(PREVCOM + ADD_NUM_対象が実行) > 0
			COM_AUTO_COM_PRIORITY:(PREVCOM + ADD_NUM_対象が実行) /= 4
		ELSEIF PREVCOM_TYPE == 1 && COM_AUTO_COM_PRIORITY:PREVCOM > 0
			COM_AUTO_COM_PRIORITY:PREVCOM /= 4
		ELSEIF COM_AUTO_COM_PRIORITY:(PREVCOM + ADD_NUM_第三者に実行) > 0
			COM_AUTO_COM_PRIORITY:(PREVCOM + ADD_NUM_第三者に実行) /= 4
		ENDIF
	ENDIF
ENDIF

;-------------------------------------------------
;## 選択不可能 COM_ABLE
;	判定用フラグをオンにして、実行可否のみ確かめ
;	不可なら優先度を0にする
;-------------------------------------------------
;コマンド判定フラグON
COM_ENABLE = 1

;[IF_DEBUG]
;	DEBUGPRINTFORML
;	DEBUGPRINTFORML #### DEBUG 選択不可能チェック
;	DEBUGPRINTFORML      COM_ABLEで弾かれたコマンド
;[ENDIF]

;MAIN_PLAYER実行、MAIN_TARGET対象で行えるかチェック
CALL CLEAR_MPLY()
CALL CLEAR_MTAR()
CALL ADD_MPLY(MAIN_PLAYER)
CALL ADD_MTAR(MAIN_TARGET)
FOR L_COUNTER, 0, 1000
	SIF TRAINNAME:L_COUNTER == ""
		CONTINUE
	IF COM_FORBIDDEN:MAIN_PLAYER:L_COUNTER
		COM_AUTO_COM_PRIORITY:(L_COUNTER) = 0
		CONTINUE
	ENDIF
	RESULT = 0
	CALL CHECK_COMABLE(L_COUNTER)
	;干渉するなら優先度を半分に
	SIF GROUPMATCH(RESULT, 2, 3)
		COM_AUTO_COM_PRIORITY:L_COUNTER /= 2
	;ここでは必ず人数不足で実行不可が帰ってくるので、回避
	IF !RESULT && !GROUPMATCH(L_COUNTER, GET_TRAINNUM("順番に挿入"), GET_TRAINNUM("順番にＡ挿入"), GET_TRAINNUM("代わる代わる挿入"), GET_TRAINNUM("代わる代わるＡ挿入"), GET_TRAINNUM("Ｗ顔面騎乗"))
		; [IF_DEBUG]
		; DEBUGPRINTFORML {L_COUNTER, 4}.%TRAINNAME:L_COUNTER%するは不可
		; [ENDIF]
		COM_AUTO_COM_PRIORITY:L_COUNTER = 0
	ENDIF
NEXT

;MAIN_TARGET実行、MAIN_PLAYER実行で行えるかチェック
CALL CLEAR_MPLY()
CALL CLEAR_MTAR()
CALL ADD_MPLY(MAIN_TARGET)
CALL ADD_MTAR(MAIN_PLAYER)
FOR L_COUNTER, 0, 1000
	SIF TRAINNAME:L_COUNTER == ""
		CONTINUE
	IF COM_FORBIDDEN:MAIN_PLAYER:(L_COUNTER + ADD_NUM_対象が実行)
		COM_AUTO_COM_PRIORITY:(L_COUNTER + ADD_NUM_対象が実行) = 0
		CONTINUE
	ENDIF
	RESULT = 0
	CALL CHECK_COMABLE(L_COUNTER)
	;ここでは必ず人数不足で実行不可が帰ってくるので、回避
	IF !RESULT && !GROUPMATCH(L_COUNTER, GET_TRAINNUM("順番に挿入"), GET_TRAINNUM("順番にＡ挿入"), GET_TRAINNUM("代わる代わる挿入"), GET_TRAINNUM("代わる代わるＡ挿入"), GET_TRAINNUM("Ｗ顔面騎乗"))
		; [IF_DEBUG]
		; ;			DEBUGPRINTFORML {L_COUNTER, 4}.%TRAINNAME:L_COUNTER%されるは不可
		; [ENDIF]
		COM_AUTO_COM_PRIORITY:(L_COUNTER + ADD_NUM_対象が実行) = 0
	ENDIF
NEXT

;コマンド判定フラグOFF
COM_ENABLE = 0

[IF_DEBUG]
DEBUGPRINTFORML
DEBUGPRINTFORML #### DEBUG コマンド優先度 COM_ABLEチェック後
DEBUGPRINTFORM      前回実行
IF TFLAG:調教経過時間 != 0
	IF PREVCOM_TYPE == 0
		DEBUGPRINTFORML {PREVCOM}.%@"%TRAINNAME:PREVCOM%させる", 26, LEFT%
	ELSEIF PREVCOM_TYPE == 1
		DEBUGPRINTFORML {PREVCOM}.%@"%TRAINNAME:PREVCOM%する", 26, LEFT%
	ELSE
		DEBUGPRINTFORML {PREVCOM}.%@"第三者が%TRAINNAME:PREVCOM%", 26, LEFT%
	ENDIF
ENDIF
DEBUGPRINTFORM      潤滑は
IF COM_AUTOSELECT_IS_WET_ENOUGH(MAIN_TARGET)
	DEBUGPRINTFORML 充分  PALAM {PALAM:MAIN_TARGET:潤滑}
ELSE
	DEBUGPRINTFORML 不足  PALAM {PALAM:MAIN_TARGET:潤滑}
ENDIF

FOR L_COUNTER, 0, 1000
	IF COM_AUTO_COM_PRIORITY:L_COUNTER > 0
		DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:L_COUNTER%する", 26, LEFT% %NUM_FORMAT(COM_AUTO_COM_PRIORITY:L_COUNTER), 10, RIGHT%
	ENDIF
NEXT
FOR L_COUNTER, ADD_NUM_対象が実行, ADD_NUM_対象が実行 + 1000
	IF COM_AUTO_COM_PRIORITY:L_COUNTER > 0
		DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:(L_COUNTER - ADD_NUM_対象が実行)%させる", 26, LEFT% %NUM_FORMAT(COM_AUTO_COM_PRIORITY:L_COUNTER), 10, RIGHT%
	ENDIF
NEXT
[ENDIF]

;-------------------------------------------------
;## 正規化
;	コマンドの優先度をカテゴリごとの実行確率に合わせて設定
;-------------------------------------------------
VARSET COM_AUTO_COM_PRIORITY_SUM, 0
VARSET COM_AUTO_COM_CATEGORY_COM_NUM, 0
COM_AUTO_CATEGORY_PRIORITY_SUM = 0

FOR L_COUNTER, 0, COM_AUTO_CATEGORY_NUM_MAX + 1
	SIF COM_AUTO_CATEGORY_PRIORITY:L_COUNTER <= 0
		CONTINUE
	COM_AUTO_CATEGORY_PRIORITY_SUM += MAX(COM_AUTO_CATEGORY_PRIORITY:L_COUNTER, 0)
NEXT

IF COM_AUTO_CATEGORY_PRIORITY_SUM >= 1
	FOR L_COUNTER, 0, COM_AUTO_CATEGORY_NUM_MAX + 1
		SIF COM_AUTO_CATEGORY_PRIORITY:L_COUNTER <= 0
			CONTINUE
		COM_AUTO_CATEGORY_PRIORITY:L_COUNTER = COM_AUTO_CATEGORY_PRIORITY:L_COUNTER * 10000 / COM_AUTO_CATEGORY_PRIORITY_SUM
	NEXT
ELSE
	COM_AUTO_CATEGORY_PRIORITY:COM_AUTO_CATEGORY_NUM_愛撫する = 10000
ENDIF

FOR L_COUNTER, 0, 3000
	SIF COM_AUTO_CATEGORY_PRIORITY:(COM_AUTO_COM_CATEGORY:L_COUNTER) <= 0 || COM_AUTO_COM_PRIORITY:L_COUNTER <= 0
		CONTINUE
	COM_AUTO_COM_CATEGORY_COM_NUM:(COM_AUTO_COM_CATEGORY:L_COUNTER) ++
	COM_AUTO_COM_PRIORITY_SUM:(COM_AUTO_COM_CATEGORY:L_COUNTER) += MAX(COM_AUTO_COM_PRIORITY:L_COUNTER, 0)
NEXT

FOR L_COUNTER, 0, COM_AUTO_CATEGORY_NUM_MAX + 1
	SIF COM_AUTO_COM_PRIORITY_SUM:L_COUNTER <= 0 || COM_AUTO_COM_CATEGORY_COM_NUM:L_COUNTER <= 0
		CONTINUE
	COM_AUTO_COM_PRIORITY_SUM:L_COUNTER = COM_AUTO_COM_PRIORITY_SUM:L_COUNTER / COM_AUTO_COM_CATEGORY_COM_NUM:L_COUNTER
NEXT

FOR L_COUNTER, 0, 3000
	SIF COM_AUTO_COM_PRIORITY:L_COUNTER <= 0
		CONTINUE
	IF COM_AUTO_COM_PRIORITY_SUM:(COM_AUTO_COM_CATEGORY:L_COUNTER) > 0 && COM_AUTO_CATEGORY_PRIORITY:(COM_AUTO_COM_CATEGORY:L_COUNTER) > 0
		;カテゴリ優先度*100/優先度合計値
		COM_AUTO_COM_PRIORITY:L_COUNTER = COM_AUTO_COM_PRIORITY:L_COUNTER * COM_AUTO_CATEGORY_PRIORITY:(COM_AUTO_COM_CATEGORY:L_COUNTER) * 100 / COM_AUTO_COM_PRIORITY_SUM:(COM_AUTO_COM_CATEGORY:L_COUNTER)
	ELSE
		COM_AUTO_COM_PRIORITY:L_COUNTER = 0
	ENDIF
NEXT

;カテゴリに属するコマンドが一つもないなら優先度を0に
FOR L_COUNTER, 0, COM_AUTO_CATEGORY_NUM_MAX + 1
	SIF COM_AUTO_COM_CATEGORY_COM_NUM:L_COUNTER == 0
		COM_AUTO_CATEGORY_PRIORITY:L_COUNTER = 0
NEXT

[IF_DEBUG]
DEBUGPRINTFORML
DEBUGPRINTFORML #### DEBUG カテゴリ優先度 正規化後
FOR L_COUNTER, 1, COM_AUTO_CATEGORY_NUM_MAX + 1
	IF COM_AUTO_CATEGORY_PRIORITY:L_COUNTER > 0
		DEBUGPRINTFORML {L_COUNTER, 4}.%COM_AUTO_COM_CATEGORY_NAME(L_COUNTER), 26, LEFT% %NUM_FORMAT(COM_AUTO_CATEGORY_PRIORITY:L_COUNTER), 10, RIGHT%
	ENDIF
NEXT

;	DEBUGPRINTFORML
;	DEBUGPRINTFORML #### DEBUG コマンド優先度 正規化後
;	DEBUGPRINTFORML      潤滑 CUP {CUP:MAIN_TARGET:潤滑} / PALAM {PALAM:MAIN_TARGET:潤滑}
;
;	FOR L_COUNTER, 0, 1000
;		IF COM_AUTO_COM_PRIORITY:L_COUNTER > 0
;			DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:L_COUNTER%する", 26, LEFT% %NUM_FORMAT(COM_AUTO_COM_PRIORITY:L_COUNTER), 10, RIGHT%
;		ENDIF
;	NEXT
;	FOR L_COUNTER, ADD_NUM_対象が実行, ADD_NUM_対象が実行 + 1000
;		IF COM_AUTO_COM_PRIORITY:L_COUNTER > 0
;			DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:(L_COUNTER - ADD_NUM_対象が実行)%させる", 26, LEFT% %NUM_FORMAT(COM_AUTO_COM_PRIORITY:L_COUNTER), 10, RIGHT%
;		ENDIF
;	NEXT
[ENDIF]

;-------------------------------------------------
;## 補正 性癖設定
;	好みLvを設定したコマンドは、カテゴリの選択率を無視して優先度を上げる
;-------------------------------------------------
SEXUAL_PREFERENCE_ADD:0 = 0
SEXUAL_PREFERENCE_ADD:1 = 300000
SEXUAL_PREFERENCE_ADD:2 = 800000
SEXUAL_PREFERENCE_ADD:3 = 2000000

SEXUAL_PREFERENCE_MULTI:0 = 1
SEXUAL_PREFERENCE_MULTI:1 = 2
SEXUAL_PREFERENCE_MULTI:2 = 4
SEXUAL_PREFERENCE_MULTI:3 = 12

;-------------------------------------------------
;## デバッグ 性癖設定好みレベル表示
;-------------------------------------------------
[IF_DEBUG]
DEBUGPRINTFORML
DEBUGPRINTFORML #### DEBUG 性癖設定
[ENDIF]
FOR L_COUNTER, 0, 1000
	;カテゴリが禁止されていたら追加しない
	SIF COM_AUTO_CATEGORY_PRIORITY:(COM_AUTO_COM_CATEGORY:L_COUNTER) <= 0
		CONTINUE
	SIF COM_TENDENCY:MAIN_PLAYER:L_COUNTER <= 0 && COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_対象が実行) <= 0 && COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_第三者に実行) <= 0
		CONTINUE

	IF COM_TENDENCY:MAIN_PLAYER:L_COUNTER > 0 && COM_EXP:MAIN_PLAYER:L_COUNTER > 0
		[IF_DEBUG]
		DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:L_COUNTER%する", 26, LEFT% 好みLv.{COM_TENDENCY:MAIN_PLAYER:L_COUNTER}
		[ENDIF]
		COM_AUTO_COM_PRIORITY:L_COUNTER = MAX(COM_AUTO_COM_PRIORITY:L_COUNTER, 0) * SEXUAL_PREFERENCE_MULTI:(COM_TENDENCY:MAIN_PLAYER:L_COUNTER)
		COM_AUTO_COM_PRIORITY:L_COUNTER += SEXUAL_PREFERENCE_ADD:(COM_TENDENCY:MAIN_PLAYER:L_COUNTER)
	ENDIF

	IF COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_対象が実行) > 0 && COM_EXP:MAIN_PLAYER:L_COUNTER > 0
		[IF_DEBUG]
		DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:L_COUNTER%される", 26, LEFT% 好みLv.{COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_対象が実行)}
		[ENDIF]
		COM_AUTO_COM_PRIORITY:(L_COUNTER + ADD_NUM_対象が実行) = MAX(COM_AUTO_COM_PRIORITY:(L_COUNTER + ADD_NUM_対象が実行), 0) * SEXUAL_PREFERENCE_MULTI:(COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_対象が実行))
		COM_AUTO_COM_PRIORITY:(L_COUNTER + ADD_NUM_対象が実行) += SEXUAL_PREFERENCE_ADD:(COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_対象が実行))
	ENDIF

	IF COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_第三者に実行) > 0 && COM_EXP:MAIN_PLAYER:L_COUNTER > 0
		[IF_DEBUG]
		DEBUGPRINTFORML {L_COUNTER, 4}.%@"第三者に%TRAINNAME:L_COUNTER%", 26, LEFT% 好みLv.{COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_第三者に実行)}
		[ENDIF]
		COM_AUTO_COM_PRIORITY:(L_COUNTER + ADD_NUM_第三者に実行) = MAX(COM_AUTO_COM_PRIORITY:(L_COUNTER + ADD_NUM_第三者に実行), 0) * SEXUAL_PREFERENCE_MULTI:(COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_第三者に実行))
		COM_AUTO_COM_PRIORITY:(L_COUNTER + ADD_NUM_第三者に実行) += SEXUAL_PREFERENCE_ADD:(COM_TENDENCY:MAIN_PLAYER:(L_COUNTER + ADD_NUM_第三者に実行))
	ENDIF
NEXT

;-------------------------------------------------
;## 奉仕モード時の傾向補正
;-------------------------------------------------
IF TFLAG:奉仕モード
	FOR L_COUNTER, 0, 1000
		;カテゴリが禁止されていたら追加しない
		SIF COM_AUTO_CATEGORY_PRIORITY:(COM_AUTO_COM_CATEGORY:L_COUNTER) <= 0
			CONTINUE
		;実行
		CALL COM_AUTO_SELECT_PRIORITY_FOR_SERVICE860(L_COUNTER, MAIN_PLAYER, MAIN_TARGET)
	NEXT
ENDIF

;-------------------------------------------------
;## 補正 潤滑不足
;	一部のコマンドは潤滑不足なら選択低下
;	動物はお構いなし
;-------------------------------------------------
IF !COM_AUTOSELECT_IS_WET_ENOUGH(MAIN_TARGET) && !IS_ANIMAL(MAIN_PLAYER)
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻尾挿入") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻尾挿入") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻尾Ａ挿入") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻尾Ａ挿入") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("貝合わせ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("貝合わせ") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("双頭バイブ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("双頭バイブ") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("順番に挿入") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("順番に挿入") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("順番にＡ挿入") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("順番にＡ挿入") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("代わる代わる挿入") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("代わる代わる挿入") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("代わる代わるＡ挿入") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("代わる代わるＡ挿入") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("バイブ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("バイブ") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("アナルバイブ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("アナルバイブ") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ｖ拡張バルーン") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ｖ拡張バルーン") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ拡張バルーン") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ拡張バルーン") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("フィストファック") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("フィストファック") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("アナルフィスト") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("アナルフィスト") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手挿入") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手挿入") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手Ａ挿入") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手Ａ挿入") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手産卵") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手産卵") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手Ａ産卵") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手Ａ産卵") /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("素股")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("素股")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("貝合わせ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("貝合わせ")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("双頭バイブ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("双頭バイブ")) /= 2
	FOR L_COUNTER, 0, 1000
		SIF COM_AUTO_COM_CATEGORY:L_COUNTER == COM_AUTO_CATEGORY_NUM_性交する && COM_AUTO_COM_PRIORITY:L_COUNTER > 0
			COM_AUTO_COM_PRIORITY:L_COUNTER /= 2
	NEXT
ENDIF
IF !COM_AUTOSELECT_IS_WET_ENOUGH(MAIN_PLAYER)
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻尾挿入")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻尾挿入")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻尾Ａ挿入")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻尾Ａ挿入")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("貝合わせ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("貝合わせ")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("双頭バイブ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("双頭バイブ")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("順番に挿入")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("順番に挿入")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("順番にＡ挿入")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("順番にＡ挿入")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("代わる代わる挿入")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("代わる代わる挿入")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("代わる代わるＡ挿入")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("代わる代わるＡ挿入")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("バイブ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("バイブ")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("アナルバイブ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("アナルバイブ")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ｖ拡張バルーン")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ｖ拡張バルーン")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ拡張バルーン")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ拡張バルーン")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("フィストファック")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("フィストファック")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("アナルフィスト")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("アナルフィスト")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手挿入")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手挿入")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手Ａ挿入")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手Ａ挿入")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手産卵")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手産卵")) /= 2
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手Ａ産卵")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手Ａ産卵")) /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("素股") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("素股") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("貝合わせ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("貝合わせ") /= 2
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("双頭バイブ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("双頭バイブ") /= 2
	FOR L_COUNTER, 0, 1000
		SIF COM_AUTO_COM_CATEGORY:(ADD_NUM_対象が実行 + L_COUNTER) == COM_AUTO_CATEGORY_NUM_性交させる && COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + L_COUNTER) > 0
			COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + L_COUNTER) /= 2
	NEXT
ENDIF

;-------------------------------------------------
;## 補正 性別制限
;	一部コマンドは性別でプライオリティを下げる
;-------------------------------------------------
IF TOSTR_SEX(TALENT:MAIN_PLAYER:性別) == "男性"
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("胸愛撫")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("胸愛撫")) /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("乳首吸い")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("乳首吸い")) /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("フェラチオ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("フェラチオ") /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("イラマチオ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("イラマチオ")) /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("パイズリ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("パイズリ") /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("泡踊り") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("泡踊り") /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("素股") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("素股") /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻コキ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻コキ") /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("亀頭責め手コキ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("亀頭責め手コキ") /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("亀頭責めフェラ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("亀頭責めフェラ") /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("土下座") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("土下座") /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("おねだり") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("おねだり") /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("ペニバン口枷")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("ペニバン口枷")) /= 3
ENDIF
IF TOSTR_SEX(TALENT:MAIN_TARGET:性別) == "男性"
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("胸愛撫") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("胸愛撫") /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("乳首吸い") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("乳首吸い") /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("フェラチオ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("フェラチオ")) /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("イラマチオ") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("イラマチオ") /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("パイズリ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("パイズリ")) /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("泡踊り")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("泡踊り")) /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("素股")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("素股")) /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻コキ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻コキ")) /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("亀頭責め手コキ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("亀頭責め手コキ")) /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("亀頭責めフェラ")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("亀頭責めフェラ")) /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("土下座")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("土下座")) /= 3
	SIF COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("おねだり")) > 0
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("おねだり")) /= 3
	SIF COM_AUTO_COM_PRIORITY:GET_TRAINNUM("ペニバン口枷") > 0
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("ペニバン口枷") /= 3
ENDIF

;-------------------------------------------------
;## 除外 おまかせフィルタ
;-------------------------------------------------
;-------------------------------------------------
;### 男性のＡ狙いを禁止設定
;	カテゴリごと禁止されてる性交系以外
;-------------------------------------------------
IF !GETBIT(CONFIG:11, COM_AUTO_FILTER_男性のＡを狙う行為を許可)
	IF TOSTR_SEX(TALENT:MAIN_PLAYER:性別) == "男性"
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("アナル舐め")) = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻尾Ａ挿入")) = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("アナル愛撫")) = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("アナルバイブ")) = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ拡張バルーン")) = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("アナルフィスト")) = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手Ａ挿入")) = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手Ａ産卵")) = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ顔面騎乗") = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("顔面騎乗") = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ｗ顔面騎乗") = -1
	ENDIF
	IF TOSTR_SEX(TALENT:MAIN_TARGET:性別) == "男性"
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("アナル舐め") = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻尾Ａ挿入") = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("アナル愛撫") = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("アナルバイブ") = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ拡張バルーン") = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("アナルフィスト") = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手Ａ挿入") = -1
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手Ａ産卵") = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ顔面騎乗")) = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("顔面騎乗")) = -1
		COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ｗ顔面騎乗")) = -1
	ENDIF
ENDIF

;-------------------------------------------------
;## 除外 逆調教時の対男性コンフィグ反映
;	搾り取るor我慢させる
;	逆調教かつ竿を弄らない設定なら一部のコマンドを実行禁止にする
;-------------------------------------------------
IF CONFIG:8 == 1 && GROUPMATCH(FLAG:調教モード, 調教_逆調教特殊, 調教_逆調教通常)
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("愛撫") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("泡踊り") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("手コキ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("フェラチオ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("パイズリ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("素股") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("足コキ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻コキ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("オナホコキ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻尾コキ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("電気按摩") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手オナホ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("触手コキ") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("イラマチオ")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("自慰")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("触手オナニー")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("正常位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("後背位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("背面騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("対面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("背面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("側位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("屈曲位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("背面駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("立ちバック")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("二本挿入")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("順番に挿入")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("代わる代わる挿入")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ正常位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ後背位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ背面騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ対面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ背面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ側位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ屈曲位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ背面駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ立ちバック")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ二本挿入")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("順番にＡ挿入")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("代わる代わるＡ挿入")) = -1
ENDIF

;-------------------------------------------------
;## 除外 麻薬使用制限
;	特殊勢力のキャラか、特殊勢力に堕ちたキャラで逆調教でなければ、麻薬は使用しない
;-------------------------------------------------
IF !(GROUPMATCH(FLAG:調教モード, 調教_逆調教特殊, 調教_逆調教通常, 調教_慰安) && (IS_SP_COUNTRY_CHARA(MAIN_PLAYER) || IS_FALLEN_TO_SP_COUNTRY(MAIN_PLAYER)))
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("麻薬") = -1
ENDIF

;-------------------------------------------------
;ペニバン装着中
;-------------------------------------------------
;IF IS_EQUIP_PLAYER(MAIN_PLAYER, GET_TRAINNUM("ペニバン装着"))
;	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("ペニバン装着") = -1
;ENDIF
;IF IS_EQUIP_PLAYER(MAIN_TARGET, GET_TRAINNUM("ペニバン装着"))
;	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("ペニバン装着")) = -1
;ENDIF

;-------------------------------------------------
;## 除外 慰安モブ
;-------------------------------------------------
;桃源香は金持ちだけ使う
IF TALENT:MAIN_PLAYER:慰安モブ
	IF !GROUPMATCH(TALENT:MAIN_PLAYER:慰安モブ, 慰安_キャラ_富豪, 慰安_キャラ_貴族, 慰安_キャラ_資産家)
		COM_AUTO_COM_PRIORITY:GET_TRAINNUM("桃源香") = -1
	ENDIF
ENDIF
;慰安モブはしない
IF TALENT:MAIN_PLAYER:慰安モブ
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("土下座") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("おねだり") = -1
ENDIF
IF TALENT:MAIN_TARGET:慰安モブ
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("土下座")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("おねだり")) = -1
ENDIF
;男慰安モブはしない
IF IS_MALE(MAIN_PLAYER) && TALENT:MAIN_PLAYER:慰安モブ
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("泡踊り") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻コキ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("髪コキ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("パイズリ") = -1
ENDIF
IF IS_MALE(MAIN_TARGET) && TALENT:MAIN_TARGET:慰安モブ
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("泡踊り")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻コキ")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("髪コキ")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("パイズリ")) = -1
ENDIF

;-------------------------------------------------
;## 除外 慰安モブ 知性のない獣
;	愛撫するされる、性交するされる、排泄する以外は全部オフ
;-------------------------------------------------
IF GROUPMATCH(TALENT:MAIN_PLAYER:慰安モブ, 慰安_キャラ_犬, 慰安_キャラ_豚, 慰安_キャラ_馬, 慰安_キャラ_猿)
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("泡踊り") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("泡踊り")) = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("パイズリ") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("パイズリ")) = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("髪コキ") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("髪コキ")) = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻コキ") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻コキ")) = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("性の知識を教える") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("性の知識を教える")) = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("利尿剤") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("浣腸") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("浣腸＆プラグ") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("利尿剤")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("浣腸")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("浣腸＆プラグ")) = -1
ENDIF
IF GROUPMATCH(TALENT:MAIN_TARGET:慰安モブ, 慰安_キャラ_犬, 慰安_キャラ_豚, 慰安_キャラ_馬, 慰安_キャラ_猿)
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("泡踊り") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("泡踊り")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("パイズリ")) = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("髪コキ") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("髪コキ")) = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("尻コキ") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("尻コキ")) = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("性の知識を教える") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("性の知識を教える")) = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("利尿剤") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("浣腸") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("浣腸＆プラグ") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("利尿剤")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("浣腸")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("浣腸＆プラグ")) = -1
ENDIF
;-------------------------------------------------
;## 除外 慰安モブ 四足歩行の動物
;	キメラはどうなのだろう
;-------------------------------------------------
IF GROUPMATCH(TALENT:MAIN_PLAYER:慰安モブ, 慰安_キャラ_犬, 慰安_キャラ_豚, 慰安_キャラ_馬)
	;顔に乗ったり乗せたりする行動
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("顔面騎乗") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ顔面騎乗") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ｗ顔面騎乗") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("顔面騎乗")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ顔面騎乗")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ｗ顔面騎乗")) = -1
	;手を使う行動
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("愛撫") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("指挿入れ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("アナル愛撫") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("手コキ") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("亀頭責め手コキ") = -1
	;足に奉仕させる行動
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("足を舐める")) = -1
	;体位はするもされるも後背位のみ
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("正常位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("対面座位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("背面座位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("騎乗位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("背面騎乗位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("側位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("屈曲位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("駅弁") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("背面駅弁") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("立ちバック") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ正常位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ対面座位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ背面座位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ騎乗位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ背面騎乗位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ側位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ屈曲位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ駅弁") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ背面駅弁") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ立ちバック") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("正常位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("対面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("背面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("背面騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("側位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("屈曲位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("背面駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("立ちバック")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ正常位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ対面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ背面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ背面騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ側位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ屈曲位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ背面駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ立ちバック")) = -1
ENDIF
IF GROUPMATCH(TALENT:MAIN_TARGET:慰安モブ, 慰安_キャラ_犬, 慰安_キャラ_豚, 慰安_キャラ_馬)
	;顔に乗ったり乗せたりする行動
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("顔面騎乗") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ顔面騎乗") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ｗ顔面騎乗") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("顔面騎乗")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ顔面騎乗")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ｗ顔面騎乗")) = -1
	;手を使わせる行動
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("愛撫")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("指挿入れ")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("アナル愛撫")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("手コキ")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("亀頭責め手コキ")) = -1
	;足に奉仕する行動
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("足を舐める") = -1
	;体位はするもされるも後背位のみ
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("正常位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("対面座位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("背面座位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("騎乗位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("背面騎乗位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("側位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("屈曲位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("駅弁") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("背面駅弁") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("立ちバック") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ正常位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ対面座位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ背面座位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ騎乗位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ背面騎乗位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ側位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ屈曲位") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ駅弁") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ背面駅弁") = -1
	COM_AUTO_COM_PRIORITY:GET_TRAINNUM("Ａ立ちバック") = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("正常位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("対面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("背面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("背面騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("側位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("屈曲位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("背面駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("立ちバック")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ正常位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ対面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ背面座位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ背面騎乗位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ側位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ屈曲位")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ背面駅弁")) = -1
	COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ａ立ちバック")) = -1
ENDIF

;-------------------------------------------------
;## 除外 奉仕
;	特定カテゴリの奉仕の場合特定の行動をしない
;-------------------------------------------------
IF TFLAG:奉仕モード
	IF TFLAG:奉仕カテゴリ == 奉仕_見抜き
		IF TCVAR:MAIN_PLAYER:被奉仕者フラグ
			; COM_AUTO_COM_PRIORITY:(GET_TRAINNUM("Ｐ自慰")) = -1
			; COM_AUTO_COM_PRIORITY:(GET_TRAINNUM("Ｃ自慰")) = -1
		ENDIF
		IF TCVAR:MAIN_TARGET:奉仕者フラグ
			COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ｐ自慰")) = -1
			COM_AUTO_COM_PRIORITY:(ADD_NUM_対象が実行 + GET_TRAINNUM("Ｃ自慰")) = -1
		ENDIF
	ENDIF
	;グローリーホールでは被奉仕者は自慰しない
	IF C_COND("設備属性:グローリーホール",,MAIN_PLAYER)
		IF TCVAR:MAIN_PLAYER:被奉仕者フラグ
			COM_AUTO_COM_PRIORITY:(GET_TRAINNUM("Ｐ自慰")) = -1
			COM_AUTO_COM_PRIORITY:(GET_TRAINNUM("Ｃ自慰")) = -1
		ENDIF
	ENDIF
ENDIF
;-------------------------------------------------
;## 除外 コマンドフィルタの反映
;-------------------------------------------------
FOR L_COUNTER, 0, 1000
	IF COM_FILTER:L_COUNTER
		COM_AUTO_COM_PRIORITY:L_COUNTER = -1
		COM_AUTO_COM_PRIORITY:(L_COUNTER + ADD_NUM_対象が実行) = -1
	ENDIF
NEXT

;-------------------------------------------------
;## COM_FORBIDDENが設定されたコマンドを除外する
;-------------------------------------------------
FOR L_COUNTER, 0, 3000
	IF COM_FORBIDDEN:MAIN_PLAYER:L_COUNTER
		COM_AUTO_COM_PRIORITY:L_COUNTER = -1
	ENDIF
NEXT

;-------------------------------------------------
;## 選択不可能 COM_ABLE
;	再度優先度を0にする
;-------------------------------------------------
;コマンド判定フラグON
COM_ENABLE = 1

CALL CLEAR_MPLY()
CALL CLEAR_MTAR()
CALL ADD_MPLY(MAIN_PLAYER)
CALL ADD_MTAR(MAIN_TARGET)
FOR L_COUNTER, 0, ADD_NUM_対象が実行
	SIF COM_AUTO_COM_PRIORITY:L_COUNTER <= 0
		CONTINUE
	RESULT = 0
	CALL CHECK_COMABLE(L_COUNTER)
	;ここでは必ず実行不可が帰ってくるので、回避
	IF !RESULT && !GROUPMATCH(L_COUNTER, GET_TRAINNUM("二本挿入"), GET_TRAINNUM("Ａ二本挿入"), GET_TRAINNUM("順番に挿入"), GET_TRAINNUM("順番にＡ挿入"), GET_TRAINNUM("代わる代わる挿入"), GET_TRAINNUM("代わる代わるＡ挿入"), GET_TRAINNUM("Ｗ顔面騎乗"))
		COM_AUTO_COM_PRIORITY:L_COUNTER = -1
	ENDIF
NEXT
CALL CLEAR_MPLY()
CALL CLEAR_MTAR()
CALL ADD_MPLY(MAIN_TARGET)
CALL ADD_MTAR(MAIN_PLAYER)
FOR L_COUNTER, ADD_NUM_対象が実行, ADD_NUM_対象が実行 + 1000
	SIF COM_AUTO_COM_PRIORITY:L_COUNTER <= 0
		CONTINUE
	RESULT = 0
	CALL CHECK_COMABLE(L_COUNTER - ADD_NUM_対象が実行)
	;ここでは必ず実行不可が帰ってくるので、回避
	IF !RESULT && !GROUPMATCH(L_COUNTER - ADD_NUM_対象が実行, GET_TRAINNUM("二本挿入"), GET_TRAINNUM("Ａ二本挿入"), GET_TRAINNUM("順番に挿入"), GET_TRAINNUM("順番にＡ挿入"), GET_TRAINNUM("代わる代わる挿入"), GET_TRAINNUM("代わる代わるＡ挿入"), GET_TRAINNUM("Ｗ顔面騎乗"), GET_TRAINNUM("Ｗ顔面騎乗"))
		COM_AUTO_COM_PRIORITY:L_COUNTER = -1
	ENDIF
NEXT

;コマンド判定フラグOFF
COM_ENABLE = 0

[IF_DEBUG]
DEBUGPRINTFORML
DEBUGPRINTFORML #### DEBUG コマンド優先度 最終
DEBUGPRINTFORML      潤滑 CUP {CUP:MAIN_TARGET:潤滑} / PALAM {PALAM:MAIN_TARGET:潤滑}
FOR L_COUNTER, 0, ADD_NUM_対象が実行
	IF COM_AUTO_COM_PRIORITY:L_COUNTER > 0
		DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:L_COUNTER%する", 26, LEFT% %NUM_FORMAT(COM_AUTO_COM_PRIORITY:L_COUNTER), 10, RIGHT%
	ENDIF
NEXT
FOR L_COUNTER, ADD_NUM_対象が実行, ADD_NUM_対象が実行 + 1000
	IF COM_AUTO_COM_PRIORITY:(L_COUNTER) > 0
		DEBUGPRINTFORML {L_COUNTER, 4}.%@"%TRAINNAME:(L_COUNTER - ADD_NUM_対象が実行)%させる", 26, LEFT% %NUM_FORMAT(COM_AUTO_COM_PRIORITY:L_COUNTER), 10, RIGHT%
	ENDIF
NEXT
[ENDIF]

RETURN 0