code:
;-------------------------------------------------
;日常イベントという名前の性騷擾イベント！
;BEGIN TRAINで初期化されるPALAM, TEQUIP, STAIN, SOURCE, EXなどは注意する事
;エロモードに入る指令が用意されているのだから、あくまで触りだけダラダラ随意やるのが重要
;性騷擾指令で膣に指出し入れして舐陰して合体して…とかもう調教と一緒だからな！
;違和感少なく妥当な行動を選ばせる分岐を作るのが重要
;-------------------------------------------------
;[200]Talk			[201]互动		[202]卖个破绽			[203]检查内褲
;[204]用手机拍照	[205]拜托処理性欲	[206]帮忙消除性欲
;-------------------------------------------------
;TRAINNAMEに相当。右の大号的数字はSHOP画面で割り振られた番号である
;実際に起きる内容によって名前自体が変わるのに注意
;-------------------------------------------------
@DAILYCOMNAME(ARG)
#FUNCTIONS

SELECTCASE ARG
CASE 1, 200
	IF CFLAG:睡眠
		RETURNF "叫醒"
	ELSEIF CFLAG:打招呼された == 0
		RETURNF "打招呼"
	ELSE
		RETURNF "Talk"
	ENDIF
CASE 2, 201
	IF CFLAG:睡眠
		RETURNF "趁睡袭击"
	ELSE
		RETURNF "互动"
	ENDIF
CASE 3, 202, 240
	IF CFLAG:睡眠
		RETURNF "整理睡姿"
	ELSE
		RETURNF "卖个破绽"
	ENDIF
CASE 4, 203
	IF CFLAG:睡眠
		;睡眠姦後は检查阴部
		IF EXP_GAIN("睡眠姦経験")
			RETURNF "检查阴部"
		ELSEIF EQUIP:裙 && CFLAG:掀起裙子 == 0 && CHECK_CLO("掀起裙子の価値无") == 0
			RETURNF "掀起裙子"
		;胖次の上に何かを履いている場合
		ELSEIF CHECK_CLO("外套露出")
			IF CFLAG:股間確認済 == 0
				IF CHECK_OUTER("布鲁马")
					RETURNF "检查布鲁马"
				ELSE
					RETURNF "股間観察"
				ENDIF
			ELSE
				RETURNF "检查阴部"
			ENDIF
		;胖次の代わりに何かを着ている場合
		ELSEIF CHECK_CLO("贴身制服露出") || CHECK_CLO("泳装姿")
			IF EQUIP:胖次 == 0 && CHECK_CLO("贴身制服露出") == 0
				RETURNF "检查阴部"
			ELSEIF CFLAG:股間確認済 == 0
				RETURNF "股間観察"
			ELSE
				RETURNF "检查阴部"
			ENDIF
		;見るからになにも穿いてない
		ELSEIF EQUIP:胖次 == 0
			RETURNF "检查阴部"
		;睡眠中は開放型開洞胖次なら检查阴部する
		ELSEIF CHECK_PANTIES("Ｖ露出") && COND("胖次形状確認")
			RETURNF "检查阴部"
		;胖次の確認がまだ
		ELSEIF COND("胖次詳細確認") == 0
			RETURNF "脱掉内裤"
		ELSEIF CFLAG:检查阴部 == 0
			RETURNF "检查阴部"
		ELSE
			RETURNF "脱掉内裤"
		ENDIF
	ELSE
		RETURNF "检查内褲"
	ENDIF
CASE 5, 204, 241
	VARSET LOCALS
	SELECTCASE CONDS("直前行動")
	CASE "脱掉内裤"
		LOCALS = 已没收的胖次撮影
	CASE "掀起裙子", "撩起裙子"
		IF CHECK_CLO("Ｖ露出")
			LOCALS = 阴部摄影
		ELSE
			LOCALS = 裙下撮影
		ENDIF
	CASE "检查布鲁马", "股間観察"
		IF CHECK_CLO("Ｖ露出")
			LOCALS = 阴部摄影
		ELSEIF COND("合意：检查内褲") || TALENT:不知羞恥 || CFLAG:睡眠
			LOCALS = 股間撮影
		ENDIF
	CASE "撫摸股間"
		IF CHECK_CLO("Ｖ露出")
			LOCALS = 阴部摄影
		ELSEIF CHECK_CLO("胖次露出")
			IF CHECK_PANTIES("開洞")
				LOCALS = 内褲摄影
			ELSE
				LOCALS = 阴部摄影
			ENDIF
		ELSE
			LOCALS = 股間撮影
		ENDIF
	CASE "检查内褲"
		IF COND("合意：检查内褲") || CFLAG:睡眠
			IF EQUIP:胖次
				IF CHECK_PANTIES("開洞")
					LOCALS = 内褲摄影
				ELSE
					LOCALS = 阴部摄影
				ENDIF
			ELSEIF EQUIP:胖次 == 0
				LOCALS = 阴部摄影
			ENDIF
		ENDIF
	CASE "检查菊穴"
		SIF COND("合意：检查阴部") || CFLAG:睡眠
			LOCALS = 肛門摄影
	CASE "检查阴部", "股間格子", "给对方剃毛"
		SIF COND("合意：检查阴部") || CFLAG:睡眠
			LOCALS = 阴部摄影
	CASE "拜托処理性欲"
		SIF COND("性処理：Ｖ挿入直後")
			LOCALS = 阴部摄影
	CASE "帮忙消除性欲"
		SIF COND("性処理：Ｖ挿入直後")
			LOCALS = 阴部摄影
	ENDSELECT

	IF LOCALS == "" || CFLAG:刚睡醒 || STRCOUNT(SAVESTR:PREV_PHOTO, LOCALS)
		RETURNF "用手机拍照"
	ELSE
		RETURNF LOCALS
	ENDIF
CASE 6, 205, 260
	SIF COND("合意：性処理") == 0 || CFLAG:睡眠
		RETURNF ""
	SIF BASE:MASTER:精力 < 30 || BASE:MASTER:魂 < 100
		RETURNF ""

	IF COND("进行性処理")
		RETURNF "进行性処理"
	ELSE
		RETURNF "拜托処理性欲"
	ENDIF
CASE 7, 206, 261
	SIF ABL:欲望 < 3 || TALENT:叛逆 || EXP:Ｈ回数 == 0
		RETURNF ""
	SIF COND("性欲解消指令実行可能") == 0 || CFLAG:睡眠
		RETURNF ""
	SIF BASE:MASTER:精力 < 30 || BASE:MASTER:魂 < 100
		RETURNF ""

	RETURNF "帮忙消除性欲"
;CASE 8, 207
;	SIF CHARA_NUM("室内の邪魔者") == 0
;		RETURNF ""
;	RETURNF "提案する"
;CASE
;	RETURNF "着替えを頼む"
ENDSELECT

;-------------------------------------------------
;変化する要素を加味したDAILYCOMNAME（指令選択するときの表示）
;基本は@DAILYCOMNAME
;-------------------------------------------------
@DAILYCOMNAME_SELECT(ARGS)
#FUNCTIONS

SELECTCASE ARGS
CASE "给对方剃毛"
	SELECTCASE CONDS("陰毛")
	CASE "保养完毕"
		ARGS = 帮忙处理毛毛
	ENDSELECT
CASE "卖个破绽"
	SIF COND("干劲性処理直後")
		ARGS = 沉浸在余韻里
	SIF COND("Ｐ汚れ", MASTER) && FIND_COND("性処理直後", "性処理：挿入直後") + COND("Ｐ汚れの相手", MASTER) && COND("干劲性処理") + CFLAG:躁动难忍 + TALENT:气味弱点 + TALENT:汚臭敏感 + COND("発情期") && COND("自発清洁口交可能")
		ARGS = 拜托扫除

	IF COND("Ｈ的邀请可能") && COND("Ｈ的おねだり可能") && PLACE("野外") == 0 && (CHARA_NUM("室内の邪魔者") == 0 || TALENT:不知羞恥 || TALENT:好色 || TALENT:淫乱)
		SELECTCASE CONDS("直前行動")
		CASE "检查菊穴", "肛門の見せつけ撮影", "肛門のチラ見せ撮影"
			SIF COND("Ａ熟達")
				ARGS = 观察股间
		CASE "检查阴部", "阴部の見せつけ撮影", "阴部のチラ見せ撮影", "给对方剃毛"
			SIF COND("Ｖ熟達") || COND("Ａ熟達")
				ARGS = 观察股间
		CASE "检查内褲", "检查布鲁马", "股間観察", "展示内褲"
			IF COND("Ｖ熟達")
				ARGS = 观察股间
			ELSEIF CHECK_CLO("Ｔ字褲臀圍") + CHECK_CLO("後開型臀圍") && COND("Ａ熟達")
				ARGS = 观察股间
			ENDIF
		ENDSELECT
	ENDIF
CASE "掀起裙子"
	SIF STRCOUNT(CLO("掀起裙子"), "裙") == 0
		ARGS = 掀起%SKIRT(TARGET, "略")%子
CASE "裙下撮影"
	ARGS = %SKIRT(TARGET, "略")%下摄影
CASE "脱掉内裤"
	SIF CHECK_PANTIES("前貼")
		ARGS = 前貼を剥がす
CASE "检查内褲"
	SIF EQUIP:胖次 && COND("胖次形状確認")
		ARGS = 检查%PANTIES(TARGET, "胖次")%
CASE "检查阴部"
	;肛門メインな状態…とりあえずは男性だけで良いかなぁ
	SIF TALENT:男性
		ARGS = 检查股間
CASE "内褲摄影"
	IF EQUIP:胖次
		IF CHECK_PANTIES("前貼") || CHECK_PANTIES("Ｃ胖次")
			ARGS = 拍摄股間
		ELSE
			ARGS = 拍摄%PANTIES(TARGET, "胖次")%
		ENDIF
	ENDIF
CASE "阴部摄影"
	SIF TALENT:男性
		ARGS = 拍摄股間
CASE "用手机拍照"
	IF COND("透け胸罩撮影可能")
		IF EQUIP:胸罩 && CHECK_BRA("乳頭露出") == 0
			ARGS = 悄悄拍摄透出来的胸罩
		ELSE
			ARGS = 悄悄拍摄透出来的乳頭
		ENDIF
	ENDIF
ENDSELECT
RETURNF ARGS

;-------------------------------------------------
;@DAILYCOMNAMEから番号への逆引き
;-------------------------------------------------
@DAILYNUM(ARGS)
#FUNCTION
#DIM LCOUNT

FOR LCOUNT, 1, 10
	SELECTCASE DAILYCOMNAME(LCOUNT)
	CASE ARGS
		RETURNF LCOUNT
	ENDSELECT
NEXT
RETURNF 0

;-------------------------------------------------
;各指令の内容はだいたい情緒や相手の状態、行動などで自動分岐します
;あとでConfigに手動選択を作るのも良いかもなー
;ARGには日常イベントの番号、ARGSには名前。ステ変動の影響を受けないように最初に固定させておく
;FLAG:SELECT_USERSHOPが立っている際には、前半分をすっ飛ばすことで後で後ろ半分だけをカウントできるようにする
;-------------------------------------------------
@EVENT_DAILY, ARG, ARGS
#DIM LCOUNT
#DIM MEMO_LINECOUNT
#DIM MEMO_TARGET
#DIMS MEMO_STRDAILY
;胖次確認フラグの記録
#DIM CHECK_PANTU
;淫紋が見えるよう变成了かを格子する
#DIM IS_VISIBLE_INMON
#DIM MEMO_REALTIMEFORFLAG

SIF ARG <= 0
	RETURN 0

SIF FLAG:SELECT_USERSHOP
	GOTO AFTER_PART_EVENT_DAILY

STR:日常イベント選択名 = %DAILYCOMNAME_SELECT(ARGS)%

MEMO_REALTIMEFORFLAG = FLAG:現実時間
;現実時間フラグ取得
CALL GET_REALTIMEFORFLAG

TFLAG:颜绘表示中 = 0
CSTR:お誘い =

FLAG:対複数 = 0
MEMO_TARGET = TARGET
MEMO_STRDAILY =

;胖次の確認度の変化を見るために使用
CHECK_PANTU = CFLAG:内衣確認済
;淫紋確認の地の文を出すかの格子に使う
IS_VISIBLE_INMON = CHECK_CLO("淫紋露出")

;この中の分岐でSTR:日常イベント名 が決定される
CALLFORM MESSAGE_DAILY_SELECT{ARG}
MEMO_STRDAILY = %STR:日常イベント名%

;イベントが特に起きてない場合は返回（時間経過をさせない）
IF STR:日常イベント名 == ""
	FLAG:現実時間 = MEMO_REALTIMEFORFLAG
	TARGET = MEMO_TARGET
	RETURN 0
ENDIF

;心情差、憤怒、害羞判定
FOR LCOUNT, 2, CHARANUM
	SIF CFLAG:LCOUNT:心情差
		CFLAG:LCOUNT:心情差 -= 1
	SIF CFLAG:LCOUNT:憤怒
		CFLAG:LCOUNT:憤怒 -= 1
	SIF CFLAG:LCOUNT:害羞
		CFLAG:LCOUNT:害羞 -= 1
NEXT

CVARSET CFLAG, GETNUM(CFLAG, "行動参加中")
CFLAG:行動参加中 = 1
CFLAG:闲 = 0

;日常イベントフラグ確定
CALL SET_DEVENT2, TARGET

MEMO_LINECOUNT = LINECOUNT
;口上で作った選択肢を選んだならここで地の文と台詞が出る
TRYCALLFORM KOJO_DAILY{ARG}_K{NO:TARGET}_ADDSELECT, STR:日常イベント名

; IF STR:日常イベント名 == "离场测试"
IF TCVAR:不在部室
	; PRINTFORMW %STR:日常イベント名%
	; PRINTFORMW 离场测试6%CALLNAME:TARGET%
	; TARGET = MEMO_TARGET
	TARGET = FIND_COND("現在存在")
	MEMO_TARGET = TARGET
	CALL SETFLAG, "対象指定", TARGET
ENDIF
;口上で作った選択肢を選んでいない場合
IF LINECOUNT == MEMO_LINECOUNT
	;地の文前台詞
	CALL KOJO_DAILYCOM, @"%ARGS%：地の文前"
	;地の文。TFLAG:地の文スキップ がONだと内部で地の文がカットされる
	CALLFORM MESSAGE_DAILY{ARG}

	;イベントが特に起きてない場合は返回（時間経過をさせない）
	IF STR:日常イベント名 == ""
		FLAG:現実時間 = MEMO_REALTIMEFORFLAG
		TARGET = MEMO_TARGET
		RETURN 0
	ENDIF

	MEMO_LINECOUNT = LINECOUNT
	;性処理系は前半後半に分かれるので地の文スキップ状態でも事後台詞を出す
	SELECTCASE ARG
	CASE 6, 7
		TFLAG:地の文スキップ = 0
		CALL KOJO_DAILYCOM, ARGS
	CASEELSE
		IF TFLAG:地の文スキップ == 0
			CALL KOJO_DAILYCOM, ARGS
			IF LINECOUNT == MEMO_LINECOUNT
				SELECTCASE STR:日常イベント名
				CASE "哺乳"
					PRINTL
					;今回既に実行済み
					IF CHOSE_DEVENT("哺乳")
						;育児中は2回まで
						IF BASE:育児中 && CHOSE_DEVENT("哺乳") >= 2
							IF RAND:3 == 0
								CFLAG:憤怒 += 1
								CALL EMOTION_PLUS, "憤怒"
								PRINTFORMW 「……！」
							ELSE
								CFLAG:心情差 += 1
								CALL EMOTION_PLUS, "心情差"
								PRINTFORMW 「……」
							ENDIF
							TFLAG:取引拒否 = 1
						ELSE
							CALL EMOTION_PLUS, "红潮恍惚"
							PRINTFORMW 「……」
						ENDIF
					ELSE
						CALL EMOTION_PLUS, "红潮恍惚"
						PRINTFORMW 「……」
					ENDIF
					PRINTL
				ENDSELECT
			ENDIF
		ENDIF
	ENDSELECT

	;全員相手なら、他の参加者のセリフ
	IF FLAG:対複数
		;喋るのは優先順位が上の人から
		FOR LCOUNT, 1, CHARANUM
			SIF FINDCHARA(CFLAG:優先順位, LCOUNT, 2) <= 0
				CONTINUE

			TARGET = FINDCHARA(CFLAG:優先順位, LCOUNT, 2)

			SIF CFLAG:行動参加中
				CONTINUE

			SELECTCASE STR:日常イベント名
			CASE "打招呼"
				SIF CFLAG:打招呼された
					CONTINUE
			CASE "展示内褲"
				SIF COND("自発展示内褲可能") == 0
					CONTINUE
			ENDSELECT

			SIF COND("現在存在") == 0
				CONTINUE

			CFLAG:闲 = 0

			;台詞
			CALL KOJO_DAILYCOM, ARGS

			CFLAG:行動参加中 = 1
			CALL BLANKLINE

			;参加は５人まで
			SELECTCASE CHARA_NUM("行動参加中")
			CASE IS >= 5
				BREAK
			CASE IS >= 2
				SIF RAND:4 == 0
					BREAK
			ENDSELECT
		NEXT
	ENDIF

	TARGET = MEMO_TARGET

	MEMO_LINECOUNT = LINECOUNT
	;台詞の後に続く地の文。有ったり無かったり。
	TRYCALLFORM AFTERMESSAGE_DAILY{ARG}
ENDIF
;partnerを再セット(他の部員が参加するイベントで重置されている場合があるため)
CALL SET_PARTNER
SIF LINECOUNT > MEMO_LINECOUNT && FLAG:SELECT_USERSHOP == 0
	CALL BLANKLINE

