code:
;-------------------------------------------------
;その名の街道、VARSETする関数を突っ込むファイル
;ドッペル你を用いる時は慎重に
;-------------------------------------------------

;-------------------------------------------------
;@IS_ABLUPの計算でドッペル你のパラメーターを必要値の判定に用いる
;-------------------------------------------------
@VARSET_ABLUP
;JUELの20番までを初期化
VARSET JUEL:0:0, 0, 0, 20

;-------------------------------------------------
;@COMFでのソースの計算でドッペル你のパラメーターを必要値の判定に用いる
;-------------------------------------------------
@VARSET_COMF
;SOURCEの29番までを初期化
VARSET SOURCE:0:0, 0, 0, 30
;DOWNBASEの9番までを初期化
VARSET DOWNBASE:0:0, 0, 0, 10

;-------------------------------------------------
;@SOURCE_NOTCVABMでのCUPの計算でドッペル你のパラメーターを必要値の判定に用いる
;-------------------------------------------------
@VARSET_NOTCVABM
;CUPの29番までを初期化
VARSET CUP:0:0, 0, 0, 30

;-------------------------------------------------
;@PROFILEでのCALL EVENT_PROFILE, "勧誘"内でのCFLAG,BASE,TALENT,ABL,EXP,CSTRの変更にドッペル你のパラメーターを用いる
;-------------------------------------------------
@VARSET_PROFILE
VARSET CFLAG:0:0, -1
VARSET BASE:0:0, -1
VARSET TALENT:0:0, -1
VARSET ABL:0:0, -1
VARSET EXP:0:0, -1
VARSET CSTR:0:0, "-1"

;-------------------------------------------------
;角色ARGを初期化する関数。並び(登録番号)などは保つ
;SHOP_CHARA 内のINPUT,INPUTSはISSKIP() がONなら勝手に値を選ぶようにして有ます
;-------------------------------------------------
@RESET_CHARA, ARG
#DIM MEMO_NO_ARG
#DIM MEMO_ARG
#DIM MEMO_TARGET

MEMO_ARG = ARG
MEMO_NO_ARG = NO:ARG

SKIPDISP 1

CALL DELETE_CHARA, ARG
CALL SHOP_CHARA, MEMO_NO_ARG
CALL CHANGE_CHARA_NO, CHARANUM - 1, MEMO_ARG

SKIPDISP 0

@VARSET_MAIDFACE, ARG
;颜绘設定がない角色用関数を呼ぶ
CALL PRESET_MAIDFACE, ARG

;髪と表情の各パラについて空文字だった場合には默认値を代入する
SIF CSTR:ARG:髪色 == ""
	CSTR:ARG:髪色 = 黒髪
SIF CSTR:ARG:髪長 == ""
	CSTR:ARG:髪長 = %CONDS("髪長", ARG)%
SIF CSTR:ARG:前髪 == ""
	CSTR:ARG:前髪 = 自然刘海
SIF CSTR:ARG:後髪 == ""
	CSTR:ARG:後髪 = 自然
SIF CSTR:ARG:改髪 == ""
	CSTR:ARG:改髪 = 无特殊髪型
SIF CSTR:ARG:呆毛 == ""
	CSTR:ARG:呆毛 = 无呆毛
SIF CSTR:ARG:蝴蝶結 == ""
	CSTR:ARG:蝴蝶結 = 无蝴蝶結
SIF CSTR:ARG:挑染 == ""
	CSTR:ARG:挑染 = 挑染无

SIF CSTR:ARG:瞳色 == ""
	CSTR:ARG:瞳色 = %CONDS("右瞳色", ARG)%
SIF CSTR:ARG:眼形 == ""
	CSTR:ARG:眼形 = %CONDS("右眼形", ARG)%
SIF CSTR:ARG:白眼 == ""
	CSTR:ARG:白眼 = %CONDS("右白眼", ARG)%
SIF CSTR:ARG:眉形 == ""
	CSTR:ARG:眉形 = %CONDS("眉形", ARG)%
SIF CSTR:ARG:嘴形 == ""
	CSTR:ARG:嘴形 = %CONDS("嘴形", ARG)%

SIF CSTR:ARG:種族 == ""
	CSTR:ARG:種族 = 人类
SIF ARG != MASTER
	CFLAG:ARG:颜绘 = 1


code:
@HPRINT_STRL, ARGS, ARGS:1, ARGS:2, ARGS:3, ARGS:4, ARGS:5, ARGS:6, ARGS:7, ARGS:8, ARGS:9
#DIM LCOUNT
#DIM TEXT_COLOR
#DIMS PRINT_STR
#DIMS END_TAG
#DIMS ANNOTATION

TEXT_COLOR = GETCOLOR()
PRINT_STR =
END_TAG =

FOR LCOUNT, 1, 10
	SIF ARGS:LCOUNT != ""
		ARGS = %ARGS%_%ARGS:LCOUNT%
NEXT

VARSET LOCALS

;文字列を分解する
SPLIT ARGS, "_", LOCALS

