code:
@EVENT_COUNTER_SOURCE(ARG,ARG:1)
SIF TCVAR:ARG:30 > 1
	RETURN 0
IF ARG:1 == 1

ENDIF

;���Ȃ��ɂu�}�����ŁA����̃J�E���^�[�R�}���h���u�}���n�ȊO�̏ꍇ
IF TEQUIP:PLAYER:50 == ARG && !GROUPMATCH(TCVAR:ARG:20, 80, 83, 84) && CFLAG:ARG:���ӂ� == 2
	CALL TOUCH_SET(SET_FROM_P,SET_V,ARG)
	SOURCE:ARG:���s�� += 150
	SOURCE:ARG:���� += 400
	SOURCE:PLAYER:�t�� += 100
	SOURCE:ARG:���s += 250
	SOURCE:ARG:���v += 400
	SOURCE:PLAYER:���u += 500
	CALL PAIN_CHECK_V_MASTER(ARG)
	LOCALS = {ARG}/
	CSTR:PLAYER:10 += LOCALS
	TCVAR:PLAYER:2 = 13
	TCVAR:PLAYER:4 += 75
	LOCALS = {PLAYER}/
	CSTR:ARG:10 += LOCALS
	TCVAR:ARG:2 = 1
	TCVAR:ARG:4 += 500
	STAIN:ARG:2 |= STAIN:PLAYER:6
	STAIN:PLAYER:6 |= STAIN:ARG:2
	EXP:PLAYER:�u�����o�� ++
	TCVAR:ARG:�n�s�t���O = 1
ENDIF

;���Ȃ��ɂ`�}�����ŁA����̃J�E���^�[�R�}���h���t�`�n�ȊO�̏ꍇ
IF TEQUIP:PLAYER:51 == ARG && !GROUPMATCH(TCVAR:ARG:20, 90, 93, 94) && CFLAG:ARG:���ӂ� == 2
	CALL TOUCH_SET(SET_FROM_P,SET_A,ARG)
	SOURCE:ARG:���s�� += 150
	SOURCE:ARG:���� += 400
	SOURCE:PLAYER:�t�� += 100
	SOURCE:ARG:���s += 400
	SOURCE:ARG:���v += 400
	SOURCE:PLAYER:���` += 500
	CALL PAIN_CHECK_A_MASTER(ARG)
	LOCALS = {ARG}/
	CSTR:PLAYER:10 += LOCALS
	TCVAR:PLAYER:2 = 12
	TCVAR:PLAYER:4 += 125
	LOCALS = {PLAYER}/
	CSTR:ARG:10 += LOCALS
	TCVAR:ARG:2 = 2
	TCVAR:ARG:4 += 400
	STAIN:ARG:2 |= STAIN:PLAYER:6
	STAIN:PLAYER:6 |= STAIN:ARG:2
	EXP:PLAYER:�`�����o�� ++
	TCVAR:ARG:�n�s�t���O = 1
ENDIF