;お誘い判定あるなら、ここでいったん切る
SIF FLAG:SELECT_USERSHOP
	RETURN 1

$AFTER_PART_EVENT_DAILY

;日常イベントによるフラグ変更処理
CALL SETFLAG_KOJO_DAILYCOM, ARG

;行動の記録
IF FLAG:対複数
	FOR LCOUNT, 2, CHARANUM
		SIF LCOUNT == MEMO_TARGET || CFLAG:LCOUNT:行動参加中 == 0
			CONTINUE

		TARGET = LCOUNT
		IF CFLAG:LCOUNT:行動参加中 == 2
			CALL SET_PREV_DAILYCOM2, ARG, STR:日常イベント名２
		ELSE
			CALL SET_PREV_DAILYCOM, ARG, STR:日常イベント名
		ENDIF
	NEXT
ENDIF
TARGET = MEMO_TARGET
CALL SET_PREV_DAILYCOM, ARG

;心情差、憤怒、害羞格子
FOR LCOUNT, 2, CHARANUM
	;イベント前に心情差だった人は心情が直る。再びやらかしてたら駄目
	SIF CFLAG:LCOUNT:心情差 < 2
		CFLAG:LCOUNT:心情差 = 0
	SIF CFLAG:LCOUNT:憤怒 < 2
		CFLAG:LCOUNT:憤怒 = 0
	SIF CFLAG:LCOUNT:害羞 < 2
		CFLAG:LCOUNT:害羞 = 0
NEXT

;好感度による叛逆の消去判定
CALL SETFLAG, "叛逆消去", TARGET

;淫紋イベント（裙の下を見る場合には淫紋も目に入る）
IF IS_VISIBLE_INMON == 0 && MARK:淫紋 && CFLAG:淫紋の様子 == 0
	IF STRCOUNT(SAVESTR:PREV_日常イベント名, "裙") && CHECK_CLO("淫紋露出：裙無視")
		DRAWLINE
		CALL TEXT, "淫紋の様子：掀起裙子"
	ELSEIF CHECK_CLO("淫紋露出")
		DRAWLINE
		CALL TEXT, "淫紋の様子"
	ENDIF
ENDIF

MEMO_LINECOUNT = LINECOUNT
;特定行動後の派生イベントなど(partner以外のイベントが起きる事もある)
CALL EVENT_DAILY_EX, ARG, ARGS

;何も起きてないなら何か起きるかも
IF LINECOUNT == MEMO_LINECOUNT
	SELECTCASE MEMO_STRDAILY
	CASE "Talk"
		IF TALENT:MASTER:甜言蜜语
			TARGET = 0
			IF RAND:4 == 0 && FIND_COND("甜言蜜语可能", "行動参加中")
				CALL SETFLAG, "対象指定", FIND_COND("甜言蜜语可能", "行動参加中")
				STR:選択肢 = 甜言蜜语
				DRAWLINE
				RESTART
			ELSEIF RAND:3 == 0 && FIND_COND("夸奖可能", "行動参加中")
				CALL SETFLAG, "対象指定", FIND_COND("夸奖可能", "行動参加中")
				STR:選択肢 = 夸奖
				DRAWLINE
				RESTART
			ENDIF
		ENDIF
	ENDSELECT
ENDIF
TARGET = MEMO_TARGET

IF CONFIG("partnerの自動変更")
	SELECTCASE MEMO_STRDAILY
	;partnerが変更しないほうが良いと思われる指令
	CASE "泡茶", "勸酒"
	CASEELSE
		SIF FLAG:対複数 && FIND_COND("現在存在", "行動参加中")
			CALL SETFLAG, "対象指定", FIND_COND("現在存在", "行動参加中")
	ENDSELECT
ENDIF
;角色間のコミュニケーションイベント
;CALL EVENT_COMM

;入室イベント
CALL EVENT_ENTER_ROOM

;現実時間フラグ取得
CALL GET_REALTIMEFORFLAG

CVARSET CFLAG, GETNUM(CFLAG, "KOJO_DAILY済")

@SET_PREV_DAILYCOM, ARG, ARGS
SIF TARGET <= 0
	RETURN 0

;日常イベントフラグ確定
CALL SET_DEVENT2, TARGET

;今回の出来事を記録。前回選択指令として参照可能
IF ARG
	CFLAG:MASTER:PREV_DAILYCATE = ARG
	CFLAG:PREV_DAILYCATE = ARG
ENDIF

IF STR:日常イベント名 != ""
	SAVESTR:PREV_日常イベント名 = %STR:日常イベント名%
	SAVESTR:PREV_PHOTO = %STR:日常イベント名%

	CSTR:MASTER:PREV_DAILYCOM = %STR:日常イベント名%
	CSTR:MASTER:DAILYCOM履歴 = %CSTR:MASTER:DAILYCOM履歴%＠%STR:日常イベント名%\/

	CSTR:PREV_DAILYCOM = %STR:日常イベント名%
	CSTR:DAILYCOM履歴 = %CSTR:DAILYCOM履歴%＠%STR:日常イベント名%\/
	;@EVENT_DAILY_EX内では変化しない
	SAVESTR:PREV_直前行動 = < 直前行動：%STR:日常イベント名%（%CALLNAME:TARGET%）>
ENDIF

;一街道終わったらフラグ初期化
STR:日常イベント名 = %ARGS%

;お昼に穿いてた胖次の記録
SIF COND("昼") && COND("胖次形状確認") && CSTR:PREV_胖次 == ""
	CSTR:PREV_胖次 = %CSTR:胖次%

;主にサブ角色のフラグ記録に使う
@SET_PREV_DAILYCOM2, ARG, ARGS
SIF TARGET <= 0
	RETURN 0

;日常イベントフラグ確定
CALL SET_DEVENT2, TARGET

;今回の出来事を記録。前回選択指令として参照可能
SIF ARG
	CFLAG:PREV_DAILYCATE = ARG

CSTR:PREV_DAILYCOM = %ARGS%
CSTR:DAILYCOM履歴 = %CSTR:DAILYCOM履歴%＠%ARGS%\/

;お昼に穿いてた胖次の記録
SIF COND("昼") && COND("胖次形状確認") && CSTR:PREV_胖次 == ""
	CSTR:PREV_胖次 = %CSTR:胖次%

;-------------------------------------------------
;台詞発言後に変動するフラグなどを管理する。
;打情骂俏すると欲求不満度が上がってエロシーンでBOUNS
;-------------------------------------------------
@SETFLAG_KOJO_DAILYCOM, ARG
#DIM LCOUNT
#DIM MEMO_DESIRE
#DIM MEMO_SLEEP
#DIM ACTOR, 5
#DIM NUM_ACTOR
#DIM MEMO_KOUKANDO

MEMO_KOUKANDO = CFLAG:好感度
MEMO_DESIRE = BASE:欲求不満
MEMO_SLEEP = CFLAG:睡眠

;ターン経過で増減するフラグ
FOR LCOUNT, 1, CHARANUM
	SIF CFLAG:LCOUNT:不在
		CONTINUE

	IF CFLAG:LCOUNT:睡眠 && (CFLAG:LCOUNT:睡眠 >= 2 || LCOUNT != TARGET)
		CFLAG:LCOUNT:睡眠 -= 1
		SIF CFLAG:LCOUNT:睡眠 == 0 && LCOUNT != TARGET
			CALL REMOVE_STATE, LCOUNT, "酔酒"
		SIF CFLAG:LCOUNT:睡眠 < 3
			CALL REMOVE_STATE, LCOUNT, "困倦"
	ENDIF
	IF CFLAG:LCOUNT:茶
		CFLAG:LCOUNT:茶 -= 1
		BASE:LCOUNT:尿意 += 400 + TALENT:LCOUNT:娇小*200 - TALENT:LCOUNT:高大*100
	ENDIF

	SELECTCASE LCOUNT
	CASE TARGET, MASTER
	CASEELSE
		;酔酒だと眠くなることも
		SIF STATE("酔酒", LCOUNT) && RAND:5 == 0
			CALL ADD_STATE, LCOUNT, "困倦"
	ENDSELECT

	CFLAG:LCOUNT:隙有 = 0
	CFLAG:LCOUNT:刚睡醒 = 0

	SIF COND("現在不在", LCOUNT)
		CONTINUE

	;浑身是汗状態からはすぐ脱する
	IF TALENT:LCOUNT:易出汗 && COND("夏") && RAND:2
		CFLAG:LCOUNT:汗 += RAND:2
	ELSEIF CFLAG:LCOUNT:汗 >= 2 && RAND:4
		CFLAG:LCOUNT:汗 -= 1
	ENDIF
NEXT

;フラグ変動（指令区分で分岐）
SELECTCASE ARG
;Talk
CASE 1
	FOR LCOUNT, 2, CHARANUM
		SIF CFLAG:LCOUNT:行動参加中
			CFLAG:LCOUNT:隙有 = 1
	NEXT
	SELECTCASE STR:日常イベント名
	CASE "叫醒"
		CALL SETFLAG_DAILY, "叫醒"
	CASE "打招呼ハグ", "打招呼接吻"
		CALL SETFLAG_DAILY, "打招呼"
	CASE "打招呼口交", "打招呼舐陰"
		CALL SETFLAG_DAILY, "打招呼"
		CALL SETFLAG_DAILY, "掀起裙子"
	CASE "甜言蜜语"
		CALL SETFLAG_DAILY, "甜言蜜语"
		CFLAG:隙有 = 3
	CASE "夸奖", "夸奖点心"
		CALL SETFLAG_DAILY, "夸奖"
		CFLAG:隙有 = 2
	CASEELSE
		;Talk系が選ばれたら基本的には打招呼済みとなる
		FOR LCOUNT, 2, CHARANUM
			SIF CFLAG:LCOUNT:行動参加中
				CALL SETFLAG_DAILY, "打招呼", LCOUNT
		NEXT
	ENDSELECT

;互动
CASE 2
	SELECTCASE STR:日常イベント名
	CASE "睡眠姦接吻"
		EXP:睡眠悪戯経験 += 1
		;対象の口⇔調教者の口的污垢が移動
		CALL EQ_STAIN, TARGET, "Ｍ", MASTER, "Ｍ"

		PRINTFORML 睡眠悪戯経験+1
	CASE "睡眠姦口交"
		EXP:睡眠悪戯経験 += 1
		;対象の口⇔調教者のＰ的污垢が移動
		CALL EQ_STAIN, TARGET, "Ｍ", MASTER, "Ｐ"

		PRINTFORML 睡眠悪戯経験+1
	CASE "睡眠姦逆口交"
		EXP:睡眠悪戯経験 += 1
		EXP:MASTER:口交経験 += 1
		;対象のP⇔調教者の口的污垢が移動
		CALL EQ_STAIN, TARGET, "Ｐ", MASTER, "Ｍ"

		PRINTFORML 睡眠悪戯経験+1
		PRINTFORML 口交経験+1(%CALLNAME:MASTER%)
	CASE "睡眠姦正常位", "睡眠姦寝后背位"
		CALL SETFLAG_DAILY, "掀起裙子"
		EXP:睡眠姦経験 += 1
		EXP:Ｖ経験 += 1
		EXP:MASTER:Ｖ挿入経験 += 1
		EXP:MASTER:腰靈活経験 += 1
		;対象のＶ⇔調教者のＰ的污垢が移動
		CALL EQ_STAIN, TARGET, "Ｖ", MASTER, "Ｐ"

		PRINTFORML 睡眠姦経験+1
		PRINTFORML Ｖ経験+1
		PRINTFORML Ｖ挿入経験+1（%CALLNAME:MASTER%）
		PRINTFORML 腰靈活経験+1（%CALLNAME:MASTER%）
		IF SIZE("阴茎", MASTER) >= LIMIT(ABL:Ｖ拡張, 2, 3)
			PRINTFORML Ｖ拡張経験+1
			EXP:Ｖ拡張経験 += 1
		ENDIF
	CASE "给对方剃毛"
		EXP:露出経験 += 2
		EXP:剃毛経験 += 1

		SELECTCASE CONDS("陰毛")
		CASE "保养完毕"
			BASE:陰毛 = 500
		CASEELSE
			BASE:陰毛 = 300
		ENDSELECT
		CFLAG:剃毛者 = BASE:MASTER:識別番号

		;欲求不満ＵＰ
		SIF CHOSE_DEVENT(STR:日常イベント名) == 0
			BASE:欲求不満 += RAND:(5 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) ) + 1
		PRINTFORML 剃毛経験+1

	CASE "露出胖次"
		;欲求不満ＵＰ
		SIF CHOSE_DEVENT(STR:日常イベント名) == 0
			BASE:欲求不満 += RAND:(5 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) ) + 3
	CASE "哺乳"
		IF TFLAG:取引拒否 == 0
			PRINTFORM %CALLNAME:TARGET%的胸部:{BASE:母乳, 5} →
			BASE:母乳 = MAX(BASE:母乳 - 1500 - RAND:1500, 0)
			PRINTFORMW {BASE:母乳, 5}
		ENDIF
	CASE "托一托胸部"
		CALL SETFLAG_DAILY, "胸罩形状確認"

	CASE "坐在旁邊"
		CALL SETFLAG_DAILY, "坐在旁邊"
	CASE "给小费"
		CALL SETFLAG_DAILY, "夸奖"
		CFLAG:隙有 = 2
	CASE "泡茶"
		CALL SETFLAG_DAILY, "茶"
	CASE "勸酒"
		CALL SETFLAG_DAILY, "お酒"
	CASE "拭汗"
		CALL SETFLAG_DAILY, "拭汗"
	;AFTERMESSAGE_DAILY2内でフラグを変動させる
	CASE "一起学习"
	;CASE "舐陰奉仕する", "口交奉仕する"
	;アイリ、寧子のみ
	CASE "逗猫棒"
		CFLAG:隙有 = 4

	ENDSELECT
;卖个破绽
CASE 3
	FOR LCOUNT, 2, CHARANUM
		SIF CFLAG:LCOUNT:行動参加中
			CFLAG:LCOUNT:隙有 = 1
	NEXT

	SELECTCASE STR:日常イベント名
	CASE "清洁口交"
		CALL SETFLAG_DAILY, "清洁口交"
	CASE "整理睡姿"
		CALL SETFLAG_DAILY, "整理睡姿"
	CASE "沏茶"
		CALL SETFLAG_DAILY, "茶"
	CASE "展示内褲"
		FOR LCOUNT, 2, CHARANUM
			SIF CFLAG:LCOUNT:行動参加中
				CALL SETFLAG_DAILY, "掀起裙子", LCOUNT
		NEXT
	ENDSELECT
;检查内褲
CASE 4
	SELECTCASE STR:日常イベント名
	CASE "检查阴部", "股間格子"
		CFLAG:检查阴部 = 1
		;欲求不満ＵＰ
		SIF CHOSE_DEVENT(STR:日常イベント名) == 0 && COND("合意：检查阴部")
			BASE:欲求不満 += RAND:(5 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) ) + 5
	CASE "检查菊穴"
		CFLAG:检查菊穴 = 1
		;欲求不満ＵＰ
		SIF CHOSE_DEVENT(STR:日常イベント名) == 0 && COND("合意：检查阴部")
			BASE:欲求不満 += RAND:(5 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) ) + 5
	CASE "检查布鲁马", "股間観察"
		CFLAG:股間確認済 = 1
	CASE "撫摸股間"
		;欲求不満ＵＰ
		SIF CHOSE_DEVENT(STR:日常イベント名) == 0
			BASE:欲求不満 += RAND:(3 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) ) + 3
	CASE "掀起裙子", "撩起裙子"
		CALL SETFLAG_DAILY, "掀起裙子"
		;欲求不満ＵＰ
		IF CHOSE_DEVENT(STR:日常イベント名) == 0 && COND("合意：掀起裙子")
			BASE:欲求不満 += RAND:(5 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) )/2
			SIF MARK:淫紋
				BASE:欲求不満 += 5
		ENDIF
	CASE "脱掉内裤"
		CALL SETFLAG, "胖次没収", TARGET
		;欲求不満ＵＰ
		BASE:欲求不満 += RAND:(5 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) )/2
	CASEELSE
		SIF DAILYCOMNAME(4) == "检查内褲" && (COND("合意：检查内褲") || CFLAG:睡眠)
			CALL SETFLAG_DAILY, "胖次詳細確認"
		;欲求不満ＵＰ
		SIF CHOSE_DEVENT(STR:日常イベント名) == 0 && COND("合意：检查内褲")
			BASE:欲求不満 += RAND:(5 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) )/2
	ENDSELECT

;写真撮影
CASE 5
	SELECTCASE STR:日常イベント名
	CASE "POSE撮影"
		IF CHOSE_DEVENT(STR:日常イベント名) == 0
			BASE:欲求不満 += RAND:(1 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) )/2 + 1
		ELSEIF MAX(ABL:欲望, ABL:露出癖) >= 5
			BASE:欲求不満 += RAND:(1 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) )/3 + 2
		ENDIF
	CASE "裙下撮影", "股間撮影","内褲摄影"
		CALL SETFLAG_DAILY, "掀起裙子"
		SIF CHOSE_DEVENT(STR:日常イベント名) == 0
			BASE:欲求不満 += RAND:(1 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) )/2 + 1
	CASE "阴部摄影"
		SIF CHOSE_DEVENT(STR:日常イベント名) == 0
			BASE:欲求不満 += RAND:(3 + MIN(ABL:欲望, 10) + MIN(ABL:露出癖, 5) )/2 + 3
	ENDSELECT