FOR LCOUNT, 0, 100

	;#TEXTC=で始まっていると範囲内はその色が默认になる(指定はRGBの6桁)
	IF SUBSTRING(LOCALS:LCOUNT, 0, 7) == "#TEXTC="
		LOCALS:LCOUNT = 0x%SUBSTRING(LOCALS:LCOUNT, 7, -1)%
		IF ISNUMERIC(LOCALS:LCOUNT)
			TEXT_COLOR = TOINT(LOCALS:LCOUNT)
		ELSE
			PRINT_STR = エラー！
		ENDIF
		PRINT_STR =
		END_TAG =
		LOCALS:LCOUNT =
		LCOUNT = 0
	;その場でWAITさせるための処理
	ELSEIF LOCALS:LCOUNT == "NW"
		PRINT_STR = <nobr>%PRINT_STR%%END_TAG%
		HTML_PRINT @"%PRINT_STR%"
		WAIT
		CLEARLINE 1
		PRINT_STR =
		END_TAG =
		LOCALS:LCOUNT =
		LCOUNT = 0
	ENDIF

	;特殊な操作
	SELECTCASE LOCALS:LCOUNT
	;CASE ""
	;	BREAK
	CASE "BUTTON"
		;次の文字をボタンにする
		LCOUNT += 1
		IF STRCOUNT(LOCALS:LCOUNT, "#TITLE=")
			ANNOTATION = %EXTSTR(LOCALS:LCOUNT, "#TITLE=")%
			LOCALS:LCOUNT = %EXTSTR(LOCALS:LCOUNT, "", "#TITLE=")%
			ANNOTATION = %REPLACE(ANNOTATION,"
","
")%
			IF NUMBER_BUTTON(LOCALS:LCOUNT) < 0
				PRINT_STR = %PRINT_STR%<button value='%LOCALS:LCOUNT%' title='%ANNOTATION%'>%LOCALS:LCOUNT%</button>%END_TAG%
			ELSE
				PRINT_STR = %PRINT_STR%<button value='{NUMBER_BUTTON(LOCALS:LCOUNT)}' title='%ANNOTATION%'>%LOCALS:LCOUNT%</button>%END_TAG%
			ENDIF
		ELSE
			IF NUMBER_BUTTON(LOCALS:LCOUNT) < 0
				PRINT_STR = %PRINT_STR%<button value='%LOCALS:LCOUNT%'>%LOCALS:LCOUNT%</button>%END_TAG%
			ELSE
				PRINT_STR = %PRINT_STR%<button value='{NUMBER_BUTTON(LOCALS:LCOUNT)}'>%LOCALS:LCOUNT%</button>%END_TAG%
			ENDIF
		ENDIF
		END_TAG =
		CONTINUE
	CASE "NOBUTTON"
		;次の文字をボタンにしない
		LCOUNT += 1
		IF STRCOUNT(LOCALS:LCOUNT, "#TITLE=")
			ANNOTATION = %EXTSTR(LOCALS:LCOUNT, "#TITLE=")%
			LOCALS:LCOUNT = %EXTSTR(LOCALS:LCOUNT, "", "#TITLE=")%
			ANNOTATION = %REPLACE(ANNOTATION,"
","
")%
			PRINT_STR = %PRINT_STR%<nonbutton title='%ANNOTATION%'>%LOCALS:LCOUNT%</nonbutton>%END_TAG%
		ELSE
			PRINT_STR = %PRINT_STR%<nonbutton>%LOCALS:LCOUNT%</nonbutton>%END_TAG%
		ENDIF
		END_TAG =
		CONTINUE
	CASE "太字"
		;次の文字を太字
		PRINT_STR = %PRINT_STR%
		END_TAG = %END_TAG%
		CONTINUE
	CASE "斜体"
		;次の文字を斜体
		PRINT_STR = %PRINT_STR%
		END_TAG = %END_TAG%
		CONTINUE
	CASE "取り消し"
		;次の文字に打消し線を引く
		PRINT_STR = %PRINT_STR%<s>
		END_TAG = </s>%END_TAG%
		CONTINUE
	CASE "下線"
		;次の文字を下線
		PRINT_STR = %PRINT_STR%
		END_TAG = %END_TAG%
		CONTINUE
	CASE "-"
		;次の文字に打消し線を引く
		PRINT_STR = %PRINT_STR%<s>
		END_TAG = </s>%END_TAG%
		CONTINUE
	CASE "L"
		PRINT_STR = <nobr>%PRINT_STR%%END_TAG%
		HTML_PRINT @"%PRINT_STR%"
		PRINT_STR =
		END_TAG =
		CONTINUE
	CASE "W"
		PRINT_STR = <nobr>%PRINT_STR%%END_TAG%
		HTML_PRINT @"%PRINT_STR%"
		WAIT
		PRINT_STR =
		END_TAG =
		CONTINUE
	CASE "H"
		CHKFONT "Times New Roman"
		IF RESULT
			PRINT_STR = %PRINT_STR%%UNICODE(0x2665)%
		ELSE
			PRINT_STR = %PRINT_STR%%UNICODE(0x2665)%
		ENDIF
		CONTINUE
	CASE "WH"
		CHKFONT "Times New Roman"
		IF RESULT
			PRINT_STR = %PRINT_STR%%UNICODE(0x2661)%
		ELSE
			PRINT_STR = %PRINT_STR%%UNICODE(0x2661)%
		ENDIF
		CONTINUE
	CASE "BH"
		CHKFONT "Times New Roman"
		IF RESULT
			PRINT_STR = %PRINT_STR%%UNICODE(0x2764)%
		ELSE
			PRINT_STR = %PRINT_STR%%UNICODE(0x2764)%
		ENDIF
		CONTINUE
	CASE "BBH"
		CHKFONT "メイリオ"
		IF RESULT
			PRINT_STR = %PRINT_STR%%UNICODE(0x2764)%
		ELSE
			PRINT_STR = %PRINT_STR%%UNICODE(0x2764)%
		ENDIF
		CONTINUE
	CASE "HH"
		CHKFONT "Times New Roman"
		IF RESULT
			PRINT_STR = %PRINT_STR%%UNICODE(0x2665)%%END_TAG%
		ELSE
			PRINT_STR = %PRINT_STR%%UNICODE(0x2665)%%END_TAG%
		ENDIF
		END_TAG =
		CONTINUE
	CASE "WHH"
		CHKFONT "Times New Roman"
		IF RESULT
			PRINT_STR = %PRINT_STR%%UNICODE(0x2661)%
		ELSE
			PRINT_STR = %PRINT_STR%%UNICODE(0x2661)%
		ENDIF
		PRINT_STR = %PRINT_STR%%END_TAG%
		END_TAG =
		CONTINUE
	CASE "BHH"
		CHKFONT "Times New Roman"
		IF RESULT
			PRINT_STR = %PRINT_STR%%UNICODE(0x2764)%%END_TAG%
		ELSE
			PRINT_STR = %PRINT_STR%%UNICODE(0x2764)%%END_TAG%
		ENDIF
		END_TAG =
		CONTINUE
	CASE "BBHH"
		CHKFONT "メイリオ"
		IF RESULT
			PRINT_STR = %PRINT_STR%%UNICODE(0x2764)%
		ELSE
			PRINT_STR = %PRINT_STR%%UNICODE(0x2764)%
		ENDIF
		PRINT_STR = %PRINT_STR%%END_TAG%
		END_TAG =
		CONTINUE
	CASE "／／／", "／"
		PRINT_STR = %PRINT_STR%%HTML_ESCAPE("///")%%END_TAG%
		END_TAG =
		CONTINUE
	;一部PRINT_IMGしている物を使えるようにする
	CASE "U便当", "Uドラゴン", "U創口貼", "U男性", "U女性", "U扶她", "U伪娘", "UH"
		PRINT_STR = %PRINT_STR%
		CONTINUE
	;パラレル日本語
	CASE "Uそそ", "Uつん", "Uなお", "Uまふ", "Uはよ", "Uひに", "Uやよ", "Uゐに", "Uゐん", "U逆あ", "Uにす", "Uもむ", "Uをね", "U小ゐ", "U亜漢字1", "U亜漢字2", "U亜漢字3", "U亜漢字4"
		PRINT_STR = %PRINT_STR%
		CONTINUE
	CASE "UNI"
		;次の文字をPRINT_IMG対応にする
		LCOUNT += 1
		PRINT_STR = %PRINT_STR%
		CONTINUE
	CASE "茶色", "ショッキング粉紅", "粉紅", "爱心粉紅", "赤", "紅", "黄色", "暗黄色", "イエロー", "緑", "青", "水色", "藍色", "暗灰色", "灰色", "明灰色", "白"
		PRINT_STR = %PRINT_STR%
		END_TAG = %END_TAG%
		CONTINUE
	ENDSELECT

	PRINT_STR = %PRINT_STR%%LOCALS:LCOUNT%%END_TAG%
	END_TAG =
NEXT

;空の時は改行だけはするようにスペースを入れる
SIF PRINT_STR == ""
	PRINT_STR += " "
PRINT_STR = <nobr>%PRINT_STR%
HTML_PRINT @"%PRINT_STR%"

@NUMBER_BUTTON(ARGS)
#FUNCTION
#DIMS NUMBER

SIF STRFIND(ARGS, "[") < 0 || STRFIND(ARGS, "]") < 0
	RETURNF -1

;[ ]の中の文字を取り出す
NUMBER = %EXTSTR_BL(ARGS, "[", "]")%

;数値にできるか調べる
SIF ISNUMERIC(NUMBER) == 0
	RETURNF -1

RETURNF TOINT(NUMBER)

license: unknown


code:
@SHOW_STATUS
REDRAW 0

;この値をもとにCLEARLINEを行う
TFLAG:LINECOUNT記録 = LINECOUNT

DRAWLINE
CALL SHOW_STATUS_MAIN

CALL SETFLAG, "助手相手の恋慕外し開始"

;@COMORDERで求める実行値の初期化
CVARSET TCVAR, GETNUM(TCVAR, "指令制限")
CVARSET TCVAR, GETNUM(TCVAR, "基本実行値")

FLAG:COM_ABLEの一括OFF = 1

@SHOW_STATUS_MAIN
#DIM LCOUNT
#DIMS SHOW_CONFIG
#DIMS ITEMS

;射精ゲージ設定
FOR LCOUNT, 1, CHARANUM
	SELECTCASE LCOUNT
	CASE MASTER, ASSI, PLAYER, PLAYER:1, TARGET, TARGET:1
		CALL SETFLAG, "射精ゲージ", LCOUNT
	ENDSELECT
NEXT

;季節、年表示部分
PRINTFORM %TEXTS("日期表示")%
IF TEQUIP:浴室PLAY
	PRINTFORM -浴室-
ELSE
	PRINTFORM -%TEXTS("現在位置")%-
ENDIF
SIF EQUIP:Ｈ的奖励
	CALL PRINT_STR, "爱心粉紅_ [Ｈ的奖励中]"
;圣诞节ツリー格子
IF DAYEV("圣诞节期間") && NUM("圣诞节ツリー")
	SETCOLOR DEF_COLOR("爱心粉紅")
	PRINTFORM %UNICODE(0xD83C)%%UNICODE(0xDF84)%
	RESETCOLOR
ENDIF
PRINT  情緒:
CALL TEXT, "情緒Heart"
;情緒記録
TFLAG:ターン開始時の情緒 = MOOD()
;全体に効果の出ているものはここに書く
;現在効果を発揮している指导者能力
CALL TEXT, "指导者能力"
PRINTL

ITEMS =
;消耗品
FOR LCOUNT, 50, 60
	SIF ITEMNAME:LCOUNT == ""
		CONTINUE
	ITEMS = %ITEMS%%ITEMNAME:LCOUNT% ×{ITEM:LCOUNT}/
NEXT
SIF TALENT:MASTER:男性 == 0
	ITEMS = %ITEMS%口服避孕薬 ×{ITEM:口服避孕薬}/
;避孕套
SIF ITEM:用过的避孕套
	ITEMS = %ITEMS%用过的避孕套 ×{ITEM:用过的避孕套}

CALL PRINT_LIST, ITEMS
PRINTL
PRINTFORM %NAME:PLAYER%
;危険日
CALL TEXT, "生理周期", PLAYER
CALL SHOW_EQUIP, PLAYER
PRINTFORM \@ PENIS(PLAYER) ? 射精 # 絶頂 \@(%CALLNAME:PLAYER%)
CALL PRINT_BAR, "溜めゲージ", BASE:PLAYER:絶頂, MAXBASE:PLAYER:絶頂, 15
PRINTFORM ({BASE:PLAYER:絶頂}/{MAXBASE:PLAYER:絶頂})
;主人精力表示
PRINTFORM  精力
CALL PRINT_BAR, "減少ゲージ", BASE:PLAYER:精力, MAXBASE:PLAYER:精力, 6
PRINTFORM ({BASE:PLAYER:精力}/{MAXBASE:PLAYER:精力})
;溜まっている
;SIF BASE:PLAYER:精力 > MAXBASE:PLAYER:精力 && PENIS(PLAYER)
;	CALL PRINT_COLORTEXT, "(たまっている) ", DEF_COLOR("爱心粉紅")
IF PLAYER != MASTER
	PRINTFORM  收集的魂:
ELSE
	PRINTFORM  魂
	CALL PRINT_BAR, "減少ゲージ", BASE:PLAYER:魂, MAXBASE:PLAYER:魂, 6
ENDIF
PRINTFORM %TEXTS("0.01", BASE:PLAYER:魂)%
CALL TEXT, "尿意", PLAYER
PRINTL
PRINTL
CALL SHOW_STATUS_CHARA, TARGET
IF TEQUIP:Ｗ推倒
	PRINTL
	CALL SHOW_STATUS_CHARA, TARGET:1
ENDIF

;助手がいて、ダウンしていないなら表示
IF ASSI && STATE("撃沈", ASSI) == 0 && TEQUIP:Ｗ推倒 == 0
	PRINTL
	PRINTFORM \@ PENIS(ASSI) ? 射精 # 絶頂 \@(%CALLNAME:ASSI%)
	CALL PRINT_BAR, "溜めゲージ", BASE:ASSI:絶頂, MAXBASE:ASSI:絶頂, 15
	PRINTFORM ({BASE:ASSI:絶頂}/{MAXBASE:ASSI:絶頂})
	PRINT  体力
	CALL PRINT_BAR, "減少ゲージ", BASE:ASSI:体力, MAXBASE:ASSI:体力, 16
	PRINTFORM ({BASE:ASSI:体力}/{MAXBASE:ASSI:体力})
	;助手精力表示
	PRINTFORM  精力
	CALL PRINT_BAR, "減少ゲージ", BASE:ASSI:精力, MAXBASE:ASSI:精力, 6
	PRINTFORM ({BASE:ASSI:精力}/{MAXBASE:ASSI:精力})
	;溜まっている
	;SIF BASE:ASSI:精力 > MAXBASE:ASSI:精力 && PENIS(ASSI)
	;	CALL PRINT_COLORTEXT, "(たまっている) ", DEF_COLOR("爱心粉紅")
	PRINTL
ENDIF

@SHOW_STATUS_CHARA, ARG
#DIMS MEMOS_SEMEN

PRINTFORM %NAME:ARG%
CALL TEXT, "生理周期", ARG

;これはTARGETの数値を見ればよい
IF TEQUIP:Ｗ推倒
	PRINTFORM 好:{CFLAG:ARG:好感度}
ELSE
	PRINTFORM 好感度:{CFLAG:ARG:好感度}
ENDIF
;CALL PRINT_RANK, CFLAG:ARG:好感度, 2500
CALL SHOW_EQUIP, ARG

BASE:ARG:体力 = MAX(BASE:ARG:体力, 0)

PRINT 体力
CALL PRINT_BAR, "減少ゲージ", BASE:ARG:体力, MAXBASE:ARG:体力, 32
PRINTFORM ({BASE:ARG:体力}/{MAXBASE:ARG:体力})
;精力表示
PRINT 精力
CALL PRINT_BAR, "減少ゲージ", BASE:ARG:精力, MAXBASE:ARG:精力, 8
PRINTFORML ({BASE:ARG:精力}/{MAXBASE:ARG:精力})

CALL NEW_PRINT_PALAM, ARG

IF PENIS(ARG)
	PRINTFORM 射精
	CALL PRINT_BAR, "溜めゲージ", BASE:ARG:絶頂, MAXBASE:ARG:絶頂, 24
	PRINTFORM ({BASE:ARG:絶頂}/{MAXBASE:ARG:絶頂})
ENDIF
IF TALENT:ARG:母乳体質
	SIF MAXBASE:ARG:母乳 == 0
		MAXBASE:ARG:母乳 = 10000
	PRINTFORM 母乳
	CALL PRINT_BAR, "溜めゲージ", BASE:ARG:母乳, MAXBASE:ARG:母乳, 24
	PRINTFORM ({BASE:ARG:母乳}/{MAXBASE:ARG:母乳})
ENDIF

SIF PENIS(ARG) || TALENT:ARG:母乳体質
	PRINTL

IF EX:ARG:処女喪失 || EX:ARG:Ａ処女喪失 || EX:ARG:Ｃ絶頂 || EX:ARG:尿道絶頂 || EX:ARG:Ｖ絶頂 || EX:ARG:Ａ絶頂 || EX:ARG:Ｂ絶頂 || EX:ARG:Ｍ絶頂 || EX:ARG:射精 || EX:ARG:噴乳 || EX:ARG:吸能 || EX:ARG:嘔吐
	PRINT <
	SIF EX:ARG:処女喪失
		CALL PRINT_STR, "爱心粉紅_処女喪失 "
	SIF EX:ARG:Ａ処女喪失
		CALL PRINT_STR, "爱心粉紅_Ａ処女喪失 "
	SIF EX:ARG:尿道絶頂
		PRINTFORM 尿道絶頂:{EX:ARG:尿道絶頂}回
	SIF EX:ARG:Ｃ絶頂
		PRINTFORM Ｃ絶頂:{EX:ARG:Ｃ絶頂}回
	SIF EX:ARG:Ｖ絶頂
		PRINTFORM Ｖ絶頂:{EX:ARG:Ｖ絶頂}回
	SIF EX:ARG:Ａ絶頂
		PRINTFORM Ａ絶頂:{EX:ARG:Ａ絶頂}回
	SIF EX:ARG:Ｂ絶頂
		PRINTFORM Ｂ絶頂:{EX:ARG:Ｂ絶頂}回
	SIF EX:ARG:Ｍ絶頂
		PRINTFORM Ｍ絶頂:{EX:ARG:Ｍ絶頂}回
	SIF EXP_GAIN("射精経験", ARG)
		PRINTFORM 射精:{EXP_GAIN("射精経験", ARG)}回
	SIF EX:ARG:前列腺高潮射精
		PRINTFORM 前列腺高潮射精:{EX:ARG:前列腺高潮射精}回
	SIF EXP_GAIN("噴乳経験", ARG)
		PRINTFORM 噴乳:{EXP_GAIN("噴乳経験", ARG)}回
	SIF EX:ARG:吸能
		PRINTFORM ＥＤ:{EX:ARG:吸能}回
	SIF EX:ARG:嘔吐
		PRINTFORM 嘔吐:{EX:ARG:嘔吐}回
	PRINT >
	PRINTL
ENDIF
IF PALAM:ARG:Extacy || EX:ARG:絶対搾精量
	IF EX:ARG:絶対搾精量
		PRINTFORM 搾精量:{EX:ARG:絶対搾精量}ml

		MEMOS_SEMEN =
		SIF EX:ARG:Ｖ中出し量
			MEMOS_SEMEN += @"膣内{EX:ARG:Ｖ中出し量}ml"
		SIF EX:ARG:Ａ中出し量
			MEMOS_SEMEN += @"肛内{EX:ARG:Ａ中出し量}ml"
		SIF EX:ARG:口内射精量
			MEMOS_SEMEN += @"精飲{EX:ARG:口内射精量}ml"
		SIF EX:ARG:乳内射精量
			MEMOS_SEMEN += @"乳内{EX:ARG:乳内射精量}ml"
		SIF EX:ARG:尿道内射精量
			MEMOS_SEMEN += @"膀胱{EX:ARG:尿道内射精量}ml"
		SIF COND("避孕套搾精量", ARG)
			MEMOS_SEMEN += @"套套内射精{COND("避孕套搾精量", ARG)}ml"

		SIF MEMOS_SEMEN != ""
			PRINTFORM (%MEMOS_SEMEN%)
	ENDIF
	;オバフロ対策
	IF PALAM:Extacy >= 10000000000000000
		PRINTFORM Extacy:１京ＯＶＥＲ！
	ELSEIF PALAM:Extacy
		PRINTFORM Extacy:{PALAM:ARG:Extacy}
	ENDIF
	SELECTCASE PALAM:ARG:連続絶頂COMBO数
	CASE IS >= 100
		PRINTFORM … 連続絶頂 {PALAM:ARG:連続絶頂COMBO数}COMBO！！！！
	CASE IS >= 50
		PRINTFORM … 連続絶頂 {PALAM:ARG:連続絶頂COMBO数}COMBO！！！
	CASE IS >= 20
		PRINTFORM … 連続絶頂 {PALAM:ARG:連続絶頂COMBO数}COMBO！！
	CASE IS >= 10
		PRINTFORM … 連続絶頂 {PALAM:ARG:連続絶頂COMBO数}COMBO！！
	CASE IS >= 2
		PRINTFORM … 連続絶頂 {PALAM:ARG:連続絶頂COMBO数}COMBO！
	ENDSELECT
	PRINTL
ENDIF

CALL CHECK_SATISFACTION, ARG

CALL TEXT, "性欲", ARG
CALL TEXT, "精液欲", ARG
CALL TEXT, "胎内精液量", ARG
CALL TEXT, "尿意", ARG
CALL TEXT, "排泄欲", ARG

PRINTL

;ARGの状況の表示
@SHOW_EQUIP, ARG
IF TALENT:ARG:男性
	PRINTPLAINFORM [%CONDS("体型", ARG)%]
ELSE
	PRINTPLAINFORM [%CONDS("体型", ARG)%(%CONDS("罩杯", ARG)%)]
ENDIF
;晒痕有些？
IF COND("晒痕", ARG)
	PRINTFORM [晒痕]
ELSEIF TALENT:ARG:肤色
	PRINTFORM [%CONDS("肤色", ARG)%]
ENDIF

IF STATE("具現", ARG)
	PRINT [具現]
ELSEIF STATE("阴茎陰核化", ARG)
	PRINT [陰核化]
ENDIF
IF PENIS(ARG)
	SELECTCASE SIZE("阴茎", ARG)
	CASE 0
		PRINTFORM [小
	CASE 1
		PRINTFORM [並
	CASE 2
		PRINTFORM [巨根
	CASE 3
		PRINTFORM [像馬一样粗
	CASE 4
		PRINTFORM [腕粗
	CASEELSE
		PRINTFORM [規格外
	ENDSELECT

	PRINTFORM (尺寸LV{SIZE("阴茎", ARG)})]

	IF ARG == PLAYER
		PRINTFORM Ｐ潤%TEXTS("調教パラメータのＬＶ", GET_PALAMLV(PALAM:ARG:Ｐ潤) )%
		CALL PRINT_BAR, "ＰＡＬＡＭ", PALAM:ARG:Ｐ潤, 0, 4
	ENDIF
ELSE
	IF COND("陰核露出", ARG)
		PRINTFORM [常時阴蒂露出]
	ELSEIF CALCF("Ｃ発情", ARG) >= 2
		CALL PRINT_STR, "爱心粉紅_[陰核露出]"
	ENDIF
ENDIF
;陥没乳頭が勃起
IF COND("陥没乳頭", ARG)
	IF CALCF("Ｂ発情", ARG)
		CALL PRINT_STR, "爱心粉紅_[乳頭露出]"
	ELSE
		PRINTFORM [陥没乳頭]
	ENDIF
ENDIF

SIF CFLAG:ARG:甜言蜜语
	PRINT [心动不已]
SIF CFLAG:ARG:夸奖
	PRINT [心情好]
SIF STATE("恍惚", ARG)
	CALL PRINT_STR, "粉紅_[恍惚]"
SIF STATE("脫力", ARG)
	CALL PRINT_STR, "水色_[脫力]"
SIF EX:ARG:绝顶忍耐
	CALL PRINT_STR, "爱心粉紅_[要去了]"
SIF COND("発情期", ARG)
	CALL PRINT_STR, "爱心粉紅_[発情中]"

IF STATE("烂醉", ARG)
	CALL PRINT_STR, "[_青_烂醉_]"
ELSEIF STATE("酔酒", ARG)
	CALL PRINT_STR, "[_爱心粉紅_酔酒_]"
ENDIF

SELECTCASE TEQUIP:ARG:弛緩
CASE 1
	CALL PRINT_STR, "黄色_[緊張緩和]"
CASE 2
	CALL PRINT_STR, "黄色_[弛緩]"
CASE 3
	CALL PRINT_STR, "爱心粉紅_[陶酔]"
ENDSELECT

IF ARG != PLAYER
	SIF COND("Ｖ潤充分", ARG) && FIRSTCOMS("Ｖ挿入") && CHOSECOMS("Ｖ挿入") == 0
		CALL PRINT_STR, "爱心粉紅_[Ｖ潤充分]"
	SIF COND("Ａ潤充分", ARG) && FIRSTCOMS("Ａ挿入") && CHOSECOMS("Ａ挿入") == 0
		CALL PRINT_STR, "爱心粉紅_[Ａ潤充分]"
ENDIF
IF INSERT("挿入", ARG)
	VARSET LOCALS
	IF INSERT("两根挿入Ｖ中", ARG)
		LOCALS = 两根挿入Ｖ中
	ELSEIF INSERT("两根挿入Ａ中", ARG)
		LOCALS = 两根挿入Ａ中
	ELSEIF INSERT("二穴挿入", ARG)
		LOCALS = 二穴挿入
	ELSE
		IF INSERT("Ａ挿入", ARG)
			LOCALS = Ａ%CONDS("体位", ARG)%
		ELSEIF INSERT("尿道挿入", ARG)
			LOCALS = 尿道%CONDS("体位", ARG)%
		ELSE
			LOCALS = %CONDS("体位", ARG)%
		ENDIF
		SELECTCASE INSERT("挿入相手", ARG)
		CASE PLAYER
		CASE ASSI
			LOCALS += @"(%TEXTS("助手の名称")%)"
		CASE MASTER
			LOCALS += @"(主人)"
		ENDSELECT
	ENDIF
	IF COND("喜欢的体位中", ARG)
		CALL PRINT_STR, @"[_爱心粉紅_%LOCALS%☆_]"
	ELSE
		CALL PRINT_STR, @"[_黄色_%LOCALS%_]"
	ENDIF
ELSEIF INSERT("挿入中", ARG)
	IF INSERT("Ａ挿入中", ARG)
		PRINTFORM [Ａ挿入中(%CALLNAME:INSERT("挿入中", ARG)%)]
	ELSEIF INSERT("尿道挿入中", ARG)
		PRINTFORM [尿道挿入中(%CALLNAME:INSERT("挿入中", ARG)%)]
	ELSE
		PRINTFORM [Ｖ挿入中(%CALLNAME:INSERT("挿入中", ARG)%)]
	ENDIF
ENDIF
SIF TEQUIP:ARG:手下留情
	CALL PRINT_STR, "[_爱心粉紅_焦躁中_]"
SIF TEQUIP:ARG:避孕套
	PRINT [戴上套套中]

;これはTARGETの値を見る
IF TEQUIP:Ｗ推倒
	SIF ARG == PLAYER
		PRINT [Ｗ被逆推中]
ELSEIF TEQUIP:ARG:六九式
	PRINTFORM [\@ TEQUIP:ARG:推倒 ? 推倒 # \@６９(%TRAIN_NAME_STANDARD(TEQUIP:ARG:六九式)%)中]
ELSEIF TEQUIP:ARG:推倒
	PRINT [推倒
	IF TEQUIP:PLAYER:拘束
		PRINT 拘束
	ELSEIF TEQUIP:ARG:面部騎乗
		PRINT 神情恍惚的脸颊面騎乗
	ENDIF
	PRINT 中]
ENDIF
SIF TEQUIP:ARG:電話中
	PRINT [電話中]

SIF COND("指の使用", ARG) == 0
	PRINT [腕使用不可]
SIF TEQUIP:ARG:接吻
	PRINT [一有破绽就接吻]

SIF TEQUIP:ARG:攝像機
	PRINTFORM [撮影中(残{10 - TEQUIP:ARG:攝像機 + 1}回)]
IF TEQUIP:ARG:野外PLAY
	SIF COND("人里", ARG)
		PRINT [人里]
	SIF COND("森林", ARG)
		PRINT [森林]
	SIF COND("花園", ARG)
		PRINT [花園]
	SIF COND("水辺", ARG)
		PRINT [水辺]
	SIF COND("海", ARG)
		PRINT [海]
ENDIF
SIF TEQUIP:ARG:室内露出PLAY
	PRINT [室内露出中]
IF TEQUIP:ARG:女王様PLAY
	IF TALENT:ARG:男性
		PRINTFORM [ＳＭPLAY LV{TEQUIP:ARG:女王様PLAY}]
	ELSE
		PRINTFORM [女王様PLAY LV{TEQUIP:ARG:女王様PLAY}]
	ENDIF
ENDIF

SIF TEQUIP:ARG:浴室PLAY
	PRINT [浴室]
SIF TEQUIP:ARG:新妻PLAY
	PRINT [新妻]

IF TEQUIP:ARG:深喉 == PLAYER
	PRINT [深喉中]
ELSEIF TEQUIP:ARG:深喉
	PRINTFORM [深喉中(%CALLNAME:(TEQUIP:ARG:深喉)%)]
ENDIF

SIF TEQUIP:ARG:甜言蜜语 >= 1 && TEQUIP:ARG:甜言蜜语 <= 8
	PRINTFORM [甜言蜜语]
SIF TEQUIP:ARG:排卵誘発剤
	PRINTFORM [排卵誘発剤]

SELECTCASE TEQUIP:ARG:媚薬
CASE IS >= 200
	PRINTFORM [媚薬(激)]
CASE IS >= 150
	PRINTFORM [媚薬(強)]
CASE IS > 50
	PRINTFORM [媚薬]
CASE IS > 0
	PRINTFORM [媚薬(弱)]
ENDSELECT

SIF TEQUIP:ARG:利尿剤
	PRINTFORM [利尿剤]
IF TEQUIP:ARG:筋弛緩剤
	PRINTFORM [筋弛緩剤
	SIF GETBIT(TEQUIP:ARG:筋弛緩剤, 0)
		PRINTFORM (Ａ)
	SIF GETBIT(TEQUIP:ARG:筋弛緩剤, 1)
		PRINTFORM (尿道)
	SIF GETBIT(TEQUIP:ARG:筋弛緩剤, 2)
		PRINTFORM (Ｖ)
	SIF GETBIT(TEQUIP:ARG:筋弛緩剤, 3)
		PRINTFORM (子宮口)
	PRINTFORM ]
ENDIF
IF TEQUIP:ARG:振動棒
	IF COND("双頭振動棒", ARG)
		PRINTFORM [双頭振動棒]
	ELSE
		SELECTCASE SIZE("振動棒", ARG)
		CASE 6
			PRINTFORM [規格外振動棒]
		CASE 5
			PRINTFORM [馬型振動棒]
		CASE 4
			PRINTFORM [腕並振動棒]
		CASE 3
			PRINTFORM [極太振動棒]
		CASEELSE
			PRINTFORM [振動棒]
		ENDSELECT
	ENDIF
ENDIF

SIF TEQUIP:ARG:导管
	PRINTFORM [导管]

IF TEQUIP:ARG:肛用振動棒
	IF COND("肛門拉珠", ARG)
		PRINTFORM [肛門拉珠]
	ELSE
		VARSET LOCALS
		SIF COND("長振動棒", ARG)
			LOCALS = (結腸挿入中)
		SELECTCASE SIZE("Ａ振動棒", ARG)
		CASE 6
			PRINTFORM [Ａ規格外振動棒%LOCALS%]
		CASE 5
			PRINTFORM [Ａ馬型振動棒%LOCALS%]
		CASE 4
			PRINTFORM [Ａ腕並振動棒%LOCALS%]
		CASE 3
			PRINTFORM [Ａ極太振動棒%LOCALS%]
		CASEELSE
			PRINTFORM [肛用振動棒%LOCALS%]
		ENDSELECT
	ENDIF
ENDIF

IF TEQUIP:ARG:尿道振動棒
	IF COND("尿道布ル", ARG)
		PRINTFORM [尿道布ル]
	ELSE
		SELECTCASE SIZE("尿道振動棒", ARG)
		CASE 6
			PRINTFORM [尿道規格外振動棒]
		CASE 5
			PRINTFORM [尿道馬型振動棒]
		CASE 4
			PRINTFORM [尿道腕並振動棒]
		CASE 3
			PRINTFORM [尿道極太振動棒]
		CASEELSE
			PRINTFORM [尿道振動棒]
		ENDSELECT
	ENDIF
ENDIF

SIF TEQUIP:ARG:拘束
	PRINTFORM [%BINDS(TEQUIP:ARG:拘束)%]

SIF COND("嘔吐確率", ARG)
	CALL PRINT_STR, "青_[嘔吐感]"

IF TEQUIP:ARG:浣腸
	PRINTFORM [浣腸
	SIF COND("精液浣腸", ARG)
		PRINTFORM (精液)
	SIF COND("温泉浣腸", ARG)
		PRINTFORM (尿)
	PRINTFORM ]
ENDIF

IF TEQUIP:ARG:肛塞
	SELECTCASE SIZE("肛塞", ARG)
	CASE IS >= 4
		PRINTFORM [超大型Ａ塞子]
	CASE 3
		PRINTFORM [極太Ａ塞子]
	CASE 2
		PRINTFORM [肛塞(大)]
	CASEELSE
		PRINTFORM [肛塞]
	ENDSELECT
ENDIF

IF TEQUIP:ARG:眼罩 || TEQUIP:ARG:鼻钩
	IF TEQUIP:ARG:眼罩 && TEQUIP:ARG:鼻钩
		PRINTFORM [眼罩＆鼻钩]
	ELSEIF TEQUIP:ARG:眼罩
		PRINTFORM [眼罩]
	ELSEIF TEQUIP:ARG:鼻钩
		PRINTFORM [鼻钩]
	ENDIF
ENDIF

IF TEQUIP:ARG:口枷 == 1
	PRINTFORM [口球]
ELSEIF TEQUIP:ARG:口枷 == 2
	PRINTFORM [環形口枷]
ENDIF

SIF TEQUIP:ARG:創口貼
	PRINTFORM [創口貼]

PRINTL
;換装表示
SIF ARG != PLAYER
	CALL PRINT_DRESSL, ARG, "短縮表示"

@STAIN_INFO
#DIM MEMO_LINECOUNT
MEMO_LINECOUNT = LINECOUNT

REDRAW 0
PRINTL
PRINTFORML 以下为各自的污渍状態。
SIF TEQUIP:推倒 == 0
	PRINTFORML 如果希望的话、手和口的污渍可以清洁干净。
;誰かが真性包茎
IF COND("真性包茎") || COND("真性包茎", MASTER) || COND("真性包茎", ASSI)
	SETCOLOR DEF_COLOR("イエロー")
	PRINTFORML ※真性包茎的人的Ｐ会一直保持<Ｐ恥垢>的状态。清洗也洗不掉的
	RESETCOLOR
ENDIF
PRINTFORML （入浴中・出浴状態下可以去除污垢、奉仕調教的実行也会变简单）
CALL STAIN_INFO_SHOW, MASTER
CALL STAIN_INFO_SHOW, TARGET
CALL STAIN_INFO_SHOW, TARGET:1
DRAWLINE
IF TEQUIP:推倒
	WAIT
ELSE
	PRINTBUTTON "[Enter] 関閉", "Enter"

	ONEINPUTS

	SELECTCASE RESULTS
	CASE "0"
		STAIN:MASTER:Ｍ = 0
	CASE "1"
		STAIN:MASTER:手 = 0
	CASE "2"
		IF CHECK_ADD_STAIN("Ｐ", MASTER)
			CALL RESET_STAIN_EX, "Ｐ", MASTER
			SIF INSERT("挿入中", MASTER)
				CALL RESET_INSERT, MASTER
		ENDIF
	CASE "3"
		STAIN:Ｍ = 0
	CASE "4"
		STAIN:手 = 0
	CASE "5"
		IF CHECK_ADD_STAIN("Ｐ", TARGET)
			CALL RESET_STAIN_EX, "Ｐ", TARGET
			SIF INSERT("挿入中", TARGET)
				CALL RESET_INSERT, TARGET
		ENDIF
	CASE "6"
		SIF ASSI
			STAIN:ASSI:Ｍ = 0
	CASE "7"
		SIF ASSI
			STAIN:ASSI:手 = 0
	CASE "8"
		IF ASSI
			IF CHECK_ADD_STAIN("Ｐ", ASSI)
				CALL RESET_STAIN_EX, "Ｐ", ASSI
				SIF INSERT("挿入中", ASSI)
					CALL RESET_INSERT, ASSI
			ENDIF
		ENDIF
	CASEELSE
		REDRAW 1
		RETURN 0
	ENDSELECT
	CLEARLINE LINECOUNT - MEMO_LINECOUNT
	RESTART
ENDIF

REDRAW 1

@STAIN_INFO_SHOW, ARG
#DIM LCOUNT

SIF ARG <= 0
	RETURN 0
IF TEQUIP:ARG:出浴
	;ここはTARGETの値を見る
	IF TARGET && TEQUIP:浴室PLAY
		LOCALS = □ %NAME:ARG%（入浴中）□
	ELSE
		LOCALS = □ %NAME:ARG%（出浴）□
	ENDIF
ELSE
	LOCALS = □ %NAME:ARG% □
ENDIF
CALL DRAWLINES, LOCALS

;選択肢に使う
SELECTCASE ARG
CASE MASTER
	LOCAL = 0
CASE TARGET
	LOCAL = 3
CASE TARGET:1
	LOCAL = 6
ENDSELECT

FOR LCOUNT, 0, 7
	LOCALS =
	SIF CHECK_STAIN(STAIN:ARG:LCOUNT, "Ｖ")
		LOCALS += "<Ｖ>"
	SIF CHECK_STAIN(STAIN:ARG:LCOUNT, "Ｖ恥垢")
		LOCALS += "<Ｖ恥垢>"
	SIF CHECK_STAIN(STAIN:ARG:LCOUNT, "Ｐ")
		LOCALS += "<Ｐ>"
	SIF CHECK_STAIN(STAIN:ARG:LCOUNT, "Ｐ恥垢")
		LOCALS += "<Ｐ恥垢>"
	SIF CHECK_STAIN(STAIN:ARG:LCOUNT, "精液")
		LOCALS += "<精>"
	SIF CHECK_STAIN(STAIN:ARG:LCOUNT, "Ａ")
		LOCALS += "<Ａ>"
	SIF CHECK_STAIN(STAIN:ARG:LCOUNT, "乳")
		LOCALS += "<乳>"
	SIF CHECK_STAIN(STAIN:ARG:LCOUNT, "尿")
		LOCALS += "<尿>"
	SIF CHECK_STAIN(STAIN:ARG:LCOUNT, "破瓜之血")
		LOCALS += "<血>"

	;SIF LCOUNT == 4 && (COND("身嗜み：腸洗浄", ARG) || EX:ARG:排泄 >= 2)
	;	LOCALS += "（洗浄済み）"

	SELECTCASE LCOUNT
	CASE 0
		PRINTFORM 　口：%TEXT_LJ(LOCALS, 32)%
		SIF TEQUIP:推倒 == 0 && LOCALS != ""
			PRINTFORM [{LOCAL + LCOUNT}] 让口\@ ARG == MASTER ? 自己清洗 # 被清洗 \@
	CASE 1
		PRINTFORM 　手：%TEXT_LJ(LOCALS, 32)%
		SIF TEQUIP:推倒 == 0 && LOCALS != ""
			PRINTFORM [{LOCAL + LCOUNT}] 擦拭手指
	CASE 2
		SIF PENIS(ARG) == 0
			CONTINUE
		PRINTFORM 　Ｐ：%TEXT_LJ(LOCALS, 32)%
		SIF TEQUIP:推倒 == 0 && CHECK_ADD_STAIN("Ｐ", ARG)
			PRINTFORM [{LOCAL + LCOUNT}] 擦拭阴茎 \@ INSERT("挿入中", ARG) ? (解除挿入) # \@
	CASE 3
		SIF TALENT:ARG:男性
			CONTINUE
		PRINTFORM 　Ｖ：%TEXT_LJ(LOCALS, 32)%
	CASE 4
		PRINTFORM 　Ａ：%TEXT_LJ(LOCALS, 32)%
	CASE 5
		;SIF TALENT:ARG:男性
		;	CONTINUE
		PRINTFORM 　Ｂ：%TEXT_LJ(LOCALS, 32)%
	CASE 6
		PRINTFORM 　脚：%TEXT_LJ(LOCALS, 32)%
	ENDSELECT

	PRINTL
NEXT
PRINTL


code:
;INFOから呼び出す
@NEW_PRINT_PALAM, ARG
#DIM LCOUNT
#DIM NO_PALAM
#DIM BAR_SIZE
#DIM ROW_SIZE
#DIM MEMO

ROW_SIZE = 5
BAR_SIZE = 5

FOR LCOUNT, 0, 16

	;10,快Ｃ　11,快Ｖ　12,快Ａ　13,快Ｂ
	;14,快Ｍ　15,快尿　20,Ｖ潤　21,Ａ潤
	; 0,恭順　 1,欲情　 2,屈服　 3,習得
	; 4,恥情　 5,苦痛　 6,恐怖　 7,反感

	;弱点は粉紅に
	SELECTCASE LCOUNT
	CASE 0
		IF TALENT:ARG:淫核
			SETCOLOR DEF_COLOR("粉紅")
		ELSEIF TALENT:ARG:Ｃ性向
			SETCOLOR DEF_COLOR("爱心粉紅")
		ENDIF
		NO_PALAM = 10
	CASE 1
		IF TALENT:ARG:淫壷
			SETCOLOR DEF_COLOR("粉紅")
		ELSEIF TALENT:ARG:Ｖ性向
			SETCOLOR DEF_COLOR("爱心粉紅")
		ENDIF
		NO_PALAM = 11
	CASE 2
		IF TALENT:ARG:尻穴狂い
			SETCOLOR DEF_COLOR("粉紅")
		ELSEIF TALENT:ARG:Ａ性向
			SETCOLOR DEF_COLOR("爱心粉紅")
		ENDIF
		NO_PALAM = 12
	CASE 3
		IF TALENT:ARG:淫乳
			SETCOLOR DEF_COLOR("粉紅")
		ELSEIF TALENT:ARG:Ｂ性向
			SETCOLOR DEF_COLOR("爱心粉紅")
		ENDIF
		NO_PALAM = 13
	CASE 4
		IF TALENT:ARG:蕩唇
			SETCOLOR DEF_COLOR("粉紅")
		ELSEIF TALENT:ARG:Ｍ性向
			SETCOLOR DEF_COLOR("爱心粉紅")
		ENDIF
		NO_PALAM = 14
	CASE 5
		IF TALENT:ARG:尿道狂
			SETCOLOR DEF_COLOR("粉紅")
		ELSEIF TALENT:ARG:尿道性感
			SETCOLOR DEF_COLOR("爱心粉紅")
		ENDIF
		NO_PALAM = 15
	CASE 6
		NO_PALAM = 20
	CASE 7
		NO_PALAM = 21
	CASEELSE
		NO_PALAM = LCOUNT - 8
	ENDSELECT

	PRINTFORM %PALAMNAME:NO_PALAM%%TEXTS("調教パラメータのＬＶ", GET_PALAMLV(PALAM:ARG:NO_PALAM) )%

	RESETCOLOR

	SELECTCASE PALAMNAME:NO_PALAM
	CASE "快Ｃ"
		IF NOWEX:ARG:尿道絶頂
			CALL PRINT_BAR, "ＰＡＬＡＭ絶頂", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ELSE
			CALL PRINT_BAR, "ＰＡＬＡＭ", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ENDIF
	CASE "快Ｖ"
		IF NOWEX:ARG:Ｖ絶頂
			CALL PRINT_BAR, "ＰＡＬＡＭ絶頂", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ELSE
			CALL PRINT_BAR, "ＰＡＬＡＭ", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ENDIF
	CASE "快Ａ"
		IF NOWEX:ARG:Ａ絶頂
			CALL PRINT_BAR, "ＰＡＬＡＭ絶頂", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ELSE
			CALL PRINT_BAR, "ＰＡＬＡＭ", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ENDIF
	CASE "快Ｂ"
		IF NOWEX:ARG:Ｂ絶頂
			CALL PRINT_BAR, "ＰＡＬＡＭ絶頂", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ELSE
			CALL PRINT_BAR, "ＰＡＬＡＭ", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ENDIF
	CASE "快Ｍ"
		IF NOWEX:ARG:Ｍ絶頂
			CALL PRINT_BAR, "ＰＡＬＡＭ絶頂", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ELSE
			CALL PRINT_BAR, "ＰＡＬＡＭ", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ENDIF
	CASE "快尿"
		IF NOWEX:ARG:尿道絶頂
			CALL PRINT_BAR, "ＰＡＬＡＭ絶頂", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ELSE
			CALL PRINT_BAR, "ＰＡＬＡＭ", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
		ENDIF
	CASEELSE
		CALL PRINT_BAR, "ＰＡＬＡＭ", PALAM:ARG:NO_PALAM, 0, BAR_SIZE
	ENDSELECT
	PRINTFORM %PALAM_NUM(PALAM:ARG:NO_PALAM)%

	SIF ( (LCOUNT + 1) % ROW_SIZE) == 0
		PRINTL
NEXT
SIF (LCOUNT + 1) % ROW_SIZE
	PRINTL

@PALAM_NUM(ARG)
#FUNCTIONS
#DIM LCOUNT
;999999を超えたらkMGTP
;Emueraではペタ程度（64ビット）まで扱えるとのこと
VARSET LOCALS
FOR LCOUNT, 0, 5
	SIF ARG < 100000
		BREAK
	SELECTCASE LCOUNT
	CASE 0
		LOCALS = k
	CASE 1
		LOCALS = M
	CASE 2
		LOCALS = G
	CASE 3
		LOCALS = T
	CASE 4
		LOCALS = P
	ENDSELECT
	ARG /= 1000
NEXT
;数値の桁数に応じて間隔を調整
IF STRLENS(LOCALS)
	LOCALS = {ARG,5}%LOCALS%
ELSE
	LOCALS = {ARG,6}
ENDIF

RETURNF LOCALS


code:
@SELF_CHECK
SIF COND("同衾イベント") || COND("同衾イベント", MASTER)
	RETURN 0
;放課後Ｈは時間がない
SIF FLAG:放課後Ｈ
	RETURN 0
;念のため、PLAYERをMASTERに直す
PLAYER = MASTER

;MASTERとの絡み
SIF ABL:欲望 && BASE:MASTER:魂 >= 100 && RAND:2
	CALL SELF_CHECK_PLAY, MASTER
;自慰
SIF ABL:欲望 && ABL:自慰中毒 && RAND:4 == 0
	CALL SELF_CHECK_PLAY, TARGET

;助手との絡み
IF CONFIG("部員間Ｈ") && ASSI && ABL:欲望 && RAND:2
	;PLAYERをASSIにする
	PLAYER = ASSI
	CALL SELF_CHECK_PLAY, ASSI
ENDIF

;PLAYERをMASTERに直す
PLAYER = MASTER

@SELF_CHECK_PLAY, ARG
;行為の回数
#DIM NUM_PLAY
#DIM PLAY_FISTING

;イベントの決定
CALL PLAY_SELF, ARG
SIF STR:イベント名 == ""
	RETURN 0

;基本回数は精力依存
NUM_PLAY = LIMIT(BASE:精力/20 + LIMIT(RAND:(BASE:精力/10 + 1), 1, BASE:精力/15), 1, 4)

SELECTCASE STR:イベント名
CASE "調教後性交"
	;Ｖ性向、淫壷によるBOUNS
	SIF TALENT:Ｖ性向
		NUM_PLAY += 1
	SIF TALENT:淫壷
		NUM_PLAY += 1

	IF NUM_PLAY > 0
		DRAWLINE

		CALL SIMULATE_TRAIN_FIRST

		IF PLAYER == MASTER
			IF BASE:PLAYER:精力 * 2 >= MAXBASE:PLAYER:精力
				PRINTFORM %CALLNAME:PLAYER%和%CALLNAME:TARGET%抑制不住尚未冷却的昂奮、
				PRINTFORML 汗流浃背地在床上交合着…
				CALL SIMULATE_TRAIN_COM, 60, NUM_PLAY
			ELSEIF BASE:PLAYER:精力 * 4 >= MAXBASE:PLAYER:精力
				PRINTFORM 興奮尚未冷却的%CALLNAME:TARGET%、
				PRINTFORML 推倒了%CALLNAME:PLAYER%貪婪地发泄着自己的欲望…
				TEQUIP:推倒 = 1
				CALL SIMULATE_TRAIN_COM, 65, NUM_PLAY
			ELSE
				PRINTFORM 身体被玩弄得燥热的%CALLNAME:TARGET%、
				PRINTFORML 骑在疲劳的%CALLNAME:PLAYER%身上超越限界地絞榨着精液…
				TEQUIP:推倒 = 1
				CALL SIMULATE_TRAIN_COM, 65, NUM_PLAY
			ENDIF

			CALL KOJO_EVENT, STR:イベント名

			PRINTL
			IF ABL:信頼 + ABL:欲望 + ABL:Ｖ感覚 >= 13 && COND("欲求不満")
				PRINTFORM %CALLNAME:TARGET%用舌頭舔舐清理%CALLNAME:PLAYER%的东西的同时、
				PRINTFORMW 恋恋不舍地抬眼仰視著…
				PRINTFORMW 但%CALLNAME:PLAYER%甩開了视线、离開了房间…
				CALL SIMULATE_TRAIN_COM, 91, 1
			ELSEIF TALENT:相思相愛 && RAND:2
				IF TALENT:PLAYER:汚臭無視 && ABL:施虐属性 >= 3 && RAND:5 == 0
					PRINTFORMW %CALLNAME:PLAYER%用舌頭漂亮地舔舐清理了看起来满足了的%CALLNAME:TARGET%的阴部、离開了房间…
					CALL SIMULATE_TRAIN_COM, 1, NUM_PLAY
				ELSE
					PRINTFORMW %CALLNAME:PLAYER%干净利落地擦拭干净了看起来满足了的%CALLNAME:TARGET%的身体、离開了房间…
				ENDIF
			ELSE
				PRINTFORMW %CALLNAME:PLAYER%指使满足了的%CALLNAME:TARGET%仔细地清潔了阴茎、离開了房间…
				CALL SIMULATE_TRAIN_COM, 91, 1
			ENDIF
		ELSE
			PRINTFORML 調教结束後的%CALLNAME:TARGET%和%CALLNAME:ASSI%、受溢出的欲望驱使、娇嫩的肌肤交缠在一起蠕动着…
			PRINTFORML 连%CALLNAME:MASTER%的事都被抛之脑后的二人、
			PRINTFORM 像吃不饱的野兽一般
			IF COND("夜") == 0
				PRINTFORM 直到天黑一直
			ELSE
				PRINTFORM 一整晩都
			ENDIF
			PRINTFORML 贪婪地从对方身上索取着快楽…
			CALL SIMULATE_TRAIN_COM, 61, NUM_PLAY
			CALL KOJO_EVENT, STR:イベント名
		ENDIF

		;経験や珠などの獲得量計算
		CALL SIMULATE_TRAIN_CALC
		;結果発表
		CALL SIMULATE_TRAIN_SHOW

		CALL CALC, "欲求不満解消", TARGET, NUM_PLAY*5
	ENDIF
CASE "調教後Ａ性交"
	;Ａ性向、尻穴狂いによるBOUNS
	SIF TALENT:Ａ性向
		NUM_PLAY += 1
	SIF TALENT:尻穴狂い
		NUM_PLAY += 1

	IF NUM_PLAY > 0
		DRAWLINE

		CALL SIMULATE_TRAIN_FIRST

		IF PLAYER == MASTER
			IF BASE:PLAYER:精力 * 2 >= MAXBASE:PLAYER:精力
				PRINTFORML %CALLNAME:PLAYER%と%CALLNAME:TARGET%はまだ冷めやらぬ昂奮を抑えきれず、
				PRINTFORML 用尻穴在床上交合了好多次…
				CALL SIMULATE_TRAIN_COM, 71, NUM_PLAY
			ELSEIF BASE:PLAYER:精力 * 4 >= MAXBASE:PLAYER:精力
				PRINTFORML 肛門疼得无法冷却興奮的%CALLNAME:TARGET%、
				PRINTFORML 推倒了%CALLNAME:PLAYER%貪婪地发泄着自己的欲望…
				TEQUIP:推倒 = 1
				CALL SIMULATE_TRAIN_COM, 75, NUM_PLAY
			ELSE
				PRINTFORML 火照った身体をもてあましている%CALLNAME:TARGET%は、
				PRINTFORML 骑在疲劳的%CALLNAME:PLAYER%身上用肛門絞榨着精液…
				TEQUIP:推倒 = 1
				CALL SIMULATE_TRAIN_COM, 75, NUM_PLAY
			ENDIF
			CALL KOJO_EVENT, STR:イベント名

			IF ABL:信頼 + ABL:欲望 >= 13 && COND("欲求不満")
				PRINTL
				PRINTFORMW %CALLNAME:TARGET%恋恋不舍地拉住了%CALLNAME:MASTER%的袖子
				PRINTFORMW 但%CALLNAME:PLAYER%甩開了拉住袖子的手、离開了房间…
			ENDIF
		ELSE
			PRINTFORML 調教结束後的%CALLNAME:TARGET%和%CALLNAME:ASSI%、将躁动的身体贴在了对方的肌肤上…
			PRINTFORML 受满溢的欲望驱使、此时连%CALLNAME:MASTER%的事都被抛之脑后的二人
			PRINTFORM 像吃不饱的野兽一般
			IF COND("夜") == 0
				PRINTFORM 直到天黑一直
			ELSE
				PRINTFORM 一整晩都
			ENDIF
			PRINTFORML 在贪享着%CALLNAME:TARGET%肛門的快楽…
			CALL SIMULATE_TRAIN_COM, 71, NUM_PLAY
			CALL KOJO_EVENT, STR:イベント名
		ENDIF

		;経験や珠などの獲得量計算
		CALL SIMULATE_TRAIN_CALC
		;結果発表
		CALL SIMULATE_TRAIN_SHOW

		CALL CALC, "欲求不満解消", TARGET, NUM_PLAY*5
	ENDIF
CASE "調教後レズPLAY"
	;Ｃ性向、淫核によるBOUNS
	SIF TALENT:Ｃ性向
		NUM_PLAY += 1
	SIF TALENT:淫核
		NUM_PLAY += 1

	IF NUM_PLAY > 0
		DRAWLINE

		CALL SIMULATE_TRAIN_FIRST

		IF PLAYER == MASTER
			IF BASE:PLAYER:精力 * 4 >= MAXBASE:PLAYER:精力
				PRINTFORML %CALLNAME:PLAYER%と%CALLNAME:TARGET%はまだ冷めやらぬ昂奮を抑えきれず、
				PRINTFORML 不知多少次互相安慰着彼此燥热的身体…
				CALL SIMULATE_TRAIN_COM, 1, RAND:NUM_PLAY + 1
				CALL SIMULATE_TRAIN_COM, 98, RAND:NUM_PLAY + 1
			ELSE
				PRINTFORML 興奮冷めやらぬ%CALLNAME:TARGET%は、
				SIF BASE:PLAYER:精力 * 2 < MAXBASE:PLAYER:精力
					PRINT 疲劳的
				PRINTFORML %CALLNAME:PLAYER%推倒贪婪地摩擦搓揉着自己的秘所…
				CALL SIMULATE_TRAIN_COM, 98, RAND:NUM_PLAY + 1
			ENDIF

			CALL SIMULATE_TRAIN_COM, 80, NUM_PLAY
			CALL KOJO_EVENT, STR:イベント名
			IF ABL:信頼 + ABL:欲望 >= 13 && COND("欲求不満")
				PRINTL
				PRINTFORMW %CALLNAME:TARGET%恋恋不舍地拉住了%CALLNAME:MASTER%的袖子
				PRINTFORMW 但%CALLNAME:PLAYER%甩開了拉住袖子的手、离開了房间…
			ENDIF
		ELSE
			PRINTFORML 調教结束後的%CALLNAME:TARGET%和%CALLNAME:ASSI%、在情欲的引导下交缠在一起…
			PRINTFORML 受满溢的欲望驱使、此时连%CALLNAME:MASTER%的事都被抛之脑后的二人
			PRINTFORM 像吃不饱的野兽一般
			IF COND("夜") == 0
				PRINTFORM 直到天黑一直
			ELSE
				PRINTFORM 一整晩都
			ENDIF

			CALL SIMULATE_TRAIN_COM, 1, RAND:NUM_PLAY + 1
			CALL SIMULATE_TRAIN_COM, 98, RAND:NUM_PLAY + 1
			CALL SIMULATE_TRAIN_COM, 80, NUM_PLAY/2 + 1

			IF TALENT:扶她 && TALENT:PLAYER:扶她
				PRINTFORML 互相摩擦着秘所、吸吮着阴茎贪享着快楽…
				CALL SIMULATE_TRAIN_COM, 91, NUM_PLAY/2 + 1
			ELSE
				PRINTFORML 互相摩擦着秘所、贪享着快楽…
			ENDIF
			CALL KOJO_EVENT, STR:イベント名

			SWAP PLAYER, TARGET
			CALL SIMULATE_TRAIN_COM, 80, NUM_PLAY/2 + 1
			CALL SIMULATE_TRAIN_COM, 91, NUM_PLAY/2 + 1
			SWAP PLAYER, TARGET
		ENDIF

		;経験や珠などの獲得量計算
		CALL SIMULATE_TRAIN_CALC
		;結果発表
		CALL SIMULATE_TRAIN_SHOW

		CALL CALC, "欲求不満解消", TARGET, NUM_PLAY*5
	ENDIF
CASE "調教後自慰"
	NUM_PLAY += RAND:(MIN(5, ABL:自慰中毒) + 1)
	IF NUM_PLAY > 0
		DRAWLINE
		PRINTFORM 將%CALLNAME:PLAYER%离開之後、%CALLNAME:TARGET%将
		SIF TALENT:恋慕
			PRINTFORML 、想着%CALLNAME:PLAYER%的同时、

		;フィストフラグ
		PLAY_FISTING = 0

		SELECTCASE FAV_ONANIE(SELECTCOM, "一番")
		CASE "Ｃ"
			IF PENIS(TARGET)
				PRINT 陰莖上下搓动着
			ELSE
				IF RAND:2 == 0
					PRINT 阴蒂
				ELSE
					PRINT 秘所
				ENDIF
				PRINTFORM を自己的指で
				IF RAND:3 == 0
					PRINT 一边揉搓
				ELSEIF RAND:2 == 0
					PRINT 一边玩弄
				ELSE
					PRINT 一边捏揉
				ENDIF
			ENDIF
		CASE "Ｖ"
			IF RAND:2 == 0
				PRINT 阴部
			ELSE
				PRINT 秘所
			ENDIF
			IF EXP:Ｖ拳交経験 >= 5 && TALENT:処女 == 0 && ABL:Ｖ拡張 >= 4 && RAND:3 == 0
				IF RAND:2
					PRINT 用自己的拳搅动着
				ELSE
					PRINT 用自己的拳抽插着
				ENDIF
				PLAY_FISTING = 2
				NUM_PLAY = MAX(1, NUM_PLAY/2)
			ELSEIF RAND:3 == 0
				PRINT 用自己的手指玩弄着
			ELSEIF RAND:2 == 0
				PRINT 用自己的手指拨弄着
			ELSE
				PRINT 用自己的手指抽插着
			ENDIF
		CASE "Ａ"
			IF RAND:2 == 0
				PRINT 肛門
			ELSE
				PRINT 尻穴
			ENDIF
			IF EXP:Ａ拳交経験 >= 5 && ABL:Ａ拡張 >= 4 && RAND:3 == 0
				IF RAND:2
					PRINT 用自己的拳搅动着
				ELSE
					PRINT 用自己的拳抽插着
				ENDIF
				PLAY_FISTING = 2
				NUM_PLAY = MAX(1, NUM_PLAY/2)
			ELSEIF RAND:3 == 0
				PRINT 用自己的手指玩弄着
			ELSEIF RAND:2 == 0
				PRINT 用自己的手指拨弄着
			ELSE
				PRINT 用自己的手指抽插着
			ENDIF
		ENDSELECT

		PRINTFORML 自慰了{NUM_PLAY}次。

		CALL KOJO_EVENT, STR:イベント名

		PRINTFORML 自慰経験＋{NUM_PLAY}
		EXP:自慰経験 += NUM_PLAY

		PRINTFORML 絶頂経験＋{NUM_PLAY}
		EXP:絶頂経験 += NUM_PLAY
		IF TALENT:女性 == 0
			PRINTFORML 射精経験＋{NUM_PLAY}
			EXP:射精経験 += NUM_PLAY
		ENDIF

		SELECTCASE FAV_ONANIE(SELECTCOM, "一番")
		CASE "Ｖ"
			PRINTFORML Ｖ経験＋{NUM_PLAY + PLAY_FISTING*5}
			EXP:Ｖ経験 += NUM_PLAY + PLAY_FISTING*5
			IF PLAY_FISTING
				PRINTFORML Ｖ拡張経験＋{NUM_PLAY * 2}
				EXP:Ｖ拡張経験 += NUM_PLAY * 2
			ENDIF
			PRINTFORML 快Ｖの珠＋{(NUM_PLAY + PLAY_FISTING*5) * 200}
			JUEL:快Ｖ += (NUM_PLAY + PLAY_FISTING*5) * 200
		CASE "Ａ"
			PRINTFORML Ａ経験＋{NUM_PLAY + PLAY_FISTING*5}
			EXP:Ａ経験 += NUM_PLAY + PLAY_FISTING*5
			IF PLAY_FISTING
				PRINTFORML Ａ拡張経験＋{NUM_PLAY * 2}
				EXP:Ａ拡張経験 += NUM_PLAY * 2
			ENDIF
			PRINTFORML 快Ａの珠＋{(NUM_PLAY + PLAY_FISTING*5) * 200}
			JUEL:快Ａ += (NUM_PLAY + PLAY_FISTING*5) * 200
		CASEELSE
			PRINTFORML 快Ｃの珠＋{NUM_PLAY * 500}
			JUEL:快Ｃ += NUM_PLAY * 500
		ENDSELECT

		PRINTFORML 恭順の珠＋{NUM_PLAY * 100}
		JUEL:恭順 += NUM_PLAY * 100
		PRINTFORMW 欲情の珠＋{(NUM_PLAY + PLAY_FISTING*5) * 250}
		JUEL:欲情 += (NUM_PLAY + PLAY_FISTING*5) * 250

		BASE:体力 = MAX(BASE:体力 - (NUM_PLAY + PLAY_FISTING*5)*50, 1)

		IF ABL:信頼 + ABL:欲望 + ABL:自慰中毒 >= 10
			PRINTFORML 之后%CALLNAME:TARGET%把这件事報告了。
			PRINTFORML 恥情の珠＋{(NUM_PLAY + PLAY_FISTING*5) * 200}
			JUEL:恥情 += (NUM_PLAY + PLAY_FISTING*5) * 200
		ENDIF

		SIF ABL:欲望 >= 5
			PRINTFORMW 但是无论自慰多少次、%CALLNAME:PLAYER%的欲望始终得不到满足…
	ENDIF
ENDSELECT
DRAWLINE

@PLAY_SELF, ARG
#DIM LCOUNT
;起きうるイベントの判定に使う
#DIMS EVENT_TABLE

STR:イベント名 =
;恋慕、淫乱による調教後性交渉格子
SIF BASE:PLAYER:精力 == 0 || TALENT:淫乱 + TALENT:恋慕 == 0
	RETURN 0
;体力を使い果たした
SIF BASE:体力 < 500 || BASE:精力 <= 0
	RETURN 0
;性欲など満足
SIF COND("満足")
	RETURN 0

;助手とのPLAYが発生するか
IF ARG == ASSI && ABL:欲望 >= 5
	;どちらかが男だとダメ
	SIF TALENT:男性 || TALENT:ASSI:男性
		RETURN 0
	;二人とも兩面通吃じゃないとダメ
	SIF TALENT:兩面通吃 == 0 || TALENT:ASSI:兩面通吃 == 0
		RETURN 0
	;二人とも百合経験豊富じゃないとダメ
	SIF EXP:百合経験 < 300 || EXP:ASSI:百合経験 < 300
		RETURN 0
	;相性がよいことが条件
	SIF RELATION:(NO:ASSI) < 120 || RELATION:ASSI:(NO:TARGET) < 120
		RETURN 0
ENDIF

VARSET EVENT_TABLE

IF ARG == PLAYER
	;Ｖ性交
	CALL COM_ABLE65
	SIF RESULT && PENIS(PLAYER) && ABL:Ｖ感覚 >= 3 && TALENT:処女 + TALENT:PLAYER:童貞 == 0 && COND("女性主導生性交")
		EVENT_TABLE += "調教後性交/"
	;Ａ性交
	CALL COM_ABLE75
	SIF RESULT && PENIS(PLAYER) && EXP:PLAYER:Ａ挿入経験 && COND("Ａ熟達")
		EVENT_TABLE += "調教後Ａ性交/"
	;レズPLAY
	CALL COM_ABLE80
	SIF RESULT && COND("性別嫌悪") == 0
		EVENT_TABLE += "調教後レズPLAY/"
ELSEIF ARG == TARGET
	;自慰
	SIF ABL:自慰中毒 >= 3 && COND("身嗜み：自慰禁止") == 0 && PLAYER == MASTER
		EVENT_TABLE += "調教後自慰/"
ENDIF

STR:イベント名 = %TEXTR(EVENT_TABLE)%

RETURN 0


code:
;------------------------------------------------------------------------
;TARGETとPLAYERによる指令の擬似実行。
;ARGにSELECTCOM、ARG:1に行う予定回数を代入しておく。
;TCVAR:300～599を記録用に用いる。現在は539まで使用中
;複数PLAYはとりあえずPLAYER１人＆TARGET３人まで
;------------------------------------------------------------------------
@SIMULATE_TRAIN, ARG, ARG:1
#DIM MEMO_TARGET, 3

TRYCALLFORM COM_ABLE{ARG}
SIF RESULT == 0
	RETURN 0

;参加しないTARGET:0～を初期化する操作があるので、念のため記憶しておく
MEMO_TARGET = TARGET
MEMO_TARGET:1 = TARGET:1
MEMO_TARGET:2 = TARGET:2

;お互相用PALAM、EXP、EX、JUEL、BASEを記録(後で増加分を算出する)
CALL SIMULATE_TRAIN_FIRST
;指令の擬似実行
CALL SIMULATE_TRAIN_COM, ARG, ARG:1
;経験や珠などの獲得量計算
CALL SIMULATE_TRAIN_CALC
;結果発表
CALL SIMULATE_TRAIN_SHOW

;TARGET = MEMO_TARGET
;TARGET:1 = MEMO_TARGET:1
;TARGET:2 = MEMO_TARGET:2

;ARGにはPLAYヤー以外の人の人数。例えば３Ｐする場合にはARGを２にする。１は省略可能
@SIMULATE_TRAIN_FIRST, ARG
#DIM LCOUNT
SIF ARG <= 1
	ARG = 1

PREVCOM = -1

VARSET TARGET, 0, ARG, 9

CALL SIMULATE_TRAIN_FIRST_SET, PLAYER
FOR LCOUNT, 0, 9
	SIF TARGET:LCOUNT > 0
		CALL SIMULATE_TRAIN_FIRST_SET, TARGET:LCOUNT
NEXT

@SIMULATE_TRAIN_FIRST_SET, ARG
#DIM LCOUNT

;TCVAR:300～399はEXP
FOR LCOUNT, 0, 100
	TCVAR:ARG:(LCOUNT + 300) = EXP:ARG:LCOUNT
NEXT
;TCVAR:400～429はJUEL
FOR LCOUNT, 0, 30
	TCVAR:ARG:(LCOUNT + 400) = JUEL:ARG:LCOUNT
NEXT
;TCVAR:430～459はPALAM
FOR LCOUNT, 0, 30
	TCVAR:ARG:(LCOUNT + 430) = PALAM:ARG:LCOUNT
NEXT
;TCVAR:460～519はEX
FOR LCOUNT, 0, 60
	TCVAR:ARG:(LCOUNT + 460) = EX:ARG:LCOUNT
NEXT
;TCVAR:520～539はBASE
FOR LCOUNT, 0, 20
	TCVAR:ARG:(LCOUNT + 520) = BASE:ARG:LCOUNT
NEXT

;Ｖ潤、Ａ潤、恭順、欲情のPALAMは少なすぎると支障が出るので底上げ
PALAM:ARG:Ｖ潤 += 3000
PALAM:ARG:Ａ潤 += 3000
PALAM:ARG:恭順 += 3000
PALAM:ARG:欲情 += 3000

;絶頂射精ゲージ初期化
CVARSET BASE, GETNUM(BASE, "絶頂")

@SIMULATE_TRAIN_CALC
#DIM LCOUNT

CALL SIMULATE_TRAIN_CALC_SET, PLAYER
FOR LCOUNT, 0, 9
	SIF TARGET:LCOUNT > 0
		CALL SIMULATE_TRAIN_CALC_SET, TARGET:LCOUNT
NEXT

@SIMULATE_TRAIN_CALC_SET, ARG
#DIM LCOUNT
;Ｖ潤、Ａ潤、恭順、欲情の底上げ終了
PALAM:ARG:Ｖ潤 -= 3000
PALAM:ARG:Ａ潤 -= 3000
PALAM:ARG:恭順 -= 3000
PALAM:ARG:欲情 -= 3000

;PLAYERがMASTERでないときには一部の経験の増加量を減らす
IF ARG == TARGET && PLAYER != MASTER
	FOR LCOUNT, 0, 100
		SELECTCASE EXPNAME:LCOUNT
		;増加分を８割減
		CASE "奉仕快楽経験", "嗜虐快楽経験"
			EXP:ARG:LCOUNT = TCVAR:ARG:(LCOUNT + 300) + (EXP:ARG:LCOUNT - TCVAR:ARG:(LCOUNT + 300) )/5
		ENDSELECT
	NEXT
ENDIF

;EXP関連の数値は出きった後なので表示の簡略化のため値を増分に書き換える
FOR LCOUNT, 0, 100
	TCVAR:ARG:(LCOUNT + 300) = EXP:ARG:LCOUNT - TCVAR:ARG:(LCOUNT + 300)
NEXT

;以下でJUELの増加分を計算する（まずはPALAM、EX、JUELの増分を出す）
FOR LCOUNT, 0, 30
	PALAM:ARG:LCOUNT = MAX(PALAM:ARG:LCOUNT - TCVAR:ARG:(LCOUNT + 430), 0)
NEXT
FOR LCOUNT, 0, 60
	EX:ARG:LCOUNT -= TCVAR:ARG:(LCOUNT + 460)
NEXT

;JUEL増加量の算出(通常の25%程度)
FOR LCOUNT, 0, 16
	SIF ARG == MASTER
		BREAK

	SELECTCASE PALAMNAME:LCOUNT
	CASE "", "恐怖", "反感"
		CONTINUE
	CASEELSE
		GOTJUEL:LCOUNT = MULTIPLY(GET_JUEL(LCOUNT, ARG), 25)

		;相手がMASTERでないなら獲得量を減らす
		SELECTCASE PLAYER
		CASE MASTER
		CASE ASSI
			GOTJUEL:LCOUNT /= 2
		CASEELSE
			GOTJUEL:LCOUNT /= 4
		ENDSELECT

		SIF GOTJUEL:LCOUNT < 50
			GOTJUEL:LCOUNT = 0
		JUEL:ARG:LCOUNT += GOTJUEL:LCOUNT

		;数値が出きった後なので表示の簡略化のため値を増分に書き換える
		TCVAR:ARG:(LCOUNT + 400) = GOTJUEL:LCOUNT
	ENDSELECT
NEXT
;絶頂BOUNSはここで重置
JUEL:ARG:快ＣBOUNS = 0
JUEL:ARG:快ＶBOUNS = 0
JUEL:ARG:快ＡBOUNS = 0
JUEL:ARG:快ＢBOUNS = 0
JUEL:ARG:快ＭBOUNS = 0
JUEL:ARG:快尿BOUNS = 0

;増加したPALAM、EXはJUELに変えたので、元の値に戻す
FOR LCOUNT, 0, 30
	PALAM:ARG:LCOUNT = TCVAR:ARG:(LCOUNT + 430)
NEXT
FOR LCOUNT, 0, 60
	EX:ARG:LCOUNT = TCVAR:ARG:(LCOUNT + 460)
NEXT

;------------------------------------------------------------------------
;ARGにはTARGET側の表示経験、ARG:1にはPLAYER側の表示経験の番号を入れる
;ただし、PLAYER < 0 も有うるので注意
;経験名で指定したいところだが、TCVARが番号で記録しているので速度重視で番号で指定する
;------------------------------------------------------------------------
@PRINT_SIMULATE_TRAIN, ARG, ARG:1
#DIM LCOUNT
;PLAYERとTARGETを同時に処理する
#DIM ACTOR, 4
#DIM EXP_ADD, 4

ACTOR = TARGET
ACTOR:1 = TARGET:1
ACTOR:2 = TARGET:2
ACTOR:3 = PLAYER

;それぞれ参照するものが長すぎるので代入
VARSET EXP_ADD

FOR LCOUNT, 0, 3
	SIF ACTOR:LCOUNT > 0
		EXP_ADD:LCOUNT = TCVAR:(ACTOR:LCOUNT):(ARG + 300)
NEXT
SIF PLAYER > 0
	EXP_ADD:3 = TCVAR:PLAYER:(ARG:1 + 300)

SIF EXP_ADD + EXP_ADD:1 + EXP_ADD:2 + EXP_ADD:3 == 0
	RETURN 0

SIF TARGET:1 == 0
	PRINTFORM

FOR LCOUNT, 0, 4
	SIF ACTOR:LCOUNT <= 0
		CONTINUE

	IF EXP_ADD:LCOUNT > 0
		;PLAYERの時には経験の表示が異なる
		IF LCOUNT == 3
			LOCALS = %TEXT_RJ(EXPNAME:(ARG:1), 13)%＋{EXP_ADD:LCOUNT, 3}
		ELSE
			LOCALS = %TEXT_RJ(EXPNAME:ARG, 13)%＋{EXP_ADD:LCOUNT, 3}
		ENDIF
		PRINTFORM %TEXT_LJ(LOCALS, 19)%
	ELSE
		PRINTFORM %BL(19)%
	ENDIF
NEXT

PRINTL

;PLAYERがいない場合も考慮する
@SIMULATE_TRAIN_SHOW
#DIM LCOUNT
#DIM LCOUNT2
;PLAYERとTARGETを同時に処理する
#DIM ACTOR, 4
#DIM JUEL_ADD, 4
;経験値を得ているかを記録
#DIM IS_EXP_ADD, 4

PRINTL

;PLAYERの精力の減少量を表示
IF PLAYER > 0 && BASE:PLAYER:精力 != TCVAR:PLAYER:BASE_精力
	PRINTFORM %CALLNAME:PLAYER%の精力:({TCVAR:PLAYER:BASE_精力}/{MAXBASE:PLAYER:精力}) → ({BASE:PLAYER:精力}/{MAXBASE:PLAYER:精力})
	SIF PLAYER > 0 && BASE:PLAYER:魂 != TCVAR:PLAYER:BASE_魂
		PRINTFORM 　%CALLNAME:PLAYER%の魂:%TEXTS("0.01", TCVAR:PLAYER:BASE_魂)% → %TEXTS("0.01", BASE:PLAYER:魂)%
	PRINTL
ENDIF

ACTOR = TARGET
ACTOR:1 = TARGET:1
ACTOR:2 = TARGET:2
ACTOR:3 = PLAYER

;経験に変動があった角色を表示するので格子
VARSET IS_EXP_ADD

FOR LCOUNT2, 0, 4
	SIF ACTOR:LCOUNT2 <= 0
		CONTINUE

	FOR LCOUNT, 0, 100
		SIF TCVAR:(ACTOR:LCOUNT2):(LCOUNT + 300) == 0
			CONTINUE

		IS_EXP_ADD:LCOUNT2 = 1
		BREAK
	NEXT
NEXT

;誰も経験変動ないなら終わり
SIF IS_EXP_ADD:0 + IS_EXP_ADD:1 + IS_EXP_ADD:2 + IS_EXP_ADD:3 == 0
	RETURN 0

;名前出力
SIF ACTOR:1 == 0
	PRINTFORM

FOR LCOUNT, 0, 4
	SIF ACTOR:LCOUNT <= 0
		CONTINUE

	IF IS_EXP_ADD:LCOUNT
		LOCALS = [%CALLNAME:(ACTOR:LCOUNT)%]
		PRINTFORM %TEXT_LJ(TEXT_RJ(LOCALS, 14), 19)%
	ELSE
		PRINTFORM %BL(19)%
	ENDIF
NEXT
PRINTL

;絶頂経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "絶頂経験"), GETNUM(EXP, "絶頂経験")
;童貞狩猎経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "童貞狩猎経験"), GETNUM(EXP, "童貞狩猎経験")
;精液経験＆射精経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "精液経験"), GETNUM(EXP, "射精経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "射精経験"), GETNUM(EXP, "精液経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "膣内精液経験"), GETNUM(EXP, "膣内精液経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "肛内精液経験"), GETNUM(EXP, "肛内精液経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "精飲経験"), GETNUM(EXP, "精飲経験")
;噴乳経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "噴乳経験"), GETNUM(EXP, "噴乳経験")
;ＶＡ尿道経験＆ＶＡ尿道拡張経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ｖ経験"), GETNUM(EXP, "Ｖ経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ｖ拡張経験"), GETNUM(EXP, "Ｖ拡張経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ｖ拳交経験"), -1
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ａ経験"), GETNUM(EXP, "Ａ経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ａ拡張経験"), GETNUM(EXP, "Ａ拡張経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ａ拳交経験"), -1
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "尿道経験"), GETNUM(EXP, "尿道経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "尿道拡張経験"), GETNUM(EXP, "尿道拡張経験")
;接吻経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "接吻経験"), GETNUM(EXP, "接吻経験")
;性交経験＆挿入経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ｖ性交経験"), GETNUM(EXP, "Ｖ挿入経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "避孕套性交経験"), GETNUM(EXP, "避孕套挿入経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ｖ挿入経験"), GETNUM(EXP, "Ｖ性交経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "避孕套挿入経験"), GETNUM(EXP, "避孕套性交経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ａ性交経験"), GETNUM(EXP, "Ａ挿入経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "Ａ挿入経験"), GETNUM(EXP, "Ａ性交経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "尿道性交経験"), GETNUM(EXP, "尿道挿入経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "尿道挿入経験"), GETNUM(EXP, "尿道性交経験")
;自慰経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "自慰経験"), GETNUM(EXP, "自慰経験")
;レズ、ＢＬ経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "百合経験"), GETNUM(EXP, "百合経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "ＢＬ経験"), GETNUM(EXP, "ＢＬ経験")
;被虐快楽経験＆嗜虐快楽経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "被虐快楽経験"), GETNUM(EXP, "嗜虐快楽経験")
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "嗜虐快楽経験"), GETNUM(EXP, "被虐快楽経験")
;奉仕快楽～舐陰経験
FOR LCOUNT, 21, 29
	CALL PRINT_SIMULATE_TRAIN, LCOUNT, LCOUNT