SELECTCASE TCVAR:ARG:�J�E���^�[�s��
	;�������߂�
	CASE 1
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 10
	;�`����
	CASE 2
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 20
	;���͂Ȃ�
	CASE 3
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:���y += 20
	;��������
	CASE 4
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 20
	CASE 9
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�~�� += �[�U��(ARG,4) * 2
		SOURCE:ARG:���] += �[�U��(ARG,4) * 2
	;�ߊ���Ă���
	CASE 11
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 50
		SOURCE:ARG:��d += 40
	;�Ί�𕂂��ׂ�
	CASE 12
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 40
	;�\���ė~������
	CASE 13
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 70
		SOURCE:ARG:���� += 30
	;�g������񂹂�
	CASE 14
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 60
		SOURCE:ARG:��d += 20
	;���߂Ă���
	CASE 15
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 40
	;���ɂ����悹
	CASE 16
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 40
		SOURCE:ARG:���� += 50
	;��������
	CASE 17
		CALLF ONCE("��������",0,ARG)
		BASE:MASTER:�C�� += 200
		SOURCE:ARG:��d += 100

	;�F���ۂ��d��
	CASE 20
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 150
		SOURCE:ARG:���� += 50
	;���߂�
	CASE 21
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 80
	;�̂𐠂�񂹂�
	CASE 22
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 100
		SOURCE:ARG:��d += 80
	;�X�J�[�g������
	CASE 23
		CALLF ONCE("�X�J�[�g�߂����",0,ARG)
		SOURCE:ARG:�J�� += 300
		SOURCE:ARG:���� += 200
	;�����ɑ��𐁂�������
	CASE 24
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 50
		SOURCE:ARG:���� += 100
	;�K�𕏂ł�
	CASE 25
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 100
		SOURCE:ARG:���� += 300
		SOURCE:ARG:�J�� += 200
	;�r�ɕ����t��
	CASE 26
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 50
		SOURCE:ARG:���� += 200
		SOURCE:ARG:� += 100
	;�J�Ԃ�������
	CASE 27
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 200
		SOURCE:ARG:���� += 100
	;�K�Y��
	CASE 28
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 200
		SOURCE:ARG:���v += 200
		SOURCE:ARG:���� += 400
		SOURCE:ARG:���b += 50
		TCVAR:ARG:�n�s�t���O = 1
	;�L�X
	CASE 30
		CALL TOUCH_SET(SET_FROM_M,4,ARG)
		SOURCE:ARG:�U�f += 250
		SOURCE:ARG:���� += 100
		SOURCE:ARG:���l += 100
		SOURCE:PLAYER:���l += 100
		SOURCE:ARG:��d += 50
		EXP:ARG:�L�X�o�� ++
		EXP:MASTER:�L�X�o�� ++
	;��납�������
	CASE 31
		CALL TOUCH_RESET_T(ARG)
		TCVAR:ARG:�ʒu�֌W = 2
		SOURCE:ARG:�U�f += 300
		SOURCE:ARG:���� += 150
	;�O���������
	CASE 32
		CALL TOUCH_RESET_T(ARG)
		TCVAR:ARG:�ʒu�֌W = 1
		SOURCE:ARG:�U�f += 300
		SOURCE:ARG:���� += 150
	;���𝆂܂���
	CASE 33
		CALL TOUCH_SET(SET_FROM_B,3,ARG)
		SOURCE:ARG:�U�f += 350
		SOURCE:ARG:���� += 200
		SOURCE:ARG:���v += 200
		SOURCE:ARG:���a += 50
	;�ҊԂ��܂�����
	CASE 34
		CALL TOUCH_SET(SET_FROM_YUBI,1,ARG)
		SOURCE:ARG:�U�f += 300
		SOURCE:ARG:���� += 200
		SOURCE:ARG:���s += 50
		SOURCE:ARG:���� += 400
		SIF !(TALENT:PLAYER:2 & 2)
			SOURCE:PLAYER:���b += 100
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 3

		EXP:ARG:����o�� ++
		;���x
		TCVAR:PLAYER:4 += 300
	;�X�J�[�g�̒���������
	CASE 35
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:�U�f += 500
		SOURCE:ARG:���� += 300
	;�����݂���
	CASE 36
		CALL TOUCH_SET(SET_FROM_YUBI,5,ARG)
		SOURCE:ARG:�U�f += 200
		SOURCE:ARG:���� += 200
		SOURCE:ARG:���� += 200
		SOURCE:ARG:���s += 50
		SOURCE:PLAYER:���a += 200
	;�����D
	CASE 39
		CALL TOUCH_SET(SET_FROM_M,4,ARG)
		SOURCE:ARG:���s�� += 100
		SOURCE:ARG:�U�f += 150
		SOURCE:ARG:���v += 150
		SOURCE:ARG:���� += 200
		SOURCE:PLAYER:���l += 150
		EXP:ARG:�L�X�o�� ++
		EXP:ARG:�����o�� ++
		EXP:MASTER:�L�X�o�� ++
		EXP:MASTER:�����o�� ++
		TCVAR:MASTER:�� = 0
		DOWNBASE:�C�� -= 50
	;����ʂu���˂���
	CASE 41,43
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		TCVAR:ARG:��D = 1
		SOURCE:ARG:�U�f += 1000
		SOURCE:ARG:���� += 500
		SOURCE:ARG:���v += 150
	;��w�ʂ`���˂���
	CASE 44
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		SOURCE:ARG:�U�f += 1000
		SOURCE:ARG:���� += 500
		SOURCE:ARG:���v += 150
	;���
	CASE 50
		CALL TOUCH_SET(SET_FROM_YUBI,1,ARG)
		IF TEQUIP:PLAYER:0
			IF TEQUIP:PLAYER:0 & 1
				CALL DATUI_BOTTOM(ARG,1)
			ELSEIF TEQUIP:PLAYER:0 & 8
				CALL DATUI_BOTTOM(ARG,2)
			ENDIF
		ENDIF
		SOURCE:ARG:���s�� += 250
		SOURCE:ARG:�U�f += 500
		SOURCE:ARG:���� += 100
		SOURCE:ARG:���s += 100
		SOURCE:ARG:���� += 200
		SIF !(TALENT:PLAYER:2 & 2)
			SOURCE:PLAYER:���b += 300
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 3
		;���x
		TCVAR:PLAYER:4 += 500
		EXP:ARG:����o�� ++
		;��d�t���O
		TCVAR:ARG:108 = 1
		TCVAR:ARG:�n�s�t���O = 1
	;����
	CASE 51
		CALL TOUCH_SET(SET_FROM_M,1,ARG)
		IF TEQUIP:PLAYER:0 & 12
			CALL DATUI_BOTTOM(ARG,2)
		ELSEIF TEQUIP:PLAYER:0 & 2
			SIF RAND:2
				CALL DATUI_BOTTOM(ARG,1)
		ENDIF
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:�U�f += 600
		SOURCE:ARG:���� += 150
		SOURCE:ARG:���� += 250
		SOURCE:ARG:��d += 800
		SOURCE:ARG:���l += 200
		SIF !(TALENT:PLAYER:2 & 2)
			SOURCE:PLAYER:���b += 500
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 4
		;���x
		TCVAR:PLAYER:4 += 800
		EXP:ARG:�����o�� ++
		;��d�t���O
		TCVAR:ARG:108 = 1
	;�f�ҁA�L���킹
	CASE 52
		SIF TEQUIP:PLAYER:0
			CALL DATUI_BOTTOM(ARG,0)
		SIF TEQUIP:ARG:0
			CALL DATUI_BOTTOM_T(ARG,0)
		SOURCE:ARG:���b += 150
		SOURCE:ARG:���s�� += 250
		SOURCE:ARG:�U�f += 700
		SOURCE:ARG:���� += 200
		SOURCE:ARG:��d += 400
		SOURCE:ARG:���v += 500
		IF !(TALENT:PLAYER:2 & 2)
			SOURCE:PLAYER:���b += 500
			CALL TOUCH_SET(SET_FROM_C,2,ARG)
		ELSE
			CALL TOUCH_SET(SET_FROM_C,1,ARG)
		ENDIF
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 6
		;���x
		TCVAR:PLAYER:4 += 800
		;��d�t���O
		TCVAR:ARG:108 = 1
		TCVAR:ARG:�n�s�t���O = 1
	;�p�C�Y��
	CASE 53
		CALL TOUCH_SET(SET_FROM_B,1,ARG)
		SIF TEQUIP:PLAYER:0 > 1
			CALL DATUI_BOTTOM(ARG,0)
		SIF TEQUIP:ARG:1 > 1
			CALL DATUI_TOP_T(ARG,0)
		SOURCE:ARG:���s�� += 400
		SOURCE:ARG:���a = 150
		SOURCE:ARG:�U�f += 800
		SOURCE:ARG:���� += 400
		SOURCE:ARG:��d += 800
		SOURCE:ARG:���v += 200
		SOURCE:ARG:���� += 500
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 5
		;���x
		TCVAR:PLAYER:4 += 1000
		EXP:ARG:�p�C�Y���o�� ++
		;��d�t���O
		TCVAR:ARG:108 = 1
	;���R�L
	CASE 54
		CALL TOUCH_SET(SET_FROM_LEG,1,ARG)
		SOURCE:ARG:���s�� += 250
		SOURCE:ARG:���� += 300
		SOURCE:ARG:�J�� += 400
		SOURCE:ARG:��d += 300
		SOURCE:ARG:���s += 800
		SOURCE:ARG:���� += 600
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 7
		;���x
		TCVAR:PLAYER:4 += 500
		TCVAR:ARG:�n�s�t���O = 1
		;��d�t���O
		TCVAR:ARG:108 = 1
	;�A�i������
	CASE 55
		CALL TOUCH_SET(SET_FROM_YUBI,7,ARG)
		IF TEQUIP:PLAYER:0 & 12
			CALL DATUI_BOTTOM(ARG,2)
		ELSEIF TEQUIP:PLAYER:0 & 2
			SIF RAND:2
				CALL DATUI_BOTTOM(ARG,1)
		ENDIF
		SOURCE:ARG:���s�� += 150
		SOURCE:ARG:���s = 500
		SOURCE:ARG:�U�f += 100
		SOURCE:ARG:���� += 100
		SOURCE:ARG:��d += 100
		SOURCE:ARG:���� += 600
		SOURCE:PLAYER:���` += 300
		EXP:ARG:����o�� ++
		;��d�t���O
		TCVAR:ARG:108 = 1
		TCVAR:ARG:�n�s�t���O = 1
	;�A�i���r��
	CASE 56
		CALL TOUCH_SET(SET_FROM_M,7,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:PLAYER:0 & 1
				CALL DATUI_BOTTOM(ARG,1)
		ELSE
			SIF TEQUIP:PLAYER:0
				CALL DATUI_BOTTOM(ARG,2)
		ENDIF
		SOURCE:ARG:���s�� += 150
		SOURCE:ARG:�J�� += 300
		SOURCE:ARG:�U�f += 100
		SOURCE:ARG:���� += 100
		SOURCE:ARG:���� += 300
		SOURCE:ARG:��d += 300
		SOURCE:PLAYER:���` += 200
		SOURCE:ARG:���l += 50
		EXP:ARG:�����o�� ++
		;��d�t���O
		TCVAR:ARG:108 = 1
	;�w�}��
	CASE 57
		CALL TOUCH_SET(SET_FROM_YUBI,6,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:PLAYER:0
				CALL DATUI_BOTTOM(ARG,2)
		ELSE
			SIF TEQUIP:PLAYER:0 & 14
				CALL DATUI_BOTTOM(ARG,1)
		ENDIF
		SOURCE:ARG:���s�� += 150
		SOURCE:ARG:�J�� += 200
		SOURCE:ARG:���� += 150
		SOURCE:ARG:���� += 400
		SOURCE:ARG:���s = 100
		SOURCE:PLAYER:���u += 300
		EXP:ARG:����o�� ++
		TCVAR:ARG:�n�s�t���O = 1
	;������
	CASE 58
		CALL TOUCH_SET(SET_FROM_YUBI,5,ARG)
		IF TEQUIP:PLAYER:1 & 2
			SIF RAND:2
				CALL DATUI_TOP(ARG,0)
		ENDIF
		SIF !(TALENT:PLAYER:2 & 1)
			SOURCE:ARG:���s += 100
		SOURCE:ARG:���s�� += 200
		SOURCE:ARG:�J�� += 300
		SOURCE:ARG:�U�f += 200
		SOURCE:ARG:���� += 100
		SOURCE:ARG:���� += 300
		SOURCE:PLAYER:���a += 300
		EXP:ARG:����o�� ++
	;����z��
	CASE 59
		CALL TOUCH_SET(SET_FROM_M,5,ARG)
		SIF TEQUIP:PLAYER:1 & 2
			CALL DATUI_TOP(ARG,0)
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:�U�f += 150
		SOURCE:ARG:���� += 200
		SOURCE:ARG:���� += 100
		SOURCE:PLAYER:���a += 400
		EXP:ARG:�����o�� ++
	;�f�B�[�v�L�X
	CASE 60
		CALL TOUCH_SET(SET_FROM_M,4,ARG)
		SOURCE:ARG:���s�� += 100
		SOURCE:ARG:�U�f += 150
		SOURCE:ARG:��d += 150
		SOURCE:ARG:���� += 200
		SOURCE:ARG:���l += 300
		SOURCE:PLAYER:���l += 300
		EXP:ARG:�L�X�o�� ++
		EXP:ARG:�����o�� ++
		EXP:PLAYER:�L�X�o�� ++
		EXP:ARG:�����o�� ++
	;�N���j����
	CASE 70
		CALL TOUCH_SET(SET_FROM_C,4,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		SOURCE:ARG:���b = 100
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 500
		SOURCE:ARG:�t�� += 60
		SOURCE:ARG:�U�f += 100
		SOURCE:ARG:���� += 100
		SOURCE:ARG:���v += 300
		SOURCE:ARG:���s += 30
		SOURCE:PLAYER:���l += 150
		STAIN:ARG:3 |= STAIN:PLAYER:0
		STAIN:PLAYER:0 |= STAIN:ARG:3
		EXP:PLAYER:�����o�� ++
		TCVAR:ARG:�n�s�t���O = 1
	;�t�F���`�I����
	CASE 71
		CALL TOUCH_SET(SET_FROM_P,4,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		SIF GETBIT(TALENT:PLAYER:2,0)
			SOURCE:ARG:���b = 100
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 700
		SOURCE:ARG:�t�� += 60
		SOURCE:ARG:���� += 100
		SOURCE:ARG:���s += 500
		SOURCE:ARG:���v += 1000
		SOURCE:PLAYER:���l += 200
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 6
		;���x
		TCVAR:ARG:4 += 800
		STAIN:ARG:2 |= STAIN:PLAYER:0
		STAIN:PLAYER:0 |= STAIN:ARG:2
		EXP:PLAYER:�����o�� ++
		TCVAR:ARG:�n�s�t���O = 1
	;�A�i����d
	CASE 72
		CALL TOUCH_SET(SET_FROM_A,4,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,RAND:2)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		SOURCE:ARG:���` = 100
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 600
		SOURCE:ARG:�J�� += 300
		SOURCE:ARG:���� += 100
		SOURCE:ARG:���v += 400
		SOURCE:ARG:���s += 50
		SOURCE:PLAYER:���l += 100
		LOCALS = {ARG}/
		CSTR:ARG:10 += LOCALS
		TCVAR:ARG:2 = 9
		;���x
		TCVAR:ARG:4 += 200
		STAIN:ARG:4 |= STAIN:PLAYER:0
		STAIN:PLAYER:0 |= STAIN:ARG:4
		EXP:PLAYER:�����o�� ++
		TCVAR:ARG:�n�s�t���O = 1
	;�ςӂς�
	CASE 73
		CALL TOUCH_SET(SET_FROM_B,4,ARG)
		SIF TEQUIP:ARG:1 & 1
			CALL DATUI_TOP_T(ARG,0)
		SOURCE:ARG:���a += 80
		SOURCE:ARG:���s�� += 250
		SOURCE:ARG:�� += 300
		SOURCE:ARG:�U�f += 600
		SOURCE:ARG:� += 250
	;�����킹
	CASE 74
		CALL TOUCH_SET(SET_FROM_B,5,ARG)
		SIF TEQUIP:PLAYER:1 > 1
			CALL DATUI_TOP(ARG,0)
		SIF TEQUIP:ARG:1 > 1
			CALL DATUI_TOP_T(ARG,0)
		SOURCE:ARG:���a += 80
		SIF GETBIT(TALENT:PLAYER:2,0)
			SOURCE:PLAYER:���a += 100
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:�U�f += 600
		SOURCE:ARG:���v += 100
		;��d�t���O
		TCVAR:ARG:108 = 1
	;�^���V��
	CASE 75
		CALL TOUCH_SET(SET_FROM_C,3,ARG)
		SIF TEQUIP:ARG:0
			CALL DATUI_BOTTOM_T(ARG,0)
		SOURCE:ARG:���b += 100
		SOURCE:ARG:���s�� += 150
		SOURCE:ARG:�U�f += 100
		SOURCE:ARG:���� += 150
		SOURCE:ARG:���� += 100
		SOURCE:ARG:���v += 200
	;�����A�\�R����
	CASE 76
		CALL TOUCH_SET(SET_FROM_C,3,ARG)
		SOURCE:ARG:���b += 100
		SIF !TALENT:ARG:����
			SOURCE:ARG:���u += 100
		SOURCE:ARG:���s�� += 150
		SOURCE:ARG:�U�f += 100
		SOURCE:ARG:���� += 150
		SOURCE:ARG:���v += 400
		SOURCE:ARG:���� += 200
	;�����z�킹��
	CASE 77
		CALL TOUCH_SET(SET_FROM_B,4,ARG)
		SIF TEQUIP:ARG:1 > 1
			CALL DATUI_TOP_T(ARG,0)
		SOURCE:ARG:�U�f += 500
		SOURCE:ARG:��d += 200
		SOURCE:ARG:���v += 100
		SOURCE:ARG:���a += 200
		SOURCE:ARG:� += 100
		SIF TALENT:ARG:����̎�
			EXP:ARG:�����o�� ++
		TEQUIP:ARG:����z�� = 1
	;�K�Y��
	CASE 78
		SOURCE:ARG:�U�f += 200
		SOURCE:ARG:���v += 400
		SOURCE:ARG:���� += 700
		SOURCE:ARG:���b += 100
		LOCALS = {PLAYER}/
		CSTR:ARG:10 += LOCALS
		TCVAR:ARG:2 = 8
		;���x
		TCVAR:ARG:4 += 200
	;����ʂu�}������
	CASE 80
		SIF MASTER_POSE(0,SET_P) == ARG
			CALL TOUCH_RESET_T(ARG)
		CALL TOUCH_SET(SET_FROM_P,6,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:MASTER:0
				CALL DATUI_BOTTOM(ARG,0)
		ELSE
			SIF TEQUIP:MASTER:0 & 14
				CALL DATUI_BOTTOM/(ARG,1)
		ENDIF
		TCVAR:ARG:����r�� = 1
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 1200
		SOURCE:ARG:�U�f += 600
		SOURCE:ARG:���s += 400
		SOURCE:ARG:���v += 800
		SOURCE:PLAYER:���u += 1000
		CALL PAIN_CHECK_V_MASTER(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 13
		TCVAR:PLAYER:4 += 150
		TCVAR:ARG:�n�s�t���O = 1
		LOCALS = {PLAYER}/
		CSTR:ARG:10 += LOCALS
		TCVAR:ARG:2 = 1
		TCVAR:ARG:4 += 1000
		TEQUIP:MASTER:�̈� = 1
		STAIN:ARG:2 |= STAIN:PLAYER:6
		STAIN:PLAYER:6 |= STAIN:ARG:2
		EXP:PLAYER:�u�����o�� ++
		EXP:ARG:�}���o�� ++
		CALL LOST_VIRGIN(PLAYER)
		TEQUIP:PLAYER:50 = ARG
	;��w�ʂu�}������
	CASE 83
		SIF MASTER_POSE(0,SET_P) == ARG
			CALL TOUCH_RESET_T(ARG)
		CALL TOUCH_SET(SET_FROM_P,6,ARG)
		TCVAR:ARG:����r�� = 1
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 1500
		SOURCE:ARG:�U�f += 300
		SOURCE:ARG:���s += 600
		SOURCE:ARG:���v += 600
		SOURCE:PLAYER:���u += 1000
		CALL PAIN_CHECK_V_MASTER(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 13
		TCVAR:PLAYER:4 += 150
		LOCALS = {PLAYER}/
		CSTR:ARG:10 += LOCALS
		TCVAR:ARG:2 = 1
		TCVAR:ARG:4 += 1000
		TEQUIP:MASTER:�̈� = 2
		STAIN:ARG:2 |= STAIN:PLAYER:6
		STAIN:PLAYER:6 |= STAIN:ARG:2
		EXP:PLAYER:�u�����o�� ++
		EXP:ARG:�}���o�� ++
		CALL LOST_VIRGIN(PLAYER)
		TEQUIP:PLAYER:50 = ARG
		TCVAR:ARG:�n�s�t���O = 1
	;���U��u��
	CASE 84
		CALL TOUCH_SET(SET_FROM_P,6,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 1200
		SOURCE:ARG:�U�f += 400
		SOURCE:ARG:���s += 400
		SOURCE:ARG:���v += 800
		SOURCE:PLAYER:���u += 1000
		CALL PAIN_CHECK_V_MASTER(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 13
		TCVAR:PLAYER:4 += 150
		LOCALS = {PLAYER}/
		CSTR:ARG:10 += LOCALS
		TCVAR:ARG:2 = 1
		TCVAR:ARG:4 += 1000
		STAIN:ARG:2 |= STAIN:PLAYER:6
		STAIN:PLAYER:6 |= STAIN:ARG:2
		EXP:PLAYER:�u�����o�� ++
		EXP:ARG:�}���o�� ++
		CALL LOST_VIRGIN(PLAYER)
		TEQUIP:PLAYER:50 = ARG
		TCVAR:ARG:�n�s�t���O = 1
	;�}��������
	CASE 85
		SIF MASTER_POSE(0,SET_V) == ARG || MASTER_POSE(0,SET_A) == ARG
			CALL TOUCH_RESET_T(ARG)
		CALL TOUCH_SET(SET_FROM_V,1,ARG)
		SIF TEQUIP:PLAYER:0
			CALL DATUI_BOTTOM(ARG,0)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		TCVAR:PLAYER:����r�� = 1
		TCVAR:ARG:��D = 1
		DOWNBASE:ARG:�̗� += 60
		DOWNBASE:ARG:�C�� += 120
		SOURCE:ARG:���� += 700
		SOURCE:ARG:���u = 300
		SOURCE:ARG:� = 150
		SOURCE:ARG:���s�� = 500
		SOURCE:ARG:�B�� = 300
		SOURCE:ARG:��� = 250
		SOURCE:ARG:�I�o = 60
		SOURCE:ARG:���s += 200
		TCVAR:116 = PLAYER
		CALL PAIN_CHECK_V(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 1
		TEQUIP:ARG:�̈� = 3
		;���x
		TCVAR:PLAYER:4 = 1000
		CALL STAIN_�S���o�}��
		EXP:ARG:�u�����o�� ++
		EXP:PLAYER:�}���o�� ++
		CALL LOST_VIRGIN(ARG)
		EXP:ARG:����o�� += TALENT:ARG:����
		TEQUIP:ARG:50 = MASTER
		TFLAG:MASTER�̂o�}���� = 1
		TCVAR:ARG:�n�s�t���O = 1
	;�������カ�z�[���h
	CASE 86
		CALL TOUCH_SET(SET_FROM_V,1,ARG)
		TCVAR:PLAYER:4 += 1800
		SOURCE:ARG:���u += 200
		SOURCE:ARG:� += 450
		SOURCE:ARG:�U�f += 1000
		SOURCE:ARG:���� += 800
		SOURCE:ARG:���v += 200
		SOURCE:ARG:���s�� += 250
		SOURCE:ARG:�B�� += 250
		TCVAR:116 = PLAYER
		CALL PAIN_CHECK_V(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 1
		EXP:ARG:�u�����o�� ++
		EXP:PLAYER:�}���o�� ++
		EXP:ARG:����o�� += TALENT:ARG:����
		TEQUIP:ARG:50 = MASTER
		TFLAG:MASTER�̂o�}���� = 1
	;�`�}��������
	CASE 87
		SIF MASTER_POSE(0,SET_V) == ARG || MASTER_POSE(0,SET_A) == ARG
			CALL TOUCH_RESET_T(ARG)
		CALL TOUCH_SET(SET_FROM_A,1,ARG)
		SIF TEQUIP:PLAYER:0
			CALL DATUI_BOTTOM(ARG,0)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		TCVAR:ARG:�`�r������ = 1
		TCVAR:PLAYER:����r�� = 1
		SOURCE:ARG:�t�� += 100
		DOWNBASE:ARG:�̗� += 60
		DOWNBASE:ARG:�C�� += 150
		SOURCE:ARG:���` = 500
		SOURCE:ARG:� = 150
		SOURCE:ARG:���s�� = 500
		SOURCE:ARG:�B�� = 300
		SOURCE:ARG:��� = 400
		SOURCE:ARG:�I�o = 60
		SOURCE:ARG:���� += 700
		SOURCE:ARG:���v += 200
		SOURCE:ARG:���s += 300
		TCVAR:116 = PLAYER
		CALL PAIN_CHECK_A(ARG)
		CALL LOST_VIRGIN(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 2
		TEQUIP:ARG:�̈� = 3
		;���x
		TCVAR:PLAYER:4 = 1000
		STAIN:ARG:7 |= STAIN:PLAYER:2
		STAIN:PLAYER:2 |= STAIN:ARG:7
		EXP:ARG:�`�����o�� ++
		EXP:PLAYER:�}���o�� ++
		EXP:ARG:����o�� += TALENT:ARG:����
		TEQUIP:ARG:51 = MASTER
		TFLAG:MASTER�̂o�}���� = 1
		;��d�t���O
		TCVAR:ARG:108 = 1
		TCVAR:ARG:�n�s�t���O = 1
	;���U��u
	CASE 88
		CALL TOUCH_SET(SET_FROM_V,1,ARG)
		DOWNBASE:MASTER:�̗� += 40
		DOWNBASE:MASTER:�C�� += 80
		TCVAR:PLAYER:4 += 1000
		SOURCE:ARG:���u += 300
		SOURCE:ARG:� += 200
		SOURCE:ARG:���s�� += 500
		SOURCE:ARG:�B�� += 200
		SOURCE:ARG:���� += 500
		SOURCE:ARG:���s += 100
		TCVAR:116 = PLAYER
		TCVAR:ARG:�n�s�t���O = 1
		CALL PAIN_CHECK_V(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 1
		EXP:ARG:�u�����o�� ++
		EXP:PLAYER:�}���o�� ++
		EXP:ARG:����o�� += TALENT:ARG:����
		TEQUIP:ARG:50 = MASTER
		TFLAG:MASTER�̂o�}���� = 1
		;��d�t���O
		TCVAR:ARG:108 = 1
	;���U��`
	CASE 89
		CALL TOUCH_SET(SET_FROM_A,1,ARG)
		DOWNBASE:MASTER:�̗� += 40
		DOWNBASE:MASTER:�C�� += 80
		TCVAR:PLAYER:4 += 1000
		SOURCE:ARG:���` += 300
		SOURCE:ARG:� += 200
		SOURCE:ARG:���s�� += 500
		SOURCE:ARG:�B�� += 200
		SOURCE:ARG:���� += 500
		SOURCE:ARG:���s += 100
		TCVAR:116 = PLAYER
		TCVAR:ARG:�n�s�t���O = 1
		CALL PAIN_CHECK_A(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 2
		EXP:ARG:�`�����o�� ++
		EXP:PLAYER:�}���o�� ++
		EXP:ARG:����o�� += TALENT:ARG:����
		TEQUIP:ARG:51 = MASTER
		TFLAG:MASTER�̂o�}���� = 1
		;��d�t���O
		TCVAR:ARG:108 = 1
	;��w�ʂ`�}������
	CASE 90
		SIF MASTER_POSE(0,SET_P) == ARG
			CALL TOUCH_RESET_T(ARG)
		CALL TOUCH_SET(SET_FROM_P,7,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		TCVAR:ARG:����r�� = 1
		TCVAR:PLAYER:�`�r������ = 1
		SOURCE:ARG:���b += 100
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 1000
		SOURCE:PLAYER:�t�� += 100
		SOURCE:ARG:���s += 800
		SOURCE:ARG:���v += 800
		SOURCE:PLAYER:���` += 800
		CALL PAIN_CHECK_A_MASTER(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 12
		TCVAR:PLAYER:4 += 250
		LOCALS = {PLAYER}/
		CSTR:ARG:10 += LOCALS
		TCVAR:ARG:2 = 2
		TCVAR:ARG:4 += 1000
		TEQUIP:MASTER:�̈� = 2
		CALL STAIN_�A�i���o�}��
		EXP:PLAYER:�`�����o�� ++
		EXP:ARG:�}���o�� ++
		TEQUIP:PLAYER:51 = ARG
		;��d�t���O
		TCVAR:ARG:108 = 1
		TCVAR:ARG:�n�s�t���O = 1
	;�C���}�`�I����
	CASE 91
		CALL TOUCH_SET(SET_FROM_P,4,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		SIF GETBIT(TALENT:PLAYER:2,0)
			SOURCE:ARG:���b += 200
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 800
		SOURCE:PLAYER:�t�� += 100
		SOURCE:ARG:���s += 800
		SOURCE:ARG:���v += 800
		SOURCE:ARG:��E += 800
		SOURCE:PLAYER:���l += 80
		LOCALS = {PLAYER}/
		CSTR:ARG:10 += LOCALS
		TCVAR:ARG:2 = 4
		TCVAR:ARG:�n�s�t���O = 1
		;���x
		TCVAR:ARG:4 += 800
		STAIN:ARG:2 |= STAIN:PLAYER:0
		STAIN:PLAYER:0 |= STAIN:ARG:2
		EXP:PLAYER:�����o�� ++
	;���U��t�`
	CASE 93
		CALL TOUCH_SET(SET_FROM_P,7,ARG)
		SOURCE:ARG:���b += 100
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 1000
		SOURCE:PLAYER:�t�� += 100
		SOURCE:ARG:���s += 600
		SOURCE:ARG:���v += 600
		SOURCE:PLAYER:���` += 1000
		CALL PAIN_CHECK_A_MASTER(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 12
		TCVAR:PLAYER:4 += 250
		LOCALS = {PLAYER}/
		CSTR:ARG:10 += LOCALS
		TCVAR:ARG:2 = 2
		;���x
		TCVAR:ARG:4 += 1000
		CALL STAIN_�A�i���o�}��
		EXP:PLAYER:�`�����o�� ++
		EXP:ARG:�}���o�� ++
		TEQUIP:PLAYER:51 = ARG
		;��d�t���O
		TCVAR:ARG:108 = 1
		TCVAR:ARG:�n�s�t���O = 1
	;����ʂ`�}������
	CASE 94
		SIF MASTER_POSE(0,SET_P) == ARG
			CALL TOUCH_RESET_T(ARG)
		CALL TOUCH_SET(SET_FROM_P,7,ARG)
		IF BEDROOM(CFLAG:MASTER:���݈ʒu)
			SIF TEQUIP:ARG:0
				CALL DATUI_BOTTOM_T(ARG,0)
		ELSE
			SIF TEQUIP:ARG:0 & 14
				CALL DATUI_BOTTOM_T(ARG,1)
		ENDIF
		TCVAR:ARG:����r�� = 1
		TCVAR:PLAYER:�`�r������ = 1
		SOURCE:ARG:���b += 100
		SOURCE:ARG:���s�� += 300
		SOURCE:ARG:���� += 1000
		SOURCE:ARG:�U�f += 400
		SOURCE:PLAYER:�t�� += 100
		SOURCE:ARG:���s += 600
		SOURCE:ARG:���v += 800
		SOURCE:PLAYER:���` += 800
		CALL PAIN_CHECK_A_MASTER(ARG)
		LOCALS = {ARG}/
		CSTR:PLAYER:10 += LOCALS
		TCVAR:PLAYER:2 = 12
		TCVAR:PLAYER:4 += 250
		LOCALS = {PLAYER}/
		CSTR:ARG:10 += LOCALS
		TCVAR:ARG:2 = 2
		TCVAR:ARG:4 += 1000
		TEQUIP:MASTER:�̈� = 1
		CALL STAIN_�A�i���o�}��
		EXP:PLAYER:�`�����o�� ++
		EXP:ARG:�}���o�� ++
		TEQUIP:PLAYER:51 = ARG
		TCVAR:ARG:�n�s�t���O = 1
	;������
	CASE 120
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 120
		SOURCE:ARG:�U�f += 50
	;������
	CASE 121
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 120
		SOURCE:ARG:�U�f += 50
	;������
	CASE 122
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 100
		SOURCE:ARG:�U�f += 80
		SOURCE:ARG:��d += 50
	;��������
	CASE 123
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 80
		SOURCE:ARG:���� += 20
		SOURCE:ARG:�U�f += 50
		SOURCE:ARG:���� += 30
	;�j����
	CASE 124
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 80
		SOURCE:ARG:���� += 20
		SOURCE:ARG:�U�f += 20
		SOURCE:ARG:���� += 60
		SOURCE:ARG:�J�� += 20
	;��������
	CASE 125
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:���� += 40
		SOURCE:ARG:���� += 80
		SOURCE:ARG:�J�� += 60
	;�G��������
	CASE 126
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 100
		SOURCE:ARG:�U�f += 50
		SOURCE:ARG:��d += 80
	;������k��
	CASE 127
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:� += 100
		SOURCE:ARG:���� += 50
		SOURCE:ARG:�J�� += 80
	;�b��������
	CASE 128
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:���y += 120
		SOURCE:ARG:� += 50
	;����r��
	CASE 129
		CALL TOUCH_RESET_T(ARG)
		SOURCE:ARG:���� += 40
		SOURCE:ARG:���� += 80
		SOURCE:ARG:�J�� += 80

;�������烊�A�N�V����
	;�S����
	CASE 500
		SELECTCASE TCVAR:ARG:21
			CASE 1
				TCVAR:PLAYER:4 += 700
				SOURCE:ARG:���� += 300
			;�������カ�z�[���h
			CASE 2
				TCVAR:PLAYER:4 += 300
				SOURCE:ARG:�U�f += 500
			;����������
			CASE 3
				TCVAR:PLAYER:4 += 100
				SOURCE:ARG:���� += 500
				SOURCE:ARG:�J�� += 500
			;���u����
			CASE 7
				SOURCE:ARG:� += 1000
				EXP:ARG:����o�� ++
		ENDSELECT
	CASE 501
		SELECTCASE TCVAR:ARG:21
			CASE 1
				TCVAR:PLAYER:4 += 700
				SOURCE:ARG:���� += 300
			;���u����
			CASE 2
				SOURCE:ARG:� += 1000
				EXP:ARG:����o�� ++
		ENDSELECT
	;���
	CASE 502
		SELECTCASE TCVAR:ARG:21
			CASE 1
				LOCALS = {ARG}/
				CSTR:PLAYER:10 += LOCALS
				TCVAR:PLAYER:2 = 3
				;���x
				TCVAR:PLAYER:4 += 200
				SIF !EXP_UP(24,ARG)
					EXP:ARG:����o�� ++
		ENDSELECT
	;�t�F���`�I
	CASE 503
		SELECTCASE TCVAR:ARG:21
			CASE 1
				LOCALS = {ARG}/
				CSTR:PLAYER:10 += LOCALS
				TCVAR:PLAYER:2 = 4
				;���x
				TCVAR:PLAYER:4 += 300
				SOURCE:ARG:���l += 200
				SIF !EXP_UP(25,ARG)
					EXP:ARG:�����o�� ++
			CASE 2
				TCVAR:PLAYER:4 += 150
				SOURCE:ARG:��d += 200
				SOURCE:ARG:���l += 200
			;�f�B�[�v�X���[�g
			CASE 3
				TCVAR:PLAYER:4 += 500
				SOURCE:ARG:��d += 300
				SOURCE:ARG:��� += 100
				SOURCE:ARG:���l += 300
			;�t�F������
			CASE 4
				SOURCE:ARG:���b += 100
				SOURCE:ARG:�I�o += 200
				SOURCE:ARG:���l += 200
				EXP:ARG:���Ԍo�� ++
		ENDSELECT
	;�p�C�Y��
	CASE 504
		SELECTCASE TCVAR:ARG:21
			CASE 1
				LOCALS = {ARG}/
				CSTR:PLAYER:10 += LOCALS
				TCVAR:PLAYER:2 = 5
				;���x
				TCVAR:PLAYER:4 += 300
				SIF !EXP_UP(26,ARG)
					EXP:ARG:�p�C�Y���o�� ++
			;�c�p�C�Y��
			CASE 2
				TCVAR:PLAYER:4 += 300
				SOURCE:ARG:�U�f += 300
				SOURCE:ARG:��d += 300
			;�J�Ԃ����
			CASE 3
				TCVAR:PLAYER:4 += 500
				SOURCE:ARG:��d += 500
			CASE 4
				TCVAR:PLAYER:4 += 1000
				SOURCE:ARG:��d += 200
				SOURCE:ARG:� += 100
				SOURCE:ARG:�B�� += 100
				SOURCE:ARG:���l += 200
				EXP:ARG:�����o�� ++
				EXP:ARG:�p�C�Y���o�� ++
				;����o��
				SIF TALENT:ARG:���� && ASSIPLAY == 0
					EXP:ARG:����o�� += 1
				;�z�ꂪ�L�㎝���̏ꍇ�́A�����҂ɚn�s���y�o����ǉ�
				SIF TALENT:ARG:�L��
					EXP:ARG:�n�s���y�o�� ++
		ENDSELECT
	;�f��
	CASE 505
		SELECTCASE TCVAR:ARG:21
			CASE 1
				LOCALS = {ARG}/
				CSTR:PLAYER:10 += LOCALS
				TCVAR:PLAYER:2 = 6
				;���x
				TCVAR:PLAYER:4 += 300
			;����ǉ�
			CASE 2
				TCVAR:PLAYER:4 += 300
				SOURCE:ARG:��d += 300
				EXP:ARG:����o�� ++
		ENDSELECT
	;������S����
	CASE 506
		SELECTCASE TCVAR:ARG:21
			;�g���悶��
			CASE 1
				SOURCE:ARG:��� += 300
				SOURCE:ARG:���� += 2000
				DOWNBASE:ARG:�̗� += 50
				DOWNBASE:ARG:�C�� += 100
			;�ܖ�
			CASE 2
				SOURCE:ARG:���] += 100
				SOURCE:ARG:���� += 1000
				DOWNBASE:ARG:�C�� += 50
		ENDSELECT
	;�ʝ���
	CASE 600
		TCVAR:PLAYER:4 += 200
		SOURCE:ARG:�U�f += 200
		SOURCE:ARG:��d += 200
		SOURCE:ARG:���� += 200
		SOURCE:ARG:���� += 300
		SIF TALENT:ARG:�T�h || ABL:ARG:�T�h���C > 4
			SOURCE:ARG:���s += 100
			TCVAR:ARG:�n�s�t���O = 1
	;�A�i������
	CASE 601
		TCVAR:PLAYER:4 += 100
		SOURCE:ARG:�J�� += 300
		SOURCE:ARG:���s += 100
		SOURCE:PLAYER:���` += 300
		TCVAR:ARG:�n�s�t���O = 1
ENDSELECT

IF TEQUIP:MASTER:�u�Z�b�N�X >= 0 || TEQUIP:MASTER:�`�Z�b�N�X >= 0
	IF TEQUIP:ARG:������
		TEQUIP:ARG:������ = 0
		PRINTL �������݉�����
	ENDIF
	IF TEQUIP:ARG:����z��
		TEQUIP:ARG:����z�� = 0
		PRINTL ������z��������
	ENDIF
ENDIF

CALL �}�X�^�[�J�E���^�[����(ARG)

repo_name: akadiya/eratw

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用カウンター脱衣関連勝手に魔改造パッチ修正版/ERB/ステータス計算関連/COUNTER/COUNTER_SOURCE.ERB

license: unknown


code:
;�J�E���^�[�����g�E��
;����0	�Q�Ƃ���L�����ԍ�
;����1	0=�S���E����
;		1=���������E���� �Y�{���𗚂��Ă����ꍇ�͑S���E���� �����𗚂��Ă��Ȃ������ꍇ���S���E����
;		2=�㒅�����E���� �㒅�𒅂Ă��Ȃ��ꍇ�͑S���E����
@DATUI_BOTTOM(ARG, ARG:1)

ARG:1 = DATUI_BOTTOM_OPTIMIZE(ARG, ARG:1)

SELECTCASE ARG:1
	;�S���E����
	CASE 0
		TCVAR:ARG:22 = 1
	;���������E����
	CASE 1
		TCVAR:ARG:22 = 2
	;�㒅�����E����
	CASE 2
		TCVAR:ARG:22 = 3
ENDSELECT

@DATUI_BOTTOM_T(ARG, ARG:1)

ARG:1 = DATUI_BOTTOM_OPTIMIZE(ARG, ARG:1)

IF !TEQUIP:ARG:�̈�
	SELECTCASE ARG:1
		;�S���E����
		CASE 0
			TCVAR:ARG:23 = 1
		;���������E����
		CASE 1
			TCVAR:ARG:23 = 2
		;�㒅�����E����
		CASE 2
			TCVAR:ARG:23 = 3
	ENDSELECT
ENDIF

;���łɒE���ł����ꍇ�̏C��
;���b�Z�[�W���̕�������炵����
@DATUI_BOTTOM_OPTIMIZE(ARG, ARG:1)
#FUNCTION
SELECTCASE ARG:1
	;���������E����
	CASE 1
		;�Y�{���𗚂��Ă����ꍇ�͑S���E����
		IF TEQUIP:ARG:0 & 8
			ARG:1 = 0
		;�����𗚂��Ă��Ȃ��ꍇ�͑S���E����
		ELSEIF (TEQUIP:ARG:0 & 6) == 0
			ARG:1 = 0
		ENDIF
	;�㒅�����E����
	CASE 2
		;�㒅�𒅂Ă��Ȃ��ꍇ�͑S���E����
		SIF (TEQUIP:ARG:0 & 9) == 0
			ARG:1 = 0
ENDSELECT
RETURNF ARG:1

;�J�E���^�[�����g�E�ߎ�����
;����0	�Q�Ƃ���L�����ԍ�
;����1	1=�S���E����
;		2=���������E���� �Y�{���𗚂��Ă����ꍇ�͑S���E���� �����𗚂��Ă��Ȃ������ꍇ���S���E����
;		3=�㒅�����E���� �㒅�𒅂Ă��Ȃ��ꍇ�͑S���E����
@DATUI_BOTTOM_LATE(ARG, ARG:1)
SELECTCASE ARG:1
	;�S���E����
	CASE 1
		EQUIP:ARG:�����g�����P = 0
		EQUIP:ARG:�����g�����Q = 0
		EQUIP:ARG:�Y�{�� = 0
		EQUIP:ARG:�����g�㒅 = 0
		EQUIP:ARG:�X�J�[�g = 0
		EQUIP:ARG:�{�f�B�[�X�[�c = 0
		EQUIP:ARG:�����s�[�X = 0
		EQUIP:ARG:���� = 0
		EQUIP:ARG:���I�^�[�h = 0
	;���������E����
	CASE 2
		EQUIP:ARG:�����g�����P = 0
		EQUIP:ARG:�����g�����Q = 0
		EQUIP:ARG:�Y�{�� = 0
		EQUIP:ARG:�����g�㒅 = 0
		EQUIP:ARG:�{�f�B�[�X�[�c = 0
		EQUIP:ARG:���I�^�[�h = 0
	;�㒅�����E����
	CASE 3
		EQUIP:ARG:�Y�{�� = 0
		EQUIP:ARG:�����g�㒅 = 0
		EQUIP:ARG:�X�J�[�g = 0
		EQUIP:ARG:�{�f�B�[�X�[�c = 0
		EQUIP:ARG:�����s�[�X = 0
		EQUIP:ARG:���� = 0
		EQUIP:ARG:���I�^�[�h = 0
ENDSELECT

;�J�E���^�[�㔼�g�E��
;����0	�Q�Ƃ���L�����ԍ�
;����1	0=�S���E����
;		1=�͂��������� �͂����s�Ȃ��̂͒E����
@DATUI_TOP(ARG,ARG:1)

ARG:1 = DATUI_TOP_OPTIMIZE(ARG,ARG:1)

SELECTCASE ARG:1
	;�S���E��
	CASE 0
		TCVAR:ARG:24 = 1
	;�͂���
	CASE 1
		TCVAR:ARG:24 = 2
ENDSELECT

@DATUI_TOP_T(ARG,ARG:1)
SELECTCASE ARG:1
	;�S���E��
	CASE 0
		TCVAR:ARG:25 = 1
	;�͂���
	CASE 1
		TCVAR:ARG:25 = 2
ENDSELECT

;�J�E���^�[�㔼�g�E�ߎ�����(MASTER)
;����0	�Q�Ƃ���L�����ԍ�
;����1	1=�S���E����
;		2=�͂��������� �͂����s�Ȃ��̂͒E����
@DATUI_TOP_LATE(ARG, ARG:1)
SELECTCASE ARG:1
	CASE 1
		EQUIP:ARG:�㔼�g�����P = 0
		EQUIP:ARG:�㔼�g�����Q = 0
		EQUIP:ARG:�㔼�g�㒅�P = 0
		EQUIP:ARG:�㔼�g�㒅�Q = 0
		EQUIP:ARG:�{�f�B�[�X�[�c = 0
		EQUIP:ARG:�����s�[�X = 0
		EQUIP:ARG:���� = 0
		EQUIP:ARG:���I�^�[�h = 0
	CASE 2
		EQUIP:ARG:�㔼�g�����P = 0
		EQUIP:ARG:�㔼�g�㒅�P = 0
		EQUIP:ARG:�{�f�B�[�X�[�c = 0
		EQUIP:ARG:�����s�[�X = 0
		EQUIP:ARG:���I�^�[�h = 0
ENDSELECT

;�J�E���^�[�㔼�g�E�ߎ�����(TARGET)
@DATUI_TOP_T_LATE(ARG, ARG:1)
SELECTCASE ARG:1
	CASE 1
		EQUIP:ARG:�㔼�g�����P = 0
		EQUIP:ARG:�㔼�g�����Q = 0
		EQUIP:ARG:�㔼�g�㒅�P = 0
		EQUIP:ARG:�㔼�g�㒅�Q = 0
		EQUIP:ARG:�{�f�B�[�X�[�c = 0
		EQUIP:ARG:�����s�[�X = 0
		EQUIP:ARG:���� = 0
		EQUIP:ARG:���I�^�[�h = 0
		TEQUIP:TARGET:�㒅�E�ߍς� = 1
	CASE 2
		EQUIP:ARG:�㔼�g�����P = 0
		EQUIP:ARG:�㔼�g�㒅�P = 0
		EQUIP:ARG:�{�f�B�[�X�[�c = 0
		EQUIP:ARG:�����s�[�X = 0
		EQUIP:ARG:���I�^�[�h = 0
		TEQUIP:TARGET:�㒅�E�ߍς� = 1
ENDSELECT

@DATUI_SHOES(ARG,ARG:1)
SELECTCASE ARG:1
	CASE 0
		EQUIP:ARG:�C = 0
	CASE 1
		EQUIP:ARG:�C = 0
		EQUIP:ARG:�C�� = 0
ENDSELECT
CALL CLOTHES_SETTING_TRAIN(ARG)

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用カウンター脱衣関連勝手に魔改造パッチ修正版/ERB/ステータス計算関連/COUNTER/COUNTER_脱衣.ERB


code:
;�����̃p���c�ɍ��킹���u���W���[��I��
;�㔼�g�������㏑�������Ⴄ�̂͐F�X��肠�肻��
;�蔲���A���M����
@�����̃u���W���[(ARG)
SELECTCASE CFLAG:ARG:���傤�̂ς��
	;�m�[�p��
	CASE 0
		;�m�[�u��
		EQUIP:ARG:�㔼�g�����P = 0
	;�g�����N�X
	CASE 1
		;�s�V���c
		EQUIP:ARG:�㔼�g�����P = 10
	;�h�����[�Y
	;���܂���p���c
	;�t�����p���c
	CASE 2, 3, 6
		;�L���~�\�[��
		EQUIP:ARG:�㔼�g�����P = 4
	;���ʃp���c
	;���܂��܃p���c
	CASE 4, 5
		;�X�|�[�c�u��
		EQUIP:ARG:�㔼�g�����P = 3
	;���n�̃p���c
	;���[���O�p���c
	CASE 7, 10
		IF TALENT:ARG:�c�t || TALENT:ARG:�c���^�c���ލs
			;�L���~�\�[��
			EQUIP:ARG:�㔼�g�����P = 4
		ELSEIF TALENT:ARG:�̌^ < 0 || TALENT:ARG:���m
			;�X�|�[�c�u��
			EQUIP:ARG:�㔼�g�����P = 3
		ELSE
			;�u���W���[
			EQUIP:ARG:�㔼�g�����P = 1
		ENDIF
	;���[���C�Y
	;�n�C���O
	;�V���[�c
	;�X�L�����e�B
	CASE 11, 12, 19, 20
		;�u���W���[
		EQUIP:ARG:�㔼�g�����P = 1
	;���[�X�̃p���e�B�i���j
	CASE 13
		;���[�X�̃u���i���j
		EQUIP:ARG:�㔼�g�����P = 11
	;���[�X�̃p���e�B�i���j
	CASE 14
		;���[�X�̃u���i���j
		EQUIP:ARG:�㔼�g�����P = 12
	;�s�o�b�N
	;�R�p��
	CASE 15 ,16
		EQUIP:ARG:�㔼�g�����P = 1
	;���U�[�p���c
	CASE 17
		;�x���g�u��
		EQUIP:ARG:�㔼�g�����P = 9
	;�Օ��̃p���c
	CASE 18
		;�Օ��̃u��
		EQUIP:ARG:�㔼�g�����P = 13
	;�ӂ�ǂ�
	CASE 21
		;�T���V
		EQUIP:ARG:�㔼�g�����P = 2
	;G�X�g�����O�X
	CASE 22
		;�u���W���[
		EQUIP:ARG:�㔼�g�����P = 1
	;�V�[�X���[�V���[�c
	CASE 23
		;�V�[�X���[�u��
		EQUIP:ARG:�㔼�g�����P = 14
	;�I�[�v���V���[�c
	CASE 24
		;�g�b�v���X�u��
		EQUIP:ARG:�㔼�g�����P = 15
	;�΂񂻂�����
	CASE 25
		;�΂񂻂�����
		EQUIP:ARG:�㔼�g�����P = 16
	;�h�����[�Y�i�ҊJ���j
	CASE 26
		;�L���~�\�[��
		EQUIP:ARG:�㔼�g�����P = 4
	;�呀��
	CASE 27
		;�呀�уu��
		EQUIP:ARG:�㔼�g�����P = 17
	;�G�艺��
	CASE 28
		;�G��u��
		EQUIP:ARG:�㔼�g�����P = 18
	;�o�C�u�p���c
	;�j���o�C�u�p���c
	CASE 29, 30
		;�u���W���[
		EQUIP:ARG:�㔼�g�����P = 1
	;�r�L�j�{�g��
	CASE 31
		;�r�L�j�g�b�v
		EQUIP:ARG:�㔼�g�����P = 19
	;�}�C�N���{�g��
	CASE 32
		;�}�C�N���g�b�v
		EQUIP:ARG:�㔼�g�����P = 20
ENDSELECT

;#;PRINTFORML %CALLNAME:ARG%:�����g�����Q:{CFLAG:ARG:���傤�̂ς��}:%PANTSNAME(CFLAG:ARG:���傤�̂ς��)%�@�㔼�g�����P:{EQUIP:ARG:�㔼�g�����P}:%CLOTHNAME(7, EQUIP:ARG:7)%

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用カウンター脱衣関連勝手に魔改造パッチ修正版/ERB/衣服/BRA.ERB


code:
[SKIPSTART]
���ߑ��ݒ�̎d�l
�E��{�I�ɂ͋L�@��ς��ĉǐ����グ������
�EGET_INT/GET_STR���g�p���邱�Ƃŏ����擾���邱�Ƃ��ł���
�E1�̈ߑ��ɂ�2�֐����g�p����i����1�͑��ۊ֐��j
�E�e�ߑ��͈ߑ��J�e�S���i��EQUIPNAME�Ǝ��Ă��邪�����ς����j���ƂɊǗ�����
�E�����ߑ��J�e�S���̂Ȃ��œ��ꖼ�̂̑����i�͍��Ȃ�
�@�t�Ɍ����΁A�Ⴄ�ߑ��J�e�S���ł���Ȃ�Ζ��̂d�����Ă��\��Ȃ�
�@��j�u�������v�̃��{���Ɓu���̑��ߑ��v�̃��{��
�@�������A�u�O�߁v�̔��߁i�͂����j�Ɓu�㔼�g�㒅_�͂����s�v�̔��߁i�͂����A�тႭ���j�̏ꍇ��
�@�u����\�L�Ŏw���������̂��S���Ⴄ�v���߂ɏ㔼�g�㒅�P�̑���ύX�����i�܂���킵����j
�E�ߑ��J�e�S���Ƒ������ʂ͊�{�I�Ɉ�Έ�̑Ή��֌W�ɂ���
�@���Ƃ��΁u�������v��EQUIP:�X�q�ɂ̂ݑ����\
�@�������A��O�Ƃ��āu���̑��ߑ��v��EQUIP:���̑��P�AEQUIP:���̑��Q�AEQUIP:���̑��R�̑S�Ăɑ����ł���
�@���̎d�l�͕ς��悤�Ǝv���Ες����邯��@CLOTHES_ID��S�ߑ�ID�̍Đݒ肪�K�v�ɂȂ�͂��i�܂�߂�ǂ��j
�E�ߑ��̎Q�Ƃ̍ۂɂ͂��̂悤�ɂ���
�@GET_INT(�o�^�ԍ���, �ߑ��J�e�S��, �ߑ��̃J�e�S����ID, �Q�Ƃ��������̎��)
�E����̖��O�̈ߑ���ID���擾���������͂��̂悤�ɂ���
�@CLOTHES_ID(�������ʖ�, ������)
�E�������ʂ���Y������ߑ��J�e�S�����擾���鎞�͂��̂悤�ɂ���
�@CLOTHES_PARTS_TO_CATEGORY(�������ʖ�)
�E�ȏ�̊֐�����A�������ʂƑ������݂̂Łi�ԍ����g�p�����Ɂj�������Q�Ƃ��邱�Ƃ��ł���
�@GET_INT(�o�^�ԍ���, CLOTHES_PARTS_TO_CATEGORY(�������ʖ�), CLOTHES_ID(�������ʖ�, ������), �Q�Ƃ��������̎��)
�@�܁[�A���ݑ������̑����̎Q�ƂȂ�CLOTHES_ID�͕s�v�Ȃ��
�@GET_INT(�o�^�ԍ���, CLOTHES_PARTS_TO_CATEGORY(�������ʖ�), EQUIP:�o�^�ԍ�:�������ʖ�, �Q�Ƃ��������̎��)
�@�����Ȃ�

�E�����p�̊o��
�@�i�����g�����n�͂܂��ʁj
�@�����炭���������l�����ł����Ǝv��
�@�㔼�g�㒅�P�i�͂����s�j���O���A�㔼�g�㒅�Q�i�͂����\�j�͓����ɒ��p����ߑ�

�E�ߑ����擾�֐�@CLOTHNAME
�e�����̐ݒ肩����������Ă�����悤�ɂȂ����̂ő啝�Ɋȗ���

�E�������擾�֐��i@SHOW_BOTTOM���j
�P�ɍł���̑����̖��O��Ԃ��悤�ɕύX�i�ȗ����j���Ă��܂�
���O�Ƃ͕ʂɂ������Ȃ�STR�p��"�`��"�Ȃ��S�ߑ��Őݒ肷��ΊȒP�ɎQ�Ƃł��܂�

�E�����ւ��֘A�ɂ��Ă��ގ��̎d�l�Ŏ�������
�E�ߑ��Z�b�g�֐��Q
�@���̊֐��Q�͒����ւ��Z�b�g�̓��e���L�q����
�E�L�����f�[�^�֐��Q
�@���̊֐��Q�͊e�L�����̌ʂ̃f�[�^���ꌳ�Ǘ�������
�@���i���̐ݒ�͊e�L�����œƗ����Ă��邽�߂ɂ����ɋL�q����
�@�܂��A�A���X�̈ߑ��ɑ��݂��Ă����N�z���a�������̎����̂��߂�
�@���i���̐ؑ֐���̋@�\���ǉ�����
�@�j���ɂ���Đ؂�ւ���Ƃ�����肽����΂ł���
�@�ڎw�����F�̖��@�g��
�E�ߑ��ݒ�ɂ���
�@���������ɂ���āu���̕����𖈓�����悤�Ɂv�Ƃ����w�肪�\
�@0�@�@�@�f�t�H���g�̂܂�
�@1�`99�@COORDINATE1�`99���w��
�@100�@�@�蓮�Őݒ肷��iCFLAG:600�`630�j
�@101�`�@����L�����̐^���i����L�����̕��i�����Q�Ƃ���A101�Ȃ�얲�j
�E�p�W���}�ݒ�ɂ���
�@�p�W���}�͂���Ȃɂ�������Ă��������ˁ[�ȂƎv�����̂�
�@COORDINATE�֐��̂Ȃ�����ǂ�𒅂�����̂���I�Ԍ^���ɂ���
�@�E�p�W���}�i�@�فj
�@�E�p�W���}�i�l�O���W�F�j
�@�E�p�W���}�i�x�r�[�h�[���j
�@�E�p�W���}�i�����s�[�X�j
�@�E�p�W���}�i�Y�{���㉺�j
�@�E�p�W���}�i�X�J�[�g�㉺�j
�@�E�p�W���}�i�Y�{���{�t�[�h�j
�@�E�p�W���}�i�X�J�[�g�{�t�[�h�j
�@�������A��O�Ƃ���"�p���C�`"�Ńp���c�꒚�A"�S��"�ł͂�����ڂŐQ�����邱�Ƃ��ł���
�@�i����������������������Ă����������̂Łj

���X�̑����i�܂��̕ύX
�E���̕ύX
�@�l�O���W�F�������O�l�O���W�F
�@�摜�����̌��ʂ��ߌ��߂���̂Ŗ��̕ύX
�@�x�r�[�h�[���Ƃ̍��ʉ��̂��߂ɂ��ƂȂ��߂Ȉߑ���z�肷��
�E�J�e�S���ύX
�@�u�㔼�g�㒅_�͂����s�v�́u���߁i�͂����A�тႭ���j�v�̖��̂��u�������v�ɕύX
�@�ߑ��Z�b�g�n�ł́u�_���Z�b�g�v�݂̂��g�p���Ă���u�ی����̏����t�Z�b�g�v�ł��u���߂̓V�g�Z�b�g�v�ł��g���Ă��Ȃ�
�@�܂��A���i���g�p�L���������Ȃ������̂ŕύX
�@
�@����ɁA���́u�������v�͓��ɒ����ވߑ��ł��邱�Ƃ��l�����邽�߁A
�@�ߑ��J�e�S�����u�㔼�g�㒅_�͂����\�v�Ɉړ�����
�E�ǉ��ߑ�
�@�������u�t�[�h�v�A�p�W���}�p�ɐV��
�@�X���ł̋c�_�ŏo�Ă����A�C�f�A���̗p�����Ă��炢�܂���
�E�ǉ��ߑ�
�@�r�������u�A�[���J�o�[�v�A�p���X�B�p�ɐV��
�E�ǉ��ߑ�
�@�㔼�g�ߑ�_�͂����s�u�����v�A�z�s�����p�ɐV��
�@�ޏ��ł������Ƃ��날��݂�����
�E�ǉ��ߑ�
�@�㔼�g�ߑ�_�͂����s�u��߁v
�@�a���ۂ��������g�[����������
�@�����ƂƂĂ��_�E���ۂ��ł���
�E�ǉ��ߑ�
�@�C�u�B�v
�@�_�E���M���I�ȑ����Ƃ������ƂŁu�����v�u��߁v�Ƃ̃Z�b�g��z�肵�Ēǉ�
�E�ǉ��ߑ�
�@���̑��u�u���[�`�v
�@�e�T�����̎񌳂̂ƂĂ���ۓI�ȃu���[�`�����������̂ő��݂���
�@���e�B����ɂ�����

���ߑ��J�e�S���̖��O�ɂ���
�d�l����₱�����Ȃ��Ă��܂��̂��m�̏�ł���
�Ȃ��ꕔ�̈ߑ��J�e�S���̖��O��EQUIPNAME�ƕς��Ă��邩�Ƃ�����
����͈ȉ��̗��R����ł�
�@���R�P�F�֐�����@�����g�����P2��������@�����g�����P_2�Ƃ����̂��]��ɂ��C�F��������
�@���R�Q�F�����I�łȂ�EQUIPNAME������
�@�@�@�@�@�E���{����J�`���[�V���́u�X�q�v
�@�@�@�@�@�E�����g�����P�Ɖ����g�����Q�̋敪�̈Ⴂ���킩��ɂ����i���̔ԍ����}�W�b�N�i���o�[�j
�@�@�@�@�@�E�Ƃ肠�����u�͂����\�E�͂����s�v�u���炵�\�E���炵�s�v�̖��O�ɂ���
�@�@�@�@�@�E�ǂ���炱�̕��ނ��s���m�ł���炵�����ԍ����͂܂����H
�@�@�@�@�@�E�Ƃ肠�����b��̎d�l�ł�
�@���R�R�FEQUIPNAME����M�낤�Ƃ���ƏC���ӏ����c��
�@�@�@�@�@�ǉ����������ς����ق������N

�ȉ��AEQUIPNAME�ƈߑ��J�e�S���̑Ή�

�A�N�Z�T��
���A�N�Z�T��
�@���̑��͈Ⴂ�A���炩�̌��ʂ������Ƃ�����
�@�P�͓V��ˑ��ōs������BASE����y���Ɏg���邱�Ƃ�����

�X�q
��������
�@�X�q�����łȂ��z���C�g�u�����⃊�{���ȂǂƂ��������������i���w��

�C
���C
�@�����ł͒E��

�C��
���C��
�@�ꕔ�̃L�����̓R���t�B�O�ɂ���ĕ��i���̈ߑ����j�[�\�ɂȂ�

�����g�����P
�������g����_���炵�s��

�����g�����Q
�������g����_���炵�\
�@�����g�����i���炵�\�j
�@������p���c�i�{�r�L�j�̉����g�����j
�@�Ɠ��ȏ������������߁A�ق��̈ߑ��Ƃ͕ʈ����ŊǗ�����

�㔼�g�����P
���㔼�g����_�͂����s��

�㔼�g�����Q
���㔼�g����_�͂����\

���I�^�[�h
�����I�^�[�h

�{�f�B�[�X�[�c
���{�f�B�[�X�[�c

�Y�{��
���Y�{��
�@���炵�s��

�����g�㒅
���Y�����������Ȃ�����̂Ŕp�~�A�������������ꍇ�͂��̑��Ȃ�Œǉ����ĉ�����

�X�J�[�g
���X�J�[�g
�@�߂���鉺���g����

�㔼�g�㒅�P
���㔼�g�㒅_�͂����s��

�㔼�g�㒅�Q
���㔼�g�㒅_�͂����\

�����s�[�X
�������s�[�X

����
������

�O��
���O��
�@�ߕ��Ƃ͕ʂɏォ��H�D���Ă�ߑ�

���̑��P�A���̑��Q�A���̑��R
���P�`�R��S���܂Ƃ߂āu���̑��ߑ��v�ɓ���

�r������
���r������
�@��Ɏ�܌n

���p���c
����ȏ������������Ȃ̂ŕʂŏ�������
�ECFLAG:���傤�̃p���c
�@����̍ŏ��ɂ��傤�̂ς��ݒ肵��CFLAG�ŕێ�
�ECFLAG:�p�W���}�p���c
�@����̍ŏ��Ƀp�W���}�p�̃p���c��ݒ肵��CFLAG�ŕێ�
�@�p�W���}�ɒ��ւ������Ƀm�[�p���ł���΃p�W���}�p���c�𒅗p����
�@�p�W���}�p���c�𒅗p�������_�Ńp�W���}�p���c��0���������邽��
�@�����p�W���}�p���c�͕s�\�ł�

���v���p�e�B�ɂ���

�����i�n�N���X�̃v���p�e�B
CASE "���O"
	���O�A���̈ߑ��̖��́iSTR�j
	�ߑ��J�e�S�����ŏd�������邱�Ƃ͂ł��Ȃ�
	CALLF MAKE_STR(V_NAME, "�ዾ")
CASE "��������"
	���̈ߑ��𑕔�����EQUIP�iSTR�j
	CALLF MAKE_STR(V_NAME, "�u�A�N�Z�T���v")
CASE "�����ւ��\"
	�p���c����A�����ւ��R�}���h�Őݒ�ł��邩�ǂ���
	�r�L�j�{�g���A�}�C�N���{�g������
	CALLF MAKE_INT(V_NAME, 1)
	���������ǎ蓮���������@�\���o���ĂȂ��̂Ŏ����������ł���
CASE "�͂���"
	�����̂ς�ł̔���p�iINT�A�Ƃ������^�U�l1/0�j
	���̍��ڂ����Ȃ��ς�̓L�����������I�ɗ������Ƃ͂Ȃ�

�ߑ��Z�b�g�N���X�̃v���p�e�B
CASE "���O"
	���O�A���̈ߑ��Z�b�g�̖��́iSTR�j
	�ߑ��Z�b�g�N���X���ŏd�������邱�Ƃ͂ł��Ȃ�
CASE "�e�푕������"
	���̑������ʂɒ�����ߑ��̓��e�iINT�j
	���ڂ����Ȃ��������ʂ�0�Ƃ݂Ȃ��ꉽ�����p���Ȃ�
CASE "��{�ߑ��Z�b�g"
CASE "�p�W���}�Z�b�g"
CASE "�R�X�v���ߑ��Z�b�g"
CASE "�L��������ߑ��Z�b�g"
	�����͑S�Ĉߑ��Z�b�g�̎�ނ�\���iINT�j
	�܁[�A����ł�����ۂ�����������ł�
	1�ɂ���Ƃ��̑����̈ߑ��Z�b�g���Ƃ݂Ȃ����
	���X�g�\���p�̐ݒ�ł�

�L�����f�[�^�N���X�̃v���p�e�B
CASE "�Ăі�"
	�K�{�ASTR
	�Ăі��A���̃L�����̖���
	�L�����f�[�^�N���X���ŏd�������邱�Ƃ͂ł��Ȃ�
CASE "�����̃p�W���}"
	�K�{�ASTR
	���p����p�W���}�̎�ނ��L�q����
	�p�W���}�̎�ނ̔���Ƃ��Ă�
	�P�D�܂��A��O����������i���������Q�Ɓj
	"�p���C�`"���w�肵���ꍇ�A�p�W���}�͒��p�����ɉ����݂̂𒅗p����
	"�S��"���w�肵���ꍇ�A���͉������Ȃ�
	�Q�D���ɁASTR�����ƂɈߑ��Z�b�g���Q�Ƃ���
	��v����ߑ��Z�b�g�����݂���ꍇ�͂��̈ߑ��Z�b�g�𒅗p����
	���C�V���c�����Ƃ����\�i�p���c�̗L���͕ʌŎw��̂��Ɓj
	�R�D�Ō�ɁASTR�����ƂɃL�����f�[�^���Q�Ƃ���
	STR == "���i��"�Ȃ炻�̃L�����̕��i�����Q�Ƃ����

CASE "���i���F�e�푕������"
	�K�{�AINT
	���i���̈ߑ��ݒ�
	���̑������ʂɒ�����ߑ��̓��e
	���ڂ����Ȃ��������ʂ�0�Ƃ݂Ȃ��ꉽ�����p���Ȃ�
	�u���i���v�ȊO�̈ߑ��̃L�����ʎw����\
	��j"�N�z���F�e�푕������"�ŔN�z���p�̈ߑ��Z�b�g���쐬�ł���
	�������A���̏ꍇ��"�����̈ߑ�", "�����̈ߑ�"��ݒ肷��K�v������
CASE "�����̈ߑ�", "�����̈ߑ�"
	�ȗ��ASTR
	���i���ȊO�̈ߑ���ݒ肵�Ȃ��ꍇ�ɂ͕K�v�Ȃ�
	��������ɍ��킹�Ĉߑ���ύX�����������Ɏg�p����
	SIF (DAY:2 == 1 && DAY:3 == 1) || (DAY:2 == 4 && DAY:3 == 31)
		CALLF MAKE_STR(V_NAME, "�N�z��")
	���̂悤�ɋL�q����Ə����ɍ��v���鎞�Ɂu�N�z���v�̈ߑ��𒅗p����i�A���X�̏������Q�Ɓj

	"�����̈ߑ�", "�����̈ߑ�"�̉����Ⴄ���Ƃ�����
	�ߑ��̍X�V������MASTER���N�������ۂɍs���̂�
	���̎��_�Ő������i���p�W���}�p�j�Ȃ疾���̈ߑ���ݒ肵
	���̎��_�Ŋ������Ȃ猻�ݒ��p���̕��i����ݒ肷�邱�ƂɂȂ�

	���j�@�\�ǉ�
	STR�ňߑ��Z�b�g�ɑ��݂��閼�O��Ԃ����ۂɂ͂��̈ߑ����Z�b�g����@�\��ǉ�

	�ߑ��w��p�̕�����Ƃ���"����", "�Œ�"�͎g�p�s�\�i�ʂ̋@�\�Ŏg�p���j

CASE "�����F�e�푕������", "�Œ�F�e�푕������"
	�݂�������
	��낤�Ǝv���΂ł���A��낤�������Ă�

	�ȗ��AINT
	�L�������Ƃ́u����͊O������_������v�Ƃ��������p�̏���
	�w�肵�����ʂ̑����𐄏��E���v����
	Emuera��config�ɂ�����default/fix�݂����Ȃ���
	���̏��͒����ւ��֘A�����̍Ō�ɓK�p�����
	��j�ؐ�
	�E�V�j�����L���b�v�́u�����v
	�E��тƍS����́u�Œ�v
	�������w�肵���ꍇ�A���̕��ʂɑ������Ă�����̂������Ȃ���Α������s��
	�Œ���w�肵���ꍇ�A���̕��ʂ̑������㏑������
	�n�_�J�ɂȂ鎞��
	EQUIP:0 = 0������ŌŒ葕���������p����
[SKIPEND]

;EQUIP:X:ARG�ɑ�������
;ARG:1�̈ߑ��̖��O��Ԃ�
@CLOTHNAME(ARG,ARG:1)
#FUNCTIONS
RETURNF GET_STR(, CLOTHES_PARTS_TO_CATEGORY(EQUIPNAME:(ARG:0)), ARG:1, "���O")

;�������ʂ���Y������ߑ��J�e�S����Ԃ�
@CLOTHES_PARTS_TO_CATEGORY(ARGS)
#FUNCTIONS
SELECTCASE ARGS
[SKIPSTART]
;�ߑ��̓�����
;�r���܂ōl�������߂�ǂ��Ă�߂�
CASE "�����g�����Q"
	RETURNF "�p���c"
CASE "����", "���I�^�[�h", "�{�f�B�[�X�[�c", "�����s�[�X"
	RETURNF "�S�g�ߑ�"
CASE "�X�q", "�O��", "�r������", "�㔼�g�㒅�P", "�㔼�g�㒅�Q", "�㔼�g�����P", "�㔼�g�����Q"
	RETURNF "�㔼�g�ߑ�"
CASE "�X�J�[�g", "�Y�{��", "�C", "�C��", "�����g�����P"
	RETURNF "�����g�ߑ�"
CASE "�A�N�Z�T��", "���̑��P", "���̑��Q", "���̑��R"
	RETURNF "���̑��ߑ�"
[SKIPEND]

CASE "�A�N�Z�T��", "�C", "�C��", "���I�^�[�h", "�{�f�B�[�X�[�c", "�Y�{��", "�X�J�[�g", "�����s�[�X", "����", "�O��", "�r������"
	RETURNF ARGS
CASE "�X�q"
	RETURNF "������"
CASE "�����g�����P"
	RETURNF "�����g����_���炵�s��"
CASE "�����g�����Q"
	RETURNF "�����g����_���炵�\"
CASE "�㔼�g�����P"
	RETURNF "�㔼�g����_�͂����s��"
CASE "�㔼�g�����Q"
	RETURNF "�㔼�g����_�͂����\"
CASE "�㔼�g�㒅�P"
	RETURNF "�㔼�g�㒅_�͂����s��"
CASE "�㔼�g�㒅�Q"
	RETURNF "�㔼�g�㒅_�͂����\"
CASE "���̑��P", "���̑��Q", "���̑��R"
	RETURNF "���̑��ߑ�"
ENDSELECT
THROW �s���ȕ���%ARGS%

;�������ʂƈߑ�������e�ߑ��̃J�e�S����ID��Ԃ�
@CLOTHES_ID(PARTS, C_NAME)
#FUNCTION
#DIMS PARTS
#DIMS C_NAME
#DIM  C_ID
C_ID = OBJNAME_TO_ID(, "GET", CLOTHES_PARTS_TO_CATEGORY(PARTS), C_NAME)
SIF C_ID == -1
	THROW %C_NAME%��%CLOTHES_PARTS_TO_CATEGORY(PARTS)%�ɂ͑��݂��܂���
RETURNF C_ID

;-------------------------------------------------
;�֐���:SHOW_BOTTOM
;�T�@�v:�����g�������擾�֐�
;�߂�l:������(������)
;����:0 �Q�Ƃ���L�����ԍ�
;����:1�X�J�[�g�A2���炵�A3���炵�s�A4�����g�㒅���炵�s�̎��(�ȗ������ꍇ�͍ł��I�o��W���Ă������)
;���@�l:�����֐�
;TEQUIP:0�ɑΉ����Ĉ�ԏ�ɒ��Ă���ߑ��̎�ނ�Ԃ�
;
;����:1�ɕ����̃r�b�g���w�肷��΂��̒�����D�悳�����̂�\�������邱�Ƃ��ł���
;����:1��9�Ȃ�X�J�[�g�Ɖ����g�㒅���炵�s�̂ǂ��炩���Ă�����̂�\���A�Ȃ�
;COUNTER_MESSAGE.ERB����@DATUI_MESSAGE���g�p��ɂȂ��Ă�̂Ńs���Ƃ��Ȃ��l�͌��Ă�
;-------------------------------------------------
@SHOW_BOTTOM(ARG, ARG:1)
#FUNCTIONS
#DIMS CONST TYPE, 5 = "", "�X�J�[�g", "���炵��", "���炵�s��", "�����g�㒅���炵�s��"
#DIMS PARTS
#DIM EQUIP_TARGET

;����1��TEQUIP:0���Ƃ炵���킹�ĕ\��������̂�I��
IF ARG:1
	EQUIP_TARGET = ARG:1 & TEQUIP:ARG:0
ELSE
	EQUIP_TARGET = TEQUIP:ARG:0
ENDIF

IF EQUIP_TARGET & 8
	LOCAL = 4
	;4�����g�����`��_�����g�㒅���炵�s��
ELSEIF EQUIP_TARGET & 4
	;3�����g�����`��_���炵�s��
	LOCAL = 3
ELSEIF EQUIP_TARGET & 2
	;2�����g�����`��_���炵��
	LOCAL = 2
ELSEIF EQUIP_TARGET & 1
	;1�����g�����`��_�X�J�[�g
	LOCAL = 1
ELSE
	LOCAL = 0
ENDIF
PARTS '= COVER_CLOTHES(ARG, @"�����g�����`��_%TYPE:LOCAL%")
SIF STRLENS(PARTS)
	RETURNF GET_STR(ARG, CLOTHES_PARTS_TO_CATEGORY(PARTS), EQUIP:ARG:PARTS, "���O")

;-------------------------------------------------
;�֐���:SHOW_�����g����
;�T�@�v:�����g�������擾�֐�
;�߂�l:������(������)
;����:0 �Q�Ƃ���L�����ԍ�
;����:1�X�J�[�g�A2���炵�A3���炵�s�A4�����g�㒅���炵�s�̎��(�ȗ������ꍇ�͍ł��I�o��W���Ă������)
;���@�l:�����֐�
;TEQUIP:0�ɑΉ����Ĉ�ԏ�ɒ��Ă���ߑ��̎�ނ�Ԃ�
;
;����:1�ɕ����̃r�b�g���w�肷��΂��̒�����D�悳�����̂�\�������邱�Ƃ��ł���
;����:1��9�Ȃ�X�J�[�g�Ɖ����g�㒅���炵�s�̂ǂ��炩���Ă�����̂�\���A�Ȃ�
;COUNTER_MESSAGE.ERB����@DATUI_MESSAGE���g�p��ɂȂ��Ă�̂Ńs���Ƃ��Ȃ��l�͌��Ă�
;-------------------------------------------------
@SHOW_�����g����(ARG, ARG:1)
#FUNCTIONS
#DIMS CONST TYPE, 5 = "", "�X�J�[�g", "���炵��", "���炵�s��", "�����g�㒅���炵�s��"
#DIMS PARTS
#DIM EQUIP_TARGET

;����1��TEQUIP:0���Ƃ炵���킹�ĕ\��������̂�I��
IF ARG:1
	EQUIP_TARGET = ARG:1 & TEQUIP:ARG:0
ELSE
	EQUIP_TARGET = TEQUIP:ARG:0
ENDIF

IF EQUIP_TARGET & 8
	LOCAL = 4
	;4�����g�����`��_�����g�㒅���炵�s��
ELSEIF EQUIP_TARGET & 4
	;3�����g�����`��_���炵�s��
	LOCAL = 3
ELSEIF EQUIP_TARGET & 2
	;2�����g�����`��_���炵��
	LOCAL = 2
ELSEIF EQUIP_TARGET & 1
	;1�����g�����`��_�X�J�[�g
	LOCAL = 1
ELSE
	LOCAL = 0
ENDIF
PARTS '= COVER_CLOTHES(ARG, @"�����g�����`��_%TYPE:LOCAL%")
SIF STRLENS(PARTS)
	RETURNF GET_STR(ARG, CLOTHES_PARTS_TO_CATEGORY(PARTS), EQUIP:ARG:PARTS, "���O")

;-------------------------------------------------
;�֐���:SHOW_TOP
;�T�@�v:�㔼�g�������擾�֐�
;�߂�l:������(������)
;����:0 �Q�Ƃ���L�����ԍ�
;����:1�͂����A2�͂����s��(�ȗ������ꍇ�͍ł��I�o��W���Ă������)
;���@�l:�����֐�
;TEQUIP:1�ɑΉ����Ĉ�ԏ�ɒ��Ă���ߑ��̎�ނ�Ԃ�
;-------------------------------------------------
@SHOW_TOP(ARG, ARG:1)
#FUNCTIONS
#DIMS CONST TYPE, 3 = "", "�͂�����", "�͂����s��"
#DIMS PARTS
IF ARG:1
	LOCAL = ARG:1
ELSEIF TEQUIP:ARG:1 & 2
	LOCAL = 2
ELSEIF TEQUIP:ARG:1 & 1
	LOCAL = 1
ENDIF
PARTS '= COVER_CLOTHES(ARG, @"�㔼�g�����`��_%TYPE:LOCAL%")
SIF STRLENS(PARTS)
	RETURNF GET_STR(ARG, CLOTHES_PARTS_TO_CATEGORY(PARTS), EQUIP:ARG:PARTS, "���O")

;-------------------------------------------------
;�֐���:SHOW_�㔼�g����
;�T�@�v:�㔼�g�������擾�֐�
;�߂�l:�㔼�g������(������)
;����:0 �Q�Ƃ���L�����ԍ�
;����:1�͂����A2�͂����s��(�ȗ������ꍇ�͍ł��I�o��W���Ă������)
;���@�l:�����֐�
;TEQUIP:1�ɑΉ����Ĉ�ԏ�ɒ��Ă���ߑ��̎�ނ�Ԃ�
;-------------------------------------------------
@SHOW_�㔼�g����(ARG, ARG:1)
#FUNCTIONS
#DIMS CONST TYPE, 3 = "", "�͂�����", "�͂����s��"
#DIMS PARTS
LOCAL = 0
IF ARG:1
	LOCAL = ARG:1
ELSEIF TEQUIP:ARG:1 & 2
	LOCAL = 2
ELSEIF TEQUIP:ARG:1 & 1
	LOCAL = 1
ENDIF
PARTS '= COVER_CLOTHES(ARG, @"�㔼�g�����`��_%TYPE:LOCAL%")
SIF STRLENS(PARTS)
	RETURNF GET_STR(ARG, CLOTHES_PARTS_TO_CATEGORY(PARTS), EQUIP:ARG:PARTS, "���O")

;�ł��I�o��W���Ă���ߑ��̑������ʂ�Ԃ�
;@SHOW_�����n�̔��肪�ς킵�������̂Ŋȗ����p��
@COVER_CLOTHES(ARG, TYPE)
#FUNCTIONS
#DIMS TYPE
SELECTCASE TYPE
CASE "�㔼�g�����`��_�͂����s��"
	SIF EQUIP:ARG:�����s�[�X
		RETURNF "�����s�[�X"
	SIF EQUIP:ARG:�㔼�g�㒅�P
		RETURNF "�㔼�g�㒅�P"
	SIF EQUIP:ARG:���I�^�[�h
		RETURNF "���I�^�[�h"
	SIF EQUIP:ARG:�{�f�B�[�X�[�c
		RETURNF "�{�f�B�[�X�[�c"
	SIF EQUIP:ARG:�㔼�g�����P
		RETURNF "�㔼�g�����P"
	RETURNF
CASE "�㔼�g�����`��_�͂�����"
	SIF EQUIP:ARG:����
		RETURNF "����"
	SIF EQUIP:ARG:�㔼�g�㒅�Q
		RETURNF "�㔼�g�㒅�Q"
	SIF EQUIP:ARG:�{�f�B�[�X�[�c
		RETURNF "�{�f�B�[�X�[�c"
	SIF EQUIP:ARG:�㔼�g�����Q
		RETURNF "�㔼�g�����Q"
	RETURNF

CASE "�㔼�g�����`��_�͂����s��"
	SIF EQUIP:ARG:���I�^�[�h
		RETURNF "���I�^�[�h"
	SIF EQUIP:ARG:�{�f�B�[�X�[�c
		RETURNF "�{�f�B�[�X�[�c"
	SIF EQUIP:ARG:�㔼�g�����P
		RETURNF "�㔼�g�����P"
	RETURNF
CASE "�㔼�g�����`��_�͂�����"
	SIF EQUIP:ARG:�㔼�g�����Q
		RETURNF "�㔼�g�����Q"
	RETURNF

CASE "�����g�����`��_�����g�㒅���炵�s��"
	SIF EQUIP:ARG:�{�f�B�[�X�[�c
		RETURNF "�{�f�B�[�X�[�c"
CASE "�����g�����`��_���炵�s��"
	SIF EQUIP:ARG:���I�^�[�h
		RETURNF "���I�^�[�h"
	SIF EQUIP:ARG:�{�f�B�[�X�[�c
		RETURNF "�{�f�B�[�X�[�c"
	SIF EQUIP:ARG:�����g�����P
		RETURNF "�����g�����P"
CASE "�����g�����`��_���炵��"
	SIF EQUIP:ARG:���I�^�[�h
		RETURNF "���I�^�[�h"
	SIF EQUIP:ARG:�����g�����Q
		RETURNF "�����g�����Q"
CASE "�����g�����`��_�X�J�[�g"
	SIF EQUIP:ARG:�X�J�[�g
		RETURNF "�X�J�[�g"
	SIF EQUIP:ARG:����
		RETURNF "����"
	RETURNF

CASE "�����g�����`��_�����g�㒅���炵�s��"
	SIF EQUIP:ARG:�Y�{��
		RETURNF "�Y�{��"
	SIF EQUIP:ARG:�{�f�B�[�X�[�c
		RETURNF "�{�f�B�[�X�[�c"
	RETURNF
CASE "�����g�����`��_���炵�s��"
	SIF EQUIP:ARG:�Y�{��
		RETURNF "�Y�{��"
	SIF EQUIP:ARG:���I�^�[�h
		RETURNF "���I�^�[�h"
	SIF EQUIP:ARG:�{�f�B�[�X�[�c
		RETURNF "�{�f�B�[�X�[�c"
	SIF EQUIP:ARG:�����g�����P
		RETURNF "�����g�����P"
	SIF EQUIP:ARG:�����g�����Q
		RETURNF "�����g�����Q"
	RETURNF
CASE "�����g�����`��_���炵��"
	SIF EQUIP:ARG:���I�^�[�h
		RETURNF "���I�^�[�h"
	SIF EQUIP:ARG:�����g�㒅
		RETURNF "�����g�㒅"
	SIF EQUIP:ARG:�����g�����Q
		RETURNF "�����g�����Q"
	RETURNF
CASE "�����g�����`��_�X�J�[�g"
	SIF EQUIP:ARG:�X�J�[�g
		RETURNF "�X�J�[�g"
	SIF EQUIP:ARG:����
		RETURNF "����"
	SIF EQUIP:ARG:�����s�[�X
		RETURNF "�����s�[�X"
	RETURNF
ENDSELECT

;�S�L�����̈ߑ����f�t�H���g�ɖ߂�
@RESET_ALL_CLOTHES
FOR LOCAL, 0, CHARANUM
	CFLAG:LOCAL:7 = 0
	CALL SELECT_CLOTHES(LOCAL, "�����̈ߑ�")
	CALL CTRL_CLOTHES_SET(LOCAL, "���݈ߑ��̕ύX_���i��")
	CALL CLOTHES_SETTING_TRAIN(LOCAL)
NEXT

;EQUIP����TEQUIP�ɕϊ�
;���̃^�C�~���O�ŌC�E���ƑS���`�F�b�N
@CLOTHES_SETTING_TRAIN(ARG)
TEQUIP:ARG:0 = 0
TEQUIP:ARG:1 = 0

;�Ԃ����Ⴏ�����̏����͓K��
IF INROOM(CFLAG:ARG:���݈ʒu)
	EQUIP:ARG:�C = 0
ELSEIF CFLAG:ARG:203
	EQUIP:ARG:�C = CFLAG:ARG:203
ELSEIF CFLAG:ARG:603
	EQUIP:ARG:�C = CFLAG:ARG:603
ENDIF

IF CHECK_CHARA(ARG, "�S��")
	EQUIP:ARG:0 = 0
ELSE
	EQUIP:ARG:0 = 1
ENDIF

;�����ւ����L���łȂ�
SIF !EQUIP:ARG:0
	RETURN 0
;�����g
;TEQUIP:0 �����g���ߏ�(�r�b�g0=�X�J�[�g 1=���炵�� 2=���炵�s�� 3=���点�Ȃ������g�㒅)
;	(�r�b�g���g�������Ȃ��l�p 0=�Ȃ� 1=�m�[�p���X�J�[�g 2=�p���e�B�̂� 3=�X�J�[�g+�p���e�B
;	4=�X�p�b�c(����)�������̓m�[�p���Y�{�� 5=�X�J�[�g+�X�p�b�c 6=�Y�{��+�p���e�B 7=�t������(���̃o���A���g�ł͖���)�j
;EQUIP:5,6 �����g����
SIF EQUIP:ARG:�����g�����P
	TEQUIP:ARG:0 |= 4
SIF EQUIP:ARG:�����g�����Q
	TEQUIP:ARG:0 |= 2
;EQUIP:7�`9 �����g�㒅
IF EQUIP:ARG:�Y�{��
	TEQUIP:ARG:0 |= 4
	TEQUIP:ARG:0 |= 8
ENDIF
SIF EQUIP:ARG:�����g�㒅
	TEQUIP:ARG:0 |= 2
SIF EQUIP:ARG:�X�J�[�g
	TEQUIP:ARG:0 |= 1
;EQUIP:14�`16 �S�g�㒅
IF EQUIP:ARG:�{�f�B�[�X�[�c
	TEQUIP:ARG:0 |= 4
	TEQUIP:ARG:0 |= 8
	TEQUIP:ARG:0 |= 16
ENDIF
SIF EQUIP:ARG:�����s�[�X
	TEQUIP:ARG:0 |= 1
SIF EQUIP:ARG:����
	TEQUIP:ARG:0 |= 1
IF EQUIP:ARG:���I�^�[�h
	TEQUIP:ARG:0 |= 2
	TEQUIP:ARG:0 |= 16
ENDIF
;�㔼�g
;TEQUIP:1 �㔼�g���ߏ�(0=�Ȃ� 1=�͂����� 2=�͂����s�� 3=�˂����ݕs��)
;	(�r�b�g���g�������Ȃ��l�p 0=�Ȃ� 1=�m�[�u���a�� 2=�u���̂� 3=�a��+�u���j
;EQUIP:10,11 �㔼�g����
IF EQUIP:ARG:�㔼�g�����P
	TEQUIP:ARG:1 |= 2
	TEQUIP:ARG:1 |= 4
ENDIF
SIF EQUIP:ARG:�㔼�g�����Q
	TEQUIP:ARG:1 |= 1
;EQUIP:12,13 �㔼�g�㒅
IF EQUIP:ARG:�㔼�g�㒅�P
	TEQUIP:ARG:1 |= 2
	TEQUIP:ARG:1 |= 4
ENDIF
SIF EQUIP:ARG:�㔼�g�㒅�Q
	TEQUIP:ARG:1 |= 1
;EQUIP:14�`16 �S�g�㒅
IF EQUIP:ARG:�{�f�B�[�X�[�c
	TEQUIP:ARG:1 |= 2
	TEQUIP:ARG:1 |= 4
ENDIF
SIF EQUIP:ARG:�����s�[�X
	TEQUIP:ARG:1 |= 2
SIF EQUIP:ARG:����
	TEQUIP:ARG:1 |= 1
IF EQUIP:ARG:���I�^�[�h
	TEQUIP:ARG:1 |= 2
	TEQUIP:ARG:1 |= 4
ENDIF

;���炵����
SIF TEQUIP:ARG:�㔼�g�͂������
	CLEARBIT TEQUIP:ARG:1, 2
SIF TEQUIP:ARG:4
	CLEARBIT TEQUIP:ARG:1, 1

;����ߑ��ւ̈ꎞ��������
;�Ƃ肠�����ߑ��Z�b�g�ɂ����E�������͑��L�����̕��i������
;���ւ�����RESULT==1
@EX_COSTUME(C_ID, TYPE)
#DIM  C_ID
#DIM  EX_COS
#DIMS TYPE
EX_COS = GET_INT(C_ID, "�L�����f�[�^", NO:C_ID, @"%TYPE%�ߑ�")
;#; PRINTFORML {C_ID}����ߑ��ύX%TYPE% {EX_COS}
SIF !EX_COS
	RETURN
CALL OKIGAE(C_ID, EX_COS)
;#; CALL SHOW_CLOTHES(C_ID, "���݂̈ߑ�")
RETURN 1

;�ꎞ�����ւ��֐�
@OKIGAE(C_ID, COS_ID, COS_TYPE)
#DIM C_ID      ;�����ւ����s���L�����N�^�[
#DIM COS_ID    ;�ߑ��Z�b�g��ID�A101�ȏゾ�ƃL�����ߑ����Ƃ݂Ȃ����i�L�����ߑ����w�肵��������NO + 100�ɂ��邱�Ɓj
#DIMS COS_TYPE ;�Q�ƈߑ�������A�L�����f�[�^�ɋL�ڂ�����̂��O��Ȃ̂ŁA���������Ɛ^�����ɂȂ�
TCVAR:C_ID:�{���̕��� = CFLAG:C_ID:��{�����Z�b�g
CFLAG:C_ID:��{�����Z�b�g = COS_ID

IF STRLENS(COS_TYPE)
;������w��ŕ��i���ȊO���w��ł���悤��
	;#; PRINTFORML {COS_ID}����ߑ��ύX%COS_TYPE%
	CALL CTRL_CLOTHES_SET(C_ID, "���i���̕ύX_�L�����ߑ�", COS_ID, COS_TYPE)
	CALL CLOTHES_SETTING_TRAIN(C_ID)
	RETURN
ENDIF

SELECTCASE COS_ID
CASE 100
	CALL CTRL_CLOTHES_SET(C_ID, "���i���̕ύX_�����ɂ���")
CASE 1 TO 99
	CALL CTRL_CLOTHES_SET(C_ID, "���i���̕ύX_�ߑ��Z�b�g", COS_ID)
CASE 101 TO 100 + �L�����N�^�����
	CALL CTRL_CLOTHES_SET(C_ID, "���i���̕ύX_�L�����ߑ�", COS_ID - 100, "���i��")
CASEELSE
	THROW �s���Ȉߑ�ID {COS_ID}
ENDSELECT
CALL CHANGE_CLOTHES(C_ID, "�ߑ����Z�b�g")
CALL CLOTHES_SETTING_TRAIN(C_ID)

;�p���c�Z�b�e�B���O�֐�
;CFLAG�ɐݒ肳�ꂽ�ߑ����㏑������
;�p���c�w�肪����ꍇ�ɂ͉����g�����P��������
;�����g�����P���w�肳��Ă���ꍇ�ɂ̓p���c���������D�悷��
@SET_PANTS(C_ID, TIME_TYPE)
#DIM  C_ID
#DIMS TIME_TYPE
#DIM  P_ID
IF TIME_TYPE == "�����̃p�W���}"
	IF CFLAG:C_ID:�w��p���c == 100
		P_ID =  0
		CFLAG:C_ID:245 = 0
	ELSEIF CFLAG:C_ID:�w��p���c
		P_ID = CFLAG:C_ID:�w��p���c
		CFLAG:C_ID:245 = 0
	ELSEIF CFLAG:C_ID:245
		CFLAG:C_ID:246 = 0
		RETURN
	ELSEIF CFLAG:C_ID:246
		CFLAG:C_ID:245 = 0
		CFLAG:C_ID:�p�W���}�p���c = CFLAG:C_ID:246
		RETURN
	ELSEIF !GETBIT(TALENT:C_ID:2, 0)
		P_ID = CLOTHES_ID("�����g�����Q", "�g�����N�X")
	ELSEIF !CFLAG:C_ID:245
		P_ID = �����̂ς��(C_ID)
	ENDIF
	;PRINTFORMW %CALLNAME:C_ID%�̂ς���܂ς�F%GET_STR(C_ID, "�����g����_���炵�\", P_ID, "���O")%
	CFLAG:C_ID:�p�W���}�p���c = P_ID
	CFLAG:C_ID:246 = P_ID
	RETURN
ENDIF

IF CFLAG:C_ID:�w��p���c == 100
;�m�[�p���w��
	P_ID =  0
	CFLAG:C_ID:205 = 0
ELSEIF CFLAG:C_ID:�w��p���c
;�w��p���c������Ȃ牺���g�����P�𔍂�
	CFLAG:C_ID:205 = 0
	P_ID = CFLAG:C_ID:�w��p���c
ELSEIF CFLAG:C_ID:205
;�����g�����P���w��Ȃ�p���c�͖���
	CFLAG:C_ID:206 = 0
	RETURN
ELSEIF CFLAG:C_ID:206
;�����g�����Q���w��Ȃ�p���c���I�͖���
	CFLAG:C_ID:205 = 0
	CFLAG:C_ID:���傤�̂ς�� = CFLAG:C_ID:206
	RETURN
ELSEIF !GETBIT(TALENT:C_ID:2, 0)
;�I�g�R�Ȃ�Ƃ肠�����g�����N�X��
	P_ID = CLOTHES_ID("�����g�����Q", "�g�����N�X")
ELSEIF !CFLAG:C_ID:205
;��L�ȊO�Ńp���c���I
	P_ID = �����̂ς��(C_ID)
ENDIF
CFLAG:C_ID:���傤�̂ς�� = P_ID
CFLAG:C_ID:206 = P_ID

;�����̈ߑ�����֐�
;�K���ߑ����p�W���}�ŃZ�b�g�Ŏg������
@SELECT_CLOTHES(C_ID, TIME_TYPE)
#DIM  C_ID
#DIMS TIME_TYPE
#DIM  �ߑ�C_ID
#DIMS �ߑ�TYPE

VARSET �ߑ�C_ID
VARSET �ߑ�TYPE
;��Ƀp�W���}�̐ݒ�
IF TIME_TYPE == "�����̃p�W���}"
	SELECTCASE CFLAG:C_ID:�p�W���}�w��
	CASE 300
	;�ʐݒ�
		CALL CTRL_CLOTHES_SET(C_ID, "�p�W���}�̕ύX_�����ɂ���ߑ�")
		CALL SET_PANTS(C_ID, TIME_TYPE)
		RETURN
	CASE 301
	;�p���C�`
		�ߑ�TYPE '= "�p���C�`"
	CASE 302
	;�S��
		�ߑ�TYPE '= "�S��"
	CASE 1 TO 99
	;�ߑ��Z�b�g�̎w��
		�ߑ�TYPE '= GET_STR(C_ID, "�ߑ��Z�b�g", CFLAG:C_ID:�p�W���}�w��, "���O")
	CASE 0
	;�f�t�H���g�ߑ��ɂ��ݒ�
		IF !(C_ID == MASTER)
			�ߑ�C_ID = NO:C_ID
			�ߑ�TYPE '= GET_STR(C_ID, "�L�����f�[�^", �ߑ�C_ID, TIME_TYPE)
		ELSEIF FLAG:�Ȃ肫��
			�ߑ�C_ID = FLAG:�Ȃ肫��
			�ߑ�TYPE '= GET_STR(C_ID, "�L�����f�[�^", �ߑ�C_ID, TIME_TYPE)
		ENDIF
	ENDSELECT
	;���ݒ�Ȃ�p�W���}�Y�{��
	SIF !STRLENS(�ߑ�TYPE)
		�ߑ�TYPE '= "�p�W���}�i�Y�{���j�Z�b�g"
	CALL CHANGE_CLOTHES(C_ID, TIME_TYPE, �ߑ�C_ID, �ߑ�TYPE)
	SIF !(�ߑ�TYPE == "�S��")
		CALL SET_PANTS(C_ID, TIME_TYPE)
	RETURN
ENDIF

;�����̈ߑ��A�����̈ߑ�
SELECTCASE CFLAG:C_ID:��{�����Z�b�g
CASE 100
;�ʐݒ�
	CALL CTRL_CLOTHES_SET(C_ID, "���i���̕ύX_�����ɂ���ߑ�")
	CALL SET_PANTS(C_ID, TIME_TYPE)
CASE 1 TO 99
;�ߑ��Z�b�g�̎w��
	�ߑ�TYPE '= GET_STR(C_ID, "�ߑ��Z�b�g", CFLAG:C_ID:��{�����Z�b�g, "���O")
	;�O�̂���
	SIF !STRLENS(�ߑ�TYPE)
		GOTO DEFAULT
CASE 101 TO 100 + �L�����N�^�����
;����L�����̈ߑ����Q�Ƃ���Ƃ�
	�ߑ�C_ID = CFLAG:C_ID:��{�����Z�b�g - 100
	�ߑ�TYPE '= "���i��"
	;�O�̂���
	SIF !EXISTCSV(�ߑ�C_ID)
		GOTO DEFAULT
CASE 0
;�f�t�H���g�ߑ��ɂ��ݒ�
	$DEFAULT
	IF !(C_ID == MASTER)
		�ߑ�C_ID = NO:C_ID
		�ߑ�TYPE '= GET_STR(C_ID, "�L�����f�[�^", �ߑ�C_ID, TIME_TYPE)
	ELSEIF FLAG:�Ȃ肫��
		�ߑ�C_ID = FLAG:�Ȃ肫��
		�ߑ�TYPE '= GET_STR(C_ID, "�L�����f�[�^", �ߑ�C_ID, TIME_TYPE)
	ELSEIF GETBIT(TALENT:C_ID:2, 0)
	;�܂�܂񂪂���Ƃ���������{�Ƃ���
		�ߑ�TYPE '= "�����Z�b�g"
	ELSE
	;���͒j������{�Ƃ���
		�ߑ�TYPE '= "�j���Z�b�g"
	ENDIF
	;���ݒ�Ȃ畁�i��
	SIF !STRLENS(�ߑ�TYPE)
		�ߑ�TYPE '= "���i��"
ENDSELECT
CALL CHANGE_CLOTHES(C_ID, TIME_TYPE, �ߑ�C_ID, �ߑ�TYPE)
CALL SET_PANTS(C_ID, TIME_TYPE)

;�ߑ��X�V�֐�
@CHANGE_CLOTHES(C_ID, TYPE, �ߑ�C_ID, �ߑ�TYPE)
#DIM  C_ID
#DIMS TYPE
#DIM  �ߑ�C_ID
#DIMS �ߑ�TYPE
#DIM  �ߑ�SET_ID
�ߑ�SET_ID = 0
SIF STRLENS(�ߑ�TYPE)
	�ߑ�SET_ID = OBJNAME_TO_ID(C_ID, "GET", "�ߑ��Z�b�g", �ߑ�TYPE)
SELECTCASE TYPE
CASE "�����̃p�W���}"
	SIF �ߑ�TYPE == "�p���C�`"
		JUMP CTRL_CLOTHES_SET(C_ID, "�p�W���}�̕ύX_�p���C�`", �ߑ�SET_ID)
	SIF �ߑ�TYPE == "�S��"
		JUMP CTRL_CLOTHES_SET(C_ID, "�p�W���}�̕ύX_�S��", �ߑ�SET_ID)

	IF �ߑ�SET_ID > 0
		CALL CTRL_CLOTHES_SET(C_ID, "�p�W���}�̕ύX_�ߑ��Z�b�g", �ߑ�SET_ID)
	ELSE
		CALL CTRL_CLOTHES_SET(C_ID, "�p�W���}�̕ύX_�L�����ߑ�", �ߑ�C_ID, �ߑ�TYPE)
	ENDIF

CASE "�����̈ߑ�", "�����̈ߑ�"
	IF �ߑ�SET_ID > 0
		CALL CTRL_CLOTHES_SET(C_ID, "���i���̕ύX_�ߑ��Z�b�g", �ߑ�SET_ID)
	ELSE
		CALL CTRL_CLOTHES_SET(C_ID, "���i���̕ύX_�L�����ߑ�", �ߑ�C_ID, �ߑ�TYPE)
	ENDIF
CASE "�ߑ����Z�b�g"
	;#;SIF C_ID == TARGET
	;#;	PRINTFORML TARGET�ߑ����Z�b�g
	IF ��������(C_ID)
		CALL CTRL_CLOTHES_SET(C_ID, "���݈ߑ��̕ύX_�p�W���}")
		CFLAG:C_ID:�p�W���} = 1
	ELSE
		SELECTCASE CFLAG:C_ID:�ߑ��ꎞ�ύX
		CASE 0
			CALL CTRL_CLOTHES_SET(C_ID, "���݈ߑ��̕ύX_���i��")
		CASE 100
			CALL CTRL_CLOTHES_SET(C_ID, "���݈ߑ��̕ύX_�����ɂ���")
		CASE 1 TO 99
			CALL CTRL_CLOTHES_SET(C_ID, "���݈ߑ��̕ύX_�ߑ��Z�b�g", CFLAG:C_ID:�ߑ��ꎞ�ύX)
		CASE 101 TO 100 + �L�����N�^�����
			CALL CTRL_CLOTHES_SET(C_ID, "���݈ߑ��̕ύX_�L�����ߑ�", CFLAG:C_ID:�ߑ��ꎞ�ύX - 100, "���i��")
		ENDSELECT
		CFLAG:C_ID:�p�W���} = 0
	ENDIF
ENDSELECT

[SKIPSTART]
�ߑ��Z�b�g�̃R���g���[���֐�
CFLAG��EQUIP�̂��Ƃ���s��
EQUIP:0�̈����Ƃ��Ă�
�E@CLOTHES_SETTING_TRAIN�̖`���ɍX�V�������d����
�ESAVE/LOAD�͈̔͂�1�`22�܂łɂ���iEQUIP:0�͕ۑ�����Ȃ��j
����ł������������Ǝv��
[SKIPEND]
@CTRL_CLOTHES_SET(C_ID, TYPE, ARG, ARGS)
#DIM  C_ID
#DIMS TYPE
SELECTCASE TYPE
;���Z�b�g�p�ɋL�^����
CASE "���݈ߑ��̕ۑ�_���i��"
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(200 + LOCAL) = EQUIP:C_ID:LOCAL
	NEXT
CASE "���݈ߑ��̕ۑ�_�p�W���}"
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(240 + LOCAL) = EQUIP:C_ID:LOCAL
	NEXT
CASE "���݈ߑ��̕ۑ�_�����ɂ���"
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(600 + LOCAL) = EQUIP:C_ID:LOCAL
	NEXT
	CFLAG:ARG:�����ɂ���ߑ� = 1

;���Z�b�g
CASE "�����ɂ���ߑ��̃��Z�b�g"
	FOR LOCAL, 0, 23
		CFLAG:C_ID:(600 + LOCAL) = 0
	NEXT
	SIF CFLAG:C_ID:��{�����Z�b�g == 100
		CFLAG:C_ID:��{�����Z�b�g = 0
	SIF CFLAG:C_ID:�p�W���}�w�� == 300
		CFLAG:C_ID:�p�W���}�w�� = 0
	CFLAG:C_ID:�����ɂ���ߑ� = 0

;�Z�b�g�����ߑ������[�h
;������ւ񂠂��܂Ń��[�h�����ł����ăp�W���}�t���O�͂�����Ȃ��̂Œ��ӂ�
CASE "���݈ߑ��̕ύX_���i��"
	FOR LOCAL, 1, 23
		EQUIP:C_ID:LOCAL = CFLAG:C_ID:(200 + LOCAL)
	NEXT
	CFLAG:C_ID:�ߑ��ꎞ�ύX = 0
	CALL CTRL_CLOTHES_SET(C_ID, "�p���c�ꊇ�ݒ�")
	CALL �����̃u���W���[(C_ID)

CASE "���݈ߑ��̕ύX_�p�W���}"
	FOR LOCAL, 1, 23
		EQUIP:C_ID:LOCAL = CFLAG:C_ID:(240 + LOCAL)
	NEXT
	IF CFLAG:C_ID:�p�W���}�p���c == 100
		EQUIP:C_ID:�����g�����P = 0
		EQUIP:C_ID:�����g�����Q = 0
		CFLAG:C_ID:245 = 0
		CFLAG:C_ID:246 = 0
		CFLAG:C_ID:�p�W���}�p���c = 0
		CFLAG:C_ID:�m�[�p�� = 1
	ELSEIF CFLAG:C_ID:�m�[�p�� && CFLAG:C_ID:�p�W���}�p���c
		EQUIP:C_ID:�����g�����P = 0
		EQUIP:C_ID:�����g�����Q = CFLAG:C_ID:�p�W���}�p���c
		SIF !CFLAG:C_ID:245
			CFLAG:C_ID:246 = CFLAG:C_ID:�p�W���}�p���c
		CFLAG:C_ID:�p�W���}�p���c = 0
		CFLAG:C_ID:�m�[�p�� = 0
	ELSEIF CFLAG:C_ID:�m�[�p�� && (EQUIP:C_ID:�����g�����P || EQUIP:C_ID:�����g�����Q)
		EQUIP:C_ID:�����g�����P = 0
		EQUIP:C_ID:�����g�����Q = 0
		CFLAG:C_ID:245 = 0
		CFLAG:C_ID:246 = 0
	ENDIF
	CFLAG:C_ID:�ߑ��ꎞ�ύX = 0

CASE "���݈ߑ��̕ύX_�����ɂ���"
	FOR LOCAL, 1, 23
		EQUIP:C_ID:LOCAL = CFLAG:C_ID:(600 + LOCAL)
	NEXT
	IF CFLAG:C_ID:�m�[�p��
		EQUIP:C_ID:�����g�����P = 0
		EQUIP:C_ID:�����g�����Q = 0
	ELSEIF EQUIP:C_ID:�����g�����P
		EQUIP:C_ID:�����g�����Q = 0
	ELSEIF EQUIP:C_ID:�����g�����Q
		EQUIP:C_ID:�����g�����P = 0
	ELSEIF CFLAG:C_ID:�p�W���}
		EQUIP:C_ID:�����g�����Q = CFLAG:C_ID:246
	ELSE
		EQUIP:C_ID:�����g�����Q = CFLAG:C_ID:206
	ENDIF
	CFLAG:C_ID:�ߑ��ꎞ�ύX = 100

CASE "���݈ߑ��̕ύX_�L�����ߑ�"
;ARG�Ŏw�肳�ꂽ�L�����̈ߑ����Q�Ƃ���
	CFLAG:C_ID:�ߑ��ꎞ�ύX = 100 + ARG
	FOR LOCAL, 1, 23
		EQUIP:C_ID:LOCAL = GET_INT(C_ID, "�L�����f�[�^", ARG, @"%ARGS%�F%EQUIPNAME:LOCAL%")
	NEXT
	CALL CTRL_CLOTHES_SET(C_ID, "�p���c�ꊇ�ݒ�")

CASE "���݈ߑ��̕ύX_�ߑ��Z�b�g"
;ARG�Ŏw�肳�ꂽID�̈ߑ��Z�b�g���Q�Ƃ���
	CFLAG:C_ID:�ߑ��ꎞ�ύX = ARG
	FOR LOCAL, 1, 23
		EQUIP:C_ID:LOCAL = GET_INT(C_ID, "�ߑ��Z�b�g", ARG, EQUIPNAME:LOCAL)
	NEXT
	CALL CTRL_CLOTHES_SET(C_ID, "�p���c�ꊇ�ݒ�")
CASE "�p���c�ꊇ�ݒ�"
	IF !CFLAG:C_ID:�p�W���}
		IF CFLAG:C_ID:�m�[�p��
			EQUIP:C_ID:�����g�����P = 0
			EQUIP:C_ID:�����g�����Q = 0
		ELSEIF EQUIP:C_ID:�����g�����P
			EQUIP:C_ID:�����g�����Q = 0
		ELSE
			EQUIP:C_ID:�����g�����Q = CFLAG:C_ID:���傤�̂ς��
		ENDIF
	ELSE
		IF CFLAG:C_ID:�m�[�p��
			EQUIP:C_ID:�����g�����P = 0
			EQUIP:C_ID:�����g�����Q = 0
		ELSEIF EQUIP:C_ID:�����g�����P
			EQUIP:C_ID:�����g�����Q = 0
		ELSE
			EQUIP:C_ID:�����g�����Q = CFLAG:C_ID:246
		ENDIF
	ENDIF

;�E�ߏ���
CASE "���݈ߑ��̕ύX_�S��"
	FOR LOCAL, 1, 23
		EQUIP:C_ID:LOCAL = 0
	NEXT

CASE "���݈ߑ��̕ύX_�����p"
;���̃R�[�h�Ȃ񂩋C���������񂾂��ǂƂ肠�������̂܂܂�
	EQUIP:C_ID:�㔼�g�㒅�P = 0
	EQUIP:C_ID:�㔼�g�㒅�Q = 0
	EQUIP:C_ID:�����s�[�X = 0
	EQUIP:C_ID:���� = 0
	EQUIP:C_ID:�Y�{�� = 0
	EQUIP:C_ID:�����g�㒅 = 0
	EQUIP:C_ID:�X�J�[�g = 0
	EQUIP:C_ID:�O�� = 0
	EQUIP:C_ID:�X�q = 0
	TEQUIP:C_ID:�㔼�g���ߏ� = 2
	TEQUIP:C_ID:�㒅�E�ߍς� = 1

CASE "���݈ߑ��̕ύX_���E��"
	EQUIP:C_ID:�㔼�g�����P = 0
	TEQUIP:C_ID:�㔼�g�͂������ = 1
	SIF EQUIP:C_ID:�Y�{��
		EQUIP:C_ID:�Y�{�� = 0

CASE "���i���̕ύX_�L�����ߑ�"
;ARG�Ŏw�肳�ꂽ�L������ARGS�Ŏw�肳�ꂽ�ߑ����Q�Ƃ���
	CFLAG:C_ID:��{�����Z�b�g = 100 + ARG
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(200 + LOCAL) = GET_INT(C_ID, "�L�����f�[�^", ARG, @"%ARGS%�F%EQUIPNAME:LOCAL%")
	NEXT

CASE "���i���̕ύX_�ߑ��Z�b�g"
;ARG�Ŏw�肳�ꂽID�̈ߑ��Z�b�g���Q�Ƃ���
	CFLAG:C_ID:��{�����Z�b�g = ARG
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(200 + LOCAL) = GET_INT(C_ID, "�ߑ��Z�b�g", ARG, EQUIPNAME:LOCAL)
	NEXT
CASE "���i���̕ύX_�����ɂ���ߑ�"
	CFLAG:C_ID:��{�����Z�b�g = 100
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(200 + LOCAL) = CFLAG:C_ID:(600 + LOCAL)
	NEXT

CASE "�p�W���}�̕ύX_�L�����ߑ�"
;ARG�Ŏw�肳�ꂽ�L������ARGS�Ŏw�肳�ꂽ�ߑ����Q�Ƃ���
	CFLAG:C_ID:�p�W���}�w�� = 100 + ARG
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(240 + LOCAL) = GET_INT(C_ID, "�L�����f�[�^", ARG, @"%ARGS%�F%EQUIPNAME:LOCAL%")
	NEXT
CASE "�p�W���}�̕ύX_�ߑ��Z�b�g"
	CFLAG:C_ID:�p�W���}�w�� = ARG
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(240 + LOCAL) = GET_INT(C_ID, "�ߑ��Z�b�g", ARG, EQUIPNAME:LOCAL)
	NEXT
CASE "�p�W���}�̕ύX_�����ɂ���ߑ�"
	CFLAG:C_ID:�p�W���}�w�� = 300
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(240 + LOCAL) = CFLAG:C_ID:(600 + LOCAL)
	NEXT
CASE "�p�W���}�̕ύX_�p���C�`"
	CFLAG:C_ID:�p�W���}�w�� = 301
	FOR LOCAL, 0, 23
		CFLAG:C_ID:(240 + LOCAL) = 0
	NEXT
	CFLAG:C_ID:246 = CFLAG:C_ID:�p�W���}�p���c
	SIF CFLAG:C_ID:246 == 100
		CFLAG:C_ID:246 = 0

CASE "�p�W���}�̕ύX_�S��"
	CFLAG:C_ID:�p�W���}�w�� = 302
	FOR LOCAL, 0, 23
		CFLAG:C_ID:(240 + LOCAL) = 0
	NEXT
	CFLAG:C_ID:�p�W���}�p���c = 100

CASE "�����ɂ���ߑ��̕ύX_�L�����ߑ�"
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(600 + LOCAL) = GET_INT(C_ID, "�L�����f�[�^", ARG, @"%ARGS%�F%EQUIPNAME:LOCAL%")
	NEXT
	CFLAG:C_ID:�����ɂ���ߑ� = 1

CASE "�����ɂ���ߑ��̕ύX_�ߑ��Z�b�g"
	FOR LOCAL, 1, 23
		CFLAG:C_ID:(600 + LOCAL) = GET_INT(C_ID, "�ߑ��Z�b�g", ARG, EQUIPNAME:LOCAL)
	NEXT
	CFLAG:C_ID:�����ɂ���ߑ� = 1
ENDSELECT

;����L�����̈ߑ��ݒ�̓��e��\������
@SHOW_CHARA_CLOTHES(C_ID, PAGE = 0)
#DIM  C_ID
#DIMS CONST �\���ߑ�, 4 = "���݂̈ߑ�", "�����̈ߑ�", "�����̃p�W���}", "�����ɂ���ߑ�"
#DIM  PAGE
PRINTFORML %CALLNAME:C_ID%��%�\���ߑ�:PAGE%
SELECTCASE CFLAG:C_ID:�w��p���c
CASE 0
	PRINTFORML �@���݂̂��ς�ݒ�F�w��Ȃ�
CASE 100
	PRINTFORML �@���݂̂��ς�ݒ�F�m�[�p���w��
CASEELSE
	PRINTFORML �@���݂̂��ς�ݒ�F%GET_STR(C_ID, "�����g����_���炵�\", CFLAG:C_ID:�w��p���c, "���O")%
ENDSELECT
PRINTFORML
CALL SHOW_CLOTHES(C_ID, �\���ߑ�:PAGE)
PRINTFORML
PRINTBUTTON @"[1] - %�\���ߑ�:((PAGE + 4 - 1) % 4), 14%", 1
PRINTFORM �@�@�@�@�@�@�@�@�@�@
PRINTBUTTON @"[3] - %�\���ߑ�:((PAGE + 4 + 1) % 4), 14%", 3
PRINTFORML
PRINTBUTTON "[0] - ���ǂ�", 0
DO
	INPUT
	SELECTCASE RESULT
	CASE 0
		RETURN
	CASE 1
		PAGE = (PAGE + 4 - 1) % 4
	CASE 3
		PAGE = (PAGE + 4 + 1) % 4
	CASEELSE
		REUSELASTLINE �����ȓ��͂ł�
		CONTINUE
	ENDSELECT
	RESTART
LOOP 1

;�ߑ��n�̕\���֐�
@SHOW_CLOTHES(C_ID, TYPE, ID)
#DIM  C_ID
#DIMS TYPE
#DIM  ID
#DIM  ��������
#DIM  CLOTHES
#DIMS �\�����e
{
#DIMS CONST �\������, 23 = "",
	"�X�q", "�A�N�Z�T��", "�r������",
	"�O��", "�����s�[�X", "����",
	"���I�^�[�h", "�{�f�B�[�X�[�c",
	"�㔼�g�㒅�P", "�㔼�g�㒅�Q",
	"�㔼�g�����P", "�㔼�g�����Q",
	"�Y�{��", "�����g�㒅", "�X�J�[�g",
	"�����g�����P", "�����g�����Q",
	"�C��", "�C",
	"���̑��P", "���̑��Q", "���̑��R"
}
{
#DIMS CONST �\�����x��, 23 = "",
	"�@����:���@�@�@", "�@����:�����@�@", "�@����:�r�@�@�@",
	"�@����:�O�߁@�@", "�@����:�S�g���@", "�@����:�����@�@",
	"�@����:�S�g����", "�@����:�S�g����",
	"�@����:��߁@�@", "�@����:��߁@�@",
	"�@����:����(��)", "�@����:����(��)",
	"�@����:���߁@�@", "�@����:���߁@�@", "�@����:���߁@�@",
	"�@����:����(��)", "�@����:����(��)",
	"�@����:�C���@�@", "�@����:�C�@�@�@",
	"�@����:�t���@�@", "�@����:�t���@�@", "�@����:�t���@�@"
}

SELECTCASE TYPE
CASE "���݂̈ߑ�"
	FOR LOCAL, 1, 23
		;�������ʂ�ID�擾
		�������� = FINDELEMENT(EQUIPNAME, �\������:LOCAL)
		SIF �������� < 0
			THROW ���݂��Ȃ���������%�\������:LOCAL%

		;�m�[�u���A�m�[�p���p�̗�O����
		;��������
		{
		SIF �\������:LOCAL == "�㔼�g�����P" &&
			TALENT:C_ID:���� != 2 &&
			EQUIP:C_ID:�㔼�g�����Q == 0 &&
			EQUIP:C_ID:�㔼�g�����P == 0 &&
			EQUIP:C_ID:�{�f�B�[�X�[�c == 0 &&
			EQUIP:C_ID:���I�^�[�h == 0
		}
			PRINTFORML �@����:����(��)[���Ă��Ȃ�]
		{
		SIF �\������:LOCAL == "�����g�����P" &&
			EQUIP:C_ID:�����g�����Q == 0 &&
			EQUIP:C_ID:�����g�����P == 0 &&
			EQUIP:C_ID:�{�f�B�[�X�[�c == 0 &&
			EQUIP:C_ID:���I�^�[�h == 0
		}
			PRINTFORML �@����:����(��)[�͂��Ă��Ȃ�]
		;�����܂�

		SIF !EQUIP:C_ID:��������
			CONTINUE
		IF STRLENS(CSTR:C_ID:(50 + ��������)) && !CFLAG:C_ID:�p�W���}
			�\�����e '= CSTR:C_ID:(50 + ��������)
		;�p���c�͐�p�������K�v
		ELSEIF �\������:LOCAL == "�����g�����Q" && !(C_ID == MASTER)
			�\�����e '= "�p���e�B"
		ELSEIF �\������:LOCAL == "�㔼�g�����P" && !(C_ID == MASTER)
			�\�����e '= "�C���i�["
		ELSE
			�\�����e '= CLOTHNAME(��������, EQUIP:C_ID:��������)
		ENDIF
		PRINTFORML %�\�����x��:LOCAL%[%�\�����e%]
	NEXT

CASE "�����̈ߑ�", "���i��"
	FOR LOCAL, 1, 23
		;�������ʂ�ID�擾
		�������� = FINDELEMENT(EQUIPNAME, �\������:LOCAL)
		SIF �������� < 0
			THROW ���݂��Ȃ���������%�\������:LOCAL%
		CLOTHES = CFLAG:C_ID:(200 + ��������)
		IF !CLOTHES
			CONTINUE
		ELSE
			�\�����e '= GET_STR(C_ID, CLOTHES_PARTS_TO_CATEGORY(�\������:LOCAL), CLOTHES, "���O")
		ENDIF
		PRINTFORML %�\�����x��:LOCAL%�F%�\�����e%
	NEXT

CASE "�����̃p�W���}"
	FOR LOCAL, 1, 23
		;�������ʂ�ID�擾
		�������� = FINDELEMENT(EQUIPNAME, �\������:LOCAL)
		SIF �������� < 0
			THROW ���݂��Ȃ���������%�\������:LOCAL%
		CLOTHES = CFLAG:C_ID:(240 + ��������)
		SIF �\������:LOCAL == "�����g�����Q" && !(C_ID == MASTER)
			CONTINUE
		IF !CLOTHES
			CONTINUE
		ELSE
			�\�����e '= GET_STR(C_ID, CLOTHES_PARTS_TO_CATEGORY(�\������:LOCAL), CLOTHES, "���O")
		ENDIF
		PRINTFORML %�\�����x��:LOCAL%�F%�\�����e%
	NEXT

CASE "�����ɂ���ߑ�"
	FOR LOCAL, 1, 23
		;�������ʂ�ID�擾
		�������� = FINDELEMENT(EQUIPNAME, �\������:LOCAL)
		SIF �������� < 0
			THROW ���݂��Ȃ���������%�\������:LOCAL%
		CLOTHES = CFLAG:C_ID:(600 + ��������)
		SIF �\������:LOCAL == "�����g�����Q" && !(C_ID == MASTER)
			CONTINUE
		IF !CLOTHES
			CONTINUE
		ELSE
			�\�����e '= GET_STR(C_ID, CLOTHES_PARTS_TO_CATEGORY(�\������:LOCAL), CLOTHES, "���O")
		ENDIF
		PRINTFORML %�\�����x��:LOCAL%�F%�\�����e%
	NEXT

CASE "�L�������i��"
;�L�����ԍ�ID�̕��i���̓��e��\������
	IF !EXISTCSV(ID)
		PRINTFORML ���݂��Ȃ��L�������Q�Ƃ��Ă��܂�
		RETURN
	ENDIF
	PRINTFORML %CALLNAME:ID%�̕��i��
	FOR LOCAL, 1, 23
		;�������ʂ�ID�擾
		�������� = FINDELEMENT(EQUIPNAME, �\������:LOCAL)
		SIF �������� < 0
			THROW ���݂��Ȃ���������%�\������:LOCAL%
		CLOTHES = GET_INT(C_ID, "�L�����f�[�^", ID, @"���i���F%�\������:(LOCAL)%")
		SIF �\������:LOCAL == "�����g�����Q" && !(C_ID == MASTER)
			CONTINUE
		IF !CLOTHES
			CONTINUE
		ELSE
			�\�����e '= GET_STR(C_ID, CLOTHES_PARTS_TO_CATEGORY(�\������:LOCAL), CLOTHES, "���O")
		ENDIF
		PRINTFORML %�\�����x��:LOCAL%�F%�\�����e%
	NEXT

CASE "�ߑ��Z�b�g"
;�ߑ��Z�b�gID�̓��e��\������
	IF GET_STR(C_ID, "�ߑ��Z�b�g" , ID, "���O") == ""
		PRINTFORML ���݂��Ȃ��ߑ����Q�Ƃ��Ă��܂�
		RETURN
	ENDIF
	PRINTFORML %GET_STR(C_ID, "�ߑ��Z�b�g" , ID, "���O")%
	FOR LOCAL, 1, 23
		;�������ʂ�ID�擾
		�������� = FINDELEMENT(EQUIPNAME, �\������:LOCAL)
		SIF �������� < 0
			THROW ���݂��Ȃ���������%�\������:LOCAL%
		CLOTHES = GET_INT(C_ID, "�ߑ��Z�b�g", ID, �\������:LOCAL)
		SIF �\������:LOCAL == "�����g�����Q" && !(C_ID == MASTER)
			CONTINUE
		IF !CLOTHES
			CONTINUE
		ELSE
			�\�����e '= GET_STR(C_ID, CLOTHES_PARTS_TO_CATEGORY(�\������:LOCAL), CLOTHES, "���O")
		ENDIF
		PRINTFORML %�\�����x��:LOCAL%�F%�\�����e%
	NEXT
ENDSELECT

@SPECIAL_OUTFIT(CHARA)
#FUNCTION
#DIM CHARA
RETURNF GET_INT(0, "�L�����f�[�^", CHARA, "����ߑ����p")

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用カウンター脱衣関連勝手に魔改造パッチ修正版/ERB/衣服/CLOTHES.ERB


code:
�J�E���^�[�E�߃��b�Z�[�W��SHOW_BOTTOM�ASHOW_TOP�ӂ肪�g�����������̂ŃJ�E���^�[�E�ߕӂ�������A
SHOW_BOTTOM���v���Ă����悤�ȋ������ᖳ�������̂�SHOW_BOTTOM�ASHOW_�����g�����𖂉���(�Ƃ�����@COVER_CLOTHES@CLOTHES_SETTING_TRAIN�ӂ��킩��˂�����ɘM��Ƃǂ��ɉe�����邩�������)
�J�E���^�[�E�߃��b�Z�[�W��SHOW_TOP���g����悤�ɂȂ����̂ɏ㔼�g�����̎�ނ����Ȃ��đދ��������̂ŏ㔼�g������ǉ�
���łɍ����̃p���c�ɍ��킹���u���W���[�𒅂�悤��
���܂���TARGET�̌��݂̃p���c��"�p���e�B�["�Ƃ����\�������̂Ɠ����悤�ɏ㔼�g������"�C���i�["�ƕ\�������悤�ɂ���

2018/08/18�ǋL
�����̃p���c�ɍ��킹���u���W���[�𒅂镔�����S���@�\���Ă��Ȃ������̂��C��

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用カウンター脱衣関連勝手に魔改造パッチ修正版/readme.txt


code:
�J�E���^�[�E�߃��b�Z�[�W��SHOW_BOTTOM�ASHOW_TOP�ӂ肪�g�����������̂ŃJ�E���^�[�E�ߕӂ�������A
SHOW_BOTTOM���v���Ă����悤�ȋ������ᖳ�������̂�SHOW_BOTTOM�ASHOW_�����g�����𖂉���(�Ƃ�����@COVER_CLOTHES@CLOTHES_SETTING_TRAIN�ӂ��킩��˂�����ɘM��Ƃǂ��ɉe�����邩�������)
�J�E���^�[�E�߃��b�Z�[�W��SHOW_TOP���g����悤�ɂȂ����̂ɏ㔼�g�����̎�ނ����Ȃ��đދ��������̂ŏ㔼�g������ǉ�
���łɍ����̃p���c�ɍ��킹���u���W���[�𒅂�悤��
���܂���TARGET�̌��݂̃p���c��"�p���e�B�["�Ƃ����\�������̂Ɠ����悤�ɏ㔼�g������"�C���i�["�ƕ\�������悤�ɂ���

2018/08/18�ǋL
�����̃p���c�ɍ��킹���u���W���[�𒅂镔�����S���@�\���Ă��Ȃ������̂��C��

2018/08/27�ǋL
@DATUI_LATE��@TURN_RESET������Ăяo���Ă������̂�SOURCE_CHECK������Ăяo���悤�ɕύX
�J�E���^�[�E�߃��b�Z�[�W�̏C��

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用カウンター脱衣関連勝手に魔改造パッチ修正版2/readme.txt


code:
eraTW4.622�p�R�}���h���y�␳�p�b�`

��Ă��󂯂ăR�}���h�S�̂Ɏg����悤�ɂ��܂����B
���̏��␳������̂̓X�p���L���O�ŉ��ɂƉ��`���}�]���C�ɉ����ď㏸����悤�ɂȂ��Ă��܂��B

�X�V�ӏ��͍��܂ł̃p�b�`�Ɣ���ĂȂ��͂��Ȃ̂ő������v�Ȃ͂��ł��B

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用コマンド快楽補正パッチ/readme.txt


code:
https://jbbs.shitaraba.net/bbs/read.cgi/otaku/16783/1534417232/444
https://jbbs.shitaraba.net/bbs/read.cgi/otaku/16783/1534417232/451

SOURCE_�ː��m��㏈��.ERB���A���o���ł͑傫�����h���A�o���������قǊ���ē����Ȃ��Ȃ�̂��{���̈Ӑ}���Ǝv���邽��
�o�������Ȃ��قǑS�Ă̊l���\�[�X�������A�o���������قǊl���\�[�X����������悤�ɏC�����܂����B

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用噴乳時ソース修正/eraTW4.622用噴乳時ソース修正.txt


code:
eraTW4.622�p���g����C��

247�X��>>682�̏C��
�ق�̂�����Ƃ����玙������M

by������


code:
eraTW4.622�p�A�Q���A������j���ۋ��剻�蒅�o�O�C���{��

 ERB��MOVEMENTS��SLEEP.ERB
	��SHOP�֘A��UPDATE.ERB
	���R�}���h�֘A��COMF������n��COMF428 ���Ƃ��g��.ERB
	��G:\ERB\�X�e�[�^�X�v�Z�֘A\TRACHECK_EQUIP_�}���p��.ERB

247�X��>>406�̏C���iSLEEP.ERB
	�P���ɐ����A��̏ꍇ�͐_�ЋA����ɔ�΂�������

247�X��>>418��2�C���iCOMF428 ���Ƃ��g��.ERB,UPDATE.ERB
	�j���ۂ��ł�����������ɍX�ɏ��Ƃ��g�p�ł�����Č����̂��A���������z��O�̓����A�Ȃ̂ŁA�j���ۂ��ł����������珬�Ƃ͗��p�s�\��
	���ƁA�\������ĂȂ������ł����ނ̂�NG

�{��
	���l�I�i�z�֘A�ŁA@�}���s�̃y�j�X�T�C�Y�̊m�F�ɁA�n���ȃA���������Ă��̂ŏC��
	����A�󋵂Ɋ������A�n���ȃA���ł��j���ۂ��I�i�z�����ɂȂ��Ă��C������

by������

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用就寝時帰宅処理＆針妙丸巨大化定着バグ修正＋/README.TXT


code:
eraTW4.622�p��t��������n�̕��\���C��

 ERB���X�e�[�^�X�v�Z�֘A��COUNTER��COUNTER_ACTABLE.ERB
 	��							 ��COUNTER_MESSAGE.ERB
	������E���b�Z�[�W�֘A��EVENT_MESSAGE_�}���nCOM��EVENT_MESSAGE_�}���n�h���R�}���h.ERB

�N���s�A���P�A����A�H���A�e����

MASTER�̃\�[�X�����ύX�ŁA�ː��^�C�~���O���Y�������ʁA�����n�̕���TCVAR:�C�������ɂ�镪�򂪎��S���Ă����̂Œ���
��̓I�ɂ́A��t��������t���v���X�̒n�̕��̕\�������������Ȃ��Ă�

MGZZ���&PG�A�X�g���C�����\��Ŏ��Ԃ�����by������

path: 原版+前人整合等各种readme/パッチ/eraTW4.622用種付け交尾等地の文表示修正/README.TXT


code:
eraTW4.630proto�p ������さ�N���E���s�[�X����1.10+��
�@�@�@�@�@�@�@�@�@�@�@�@�@���    holy

�������ƃN���E���s�[�X����̍X�V�łł��B
�������UPDATE���Ă��������B
��ʂ薞���s���܂ł��������o�[�W�������킹���Ⴈ�����Ă��Ƃ�ver.1.10�ɓ��ꂵ�܂����B
�X�V�ӏ��͊ereadme���Q�ƁB
�u�F�X�X�V�v�Ƃ��K���Ȃ��Ə����ĂĎ����ňӖ���������Ȃ������̂ł����Ə����悤�ɂ��܂����B

�܂��A�L�����f�[�^.ERB���������Ă��܂��B
������́weraTW4.630proto�̃o�j���x�ɑΉ����Ă���̂ŁA
�����p�b�`��e���p�b�`�����Ă���ꍇ�͕����}�[�W���Ă��������B
����ƃN���E���s�[�X�̖��o�n�D�����ς��Ă��܂��B

���ȉ��G�L
�Ȃ����o�[�W�������W�����v���Ă܂����A����I�ɖK��郂�`�x�[�V�����̔g�ɔC���ď����Ă���̂ŁA
���M������グ�悤�����̉��M�Ă������ԁ����łɂ����܂ŏI��点�悤�����́i�ȉ����j
�̃��[�v�Ƀn�}�肸���Ƒ؂��Ă܂��������܂���B
���`�x�[�V�������؂ꂽ���_�ŏグ��̂������ł��ˁB�݂�Ȃ��C�����悤�B

���݃N���E���s�[�X�̈玙�C�x���g�������Ă܂��i5�����炢�B���̒��ł�8���j�B
�O�����C�x���g���������������_���_�Ђ̎������_�ЏZ�݂������Ă݂����B���ǂǂ����邩���܂炸�����˂��Ă�B
��������Ȃ�����������Ă݂����B���Ǐ����Ȃ��v���C�������ƂȂ����犴�G�����߂Ȃ��B
�Z�t������������Ă݂����B���Ǖ��i���Ȃ����犴�G���i���j
���L�������ƃw�J�[�e�B�A�A���ρA�͂��āA�����o�A�����[�����菑�������ȂƂ��v���Ă�B�v���Ă邾���B
�O������������������3�l�͖����Ȃ񂶂�Ȃ����H

path: 原版+前人整合等各种readme/パッチ/eraTW4.630proto用 小鈴口上＆クラウンピース口上1.10+α/readme.txt


code:
str
6074,�}���q�K
��
6074,���ׂ̉B��ƑO
�ɕύX

Chara97 ����
�t���O,����ʒu��ݒ�

MAP_00
�{������������̃}�b�v�̂�����C��

MAP_07
�O�o�}�b�v�ɐ��ׂ̉B��ƑO�ǉ�

MAP_COMM_07
�ؐ�@�̏����������łɓV�q�̕���ǉ�

PLACE_7
MAP_SEARCH_REPLACEMENT_7�ɐ��ׂ̉B��ƑO�ǉ�

�\�͕\��
�ח��\���D�揇�ʕύX�ƈ��l�ǉ�

COMF604 �U�􂷂�
SANSAKU_UNIQUEPLACE�ɐ��ב�ǉ�
�ؐ�@�̏����������łɓV�q�̕���ǉ�

ANOTHER_TALK
���̐����󋵂���ڂŕ�����悤�ɕύX

DIM
#DIM CONST ���ׂ̉B��ƑO = 740�ǉ�

JK�D��

path: 原版+前人整合等各种readme/パッチ/eraTW4.630proto用外出マップ正邪宅追加他パッチ/readme.txt


code:
1,��������
;(BIT 0=�L�X 1=���ӂ� 2=���l 3=A 4=SM)
2,�D���x
3,�ُ�o��
4,�M���x
6,�ԓx
7,��{�����Z�b�g
8,�����I�v�V����
10,��݈���
11,��݈����
12,�f�[�g��
13,�f�[�g��C�x���g�t���O
14,������
15,���[�^�[�}��
16,���[�^�[A�}��
17,�_���o��
18,�ʎ�
19,���Ӕ���
20,����Q��
;�i0=�s�Q�� 1=�Q�� 2=��Î� 3=�E���ς݁j

30,�_�ЍݏZ
;CFLAG:�_�ЍݏZ�́uMAIN_MAP�̏Z�l�ł���ꍇ�Ɏ����̏ꏊID�i���_�}�b�v�Łj���L�^�v���Ă���iMAIN_MAP�ɏZ��ł��Ȃ��ꍇ��0�j
31,�����p��
;(BIT 0=���� 1=���l 2=���ԋ��� 3=���� 4=�K������ 5=���� 6=�L�X��)
32,��ƌ��
33,�Z�ݍ��ݕK�v�M���x
34,�ƒ�
35,�ŗL�R�}���h
36,���������

;40,���C�o��

41,�I�i�o��
;(1=�ڌ����ꂽ 2=�����ăL���� 3=����ꂿ�����)
42,�锇��
;(BIT 0=�\�t�g1=�Z�N�n��2=�K�`�Z�N�n��3=���Ӕ�}��4=���Ӄb�N�X5=���C�v6=����7=���S8=�N������)
43,�������������
;���ӂȂ��ōs�ׂɋy�񂾏ꍇ��
44,�q��Ē�����
;�q��Ē��ł��������Ⴆ��

;100�`139�܂Ńp���c�Ǘ��Ɏg�p���i4.600proto���݁j

;CFLAG:200�`239�̓m�[�}�������p�^�[���L���p
;CFLAG:240�`260�̓p�W���}�p�^�[���L���p

284,�u�N�x
285,�u�N�x�Q
286,�S���ː�
287,�A�i���ː�
288,���ɐ��t
289,��ɐ��t
290,��ɐ��t
291,�m�[�p��
292,�����o�j�Z�p
293,�p���c2
294,���Ȃ��̃p���c
295,�����Ȃ�ʊJ�����\�[�X�ǉ�

300,���݈ʒu
301,�O�^�[���ʒu
310,�n��
311,�����ʒu
;CFLAG:�����ʒu�͈�����J�n�������_�ł̊e�L�����̊J�n�ʒu�A���_�}�b�v��̈ʒu���L�^���Ă���
;MAIN_MAP�̏Z�l�łȂ��ꍇ�ɂ�SUKIMA()����ɂȂ��Ă���i��99�j
;������g�������ł͎����̈ʒu�͂킩��Ȃ��iMAIN_MAP�ɏZ��ł��Ȃ��L�����̏�񂪂킩��Ȃ��j
;MAIN_MAP�̏Z�l����CFLAG:�_�ЍݏZ�Ɠ����ACHARAxx.CSV���Q�Ƃ���Ƌ��_�ł̎����ʒu���킩��
;312,�N������
;�����n��CFLAG:350�`������
313,����
;314,�N������
;315,�A�Q����
316,����
317,���ӂ�
318,�u�`�M��
319,����
320,���s
321,�H��
322,�s�@��
323,���C
324,��ڌ�
325,�s��
326,�E��
327,�s������
328,�O��
330,�B����
331,�C�^�Y��
332,���o�n�D
333,�f�B���C
334,�Y���Q��
335,��|��
336,������
337,�����ʒu
338,��������
339,�̖ړ���
340,���܂��Ă�x
341,���Ԓ�~�����ւ�
342,�x���ړ���
343,�p�W���}
344,���Ԓ�~�s��
345,���Ԓ�~�o��
346,���Z�����Ď肪�����Ȃ�
347,�I�i�j�[����
348,�Еt���d����
349,�Еt���ꏊ

350,�E��
;(40,���| 41,��b 42,�퓬 43,���{ 44,���� 45,���y 46,�V�� 47,������ 48,����̏��� 49,����ɎQ�� 50,�ЂÂ�)
351,�g�̑���
352,���K����
353,�A���
354,�A�Q����
355,�N������
356,�悭�s���n��
357,�o���ʒu
358,����ʒu
;CFLAG:����ʒu�́u���ł����}�b�v��̎���ʒu�v�������A�����������̓�����̔���Ɏg���Ă���
;���_�}�b�v�ł͎g���Ȃ��_�ɗv����
359,���_���K
360,�o��
361,�ʔN
362,�������K
363,�ړ����␳
364,�ړ��ߓx

370,�������o
371,��������L
372,���Ԓ�~����L
373,�Ȃ肫�����L
374,�j�Z�L�����Z������L
375,����������񂹔���_����
376,����������񂹔���_�ʏ�
377,�����|���֎~

380,���͉��
381,����
382,�ψّO�̌`��
383,�o�����^�C��
384,�Ō�ɉ������

400,��O���ꑍ������
401,���n�����򑍓�����
402,���n���������C�x���g

403,�˗���
;�p�^�[�����ו�������
;   -1�@�˗���������/ 1�@�˗������/ 2�@�˗���/ 3�@�˗��B��/ 4�@�����؂�/ 5�@�񍐖Y��/ 6�@�˗����s/
;    103 �˗��I���i�����j/104 �˗��I���i�����؂�j/105 �˗��I���i�񍐖Y��j/106 �˗��I���i���s�j
404,�˗����e

410,
411,�˗��ΏۂP
412,�˗��ΏۂQ
413,�˗��ΏۂR
414,�˗��ΏۂS
415,�˗��ΏۂT

;420~431�͊e���_�}�b�v�ւ̗��K�␳�ɂ���\��

;450~461�o���ʒu��

500,�D���ȑ̈�
501,�A�i���J������
502,�����r���L�O��
503,�����r���Ώ�
504,�����r������
505,����r���L�O��
506,����r������
507,�A�i�������r���L�O��
508,�A�i�������r���Ώ�
509,�A�i�������r������
510,�t�@�[�X�g�L�X�r���L�O��
511,�t�@�[�X�g�L�X�r������
512,�t�@�[�X�g�L�X�r���Ώ�

515,�݌v�S�����t
516,�݌v�A�i�����t
517,�݌v����
518,�݌v�Ԃ�����

527,������
;(0=�Ȃ� 1=�C�^�Y�� 2=������)
528,�D����
529,���ˈ���
530,������S��
531,�A��

550,�p���炢
551,�U�f
552,�ϋɐ�
553,�^�`

560,���i�X��

591,�u�A���t�B���^
592,�`�A���t�B���^
595,��d�A���t�B���^
596,�r�l�A���t�B���^

597,�Z�N�n���A���t�B���^

;CFLAG:600�`639�͂��C�ɓ���ߑ��p�^�[���L���p
;CFLAG:650�͈ߑ��Z�b�gID���w�肷��
;�������A300�Ȃ炨�C�ɓ���ߑ��A301�Ȃ�p���C�`�A302�Ȃ�S�����w�肳���
650,�p�W���}�w��
651,���傤�̂ς��
652,�p�W���}�p���c
653,�w��p���c

655,�����ɂ���ߑ�,;���C����ߑ���ݒ肵�����ǂ����A���艼������₱�����̂łЂ炪�Ȃɂ��܂�
656,�ߑ��ꎞ�ύX,;���ꗧ���Ă���Ƃ��͕���E�����R�}���h�����s����܂ŕ��i���ɖ߂�Ȃ�

661,���傤�̃u��
662,�p�W���}�u��
;653,�w��u��;�Ƃ肠���������͂��Ȃ�

;CFLAG:700�@���ւ����s�t���O�iMASTER�̖ڂ̑O�ł�TARGET�̂����ւ������j
;���ꂿ����ƍH�v����΂����C�̒��ւ���p�W���}���ւ��ɂ����p���������ł�
700,���ւ����s

900,��������,;7�Ŋ댯��
901,�q�{�����q
902,�ɂ�������
903,�D�P�o�ߓ���
904,�������N�A�b�v
905,�񕜑��x�_�E��
906,�����o�D�P
907,�D�P�ɂ��ǉ��T�C�Y
908,�o�Y�o�ߓ�
909,�玙�l��
910,���o�ː�
911,�D�P���o���
912,�q���l��
913,�q��␳
914,�Y�x

920,���u��p�^�[��

930,�e����������
931,�e�����\
;(BIT 0=���Ύ���1=���_�֌�2=�E�C�z�X3=��������4=���͗��_5=�����[��6=�c�E����7=�����ꝱ8=�ĉ�Ǎ�9=�H�D�Í�)

;CFLAG:1000�`1999	 ����p�m�ۗ̈�
;CFLAG:1000	����Z���N�^�p


code:
1,�ː��ӏ�,; (�r�b�g 1=�S�� 2=�A�i�� 3=��� 4=���� 5=�p�C�Y�� 6=�f�� 7=���R�L 8=�̕\ 9=�A�i����d
2,�j�Z�}���t���O,;�i�����ŉ�V�𓾂��ꍇ�A�o����ϓ������Ȃ�)
3,SELECTCOM�ۑ�
4,�j�Z�t���O
5,�����|��

10,�u�}���p��
11,�`�}���p��
12,�t���C�v�p��
13,�D���x����Ȃ�

16,�}������

20,��������擾
21,��������擾
22,��ɍ���擾
23,���y����擾
24,��������擾
25,����]���ω�

40,Info�\����

50,����COM,;(1=�V�b�N�X�i�C�� 2=�␴�� 3=G�X�|�b�g�h�� 4=���ꉲ�O 5=����t�F�� 6= 7= 8= �V�b�N�X�i�C���p�C�Y�� 13=���ݑ}�� 17=���񓯎��z��)

60,MASTER�̌��g�p��
61,MASTER�̎�g�p��
62,MASTER�̂b�g�p��
63,MASTER�̂u�g�p��
64,MASTER�̂`�g�p��
65,MASTER�̂a�g�p��

70,�����|���Ȃ�

90,�������
91,���[�h�㏸�}��

95,�D���x�{�[�i�X
96,�D���x�}�C�i�X
97,�D���x�Ǘ�
98,�M���x�Ǘ�
99,�M���x�Ǘ����̂Q
100,������COMABLE�Ǘ�
101,�����������s�Ǘ�
102,COMABLE�Ǘ�
;(1=����ON 2=�E�t�tON 3=���肩�牟���|����)
103,�O�^�[����TARGET���
104,���݂�TARGET
;(0�Ȃ�w�肵�Ȃ�) TARGET�ύX�p�i�ύX���������肪�����Ă�j
105,�r�f�I�J����
;(0=�Œ�J���� 1=MASTER�B�e 2=����B�e)
106,MASTER�̂o�}����
107,���������[�h
108,����������|�C���g
109,�����|����J�n����
110,MASTER�̓�ꍇ��

117,�ϑz��
120,�L�X�}�[�N
121,�S����
122,���
123,���␳

131,����

140,���d�������x
141,�g�p�y��

150,�O���ASSIPLAY�̗���
151,�O��̓���COM
152,�O��̃_�u�������n�R�}���h�ɂ�����TARGET�ȊO�̎Q���ҁiLOCAL�j
153,�O��̃R�}���h����

160,�T�C�Y�\��
161,�����\��
162,�\�͕\��
163,�o���\��
164,���Z�\��
165,�f���\��
166,����\��
167,����\��
168,���C��\��

170,PALAM��\��
171,Status��\��
172,�\���A�C�e�����

192,����ɂ��COM���۔���
;(-2=�R�}���h�I���A-1���������s�A0=COM�ˑ��A1=��������0R�����听��
193,SELECTCOM�̕���
194,SOURCE�Ȃǂɉe�����Ȃ�SELECTCOM�̕���
195,�������ړ�
196,�|����
197,������
198,���Q
199,������
;(bit 1=�ٓ�2=�����o��3=�f�@ 4=���ʏ��i 5=����K��ɂ�闂�����K 6=�V�󑀍� 7=�e������ 8=�ː�����)
200,�A���o�C�g�ŉ҂������z
201,�����~��
202,�܂��Ȃ�
203,�K�^�␳
204,�L�������X�g
205,�^��
206,�������ړ����̂Q
207,�J����
;208,�P�ϋv�x
209,��O����t���O
210,��O���ꎞ��������
211,���n������t���O
212,���n�����򎞌�������
213,�p���c���D
214,�o�����|��
215,�f�[�g�O�D���x
216,���Ȃ��N��
;TIME:3+DAY * 1440
217,���[
218,�d��
219,�ړ��s�\���b�Z�[�W
220,�J�W�m���ꎞ�J���X�}
221,OPPAI
222,�����

230,�X�J�[�g�߂��肷��
231,�G������
232,�}�b�v�؂�ւ�

300,���Ԍo��
301,

;500~603�͈����p�p�Ɏg�p
;500~603�͈����p�p�Ɏg�p
;�L���������������֌W��500�`630�܂ł͎g�p���iver4.600proto���݁j
;����������L�������̑����ɔ����Ďg�p�̈悪�L����͂�
;�����͍L��ϐ��ł���K�v���͔����̂�@�����ăj���[�Q�[������DIM��d�l�ύX���\


code:
;FileName_ANOTHER_TALK.ERB ------------------------- Rev1.01
;TARGET�ȊO�����o�[��b
;CALL		USER
;ARG		VOID
;RETURN		VOID
;COMMENT
;-----------------------------------------------------------
@ANOTHERTARGET_TALK
#DIM TALKER,2
#DIM HATAKE
VARSET LOCAL
VARSET HATAKE
;DEBUGPRINTL �yANOTHERTARGET_TALK�zCALL ANOTHERTARGET_TALK

;CHARA_ARRAY�t�H���g�΍�
SIF CHARANUM > �L�����N�^�����
	RETURN 0

;�b�҂̌��菈��
CALL ANOTHER_TALK_SET_TALKER(TALKER)
HATAKE = INT_NOUMIN(FLAG:�n��, "�ꏊID")

DEBUGPRINTFORML �yANOTHERTARGET_TALK�z��b�҂P = {TALKER:0} ��b�҂Q = {TALKER:1}
IF (TCVAR:TARGET:�d���J�n - TIME:0 <= 30 && TCVAR:TARGET:�d���J�n - TIME:0 > 0) && !FLAG:70
	CALL MESSAGE_TALK(12)
ELSEIF CFLAG:TARGET:����
	CALL MESSAGE_TALK(3)
ELSEIF ((CFLAG:TARGET:�A�Q���� - TIME:0 <= 30 && CFLAG:TARGET:�A�Q���� - TIME:0 > 0) || (TCVAR:�����򋭓x >= 2 && !RAND:3)) && !FLAG:70
	CALL MESSAGE_TALK(13)
ELSEIF TALKER:0 && TALKER:1 && (!FLAG:70 || CFLAG:TARGET:344 == 1)
	CALL MESSAGE_TALK(2, TALKER:0, TALKER:1)
ELSEIF FLAG:����J�Ãt���O >= 98 && CFLAG:MASTER:���݈ʒu == TFLAG:�����
	CALL MESSAGE_TALK(1)
ELSEIF TALENT:TARGET:�玙�� && FLAG:�q���`�� && TCVAR:TARGET:�q���󕠓x != -1 && !CHK_DATENOW(CFLAG:TARGET:�f�[�g��) && !CFLAG:MASTER:���ӂ� && !BATHROOM(CFLAG:MASTER:���݈ʒu)
	CALL MESSAGE_TALK(14)
ELSEIF TALENT:MASTER:�`�� == 4 && TIME > 1140 && CFLAG:MASTER:�f�[�g�� && (CFLAG:MASTER:���݈ʒu % 100) % 10 && CFLAG:MASTER:���݈ʒu != OMANEKIBEYA()
	CALL MESSAGE_TALK(5,0,0)
ELSEIF CFLAG:MASTER:���݈ʒu == GET_MAP_REPLACEMENT(HATAKE)
	CALL MESSAGE_TALK(8)
ELSEIF �ƒ�؉���(CFLAG:MASTER:���݈ʒu)
	;�ƒ�؉���i�`��
	CALL MESSAGE_TALK(10)
ELSEIF ��������(CFLAG:MASTER:���݈ʒu) && TIME:5 < 2
	CALL MESSAGE_TALK(11)
ELSE
	RESULT = 0
	TRYCALLFORM MAP_UNIQUEMESSAGE_{MAIN_MAP}
	;�ǂ�ɂ�����������Ȃ���ΓV�C
	SIF OUTROOF(CFLAG:MASTER:���݈ʒu) && !RESULT
		CALL MESSAGE_TALK(4)
	;SIF+�R�����g�s�͕s����N�����̂Œ���
	;SIF OUTROOF(CFLAG:MASTER:���݈ʒu) && !RESULT
	;�ǂ�ɂ�����������Ȃ���ΓV�C
	;	CALL MESSAGE_TALK(4)
ENDIF
RETURN 0

;�b�҂̌��菈��
;�n���ꂽTALKER�𒼐ڏ���������
@ANOTHER_TALK_SET_TALKER(TALKER)
#DIM REF     TALKER
#DIM DYNAMIC CHARA, �L�����N�^�����
#DIM DYNAMIC CNT_CHARA
VARSET TALKER
;�ΏۃL�����I��
FOR LOCAL, 1, GET_TARGETNUM() + 1
	;MASTER�̑�������Ă�����X�L�b�v
	SIF TARGET:LOCAL == TARGET:0
		CONTINUE
	SIF CFLAG:(TARGET:LOCAL):���݈ʒu != CFLAG:MASTER:���݈ʒu
		CONTINUE
	;�ΏۃL����ID�擾
	CHARA:(CNT_CHARA) = TARGET:LOCAL
	CNT_CHARA ++
NEXT
SIF CNT_CHARA < 2
	RETURN

LOCAL = RAND:(CNT_CHARA)
TALKER:0 = CHARA:LOCAL
ARRAYREMOVE CHARA, LOCAL, 1
CNT_CHARA --

;�ΏۃL�����Ԃ̑����`�F�b�N
FOR LOCAL, 0, CNT_CHARA
	;�����̗ǂ��L������������
	SIF !RELATION:(TALKER:0):(CHARA:LOCAL)
		CONTINUE
	;���������ĉ�b�҂Q�ȏ�Ȃ��b�҂��X�V
	SIF TALKER:1 && RELATION:(TALKER:0):(TALKER:1) >= RELATION:(TALKER:0):(CHARA:LOCAL)
		CONTINUE
	TALKER:1 = CHARA:LOCAL
NEXT

;FileName_ANOTHER_TALK.ERB ------------------------- Rev1.03
;Info�g�����b�Z�[�W�\������
;CALL		USER
;ARG		0:���b�Z�[�WNO, 1:��b�҂P, 2:��b�҂Q�i�����o�[��b���̂݁j
;RETURN		VOID
;COMMENT	CASE�̔ԍ����Ⴂ�قǏo�͗D��x������
;-----------------------------------------------------------
@MESSAGE_TALK(ARG,ARG:1,ARG:2)
#DIMS ���
#DIMS �q���̖��O
;�@�\�`�F�b�N
;SIF !GETBIT(FLAG:3,2)
	;RETURN 0
CALL DRAW_INFORMATIONLINE("Info",1)
SELECTCASE ARG
	CASE 1
		IF CHK_DATENOW(CFLAG:MASTER:�f�[�g��) && CFLAG:MASTER:���݈ʒu != OMANEKIBEYA()
			��� = %DATENAME_PLACE()%
		ELSE
			��� = %NAME_FROM_PLACE(TFLAG:�����)%
		ENDIF
		;�Q���҂����Ȃ���Ε\������Ȃ�
		IF FLAG:35 > 0
			;����̋K�͂ɉ����ĕ���
			IF FLAG:31 <= 1500 || FLAG:35 <= 3
				PRINTFORML %���%�ł�{FLAG:35}�l���x�̂����₩�ȉ���J����Ă���c�c
			ELSE
				PRINTFORML %���%�ł�{FLAG:35}�l���x�̉���J����Ă���c�c
			ENDIF
			;�����ׂ����ꍇ
			IF DAY > FLAG:34
				;�o�ߎ��Ԃɉ����ĕ���
				IF TIME >= (FLAG:33 + 240) - 1440 * (DAY - FLAG:34)
					IF FLAG:35 <= 3
						PRINTFORML ���͂�c���Ă���͈̂ꕔ�̖Ҏ҂����̂悤���c�c
					ELSE
						PRINTFORML ����ق�ƒE���҂��o�Ă���悤���c�c
					ENDIF
				ELSEIF TIME >= (FLAG:33 + 180) - 1440 * (DAY - FLAG:34)
					PRINTFORML �����o���オ���Ă���悤���c�c
				ELSEIF TIME >= (FLAG:33 + 60) - 1440 * (DAY - FLAG:34)
					PRINTFORML �΂����ƌ������r�؂�邱�Ƃ͂Ȃ��A����オ��������Ă���c�c
				;�܂��n�܂����΂���
				ELSE
					PRINTFORML �Ȃ��Ȃ��̓��킢�̂悤���c�c
				ENDIF
			ELSE
				;�o�ߎ��Ԃɉ����ĕ���
				IF TIME >= (FLAG:33 + 240)
					IF FLAG:35 <= 3
						PRINTFORML ���͂�c���Ă���͈̂ꕔ�̖Ҏ҂����̂悤���c�c
					ELSE
						PRINTFORML ����ق�ƒE���҂��o�Ă���悤���c�c
					ENDIF
				ELSEIF TIME >= (FLAG:33 + 180)
					PRINTFORML �����o���オ���Ă���悤���c�c
				ELSEIF TIME >= (FLAG:33 + 60)
					PRINTFORML �΂����ƌ������r�؂�邱�Ƃ͂Ȃ��A����オ��������Ă���c�c
				;�܂��n�܂����΂���
				ELSE
					PRINTFORML �Ȃ��Ȃ��̓��킢�̂悤���c�c
				ENDIF
			ENDIF
		ELSE
			PRINTFORML ��(�����)�ǂ������̐�
			PRINTFORML %NAME_FROM_PLACE(TFLAG:�����)%�͉���ɂ���čr��ʂĂĂ���c�c
		ENDIF
	CASE 2
		;�Θb�\��
		PRINTS "   "
		;�ǂ�������������
		IF RELATION:(ARG:1):(ARG:2) > 100 && RELATION:(ARG:2):(ARG:1) > 100
			IF TALENT:(ARG:1):���� && TALENT:(ARG:2):����
				PRINTFORML %CALLNAME:(ARG:1)%��%CALLNAME:(ARG:2)%�́A�����Ƃ�Ƃ����\��ł���������߂Ă���
			ELSEIF TALENT:(ARG:1):���� || TALENT:(ARG:2):����
				PRINTFORML \@ TALENT:(ARG:1):���� ? %CALLNAME:(ARG:1)%��%CALLNAME:(ARG:2)% # %CALLNAME:(ARG:2)%��%CALLNAME:(ARG:1)% \@�ƒk�΂��A�M���ۂ������������Ă���
			ELSE
				IF RAND:2
					PRINTFORML \@ CFLAG:(ARG:1):310 > CFLAG:(ARG:2):310 ? %CALLNAME:(ARG:1)%��%CALLNAME:(ARG:2)% # %CALLNAME:(ARG:2)%��%CALLNAME:(ARG:1)% \@�̓���D�������łĂ���
				ELSE
					PRINTFORML %CALLNAME:(ARG:1)%��%CALLNAME:(ARG:2)%�͊y�������ɒk�΂��Ă���
				ENDIF
			ENDIF
		;�ǂ��炩����������
		ELSEIF (RELATION:(ARG:1):(ARG:2) > 100 && RELATION:(ARG:2):(ARG:1) < 100) || (RELATION:(ARG:1):(ARG:2) < 100 && RELATION:(ARG:2):(ARG:1) > 100)
			IF TALENT:(ARG:1):���� && TALENT:(ARG:2):����
				PRINTFORML %CALLNAME:(ARG:1)%��%CALLNAME:(ARG:2)%�́A��b���Ȃ���M���ۂ������������Ă���
			ELSEIF TALENT:(ARG:1):���� || TALENT:(ARG:2):����
				PRINTFORML \@ TALENT:(ARG:1):���� ? %CALLNAME:(ARG:1)%��%CALLNAME:(ARG:2)% # %CALLNAME:(ARG:2)%��%CALLNAME:(ARG:1)% \@�Ƙb���Ȃ���A��������M���Ă���
			ELSE
				PRINTFORM \@ RELATION:(ARG:1):(ARG:2) > 100 ? %CALLNAME:(ARG:1)%�̌��t��%CALLNAME:(ARG:2)% # %CALLNAME:(ARG:2)%�̌��t��%CALLNAME:(ARG:1)% \@��
				PRINTDATA
					DATAFORM �s�@�������ȕ\��𕂂��ׂĂ���c
					DATAFORM ������̕����������Ă���c
					DATAFORM �K���ɑ��Ƃ�ł��Ă���c
				ENDDATA
			ENDIF
		;�ǂ�����������
		ELSEIF RELATION:(ARG:1):(ARG:2) < 100 && RELATION:(ARG:2):(ARG:1) < 100
			IF TALENT:(ARG:1):���� && TALENT:(ARG:2):����
				PRINTFORML %CALLNAME:(ARG:1)%��%CALLNAME:(ARG:2)%�́A���_���Ί�������Ă���
			ELSEIF TALENT:(ARG:1):���� || TALENT:(ARG:2):����
				PRINTFORML \@ TALENT:(ARG:1):���� ? %CALLNAME:(ARG:1)%��%CALLNAME:(ARG:2)% # %CALLNAME:(ARG:2)%��%CALLNAME:(ARG:1)% \@�̘b�𕷂������A���U���Ă���
			ELSE
				PRINTFORM %CALLNAME:(ARG:1)%��%CALLNAME:(ARG:2)%��
				PRINTDATA
					DATAFORM �Ȃɂ����_���Ă���c
					DATAFORM ���X�b�Ƃ��Ă���c
					DATAFORM ���܂��n�߂��c
				ENDDATA
			ENDIF
		ENDIF
		PRINTL
	CASE 3
		PRINTFORML %CALLNAME:TARGET%�͂������薰���Ă���c
	CASE 4
		PRINTS "   "
		IF TIME:7
			SELECTCASE TIME:7
				;��
				CASE 1
					IF FLAG:70
						PRINTL ��Ƀ��m�N���̓����|�����Ă���c
					ELSE
						PRINTL ��ɓ����|�����Ă���c
					ENDIF
				;�_�C�������h�_�X�g
				CASE 2
					PRINTL ��̌��������z���ɃL���L���ƋP���Ă���c�c���������c
				;���ꐯ
				CASE 3
					IF FLAG:70
						PRINTL ���ɗ��������܂��Ă���c
					ELSE
						PRINTL ���Ɏ��܁A����������Ă���c
					ENDIF
				;�����Q
				CASE 4
					IF FLAG:70
						PRINTL ���ɗ����Q�����܂��Ă���c
					ELSE
						PRINTL ���𖄂ߐs�������̗��������ꑱ���Ă���c
					ENDIF
			ENDSELECT
		ELSE
			SELECTCASE TIME:5
				;���V���l
				CASE 1
					IF TIME:2 >= 2 && TIME:2 <= 4
						IF DAY:2 == 2
							PRINTL �_��Ȃ��󂩂瑾�z���e�͂Ȃ��Ƃ�t���Ă���c
						ELSE
							PRINTL ��͑u�₩�ɐ���n���Ă���
						ENDIF
					ENDIF
				;�J
				CASE 4
					IF FLAG:70
						PRINTL �J������~���Ă���c
					ELSE
						PRINTL ���Ƃ��ƂƉJ���~���Ă���c
					ENDIF
				;��J
				CASE 5
					IF FLAG:70
						PRINTL �J������~���Ă���c
					ELSE
						PRINTL �J�͌������~�肵�����Ă���c
					ENDIF
				;��
				CASE 8
					IF FLAG:70
						PRINTL ��̌�������~���Ă���c
					ELSE
						PRINTL �Ⴊ�������ƕ����~���Ă���c���������c
					ENDIF
				;����
				CASE 9
					IF FLAG:70
						PRINTL ��̌�������~���Ă���c
					ELSE
						PRINTL ���������Ȑ��Ⴊ�����r��ł���c�M���f����������ɓh��Ԃ��ꂻ�����c
					ENDIF
				;�݂���
				CASE 12
					IF FLAG:70
						PRINTL ����~���Ă���c
					ELSE
						PRINTL �₽���݂��ꂪ�~���Ă���c���������c
					ENDIF
				;�����
				CASE 13
					IF FLAG:70
						PRINTL �ł̗������~���Ă���c
					ELSE
						PRINTL �嗱�̂���ꂪ�����r��Ă���c���������c
					ENDIF
			ENDSELECT
		ENDIF
		PRINTL
	CASE 5
		PRINTFORML �Â��铹���A%CALLNAME:MASTER%�̌���y�j�X������Έ��S��
	CASE 6
		IF !CHARA_HOLIDAY(67)
			;���ƒ�
			IF TIME >= 480 && TIME <= 720 || TIME >= 780
				IF !FLAG:70
					PRINTFORML �������̎q���B��%CALLNAME:TARGET%��\@ �[�U��(TARGET,3) >= 10 ? %SHOW_BOTTOM(TARGET,1)%�̒����ǂ��Ȃ��Ă��邩���m�炸��# \@���Ƃ��󂯂Ă���c
				ELSEIF !CFLAG:MASTER:���ӂ�
					PRINTFORML ���q���̎q���B�͒�~���Ă���c
				ELSE
					PRINTFORML %CALLNAME:TARGET%�͎��q���̎q���B�̑O�ŏP���Ă���c
				ENDIF
			ELSEIF TIME >= 720 && TIME <= 780 && !FLAG:70
				PRINTFORML ���q���̎q���B��%CALLNAME:TARGET%�ƐH�����Ă���c
			ENDIF
		ENDIF
	CASE 7
		IF CFLAG:MASTER:���݈ʒu == 210
			PRINTFORML %CALLNAME:(ARG:1)%�̎���ɐl�����肪�ł��Ă���
			IF �[�U��(ARG:1,3) >= 10
				IF !RAND:10
					PRINTFORML %CALLNAME:MASTER%�͔ޏ��̕\��ɔ����ȋ��΂��F�߂��@����Ă����̂��낤���H
				ELSE
					PRINTFORML �쎟�n�����̒m��Ƃ���ł͂Ȃ����A�ޏ��̂����ɂ͍���%CALLNAME:MASTER%�̐��t��\@ �[�U��(ARG:1,3) >= 30 ? �����Ղ��# \@���܂��Ă���̂�
				ENDIF
			ENDIF
		ELSE
			IF FLAG:70
			ELSE
				PRINTL �L��̕�����������
			ENDIF
		ENDIF
	CASE 8
		PRINTFORML %CALLNAME:(FLAG:�n��)%��%STR_NOUMIN(FLAG:�n��, "���̎��")%������
		SELECTCASE FLAG:���d���̐���
			CASE IS < 20
				PRINTFORML %STR_NOUMIN(FLAG:�n��, "�앨")%�͂܂������ƌ����Ă����قǈ���Ă��Ȃ�
			CASE 20 TO 60
				PRINTFORML %STR_NOUMIN(FLAG:�n��, "�앨")%�͂���܂����Ă��Ȃ�
			CASE 61 TO 100
				PRINTFORML %STR_NOUMIN(FLAG:�n��, "�앨")%�͂���Ȃ�ɂ悭����Ă���
			CASEELSE
				PRINTFORML %STR_NOUMIN(FLAG:�n��, "�앨")%���L���Ɏ����Ă���
		ENDSELECT
	CASE 9
		;����\��
		PRINTS "   "
		CALL KOJO_MESSAGE_SEND("INFO")
	CASE 10
		;�ƒ�؉���i�`��
		;ARG�ł��Ɨ�����̂Ŕ��g�������܂ł͎b��I�ɔ�0�Ō��ߑł�
		IF HATAKE_NAME:0 != ""
			PRINTFORM %HATAKE_NAME%
			IF PLANT_TYPE > 0
				IF PLANT_DRY > 3 || PLANT_GROW > 10
					PRINT �͌͂�Ă��܂��Ă���
				ELSE
					SELECTCASE PLANT_GROW
						CASE 10
							IF HATAKE_NAME:0 == "���[�^�["
								PRINTFORM �͂����Ɏ���U�����𗧂ĂĂ���
							ELSE
								PRINT �n�����n�̎���҂��Ă���
							ENDIF
						CASE 8,9
							PRINT ������n�߂Ă���
						CASE 6,7
							PRINT �̉Ԃ��炢�Ă���
						CASE 4,5
							PRINT �̗t���΂��Ă���
						CASEELSE
							PRINT �̕c�����Ɉ���Ă���
					ENDSELECT
					IF PLANT_DRY == 2
						PRINT �@�y�������Ă��Ă���
					ELSEIF PLANT_DRY == 0
						SETCOLOR C_AQUA
						PRINT �@���\���ɐ������z�����Ă���
						RESETCOLOR
					ENDIF
					PRINTL
				ENDIF
			ENDIF
		ENDIF
	CASE 11
		PRINTFORML ���󕨂�������Ă���
		;PRINTFORML ���̘e�ɂ͒Z�����݂邳�ꂽ�����肪����
	CASE 12
		PRINTFORML ���낻��%CALLNAME:TARGET%�̎d���̎��Ԃ�
	CASE 13
		PRINT ���C�������Ă���̂��A
		IF CFLAG:TARGET:���ӂ�
			PRINTFORML %CALLNAME:TARGET%�͉����ɖv��������Ă��Ȃ��l��
		ELSE
			PRINTFORML %CALLNAME:TARGET%�͌��L�����ݎE���Ă���
		ENDIF
	CASE 14
		�q���̖��O = %CHILDNAME:TARGET:(TALENT:TARGET:�玙��)%
		IF LOCAL:1 != TIME
			IF CFLAG:TARGET:�o�Y�o�ߓ� < CHILD_��b
				LOCAL = RAND:16
			ELSEIF CFLAG:TARGET:�o�Y�o�ߓ� < CHILD_�����O
				LOCAL = RAND:24
			ELSE
				LOCAL = RAND:30
			ENDIF
			LOCAL:1 = TIME
		ENDIF
		IF GO_SCHOOL(TARGET) && INRANGE(TIME, 420, 540)
			PRINTFORML %�q���̖��O%�͎��q���֍s���x�x�����Ă���
		ELSEIF CFLAG:TARGET:�o�Y�o�ߓ� < CHILD_��b
			SELECTCASE LOCAL
			CASE 1, 2, 3, 4
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�ɕ�����Ă���
			CASE 5, 6
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�̘r�̒��Ŗ��������ɂ��Ă���
			CASE 7, 8
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�̘r�̒��ő�l�������Ă���
			CASE 9, 10, 11, 12
				PRINTFORML %CALLNAME:TARGET%�ɕ����ꂽ%�q���̖��O%������������Ă���
			CASE 13
				PRINTFORML %CALLNAME:TARGET%�ɕ����ꂽ%�q���̖��O%�͉�����i���Ă���
			CASE 14
				PRINTFORML %�q���̖��O%�͉�����ڂŒǂ��Ă���
			CASEELSE
				PRINTFORML %CALLNAME:TARGET%��%�q���̖��O%�����₵�Ă���
			ENDSELECT
		ELSEIF CFLAG:TARGET:�o�Y�o�ߓ� < CHILD_�����O
			SELECTCASE LOCAL
			CASE 1, 2
				PRINTFORML %CALLNAME:TARGET%��%�q���̖��O%�͊y�������ɘb���Ă���
			CASE 3, 4
				PRINTFORML %CALLNAME:TARGET%��%�q���̖��O%�ɉ����������Ă���
			CASE 5, 6
				PRINTFORML %CALLNAME:TARGET%��%�q���̖��O%�ɘb�����Ă���
			CASE 7, 8
				PRINTFORML %CALLNAME:TARGET%��%�q���̖��O%�������Ă���
			CASE 9
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�ƗV��ł���
			CASE 10
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�ƔM�S�ɘb�����Ă���
			CASE 11
				PRINTFORML %�q���̖��O%�͈�l�ŗV��ł���
			CASE 12
				PRINTFORML %�q���̖��O%�͑�l�������Ă���
			CASE 13
				PRINTFORML %�q���̖��O%�͍l���������Ă���
			CASE 14
				PRINTFORML %�q���̖��O%�͖������ɂ��Ă���
			CASE 15
				PRINTFORML %�q���̖��O%�͂͂��Ⴂ�ł���
			CASE 16
				PRINTFORML %�q���̖��O%�����낿��낵�Ă���
			CASE 17
				PRINTFORML %�q���̖��O%�͂����������Ă���
			CASE 18
				PRINTFORML %�q���̖��O%�͂�����������ƌ��߂Ă���
			CASE 19, 20
				PRINTFORML %�q���̖��O%��%CALLNAME:MASTER%�ƗV�ڂ��Ƃ��Ă���
			CASE 21, 22
				PRINTFORML %�q���̖��O%���؂��؂��ƐG���Ă���
			CASEELSE
				PRINTFORML %�q���̖��O%��%CALLNAME:MASTER%�ɂ��܂��Ăق����悤��
			ENDSELECT
		ELSE
			SELECTCASE LOCAL
			CASE 1, 2
				PRINTFORML %CALLNAME:TARGET%��%�q���̖��O%�͊y�������ɘb���Ă���
			CASE 3, 4
				PRINTFORML %CALLNAME:TARGET%��%�q���̖��O%�ɉ����������Ă���
			CASE 5, 6
				PRINTFORML %CALLNAME:TARGET%��%�q���̖��O%�ɘb�����Ă���
			CASE 7
				PRINTFORML %CALLNAME:TARGET%��%�q���̖��O%�������Ă���
			CASE 8
				PRINTFORML %CALLNAME:TARGET%�͂���������Ȃ���%�q���̖��O%�ƂЂ��Ђ��b�����Ă���
			CASE 9
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�ɕ���������Ă���
			CASE 10
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�Ɏ咣���Ă���
			CASE 11
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�Ə΂��Ă���
			CASE 12, 13
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�ɋ����𐿂��Ă���
			CASE 14, 15
				PRINTFORML %�q���̖��O%��%CALLNAME:TARGET%�̎�`�������Ă���
			CASE 16
				PRINTFORML %�q���̖��O%�͈�l�ŗV��ł���
			CASE 17, 18, 19, 20
				PRINTFORML %�q���̖��O%�͕׋����Ă���
			CASE 21
				PRINTFORML %�q���̖��O%�͍l���������Ă���
			CASE 22
				PRINTFORML %�q���̖��O%�͖������ɂ��Ă���
			CASE 23, 24
				PRINTFORML %�q���̖��O%�͖{��ǂ�ł���
			CASE 25
				PRINTFORML %�q���̖��O%�͐g�̂�b���Ă���
			CASE 26, 27
				PRINTFORML %�q���̖��O%��%CALLNAME:MASTER%�Ƙb�������悤��
			CASE 28
				PRINTFORML %�q���̖��O%��%CALLNAME:MASTER%���C�ɂ��Ă���
			CASE 29
				PRINTFORML %�q���̖��O%��%CALLNAME:MASTER%�ɉ������Ă���
			CASEELSE
				PRINTFORML %�q���̖��O%���s���ڂł���������Ă���
			ENDSELECT
		ENDIF
ENDSELECT
SIF ARG
	DRAWLINE
;-----------------------------------------------------------------------------------------------------------------
@��i�`��
VARSET LOCAL
;�t�߂ŉ��������Ă���Ȃ���₩�ȗl�q��������
IF FLAG:����J�Ãt���O >= 98 && CAN_MOVE(CFLAG:MASTER:���݈ʒu, TFLAG:�����) >= 2
	CALL MESSAGE_TALK(1)
;���[�ː搶�̎�������i����
ELSEIF CFLAG:MASTER:���݈ʒu == 240 && CFLAG:67:�s�� == 5
		CALL MESSAGE_TALK(6)
	;ELSEIF CFLAG:MASTER:���ӂ� && GET_TARGETNUM() > 1
	;	CALL EASY_TARGET_CHANGER
ELSEIF GROUPMATCH(CFLAG:MASTER:���݈ʒu,210,220,230,250,270)
	FOR LOCAL,1,CHARANUM
		IF CFLAG:LOCAL:�s�� == 5 && CFLAG:LOCAL:���݈ʒu == �L��
			LOCAL:1 ++
			LOCAL:2 = LOCAL
		ENDIF
	NEXT
	SIF LOCAL:1
		CALL MESSAGE_TALK(7,LOCAL:2)
ENDIF