;性処理
CASE 6
	CALL SETFLAG_DAILY, "性処理終了"
;性欲解消
CASE 7
	;汗判定で使う
	VARSET LOCAL

	IF COND("絶頂")
		CALL CALC, "欲求不満解消", TARGET, LIMIT(COND("絶頂")*25, 50, 100)
	ELSE
		CALL CALC, "欲求不満解消", TARGET, 50
	ENDIF

	IF COND("種族：雪女") == 0
		SELECTCASE NAMES("性処理")
		CASE "Ｖ性交", "Ａ性交", "尿道性交"
			;けっこう易出汗
			LOCAL += 3 + RAND:3
			SIF COND("夏")
				LOCAL += 2
			CALL SETFLAG_DAILY, "汗汚れ"
		CASEELSE
			LOCAL += RAND:2 + 1
			SIF COND("夏")
				LOCAL += 1
			CALL SETFLAG_DAILY, "汗汚れ"
		ENDSELECT
	ENDIF

	IF COND("浑身是汗")
		CFLAG:汗 += LOCAL
	ELSE
		CFLAG:汗 = MIN(CFLAG:汗 + LOCAL, 5)
	ENDIF

	SELECTCASE NAMES("性処理")
	CASE "Ｖ性交", "Ａ性交", "尿道性交", "舐陰", "舐陰莖"
		CALL SETFLAG_DAILY, "掀起裙子"
		CALL SETFLAG_DAILY, "胖次詳細確認"
		CFLAG:股間確認済 = 1
	ENDSELECT

	;本日の性処理フラグON
	CFLAG:性欲解消済 += 1
	CFLAG:前回お相手日 = DAY

	CALL SETFLAG, "調教外Ｈ終了", PLAYER
	CALL SETFLAG, "調教外Ｈ終了", TARGET
	SIF CFLAG:夸奖 == 0
		CFLAG:夸奖 = 1
ENDSELECT

;挿入の設定と解除
SELECTCASE STR:日常イベント名
CASE "睡眠姦正常位"
	CALL SET_INSERT, TARGET, PLAYER, 60
CASE "睡眠姦寝后背位"
	CALL SET_INSERT, TARGET, PLAYER, 61
CASEELSE
	;挿入解除
	CALL RESET_INSERT, TARGET, PLAYER
ENDSELECT

;寝ていたらここまで
IF CFLAG:睡眠
	BASE:欲求不満 = MEMO_DESIRE
	SIF MEMO_SLEEP > CFLAG:睡眠
		PRINTFORMW 睡眠深度-{MEMO_SLEEP - CFLAG:睡眠}LV

	RETURN 1
ENDIF

;以下表示関連
IF BASE:欲求不満 > MEMO_DESIRE
	PRINTFORML 欲求不満+{BASE:欲求不満 - MEMO_DESIRE}％
	;愛液＆汚れ判定
	CALL STAIN_CALC_DAILY, BASE:欲求不満 - MEMO_DESIRE, TARGET
ELSEIF BASE:欲求不満 < MEMO_DESIRE
	PRINTFORML 欲求不満-{MEMO_DESIRE - BASE:欲求不満}％
ENDIF

;调戏かけると好感度ＵＰ。条件を加味して増減させたいところだ
FOR LCOUNT, 2, CHARANUM
	SIF COND("現在不在", LCOUNT)
		CONTINUE
	IF CFLAG:LCOUNT:行動参加中 == 0
		SIF RAND:10 == 0 && COND("闲可能", LCOUNT)
			CFLAG:LCOUNT:闲 = 1
		CONTINUE
	ENDIF

	;调戏かけた回数を記録
	CFLAG:LCOUNT:调戏数 += 1
	CFLAG:LCOUNT:日常事件回数 += 1
	CFLAG:LCOUNT:好感度 += MAX(13 - CFLAG:LCOUNT:调戏数*3, 1)
	SIF COND("DAILYCOM回数", LCOUNT) >= 2
		CALL SETFLAG_DAILY, "打招呼", LCOUNT
NEXT

SELECTCASE STR:日常イベント名
CASE "给小费"
	CFLAG:好感度 += 10
	MONEY -= 300
	PRINTFORML 所持金-%MONEY_C(300)%
CASE "送一份小礼物"
	CFLAG:好感度 += 20
	MONEY -= 10
	PRINTFORML 所持金-%MONEY_C(10)%
CASE "送一份普通的礼物"
	CFLAG:好感度 += 50
	MONEY -= 200
	PRINTFORML 所持金-%MONEY_C(200)%
CASE "送一份高价的礼物"
	CFLAG:好感度 += 200
	MONEY -= 10000
	PRINTFORML 所持金-%MONEY_C(10000)%
ENDSELECT

SIF CFLAG:好感度 > MEMO_KOUKANDO
	PRINTFORMW 好感度+{CFLAG:好感度 - MEMO_KOUKANDO}

IF FLAG:対複数
	VARSET ACTOR
	NUM_ACTOR = 0

	FOR LCOUNT, 2, CHARANUM
		SIF CFLAG:LCOUNT:行動参加中 == 0
			CONTINUE
		ACTOR:NUM_ACTOR = LCOUNT
		NUM_ACTOR += 1
	NEXT
	IF NUM_ACTOR
		CALL CHANGE_RELATION, 1, ACTOR:0, ACTOR:1, ACTOR:2, ACTOR:3, ACTOR:4
		PRINTFORMW %CALLNAME:TARGET%達の仲良し度＋1
	ENDIF
ENDIF
SELECTCASE COND("欲求不満")
CASE IS >= 2
	IF CFLAG:躁动难忍 == 0
		CALL PRINT_STRW, @"%CALLNAME:TARGET%が[_粉紅_躁动难忍_]状態成为了_黄色_(実行値＆情緒にBOUNS)"
		CFLAG:躁动难忍 = 1
	ENDIF
CASE 1
	IF CFLAG:躁动难忍 && COND("発情期") == 0
		CALL PRINT_STRW, @"%CALLNAME:TARGET%的[躁动难忍]退去了"
		CFLAG:躁动难忍 = 0
	ENDIF
CASE 0
	IF CFLAG:躁动难忍
		CALL PRINT_STRW, @"%CALLNAME:TARGET%的[躁动难忍]退去了"
		CFLAG:躁动难忍 = 0
	ENDIF
ENDSELECT
IF CFLAG:甜言蜜语 == 1
	CALL PRINT_STRW, @"%CALLNAME:TARGET%が[_爱心粉紅_心动不已_]状態成为了_黄色_(情緒にBOUNS)"
	CFLAG:甜言蜜语 = 2
ENDIF
IF CFLAG:夸奖 == 1
	CALL PRINT_STRW, @"%CALLNAME:TARGET%が[心情好]成为了_黄色_(実行値に+5BOUNS)"
	CFLAG:夸奖 = 2
ENDIF

;エロ指令は周りの人の欲求不満もた圆圈
IF BASE:欲求不満 > MEMO_DESIRE
	FOR LCOUNT, 2, CHARANUM
		SELECTCASE LCOUNT
		CASE TARGET
			CONTINUE
		CASEELSE
			SIF COND("現在不在", LCOUNT)
				CONTINUE
		ENDSELECT
		SELECTCASE CFLAG:LCOUNT:優先順位
		CASE IS >= 6
			SIF RAND:5
				CONTINUE
		CASE IS >= 3
			SIF RAND:3
				CONTINUE
		ENDSELECT

		BASE:LCOUNT:欲求不満 += RAND:(1 + MIN(ABL:LCOUNT:欲望, 10) )/2
		SIF TALENT:LCOUNT:淫乱
			BASE:LCOUNT:欲求不満 += 1
		SIF TALENT:LCOUNT:恋慕
			BASE:LCOUNT:欲求不満 += 1
	NEXT
ENDIF

;-------------------------------------------------
;日常イベントでの各種フラグを設定する関数。殆どは値の尺寸でイベント進行度も記録される
;ARGは誰を基準としてフラグを設定するかで未入力ならTARGET
;-------------------------------------------------
@SETFLAG_DAILY, ARGS, ARG
#DIM LCOUNT
;行為の参加者のカウントで使ったりする
#DIM NUM_ACT
#DIM ACTOR
#DIM MEMO_STUDY, 2
#DIM MEMO_SCHOLAR, 2
#DIM MEMO_TEST_MASTER

SIF ARG == 0 && TARGET
	ARG = TARGET

NUM_ACT = 0
ACTOR = 0

SELECTCASE ARGS
CASE "坐在旁邊"
	CFLAG:ARG:坐在旁邊 = 1
CASE "場所を変える"
	;移動に際して挿入は終了
	SIF INSERT("挿入中", ARG)
		CALL RESET_INSERT, ARG
	IF ARG != MASTER
		CALL MOVE_PLACE, SAVESTR:現在位置, ARG
		SIF CONFIG("在家里脱鞋") && PLACE("自宅") == 0
			CALL SET_SHOES_RE, ARG
	ENDIF

CASE "性処理終了"
	;汗判定で使う
	VARSET LOCAL
	IF TFLAG:进行性処理
		;うっすら易出汗
		IF COND("種族：雪女") == 0
			SELECTCASE NAMES("性処理")
			CASE "Ｖ性交", "Ａ性交", "尿道性交"
				LOCAL += RAND:2
				SIF COND("夏")
					LOCAL += 1
				CALL SETFLAG_DAILY, "汗汚れ"
			ENDSELECT
		ENDIF
	;干劲性処理
	ELSE
		IF COND("絶頂")
			CALL CALC, "欲求不満解消", TARGET, LIMIT(COND("絶頂")*25, 25, 75)
		ELSE
			CALL CALC, "欲求不満解消", TARGET, 25
		ENDIF

		IF COND("種族：雪女") == 0
			SELECTCASE NAMES("性処理")
			CASE "Ｖ性交", "Ａ性交", "尿道性交"
				;けっこう易出汗
				LOCAL += 3 + RAND:3
				SIF COND("夏")
					LOCAL += 2
				CALL SETFLAG_DAILY, "汗汚れ"
			CASEELSE
				LOCAL += RAND:2 + 1
				SIF COND("夏")
					LOCAL += 1
				CALL SETFLAG_DAILY, "汗汚れ"
			ENDSELECT
		ENDIF
	ENDIF
	IF COND("浑身是汗")
		CFLAG:汗 += LOCAL
	ELSE
		CFLAG:汗 = MIN(CFLAG:汗 + LOCAL, 5)
	ENDIF

	SELECTCASE NAMES("性処理")
	CASE "Ｖ性交", "Ａ性交", "尿道性交", "胖次見抜き"
		CALL SETFLAG_DAILY, "掀起裙子"
		CALL SETFLAG_DAILY, "胖次詳細確認"
		CFLAG:股間確認済 = 1
	ENDSELECT

	;性処理履歴に回数追加
	CALL SETFLAG, "性処理履歴", TARGET

	EXP:性処理経験 += 1
	PRINTFORML 性処理経験+１

	CALL SETFLAG, "調教外Ｈ終了", PLAYER
	CALL SETFLAG, "調教外Ｈ終了", TARGET

	TFLAG:进行性処理 = 0
CASE "入室までの所要時間計算"
	;呼び出された人が居る場合
	IF FINDCHARA(CFLAG:呼び出された, 1, 2) > 0
		CFLAG:FINDCHARA(CFLAG:呼び出された, 1, 2):入室までの所要時間 = 1
	ELSE
		FOR LCOUNT, 1, CHARANUM
			SIF CFLAG:LCOUNT:不在
				CONTINUE

			SELECTCASE CFLAG:LCOUNT:入室までの所要時間
			CASE IS <= 1
				CONTINUE
			CASEELSE
				;夜は全員最初からいる。
				IF COND("夜")
					CFLAG:LCOUNT:入室までの所要時間 = 1
				ELSE
					CFLAG:LCOUNT:入室までの所要時間 -= 1
				ENDIF
			ENDSELECT
		NEXT
	ENDIF
CASE "打招呼"
	CFLAG:ARG:打招呼した = 1
	CFLAG:ARG:打招呼された = 1
CASE "叫醒"
	CALL REMOVE_STATE, ARG, "酔酒"
	SIF COND("熟睡", ARG) == 0
		CALL REMOVE_STATE, ARG, "困倦"
	SIF CFLAG:ARG:胖次没収
		CALL SETFLAG, "胖次返却", ARG
	CFLAG:ARG:掀起裙子 = 0
	CFLAG:ARG:睡眠 = 0
	CFLAG:ARG:刚睡醒 = 1
	CFLAG:ARG:隙有 = 4
	IF EXP_GAIN("睡眠姦経験", ARG)
		;挿入解除
		CALL RESET_INSERT, ARG, MASTER
	ENDIF
	CALL RESET_STAIN_EX, "整理睡姿", ARG

CASE "整理睡姿"
	SIF CFLAG:ARG:胖次没収
		CALL SETFLAG, "胖次返却", ARG
	CFLAG:ARG:掀起裙子 = 0
	IF EXP_GAIN("睡眠姦経験", ARG)
		;挿入解除
		CALL RESET_INSERT, ARG, MASTER
	ENDIF
	CALL RESET_STAIN_EX, "整理睡姿", ARG
	SIF CFLAG:ARG:汗 > 0
		CFLAG:ARG:汗 = 1
CASE "甜言蜜语"
	SIF CALCF("甜言蜜语成功", ARG)
		CFLAG:ARG:甜言蜜语 = 1
CASE "夸奖"
	SIF CFLAG:ARG:夸奖 == 0
		CFLAG:ARG:夸奖 = 1
CASE "心情差", "憤怒", "害羞", "闲"
	CFLAG:ARG:ARGS = 2
CASE "勉強"
	MEMO_STUDY:0 = CFLAG:勉強時間
	MEMO_STUDY:1 = CFLAG:MASTER:勉強時間
	MEMO_SCHOLAR:0 = BASE:学力
	MEMO_SCHOLAR:1 = BASE:MASTER:学力
	MEMO_TEST_MASTER = CALCF("試験の予想点数", MASTER)

	;履歴に勉強追加
	CSTR:DAILYCOM履歴 = %CSTR:DAILYCOM履歴%＠勉強\/

	CFLAG:勉強時間 += 1
	CFLAG:MASTER:勉強時間 += 1

	IF COND("教員")
		CFLAG:MASTER:勉強時間 += 1
	ELSEIF TALENT:MASTER:聰慧 && TALENT:聰慧
		CFLAG:勉強時間 += 1
		CFLAG:MASTER:勉強時間 += 1
	ELSEIF TALENT:MASTER:聰慧 || (TALENT:MASTER:笨蛋 == 0 && TALENT:笨蛋)
		CFLAG:勉強時間 += 1
	ELSEIF TALENT:聰慧
		CFLAG:MASTER:勉強時間 += 1
	ENDIF

	SIF COND("学生")
		BASE:学力 = CALCF("推定学力")
	BASE:MASTER:学力 = CALCF("推定学力", MASTER)

	SIF COND("学生")
		PRINTFORML 学习pt+{CFLAG:勉強時間 - MEMO_STUDY:0}\@ MEMO_SCHOLAR:0 != BASE:学力 ? ＆学力+{BASE:学力 - MEMO_SCHOLAR:0} # \@
	PRINTFORMW 学习pt+{CFLAG:MASTER:勉強時間 - MEMO_STUDY:1}\@ MEMO_SCHOLAR:1 != BASE:MASTER:学力 ? ＆学力+{BASE:MASTER:学力 - MEMO_SCHOLAR:1} # \@（%CALLNAME:MASTER%）

	PRINTFORML - 根据小测験的预计得分（全科合計的平均分）-

	IF COND("学生")
		CFLAG:予想点 = CALCF("試験の予想点数")
		PRINTFORML %TEXT_LJ(CALLNAME:TARGET, 16)% {CFLAG:予想点, 3}点 … %TEXTS("試験評価", CFLAG:予想点)%
	ENDIF
	CFLAG:MASTER:予想点 = CALCF("試験の予想点数", MASTER)
	PRINTFORMW %TEXT_LJ(CALLNAME:MASTER, 16)% {CFLAG:MASTER:予想点, 3}点 … %TEXTS("試験評価", CFLAG:MASTER:予想点)%

	SELECTCASE CFLAG:MASTER:予想点
	CASE IS >= 90
		IF MEMO_TEST_MASTER < 90
			PRINTL
			PRINTFORMW ……能做的都已经做了、的这种感觉。说不定能加入全校上位的列表中。
		ENDIF
	CASE IS >= 80
		IF MEMO_TEST_MASTER < 80
			PRINTL
			PRINTFORMW ……学了挺多了的。应该能考得不错。
		ENDIF
	CASE IS >= 60
		IF MEMO_TEST_MASTER < 60
			PRINTL
			PRINTFORMW ……維持平常的成績的话、这种程度已经足够了吧。
		ENDIF
	CASE IS >= 30
		IF MEMO_TEST_MASTER < 30
			PRINTL
			PRINTFORMW ……好歹会了一些、至少应该不会挂科了。
		ENDIF
	ENDSELECT
CASE "茶", "茶を用意"
	FOR LCOUNT, 1, CHARANUM
		SIF COND("現在不在", LCOUNT)
			CONTINUE
		CFLAG:LCOUNT:茶 = 7 + RAND:3

		SIF BASE:LCOUNT:尿意 < 5000
			BASE:LCOUNT:尿意 += 1500
	NEXT
	SIF ARG && (SAVESTR:茶 == "" || ARGS == "茶を用意")
		SAVESTR:茶 = %TEXTR(CSTR:ARG:茶)%
	SIF SAVESTR:茶 == ""
		SAVESTR:茶 = 茶