NEXT
;喉性交経験
CALL PRINT_SIMULATE_TRAIN, GETNUM(EXP, "喉性交経験"), GETNUM(EXP, "喉性交経験")

;相手が一般人なら珠取得表示は没有
IF PLAYER < 0 || TALENT:PLAYER:一般人
	PRINTL
	RETURN 0
ENDIF

;各種珠ＧＥＴ
FOR LCOUNT2, 0, 16

	SELECTCASE PALAMNAME:LCOUNT2
	CASE "", "恐怖", "反感"
		CONTINUE
	ENDSELECT

	VARSET JUEL_ADD
	FOR LCOUNT, 0, 4
		SIF ACTOR:LCOUNT > 0
			JUEL_ADD:LCOUNT = TCVAR:(ACTOR:LCOUNT):(LCOUNT2 + 400)
	NEXT

	SIF JUEL_ADD + JUEL_ADD:1 + JUEL_ADD:2 + JUEL_ADD:3 == 0
		CONTINUE

	SIF ACTOR:1 == 0
		PRINTFORM

	FOR LCOUNT, 0, 4
		SIF ACTOR:LCOUNT <= 0
			CONTINUE

		IF JUEL_ADD:LCOUNT
			LOCALS = %BL(3)% %PALAMNAME:LCOUNT2%の珠＋{JUEL_ADD:LCOUNT, 4}
			PRINTFORM %TEXT_LJ(LOCALS, 19)%
		ELSE
			PRINTFORM %BL(19)%
		ENDIF
	NEXT
	PRINTL
NEXT

PRINTL

;-------------------------------------------------
;指令ARGを(ARG:1)回擬似的に計算する
;-------------------------------------------------
@SIMULATE_TRAIN_COM, ARG, ARG:1
#DIM LCOUNT
#DIM MEMO_MOOD
#DIM MEMO_SELECTCOM
#DIM MEMO_BASE0
#DIM MEMO_BASE1

SIF ARG:1 == 0
	RETURN 0

IF COND("調教中")
	TRYCALLFORM COM_ABLE{ARG}
	SIF RESULT == 0
		RETURN 0
ENDIF

;テ接吻ト出力フラグと、情緒を弄る。
MEMO_MOOD = FLAG:情緒
MEMO_SELECTCOM = SELECTCOM

;情緒は爱心の個数にして４個にする
FLAG:情緒 = MAX(FLAG:情緒, 120)
SIF COND("性欲解消実行中")
	FLAG:情緒 = MAX(FLAG:情緒, 180)

SELECTCOM = ARG

;挿入フラグは解除
CVARSET TEQUIP, GETNUM(TEQUIP, "体位")
CVARSET TEQUIP, GETNUM(TEQUIP, "Ｖ挿入")
CVARSET TEQUIP, GETNUM(TEQUIP, "Ａ挿入")
CVARSET TEQUIP, GETNUM(TEQUIP, "尿道挿入")

CALL RESET_TFLAGS

;システム文スキップフラグON
TFLAG:システム文スキップ = 1

MEMO_BASE0 = BASE:体力
CALL SOURCE_CHECK_SIMPLE, SELECTCOM, 0, 100, ARG:1

;選択指令と実行値補正（干劲）の確認
;PRINTFORML TCVAR:干劲 = {TCVAR:干劲}, %TRAINNAME:SELECTCOM%

MEMO_BASE1 = BASE:PLAYER:精力
;PRINTFORML BASE:PLAYER:精力 = {BASE:PLAYER:精力}, BASE:PLAYER:絶頂 = {BASE:PLAYER:絶頂}, COND("絶頂", PLAYER) = {COND("絶頂", PLAYER)}
IF COND("絶頂", PLAYER)
	;PRINTFORMW COND("絶頂", PLAYER) = {COND("絶頂", PLAYER)}
	TCVAR:PLAYER:PLAY区分メイン = CALCF("絶頂の原因", TARGET, SELECTCOM)
	CALL CALC, "絶頂させた処理", TARGET
	CALL CALC, "絶頂した処理", PLAYER

	;精力減少控えめ
	BASE:PLAYER:精力 = MAX(MEMO_BASE1 - COND("絶頂", PLAYER)*2, 0)
ENDIF
;PRINTFORML EJAC = {EJAC:PLAYER}, 技巧 = {ABL:PLAYER:技巧}, TCVAR:1 = {TCVAR:PLAYER:絶頂度}

;体力の減少は少なめにする
BASE:体力 = MAX(MEMO_BASE0 - 20*ARG:1, 1)
;体力回復
SIF TALENT:吸精体質
	CALL CALC, "体力回復", COND("絶頂", PLAYER) * 10
;CUPをPALAMに移す
FOR LCOUNT, 0, 30
	PALAM:LCOUNT = MIN(PALAM_LV(16), PALAM:LCOUNT+CUP:LCOUNT-CDOWN:LCOUNT)
NEXT

;体力精力が減りすぎていた時の処理
BASE:体力 = MAX(BASE:体力, 1)
BASE:精力 = MAX(BASE:精力, 1)

BASE:PLAYER:体力 = MAX(BASE:PLAYER:体力, 1)
BASE:PLAYER:精力 = MAX(BASE:PLAYER:精力, 1)

FLAG:情緒 = MEMO_MOOD
SELECTCOM = MEMO_SELECTCOM
;システム文スキップフラグOFF
TFLAG:システム文スキップ = 0

;-------------------------------------------------
;角色ARGが主要な指令を実行できるかを全部調べる
;-------------------------------------------------
@CHECK_COM_ABLE, ARG
#DIM LCOUNT
#DIM MEMO_TEQUIP30
#DIM MEMO_EQUIP1
#DIM MEMO_EQUIP1_PLAYER
#DIM MEMO_TARGET
#DIM MEMO_ITEM

;主に日常シーンなどで用いるため、假阳具没有で判定する
MEMO_ITEM = ITEM:假阳具
ITEM:假阳具 = 0

MEMO_TARGET = TARGET

TARGET = ARG
MEMO_TEQUIP30 = TEQUIP:推倒
MEMO_EQUIP1 = EQUIP:ステート変化
MEMO_EQUIP1_PLAYER = EQUIP:PLAYER:ステート変化

SIF PENIS(TARGET) == 0 && TALENT:具現
	CALL ADD_STATE, TARGET, "具現"
SIF PENIS(PLAYER) == 0 && TALENT:PLAYER:具現
	CALL ADD_STATE, PLAYER, "具現"

TEQUIP:推倒 = 0
TFLAG:実行値BOUNS = 0
TCVAR:基本実行値 = 0
STR:実行値 =

;Ｖ潤、Ａ潤は少なすぎると支障が出るので底上げ
PALAM:Ｖ潤 += 3000
PALAM:Ａ潤 += 3000

;初期化
CSTR:実行可能指令 = /

FOR LCOUNT, 0, 200
	SELECTCASE LCOUNT
	;主要指令の選別
	CASE 1, 3 TO 6, 9, 10, 13, 14, 60, 61, 65 TO 68, 70, 71, 75, 80 TO 83, 90 TO 99, 104 TO 107, 120 TO 122, 125 TO 127, 140 TO 144, 146, 150
		SELECTCASE LCOUNT
		;条件が少々厳しい指令
		CASE 60 TO 69
			;指令実行済みでないと行わない
			SIF FIRSTCOMS("Ｖ挿入") == 0
				CONTINUE
			SIF TRAINNAME:LCOUNT == "騎乗位" && COND("Ｖ熟達") == 0
				CONTINUE
		CASE 70 TO 79
			;指令実行済みでないと行わない
			SIF FIRSTCOMS("Ａ挿入") == 0
				CONTINUE
			SIF TRAINNAME:LCOUNT == "肛門騎乗位" && COND("Ａ熟達") == 0
				CONTINUE
		CASE 83 TO 88
			;指令実行済みでないと行わない
			SIF FIRSTCOMS("尿道挿入") == 0
				CONTINUE
			SIF TRAINNAME:LCOUNT == "尿道騎乗位" && COND("尿道熟達") == 0
				CONTINUE
		CASE 120 TO 124
			;指令実行済みでないと行わない
			SIF FIRSTCOMS("Ｖ逆挿入") == 0
				CONTINUE
		CASE 125 TO 129
			;指令実行済みでないと行わない
			SIF FIRSTCOMS("Ａ逆挿入") == 0
				CONTINUE
		;指令実行してなくても行えるもの
		CASE 146

		CASEELSE
			;指令実行済みでないと行わない
			SIF FIRSTCOM(LCOUNT) == 0
				CONTINUE
		ENDSELECT

		RESULT = 0
		TRYCALLFORM COM_ABLE{LCOUNT}
		LOCAL = RESULT
		;PRINTFORM {LCOUNT}%TRAINNAME:LCOUNT%,
		;CALL SHOW_COM_ORDER_COM, LCOUNT
		;PRINTFORML RESULT = {LOCAL}
		RESULT = LOCAL
		SIF RESULT
			CSTR:実行可能指令 = %CSTR:実行可能指令%%TRAINNAME:LCOUNT%/

		SELECTCASE LCOUNT
		;推倒状態も見る
		CASE 1, 4, 6, 9, 65, 75, 88, 90 TO 99, 120, 126, 150
			TEQUIP:推倒 = 1
			RESULT = 0
			TRYCALLFORM COM_ABLE{LCOUNT}
			SIF RESULT
				CSTR:実行可能指令 = %CSTR:実行可能指令%推倒%TRAINNAME:LCOUNT%/
			TEQUIP:推倒 = 0
		ENDSELECT

	ENDSELECT
NEXT

;PRINTFORMW %CSTR:実行可能指令%

;底上げ終了
PALAM:Ｖ潤 -= 3000
PALAM:Ａ潤 -= 3000

;具現を元に戻す
SIF STATE("具現", TARGET)
	CALL REMOVE_STATE, TARGET, "具現"
SIF STATE("具現", PLAYER)
	CALL REMOVE_STATE, PLAYER, "具現"

EQUIP:ステート変化 = MEMO_EQUIP1
EQUIP:PLAYER:ステート変化 = MEMO_EQUIP1_PLAYER
TEQUIP:推倒 = MEMO_TEQUIP30
TARGET = MEMO_TARGET

ITEM:假阳具 = MEMO_ITEM

;-------------------------------------------------
;指令ARGSを角色ARGが実行できるかを参照し、実行可能なら１を返す。だめなら０
;-------------------------------------------------
@CANTRAIN(ARGS, ARG)
#FUNCTION

SIF ARG < 0
	RETURNF 0