CASE "お酒"
	FOR LCOUNT, 1, CHARANUM
		SIF COND("現在不在", LCOUNT) || CEVENT("飲酒拒否", LCOUNT)
			CONTINUE

		IF STATE("酔酒", LCOUNT)
			;IF TALENT:LCOUNT:薬毒耐性 == 0 && RAND:3 == 0
			;	CALL ADD_STATE, LCOUNT, "烂醉"
			;	IF LCOUNT == TARGET
			;		PRINTFORMW ……%CALLNAME:LCOUNT%は呑み過ぎてしまったようだ。
			;		CALL PRINT_STRW, @"%CALLNAME:LCOUNT%は_青_烂醉_してしまった…"
			;		CALL DAILY_MESSAGE, "烂醉"
			;	ENDIF
			;ENDIF
		ELSE
			CALL ADD_STATE, LCOUNT, "酔酒"
		ENDIF

		BASE:LCOUNT:尿意 += 1500 + TALENT:LCOUNT:娇小*200 - TALENT:LCOUNT:高大*100
		NUM_ACT += 1
		ACTOR = LCOUNT
	NEXT

	IF NUM_ACT
		IF STATE("酔酒")
			CALL PRINT_STRW, @"%CALLNAME:TARGET%\@ NUM_ACT >= 3 ? 達 # \@が[_爱心粉紅_酔酒_]成为了_黄色_(実行値と情緒にBOUNS＆偶尔奇行)"
		ELSEIF STATE("酔酒", MASTER) && NUM_ACT == 1
			PRINTFORMW 很可惜被%CALLNAME:TARGET%拒绝了、所以只能自己一个人喝了。
		ELSE
			CALL PRINT_STRW, @"%CALLNAME:ACTOR%\@ NUM_ACT >= 3 ? 達 # \@が[_爱心粉紅_酔酒_]成为了_黄色_(実行値と情緒にBOUNS＆偶尔奇行)"
		ENDIF
		MONEY -= NUM_ACT*500
		PRINTFORMW 所持金-%MONEY_C(NUM_ACT*500)%
	ENDIF
CASE "清洁口交"
	EXP:ARG:口交経験 += 1
	PRINTFORML 口交経験+1
	IF CHECK_STAIN(STAIN:MASTER:Ｐ, "Ｐ恥垢")
		EXP:ARG:清洁口交経験 += 2
		PRINTFORML 清洁口交経験+2
	ELSE
		EXP:ARG:清洁口交経験 += 1
		PRINTFORML 清洁口交経験+1
	ENDIF
	CALL RESET_STAIN_EX, "Ｐ", MASTER

CASE "拭汗"
	SIF CFLAG:ARG:汗 > 0
		CFLAG:ARG:汗 = 1
	CALL RESET_STAIN_EX, "Ｂ", ARG
CASE "汗が引いた"
	SIF CFLAG:ARG:汗 >= 2
		CFLAG:ARG:汗 = 1
CASE "汗汚れ"
	SIF PENIS(ARG)
		STAIN:ARG:Ｐ = SET_STAIN(STAIN:ARG:Ｐ, "汗")
	SIF TALENT:男性 == 0
		STAIN:ARG:Ｖ = SET_STAIN(STAIN:ARG:Ｖ, "汗")
	STAIN:ARG:Ａ = SET_STAIN(STAIN:ARG:Ａ, "汗")
	STAIN:ARG:Ｂ = SET_STAIN(STAIN:ARG:Ｂ, "汗")
	SIF EQUIP:ARG:胖次 && COND("易出汗", ARG)
		STAIN:ARG:胖次 = SET_STAIN(STAIN:ARG:胖次, "汗")
	SIF EQUIP:ARG:服 && COND("易出汗", ARG)
		STAIN:ARG:服 = SET_STAIN(STAIN:ARG:服, "汗")

CASE "淋浴"
	CFLAG:ARG:淋浴済 = 1
	CFLAG:ARG:汗 = 0
	CALL RESET_STAIN_EX, "全部", ARG
	TEQUIP:ARG:出浴 = 1
CASE "胖次おぼろげ確認"
	SETBIT CFLAG:ARG:内衣確認済, 0
CASE "胖次色確認"
	CFLAG:ARG:内衣確認済 = SETBITS(CFLAG:ARG:内衣確認済, 0, 1)
CASE "胖次形状確認"
	CFLAG:ARG:内衣確認済 = SETBITS(CFLAG:ARG:内衣確認済, 0, 2)
CASE "胖次詳細確認"
	CFLAG:ARG:内衣確認済 = SETBITS(CFLAG:ARG:内衣確認済, 0, 3)
CASE "胸罩形状確認"
	CFLAG:ARG:内衣確認済 = SETBITS(CFLAG:ARG:内衣確認済, 10, 12)

CASE "掀起裙子"
	IF EQUIP:ARG:裙
		CFLAG:ARG:掀起裙子 = 1
		CFLAG:ARG:股間確認済 = 1
		SIF CHECK_CLO("胖次視認可能", ARG)
			CALL SETFLAG_DAILY, "胖次形状確認", ARG
	ENDIF
CASE "打招呼舐陰", "打招呼口交"
	SIF EQUIP:ARG:裙
		CFLAG:ARG:掀起裙子 = 1
CASE "廁所"
	CFLAG:ARG:廁所済 = 1
	SIF PENIS(ARG)
		STAIN:ARG:Ｐ = SET_STAIN(STAIN:ARG:Ｐ, "尿")
	SIF TALENT:男性 == 0
		STAIN:ARG:Ｖ = SET_STAIN(STAIN:ARG:Ｖ, "尿")
	BASE:ARG:尿意 = 0
CASE "同伴者"
	SAVESTR:同伴者 = %CALLNAME:ARG%
ENDSELECT

;-------------------------------------------------
;DEVENTはメイン画面で発生するイベントの記録
;CEVENTとの大号的違いはSET_DEVENTしたものが特定領帯ミングにならないと本決定されないところ
;書式としてはCEVENT同様に特殊なイベント群を作る際には、頭に"イベント名："とするのを推奨
;また、記述と操作の都合により、半角の"/"と"^"の使用は禁止
;-------------------------------------------------
@DEVENT(ARGS, ARG)
#FUNCTION
#DIMS TEXT_SEARCH

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

TEXT_SEARCH = \/%ARGS%\/

SIF STRCOUNT(@"\/%CSTR:ARG:DEVENT%", TEXT_SEARCH)
	RETURNF 1
RETURNF 0

@SET_DEVENT, ARGS, ARG
#DIMS TEXT_SEARCH
SIF ARG == 0 && TARGET
	ARG = TARGET

TEXT_SEARCH = \/%ARGS%\/

;もう記録済みなら弾く
SIF STRCOUNT(@"\/%CSTR:ARG:DEVENT%", TEXT_SEARCH) || STRCOUNT(@"\/%CSTR:ARG:NOW_DEVENT%", TEXT_SEARCH)
	RETURN 0
CSTR:ARG:NOW_DEVENT += @"%ARGS%\/"

;NOW_DEVENTに格納されているものをDEVENTに追加する
;CDAYEVの確定もここで行う
;領帯ミングはEVENTTURNENDとEVENTTRAINとSET_PREV_DAILYCOMとEVENT_ACADEMY
@SET_DEVENT2, ARG
#DIM LCOUNT
#DIMS CDAYEV_SPLITS, 100
SIF ARG == 0 && TARGET
	ARG = TARGET

CSTR:ARG:DEVENT = %CSTR:ARG:DEVENT%%CSTR:ARG:NOW_DEVENT%
CSTR:ARG:NOW_DEVENT =

VARSET LOCALS
SPLIT CSTR:ARG:CDAYEV, "/", LOCALS
CSTR:ARG:CDAYEV =
FOR LCOUNT, 0, 100
	SELECTCASE LOCALS:LCOUNT
	CASE ""
		BREAK
	CASEELSE
		VARSET CDAYEV_SPLITS
		SPLIT LOCALS:LCOUNT, "_", CDAYEV_SPLITS
		CSTR:ARG:CDAYEV += @"%CDAYEV_SPLITS%\/"
	ENDSELECT
NEXT

@DEL_DEVENT, ARGS, ARG
#DIM LCOUNT

SIF ARG == 0 && TARGET
	ARG = TARGET

VARSET LOCALS
;イベントごとに分解する
SPLIT CSTR:ARG:DEVENT, "/", LOCALS

;一旦CSTR:DEVENTを初期化
CSTR:ARG:DEVENT =

FOR LCOUNT, 0, 100
	SELECTCASE LOCALS:LCOUNT
	;消す対称or空文字
	CASE "", ARGS
		CONTINUE
	CASEELSE
		CSTR:ARG:DEVENT = %CSTR:ARG:DEVENT%%LOCALS:LCOUNT%/
	ENDSELECT
NEXT

@DEVENTS(ARGS, ARG)
#FUNCTIONS
#DIM LCOUNT

VARSET LOCALS

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

ARGS = %ARGS%：

;イベントごとに分解する
SPLIT CSTR:ARG:DEVENT, "/", LOCALS

FOR LCOUNT, 0, 100
	SIF LOCALS:LCOUNT == ""
		BREAK
	;イベント群ARGSでないならCONTINUE
	SIF STRCOUNT(LOCALS:LCOUNT, ARGS) == 0
		CONTINUE

	;イベント名：内容 となっているので"内容"部分を抜き出す
	LOCALS:LCOUNT = %SUBSTRING(LOCALS:LCOUNT, STRLENS(ARGS), -1)%
	RETURNF LOCALS:LCOUNT
NEXT

LOCALS =
RETURNF LOCALS

;その時間帯でのARGSの選択回数を返す
@CHOSE_DEVENT(ARGS, ARG)
#FUNCTION

SIF ARG < 0
	RETURNF 0
SIF ARG == 0 && TARGET
	ARG = TARGET
RETURNF STRCOUNT(CSTR:ARG:DAILYCOM履歴, @"＠%ARGS%\/")

@SEVENT(ARGS, ARG)
#FUNCTION

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

SIF STRCOUNT(CSTR:ARG:SEVENT, @"%ARGS%\/")
	RETURNF 1
RETURNF 0

@SET_SEVENT, ARGS, ARG
SIF ARG == 0 && TARGET
	ARG = TARGET

ARGS = %ARGS%\/

;もう記録済みなら弾く
SIF STRCOUNT(CSTR:ARG:SEVENT, ARGS)
	RETURN 0
CSTR:ARG:SEVENT = %CSTR:ARG:SEVENT%%ARGS%

;-------------------------------------------------
;現在位置の判定関数。SAVESTR:現在位置 がARGSかを判定する
;ARGS:1は通常は空だが、これに文字列を入れるとSAVESTR:現在位置の代わりにARGS:1で判定する
;-------------------------------------------------
@PLACE(ARGS, ARGS:1)
#FUNCTION
#DIMS LOCATIONS

SELECTCASE ARGS:1
CASE ""
	LOCATIONS = %SAVESTR:現在位置%
CASEELSE
	LOCATIONS = %ARGS:1%
ENDSELECT

SELECTCASE ARGS
CASE "勉強可能", "髪型変更可能"
	SELECTCASE LOCATIONS
	;誰か的房間
	CASE @"%CSVCALLNAME(NO:MASTER)%的房間", @"%CSVCALLNAME(NO:TARGET)%的房間", @"%CSVCALLNAME(NO:(ASSI:1))%的房間"
		RETURNF 1
	;誰か的家
	CASE @"%CSVCALLNAME(NO:TARGET)%的家", @"%CSVCALLNAME(NO:(ASSI:1))%的家"
		RETURNF 1
	;勉強可能な部屋
	CASE "居間", "部室"
		RETURNF 1
	ENDSELECT
CASE "鞄持ち歩き中"
	SELECTCASE LOCATIONS
	CASE "做爱房", "体育倉庫", "更衣室", "保健室", "情人旅館"
		RETURNF 1
	CASE @"%CSVCALLNAME(NO:TARGET)%的房間"
		RETURNF 1
	CASE @"%CSVCALLNAME(NO:TARGET)%的家", @"%CSVCALLNAME(NO:(ASSI:1))%的家"
		RETURNF 1
	CASE "公園", "部室", "車内"
		RETURNF 1
	ENDSELECT
CASE "自室"
	SIF LOCATIONS == @"%CSVCALLNAME(NO:MASTER)%的房間"
		RETURNF 1
CASE "partner的房間"
	SIF LOCATIONS == @"%CSVCALLNAME(NO:TARGET)%的房間"
		RETURNF 1
CASE "指导者的房間"
	SIF LOCATIONS == @"%CSVCALLNAME(NO:(ASSI:1))%的房間"
		RETURNF 1
CASE "Ｈ目的"
	SELECTCASE LOCATIONS
	CASE "做爱房", "体育倉庫", "更衣室", "保健室", "情人旅館", @"%CSVCALLNAME(NO:MASTER)%的房間", @"%CSVCALLNAME(NO:TARGET)%的房間"
		RETURNF 1
	ENDSELECT
CASE "学園内"
	SELECTCASE LOCATIONS
	CASE "部室", "做爱房", "体育倉庫", "更衣室", "保健室", "学園", "文化祭"
		RETURNF 1
	ENDSELECT
CASE "出先"
	SELECTCASE LOCATIONS
	CASE "部室"
		RETURNF 0
	CASE @"%CSVCALLNAME(NO:TARGET)%的家", @"%CSVCALLNAME(NO:(ASSI:1))%的家"
		RETURNF 0
	CASEELSE
		SIF PLACE("自宅", ARGS:1)
			RETURNF 0
		RETURNF 1
	ENDSELECT
CASE "浴室"
	SELECTCASE LOCATIONS
	CASE "情人旅館"
		RETURNF 1
	CASE @"%CSVCALLNAME(NO:TARGET)%的家", @"%CSVCALLNAME(NO:(ASSI:1))%的家"
		RETURNF 1
	CASEELSE
		SIF PLACE("自宅", ARGS:1)
			RETURNF 1
		RETURNF 0
	ENDSELECT
CASE "野外"
	SELECTCASE LOCATIONS
	CASE "情人旅館"
		RETURNF 0
	CASE "公園", "車内"
		RETURNF 1
	CASEELSE
		SIF PLACE("自宅", ARGS:1) || PLACE("学園内", ARGS:1)
			RETURNF 0
		SIF COND("归途") || COND("约会中") || COND("買い物中")
			RETURNF 1
	ENDSELECT
CASE "個室"
	SELECTCASE LOCATIONS
	CASE "居間", "部室", "公園"
		RETURNF 0
	CASE @"%CSVCALLNAME(NO:TARGET)%的家", @"%CSVCALLNAME(NO:(ASSI:1))%的家"
		RETURNF 0
	CASEELSE
		RETURNF 1
	ENDSELECT
CASE "自宅"
	SELECTCASE LOCATIONS
	CASE "自室", "居間"
		RETURNF 1
	CASEELSE
		SIF STRCOUNT(LOCATIONS, "的房間")
			RETURNF 1
	ENDSELECT
CASE "partnerの自宅"
	SIF LOCATIONS == @"%CSVCALLNAME(NO:TARGET)%的家"
		RETURNF 1
CASEELSE
	SIF LOCATIONS == ARGS
		RETURNF 1
ENDSELECT

RETURNF 0

;-------------------------------------------------
;角色ARGをARGSへ移動させる関数
;-------------------------------------------------
@MOVE_PLACE, ARGS, ARG
#DIM LCOUNT
;服を更衣かの判定。居家服に着替えていたり服を脱いでいたりするとONになる
#DIM CHANGE_CLOTH

SIF ARG == 0 && TARGET
	ARG = TARGET

CHANGE_CLOTH = 0
;移動で服を着替えないシチュ
IF COND("约会中", ARG)
ELSEIF CSTR:ARG:現在位置 != ARGS
	SIF COND("居家服に着替えた", ARG) && PLACE("自宅", CSTR:ARG:現在位置) && ARGS != @"%CSVCALLNAME(NO:ARG)%的房間" && ARGS != @"%CSVCALLNAME(NO:MASTER)%的房間"
		SETBIT CHANGE_CLOTH, 0
	IF COND("全裸状態終了可能", ARG) && ARGS != @"%CSVCALLNAME(NO:ARG)%的房間" && ARGS != @"%CSVCALLNAME(NO:MASTER)%的房間"
		SETBIT CHANGE_CLOTH, 1
	;外に行く際には脱いだ服があるならそれを着る
	ELSEIF PLACE("出先", ARGS) && CSTR:ARG:脱掉的衣服一览 != ""
		SETBIT CHANGE_CLOTH, 1
	ENDIF
ENDIF

CSTR:ARG:現在位置 = %ARGS%

VARSET LOCALS
SPLIT CSTR:ARG:移動履歴, "/", LOCALS

SIF LOCALS != CSTR:ARG:現在位置
	CSTR:ARG:移動履歴 = %ARGS%\/%CSTR:ARG:移動履歴%

;居家服から便装への変化が起きたか？
SIF CHANGE_CLOTH == 0
	RETURN 0

SIF GETBIT(CHANGE_CLOTH, 1)
	CALL SET_MEMO_DRESS, "脱掉的衣服一览", ARG

SIF GETBIT(CHANGE_CLOTH, 0)
	CALL SET_COORDINATE, "便装", ARG

;-------------------------------------------------
;角色ARGがARGSへ移動済かを見る関数
;-------------------------------------------------
@CMOVE(ARGS, ARG)
#FUNCTION

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

SIF STRCOUNT(@"\/%CSTR:ARG:移動履歴%", @"\/%ARGS%\/")
	RETURNF 1
RETURNF 0