SIF ARG == 0 && TARGET > 0
	ARG = TARGET

LOCALS = /%ARGS%/

RETURNF STRCOUNT(CSTR:ARG:実行可能指令, LOCALS)

;-------------------------------------------------
;@CANTRAINの指令群版
;-------------------------------------------------
@CANTRAINS(ARGS, ARG)
#FUNCTION
#DIM LCOUNT
#DIM CHOICE
#DIM NUM_CHOICE

SIF ARG < 0
	RETURNF 0
SIF ARG == 0 && TARGET > 0
	ARG = TARGET

CHOICE = 0
NUM_CHOICE = 1
SELECTCASE ARGS
CASE "Ｖ挿入"
	FOR LCOUNT, 60, 70
		SIF CANTRAIN(TRAINNAME:LCOUNT, ARG) == 0
			CONTINUE
		SIF RAND:NUM_CHOICE == 0
			CHOICE = LCOUNT
		NUM_CHOICE += 1
	NEXT
CASE "Ａ挿入"
	FOR LCOUNT, 70, 80
		SIF CANTRAIN(TRAINNAME:LCOUNT, ARG) == 0
			CONTINUE
		SIF RAND:NUM_CHOICE == 0
			CHOICE = LCOUNT
		NUM_CHOICE += 1
	NEXT
CASE "尿道挿入"
	FOR LCOUNT, 83, 89
		SIF CANTRAIN(TRAINNAME:LCOUNT, ARG) == 0
			CONTINUE
		SIF RAND:NUM_CHOICE == 0
			CHOICE = LCOUNT
		NUM_CHOICE += 1
	NEXT
CASE "Ｖ逆挿入"
	FOR LCOUNT, 120, 125
		SIF CANTRAIN(TRAINNAME:LCOUNT, ARG) == 0
			CONTINUE
		SIF RAND:NUM_CHOICE == 0
			CHOICE = LCOUNT
		NUM_CHOICE += 1
	NEXT
CASE "Ａ逆挿入"
	FOR LCOUNT, 125, 130
		SIF CANTRAIN(TRAINNAME:LCOUNT, ARG) == 0
			CONTINUE
		SIF RAND:NUM_CHOICE == 0
			CHOICE = LCOUNT
		NUM_CHOICE += 1
	NEXT
ENDSELECT
RETURNF CHOICE


code:
;-------------------------------------------------
;時間を進ませない指令の場合の@SOURCE_CHECK
;基本的にはソース変動と刻印＆経験取得、セリフのみ
;-------------------------------------------------
@SOURCE_CHECK_SHORT
TFLAG:SOURCE_CHECK_SHORT = 1
CALL SOURCE_CHECK
TFLAG:SOURCE_CHECK_SHORT = 0


code:
;SOURCEとUPの違いを轻轻地確認。
;例えば、SOURCE:Ｃ快楽はPALAM:快ＣのみならずPALAM:恭順などが発生する等、”快感を得て望ましいか？”を含んだ要素。
;CUP:快Ｃは純粋に快Ｃのみに影響する。
;-------------------------------------------------
;SOURCEの計算
;あらかじめターンの開始と終了時に計算されている補正値TCVAR:600～659を用いて計算する
;１：ここの計算前に獲得していたCUPをUPに退避してCUPを初期化
;２：SOURCEからCUPを算出してSOURCEを初期化
;３：UPに退避させていたCUPを２で計算したCUPに追加
;-------------------------------------------------
@CALC_SOURCE, ARGS
#DIM LCOUNT
;ARGSには試算と調教指令、其他がある。調教指令だとその調教独自の補正が入ったりする
;-------------------------------------------------
;SOURCEとCUPにかかる補正を再計算
;-------------------------------------------------
CALL CALC, "調教補正値", TARGET

IF ARGS != "試算"
	;補正を二度かけないように、CUPをUPに移す
	FOR LCOUNT, 0, 30
		UP:LCOUNT = CUP:LCOUNT
	NEXT
ENDIF
VARSET CUP

;-------------------------------------------------
;SOURCEに補正を加える
;-------------------------------------------------
FOR LCOUNT, 0, 30
	SIF SOURCE:LCOUNT <= 0
		CONTINUE
	SELECTCASE SOURCENAME:LCOUNT
	;快楽のSOURCEには、補正値に応じたBOUNSを加える
	CASE "Ｃ快楽", "Ｖ快楽", "Ａ快楽", "Ｂ快楽", "Ｍ快楽", "尿道快楽"
		SELECTCASE TCVAR:(600 + LCOUNT)
		CASE IS > 0
			SOURCE:LCOUNT += TCVAR:(600 + LCOUNT)*10
		ENDSELECT
	ENDSELECT
	SOURCE:LCOUNT = MULTIPLY(SOURCE:LCOUNT, 100 + TCVAR:(600 + LCOUNT) )

	;素質による補正の最終値がプラスならば、最低上昇値となる。
	SIF SOURCE:LCOUNT < TCVAR:(600 + LCOUNT)
		SOURCE:LCOUNT = TCVAR:(600 + LCOUNT)
NEXT
;-------------------------------------------------
;感度OFF指定がある場合は、対応した快楽のSOURCEを0にする
;-------------------------------------------------
IF TCVAR:Ｃ感度OFF
	SOURCE:Ｃ快楽 = 0
	TCVAR:Ｃ快楽記録 = 0
ENDIF
IF TCVAR:Ｖ感度OFF
	SOURCE:Ｖ快楽 = 0
	TCVAR:Ｖ快楽記録 = 0
ENDIF
IF TCVAR:Ａ感度OFF
	SOURCE:Ａ快楽 = 0
	TCVAR:Ａ快楽記録 = 0
ENDIF
IF TCVAR:Ｂ感度OFF
	SOURCE:Ｂ快楽 = 0
	TCVAR:Ｂ快楽記録 = 0
ENDIF
IF TCVAR:Ｍ感度OFF
	SOURCE:Ｍ快楽 = 0
	TCVAR:Ｍ快楽記録 = 0
ENDIF
IF TCVAR:尿感度OFF
	SOURCE:尿道快楽 = 0
	TCVAR:尿道快楽記録 = 0
ENDIF
;-------------------------------------------------
;同じ指令の連続実行による上下の処理（快楽と消費体力は1.5倍）
;-------------------------------------------------
IF COND("連続実行")
	TIMES SOURCE:Ｃ快楽, 1.50
	TIMES SOURCE:Ｖ快楽, 1.50
	TIMES SOURCE:Ａ快楽, 1.50
	TIMES SOURCE:Ｂ快楽, 1.50
	TIMES SOURCE:Ｍ快楽, 1.50
	TIMES SOURCE:尿道快楽, 1.50
ENDIF
;手下留情
IF COND("手下留情中") || TFLAG:进行性処理
	TIMES SOURCE:Ｃ快楽, 0.50
	TIMES SOURCE:Ｖ快楽, 0.50
	TIMES SOURCE:Ａ快楽, 0.50
	TIMES SOURCE:Ｂ快楽, 0.50
	TIMES SOURCE:Ｍ快楽, 0.50
	TIMES SOURCE:尿道快楽, 0.50
ENDIF

;-------------------------------------------------
;SOURCEからCUPを算出
;-------------------------------------------------
CALL SOURCE_CVABM
CALL SOURCE_NOTCVABM

;-------------------------------------------------
;素質などによるCUPの上下の処理
;-------------------------------------------------
FOR LCOUNT, 0, 30
	SIF CUP:LCOUNT <= 0
		CONTINUE

	CUP:LCOUNT = MULTIPLY(CUP:LCOUNT, 100 + TCVAR:(630 + LCOUNT) )

	;减少要素はある程度より低いなら０になる
	SELECTCASE PALAMNAME:LCOUNT
	CASE "恐怖", "反感"
		SIF CUP:LCOUNT < 10
			CUP:LCOUNT = 0
	ENDSELECT

	;素質による補正の最終値がプラスならば、最低上昇値となる。
	SIF CUP:LCOUNT > 0 && CUP:LCOUNT < TCVAR:(630 + LCOUNT)
		CUP:LCOUNT = TCVAR:(630 + LCOUNT)
NEXT

;-------------------------------------------------
;感度OFF指定がある場合は、対応した快楽のCUPを0にする
;-------------------------------------------------
IF TCVAR:Ｃ感度OFF
	CUP:快Ｃ = 0
	UP:快Ｃ = 0
ENDIF
IF TCVAR:Ｖ感度OFF
	CUP:快Ｖ = 0
	UP:快Ｖ = 0
ENDIF
IF TCVAR:Ａ感度OFF
	CUP:快Ａ = 0
	UP:快Ａ = 0
ENDIF
IF TCVAR:Ｂ感度OFF
	CUP:快Ｂ = 0
	UP:快Ｂ = 0
ENDIF
IF TCVAR:Ｍ感度OFF
	CUP:快Ｍ = 0
	UP:快Ｍ = 0
ENDIF
IF TCVAR:尿感度OFF
	CUP:快尿 = 0
	UP:快尿 = 0
ENDIF

;調教知識による補正
SELECTCASE CONDS("調教知識", PLAYER)
CASE "愛撫・奉仕知識"
	SELECTCASE ARGS
	CASE "調教指令", "試算"
		SELECTCASE SELECTCOM
		;PLAYヤーが愛撫
		CASE 0 TO 2, 4 TO 12, 15
			TIMES CUP:快Ｃ, 1.50
			TIMES CUP:快Ｖ, 1.50
			TIMES CUP:快Ａ, 1.50
			TIMES CUP:快Ｂ, 1.50
			TIMES CUP:快Ｍ, 1.50
			TIMES CUP:快尿, 1.50
			TIMES CUP:Ｖ潤, 1.50
			TIMES CUP:Ａ潤, 1.50
			TIMES CUP:恭順, 1.50
			TIMES CUP:欲情, 1.50
			TIMES CUP:屈服, 1.50
			TIMES CUP:恥情, 0.50
			TIMES CUP:苦痛, 0.50
			TIMES CUP:恐怖, 0.50
			TIMES CUP:反感, 0.50
		ENDSELECT
	ENDSELECT
CASE "教育擅長"
	SELECTCASE ARGS
	CASE "調教指令", "試算"
		IF TEQUIP:推倒 == 0
			SELECTCASE SELECTCOM
			;相手がPLAYヤーに奉仕
			CASE 65, 75, 90 TO 119, 120, 121, 125, 126
				TIMES CUP:習得, 1.50
				TIMES CUP:恐怖, 0.50
				TIMES CUP:反感, 0.50
			ENDSELECT
		ENDIF
	ENDSELECT
CASE "ＳＭ知識"
	SELECTCASE ARGS
	CASE "調教指令", "試算"
		SELECTCASE SELECTCOM
		;ＳＭPLAY
		CASE 130 TO 159
			TIMES CUP:Ｖ潤, 1.50
			TIMES CUP:恭順, 1.50
			TIMES CUP:欲情, 1.50
			TIMES CUP:屈服, 1.50
			TIMES CUP:恐怖, 0.50
			TIMES CUP:反感, 0.50
		ENDSELECT
	ENDSELECT
CASE "Ａ調教知識"
	SELECTCASE ARGS
	CASE "調教指令", "試算"
		SELECTCASE SELECTCOM
		;PLAYヤーが相手の肛門を弄る
		CASE 2, 9, 33, 70 TO 79, 136, 142
			TIMES CUP:快Ａ, 1.50
			TIMES CUP:Ｖ潤, 1.50
			TIMES CUP:Ａ潤, 1.50
			TIMES CUP:恭順, 1.50
			TIMES CUP:欲情, 1.50
			TIMES CUP:屈服, 1.50
			TIMES CUP:苦痛, 0.50
			TIMES CUP:恐怖, 0.50
			TIMES CUP:反感, 0.50
		ENDSELECT
	ENDSELECT
;これについては@SOURCE_INSERTION等で増減
CASE "性器拡張知識"

CASE "道具使"
	SELECTCASE ARGS
	CASE "調教指令", "試算"
		SELECTCASE SELECTCOM
		CASE 2, 33
			IF TEQUIP:肛用振動棒
				TIMES CUP:快Ａ, 1.50
				TIMES CUP:Ｖ潤, 1.50
				TIMES CUP:Ａ潤, 1.50
				TIMES CUP:恭順, 1.50
				TIMES CUP:欲情, 1.50
				TIMES CUP:屈服, 1.50
				TIMES CUP:苦痛, 0.50
				TIMES CUP:恐怖, 0.50
				TIMES CUP:反感, 0.50
			ENDIF
		CASE 8, 31
			IF TEQUIP:振動棒
				TIMES CUP:快Ｖ, 1.50
				TIMES CUP:Ｖ潤, 1.50
				TIMES CUP:恭順, 1.50
				TIMES CUP:欲情, 1.50
				TIMES CUP:屈服, 1.50
				TIMES CUP:苦痛, 0.50
				TIMES CUP:恐怖, 0.50
				TIMES CUP:反感, 0.50
			ENDIF
		CASE 30 TO 59
			TIMES CUP:快Ｃ, 1.50
			TIMES CUP:快Ｖ, 1.50
			TIMES CUP:快Ａ, 1.50
			TIMES CUP:快Ｂ, 1.50
			TIMES CUP:快Ｍ, 1.50
			TIMES CUP:快尿, 1.50
			TIMES CUP:Ｖ潤, 1.50
			TIMES CUP:Ａ潤, 1.50
			TIMES CUP:恭順, 1.50
			TIMES CUP:欲情, 1.50
			TIMES CUP:屈服, 1.50
			TIMES CUP:苦痛, 0.50
			TIMES CUP:恐怖, 0.50
			TIMES CUP:反感, 0.50
		;尿道
		CASE 149, 151
			TIMES CUP:快尿, 1.50
			TIMES CUP:Ｖ潤, 1.50
			TIMES CUP:Ａ潤, 1.50
			TIMES CUP:恭順, 1.50
			TIMES CUP:欲情, 1.50
			TIMES CUP:屈服, 1.50
			TIMES CUP:苦痛, 0.50
			TIMES CUP:恐怖, 0.50
			TIMES CUP:反感, 0.50
		CASE 152
			IF TEQUIP:尿道振動棒
				TIMES CUP:快尿, 1.50
				TIMES CUP:Ｖ潤, 1.50
				TIMES CUP:Ａ潤, 1.50
				TIMES CUP:恭順, 1.50
				TIMES CUP:欲情, 1.50
				TIMES CUP:屈服, 1.50
				TIMES CUP:苦痛, 0.50
				TIMES CUP:恐怖, 0.50
				TIMES CUP:反感, 0.50
			ENDIF
		;ＳＭ関連の道具
		CASE 131 TO 136, 148
			TIMES CUP:Ｖ潤, 1.20
			TIMES CUP:恭順, 1.20
			TIMES CUP:欲情, 1.20
			TIMES CUP:屈服, 1.20
			TIMES CUP:苦痛, 0.80
			TIMES CUP:恐怖, 0.80
			TIMES CUP:反感, 0.80
		ENDSELECT
	ENDSELECT
;これについては常時効果を発揮
CASE "露出知識"
	TIMES CUP:恥情, 1.50
	IF CUP:恥情 >= 3000
		TIMES CUP:Ｖ潤, 1.50
		TIMES CUP:欲情, 1.50
		TIMES CUP:屈服, 1.50
		TIMES CUP:恐怖, 0.50
		TIMES CUP:反感, 0.50
	ENDIF
ENDSELECT

;助手の調教知識による補正
IF ASSI && PLAYER == MASTER
	SELECTCASE CONDS("調教知識", ASSI)
	;これについては常時効果を発揮
	CASE "露出知識"
		TIMES CUP:恥情, 1.50
		IF CUP:恥情 >= 3000
			TIMES CUP:Ｖ潤, 1.50
			TIMES CUP:欲情, 1.50
			TIMES CUP:屈服, 1.50
			TIMES CUP:恐怖, 0.50
			TIMES CUP:反感, 0.50
		ENDIF
	ENDSELECT
ENDIF

;-------------------------------------------------
;指令によるLuxurious判定の計算
;-------------------------------------------------
SIF STATE("恍惚", PLAYER) == 0
	CALL CHECK_LUXURIOUS_HIT, "指令", PLAYER
;PLAYERが恍惚になってしまったらTARGETは恍惚にならない
SIF STATE("恍惚", PLAYER) == 0 && STATE("恍惚", TARGET) == 0
	CALL CHECK_LUXURIOUS_HIT, "指令", TARGET

;Luxurious補正
IF NOWEX:Luxurious
	SIF TALENT:Ｃ性向 || TALENT:淫核
		TIMES CUP:快Ｃ, 2.00
	SIF TALENT:Ｖ性向 || TALENT:淫壷
		TIMES CUP:快Ｖ, 2.00
	SIF TALENT:Ａ性向 || TALENT:尻穴狂い
		TIMES CUP:快Ａ, 2.00
	SIF TALENT:Ｂ性向 || TALENT:淫乳
		TIMES CUP:快Ｂ, 2.00
	SIF TALENT:Ｍ性向 || TALENT:蕩唇
		TIMES CUP:快Ｍ, 2.00
ENDIF

;感度ＬＶによる快感上昇の上限措置
IF CUP:快Ｃ
	;PRINTFORM 本来のＣ快感 = {CUP:快Ｃ}　→
	CUP:快Ｃ = CALCF("快感上昇の上限措置", CUP:快Ｃ, ABL:Ｃ感覚 + PENIS(TARGET) + TALENT:淫核 + TALENT:Ｃ性向)
	;PRINTFORML 修正後のＣ快感 = {CUP:快Ｃ}
ENDIF
IF CUP:快Ｖ
	;PRINTFORM 本来のＶ快感 = {CUP:快Ｖ}　→
	CUP:快Ｖ = CALCF("快感上昇の上限措置", CUP:快Ｖ, ABL:Ｖ感覚 + TALENT:淫壷 + TALENT:Ｖ性向)
	;PRINTFORML 修正後のＶ快感 = {CUP:快Ｖ}
ENDIF
IF CUP:快Ａ
	;PRINTFORM 本来のＡ快感 = {CUP:快Ａ}　→
	CUP:快Ａ = CALCF("快感上昇の上限措置", CUP:快Ａ, ABL:Ａ感覚 + TALENT:尻穴狂い + TALENT:Ａ性向)
	;PRINTFORML 修正後のＡ快感 = {CUP:快Ａ}
ENDIF
IF CUP:快Ｂ
	;PRINTFORM 本来のＢ快感 = {CUP:快Ｂ}　→
	CUP:快Ｂ = CALCF("快感上昇の上限措置", CUP:快Ｂ, ABL:Ｂ感覚 + TALENT:淫乳 + TALENT:Ｂ性向)
	;PRINTFORML 修正後のＢ快感 = {CUP:快Ｂ}
ENDIF
IF CUP:快Ｍ
	;PRINTFORM 本来のＭ快感 = {CUP:快Ｍ}　→
	CUP:快Ｍ = CALCF("快感上昇の上限措置", CUP:快Ｍ, ABL:Ｍ感覚 + TALENT:蕩唇 + TALENT:Ｍ性向)
	;PRINTFORML 修正後のＭ快感 = {CUP:快Ｍ}
ENDIF
IF CUP:快尿
	;PRINTFORM 本来の尿道快感 = {CUP:快尿}　→
	CUP:快尿 = CALCF("快感上昇の上限措置", CUP:快尿, ABL:尿道感覚 + TALENT:尿道狂 + TALENT:尿道性感)
	;PRINTFORML 修正後の尿道快感 = {CUP:快尿}
ENDIF

;痛覚による快感補正（ペナルティだが、受虐狂な人にはちょっとだけご褒美）
IF CUP:苦痛 >= 100
	LOCAL = LIMIT(100 - GET_PALAMLV(CUP:苦痛)*20 + ABL:受虐属性*20, 10, 110)
	CUP:快Ｃ = MULTIPLY(CUP:快Ｃ, LOCAL)
	CUP:快Ｖ = MULTIPLY(CUP:快Ｖ, LOCAL)
	CUP:快Ａ = MULTIPLY(CUP:快Ａ, LOCAL)
	CUP:快Ｂ = MULTIPLY(CUP:快Ｂ, LOCAL)
	CUP:快Ｍ = MULTIPLY(CUP:快Ｍ, LOCAL)
	CUP:快尿 = MULTIPLY(CUP:快尿, LOCAL)
	;体力の消費に影響がでる
	;PRINTFORM 苦痛による体力消費 {BASE:体力}, {DOWNBASE:体力}→
	DOWNBASE:体力 = MULTIPLY(DOWNBASE:体力, 100 + (GET_PALAMLV(CUP:苦痛) * (GET_PALAMLV(CUP:苦痛) + 1) / 2)*10)
	;PRINTFORML {DOWNBASE:体力}
ENDIF

;-------------------------------------------------
;愛液処理(欲情と情緒)
;-------------------------------------------------
;欲情の値に応じてＶ潤増加
IF TALENT:男性 == 0 && CUP:欲情 > 0 && PALAM:Ｖ潤 < 30000
	;MAX500
	LOCAL = MIN(DOWN_PALAMLV(CUP:欲情, 2), 500)
	LOCAL += MARK:淫紋*30

	IF TALENT:容易濕
		SIF TALENT:容易濕 >= 2
			LOCAL += TALENT:容易濕 * 50
		LOCAL = UP_PALAMLV(LOCAL)
	ELSEIF TALENT:不易濕
		LOCAL = DOWN_PALAMLV(LOCAL)
	ENDIF

	CUP:Ｖ潤 += LOCAL
ENDIF
;腸液分泌体質だと肛門が湿的ます。なんということでしょう
SIF TALENT:腸液分泌体質 && CUP:欲情 > 0 && PALAM:Ａ潤 < 10000
	CUP:Ａ潤 += DOWN_PALAMLV(CUP:欲情, 1)/2

IF ARGS != "試算"
	;-------------------------------------------------
	;情緒処理（恭順と欲情）
	;-------------------------------------------------
	SELECTCASE CUP:恭順 + CUP:欲情
	CASE IS >= 60000
		FLAG:情緒 += 4 + RAND:5
	CASE IS >= 30000
		FLAG:情緒 += 3 + RAND:4
	CASE IS >= 10000
		FLAG:情緒 += 2 + RAND:3
	CASE IS >= 3000
		FLAG:情緒 += 1 + RAND:3
	CASE IS >= 500
		FLAG:情緒 += 1 + RAND:2
	ENDSELECT
	;弱点突きの情緒を追加
	IF CUP:恐怖 + CUP:反感 < 500
		IF CUP:快Ｃ && TALENT:淫核 + TALENT:Ｃ性向
			FLAG:情緒 += 2
		ELSEIF CUP:快Ｖ && TALENT:淫壷 + TALENT:Ｖ性向
			FLAG:情緒 += 2
		ELSEIF CUP:快Ａ && TALENT:尻穴狂い + TALENT:Ａ性向
			FLAG:情緒 += 2
		ELSEIF CUP:快Ｂ && TALENT:淫乳 + TALENT:Ｂ性向
			FLAG:情緒 += 2
		ELSEIF CUP:快Ｍ && TALENT:蕩唇 + TALENT:Ｍ性向
			FLAG:情緒 += 2
		ELSEIF CUP:快尿 && TALENT:尿道狂 + TALENT:尿道性感
			FLAG:情緒 += 2
		ENDIF
	ENDIF
	;SOURCEをTCVAR:660～689に記録＆CUPにUP追加
	FOR LCOUNT, 0, 30
		TCVAR:(LCOUNT + 660) += SOURCE:LCOUNT
		CUP:LCOUNT += UP:LCOUNT
	NEXT
ENDIF

VARSET SOURCE

;-------------------------------------------------
;快楽のソース
;-------------------------------------------------
@SOURCE_CVABM
;CUP:恭順,欲情,屈服にかかる補正
#DIM CUP_ELSE
;部位特化素質がある場合のBOUNS
#DIM CUP_SP