;-------------------------------------------------
;角色名のみの表示。主に喋る人が誰か分かるように表示する
;-------------------------------------------------
@PRINT_NAME, ARG
#DIMS APP_CHANGE
#DIMS DISPLAY_NAME

SIF ARG == 0 && TARGET
	ARG = TARGET
CALL PRINT_STRL, @"- _%DISPLAY_NAME(ARG)%_-"

;-------------------------------------------------
;PRINT_NAME表示に使う文字列
;-------------------------------------------------
@DISPLAY_NAME(ARG)
#FUNCTIONS
SIF ARG == 0 && TARGET
	ARG = TARGET
IF NICKNAME:ARG != ""
	RETURNF @"黄色_%NICKNAME:ARG%"
ELSE
	RETURNF @"黄色_%CALLNAME:ARG%"
ENDIF

;-------------------------------------------------
;角色名と服装の表示。主に喋る人が誰か分かるように表示する
;-------------------------------------------------
@PRINT_NAME_CLO, ARG
#DIM MEMO_pos
#DIM MEMO_ypos
#DIM NUM_ICON

NUM_ICON = 0
SIF ARG == 0 && TARGET
	ARG = TARGET
IF CHECK_CLO("身体のラインの出る格好", ARG) && CONDS("体型", ARG) != ""
	CALL PRINT_STRL, @"- _%DISPLAY_NAME(ARG)%_〈%CLO_ABOUT(ARG)%(%CONDS("体型", ARG)%)%SHOW_APP_CHANGE(ARG, " with")%〉 -"
ELSE
	CALL PRINT_STRL, @"- _%DISPLAY_NAME(ARG)%_〈%CLO_ABOUT(ARG)%%SHOW_APP_CHANGE(ARG, " with")%〉 -"
ENDIF

;-------------------------------------------------
;阴蒂ックアイコン添える版
;-------------------------------------------------
@PRINT_NAME_ICON, ARG
#DIM MEMO_pos
#DIM MEMO_ypos
#DIM FSIZE
#DIM NUM_ICON
#DIMS MEMOS
;補足
#DIMS SUBTEXT

NUM_ICON = 0
SIF ARG == 0 && TARGET
	ARG = TARGET

SUBTEXT =
IF CFLAG:ARG:Ｖ已中出 && CFLAG:ARG:Ａ已中出
	SUBTEXT = 爱心粉紅_(ＶＡ已中出)_
ELSEIF CFLAG:ARG:Ｖ已中出
	SUBTEXT = 爱心粉紅_(Ｖ已中出)_
ELSEIF CFLAG:ARG:Ａ已中出
	SUBTEXT = 爱心粉紅_(Ａ已中出)_
ENDIF

IF CHECK_CLO("身体のラインの出る格好", ARG) && CONDS("体型", ARG) != ""
	MEMOS = - _%DISPLAY_NAME(ARG)%_%SUBTEXT%〈%CLO_ABOUT(ARG)%(%CONDS("体型", ARG)%)%SHOW_APP_CHANGE(ARG, " with")%〉 -
ELSE
	MEMOS = - _%DISPLAY_NAME(ARG)%_%SUBTEXT%〈%CLO_ABOUT(ARG)%%SHOW_APP_CHANGE(ARG, " with")%〉 -
ENDIF
CALL PRINT_STR, MEMOS

IF ARG == TARGET
	FSIZE = PICSIZE(2)
	MEMO_pos = STRLENS_EX(MEMOS) + 2
	MEMO_ypos = -PICSIZE(1)/2

	LOCALS = <nobr>%HTML_POPPRINTINGSTR()%
	LOCALS += @"<button value='{290}' pos='{MEMO_pos*100/2}' title='写真撮影'><img src='照相机' height = '{FSIZE}' width = '{FSIZE}' ypos = '{MEMO_ypos}'></button>"
	NUM_ICON += 1
	IF CFLAG:茶 == 0
		LOCALS += @"<button value='{293}' pos='{(MEMO_pos + 5*NUM_ICON)*100/2}' title='泡茶'><img src='茶' height = '{FSIZE}' width = '{FSIZE}' ypos = '{MEMO_ypos}'></button>"
		NUM_ICON += 1
	ENDIF
	IF PLACE("勉強可能") && COND("勉強可能")
		LOCALS += @"<button value='{292}' pos='{(MEMO_pos + 5*NUM_ICON)*100/2}' title='一起学习'><img src='勉強' height = '{FSIZE}' width = '{FSIZE}' ypos = '{MEMO_ypos}'></button>"
		NUM_ICON += 1
	ENDIF
	IF CFLAG:睡眠 == 0
		IF COND("ながら胖次穿き替え可能") || COND("自発展示内褲可能") || COND("撩起裙子可能")
			LOCALS += @"<button value='{291}' pos='{(MEMO_pos + 5*NUM_ICON)*100/2}' title='表达胖次欲'><img src='胖次' height = '{FSIZE}' width = '{FSIZE}' ypos = '{MEMO_ypos}'></button>"
			NUM_ICON += 1
		ENDIF
	ENDIF

		LOCALS += @"<button value='{298}' pos='{(MEMO_pos + 5*NUM_ICON)*100/2}' title='颜绘ＯＮＯＦＦ'><img src='顔アイコン' height = '{FSIZE}' width = '{FSIZE}' ypos = '{MEMO_ypos}'></button>"
		NUM_ICON += 1
		LOCALS += @"<button value='{299}' pos='{(MEMO_pos + 5*NUM_ICON)*100/2}' title='下半身グラＯＮＯＦＦ'><img src='下半身アイコン' height = '{FSIZE}' width = '{FSIZE}' ypos = '{MEMO_ypos}'></button>"
		NUM_ICON += 1

	IF COND("槞彁")
		IF CEVENT("槞彁：機械翻訳OFF", MASTER)
			LOCALS += @"<button value='{1150}' pos='{(MEMO_pos + 5*NUM_ICON)*100/2}' title='機械翻訳ＯＮ（槞彁的台詞之后会出现機械翻訳）'><img src='翻訳機OFF' height = '{FSIZE}' width = '{FSIZE}' ypos = '{MEMO_ypos}'></button>"
		ELSE
			LOCALS += @"<button value='{1150}' pos='{(MEMO_pos + 5*NUM_ICON)*100/2}' title='機械翻訳ＯＦＦ（槞彁的台詞之后不再出现機械翻訳）'><img src='翻訳機' height = '{FSIZE}' width = '{FSIZE}' ypos = '{MEMO_ypos}'></button>"
		ENDIF
		NUM_ICON += 1
	ENDIF
	HTML_PRINT LOCALS
ELSE
	PRINTL
ENDIF

;-------------------------------------------------
;普段と比べて格好に変化が出てる場合にそれを描写する。@PRINT_STRの書式なのに注意
;ARGSに文字列が入っている場合には、%ARGS% %SHOW_APP_CHANGE(ARG)% となる
;-------------------------------------------------
@SHOW_APP_CHANGE(ARG, ARGS)
#FUNCTIONS
;露出の内訳で ＆ 区切りで羅列
#DIMS APP_CHANGE
;こっちは透けorチラなどで , 区切りで羅列
#DIMS APP_CHANGE_PRE
;体毛事情はAPP_CHANGEの先頭につける
#DIMS APP_CHANGE_HAIR

SIF ARG == 0 && TARGET
	ARG = TARGET

;%APP_CHANGE_PRE% %APP_CHANGE_HAIR% %APP_CHANGE% といった感じで表示する
VARSET APP_CHANGE
VARSET APP_CHANGE_PRE
VARSET APP_CHANGE_HAIR

;颜绘非表示なら髪型
IF COND("颜绘表示中", ARG) == 0
	IF CFLAG:ARG:髪型変更のお願い中
		APP_CHANGE_PRE += @"%CONDS("髪型", ARG)%,"
	ELSE
		APP_CHANGE_PRE += @"%CONDS("髪色", ARG)%%CONDS("髪型", ARG)%,"
	ENDIF
ENDIF

;露出ステータス。まずは腋
IF CHECK_CLO("腋露出", ARG)
	SELECTCASE COND("腋毛", ARG)
	CASE IS >= 7
		APP_CHANGE_HAIR += @"%TEXTS("腋")%毛(%CONDS("腋毛", ARG)%)＆"
	CASE IS >= 5
		APP_CHANGE_HAIR += @"%TEXTS("腋")%毛＆"
	CASE 4
		SELECTCASE CONDS("腋毛", ARG)
		CASE "剃过留痕"
			APP_CHANGE_HAIR += @"%TEXTS("腋")%(%CONDS("腋毛", ARG)%)＆"
		CASE "刺啦刺啦"
			APP_CHANGE_HAIR += @"刺啦刺啦の%TEXTS("腋")%＆"
		CASEELSE
			APP_CHANGE_HAIR += @"%TEXTS("腋")%毛(%CONDS("腋毛", ARG)%)＆"
		ENDSELECT
	CASE 1, 3
		APP_CHANGE_HAIR += @"光滑无毛の%TEXTS("腋")%＆"
	CASE 2
		APP_CHANGE_HAIR += @"脱毛済の%TEXTS("腋")%＆"
	CASEELSE
		APP_CHANGE_HAIR += @"%TEXTS("腋")%＆"
	ENDSELECT
ENDIF

;胸
SIF CHECK_CLO("没穿外衣", ARG)
	APP_CHANGE_PRE += "没穿外衣,"

IF CHECK_CLO("乳頭露出", ARG)
	SIF TALENT:ARG:乳环
		APP_CHANGE += "乳頭穿環＆"
	IF COND("陥没乳頭", ARG)
		APP_CHANGE += "陥没乳頭＆"
	ELSEIF COND("乳頭肥大", ARG)
		APP_CHANGE += "デカ乳頭＆"
	ELSEIF TALENT:ARG:乳环 == 0
		APP_CHANGE += "乳頭＆"
	ENDIF
	SIF COND("巨乳輪", ARG)
		APP_CHANGE += "巨乳輪＆"
;乳輪チラ
ELSEIF EQUIP:ARG:胸罩 + EQUIP:ARG:贴身制服 && CHECK_CLO("乳輪露出", ARG)
	APP_CHANGE_PRE += "_爱心粉紅_乳輪チラ_,"
ELSEIF COND("胸罩透け", ARG)
	IF EQUIP:ARG:胸罩 && CHECK_BRA("乳頭露出", ARG) == 0
		APP_CHANGE_PRE += "_爱心粉紅_胸罩透け_,"
	ELSEIF TALENT:ARG:乳环
		APP_CHANGE_PRE += "_爱心粉紅_乳頭穿環透け_,"
	ELSE
		APP_CHANGE_PRE += "_爱心粉紅_乳頭透け_,"
	ENDIF
ELSEIF TALENT:ARG:巨乳 && EQUIP:ARG:服 + EQUIP:ARG:贴身制服 && CHECK_CLO("谷間露出", ARG)
	APP_CHANGE += "谷間＆"
ENDIF

;肚臍
IF CHECK_CLO("露脐", ARG)
	IF TALENT:ARG:肚脐环
		APP_CHANGE += "肚臍ピ＆"
	ELSEIF EQUIP:ARG:服 + EQUIP:ARG:贴身制服
		APP_CHANGE += "ヘソ＆"
	ENDIF
	;IF EQUIP:ARG:服 + EQUIP:ARG:贴身制服 == 0 && TALENT:ARG:筋肉
	;	IF COND("苗条", ARG)
	;		APP_CHANGE += "隐约腹肌＆"
	;	ELSE
	;		APP_CHANGE += "腹筋＆"
	;	ENDIF
	;ENDIF
ENDIF

;ハミ毛など
IF CHECK_CLO("ハミ毛", ARG)
	APP_CHANGE_PRE += @"ハミ毛(%CONDS("陰毛", ARG)%),"
ELSEIF CHECK_CLO("透け毛", ARG)
	APP_CHANGE_PRE += @"透け毛(%CONDS("陰毛", ARG)%),"
;陰毛の状態がしっかり見えている状態
ELSEIF CHECK_CLO("股間露出", ARG) || CHECK_CLO("陰毛露出", ARG)
	;腋毛の状態も見えているなら書き直す
	IF CHECK_CLO("腋露出", ARG) && COND("陰毛と腋毛の状態ほぼ一緒", ARG)
		SELECTCASE COND("陰毛", ARG)
		CASE IS >= 6
			APP_CHANGE_HAIR = %TEXTS("腋")%毛と陰毛(%CONDS("陰毛", ARG)%)＆
		CASE 5
			IF CEVENT("陰毛の名称", ARG)
				APP_CHANGE_HAIR = %TEXTS("腋")%毛と陰毛(%CEVENTS("陰毛の名称", ARG)%)＆
			ELSE
				APP_CHANGE_HAIR = %TEXTS("腋")%毛と陰毛(%CONDS("陰毛", ARG)%)＆
			ENDIF
		CASE 4
			APP_CHANGE_HAIR = 刺啦刺啦の%TEXTS("腋")%と下腹部＆
		CASE 1, 3
			APP_CHANGE_HAIR = 光滑无毛の%TEXTS("腋")%と股間＆
		CASE 2
			APP_CHANGE_HAIR = 脱毛済の%TEXTS("腋")%と股間＆
		CASEELSE
			APP_CHANGE_HAIR = %TEXTS("腋")%と股間＆
		ENDSELECT
	ELSE
		SELECTCASE COND("陰毛", ARG)
		CASE 5
			IF CEVENT("陰毛の名称", ARG)
				APP_CHANGE_HAIR += @"陰毛(%CEVENTS("陰毛の名称", ARG)%)＆"
			ELSE
				APP_CHANGE_HAIR += @"陰毛(%CONDS("陰毛", ARG)%)＆"
			ENDIF
		CASE IS >= 4
			APP_CHANGE_HAIR += @"陰毛(%CONDS("陰毛", ARG)%)＆"
		CASE 1, 3
			SELECTCASE CONDS("陰毛", ARG)
			CASE "光滑无毛", "白虎"
				APP_CHANGE_HAIR += "光滑无毛の下腹部＆"
			CASEELSE
				IF AGE(ARG) >= 4
					APP_CHANGE_HAIR += "刺啦刺啦の下腹部＆"
				ELSE
					APP_CHANGE_HAIR += "有明显的剃痕＆"
				ENDIF
			ENDSELECT
		CASE 2
			APP_CHANGE_HAIR += "脱毛完的股間＆"
		CASEELSE
			APP_CHANGE_HAIR += "股間＆"
		ENDSELECT
	ENDIF
	SIF TALENT:ARG:恥丘穿環
		APP_CHANGE += "恥丘穿環＆"
;鼠径部のみ見えている
ELSEIF CHECK_CLO("鼠径部露出", ARG)
	APP_CHANGE += "鼠径部＆"
ENDIF

;淫紋は状態で色が変わる
IF CHECK_CLO("淫紋露出", ARG)
	IF CFLAG:ARG:Ｖ已中出 || (TALENT:ARG:男性 && CFLAG:ARG:Ａ已中出)
		APP_CHANGE += "_爱心粉紅_淫紋_＆"
	ELSEIF CFLAG:ARG:躁动难忍 || COND("欲求不満", ARG) >= 2
		APP_CHANGE += "_粉紅_淫紋_＆"
	ELSEIF COND("排卵中", ARG)
		APP_CHANGE += "_ショッキング粉紅_淫紋_＆"
	ELSEIF COND("危険日", ARG)
		APP_CHANGE += "_イエロー_淫紋_＆"
	ELSE
		APP_CHANGE += "淫紋＆"
	ENDIF
ENDIF

APP_CHANGE = %APP_CHANGE_HAIR%%APP_CHANGE%
;最後に＆が付いてるのでそれを消す
SIF APP_CHANGE != ""
	APP_CHANGE = %SUBSTRING(APP_CHANGE, 0, STRLENS(APP_CHANGE) - 2)%露出,

SIF APP_CHANGE_PRE != ""
	APP_CHANGE = %APP_CHANGE_PRE%%APP_CHANGE%

SIF APP_CHANGE != ""
	APP_CHANGE = %ARGS% %SUBSTRING(APP_CHANGE, 0, STRLENS(APP_CHANGE) - 1)%

RETURNF APP_CHANGE

;-------------------------------------------------
;@PRINT_NAME_CLOの胖次版
;-------------------------------------------------
@PRINT_NAME_PANTU, ARG
#DIMS APP_CHANGE
#DIM LCOUNT
;衣装の記録
#DIMS MEMO_CLO, 50
#DIM MEMO_EQUIP, 50
#DIM MEMO_STAIN, 20

SIF ARG == 0 && TARGET
	ARG = TARGET

;着ていた服と汚れを記憶する
FOR LCOUNT, 40, 50
	MEMO_CLO:LCOUNT = %CSTR:ARG:LCOUNT%
NEXT
FOR LCOUNT, 40, 50
	MEMO_EQUIP:LCOUNT = EQUIP:ARG:LCOUNT
NEXT
FOR LCOUNT, 10, 20
	MEMO_STAIN:LCOUNT = STAIN:ARG:LCOUNT
NEXT

;胖次が見えるようにする
CALL SET_SKIRT, "", ARG
CALL SET_BODYS, "", ARG
CALL SET_OUTER, "", ARG

IF EQUIP:ARG:胖次
	CALL PRINT_STRL, @"- _%DISPLAY_NAME(ARG)%_〈%PANTIES(ARG)%%SHOW_APP_PANTU(ARG, " with")%〉 -"
ELSE
	CALL PRINT_STRL, @"- _%DISPLAY_NAME(ARG)%_〈_爱心粉紅_没穿内褲_%SHOW_APP_PANTU(ARG, " with")%〉 -"
ENDIF

;着ていた服と汚れを戻す
FOR LCOUNT, 40, 50
	CSTR:ARG:LCOUNT = %MEMO_CLO:LCOUNT%
NEXT
FOR LCOUNT, 40, 50
	EQUIP:ARG:LCOUNT = MEMO_EQUIP:LCOUNT
NEXT
FOR LCOUNT, 10, 20
	STAIN:ARG:LCOUNT = MEMO_STAIN:LCOUNT
NEXT

@SHOW_APP_PANTU(ARG, ARGS)
#FUNCTIONS
#DIMS APP_PANTU

SIF ARG == 0 && TARGET
	ARG = TARGET

VARSET APP_PANTU

;まずは露出ステータス
IF CHECK_CLO("陰毛露出", ARG)
	APP_PANTU += @"陰毛(%CONDS("陰毛", ARG)%)＆"
ELSEIF COND("調教中", ARG)
	SIF COND("陰毛", ARG) && CHECK_CLO("Ｖ露出")
		APP_PANTU += @"陰毛(%CONDS("陰毛", ARG)%)＆"
ENDIF

IF EQUIP:ARG:胖次 == 0
ELSEIF CHECK_CLO("股間露出", ARG)
	SELECTCASE COND("陰毛", ARG)
	CASE 1 TO 3
		APP_PANTU += @"股間(%CONDS("陰毛", ARG)%)＆"
	CASEELSE
		APP_PANTU += "股間＆"
	ENDSELECT
;ELSEIF CHECK_CLO("大陰唇露出", ARG)
;	APP_PANTU += "大陰唇＆"
ELSEIF CHECK_CLO("鼠径部露出", ARG)
	APP_PANTU += "鼠径部＆"
ENDIF
;状態で色が変わる。分かる人は分かる
IF CHECK_CLO("淫紋露出", ARG)
	IF CFLAG:ARG:Ｖ已中出 || (TALENT:ARG:男性 && CFLAG:ARG:Ａ已中出)
		APP_PANTU += "_爱心粉紅_淫紋_＆"
	ELSEIF CFLAG:ARG:躁动难忍 || COND("欲求不満", ARG) >= 2
		APP_PANTU += "_粉紅_淫紋_＆"
	ELSEIF COND("排卵中", ARG)
		APP_PANTU += "_ショッキング粉紅_淫紋_＆"
	ELSEIF COND("危険日", ARG)
		APP_PANTU += "_イエロー_淫紋_＆"
	ELSE
		APP_PANTU += "淫紋＆"
	ENDIF
ENDIF

SIF APP_PANTU != ""
	APP_PANTU = %SUBSTRING(APP_PANTU, 0, STRLENS(APP_PANTU) - 2)%露出,

IF CHECK_CLO("ハミ毛", ARG)
	APP_PANTU += @"ハミ毛(%CONDS("陰毛", ARG)%),"
ELSEIF CHECK_CLO("透け毛", ARG)
	APP_PANTU += @"透け毛(%CONDS("陰毛", ARG)%),"
ENDIF

SIF APP_PANTU != ""
	APP_PANTU = %ARGS% %SUBSTRING(APP_PANTU, 0, STRLENS(APP_PANTU) - 1)%

RETURNF APP_PANTU

;-------------------------------------------------
;@STAIN_CALC_COSPLAYの日常版
;欲求不満度が上昇した際に呼ばれ、値によって闷热的たり湿的たりが起きる。ARGが欲求不満の増分
;-------------------------------------------------
@STAIN_CALC_DAILY, ARG, ARG:1
#DIM ACTOR
#DIM VALUE

ACTOR = ARG:1
SIF ACTOR == 0 && TARGET > 0
	ACTOR = TARGET

VALUE = ARG + TALENT:ACTOR:容易濕 - TALENT:ACTOR:不易濕
IF COND("浑身是汗", ACTOR)
	VALUE += 3
ELSEIF COND("易出汗", ACTOR)
	VALUE += 1
ENDIF

;汚れの時間差をつけるため胖次に付く汚れは前回までのものを使う
IF EQUIP:ACTOR:胖次 && CHECK_PANTIES("開洞", ACTOR)
	SIF CHECK_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
		STAIN:ACTOR:胖次 = SET_STAIN(STAIN:ACTOR:胖次, "闷热的")
	SIF VALUE > 0 && CHECK_STAIN(STAIN:ACTOR:Ｖ, "湿的")
		STAIN:ACTOR:胖次 = SET_STAIN(STAIN:ACTOR:胖次, "湿的")
	SIF CHECK_STAIN(STAIN:ACTOR:Ｖ, "精液")
		STAIN:ACTOR:胖次 = SET_STAIN(STAIN:ACTOR:胖次, "精液")
ELSEIF EQUIP:ACTOR:外套 && CHECK_OUTER("開洞", ACTOR)
	SIF CHECK_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
		STAIN:ACTOR:外套 = SET_STAIN(STAIN:ACTOR:外套, "闷热的")
	SIF VALUE > 0 && CHECK_STAIN(STAIN:ACTOR:Ｖ, "湿的")
		STAIN:ACTOR:外套 = SET_STAIN(STAIN:ACTOR:外套, "湿的")
	SIF CHECK_STAIN(STAIN:ACTOR:Ｖ, "精液")
		STAIN:ACTOR:外套 = SET_STAIN(STAIN:ACTOR:外套, "精液")
ELSEIF EQUIP:ACTOR:贴身制服 && CHECK_BODYS("開洞", ACTOR)
	SIF CHECK_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
		STAIN:ACTOR:贴身制服ボトム = SET_STAIN(STAIN:ACTOR:贴身制服ボトム, "闷热的")
	SIF VALUE > 0 && CHECK_STAIN(STAIN:ACTOR:Ｖ, "湿的")
		STAIN:ACTOR:贴身制服ボトム = SET_STAIN(STAIN:ACTOR:贴身制服ボトム, "湿的")
	SIF CHECK_STAIN(STAIN:ACTOR:Ｖ, "精液")
		STAIN:ACTOR:贴身制服ボトム = SET_STAIN(STAIN:ACTOR:贴身制服ボトム, "精液")
ENDIF

SIF TALENT:ACTOR:男性 || ARG <= 0 || VALUE <= 0
	RETURN 0

;Ｖ汚れの発生
SELECTCASE COND("欲求不満", ACTOR)
CASE IS >= 3
	IF VALUE >= 3 && CHECK_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
		STAIN:ACTOR:Ｖ = SET_STAIN(STAIN:ACTOR:Ｖ, "湿的")
	ELSE
		STAIN:ACTOR:Ｖ = SET_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
	ENDIF
CASE 2
	IF VALUE >= 5 && CHECK_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
		STAIN:ACTOR:Ｖ = SET_STAIN(STAIN:ACTOR:Ｖ, "湿的")
	ELSE
		STAIN:ACTOR:Ｖ = SET_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
	ENDIF
CASE 1
	IF VALUE >= 7 && CHECK_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
		STAIN:ACTOR:Ｖ = SET_STAIN(STAIN:ACTOR:Ｖ, "湿的")
	ELSEIF VALUE >= 3
		STAIN:ACTOR:Ｖ = SET_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
	ENDIF
CASE 0
	SIF VALUE >= 5
		STAIN:ACTOR:Ｖ = SET_STAIN(STAIN:ACTOR:Ｖ, "闷热的")
ENDSELECT

;-------------------------------------------------
;STR:選択肢 から禁止の物を除く
;-------------------------------------------------
@SELECT_BAN
#DIM LCOUNT

SIF STR:禁止選択肢 == ""
	RETURN 0

VARSET LOCALS
SPLIT STR:選択肢, "/", LOCALS
STR:選択肢 =
STR:禁止選択肢 = /%STR:禁止選択肢%/

FOR LCOUNT, 0, 100
	SELECTCASE LOCALS:LCOUNT
	CASE ""
		BREAK
	CASEELSE
		SIF STRCOUNT(STR:禁止選択肢, @"/%LOCALS:LCOUNT%/")
			CONTINUE
	ENDSELECT
	STR:選択肢 += @"%LOCALS:LCOUNT%/"
NEXT


code:
@TEST_NTR
	#DIM LCOUNT
	#DIM NEXT_LINE
	#DIM CHOICE
	PRINTFORML 用于测试路人受精
	PRINTFORML 选择授精对象
	STR:選択肢 =
	STR:選択肢 += "[1]便利店店员/[2]公园厕所中不认识的男人/[3]公园露出中只有一面之缘的男人/[4]教会的孩子/"
	STR:選択肢 += "[5]学校的老师/[6]不认识的同学/[7]高年级的学长/[8]体育课的助教/[9]生理课老师/[10]做爱部的大叔/[11]做爱部的部员/"

	CALL SELECT_BAN
		VARSET LOCALS
		SPLIT STR:選択肢, "/", LOCALS
		NEXT_LINE = 0
		FOR LCOUNT, 0, 100
			;まずは色だけチェック
			SELECTCASE LOCALS:LCOUNT
			CASE "灰色", "水色", "爱心粉紅", "青", "緑", "緑色", "黄色"
				;すでに指定色になっている場合は色変換を止める
				IF GETCOLOR() != DEF_COLOR(LOCALS:LCOUNT)
					SETCOLOR DEF_COLOR(LOCALS:LCOUNT)
					CONTINUE
				ENDIF
			ENDSELECT

			SELECTCASE LOCALS:LCOUNT
			CASE ""
				BREAK
			CASE "太字"
				FONTSTYLE 1
				CONTINUE
			CASE "改行"
				SIF NEXT_LINE%5
					PRINTL
				NEXT_LINE = 0
				CONTINUE
			CASE "DRAWLINE"
				IF NEXT_LINE%5
					NEXT_LINE = 0
					PRINTL
				ENDIF
				DRAWLINE
				CONTINUE
			ENDSELECT

			;太字にした？
			IF GETBIT(GETSTYLE(), 0)
				SELECTCASE LOCALS:LCOUNT
				CASE "NOBUTTON"
					PRINTPLAINFORM %TEXT_LJ("", 21)%
				CASEELSE
					PRINTFORM %TEXT_LJ(LOCALS:LCOUNT, 21)%
				ENDSELECT
			ELSE
				SELECTCASE LOCALS:LCOUNT
				CASE "NOBUTTON"
					PRINTPLAINFORM %TEXT_LJ("", 24)%
				CASEELSE
					PRINTFORM %TEXT_LJ(LOCALS:LCOUNT, 24)%
				ENDSELECT
			ENDIF
			FONTREGULAR
			RESETCOLOR

			NEXT_LINE += 1
			SIF NEXT_LINE%5 == 0
				PRINTL
		NEXT
	INPUT
	CHOICE = RESULT
	;PRINTFORM {CHOICE}
	SELECTCASE CHOICE
		CASE 1
			CALL NTR_NINISHIN, TARGET, "便利店店员"
		CASE 2
			CALL NTR_NINISHIN, TARGET, "公园厕所中不认识的男人"
		CASE 3
			CALL NTR_NINISHIN, TARGET, "公园露出中只有一面之缘的男人"
		CASE 4
			CALL NTR_NINISHIN, TARGET, "教会的孩子"
		CASE 5
			CALL NTR_NINISHIN, TARGET, "学校的老师"
		CASE 6
			CALL NTR_NINISHIN, TARGET, "不认识的同学"
		CASE 7
			CALL NTR_NINISHIN, TARGET, "高年级的学长"
		CASE 8
			CALL NTR_NINISHIN, TARGET, "体育课的助教"
		CASE 9
			CALL NTR_NINISHIN, TARGET, "生理课老师"
		CASE 10
			CALL NTR_NINISHIN, TARGET, "做爱部的大叔"
		CASE 11
			CALL NTR_NINISHIN, TARGET, "做爱部的部员"
	ENDSELECT

@NTR_NINISHIN, ARG, ARGS
	#DIM NUM
	;PRINTFORML %ARGS%
	NUM = 500 + RAND:100
	CALL CHECK_PREGNANT, ARG,NUM,ARGS,
	CALL CHECK_NINSHIN, ARG

@NTR_TRAIN_TEST
	CALL NTR_TRAIN, TARGET

@NTR_TRAIN, ARG
	#DIM LCOUNT
	VARSET LOCALS
	SPLIT NTR_TRAIN_TABLE(), "/", LOCALS
	FOR LCOUNT, 0, 5
		SELECTCASE LOCALS:LCOUNT
			CASE "拥抱"
				PRINTFORMW 这里是拥抱口上
				PRINTFORMW 这里是拥抱经验增加
			CASE "爱抚"
				PRINTFORMW 这里是爱抚口上
				PRINTFORMW 这里是爱抚经验增加
			CASE "亲吻"
				PRINTFORMW 这里是亲吻口上
				PRINTFORMW 这里是爱抚经验增加
			CASE "侍奉"
				PRINTFORMW 这里是侍奉口上
				PRINTFORMW 这里是侍奉经验增加
			CASE "性交"
				PRINTFORMW 这里是性交口上
				PRINTFORMW 这里是性交经验增加
		ENDSELECT
	NEXT
	PRINTFORMW
	PRINTFORMW 结束

@NTR_TRAIN_TABLE()
	#FUNCTIONS
	#DIM LCOUNT
	#DIMS NTR_TABLE
	;拥抱/爱抚/亲吻/侍奉/性交
	NTR_TABLE = 爱抚/
	SIF !CEVENT("做爱部成员",TARGET)
		RETURNF NTR_TABLE
	FOR LCOUNT, 1, 5
		SELECTCASE CFLAG:TARGET:做爱部部员等级
			CASE 1
			CASE 2
				IF RAND:5 < 2
					NTR_TABLE += "爱抚/"
					CONTINUE
				ENDIF
				IF RAND:3 < 2
					NTR_TABLE += "亲吻/"
					CONTINUE
				ENDIF
				NTR_TABLE += "拥抱/"
			CASE 3
				IF RAND:3 == 0
					NTR_TABLE += "侍奉/"
					CONTINUE
				ENDIF
				IF RAND:5 < 2
					NTR_TABLE += "爱抚/"
					CONTINUE
				ENDIF
				IF RAND:3 < 2
					NTR_TABLE += "亲吻/"
					CONTINUE
				ENDIF
				NTR_TABLE += "拥抱/"
			CASE 4
				IF RAND:3 == 0
					NTR_TABLE += "性交/"
					CONTINUE
				ENDIF
				IF RAND:2 == 0
					NTR_TABLE += "侍奉/"
					CONTINUE
				ENDIF
				IF RAND:5 < 2
					NTR_TABLE += "爱抚/"
					CONTINUE
				ENDIF
				IF RAND:3 < 2
					NTR_TABLE += "亲吻/"
					CONTINUE
				ENDIF
				NTR_TABLE += "拥抱/"
		ENDSELECT
	NEXT
	RETURNF NTR_TABLE

; NTRS_SYSTEM经验统计与打印
@NTRS_EXP_SUMMARY(ARG:0)
#DIM EXP_VALUE

PRINTFORML
DRAWLINE
PRINTFORML
PRINTFORML
PRINTFORML
PRINTFORML
PRINTFORML
PRINTFORML [%CALLNAME:TARGET%]
A = 0	;精液经验
IF CEVENT("NTRS_露出")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	EXP:露出経験 += EXP_VALUE
	PRINTFORML 露出経験 +{EXP_VALUE}
	IF RAND:2 == 0
		CALL GET_EXP(ARG:0)
		EXP_VALUE = RESULT:0
		EXP:羞恥快楽経験 += EXP_VALUE
		PRINTFORML 羞恥快楽経験 +{EXP_VALUE}
	ENDIF
ENDIF
IF CEVENT("NTRS_接吻")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = (RESULT:0)/3
	EXP:接吻経験 += EXP_VALUE
	PRINTFORML 接吻経験 +{EXP_VALUE}
ENDIF
IF CEVENT("NTRS_口交")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	EXP:口交経験 += EXP_VALUE
	PRINTFORML 口交経験 +{EXP_VALUE}
	A += RAND:2
ENDIF
IF CEVENT("NTRS_乳交")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	EXP:乳交経験 += EXP_VALUE
	PRINTFORML 乳交経験 +{EXP_VALUE}
	A += RAND:2
ENDIF
IF CEVENT("NTRS_性交")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	EXP:Ｖ性交経験 += EXP_VALUE
	PRINTFORML Ｖ性交経験 +{EXP_VALUE}
	A += RAND:2
ENDIF
IF CEVENT("NTRS_肛交")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	EXP:Ａ性交経験 += EXP_VALUE
	PRINTFORML Ａ性交経験 +{EXP_VALUE}
	A += RAND:2
ENDIF
IF CEVENT("NTRS_绝顶")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	EXP:絶頂経験 += EXP_VALUE
	PRINTFORML 絶頂経験 +{EXP_VALUE}
ENDIF
IF CEVENT("NTRS_精飲")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	EXP:精飲経験 += EXP_VALUE
	PRINTFORML 精飲経験 +{EXP_VALUE}
	A += 1
ENDIF
IF CEVENT("NTRS_爱抚")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	PRINTFORML 爱抚経験 +{EXP_VALUE}
ENDIF
IF CEVENT("NTRS_精液接触")
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	PRINTFORML 精液接触経験 +{EXP_VALUE}
	A += 1
ENDIF
IF A > 0
	CALL GET_EXP(ARG:0)
	EXP_VALUE = RESULT:0
	EXP:精液経験 += A
	PRINTFORML 精液経験 +{A}