CUP:快Ｃ += SOURCE:Ｃ快楽
CUP:快Ｖ += SOURCE:Ｖ快楽
CUP:快Ａ += SOURCE:Ａ快楽
CUP:快Ｂ += SOURCE:Ｂ快楽
CUP:快Ｍ += SOURCE:Ｍ快楽
CUP:快尿 += SOURCE:尿道快楽

;快楽以外は副次効果なので獲得量を抑える
CUP_ELSE = DOWN_PALAMLV(SOURCE:Ｃ快楽 + SOURCE:Ｖ快楽 + SOURCE:Ａ快楽 + SOURCE:Ｂ快楽 + SOURCE:Ｍ快楽 + SOURCE:尿道快楽)

;欲望が大きいほど、快楽により得る恭順,欲情,屈服が増える
CUP:恭順 += CUP_ELSE * (MIN(ABL:欲望, 10) + 2) * 2 / 150
CUP:欲情 += CUP_ELSE * (MIN(ABL:欲望, 10) + 2) * 2 / 100
CUP:屈服 += CUP_ELSE * (MIN(ABL:欲望, 10) + 10) * 2 / 400

;部位特化素質がある場合には充足とＶ潤にBOUNS
CUP_SP = GET_PALAMLV(SOURCE:Ｃ快楽*TALENT:淫核 + SOURCE:Ｖ快楽*TALENT:淫壷 + SOURCE:Ａ快楽*TALENT:尻穴狂い + SOURCE:Ｂ快楽*TALENT:淫乳 + SOURCE:Ｍ快楽*TALENT:蕩唇 + SOURCE:尿道快楽*TALENT:尿道狂) * 500
;中毒のソース：CUP:恭順,欲情,屈服に影響
SOURCE:充足 += CUP_SP * (MIN(ABL:欲望, 10) + 2) * 2 / 100
;阴部があるならＶ潤も上昇
IF TALENT:男性 == 0
	IF TALENT:容易濕
		CUP:Ｖ潤 += UP_PALAMLV(CUP_SP * (MIN(ABL:欲望, 10) + 2) * 2 / 300)
	ELSEIF TALENT:不易濕
		CUP:Ｖ潤 += DOWN_PALAMLV(CUP_SP * (MIN(ABL:欲望, 10) + 2) * 2 / 300)
	ELSE
		CUP:Ｖ潤 += CUP_SP * (MIN(ABL:欲望, 10) + 2) * 2 / 300
	ENDIF
ENDIF
;腸液分泌体質があるとCUP:快Ａに応じて肛門が湿的ます
SIF TALENT:腸液分泌体質 && PALAM:Ａ潤 < 10000
	CUP:Ａ潤 += DOWN_PALAMLV(SOURCE:Ａ快楽, 2)

;-------------------------------------------------
;快楽以外のソースの計算
;-------------------------------------------------
@SOURCE_NOTCVABM
;-------------------------------------------------
;情愛のソース
;-------------------------------------------------
CALL VARSET_NOTCVABM

SELECTCASE ABL:信頼
CASE 0 TO 5
	CUP:0:恭順 = MULTIPLY(SOURCE:情愛, 40 + ABL:信頼*10)
CASE 6 TO 10
	CUP:0:恭順 = MULTIPLY(SOURCE:情愛, 90 + (ABL:信頼 - 5)*5)
CASEELSE
	CUP:0:恭順 = MULTIPLY(SOURCE:情愛, 115 + (ABL:信頼 - 10)*1)
ENDSELECT

SELECTCASE ABL:欲望
CASE 0 TO 5
	CUP:0:欲情 = MULTIPLY(SOURCE:情愛, ABL:欲望*6)
CASE 6 TO 10
	CUP:0:欲情 = MULTIPLY(SOURCE:情愛, 30 + (ABL:欲望 - 5)*3)
CASEELSE
	CUP:0:欲情 = MULTIPLY(SOURCE:情愛, 45 + (ABL:欲望 - 10)*1)
ENDSELECT

CUP:恭順 += CUP:0:恭順
CUP:欲情 += CUP:0:欲情

;-------------------------------------------------
;性行動のソース
;-------------------------------------------------
SIF COND("絶頂", PLAYER) && TCVAR:干劲
	TIMES SOURCE:性行動, 1.20

CALL VARSET_NOTCVABM

SELECTCASE ABL:奉仕精神
CASE 0 TO 5
	CUP:0:習得 = MULTIPLY(SOURCE:性行動, 100 + ABL:奉仕精神*10)
CASE 6 TO 10
	CUP:0:習得 = MULTIPLY(SOURCE:性行動, 150 + (ABL:奉仕精神 - 5)*5)
CASEELSE
	CUP:0:習得 = MULTIPLY(SOURCE:性行動, 175 + (ABL:奉仕精神 - 10) )
ENDSELECT

CUP:習得 += CUP:0:習得

;-------------------------------------------------
;達成感のソース
;-------------------------------------------------
CALL VARSET_NOTCVABM

SELECTCASE ABL:奉仕精神
CASE 0 TO 5
	CUP:0:恭順 = MULTIPLY(SOURCE:達成感, 40 + ABL:奉仕精神*20)
CASE 6 TO 10
	CUP:0:恭順 = MULTIPLY(SOURCE:達成感, 140 + (ABL:奉仕精神 - 5)*10)
CASEELSE
	CUP:0:恭順 = MULTIPLY(SOURCE:達成感, 190 + (ABL:奉仕精神 - 10)*2)
ENDSELECT

CUP:恭順 += CUP:0:恭順

;-------------------------------------------------
;疼痛のソース
;-------------------------------------------------
CALL VARSET_NOTCVABM

CUP:0:苦痛 = SOURCE:疼痛

SIF TALENT:疼痛無視
	TIMES CUP:0:苦痛, 0.10

SELECTCASE ABL:信頼
CASE 0 TO 5
	CUP:0:恐怖 = MULTIPLY(SOURCE:疼痛, 80 - ABL:信頼*8)
CASE 6 TO 10
	CUP:0:恐怖 = MULTIPLY(SOURCE:疼痛, 40 - (ABL:信頼 - 5)*4)
CASEELSE
	CUP:0:恐怖 = MULTIPLY(SOURCE:疼痛, MAX(20 - (ABL:信頼 - 10)*1, 1) )
ENDSELECT

SELECTCASE ABL:信頼 + ABL:受虐属性
CASE 0 TO 5
	CUP:0:反感 = MULTIPLY(SOURCE:疼痛, 80 - (ABL:信頼 + ABL:受虐属性)*10)
CASE 6 TO 10
	CUP:0:反感 = MULTIPLY(SOURCE:疼痛, 30 - (ABL:信頼 + ABL:受虐属性 - 5)*5)
CASEELSE
	CUP:0:反感 = MULTIPLY(SOURCE:疼痛, 5 - (ABL:信頼 + ABL:受虐属性 - 10)*1)
ENDSELECT

SELECTCASE ABL:受虐属性
CASE 0 TO 5
	CUP:0:欲情 = MULTIPLY(SOURCE:疼痛, ABL:受虐属性*15)
CASE 6 TO 10
	CUP:0:欲情 = MULTIPLY(SOURCE:疼痛, 75 + (ABL:受虐属性 - 5)*5)
CASEELSE
	CUP:0:欲情 = MULTIPLY(SOURCE:疼痛, 100 + (ABL:受虐属性 - 10)*2)
ENDSELECT

;倒錯的
IF TALENT:倒錯的
	TIMES CUP:0:恐怖, 0.50
	TIMES CUP:0:反感, 0.50
	TIMES CUP:0:欲情, 2.00
ENDIF

;拘束の状態によりソースを変更
IF GETBIT(TEQUIP:拘束, 8)
	TIMES CUP:0:恐怖, 2.50
ELSEIF GETBIT(TEQUIP:拘束, 7)
	TIMES CUP:0:恐怖, 2.00
ELSEIF GETBIT(TEQUIP:拘束, 6)
	TIMES CUP:0:恐怖, 1.50
ENDIF

CUP:苦痛 += CUP:0:苦痛
CUP:恐怖 += CUP:0:恐怖
CUP:反感 += CUP:0:反感
;受虐属性があるとPALAM:欲情も上がる
CUP:欲情 += CUP:0:欲情
;屈服も上がる
CUP:屈服 += CUP:0:苦痛 + CUP:0:恐怖/2 + CUP:0:欲情
;-------------------------------------------------
;充足のソース
;-------------------------------------------------
CALL VARSET_NOTCVABM

SELECTCASE ABL:欲望
CASE 0 TO 5
	CUP:0:恭順 = MULTIPLY(SOURCE:充足, 20 + ABL:欲望*6)
CASE 6 TO 10
	CUP:0:恭順 = MULTIPLY(SOURCE:充足, 50 + (ABL:欲望 - 5)*4)
CASEELSE
	CUP:0:恭順 = MULTIPLY(SOURCE:充足, 70 + (ABL:欲望 - 10)*1)
ENDSELECT

SELECTCASE ABL:欲望
CASE 0 TO 5
	CUP:0:欲情 = MULTIPLY(SOURCE:充足, 30 + ABL:欲望*6)
CASE 6 TO 10
	CUP:0:欲情 = MULTIPLY(SOURCE:充足, 60 + (ABL:欲望 - 5)*4)
CASEELSE
	CUP:0:欲情 = MULTIPLY(SOURCE:充足, 80 + (ABL:欲望 - 10)*1)
ENDSELECT

CUP:恭順 += CUP:0:恭順
CUP:欲情 += CUP:0:欲情
CUP:屈服 += CUP:0:恭順 + CUP:0:欲情
;-------------------------------------------------
;不潔のソース
;-------------------------------------------------
CALL VARSET_NOTCVABM

CUP:0:欲情 = SOURCE:不潔

SELECTCASE MAX(ABL:信頼, ABL:欲望)
CASE 0 TO 5
	CUP:0:反感 = MULTIPLY(SOURCE:不潔, 100 - MAX(ABL:信頼, ABL:欲望)*10)
CASE 6 TO 10
	CUP:0:反感 = MULTIPLY(SOURCE:不潔, 50 - (MAX(ABL:信頼, ABL:欲望) - 5)*8)
CASEELSE
	CUP:0:反感 = MULTIPLY(SOURCE:不潔, 90 - (MAX(ABL:信頼, ABL:欲望) - 10)*1)
ENDSELECT

CUP:0:反感 = MULTIPLY(CUP:0:反感, 100 - ABL:受虐属性*10)

IF TALENT:汚臭無視
	CUP:0:反感 = 0
ELSEIF TALENT:倒錯的
	TIMES CUP:0:反感, 0.50
ENDIF

;ある程度反感が低い場合には欲情の香料になる
SELECTCASE CUP:0:反感
CASE IS < 100
	CUP:0:反感 = 0
	CUP:0:欲情 /= 10
CASE IS < 500
	CUP:0:欲情 /= 20
CASEELSE
	CUP:0:欲情 = 0
ENDSELECT

CUP:反感 += CUP:0:反感
CUP:欲情 += CUP:0:欲情

;-------------------------------------------------
;露出のソース
;-------------------------------------------------
CALL VARSET_NOTCVABM

CUP:0:恥情 = SOURCE:露出

SELECTCASE ABL:露出癖
CASE 0 TO 5
	CUP:0:欲情 = MULTIPLY(SOURCE:露出, 5 + ABL:露出癖*11)
CASE 6 TO 10
	CUP:0:欲情 = MULTIPLY(SOURCE:露出, 60 + (ABL:露出癖 - 5)*6)
CASEELSE
	CUP:0:欲情 = MULTIPLY(SOURCE:露出, 90 + (ABL:露出癖 - 10)*2)
ENDSELECT

SELECTCASE MAX(ABL:信頼, ABL:欲望)
CASE 0 TO 5
	CUP:0:反感 = MULTIPLY(SOURCE:露出, 30 - MAX(ABL:信頼, ABL:欲望)*4)
CASE 6 TO 10
	CUP:0:反感 = MULTIPLY(SOURCE:露出, 10 - (MAX(ABL:信頼, ABL:欲望) - 5)*1)
CASEELSE
	CUP:0:反感 = MULTIPLY(SOURCE:露出, 5 - (MAX(ABL:信頼, ABL:欲望) - 10)*1)
ENDSELECT

IF TALENT:倒錯的
	TIMES CUP:0:欲情, 1.50
	TIMES CUP:0:反感, 0.50
ENDIF
SIF TALENT:喜歡引人注目
	TIMES CUP:0:反感, 0.10

CUP:欲情 += DOWN_PALAMLV(CUP:0:欲情)
CUP:恥情 += CUP:0:恥情
CUP:反感 += CUP:0:反感

;-------------------------------------------------
;屈従のソース
;-------------------------------------------------
CALL VARSET_NOTCVABM

CUP:0:屈服 = SOURCE:屈従

CUP:屈服 += CUP:0:屈服

;-------------------------------------------------
;逸脱のソース
;-------------------------------------------------
CALL VARSET_NOTCVABM

CUP:0:欲情 = SOURCE:逸脱

SELECTCASE MAX(ABL:信頼, ABL:欲望)
CASE 0 TO 5
	CUP:0:反感 = MULTIPLY(SOURCE:逸脱, 80 - MAX(ABL:信頼, ABL:欲望)*10)
CASE 6 TO 10
	CUP:0:反感 = MULTIPLY(SOURCE:逸脱, 30 - (MAX(ABL:信頼, ABL:欲望) - 5)*5)
CASEELSE
	CUP:0:反感 = MULTIPLY(SOURCE:逸脱, 5 - (MAX(ABL:信頼, ABL:欲望) - 10)*1)
ENDSELECT

SIF TALENT:倒錯的 || TALENT:好奇心
	TIMES CUP:0:反感, 0.50
SIF ABL:受虐属性 >= 3
	TIMES CUP:0:反感, 0.50

IF TALENT:倒錯的 && ABL:受虐属性 >= 3
	TIMES CUP:0:欲情, 0.50
ELSEIF TALENT:倒錯的 || ABL:受虐属性 >= 3
	TIMES CUP:0:欲情, 0.20
ELSE
	CUP:0:欲情 = 0
ENDIF

CUP:欲情 += CUP:0:欲情
CUP:反感 += CUP:0:反感

;-------------------------------------------------
;恐惧のソース
;-------------------------------------------------
CUP:恐怖 += SOURCE:恐惧

;-------------------------------------------------
;Ｖ液体追加のソース
;-------------------------------------------------
CUP:Ｖ潤 += SOURCE:Ｖ液体追加

;-------------------------------------------------
;Ａ液体追加のソース
;-------------------------------------------------
CUP:Ａ潤 += SOURCE:Ａ液体追加

;-------------------------------------------------
;Ｐ液体追加のソース
;-------------------------------------------------
CUP:Ｐ潤 += SOURCE:Ｐ液体追加

;-------------------------------------------------
;恭順追加のソース
;-------------------------------------------------
CUP:恭順 += SOURCE:恭順追加

;-------------------------------------------------
;欲情追加のソース
;-------------------------------------------------
CUP:欲情 += SOURCE:欲情追加

;-------------------------------------------------
;反感追加のソース
;-------------------------------------------------
CALL VARSET_NOTCVABM

SELECTCASE ABL:信頼
CASE 0 TO 5
	CUP:0:反感 = MULTIPLY(SOURCE:反感追加, 100 - ABL:信頼*10)
CASE 6 TO 10
	CUP:0:反感 = MULTIPLY(SOURCE:反感追加, 50 - (ABL:信頼 - 5)*8)
CASEELSE
	CUP:0:反感 = MULTIPLY(SOURCE:反感追加, 10 - (ABL:信頼 - 10)*1)
ENDSELECT

CUP:反感 += CUP:0:反感

;-------------------------------------------------
;刻印取得の格子
;-------------------------------------------------
@MARK_GOT_CHECK
#DIM MEMO_MARK, 4

MEMO_MARK:0 = MARK:快楽刻印
MEMO_MARK:1 = MARK:苦痛刻印

VARSET LOCALS

;-------------------------------------------------
;快楽刻印
;-------------------------------------------------
SELECTCASE MAX(CUP:快Ｃ, CUP:快Ｖ, CUP:快Ａ, CUP:快Ｂ, CUP:快Ｍ, (CUP:快Ｃ + CUP:快Ｖ + CUP:快Ａ + CUP:快Ｂ + CUP:快Ｍ)/2)
CASE IS >= 30000
	SIF MARK:快楽刻印 <= 2
		LOCALS = 快楽刻印Lv3取得
	MARK:快楽刻印 = 3
CASE IS >= 10000
	SIF MARK:快楽刻印 <= 1
		MARK:快楽刻印 = 2
CASE IS >= 3000
	SIF MARK:快楽刻印 == 0
		MARK:快楽刻印 = 1
ENDSELECT

IF MARK:快楽刻印 > MEMO_MARK:0
	SETCOLOR DEF_COLOR("イエロー")
	PRINTFORML
	PRINTFORML 取得快楽刻印LV{MARK:快楽刻印}
	;冷静・感情缺乏の場合は快楽刻印による信頼アップは无
	IF ABL:信頼 < MARK:快楽刻印 - 1 && TALENT:冷静 == 0 && TALENT:感情缺乏 == 0
		ABL:信頼 += 1
		PRINTFORML 以及信頼变成LV{ABL:信頼}了
	ENDIF
	RESETCOLOR
ENDIF

;-------------------------------------------------
;苦痛刻印（推倒ている時には獲得しない）
;-------------------------------------------------
SELECTCASE CALCF("苦痛刻印獲得", TARGET)
CASE 1
	MARK:苦痛刻印 = 1
CASE 2
	MARK:苦痛刻印 = 2
CASE 3
	LOCALS = 苦痛刻印Lv3取得
	MARK:苦痛刻印 = 3
ENDSELECT

IF MARK:苦痛刻印 > MEMO_MARK:1
	SETCOLOR DEF_COLOR("イエロー")
	PRINTFORML
	PRINTFORML 取得苦痛刻印LV{MARK:苦痛刻印}
	RESETCOLOR
ENDIF

SIF MARK:快楽刻印 > MEMO_MARK:0 || MARK:苦痛刻印 > MEMO_MARK:1
	FORCEWAIT

;い移開かの刻印の3LVを得た時には喋る
SIF LOCALS != ""
	CALL KOJO_MESSAGE_MARKCNG, LOCALS

;-------------------------------------------------
;奉仕快楽経験、嗜虐快楽経験、羞恥快楽経験、被虐快楽経験の格子
;LOCALを計算に使い、LOCAL:1～LOCAL:4がそれぞれに対応している
;-------------------------------------------------
@EXP_GOT_CHECK
SIF TFLAG:进行性処理
	RETURN 0
VARSET LOCAL
LOCAL = CUP:快Ｃ + CUP:快Ｖ + CUP:快Ａ + CUP:快Ｂ + CUP:快Ｍ + CUP:快尿 + CUP:欲情

;奉仕快楽と嗜虐快楽の基本値
SELECTCASE LOCAL
CASE IS >= 30000
	LOCAL = 3
CASE IS >= 10000
	LOCAL = 2
CASE IS >= 3000
	LOCAL = 1
CASEELSE
	LOCAL = 0
ENDSELECT

IF TCVAR:奉仕快楽フラグ
	LOCAL:1 = LOCAL + TCVAR:奉仕快楽フラグ
	;飲尿PLAY
	SIF COND("飲尿フラグ")
		LOCAL:1 += 1
	;媚薬
	SIF TEQUIP:媚薬
		LOCAL:1 -= TEQUIP:媚薬/50
	;射精させたか
	SIF COND("絶頂", PLAYER)
		LOCAL:1 += 1
	;二足の草鞋補正
	SIF TCVAR:嗜虐快楽フラグ && ABL:奉仕精神 <= ABL:施虐属性
		LOCAL:1 -= 1
ENDIF

IF TCVAR:嗜虐快楽フラグ
	;嗜虐快楽はLOCAL:2
	LOCAL:2 = LOCAL + TCVAR:嗜虐快楽フラグ
	;媚薬
	SIF TEQUIP:媚薬
		LOCAL:2 -= TEQUIP:媚薬/50
	;女王様PLAY
	SIF TEQUIP:女王様PLAY
		LOCAL:2 += 1
	;射精させたか
	SIF COND("絶頂", PLAYER)
		LOCAL:2 += 1
	;二足の草鞋補正
	SIF TCVAR:奉仕快楽フラグ && ABL:奉仕精神 >= ABL:施虐属性
		LOCAL:2 -= 1

	;挣扎が成功したときは０
	SIF SELECTCOM == 280
		LOCAL:2 = 0
ENDIF

;PLAYERがMASTERでないと半減
IF PLAYER != MASTER
	LOCAL:1 /= 2
	LOCAL:2 /= 2
ENDIF

;羞恥快楽の格子
LOCAL = CUP:快Ｃ + CUP:快Ｖ + CUP:快Ａ + CUP:快Ｂ + CUP:快Ｍ + CUP:快尿 + CUP:欲情

SELECTCASE MIN(LOCAL, CUP:恥情)
CASE IS >= 30000
	LOCAL:3 = 3
CASE IS >= 10000
	LOCAL:3 = 2
CASE IS >= 3000
	LOCAL:3 = 1
CASEELSE
	LOCAL:3 = 0
ENDSELECT
LOCAL:3 += TCVAR:羞恥快楽フラグ

IF LOCAL:3
	;媚薬
	SIF TEQUIP:媚薬
		LOCAL:3 -= TEQUIP:媚薬/50
	;射精させたか
	SIF COND("絶頂", PLAYER)
		LOCAL:3 += 1
	SIF NOWEX:絶頂数合計
		LOCAL:3 += 1
ENDIF

;被虐快楽の格子
LOCAL = CUP:快Ｃ + CUP:快Ｖ + CUP:快Ａ + CUP:快Ｂ + CUP:快Ｍ + CUP:快尿 + CUP:欲情

SELECTCASE MIN(LOCAL, CUP:苦痛)
CASE IS >= 30000
	LOCAL:4 = 3
CASE IS >= 10000
	LOCAL:4 = 2
CASE IS >= 3000
	LOCAL:4 = 1
CASEELSE
	LOCAL:4 = 0
ENDSELECT
LOCAL:4 += TCVAR:被虐快楽フラグ

IF LOCAL:4
	;媚薬
	SIF TEQUIP:媚薬
		LOCAL:4 -= TEQUIP:媚薬/50
	;射精させたか
	SIF COND("絶頂", PLAYER)
		LOCAL:4 += 1
	SIF NOWEX:絶頂数合計
		LOCAL:4 += 1
ENDIF

;調教知識によるBOUNS
SELECTCASE CONDS("調教知識", PLAYER)
CASE "教育擅長"
	TIMES LOCAL:1, 2.00
CASE "ＳＭ知識"
	TIMES LOCAL:2, 2.00
	TIMES LOCAL:4, 2.00
CASE "道具使"
	TIMES LOCAL:3, 2.00
	TIMES LOCAL:4, 2.00
CASE "露出知識"
	TIMES LOCAL:3, 2.00
ENDSELECT

;助手の調教知識による補正
IF ASSI && PLAYER == MASTER
	SELECTCASE CONDS("調教知識", ASSI)
	;これについては常時効果を発揮
	CASE "露出知識"
		TIMES LOCAL:3, 2.00
	ENDSELECT
ENDIF

EXP:奉仕快楽経験 += MAX(LOCAL:1, 0)
EXP:嗜虐快楽経験 += MAX(LOCAL:2, 0)
EXP:羞恥快楽経験 += MAX(LOCAL:3, 0)
EXP:被虐快楽経験 += MAX(LOCAL:4, 0)

;情緒BOUNS
FLAG:情緒 += (LOCAL:1 + LOCAL:2 + LOCAL:3 + LOCAL:4)/2

;以下は獲得経験の表示
SIF TFLAG:システム文スキップ
	RETURN 0

;以下はとりあえず不顯示ことに
RETURN 0

SIF LOCAL:1 + LOCAL:2 + LOCAL:3 + LOCAL:4 > 0
	PRINTL

SIF LOCAL:1 > 0
	PRINTFORML 奉仕快楽経験+{LOCAL:1}