ENDIF
CALL DEL_CEVENT, "NTRS_发生"
CALL DEL_CEVENT, "NTRS_接吻"
CALL DEL_CEVENT, "NTRS_口交"
CALL DEL_CEVENT, "NTRS_乳交"
CALL DEL_CEVENT, "NTRS_性交"
CALL DEL_CEVENT, "NTRS_肛交"
CALL DEL_CEVENT, "NTRS_绝顶"
CALL DEL_CEVENT, "NTRS_精飲"
CALL DEL_CEVENT, "NTRS_露出"
CALL DEL_CEVENT, "NTRS_爱抚"
CALL DEL_CEVENT, "NTRS_精液接触"
PRINTFORMW

@GET_EXP(ARG:0)
#DIM BASE_EXP
#DIM ABL_LV
#DIM GUST_SKILL
#DIM RESULT_EXP

ABL_LV = 1
BASE_EXP = 1
GUST_SKILL = ARG:0
SIF GUST_SKILL == 0
	GUST_SKILL = 1
IF TALENT:淫乱
	BASE_EXP += 3+RAND:3
	ABL_LV += 1
ENDIF
IF MARK:淫紋
	BASE_EXP += 5+RAND:3
	ABL_LV += 1
ENDIF
IF TALENT:淫壷
	BASE_EXP += 2+RAND:3
	ABL_LV += 1
ENDIF
RESULT_EXP = BASE_EXP + ABL_LV*(GUST_SKILL + 2+RAND:4)
RESULT:0 = RESULT_EXP
RETURN RESULT

@KISS_VOICE,ARG:0
#DIM LOOP_NUM
#DIM LCOUNT
#DIM RAND_BEFORE
#DIM RAND_NOW

RAND_BEFORE = 0
PRINTFORML
PRINTFORML
LOOP_NUM = ARG:0
FOR LCOUNT, 0, LOOP_NUM
	RAND_NOW = RAND:20
	WHILE (RAND_BEFORE == RAND_NOW)
		RAND_NOW = RAND:20
	WEND
	RAND_BEFORE = RAND_NOW
	IF RAND_NOW == 0
		CALL PRINT_STRW, @"「嗯~啾——啾噜~嗯噗 _HH_　」"
	ELSEIF RAND_NOW == 1
		CALL PRINT_STRW, @"「啾_HH_　嗯……啾嗚、啾_HH_嗯！！—— _HH_」"
	ELSEIF RAND_NOW == 2
		CALL PRINT_STRW, @"「嗯_HH_　哈……嗯嗚 _HH_　」"
	ELSEIF RAND_NOW == 3
		CALL PRINT_STRW, @"「啾啵、啾、咧捋~」"
	ELSEIF RAND_NOW == 4
		CALL PRINT_STRW, @"「嗯呜!?  嗯啾~~啾~」"
	ELSEIF RAND_NOW == 5
		CALL PRINT_STRW, @"「嗯_HH_、啾芙……啾噜、啾卜啾卜~_HH_」"
	ELSEIF RAND_NOW == 6
		CALL PRINT_STRW, @"「嗯_HH_、啾噜~~，啾噜_HH_」"
	ELSEIF RAND_NOW == 7
		CALL PRINT_STRW, @"「唔呣~啊_HH_、唔呣、嗯呜~~」"
	ELSEIF RAND_NOW == 8
		CALL PRINT_STRW, @"「咕噜~~、噗_HH_、咕噜~~、噗呣~~」"
	ELSEIF RAND_NOW == 9
		CALL PRINT_STRW, @"「啊_HH_、嗯~~、啊~~、啾~~、啊~~、嗯_HH_」"
	ELSEIF RAND_NOW == 10
		CALL PRINT_STRW, @"「呜_HH_、啊~~、嗯~~、呜呣~~、啊~~、嗯呜~~」"
	ELSEIF RAND_NOW == 11
		CALL PRINT_STRW, @"「嗯唔……嗯呣」"
	ELSEIF RAND_NOW == 12
		CALL PRINT_STRW, @"「啾_HH_　嗯……啾咕、啾_HH_　」"
	ELSEIF RAND_NOW == 13
		CALL PRINT_STRW, @"「嗯_HH_　哈……嗯咕 _HH_」"
	ELSEIF RAND_NOW == 14
		CALL PRINT_STRW, @"「啾啵、啾_HH_、咧捋~~」"
	ELSEIF RAND_NOW == 15
		CALL PRINT_STRW, @"「嗯呜!? 嗯啾~~嗯~」"
	ELSEIF RAND_NOW == 16
		CALL PRINT_STRW, @"「嗯_HH_、啾芙……啾噜、啾卜啾卜~_HH_」"
	ELSEIF RAND_NOW == 17
		CALL PRINT_STRW, @"「唔……唔啊~」"
	ELSEIF RAND_NOW == 18
		CALL PRINT_STRW, @"「嗯呣呣~　唔呣_HH_……」"
	ELSEIF RAND_NOW == 19
		CALL PRINT_STRW, @"「啾_HH_——啾，嗯啾——」"
	ELSE
		CALL PRINT_STRW, @"「嗯唔、嗯呣_HH_……嗯呜……」"
	ENDIF
NEXT
PRINTFORML
PRINTFORML

@GENBU_DECRIPTION,ARG:0
#FUNCTIONS
#DIM SIZE ;大小	( 0: 短小, 1: 普通, 2: 巨根, 3: 馬根, 4: 腕粗, 5: 规格外 )
#DIMS TEXT_0
SIZE = ARG:0
LOCALS = ""
IF SIZE == 0
	LOCALS = %TEXTR("未成熟/小孩子般")%的
ELSEIF SIZE == 1
	LOCALS = %TEXTR("优秀/立派/看起来很美味")%的
ELSEIF SIZE == 2
	LOCALS = %TEXTR("凶猛/特别长度/格外粗壮")%的
ELSE
	LOCALS = %TEXTR("硕大/如同馬根一般/惊人尺寸")%的
ENDIF
TEXT_0 = %TEXTR("肉棒/阴茎/鸡巴")%
LOCALS += TEXT_0
RETURNF LOCALS

	;-------TEST--------
;@ADD_COUNTCEVENT(ARGS, ARG)
;	#DIM LCOUNT
;	#DIMS TEMP
;	SIF ARG <= 0
;		ARG = TARGET
;	LCOUNT = 1
;	;有CEVENT(ARGS), 说明不是计数 1
;	IF CEVENT(ARGS, ARG)
;		PRINTFORMW IF
;		$LOOP_BEGIN
;			IF CEVENT(TEMP, ARG)
;				PRINTFORMW IF
;				;
;				TEMP = %ARGS%{LCOUNT}
;				PRINTFORMW %TEMP%x
;				CALL DEL_CEVENT(TEMP, ARG;)
;				SIF CEVENT(TEMP, ARG)
;					PRINTFORMW 未删除
;				;PRINTFORMW {LCOUNT}
;				LCOUNT = LCOUNT + 1
;				;PRINTFORMW {LCOUNT}
;				TEMP = %ARGS%{LCOUNT}
;				PRINTFORMW %TEMP%
;				CALL SET_CEVENT(TEMP, ARG)
;				SIF CEVENT(TEMP, ARG)
;					PRINTFORMW 添加
;			ELSE
;				PRINTFORMW ELSE
;				LCOUNT += 1
;				TEMP = %ARGS%{LCOUNT}
;				PRINTFORMW {LCOUNT}
;				GOTO LOOP_BEGIN
;			ENDIF
;	;说明是计数 1
;	ELSE
;		PRINTFORMW ELSE
;		CALL SET_CEVENT(ARGS, ARG)
;		TEMP = %ARGS%1
;		CALL SET_CEVENT(TEMP, ARG)
;	ENDIF
;	PRINTFORMW %TEMP%
;
;@SUB_COUNTCEVENT(ARGS, ARG)
;	#DIM LCOUNT
;	#DIMS TEMP
;	LCOUNT = 1
;	SIF ARG <= 0
;		ARG = TARGET
;	; 说明不是计数 0
;	IF CEVENT(ARGS, ARG)
;		$LOOP_BEGIN
;		TEMP = %ARGS%{LCOUNT}
;		;此时说明计数 1, 减少到0
;		IF CEVENT(TEMP, ARG) && LCOUNT == 1
;			CALL DEL_CEVENT(TEMP, ARG)
;			CALL DEL_CEVENT(ARGS, ARG)
;		;此时不是计数 1, 减少1
;		ELSEIF CEVENT(TEMP, ARG)
;			CALL DEL_CEVENT(TEMP, ARG)
;			LCOUNT -= 1
;			TEMP = %ARGS%{LCOUNT}
;			CALL SET_CEVENT(TEMP, ARG)
;		ELSE
;			LCOUNT += 1
;			GOTO LOOP_BEGIN
;		ENDIF
;	; 说明计数 0
;	ELSE
;	ENDIF
;	PRINTFORMW %TEMP%
;
;@COUNTCEVENT(ARGS, ARG)
;	#FUNCTION
;	#DIM LCOUNT
;	#DIMS TEMP
;	LCOUNT = 1
;	SIF ARG <= 0
;		ARG = TARGET
;	;说明计数不为0
;	IF CEVENT(ARGS, ARG)
;		$LOOP_BEGIN
;		TEMP = %ARGS%{LCOUNT}
;		IF CEVENT(TEMP, ARG)
;			RETURNF LCOUNT
;		ELSE
;			LCOUNT += 1
;			GOTO LOOP_BEGIN
;		ENDIF
;	;说明计数为0
;	ELSE
;		RETURNF 0
;	ENDIF

;@TEST_ADD
;	CALL ADD_COUNTCEVENT("测试countcevent", TARGET)
;
;@TEST_SUB
;	CALL SUB_COUNTCEVENT("测试countcevent", TARGET)
;
;@TEST_COUNT
;	#DIM TEMP
;	TEMP = COUNTCEVENT("测试countcevent", TARGET)
;	PRINTFORMW %TEMP%

license: unknown


code:
@SELECT_ENDING
#DIM LCOUNT
#DIM NO_END
#DIM CHOICE
#DIMS NAME_END, 100

NO_END = 0
VARSET NAME_END
VARSET LOCALS
SPLIT STR:エンディング, "/", LOCALS

PRINTFORML どれを見ますか？
FOR LCOUNT, 0, 60
	SIF LOCALS:LCOUNT == ""
		BREAK
	NO_END = TOINT(EXTSTR(LOCALS:LCOUNT, "", "_") )
	NAME_END:NO_END = %EXTSTR(LOCALS:LCOUNT, "_")%

	PRINTFORM  [{NO_END, 2}] %NAME_END:NO_END%
	;閲覧済み？
	SIF CEVENT(NAME_END:NO_END)
		PRINTFORM （閲覧済）
	PRINTL
NEXT
PRINTFORML [100]返回

$INPUT_LOOP
INPUT

CHOICE = RESULT

IF CHOICE == 100
	RETURN 0
ELSEIF CHOICE >= 0 && CHOICE <= 60 && NAME_END:CHOICE != ""
	TRYCALLFORM SINGLE_ENDING_K{NO:TARGET}, NAME_END:CHOICE
ELSE
	GOTO INPUT_LOOP
ENDIF

;すでに閲覧済み
IF CEVENT(NAME_END:CHOICE)
	PRINTL
	DRAWLINE
	RESTART
ENDIF

;選ばれたENDに対応したフラグをCEVENTで立てる
CALL SET_CEVENT, NAME_END:CHOICE

RETURN 1


code:
;-------------------------------------------------
;拘束されて弄ばれるイベント
;欲求不満イベントに変更してみる
;-------------------------------------------------
@BIND_AT_MORNING
#DIM LCOUNT
#DIM MEMO_ABL_MASTER
;随机選択に用いる
#DIM NUM_FIND
;行為の回数
#DIM NUM_PLAY, 3
;乱交参加者の人数
#DIM CHARANUM_RANKOU
;乱交PLAY参加者の名前の羅列。%CALLNAME:TARGET%と%CALLNAME:(TARGET:1)% など
#DIMS CNAMES_RANKOU, 2
#DIMS MEMO_EVENT

;周日朝だけ＆约会の日は起きない
SIF TEXTS("曜日") != "日" || CHARA_NUM("约会的约定")
	RETURN 0

;そもそもこの種類のイベントが起きるかの格子
CALL CHECK_BIND_AT_MORNING, TARGET, ""

;TARGETがPLAYの条件を満たしているか？
SIF CSTR:朝袭 == ""
	RETURN 0

;複数角色を使うイベント用の対象フラグ重置
VARSET TARGET, 0, 1, 4

;一時的にイベント名を記録
MEMO_EVENT = %CSTR:朝袭%

NUM_FIND = 1
;仲間を呼ぶ
FOR LCOUNT, 2, CHARANUM
	SIF LCOUNT == TARGET || LCOUNT == MASTER
		CONTINUE

	CALL CHECK_BIND_AT_MORNING, LCOUNT, CSTR:朝袭
	;選択されているPLAYを許容できるなら欲求不満値を記録して、参加候補入り（ＭＡＸ二人）
	SIF CSTR:朝袭 != MEMO_EVENT
		CONTINUE

	IF TARGET:1 == 0
		TARGET:1 = LCOUNT
	ELSEIF TARGET:2 == 0
		TARGET:2 = LCOUNT
	ELSEIF RAND:NUM_FIND <= 1
		TARGET:(RAND:2 + 1) = LCOUNT
	ENDIF
	NUM_FIND += 1
NEXT

CSTR:朝袭 = %MEMO_EVENT%

CNAMES_RANKOU = %CALLNAME:TARGET%
CNAMES_RANKOU:1 = %CALLNAME:TARGET%
NUM_PLAY = MIN(5, ABL:欲望/2) + RAND:(MIN(5, ABL:施虐属性) + 5) + TALENT:淫乱*2 + TALENT:恋慕

IF TARGET:1 > 0
	CNAMES_RANKOU = %CALLNAME:TARGET%和%CALLNAME:(TARGET:1)%
	CNAMES_RANKOU:1 = %CALLNAME:TARGET%她们
	NUM_PLAY:1 = MIN(5, ABL:(TARGET:1):欲望/2) + RAND:(MIN(5, ABL:(TARGET:1):施虐属性) + 1) + TALENT:(TARGET:1):淫乱*2 + TALENT:(TARGET:1):恋慕
ENDIF
IF TARGET:2 > 0
	CNAMES_RANKOU = %CALLNAME:TARGET%和%CALLNAME:(TARGET:1)%还有%CALLNAME:(TARGET:2)%
	CNAMES_RANKOU:1 = %CALLNAME:TARGET%她们
	NUM_PLAY:2 = MIN(5, ABL:(TARGET:2):欲望/2) + RAND:(MIN(5, ABL:(TARGET:2):施虐属性) + 1) + TALENT:(TARGET:2):淫乱*2 + TALENT:(TARGET:2):恋慕
ENDIF

CHARANUM_RANKOU = 1 + (TARGET:1 > 0) + (TARGET:2 > 0)
DRAWLINE

CVARSET TEQUIP, GETNUM(TEQUIP, "推倒"), 1
;拘束されているということで技巧を下げる
MEMO_ABL_MASTER = ABL:MASTER:技巧
ABL:MASTER:技巧 = 1

CALL SIMULATE_TRAIN_FIRST, CHARANUM_RANKOU

SELECTCASE CSTR:朝袭
CASE "朝ＳＭ"
	PRINTFORMW 早上、一觉醒来发现身体動不了……
	PRINTFORMW 不知道什么时候被裸体地绑在了床上
	PRINTFORMW 俯视着这边的%CNAMES_RANKOU%、用充满嗜虐和情欲的眼神打着招呼……
	CALL KOJO_EVENT, CSTR:朝袭
	PRINTL
	PRINTFORMW 就这様一直到夜里、被%CNAMES_RANKOU:1%持续地责弄着……
	FOR LCOUNT, 0, CHARANUM_RANKOU
		SWAP TARGET, TARGET:LCOUNT
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 1, MAX(NUM_PLAY:LCOUNT/(2 + RAND:4), 1)
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 6, MAX(NUM_PLAY:LCOUNT/(3 + RAND:4), 1)
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 9, MAX(NUM_PLAY:LCOUNT/(2 + RAND:4), 1)
		IF RAND:2 && COND("女性主導生性交")
			CALL COM_ABLE65
			SIF RESULT && TALENT:処女 + TALENT:MASTER:童貞 == 0 && ABL:信頼+ABL:欲望+ABL:Ｖ感覚+ABL:奉仕精神 > 14 && PENIS(MASTER)
				CALL SIMULATE_TRAIN_COM, 65, MAX(NUM_PLAY:LCOUNT/(5 + RAND:5), 1 + RAND:3)
		ENDIF
		IF RAND:3 == 0
			CALL COM_ABLE75
			SIF RESULT && TALENT:Ａ処女 == 0 && EXP:PLAYER:Ａ挿入経験 && ABL:Ａ感覚 >= MAX(3, ABL:Ｖ感覚) && ABL:信頼+ABL:欲望+ABL:Ａ感覚+ABL:奉仕精神 > 14 && PENIS(MASTER)
				CALL SIMULATE_TRAIN_COM, 75, MAX(NUM_PLAY:LCOUNT/(5 + RAND:5), 1 + RAND:3)
		ENDIF
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 90, NUM_PLAY:LCOUNT/(3 + RAND:3)
		CALL SIMULATE_TRAIN_COM, 91, NUM_PLAY:LCOUNT/(4 + RAND:3)
		SIF RAND:2 && TALENT:巨乳
			CALL SIMULATE_TRAIN_COM, 92, MAX(NUM_PLAY:LCOUNT/(4 + RAND:3), 1)
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 95, NUM_PLAY:LCOUNT/(3 + RAND:3)
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 96, NUM_PLAY:LCOUNT/(4 + RAND:3)
		SWAP TARGET, TARGET:LCOUNT
	NEXT