SIF LOCAL:2 > 0
	PRINTFORML 嗜虐快楽経験+{LOCAL:2}
SIF LOCAL:3 > 0
	PRINTFORML 羞恥快楽経験+{LOCAL:3}
SIF LOCAL:4 > 0
	PRINTFORML 被虐快楽経験+{LOCAL:4}


code:
;-------------------------------------------------
;調教指令実行前のパラメータの記録
;TCVAR:100～119を"調教指令実行前の重要パラメータの記録"用として確保してある
;-------------------------------------------------
@SAVE_PALAM_BEFORECOM
#DIM LCOUNT
FOR LCOUNT, 1, CHARANUM
	TCVAR:LCOUNT:ターン開始時好感度 = CFLAG:LCOUNT:好感度

	;射精or絶頂ゲージの開始値＆増加量
	TCVAR:LCOUNT:絶頂開始前 = BASE:LCOUNT:絶頂
	TCVAR:LCOUNT:絶頂増加 = 0

	;母乳ゲージの開始値＆増加量
	TCVAR:LCOUNT:母乳開始前 = BASE:LCOUNT:母乳
	TCVAR:LCOUNT:母乳増加 = 0

	;魂の開始値
	TCVAR:LCOUNT:魂開始前 = BASE:LCOUNT:魂

	;体力の開始値
	TCVAR:LCOUNT:体力開始前 = BASE:LCOUNT:体力
	TCVAR:LCOUNT:体力回復 = 0

	;精力の開始値＆減少量
	TCVAR:LCOUNT:精力開始前 = BASE:LCOUNT:精力
	TCVAR:LCOUNT:精力減少 = 0

	;受精確率
	TCVAR:LCOUNT:受精確率 = COND("受精確率", LCOUNT)
NEXT

;-------------------------------------------------
;PALAMの増減を表示させる（Ｐ潤は不顯示）
;対応する珠の増加分も表示するように変更
;ARGにはTARGETかASSIかTARGET:1しか入らない
;-------------------------------------------------
@NEW_UPCHECK_PALAM, ARG
#DIM LCOUNT
;このターンでの増減を行う前のPALAMの値の記録に使う
#DIM PALAM_PRE, 30

SIF ARG == 0 || ARG == MASTER
	RETURN 0

FOR LCOUNT, 0, 30
	PALAM_PRE:LCOUNT = PALAM:ARG:LCOUNT
	PALAM:ARG:LCOUNT = MIN(PALAM_LV(16), PALAM:ARG:LCOUNT + CUP:ARG:LCOUNT - CDOWN:ARG:LCOUNT)
NEXT

FOR LCOUNT, 0, 30
	SIF CUP:ARG:LCOUNT == 0 && CDOWN:ARG:LCOUNT == 0
		CONTINUE

	PRINTFORM 　%TEXT_LJ(PALAMNAME:LCOUNT, 8)% = {PALAM_PRE:LCOUNT, 8} +

	SELECTCASE GET_PALAMLV(CUP:ARG:LCOUNT)
	CASE 3
		SETCOLOR DEF_COLOR("黄色")
	CASE IS >= 4
		SETCOLOR DEF_COLOR("粉紅")
	ENDSELECT
	PRINTFORM {CUP:ARG:LCOUNT, 7}
	RESETCOLOR

	PRINTFORM  - {CDOWN:ARG:LCOUNT, 7} = {PALAM:ARG:LCOUNT, 8}

	;宝珠を獲得するようならそれを表示
	IF GET_JUEL(LCOUNT)
		PRINTFORM %PALAMNAME:LCOUNT%の珠＋
		SETCOLOR DEF_COLOR("黄色")
		PRINTFORM {GET_JUEL(LCOUNT), 5}
	ENDIF

	RESETCOLOR
	PRINTL
NEXT

;-------------------------------------------------
;表示を整形したUPCHECK
;-------------------------------------------------
@NEW_UPCHECK
#DIM LCOUNT
#DIM LCOUNT2
#DIM LCOUNT3
#DIM NUM_BASE
;10刻みで你、助手、partner
#DIM BASE_PRE, 30
#DIM BASE_AFT, 30
#DIM UP_BASE, 30
#DIM DOWN_BASE, 30
#DIM BASE_MAX, 30
#DIMS NAME_BASE, 30
#DIM MEMO_LINECOUNT
#DIM MEMO_LINECOUNT2
#DIM MEMO_LINECOUNT_PRE
#DIM IS_PRINTNAME
#DIMS NAME_PRINTED
#DIM NUM_PRINT
#DIM ACTOR
#DIM IS_COLORCHANGE
;パラメーターに上下どちらの矢印を出すか
#DIM SHOW_UP
#DIM SHOW_DOWN
#DIM SHOW_UPDOWN
#DIM MAX_LENGTH

;PLAYERの阴茎のＰ潤の処理
CALL SETFLAG, "Ｐ潤変動処理", MASTER
IF COND("３Ｐ")
	SWAP SELECTCOM, SELECTCOM:2
	CALL SETFLAG, "Ｐ潤変動処理", PLAYER:1
	SWAP SELECTCOM, SELECTCOM:2
ENDIF

VARSET BASE_PRE
VARSET BASE_AFT
VARSET UP_BASE
VARSET DOWN_BASE
VARSET BASE_MAX
VARSET NAME_BASE

;射精or絶頂
BASE_AFT:0 = BASE:MASTER:絶頂
BASE_PRE:0 = TCVAR:MASTER:絶頂開始前
UP_BASE:0 = MAX(TCVAR:MASTER:絶頂増加, 0)
DOWN_BASE:0 = BASE_PRE:0 + UP_BASE:0 - BASE_AFT:0
BASE_MAX:0 = MAXBASE:MASTER:絶頂
NAME_BASE:0 = \@ PENIS(MASTER) ? 射精 # 絶頂 \@

;精力
BASE_AFT:1 = BASE:MASTER:精力
BASE_PRE:1 = TCVAR:MASTER:精力開始前
DOWN_BASE:1 = TCVAR:MASTER:精力減少
;UP_BASE:1 = MAX(BASE_AFT:1 + UP_BASE:1 - BASE_PRE:1, 0)
UP_BASE:1 = MAX(BASE_AFT:1 + DOWN_BASE:1 - BASE_PRE:1, 0)
NAME_BASE:1 = 精力

;魂
BASE_AFT:2 = BASE:MASTER:魂
BASE_PRE:2 = TCVAR:MASTER:魂開始前
DOWN_BASE:2 = BASE_PRE:2 - BASE_AFT:2
UP_BASE:2 = MAX(BASE_AFT:2 - BASE_PRE:2, 0)
NAME_BASE:2 = 魂

;射精or絶頂（助手）
IF ASSI
	;Ｗ推倒以外は基本的に体力表示无
	IF TEQUIP:ASSI:Ｗ推倒
		BASE_AFT:10 = BASE:ASSI:体力
		BASE_PRE:10 = TCVAR:ASSI:体力開始前
		UP_BASE:10 = TCVAR:ASSI:体力回復
		DOWN_BASE:10 = DOWNBASE:ASSI:体力
		BASE_MAX:10 = MAXBASE:ASSI:体力
		NAME_BASE:10 = 体力
	ENDIF

	BASE_AFT:11 = BASE:ASSI:絶頂
	BASE_PRE:11 = TCVAR:ASSI:絶頂開始前
	UP_BASE:11 = MAX(TCVAR:ASSI:絶頂増加, 0)
	DOWN_BASE:11 = BASE_PRE:11 + UP_BASE:11 - BASE_AFT:11
	BASE_MAX:11 = MAXBASE:ASSI:絶頂
	NAME_BASE:11 = \@ PENIS(ASSI) ? 射精 # 絶頂 \@(助)

	;精力（助手）
	BASE_AFT:12 = BASE:ASSI:精力
	BASE_PRE:12 = TCVAR:ASSI:精力開始前
	DOWN_BASE:12 = TCVAR:ASSI:精力減少
	UP_BASE:12 = MAX(BASE_AFT:12 + DOWN_BASE:12 - BASE_PRE:12, 0)
	NAME_BASE:12 = 精力(助)

	;Ｗ推倒以外は基本的に母乳表示无
	IF TEQUIP:ASSI:Ｗ推倒 && TALENT:ASSI:母乳体質
		BASE_AFT:13 = BASE:ASSI:母乳
		BASE_PRE:13 = TCVAR:ASSI:母乳開始前
		UP_BASE:13 = MAX(TCVAR:ASSI:母乳増加, 0)
		DOWN_BASE:13 = BASE_PRE:13 + UP_BASE:13 - BASE_AFT:13
		BASE_MAX:13 = MAXBASE:ASSI:母乳
		NAME_BASE:13 = 母乳
	ENDIF
ENDIF

;体力（partner）
BASE_AFT:20 = BASE:体力
BASE_PRE:20 = TCVAR:体力開始前
UP_BASE:20 = TCVAR:体力回復
DOWN_BASE:20 = DOWNBASE:体力
BASE_MAX:20 = MAXBASE:体力
NAME_BASE:20 = 体力

;射精（partner）
IF PENIS(TARGET)
	BASE_AFT:21 = BASE:絶頂
	BASE_PRE:21 = TCVAR:絶頂開始前
	UP_BASE:21 = MAX(TCVAR:絶頂増加, 0)
	DOWN_BASE:21 = BASE_PRE:21 + UP_BASE:21 - BASE_AFT:21
	BASE_MAX:21 = MAXBASE:絶頂
	NAME_BASE:21 = 射精
ENDIF

;精力（partner）
BASE_AFT:22 = BASE:精力
BASE_PRE:22 = TCVAR:精力開始前
DOWN_BASE:22 = TCVAR:精力減少
UP_BASE:22 = MAX(BASE_AFT:22 + DOWN_BASE:22 - BASE_PRE:22, 0)
NAME_BASE:22 = 精力

;母乳（partner）
IF TALENT:母乳体質
	BASE_AFT:23 = BASE:母乳
	BASE_PRE:23 = TCVAR:母乳開始前
	UP_BASE:23 = MAX(TCVAR:母乳増加, 0)
	DOWN_BASE:23 = BASE_PRE:23 + UP_BASE:23 - BASE_AFT:23
	BASE_MAX:23 = MAXBASE:母乳
	NAME_BASE:23 = 母乳
ENDIF

MAX_LENGTH = 0
FOR LCOUNT, 0, 30
	MAX_LENGTH = MAX(MAX_LENGTH, STRLENS(TOSTR(BASE_MAX:LCOUNT) ), STRLENS(TOSTR(BASE_AFT:LCOUNT) ) )
NEXT

IS_PRINTNAME = 0
FOR LCOUNT, 0, 3
	SELECTCASE LCOUNT
	CASE 0
		ACTOR = MASTER
	CASE 1
		SIF ASSI == 0
			CONTINUE
		ACTOR = ASSI
	CASE 2
		ACTOR = TARGET
	ENDSELECT

	MEMO_LINECOUNT_PRE = LINECOUNT
	CALL BLANKLINE

	NAME_PRINTED = --- %CALLNAME:ACTOR%%BL(1)%
	;名前の横に好感度も出す
	IF ACTOR != MASTER
		NAME_PRINTED += @"好感度:{CFLAG:ACTOR:好感度} "
		SELECTCASE FAV_TGAIN(ACTOR)
		CASE IS > 0
			NAME_PRINTED += @"_粉紅_↑{ABS(FAV_TGAIN(ACTOR) )}_ "
		CASE IS < 0
			NAME_PRINTED += @"_青_↓{ABS(FAV_TGAIN(ACTOR) )}_ "
		ENDSELECT
	ENDIF
	CALL DRAWLINES, NAME_PRINTED
	SIF ACTOR == TARGET && IS_PRINTNAME == 0 && FAV_TGAIN(ACTOR) == 0
		CLEARLINE 1

	MEMO_LINECOUNT = LINECOUNT

	;BASEの動き
	FOR LCOUNT2, 0, 10
		NUM_BASE = LCOUNT2 + LCOUNT*10
		SIF NAME_BASE:NUM_BASE == ""
			CONTINUE
		SIF UP_BASE:NUM_BASE == 0 && DOWN_BASE:NUM_BASE == 0
			CONTINUE

		IS_COLORCHANGE = 0
		SHOW_UP = 0
		SHOW_DOWN = 0
		SHOW_UPDOWN = 0

		PRINTFORM 　%TEXT_LJ(NAME_BASE:NUM_BASE, 8)% =

		SELECTCASE NAME_BASE:NUM_BASE
		;魂は小数点表示する
		CASE "魂"
			PRINTFORM %TEXT_RJ(TEXTS("0.01", BASE_PRE:NUM_BASE), 8)% +
		CASEELSE
			PRINTFORM {BASE_PRE:NUM_BASE, 8} +
		ENDSELECT

		;射精の時などは色を変える
		SELECTCASE EXTSTR(NAME_BASE:NUM_BASE, "", "(")
		CASE "絶頂", "射精", "母乳"
			SELECTCASE UP_BASE:NUM_BASE
			CASE IS >= BASE_MAX:NUM_BASE*4/5
				SETCOLOR DEF_COLOR("粉紅")
				IS_COLORCHANGE = 1
			CASE IS >= 1
				SETCOLOR DEF_COLOR("黄色")
				IS_COLORCHANGE = 1
			ENDSELECT
		ENDSELECT

		SELECTCASE NAME_BASE:NUM_BASE
		;魂は小数点表示する
		CASE "魂"
			PRINTFORM %TEXT_RJ(TEXTS("0.01", UP_BASE:NUM_BASE), 7)%
		CASEELSE
			PRINTFORM {UP_BASE:NUM_BASE, 7}
		ENDSELECT

		RESETCOLOR
		PRINTFORM -

		;数値が動く際は色を変える
		SELECTCASE DOWN_BASE:NUM_BASE
		CASE IS >= BASE_MAX:NUM_BASE*4/5
			SIF IS_COLORCHANGE == 0
				SETCOLOR DEF_COLOR("粉紅")
		CASE IS >= 1
			SIF IS_COLORCHANGE == 0
				SETCOLOR DEF_COLOR("黄色")
		ENDSELECT

		SELECTCASE NAME_BASE:NUM_BASE
		;魂は小数点表示する
		CASE "魂"
			PRINTFORM %TEXT_RJ(TEXTS("0.01", DOWN_BASE:NUM_BASE), 7)%
			RESETCOLOR
			PRINTFORM = %TEXT_RJ(TEXTS("0.01", BASE_AFT:NUM_BASE), 8)%　%TEXT_RJ(NAME_BASE:NUM_BASE, 8)%
		CASEELSE
			PRINTFORM {DOWN_BASE:NUM_BASE, 7}
			RESETCOLOR
			PRINTFORM = {BASE_AFT:NUM_BASE, 8}　%TEXT_RJ(NAME_BASE:NUM_BASE, 8)%
		ENDSELECT

		SELECTCASE EXTSTR(NAME_BASE:NUM_BASE, "", "(")
		CASE "絶頂"
			CALL PRINT_BAR, "溜めゲージ", BASE:ACTOR:絶頂, MAXBASE:ACTOR:絶頂, 15
			PRINTFORM (%TEXT_RJ(TOSTR(BASE:ACTOR:絶頂), MAX_LENGTH)%/%TEXT_RJ(TOSTR(MAXBASE:ACTOR:絶頂), MAX_LENGTH)%)
			SHOW_UP = 1
		CASE "射精"
			CALL PRINT_BAR, "溜めゲージ", BASE:ACTOR:絶頂, MAXBASE:ACTOR:絶頂, 15
			PRINTFORM (%TEXT_RJ(TOSTR(BASE:ACTOR:絶頂), MAX_LENGTH)%/%TEXT_RJ(TOSTR(MAXBASE:ACTOR:絶頂), MAX_LENGTH)%)
			SHOW_UP = 1
		CASE "精力"
			CALL PRINT_BAR, "減少ゲージ", BASE:ACTOR:精力, MAXBASE:ACTOR:精力, 15
			PRINTFORM (%TEXT_RJ(TOSTR(BASE:ACTOR:精力), MAX_LENGTH)%/%TEXT_RJ(TOSTR(MAXBASE:ACTOR:精力), MAX_LENGTH)%)
			SHOW_UPDOWN = 1
		CASE "魂"
			CALL PRINT_BAR, "減少ゲージ", BASE:ACTOR:魂, MAXBASE:ACTOR:魂, 15
			PRINTFORM (%TEXT_RJ(TEXTS("0.01", BASE:ACTOR:魂), MAX_LENGTH)%/%TEXT_RJ(TEXTS("0.01", MAXBASE:ACTOR:魂), MAX_LENGTH)%)
			SHOW_UPDOWN = 1
		CASE "体力"
			CALL PRINT_BAR, "減少ゲージ", BASE:ACTOR:体力, MAXBASE:ACTOR:体力, 15
			PRINTFORM (%TEXT_RJ(TOSTR(BASE:ACTOR:体力), MAX_LENGTH)%/%TEXT_RJ(TOSTR(MAXBASE:ACTOR:体力), MAX_LENGTH)%)
			SHOW_UPDOWN = 1
		CASE "母乳"
			CALL PRINT_BAR, "溜めゲージ", BASE:ACTOR:母乳, MAXBASE:ACTOR:母乳, 15
			PRINTFORM (%TEXT_RJ(TOSTR(BASE:ACTOR:母乳), MAX_LENGTH)%/%TEXT_RJ(TOSTR(MAXBASE:ACTOR:母乳), MAX_LENGTH)%)
			SHOW_UP = 1
		ENDSELECT

		IF SHOW_UP && UP_BASE:NUM_BASE > 0
			CALL PRINT_STR, @"_粉紅_ ↑{UP_BASE:NUM_BASE}_ "
		ELSEIF SHOW_DOWN && DOWN_BASE:NUM_BASE > 0
			CALL PRINT_STR, @"_青_ ↓{DOWN_BASE:NUM_BASE}_ "

		ELSEIF SHOW_UPDOWN && UP_BASE:NUM_BASE > DOWN_BASE:NUM_BASE
			CALL PRINT_STR, @"_粉紅_ ↑{UP_BASE:NUM_BASE - DOWN_BASE:NUM_BASE}_ "
		ELSEIF SHOW_UPDOWN && DOWN_BASE:NUM_BASE > UP_BASE:NUM_BASE
			CALL PRINT_STR, @"_青_ ↓{DOWN_BASE:NUM_BASE - UP_BASE:NUM_BASE}_ "
		ENDIF

		;追加の補足
		SELECTCASE EXTSTR(NAME_BASE:NUM_BASE, "", "(")
		CASE "絶頂"

		CASE "射精"
			CALL PRINT_STR, @"黄色_ %TEXTS("射精詳細", ACTOR)%"
		CASE "精力"

		CASE "魂"

		CASE "体力"
			SIF COND("疲労", ACTOR)
				CALL PRINT_STR, "青_ ★疲労困憊★"
			SHOW_UPDOWN = 1
		CASE "母乳"

		ENDSELECT

		PRINTL
	NEXT

	SIF LINECOUNT > MEMO_LINECOUNT
		CALL BLANKLINE

	;獲得パラの表示
	CALL NEW_UPCHECK_PALAM, ACTOR

	SIF LINECOUNT > MEMO_LINECOUNT
		CALL BLANKLINE

	;獲得経験の羅列
	NUM_PRINT = 0
	FOR LCOUNT3, 0, 100
		;ここではもともと不顯示素質かを判定
		SELECTCASE EXPNAME:LCOUNT3
		CASE "", "助手経験", "経験値", "强制绝顶回数", "Ｈ回数", "特別経験", "情人旅館經驗"
			CONTINUE
		ENDSELECT

		SIF EXP_TGAIN(EXPNAME:LCOUNT3, ACTOR) == 0
			CONTINUE

		;名称が７文字以上の物は最後の"経験"をカットする
		IF STRLENS(EXPNAME:LCOUNT3) >= 13
			PRINTFORM %TEXT_LJ(@"　%SUBSTRING(EXPNAME:LCOUNT3, 0, STRLENS(EXPNAME:LCOUNT3) - 4)%+{EXP_TGAIN(EXPNAME:LCOUNT3, ACTOR)}", 17)%
		ELSE
			PRINTFORM %TEXT_LJ(@"　%EXPNAME:LCOUNT3%+{EXP_TGAIN(EXPNAME:LCOUNT3, ACTOR)}", 17)%
		ENDIF
		NUM_PRINT += 1
		IF NUM_PRINT == 7
			PRINTL
			NUM_PRINT = 0
		ENDIF
	NEXT
	SIF NUM_PRINT
		PRINTL

	SIF LINECOUNT > MEMO_LINECOUNT
		CALL BLANKLINE

	;表示が無い場合は名前を消す
	IF LINECOUNT == MEMO_LINECOUNT
		CLEARLINE LINECOUNT - MEMO_LINECOUNT_PRE
	ELSE
		IS_PRINTNAME = 1
	ENDIF
NEXT

CALL BLANKLINE

IF BASE:PLAYER:精力 <= 0 && ASSIPLAY && STATE("撃沈", ASSI)
	PRINTFORMW ★調教者を%CALLNAME:MASTER%に交代しました。★
	TEQUIP:推倒 = 0
	SIF TARGET:1 == ASSI
		CALL SETFLAG, "Ｗ推倒解除"
	CALL REMOVE_STATE, ASSI, "恍惚"
	CALL SETFLAG, "調教者交代", 1
ENDIF


code:
@SHOW_USERCOM
#DIM LCOUNT
#DIM MEMO_LINECOUNT
;存在している調教のみを数えていって何番目か
#DIM NUM_TRAIN
#DIM NEXT_LINE
#DIM NUM_COLUMN
#DIMS SHOW_FILTER
#DIMS COM_NAMES
#DIMS COM_NAMES_HIDDEN

REDRAW 0
;主導権が無いフラグを一時的に消去
CLEARBIT FLAG:状況判定, 11

;角色独自のお願いを選ばせたい場合の処理
TFLAG:取引可能 = 0
TRYCALLFORM WISH_K{NO:TARGET}_ADDSELECT