CASE "朝拘束騎乗位"
	PRINTFORMW 早上、一觉醒来感觉身体好重……\@ TARGET:1 > 0 ? 不仅如此、呼吸也有些困难… # \@
	IF TARGET:1
		PRINTFORM …认清状况花了些時間、好像是被%CALLNAME:(TARGET:1)%用脸
		SIF TARGET:2
			PRINTFORM 、和%CALLNAME:(TARGET:2)%用手臂、
		PRINTFORMW 入迷地摩擦着股間的样子
		PRINTFORMW 不止如此、还有%CALLNAME:TARGET%正在以騎乗位享受着、股間各种液体都有、真是够厉害的…
		PRINTL
		PRINTFORMW 刚刚醒来的%CALLNAME:MASTER%注意到了%CNAMES_RANKOU:1%被嗜虐和情欲充满的眼神、看来短时间内是不会被放開了…
	ELSE
		PRINTFORMW 好像是、不知道什么时候被裸体绑在了床上的样子…
		PRINTFORMW 看向感到重量的地方时、目光和骑在腰上的%CALLNAME:TARGET%对上了
		PRINTFORMW 就像是享受了长时间的结合一様、結合部起泡的液体吧嗒吧嗒地往下滴着、变得黏黏糊糊的…
		PRINTL
		PRINTFORMW 看着%CALLNAME:TARGET%被嗜虐和情欲充满的眼神、看来短时间内是不会被放開了…
	ENDIF

	CALL KOJO_EVENT, CSTR:朝袭
	PRINTL
	PRINTFORMW 就这様一直到夜里、被%CNAMES_RANKOU:1%持续地榨取着、责弄着……
	FOR LCOUNT, 0, CHARANUM_RANKOU
		SWAP TARGET, TARGET:LCOUNT
		CALL SIMULATE_TRAIN_COM, 1, NUM_PLAY:LCOUNT/(2 + RAND:4)
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 6, NUM_PLAY:LCOUNT/(4 + RAND:4)
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 9, NUM_PLAY:LCOUNT/(2 + RAND:4)
		CALL SIMULATE_TRAIN_COM, 65, NUM_PLAY:LCOUNT
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 91, NUM_PLAY:LCOUNT/(3 + RAND:3)
		SIF RAND:2 && TALENT:巨乳
			CALL SIMULATE_TRAIN_COM, 92, NUM_PLAY:LCOUNT/(4 + RAND:3)
		SIF RAND:4 == 0
			CALL SIMULATE_TRAIN_COM, 95, NUM_PLAY:LCOUNT/(5 + RAND:3)
		SIF RAND:5 == 0
			CALL SIMULATE_TRAIN_COM, 96, NUM_PLAY:LCOUNT/(5 + RAND:3)
		SWAP TARGET, TARGET:LCOUNT
	NEXT
CASE "朝拘束Ａ騎乗位"
	PRINTFORMW 早上、一觉醒来感觉身体好重……\@ TARGET:1 > 0 ? 不仅如此、呼吸也有些困难… # \@
	IF TARGET:1
		PRINTFORM …认清状况花了些時間、好像是被%CALLNAME:(TARGET:1)%用脸
		SIF TARGET:2
			PRINTFORM 、和%CALLNAME:(TARGET:2)%用手臂、
		PRINTFORMW 入迷地摩擦着股間的样子
		PRINTFORMW 不止如此、还有%CALLNAME:TARGET%正在用尻穴享受着、股間各种液体都有、真是够厉害的…
		PRINTL
		PRINTFORMW 刚刚醒来的%CALLNAME:MASTER%注意到了%CNAMES_RANKOU:1%被嗜虐和情欲充满的眼神、看来短时间内是不会被放開了…
	ELSE
		PRINTFORMW 好像是、不知道什么时候被裸体绑在了床上的样子…
		PRINTFORMW 看向感到重量的地方时、目光和骑在腰上肛門里含着阴茎的%CALLNAME:TARGET%对上了
		PRINTFORMW 就像是享受了长时间的结合一様、結合部起泡的液体吧嗒吧嗒地往下滴着、变得黏黏糊糊的…
		PRINTL
		PRINTFORMW 看着%CALLNAME:TARGET%被嗜虐和情欲充满的眼神、看来短时间内是不会被放開了…
	ENDIF

	CALL KOJO_EVENT, CSTR:朝袭
	PRINTL
	PRINTFORMW 就这様一直到夜里、被%CNAMES_RANKOU:1%持续地榨取着、责弄着……
	FOR LCOUNT, 0, CHARANUM_RANKOU
		SWAP TARGET, TARGET:LCOUNT
		CALL SIMULATE_TRAIN_COM, 1, MAX(NUM_PLAY:LCOUNT/(2 + RAND:4), 1)
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 6, NUM_PLAY:LCOUNT/(4 + RAND:4)
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 9, NUM_PLAY:LCOUNT/(2 + RAND:4)
		CALL SIMULATE_TRAIN_COM, 75, NUM_PLAY:LCOUNT
		SIF RAND:2
			CALL SIMULATE_TRAIN_COM, 91, NUM_PLAY:LCOUNT/(3 + RAND:3)
		SIF RAND:2 && TALENT:巨乳
			CALL SIMULATE_TRAIN_COM, 92, NUM_PLAY:LCOUNT/(4 + RAND:3)
		SIF RAND:4 == 0
			CALL SIMULATE_TRAIN_COM, 95, NUM_PLAY:LCOUNT/(5 + RAND:3)
		SIF RAND:5 == 0
			CALL SIMULATE_TRAIN_COM, 96, NUM_PLAY:LCOUNT/(5 + RAND:3)
		SWAP TARGET, TARGET:LCOUNT
	NEXT
;今のところこの下は没有
CASE "朝拘束逆強姦"
	PRINTFORMW 早上、一觉醒来发现身体動不了……
	PRINTFORMW 不知道什么时候被裸体地绑在了床上
	PRINTFORMW 俯视着这边的%CNAMES_RANKOU%、用充满嗜虐和情欲的眼神打着招呼……
	CALL KOJO_EVENT, CSTR:朝袭
	PRINTFORMW 就这様一直到夜里、被%CNAMES_RANKOU:1%持续地责弄着……
CASE "朝拘束逆肛交"
	PRINTFORMW 早上、一觉醒来发现身体動不了……
	PRINTFORMW 不知道什么时候被裸体地绑在了床上
	PRINTFORMW 俯视着这边的%CNAMES_RANKOU%、用充满嗜虐和情欲的眼神打着招呼……
	CALL KOJO_EVENT, CSTR:朝袭
	PRINTFORMW 就这様一直到夜里、被%CNAMES_RANKOU:1%持续地责弄着……
ENDSELECT

CALL SIMULATE_TRAIN_CALC
CALL SIMULATE_TRAIN_SHOW
WAIT

CALL KOJO_GREETING, "朝拘束", TARGET

CALL CALC, "欲求不満解消", TARGET, (NUM_PLAY + NUM_PLAY:1 + NUM_PLAY:2)*15
IF TARGET:1 > 0
	CALL CALC, "欲求不満解消", TARGET:1, (NUM_PLAY + NUM_PLAY:1 + NUM_PLAY:2)*10
	;仲良くなる
	CALL CHANGE_RELATION, 5, TARGET, TARGET:1, TARGET:2
	CSTR:(TARGET:1):朝袭 = CSTR:朝袭
ENDIF
IF TARGET:2 > 0
	CALL CALC, "欲求不満解消", TARGET:2, (NUM_PLAY + NUM_PLAY:1 + NUM_PLAY:2)*10
	CSTR:(TARGET:2):朝袭 = CSTR:朝袭
ENDIF

CVARSET TEQUIP, GETNUM(TEQUIP, "推倒")

ABL:MASTER:技巧 = MEMO_ABL_MASTER
RETURN 1

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

;欲求不満度が限界までは行ってないor欲望が5LV未満、好感度が500未満
SIF COND("欲求不満", ARG) < 3 || ABL:ARG:欲望 < 5 || CFLAG:ARG:好感度 < 500	|| COND("只和你Ｈ")
	RETURN 0

VARSET EVENT_TABLE

;施虐属性5LVならＳＭコース
IF ABL:ARG:施虐属性 >= 5
	IF ARGS == "朝ＳＭ"
		CSTR:朝袭 = 朝ＳＭ
		RETURN 0
	ENDIF
	EVENT_TABLE += "朝ＳＭ/"
ENDIF

CALL COM_ABLE65
IF RESULT && PENIS(MASTER) && TALENT:ARG:処女 + TALENT:MASTER:童貞 == 0 && ABL:ARG:Ｖ感覚 >= 3 && EXP:ARG:Ｖ性交経験 >= 10 && EXP:ARG:腰靈活経験 >= 20 && COND("女性主導生性交", ARG)
	IF ARGS == "朝拘束騎乗位"
		CSTR:朝袭 = 朝拘束騎乗位
		RETURN 0
	ENDIF
	EVENT_TABLE += "朝拘束騎乗位/"
ENDIF

CALL COM_ABLE75
IF RESULT && PENIS(MASTER) && EXP:MASTER:Ａ挿入経験 && COND("Ａ熟達", ARG)
	IF ARGS == "朝拘束Ａ騎乗位"
		CSTR:朝袭 = 朝拘束Ａ騎乗位
		RETURN 0
	ENDIF
	EVENT_TABLE += "朝拘束Ａ騎乗位/"
ENDIF

CSTR:朝袭 = %TEXTR(EVENT_TABLE)%

RETURN 0


code:
;文化祭についての話題があったので、できるとこまでやってやろうじゃねえか！　という試み
;製作者  道端の菠萝包
;-------------------------------------------------
;文化祭出し物の解説文
;-------------------------------------------------
@MESSAGE_BUNKASAI, ARGS

SELECTCASE ARGS
CASE "乐队演奏"
	PRINTFORMW %CALLNAME:TARGET%在体育馆和其他乐队成员一起演奏音乐。
CASE "演劇"
	PRINTFORMW %CALLNAME:TARGET%在体育馆中表演%ARGS%。
CASE "占卜館"
	PRINTFORMW 看起来%CALLNAME:TARGET%的班级展出的项目是让%CALLNAME:TARGET%进行占卜的样子。
CASE "恐怖屋敷"
	PRINTFORMW 看起来%CALLNAME:TARGET%的班级展出的项目是%ARGS%的样子。
;以下はまだ本文が無い物
CASE "烦悩相談室"
	PRINTFORMW 看起来%CALLNAME:TARGET%借了教室的一角正在做烦恼相谈的样子。
CASE "PaFuPaFu屋"
	PRINTFORMW 看起来%CALLNAME:TARGET%的班级正在做%ARGS%的样子
CASE "女仆咖啡厅", "執事咖啡厅", "西式料理店"
	PRINTFORMW 看起来%CALLNAME:TARGET%的班级%TEXTR(@"的展示项目是%ARGS%的样子/正在进行%ARGS%的样子/正在做%ARGS%的样子/的展示项目是%ARGS%的样子")%。
ENDSELECT
;台詞
CALL KOJO_DATE, ARGS

;-------------------------------------------------
;文化祭出し物の本文
;-------------------------------------------------
@DAILY_MESSAGE_BUNKASAI, ARGS

SELECTCASE ARGS
CASE "乐队演奏"
	PRINTFORM %CALLNAME:TARGET%
	SELECTCASE RAND:5
	CASE 0
		PRINTFORM 作为主唱、
		IF TALENT:内気
			PRINTFORM 和平常比简直换了个人一样热情地
		ELSEIF TALENT:喜歡引人注目
			PRINTFORM 摆出生动的表情活灵活现地
		ELSEIF TALENT:淫乱
			PRINTFORM 蠱惑地摆动腰肢的同时
		ELSE
			PRINTFORM 青春洋溢地
		ENDIF
		PRINTFORMW 进行着表演……
	CASE 1
		PRINTFORM 作为吉他手、
		IF ABL:技巧 >= 5
			PRINTFORMW 展现着无法用眼捕捉的速弾技术令観客叹为观止……
		ELSE
			PRINTFORMW 狂热地搅动着琴弦……
		ENDIF
	CASE 2
		PRINTFORM 作为贝斯手、
		IF TALENT:喜歡引人注目
			PRINTFORMW 展示着自己精彩的贝斯技术……
		ELSE
			PRINTFORMW 用堅実的演奏支撑起了乐队的基础……
		ENDIF
	CASE 3
		PRINTFORMW 作为鼓手、华丽表演的同时为乐队带来节奏的動感……
	CASE 4
		PRINTFORMW 担当了电子琴手、被围在各类电子琴中间弹奏着……
	ENDSELECT
CASE "演劇"
	SELECTCASE RAND:3
	CASE 0
		PRINTFORMW 看起来在进行以漫画为原作的改编劇。
	CASE 1
		PRINTFORMW 看起来在进行古典戏劇。
	CASE 2
		PRINTFORMW 看起来在进行原创演劇。
	ENDSELECT
	PRINTFORM %CALLNAME:TARGET%扮演了%TEXTR("主人公/女主人公/配角/悪役角色")%、用
	IF TALENT:喜歡引人注目
		PRINTFORM 活灵活现的
	ELSEIF TALENT:内気
		PRINTFORM 緊張が隠しきれない
	ELSE
		PRINTFORM 堂々とした
	ENDIF
	PRINTFORM 演技
	IF TALENT:謎之魅力 || TALENT:魅力
		PRINTFORMW 吸引住了観客……
	ELSE
		PRINTFORMW 留住了観客……
	ENDIF
CASE "占卜館"
	PRINTFORMW 桌子上放置着一个水晶球、即使是不知道对方是魔法使的学生们、在这种气氛下也会確信对方是真正的占卜師。
	PRINTFORMW ……终于轮到%CALLNAME:MASTER%了。
	PRINTFORMW 对面前的%CALLNAME:MASTER%的出现感到惊讶后、%CALLNAME:TARGET%熟练地開始了占卜。
	PRINTFORMW 不一会儿后、便将脸贴近了%CALLNAME:MASTER%的耳朵、告知了%CALLNAME:MASTER%的運勢。
	PRINTFORMW ……可以期待今夜了。

CASE "恐怖屋敷"
	PRINTFORMW 里面的构造似乎十分精密、在入口处就已经感受到一股惊悚的气氛。
	PRINTFORMW 就在%CALLNAME:MASTER%和%CALLNAME:PARTNER()%期待着会出现什么而进入正門后、完全的黑暗蔓延開来。
	PRINTFORMW 在什么也看不到的迷宫中摸索着前进的时候、眼前突然有了亮光。
	PRINTFORM 就像夜虫一样过去的时候、从侧面
	SELECTCASE RAND:3
	CASE 0
		PRINTFORM 血淋淋的
	CASE 1
		PRINTFORM 幽霊化的
	CASEELSE
		PRINTFORM 因为特殊的化妆没有被察觉到、
	ENDSELECT
	PRINTFORMW %CALLNAME:TARGET%飛了出来！
CASEELSE
	PRINTFORMW 展出的项目……%TEXTR("还行、如果一定要给评价的话。/有点粗糙、但因为很热闹所以观感没有太糟糕。/像是有懂得専业知識的学生存在的样子、优秀到令人惊讶。真是厉害呀……")%
ENDSELECT

;-------------------------------------------------
;文化祭の出し物を細かく設定する関数
;素質や種族で内容が変わったりする……といいな
;-------------------------------------------------
@SHOP_BUNKASAI()
#FUNCTIONS
#DIM LCOUNT
#DIMS SHOP_TABLE

;まずは固定の出し物
SHOP_TABLE = 女仆咖啡厅/執事咖啡厅/恐怖屋敷/乐队演奏/演劇/

;次に種族によって出る出し物を加える
SIF FIND_COND("烦悩相談室")
	SHOP_TABLE += "烦悩相談室/"
SIF FIND_COND("占卜館")
	SHOP_TABLE += "占卜館/"

;素質によって出る出し物を加える
SIF FIND_COND("西式料理店")
	SHOP_TABLE += "西式料理店/"
SIF FIND_COND("PaFuPaFu屋")
	SHOP_TABLE += "PaFuPaFu屋/"

;もう巡った場所は除外
VARSET LOCALS
SPLIT SHOP_TABLE, "/", LOCALS
SHOP_TABLE =
FOR LCOUNT, 0, 10
	SIF CEVENT(@"学園祭：%LOCALS:LCOUNT%", MASTER)
		CONTINUE
	SHOP_TABLE += @"%LOCALS:LCOUNT%/"
NEXT

RETURNF SHOP_TABLE

;-------------------------------------------------
;出し物ARGSをやっているARGをふさわしい格好に着替えさせる
;-------------------------------------------------
@SET_COORDINATE_BUNKASAI, ARGS, ARG
;外套は脱掉
CALL RESET_OTHER, "外套", ARG

SELECTCASE ARGS
CASE "西式料理店"
	CALL SET_SHIRT, "哥特連衣裙", ARG
CASE "女仆咖啡厅"
	CALL SET_COORDINATE, "女仆装", ARG
CASE "執事咖啡厅"
	CALL SET_SHIRT, "領帯女式衬衫/黒", ARG
CASE "演劇"
	IF COND("池面", ARG)
		CALL SET_SHIRT, "中世紧身高袍", ARG
	ELSE
		CALL SET_SHIRT, "洛丽塔連衣裙", ARG
	ENDIF
CASE "PaFuPaFu屋"
	CALL SET_SHIRT, "情趣内衣", ARG
ENDSELECT