;300番台は各種过滤器
;PRINTFORM 过滤器：
VARSET SHOW_FILTER
SIF CONFIG("Ｖ調教过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "Ｖ系_300/"

SIF CONFIG("Ａ調教过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "Ａ系_301/"

SIF CONFIG("尿道調教过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "尿道_302/"

SIF CONFIG("逆挿入过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "逆挿入_303/"

SIF CONFIG("準備不足过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "準備不足_304/"

SIF CONFIG("道具調教过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "道具_305/"

SIF CONFIG("ハード調教过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "重口指令_306/"

SIF CONFIG("消耗品过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "消耗品_307/"

;VARSET SHOW_FILTER
SIF CONFIG("実行判定过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "実行判定_308/"

;PRINTFORM %BL(17)%
;CALL PRINT_LIST, SHOW_FILTER
;PRINTL

SIF CONFIG("極厚避孕套")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "極厚避孕套_309/"

SIF CONFIG("立位")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "立位挿入_310/"

SIF CONFIG("脱掉胖次过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "脱掉胖次_316/"
SIF CONFIG("脱掉鞋子过滤器")
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "脱掉鞋子_315/"

IF TALENT:MASTER:豊穣
	SIF CONFIG("豊穣过滤器")
		SHOW_FILTER += "黄色/"
	SHOW_FILTER += "豊穣_317/"
ENDIF

SHOW_FILTER += "重置避孕套_350/"
SIF TEQUIP:手下留情
	SHOW_FILTER += "黄色/"
SHOW_FILTER += "手下留情_351/"

CALL PRINT_LIST, SHOW_FILTER
PRINTL
PRINTL

IF FLAG:COM_ABLEの一括OFF || CONFIG("指令过滤器")
	FLAG:COM_ABLEの一括OFF = 0

	NUM_TRAIN = -1

	NEXT_LINE = 0
	NUM_COLUMN = 4

	;直接選択できる指令は499番までだが、現状は300までで十分すぎる
	FOR LCOUNT, 0, 300
		SIF STRLENS(TRAINNAME:LCOUNT) == 0
			CONTINUE

		NUM_TRAIN += 1

		IF CONFIG("指令过滤器：全指令表示") == 0
			TRYCALLFORM COM_ABLE{LCOUNT}
			IF RESULT == 0
				IF CONFIG("実行判定过滤器")
					TFLAG:実行値BOUNS = 1000
					TRYCALLFORM COM_ABLE{LCOUNT}
					IF RESULT == 0
						TFLAG:実行値BOUNS = 0
						CONTINUE
					ENDIF
				ELSE
					CONTINUE
				ENDIF
			ENDIF
		ENDIF

		RESETCOLOR
		SIF FIRSTCOM(LCOUNT) == 0
			SETCOLOR DEF_COLOR("明灰色")

		IF CONFIG("指令过滤器") == 0
			;指令表示过滤器
			SELECTCASE DITEMTYPE:0:LCOUNT
			;禁止設定
			CASE 2
				CONTINUE
			ENDSELECT
		ELSE
		 	SELECTCASE TRAINNAME:LCOUNT
			CASE "～予備～"
				CONTINUE
			ENDSELECT
		ENDIF

		IF CONFIG("指令过滤器") == 0
			;指令名が通常と違う場合には色を変える(推倒状態での基本指令は色を変えない)
			SIF TRAIN_NAME_SELECT(LCOUNT) != TRAIN_NAME_STANDARD(LCOUNT)
				SETCOLOR DEF_COLOR("爱心粉紅")

			;PLAYを終わらせられる時には色を変える
			SELECTCASE LCOUNT
			;潤滑不足の際には色を変える
			CASE 60 TO 69
				SIF COND("Ｖ潤充分") == 0
					SETCOLOR DEF_COLOR("青")
			CASE 70 TO 79
				SIF COND("Ａ潤充分") == 0
					SETCOLOR DEF_COLOR("青")
			CASE 31
				SIF TEQUIP:振動棒
					SETCOLOR DEF_COLOR("黄色")
			CASE 33
				SIF TEQUIP:肛用振動棒
					SETCOLOR DEF_COLOR("黄色")
			CASE 99
				SIF TEQUIP:六九式
					SETCOLOR DEF_COLOR("黄色")
			CASE 132
				SIF TEQUIP:鼻钩
					SETCOLOR DEF_COLOR("黄色")
			CASE 133
				SIF TEQUIP:眼罩
					SETCOLOR DEF_COLOR("黄色")
			CASE 134
				SIF TEQUIP:拘束
					SETCOLOR DEF_COLOR("黄色")
			CASE 135
				SIF TEQUIP:口枷
					SETCOLOR DEF_COLOR("黄色")
			CASE 136
				SIF COND("肛門栓")
					SETCOLOR DEF_COLOR("黄色")
			CASE 149
				SIF TEQUIP:导管
					SETCOLOR DEF_COLOR("黄色")
			CASE 152
				SIF TEQUIP:尿道振動棒
					SETCOLOR DEF_COLOR("黄色")
			CASE 170
				SIF TEQUIP:攝像機
					SETCOLOR DEF_COLOR("黄色")
			CASE 171
				SIF TEQUIP:野外PLAY
					SETCOLOR DEF_COLOR("黄色")
			CASE 172
				SIF TEQUIP:浴室PLAY
					SETCOLOR DEF_COLOR("黄色")
			CASE 173
				SIF TEQUIP:新妻PLAY
					SETCOLOR DEF_COLOR("黄色")
			CASE 174
				SIF TEQUIP:室内露出PLAY
					SETCOLOR DEF_COLOR("黄色")
			;消耗品
			CASE 260 TO 279
				;色が異なる場合には消耗品过滤器がONでも例外的に表示
				SIF CONFIG("消耗品过滤器") && GETCOLOR() != DEF_COLOR("黄色") && GETCOLOR() != DEF_COLOR("爱心粉紅")
					CONTINUE
			CASEELSE
				;選んでも時間が進まない指令は色を変える
				SIF NOTTIME_PLAY(LCOUNT)
					SETCOLOR DEF_COLOR("緑")
			ENDSELECT
		ELSE
			SELECTCASE DITEMTYPE:0:LCOUNT
			;通常状態
			CASE 0
				SELECTCASE LCOUNT
				CASE 0 TO 9, 60, 61, 65, 71, 75, 80 TO 95, 98, 99, 230 TO 289
					SETCOLOR DEF_COLOR("暗黄色")
				CASEELSE
					RESETCOLOR
				ENDSELECT
			;禁止設定
			CASE 2
				SETCOLOR DEF_COLOR("緑")
			ENDSELECT
		ENDIF

		;実行判定过滤器ON
		IF TFLAG:実行値BOUNS
			SETCOLOR DEF_COLOR("水色")
			TFLAG:実行値BOUNS = 0
		ENDIF

		PRINTFORMC %TRAIN_NAME_SELECT(LCOUNT)%\@ CHECK_COM("喜欢的体位", LCOUNT) ? ☆ # \@[{NUM_TRAIN, 3}]

		NEXT_LINE += 1

		SIF NEXT_LINE % NUM_COLUMN == 0
			PRINTL
	NEXT
	SIF NEXT_LINE % NUM_COLUMN
		PRINTL
ENDIF
RESETCOLOR

CALL SETFLAG, "助手相手の恋慕外し終了"

;-------------------------------------------------
;特殊な指令
;-------------------------------------------------
PRINTL

;HARDで被逆推ているなら、主導権が無いフラグをセット
;IF CONFIG("ＨＡＲＤ") && TEQUIP:推倒
;	SETBIT FLAG:状況判定, 11
;ELSE
;	CLEARBIT FLAG:状況判定, 11
;ENDIF

NEXT_LINE = 0
VARSET COM_NAMES
VARSET COM_NAMES_HIDDEN

IF CONFIG("指令过滤器") == 0

	PRINTC 能力表示[400]

	IF TEQUIP:推倒
		PRINTC 污渍显示[410]
	ELSE
		PRINTC 污渍显示＆管理[410]

		SIF CHECK_CLO("胖次露出") == 0
			SETCOLOR DEF_COLOR("灰色")
		PRINTFORMC 請求脫下%PANTIES(TARGET, "胖次")%[420]
		RESETCOLOR

		SIF CHECK_CLO("裸体")
			SETCOLOR DEF_COLOR("灰色")
		PRINTFORMC 变成裸体[430]
		RESETCOLOR
	ENDIF

	PRINTL
	IF COND("魂の取引可能")
		PRINTFORMC 做交易[440]
	ELSEIF COND("天使の取引可能") || TFLAG:取引可能
		PRINTFORMC 拜托了[440]
	ELSE
		SETCOLOR DEF_COLOR("灰色")
		PRINTFORMC 拜托了[440]
	ENDIF
	RESETCOLOR

	;助手とできるのは悪魔の取引のみ
	SIF ASSI == 0 || STATE("撃沈", ASSI) || (COND("悪魔の取引可能", ASSI) == 0 && COND("天使の取引可能", ASSI) == 0)
		SETCOLOR DEF_COLOR("灰色")
	PRINTFORMC 和%TEXTS("助手の名称")%做交易[450]
	RESETCOLOR

	SIF CHECK_EXCHANGE("調教者") == 0
		SETCOLOR DEF_COLOR("灰色")
	IF PLAYER == MASTER
		;PRINTFORMC %CALLNAME:ASSI%⇔你[460]
		PRINTFORMC 和%TEXTS("助手の名称")%交换[460]
	ELSE
		PRINTFORMC 和%CALLNAME:MASTER%交换[460]
	ENDIF
	RESETCOLOR

	SIF CHECK_EXCHANGE("partner") == 0
		SETCOLOR DEF_COLOR("灰色")
	IF PLAYER == MASTER
		IF TEQUIP:Ｗ推倒
			PRINTFORMC 交换主導权[470]
		ELSEIF TEQUIP:推倒
			PRINTFORMC 和%TEXTS("助手の名称")%交换[470]
		ELSEIF ASSI && TARGET == ASSI:1
			PRINTFORMC 享受一下%TEXTS("対象の名称")%[470]
		ELSE
			PRINTFORMC 享受一下%TEXTS("助手の名称")%[470]
		ENDIF
	ELSE
		PRINTFORMC 逆転立場[470]
	ENDIF
	RESETCOLOR

	PRINTC Config[555]
	PRINTC 指令过滤器[888]
	PRINTC
	PRINTC 结束调教[999]
ELSE
	PRINTC Config[555]

	PRINTC 指令过滤器終了[888]

	IF CONFIG("指令过滤器：全指令表示")
		PRINTC 隐藏无法実行的指令[890]
	ELSE
		PRINTC 指令全显示[890]
	ENDIF
ENDIF

PRINTL

SIF MAX(PREVCOM, PREVCOM:2) >= 0 && CONFIG("指令过滤器") == 0
	CALL SHOW_PREVCOM

MEMO_LINECOUNT = LINECOUNT
;選んだ指令次第で軽い説明表示。原則１行
SELECTCASE TFLAG:選択番号
CASE 300
	SIF CONFIG("Ｖ調教过滤器")
		PRINTFORML  Ｖ系指令过滤器ON。对方是処女時、使用膣的行為均実行不可
CASE 301
	SIF CONFIG("Ａ調教过滤器")
		PRINTFORML  Ａ系指令过滤器ON。使用对方的菊穴的行為均実行不可
CASE 302
	SIF CONFIG("尿道調教过滤器")
		PRINTFORML  尿道指令过滤器ON。使用对方的尿道的行為均実行不可
CASE 303
	SIF CONFIG("逆挿入过滤器")
		PRINTFORML  逆挿入指令过滤器ON。挿入主人公的行為均実行不可
CASE 304
	SIF CONFIG("準備不足过滤器")
		PRINTFORML  準備不足过滤器ON。潤滑不足時挿入行為均実行不可
CASE 305
	SIF CONFIG("道具調教过滤器")
		PRINTFORML  道具指令过滤器ON。使用振动棒等行為均実行不可
CASE 306
	SIF CONFIG("ハード調教过滤器")
		PRINTFORML  硬核系指令过滤器ON。使对方負担过大的行為均実行不可
CASE 307
	SIF CONFIG("消耗品过滤器")
		PRINTFORML  消耗品过滤器ON。隐藏使用润滑液等的指令
CASE 308
	SIF CONFIG("実行判定过滤器")
		CALL PRINT_STR, "実行判定过滤器ON。実行値不足的指令会以_水色_ 水色 _表示、選択的话会显示現在値与要求値_L_"
CASE 309
	SIF CONFIG("極厚避孕套")
		PRINTFORML  極厚避孕套过滤器ON。带着極厚避孕套時的挿入行為会使受到的快感激減
CASE 310
	SIF CONFIG("立位")
		PRINTFORML  立位模式ON。性交系命令会变化至立位(所有的插入状态都会被重置)

CASE 315
	SIF CONFIG("脱掉鞋子过滤器")
		CALL PRINT_STR, "脱靴过滤器ON。当是ON時、屋内Ｈ開始時会脱掉靴子_L_"
CASE 316
	SIF CONFIG("脱掉胖次过滤器")
		CALL PRINT_STR, "脱掉胖次过滤器ON。这个ON的時候与H開始的時候会把妨碍阴部露出的衣装脱掉_L_"
CASE 317
	IF CONFIG("豊穣过滤器")
		CALL PRINT_STR, "豊穣ON。对着胸部射精or尽情揉就会变大了_L_"
	ELSE
		CALL PRINT_STR, "豊穣OFF。胸部停止了无止尽的扩大_L_"
	ENDIF

CASE 350
	PRINTFORML 今回的挿入行為中、重置对安全套的选择

CASE 351
	IF TEQUIP:手下留情
		PRINTFORML %CALLNAME:PLAYER%决定让%CALLNAME:TARGET%先加忍耐（积蓄快感）！
	;	CALL PRINT_STRL, @"二人の技巧差を考慮すると、_黄色_絶頂数の合計が{CALCF("寸止め可能絶頂数") + 1}になる_までは寸止めする事が出来そうだ"
	;	CALL PRINT_STRL, "ただし、_黄色_強すぎる快感が与えられた_or_黄色_限界を超えて快感が蓄積された_ら絶頂を許してしまうかもしれない"
	ELSE
		PRINTFORML %CALLNAME:PLAYER%停止了对%CALLNAME:TARGET%的手下留情
	ENDIF

CASE 888
	SIF CONFIG("指令过滤器")
		CALL PRINT_STR, " 選択的指令_緑_禁止_（_暗黄色_这个颜色_的表示无法禁止。必须要表示出来)_L_"
CASE 890
	IF CONFIG("指令过滤器：全指令表示")
		PRINTFORML  [{TARGET, 2}]%CALLNAME:TARGET%現在无法実行的行為全部显示出来
	ELSE
		PRINTFORML  [{TARGET, 2}]%CALLNAME:TARGET%現在能够実行的行為全部表示出来
	ENDIF
ENDSELECT

SIF MEMO_LINECOUNT == LINECOUNT
	PRINTL

@USERCOM
#DIM CHOICE
#DIM MEMO_LINECOUNT

CHOICE = RESULT

CLEARBIT FLAG:状況判定, 11

TFLAG:選択番号 = CHOICE

;指令選択
IF CHOICE >= 0 && CHOICE <= 299
	IF CONFIG("指令过滤器") == 0
		CALL NO_SELECTCOM, CHOICE

		SIF RESULT == 999
			RETURN 0

		SELECTCOM = RESULT
		TRYCALLFORM COM_ABLE{SELECTCOM}

		IF RESULT == 0
			IF CONFIG("実行判定过滤器")
				TFLAG:実行値BOUNS = 1000
				TRYCALLFORM COM_ABLE{SELECTCOM}
				TFLAG:実行値BOUNS = 0
				SIF RESULT == 0
					RETURN 0
			ELSE
				RETURN 0
			ENDIF
		ENDIF

		;主導権が無いフラグを解除
		CLEARBIT FLAG:状況判定, 11

		REDRAW 1

		DOTRAIN SELECTCOM
	ELSE
		CALL NO_SELECTCOM, CHOICE
		CHOICE = RESULT

		SELECTCASE CHOICE
		CASE 999
			CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
			RETURN 0
		;禁止不可指令
		CASE 0 TO 9, 60, 61, 65, 71, 75, 80 TO 95, 98, 99, 230 TO 289
			CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
			RETURN 0
		CASEELSE
			IF STRLENS(TRAINNAME:CHOICE) == 0
				CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
				RETURN 0
			ENDIF

		 	SELECTCASE TRAINNAME:CHOICE
			CASE "～予備～"
				CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
				RETURN 0
			ENDSELECT
		ENDSELECT

		;値が２で禁止
		INVERTBIT DITEMTYPE:0:CHOICE, 1
	ENDIF
;各種过滤器のＯＮＯＦＦ
ELSEIF CHOICE >= 300 && CHOICE <= 351
	SELECTCASE CHOICE
	;立位モード
	CASE 310
		INVERTBIT FLAG:調教过滤器, CHOICE - 300
		CALL RESET_INSERT, TARGET, PLAYER
	CASE 300 TO 310
		INVERTBIT FLAG:調教过滤器, CHOICE - 300
	;脱掉鞋子
	CASE 315
		INVERTBIT FLAG:調教过滤器, CHOICE - 300
		SIF GETBIT(FLAG:調教过滤器, 15) && PLACE("野外") == 0
			CALL SET_SHOES, ""
	;脱掉胖次
	CASE 316
		INVERTBIT FLAG:調教过滤器, CHOICE - 300
		SIF GETBIT(FLAG:調教过滤器, 16) && CHECK_CLO("外套露出") && CHECK_CLO("Ｖ露出可") == 0
			CALL SET_OUTER, ""
	CASE 317
		SIF TALENT:MASTER:豊穣
			INVERTBIT FLAG:調教过滤器, CHOICE - 300
	CASE 350
		CALL SETFLAG, "初始化避孕套交渉"
	CASE 351
		INVERTBIT TEQUIP:手下留情, 0
	ENDSELECT

	CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録

	RETURN 1
;Config[555]
ELSEIF CHOICE == 555
	CALL SET_CONFIGURE
;指令过滤器へ[888]
ELSEIF CHOICE == 888
	INVERTBIT FLAG:調教过滤器, 20
;調教終了[999]
ELSEIF CHOICE == 999
	IF COND("調教終了可能")
		REDRAW 1
		BEGIN AFTERTRAIN
	ELSE
		CALL KOJO_EVENT, "調教終了不可能"
		PRINTFORMW %CALLNAME:TARGET%好像没有満足的様子……
	ENDIF
ELSEIF CONFIG("指令过滤器")
	;調教指令全显示[890]
	SIF CHOICE == 890
		INVERTBIT FLAG:調教过滤器, 30
ELSE
	;能力表示[400]
	IF CHOICE == 400
		CALL NEW_PRINT_STATE, TARGET, "通常"
	;污渍显示[410]
	ELSEIF CHOICE == 410
		CALL STAIN_INFO
	ELSEIF CHOICE == 420 && CHECK_CLO("胖次露出")
		CALL EVENT_DATUI, "胖次"
	ELSEIF CHOICE == 430 && CHECK_CLO("裸体") == 0
		CALL EVENT_DATUI, "裸体"
		CALL SETFLAG, "全裸化", TARGET
	;取引
	ELSEIF CHOICE == 440
		IF COND("魂の取引可能") || COND("天使の取引可能") || TFLAG:取引可能
			CFLAG:Ｈ最中の取引 = TARGET
			CALL EVENT_WISH
			CFLAG:Ｈ最中の取引 = 0
		ELSE
			CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
		ENDIF
	ELSEIF CHOICE == 450
		IF ASSI && STATE("撃沈", ASSI) == 0 && (COND("悪魔の取引可能", ASSI) || COND("天使の取引可能", ASSI))
			CFLAG:Ｈ最中の取引 = TARGET
			SWAP TARGET, TARGET:1
			CALL EVENT_WISH
			SWAP TARGET, TARGET:1
			CFLAG:Ｈ最中の取引 = 0
		ELSE
			CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
		ENDIF
	ELSEIF CHOICE == 460
		IF CHECK_EXCHANGE("調教者")
			CALL SETFLAG, "調教者交代"
			IF FLAG:助手を調教した == 0
				MEMO_LINECOUNT = LINECOUNT
				CALL KOJO_EVENT, "調教者交代"
				SIF LINECOUNT == MEMO_LINECOUNT
					CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
			ENDIF
		ELSEIF ASSI
			IF COND("只和你Ｈ") || COND("只和你Ｈ", ASSI)
				CALL PRINT_STRW, @"イエロー_更改不能进行因为其中一个的[ＮＴＲ禁止]開関是ON"
			ELSEIF TALENT:贞操重视 + TALENT:ASSI:贞操重视 && COND("相性◎", ASSI) == 0
				CALL PRINT_STRW, @"イエロー_其中一个持有[贞操重视]的場合需要[相性：◎]才可以进行"
			ELSEIF COND("相性○", ASSI) == 0 && ABL:信頼 < 5 && COND("助手可能") == 0
				CALL PRINT_STRW, @"イエロー_%CALLNAME:TARGET%需要[相性：〇]or[信頼LV5]or[%TEXTS("助手の名称")%可能]"
			ELSEIF TEQUIP:PLAYER:推倒 || TEQUIP:推倒 || TEQUIP:新妻PLAY || TEQUIP:攝像機
				CALL PRINT_STRW, @"イエロー_在[拘束中]、[撮影中]、単独的[推倒中]这几种状态下是不能交替的"
			ENDIF
		ELSE
			CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
		ENDIF
	;TARGETとTARGET:1(いないならASSI)を交換[470]
	ELSEIF CHOICE == 470
		IF CHECK_EXCHANGE("partner")
			CALL SETFLAG, "対象交代"
			IF FLAG:助手を調教した == 0
				MEMO_LINECOUNT = LINECOUNT
				SIF TEQUIP:Ｗ推倒 == 0
					CALL KOJO_EVENT, "対象交代"
				SIF LINECOUNT == MEMO_LINECOUNT
					CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
			ENDIF
		ELSEIF ASSI
			IF COND("只和你Ｈ") || COND("只和你Ｈ", ASSI)
				CALL PRINT_STRW, @"イエロー_更改不能进行因为其中一个的[ＮＴＲ禁止]開関是ON"
			ELSEIF COND("助手可能") == 0
				CALL PRINT_STRW, @"イエロー_%CALLNAME:TARGET%需要[%TEXTS("助手の名称")%可能]才可进行此操作"
			ELSEIF (TEQUIP:推倒 && TEQUIP:Ｗ推倒 == 0) || TEQUIP:PLAYER:推倒 || TEQUIP:拘束 || TEQUIP:攝像機
				CALL PRINT_STRW, @"イエロー_在[拘束中]、[撮影中]、単独的[推倒中]这几种状态下是不能交替的"
			ENDIF
		ELSE
			CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録
		ENDIF
	ENDIF
ENDIF

SIF CONFIG("指令过滤器")
	CLEARLINE LINECOUNT - TFLAG:LINECOUNT記録

;ARGSには"調教者"or"partner"が入る
@CHECK_EXCHANGE(ARGS)
#FUNCTION

SELECTCASE ARGS
;PLAYERとPLAYER:1を交代させる。（調教開始時にPLAYER = MASTER、PLAYER:1 = ASSIとなっている）
CASE "調教者"
	SIF PLAYER <= 0 || PLAYER:1 <= 0
		RETURNF 0
	SIF TEQUIP:PLAYER:推倒 || TEQUIP:推倒 || TEQUIP:新妻PLAY || TEQUIP:攝像機
		RETURNF 0
	SIF COND("只和你Ｈ") || COND("只和你Ｈ", ASSI)
		RETURNF 0
	;撃沈していたら交代できない
	SIF STATE("撃沈", PLAYER) || STATE("撃沈", PLAYER:1)
		RETURNF 0
	;仲が良くないとダメ
	SIF COND("相性○", ASSI) == 0 && ABL:信頼 < 5 && COND("助手可能") == 0
		RETURNF 0
	;贞操重视持ちは相手を選ぶ
	SIF TALENT:贞操重视 + TALENT:ASSI:贞操重视 && COND("相性◎", ASSI) == 0
		RETURNF 0

	RETURNF 1
;TARGETと(TARGET:1 or ASSI)間でTARGETを交代
CASE "partner"
	;推倒中は、Ｗ推倒でないと交代できない
	SIF TEQUIP:推倒 && TEQUIP:Ｗ推倒 == 0
		RETURNF 0
	SIF TEQUIP:PLAYER:推倒 || TEQUIP:拘束 || TEQUIP:攝像機
		RETURNF 0
	SIF COND("只和你Ｈ") || COND("只和你Ｈ", ASSI)
		RETURNF 0
	;TARGET:1が居る(主にＷ推倒中)
	IF TARGET:1
		SIF BASE:精力 <= 0 || BASE:(TARGET:1):精力 <= 0
			RETURNF 0
	 	SIF STATE("撃沈", TARGET:1)
			RETURNF 0
		;指导者が調教している時
		IF PLAYER != MASTER
			SIF COND("助手可能") == 0
				RETURNF 0
		ENDIF
		RETURNF 1
	;助手は居る（交代＝助手とpartnerの立場交換）
	ELSEIF ASSI
		SIF BASE:精力 <= 0 || COND("助手可能") == 0
			RETURNF 0
	 	SIF STATE("撃沈", ASSI)
			RETURNF 0
		RETURNF 1
	ENDIF
ENDSELECT

RETURNF 0

@SHOW_PREVCOM
PRINTFORM < 前回指令 : %TEXTS("前回指令")%
SIF NUM("回合数") == 0 && PREVCOM:2 >= 0
	PRINTFORM \@ PLAYER == MASTER ? (%TEXTS("助手の名称")%) # (主人) \@
CALL PRINT_STR, @"イエロー_%STR:前回指令における絶頂%"
PRINTFORML  >