code:
@LOOK_AT
#DIM ��������
#DIM ���ߏ�
#DIMS �}����
#DIMS �}����2
#DIMS �\�����e
IF TARGET
	SIF !CFLAG:���ӂ�
		PRINT --
	;�^�[�Q�b�g�̏�ԕ\�L�E�V�`���G�[�V���������H
	PRINTFORM %CALLNAME:TARGET%�̏��
	IF !FLAG:�摜�\��
		PRINTBUTTON  "[�`�`�\��]", 816
	ELSE
		PRINTBUTTON  "[�摜�\��]", 816
		SIF FLAG:AA�\��
			PRINTBUTTON  "[�\���ݒ�]", 3100
	ENDIF
	IF CFLAG:���ӂ�
		IF FLAG:�}�G�\��
			PRINTBUTTON  "[�A�j���\��-ON-]", 817
		ELSE
			SETCOLOR C_L_GRAY
			PRINTBUTTON  "[�A�j���\��-OFF-]", 817
			RESETCOLOR
		ENDIF
	ENDIF
	PRINTL  ---------
	;PRINTL
	PRINT �y�㔼�g�z
	IF TEQUIP:1 == 0
		PRINT  �͂���
		SIF PALAM:�~�� >= PALAMLV:3
			PRINTFORM  %NIPPLE_DESCRIPTION(TARGET)%���u���Ă���
	ELSE
		;�O���̕�����\��
		FOR ��������, 17, 6, -1
			IF GROUPMATCH(��������, 13, 12, 11)
				CONTINUE
			ENDIF
			IF CSTR:(50 + ��������) != "" && !CFLAG:�p�W���}
				�\�����e = %CSTR:(50 + ��������)%
			ELSE
				�\�����e = %CLOTHNAME(��������,EQUIP:��������)%
			ENDIF
			IF EQUIP:TARGET:��������
				IF !(EQUIP:TARGET:���� || EQUIP:TARGET:�����s�[�X || EQUIP:TARGET:�㔼�g�㒅�P)
					PRINTFORM %�\�����e%
					BREAK
				ELSE
					PRINTFORM %�\�����e%
					BREAK
				ENDIF
			ENDIF
		NEXT
		IF TEQUIP:�㔼�g�͂������ > 0
			IF TALENT:�o�X�g�T�C�Y == 2
				PRINTFORM  %OPPAI_DESCRIPTION(TARGET,1)%�����ڂ�o�Ă���
				;PRINTFORM  �͂��؂��΂���̋������ڂ�o�Ă���
			ELSEIF TALENT:�o�X�g�T�C�Y == 1
				PRINTFORM  %OPPAI_DESCRIPTION(TARGET,1)%���܂�яo�Ă���
				;PRINTFORM  �L���ȋ������ڂ�o�Ă���
			ELSEIF TALENT:�o�X�g�T�C�Y == 0
				PRINTFORM  %OPPAI_DESCRIPTION(TARGET,1)%���I��ɂȂ��Ă���
				;PRINTFORM  �`�̂��������I��ɂȂ��Ă���
			ELSEIF TALENT:�o�X�g�T�C�Y == -1
				PRINTFORM  %OPPAI_DESCRIPTION(TARGET,1)%���I��ɂȂ��Ă���
				;PRINTFORM  ���U��ȋ����I��ɂȂ��Ă���
			ELSEIF TALENT:�o�X�g�T�C�Y == -2
				PRINTFORM  %OPPAI_DESCRIPTION(TARGET,1)%���I��ɂȂ��Ă���
				;PRINTFORM  ���炵�����񂪘I��ɂȂ��Ă���
			ENDIF
			SIF EQUIP:TARGET:�{�f�B�[�X�[�c == 0 && PALAM:�~�� >= PALAMLV:5
				PRINTFORM  %NIPPLE_DESCRIPTION(TARGET)%���u���Ă���
		ELSE
			SIF EQUIP:TARGET:�{�f�B�[�X�[�c == 0 && PALAM:�~�� >= PALAMLV:5
				PRINTFORM  ���̏ォ��ł�%NIPPLE_DESCRIPTION(TARGET)%���u���Ă���̂��킩��
		ENDIF
	ENDIF
	IF TEQUIP:�j�v���L���b�v && TEQUIP:������
		PRINTFORM  �j�v���L���b�v��%NIPPLE_DESCRIPTION(TARGET)%�ɋz���t��%CALLNAME:MASTER%��%OPPAI_DESCRIPTION(TARGET)%�𝆂܂�Ă���
	ELSEIF TEQUIP:����z�� && TEQUIP:������
		IF ABL:MASTER:�� > 2
			PRINTFORM  %CALLNAME:MASTER%��%OPPAI_DESCRIPTION(TARGET)%�𝆂܂�Ȃ���%NIPPLE_DESCRIPTION(TARGET)%���r�߂��Ă���
		ELSE
			PRINTFORM  %CALLNAME:MASTER%��%OPPAI_DESCRIPTION(TARGET)%�𝆂܂�Ȃ���%NIPPLE_DESCRIPTION(TARGET)%���z���Ă���
		ENDIF
	ELSEIF TEQUIP:�j�v���L���b�v
		PRINTFORM  �j�v���L���b�v��%NIPPLE_DESCRIPTION(TARGET)%�ɋz���t���Ă���
	ELSEIF TEQUIP:����@
		PRINT  ����@��������z���グ�悤�Ƃ��Ă���
	ELSEIF TEQUIP:����z��
		IF ABL:MASTER:�� > 2
			PRINTFORM  %CALLNAME:MASTER%��%NIPPLE_DESCRIPTION(TARGET)%���r�߂��Ă���
		ELSE
			PRINTFORM  %CALLNAME:MASTER%��%NIPPLE_DESCRIPTION(TARGET)%���z���Ă���
		ENDIF
	ELSEIF TEQUIP:������
		PRINTFORM  %CALLNAME:MASTER%��%OPPAI_DESCRIPTION(TARGET)%�𝆂܂�Ă���
	ENDIF
	SIF CFLAG:���ɐ��t == 1
		PRINT  �������琸�t������Ă���
	SIF CFLAG:��ɐ��t == 1
		PRINT  ��ɐ��t���Ԃ��������Ă���
	SIF CFLAG:��ɐ��t == 1
		PRINT  �肪���t�܂݂�ɂȂ��Ă���
	PRINTL
	PRINT �y�����g�z
	;TEQUIP:�����g���ߏ� �����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
	;CFLAG:�p���c �p���c�t���O
	;0 �p���c�͂��Ă���
	;1 �p���c�͂��ĂȂ�

	;�����g���߂Ȃ��A�������̓p���c�͂��Ă��Ȃ�
	IF TEQUIP:�����g���ߏ� == 0 || CFLAG:�m�[�p�� > 0
	;	�����g���߂����邪�m�[�p���ł���
		IF CFLAG:�m�[�p�� && TEQUIP:�����g���ߏ� != 0 && PREVCOM != 330
			���ߏ� = 0
	;		�㒅���㉺�Ȃ��ɂȂ��Ă��镞�𒅂Ă���ꍇ�A�����\������
			FOR ��������, 17, 8, -1
				IF GROUPMATCH(��������, 15, 14)
					CONTINUE
				ENDIF
				IF EQUIP:TARGET:��������
					IF CSTR:(50 + ��������) != "" && !CFLAG:�p�W���}
						�\�����e = %CSTR:(50 + ��������)%
					ELSE
						�\�����e = %CLOTHNAME(��������,EQUIP:��������)%
					ENDIF
					PRINTFORM %�\�����e%
					���ߏ� ++
					BREAK
				ENDIF
			NEXT
	;		�Ȃ���΁A�X�J�[�g��Y�{����\������
			IF ���ߏ� == 0
				FOR ��������, 6, 4, -1
					IF EQUIP:TARGET:��������
						IF CSTR:(50 + ��������) != "" && !CFLAG:�p�W���}
							�\�����e = %CSTR:(50 + ��������)%
						ELSE
							�\�����e = %CLOTHNAME(��������,EQUIP:��������)%
						ENDIF
						PRINTFORM %�\�����e%
						BREAK
					ENDIF
				NEXT
			ENDIF
			;�p���c�͂͂��Ă��Ȃ��������Ȃ��̂ŕ\�����Ȃ�
			;PRINT  �i�p���c�͂��ĂȂ��j
			IF PALAM:���� >= PALAMLV:5
				PRINT  �ڂ܂Ńr�V���r�V���ɔG��Ă���
			ELSEIF PALAM:���� >= PALAMLV:3
				PRINT  �p�������������ɂۂ�Ɛ��݂��o���Ă���
			ENDIF
			SIF �[�U��(TARGET,1) >= 30 || �[�U��(TARGET,2) >= 30
				PRINTFORM  ���o�����t�����ڂ�`���Đ��ꗎ���Ă���
		ELSEIF CFLAG:�m�[�p�� && TEQUIP:�����g���ߏ� != 0 && PREVCOM == 330
			���ߏ� = 0
			;�㒅���㉺�Ȃ��ɂȂ��Ă��镞�𒅂Ă���ꍇ�A�����\������
			FOR ��������, 17, 8, -1
				IF GROUPMATCH(��������, 15, 14)
					CONTINUE
				ENDIF
				IF EQUIP:TARGET:��������
					IF CSTR:(50 + ��������) != "" && !CFLAG:�p�W���}
						�\�����e = %CSTR:(50 + ��������)%
					ELSE
						�\�����e = %CLOTHNAME(��������,EQUIP:��������)%
					ENDIF
					PRINTFORM %�\�����e%
					���ߏ� ++
					BREAK
				ENDIF
			NEXT
			;�Ȃ���΁A�X�J�[�g��Y�{����\������
			IF ���ߏ� == 0
				FOR ��������, 6, 4, -1
					IF EQUIP:TARGET:��������
						IF CSTR:(50 + ��������) != "" && !CFLAG:�p�W���}
							�\�����e = %CSTR:(50 + ��������)%
						ELSE
							�\�����e = %CLOTHNAME(��������,EQUIP:��������)%
						ENDIF
						PRINTFORM %�\�����e%
						BREAK
					ENDIF
				NEXT
			ENDIF
			;�p���c�͂͂��Ă��Ȃ��������Ȃ��̂ŕ\�����Ȃ�
			;PRINT  �i�p���c�͂��ĂȂ��j
			IF �[�U��(TARGET,1) >= 30 || �[�U��(TARGET,2) >= 30
				PRINTFORM  ���o��\@TALENT:MASTER:�Z�����t ? �Ђ̂悤�Ȑ��t�����ڂɂւ΂�t���Ă��� # ���t�����ڂ�`���Đ��ꗎ���Ă���\@
			ENDIF
		;�����g���߂��Ȃ�
		ELSE
			PRINT  �͂���
			SIF TEQUIP:�N���L���b�v
				PRINT  �N���L���b�v���N���g���X�ɋz���t���Ă���
			SIF TEQUIP:�I�i�z�[��
				PRINT  �y�j�X�ɃI�i�z�[�����n�����Ă���
			IF !CFLAG:���ӂ�
				IF CFLAG:TARGET:�S���ː�
					IF CFLAG:TARGET:�A�i���ː� == 1
						PRINT  ������傩�琸�t������o�Ă���
					ELSEIF EX:�����r���`�F�b�N
						PRINT  ��􂩂�j�Z��������̐��t�����ӂ�o�Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINT  ��􂩂琸�t�ƈ��t�̍����荇�����`�����ӂ�o�Ă���
					ELSE
						PRINT  ��􂩂琸�t������o�Ă���
					ENDIF
				ELSEIF CFLAG:TARGET:�A�i���ː� == 1
					PRINT  ��傩�琸�t������o�Ă���
				ELSEIF PALAM:���� >= PALAMLV:2
					IF PALAM:���� >= PALAMLV:6
						PRINTFORM  ��􂩂爤�t\@ EX:�����r���`�F�b�N? �̍��������j�Z��# \@���H���Ă���
					ELSEIF EX:�����r���`�F�b�N
						PRINT  ��􂩂�j�Z��������Ă���
					ELSEIF PALAM:���� >= PALAMLV:4
						PRINT  �����������t���`���Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINT  ��􂪈��t�Ŏ����Ă���
					ENDIF
				ENDIF
			ELSEIF PALAM:���� >= PALAMLV:2 && !(CFLAG:TARGET:�S���ː� == 1 || TEQUIP:�u�Z�b�N�X == PLAYER || TEQUIP:�o�C�u)
				IF PALAM:���� >= PALAMLV:4
					PRINTFORM  ��􂩂爤�t\@ EX:�����r���`�F�b�N? �̍��������j�Z��# \@���H���Ă���
				ELSEIF EX:�����r���`�F�b�N
					PRINT  ��􂩂�j�Z��������Ă���
				ELSEIF PALAM:���� >= PALAMLV:3
					PRINTFORM  �����������t���`���Ă���
				ELSEIF PALAM:���� >= PALAMLV:2
					PRINTFORM  ��􂪈��t�Ŏ����Ă���
				ELSEIF TALENT:���� == 1
					PRINTFORM ���g�p�̂҂�����ƕ����������I��ɂȂ��Ă���
				ENDIF
			ENDIF
		ENDIF
		CALL LOOK_BELLY(TARGET)
	;�����g��������Ă���A���������t���Ă���
	ELSE
		���ߏ� = 0
		;�㉺�Ȃ��ɂȂ��Ă��镞�𒅂Ă���ꍇ�A�����\������
		FOR ��������, 17, 8, -1
			IF GROUPMATCH(��������, 15, 14)
				CONTINUE
			ENDIF
			IF EQUIP:TARGET:��������
				IF CSTR:(50 + ��������) != "" && !CFLAG:�p�W���}
					�\�����e = %CSTR:(50 + ��������)%
				ELSE
					�\�����e = %CLOTHNAME(��������,EQUIP:��������)%
				ENDIF
				PRINTFORM %�\�����e%
				���ߏ� ++
				BREAK
			ENDIF
		NEXT
		;�Ȃ���΁A�����g���߂�\������
		IF ���ߏ� == 0
			FOR ��������, 6, 4, -1
				IF EQUIP:TARGET:��������
					IF CSTR:(50 + ��������) != "" && !CFLAG:�p�W���}
						�\�����e = %CSTR:(50 + ��������)%
					ELSE
						�\�����e = %CLOTHNAME(��������,EQUIP:��������)%
					ENDIF
					PRINTFORM %�\�����e%
					BREAK
				ENDIF
			NEXT
		ENDIF
		IF !CFLAG:���ӂ�;  && PREVCOM != 330
			IF TEQUIP:�����g���ߏ� != 0
				IF PALAM:���� >= PALAMLV:5
					PRINT  �ڂ܂Ńr�V���r�V���ɔG��Ă���
				ELSEIF PALAM:���� >= PALAMLV:3
					PRINT  �p�������������ɂۂ�Ɛ��݂��o���Ă���
				ENDIF
			ELSEIF (EQUIP:�����g�����P || EQUIP:�����g�����Q) && CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 ||  PALAM:���� >= PALAMLV:2
				IF EQUIP:�����g�����Q
					IF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:3
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����Q)%�ɐ��݂��o���Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����Q)%�������Ă���
					ENDIF
				ELSEIF EQUIP:�����g�����P== 1 || EQUIP:�����g�����P== 4
					IF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:3
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�ɐ��݂��o���Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�������Ă���
					ENDIF
				ELSEIF EQUIP:�����g�����P== 2 || EQUIP:�����g�����P== 3
					IF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:5
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�������ꂩ�����Ă���
					ELSEIF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:3
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�ɐ��݂��o���Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�������Ă���
					ENDIF
				ELSEIF EQUIP:�����g�����P== 5 || EQUIP:�����g�����P== 6
					IF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:3
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�Ɏ����o���Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�������Ă���
					ENDIF
				ENDIF
			ENDIF
			;���l
			IF TALENT:TARGET:100 == -5
				LOCAL = 200
			;�c���̌^�A�����̌^
			ELSEIF TALENT:TARGET:100 < 0
				LOCAL = 300
			;���g�ȏ�
			ELSEIF TALENT:TARGET:100 >= 1
				LOCAL = 500
			;���ʑ̌^
			ELSE
				LOCAL = 400
			ENDIF
			SIF EX:TARGET:�S�����t > LOCAL || EX:TARGET:�A�i�������t > LOCAL
					PRINTFORM  ���o��\@TALENT:MASTER:�Z�����t ? �Ђ̂悤�Ȑ��t�����ڂɂւ΂�t���Ă��� # ���t�����ڂ�`���Đ��ꗎ���Ă���\@
		ELSEIF TEQUIP:�����g���ߏ� & 4
			IF PALAM:���� >= PALAMLV:5
				PRINT  �҉��̕������r�V���r�V���ɔG��Ă���
			ELSEIF PALAM:���� >= PALAMLV:3
				PRINT  �p�������������ɂۂ�Ɛ��݂��o���Ă���
			ENDIF
		ELSE
			PRINTFORM  ����グ���%HIP(TARGET)%���ی����ɂȂ��Ă���
			IF PALAM:���� >= PALAMLV:1 || CFLAG:TARGET:�A�i���ː� == 1 || CFLAG:TARGET:�S���ː� == 1 && !((CFLAG:TARGET:�A�i���ː� == 1 && CFLAG:TARGET:�S���ː� == 1) || TEQUIP:�u�Z�b�N�X == PLAYER || TEQUIP:�o�C�u || TEQUIP:�`�Z�b�N�X == PLAYER || TEQUIP:�A�i���o�C�u || TEQUIP:�A�i���r�[�Y || TEQUIP:���� || TEQUIP:�g���o���[�� || TEQUIP:�A�i���d��)
				;���ꉺ���g�����P���A���ŉ����g�����Q���i�V���Ƃǂ��Ȃ��ł�����
				;IF (EQUIP:�����g�����P || EQUIP:�����g�����Q)
				;�C�������݉��M;���Ă����ĂȂ�ł��������g�����P�����F����I����������܂���
				IF EQUIP:�����g�����Q
					IF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:3
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����Q)%�ɐ��݂��o���Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����Q)%�������Ă���
					ENDIF
				ELSEIF EQUIP:�����g�����P== 1 || EQUIP:�����g�����P== 4
					IF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:3
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�ɐ��݂��o���Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�������Ă���
					ENDIF
				ELSEIF EQUIP:�����g�����P== 2 || EQUIP:�����g�����P== 3
					IF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:5
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�������ꂩ�����Ă���
					ELSEIF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:3
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�ɐ��݂��o���Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�������Ă���
					ENDIF
				ELSEIF EQUIP:�����g�����P== 5 || EQUIP:�����g�����P== 6
					IF CFLAG:TARGET:�S���ː� == 1 || CFLAG:TARGET:�A�i���ː� == 1 || PALAM:���� >= PALAMLV:3
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�Ɏ����o���Ă���
					ELSEIF PALAM:���� >= PALAMLV:2
						PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����P)%�������Ă���
					ENDIF
				ENDIF
			ENDIF
			IF (EQUIP:�����g�����P || EQUIP:�����g�����Q)
				IF TEQUIP:�u�Z�b�N�X == PLAYER || TEQUIP:�o�C�u || TEQUIP:�`�Z�b�N�X == PLAYER || TEQUIP:�A�i���o�C�u || TEQUIP:�A�i���r�[�Y || TEQUIP:���� || TEQUIP:�g���o���[�� || TEQUIP:�A�i���d��
					PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����Q)%�����炳��Ă���
				ELSEIF CFLAG:TARGET:�A�i���ː� == 1 && CFLAG:TARGET:�S���ː� == 1 && !(TEQUIP:�u�Z�b�N�X == PLAYER || TEQUIP:�o�C�u || TEQUIP:�`�Z�b�N�X == PLAYER || TEQUIP:�A�i���o�C�u || TEQUIP:�A�i���r�[�Y || TEQUIP:���� || TEQUIP:�g���o���[�� || TEQUIP:�A�i���d��)
					PRINTFORM  %PANTSNAME(EQUIP:TARGET:�����g�����Q)%�ɑ傫�Ȑ��݂��o���Ă���
				ENDIF
			ENDIF
			IF CFLAG:TARGET:�S���ː� == 1 && PALAM:���� >= PALAMLV:1 && !(TEQUIP:�u�Z�b�N�X == PLAYER || TEQUIP:�o�C�u)  && (TEQUIP:�`�Z�b�N�X == PLAYER || TEQUIP:�A�i���o�C�u || TEQUIP:�A�i���r�[�Y || TEQUIP:���� || TEQUIP:�g���o���[�� || TEQUIP:�A�i���d��)
				PRINT  ��􂩂琸�t�ƈ��t�̍����荇�����`�����ӂ�o�Ă���
			ELSEIF CFLAG:TARGET:�S���ː� == 1 && !(TEQUIP:�u�Z�b�N�X == PLAYER || TEQUIP:�o�C�u || PALAM:���� >= PALAMLV:1) && (TEQUIP:�`�Z�b�N�X == PLAYER || TEQUIP:�A�i���o�C�u || TEQUIP:�A�i���r�[�Y || TEQUIP:���� || TEQUIP:�g���o���[�� || TEQUIP:�A�i���d��)
				PRINT  ��􂩂琸�t������o�Ă���
			ELSEIF CFLAG:TARGET:�A�i���ː� == 1 && !(TEQUIP:�`�Z�b�N�X == PLAYER || TEQUIP:�A�i���o�C�u || TEQUIP:�A�i���r�[�Y || TEQUIP:���� || TEQUIP:�g���o���[�� || TEQUIP:�A�i���d��) && (TEQUIP:�u�Z�b�N�X == PLAYER || TEQUIP:�o�C�u)
				PRINT  ��傩�琸�t������o�Ă���
			ENDIF
		ENDIF
		CALL LOOK_BELLY(TARGET)
	ENDIF

	IF (TCVAR:TARGET:V�}���Ǘ��t���O == PLAYER || TCVAR:TARGET:A�}���Ǘ��t���O == PLAYER) && TALENT:PLAYER:�`�� == 10
		PRINTL
		PRINT �}�����ꂽ�y�j�X�̌`�������ɕ����o�Ă���c
	ENDIF
	;================================
	SELECTCASE TEQUIP:TARGET:�̈�
		CASE 1
			�}���� = �����
		CASE 2
			�}���� = ��w��
		CASE 3
			�}���� = �R���
		CASE 4
			�}���� = �Ζʍ���
		CASE 5
			�}���� = �w�ʍ���
		CASE 6
			�}���� = �I�i�z�̂悤�Ȉ���
	ENDSELECT

	IF TEQUIP:TARGET:�u�Z�b�N�X == PLAYER || TEQUIP:�o�C�u
		PRINTL
		PRINT �y�S���z�@
		IF TCVAR:TARGET:V�}���Ǘ��t���O == PLAYER
			IF TCVAR:V�ɒ��o�����ꂽ�t���O
				PRINTFORM  %�}����%��\@ EX:�����r���`�F�b�N? �����S��# \@\@TALENT:MASTER:�Z�����t ?�Z���� # \@���t��{NOWEX:TARGET:�S�����t}�������܂�Ă���
			ELSEIF CFLAG:TARGET:�������� == 7
				PRINTFORM  %CALLNAME:MASTER%��%�}����%��\@ EX:�����r���`�F�b�N? �����S��# \@��t������Ă���
			ELSEIF SHIRAHU(TARGET) && TALENT:TARGET:����
				IF EX:�����r���`�F�b�N
					PRINTFORM  %CALLNAME:MASTER%��%�}����%�ŏ���������Ă���
				ELSE
					PRINTFORM  %CALLNAME:MASTER%��%�}����%�ň��������Ă���
				ENDIF
			ELSEIF CFLAG:���ӂ� == 2
				PRINTFORM  %CALLNAME:MASTER%��%�}����%��\@ EX:�����r���`�F�b�N? �����S��# \@�Ƃ���Ă���
			ELSE
				PRINTFORM  %CALLNAME:MASTER%��%�}����%��\@ EX:�����r���`�F�b�N? �����S��# \@�Ƃ���Ă���
			ENDIF
		ELSEIF TEQUIP:�o�C�u
			PRINT  �o�C�u���}������Ă���
		ENDIF
		SELECTCASE TEQUIP:�q�{
			CASE 1
 				SETCOLOR C_PINK
 					PRINT  �q�{���~��Ă���
 				RESETCOLOR
 				;���Z�b�g���Ȃ���Act_COM�s��[V]�܂Ńs���N�ɂȂ������ߒǉ�
			CASE 2
				FONTBOLD
 				SETCOLOR C_PINK
 					PRINT  �q�{���~��Ă���
 				RESETCOLOR
 				FONTREGULAR
		ENDSELECT
	ENDIF
	IF TEQUIP:TARGET:�`�Z�b�N�X == PLAYER || TEQUIP:�A�i���o�C�u || TEQUIP:�A�i���r�[�Y
		PRINTL
		PRINT �y�A�i���z
		IF TCVAR:TARGET:A�}���Ǘ��t���O == PLAYER
			IF TCVAR:A�ɒ��o�����ꂽ�t���O
				PRINTFORM  \@TALENT:MASTER:�Z�����t ?�Z���� # \@���t��{NOWEX:TARGET:�A�i�������t}�������܂�Ă���
			ELSEIF !FLAG:���Ԓ�~ && !CFLAG:���� && TALENT:TARGET:����
				PRINTFORM  %CALLNAME:MASTER%��%�}����%�ő}������Ă���
			ELSEIF CFLAG:���ӂ� == 2
				PRINTFORM  %CALLNAME:MASTER%��%�}����%�ŔƂ���Ă���
			ELSE
				PRINTFORM  %CALLNAME:MASTER%��%�}����%�ŔƂ���Ă���
			ENDIF
		ELSEIF TEQUIP:�A�i���o�C�u
			PRINT  �A�i���o�C�u���}������Ă���
		ELSEIF TEQUIP:�A�i���r�[�Y
			PRINT  �A�i���r�[�Y���}������Ă���
		ELSEIF TEQUIP:����
			PRINT  �v���O�ōǂ���Ă���
		ELSEIF TEQUIP:�g���o���[��
			PRINT  �o���[���Ŋg������Ă���
		ELSEIF TEQUIP:�A�i���d��
			PRINT  �d�ɂ��}������Ă���
		ENDIF
	ENDIF
	IF FLAG:AA�\�� && !FLAG:�摜�\��
		PRINTL �@
		CALL PRINT_AA(TARGET)
	ELSEIF FLAG:AA�\�� && FLAG:�摜�\��
		PRINTL �@
		CALL PRINT_TARGET_IMAGE(TARGET)
	ENDIF

	IF TEQUIP:PLAYER:�u�Z�b�N�X == TARGET || TEQUIP:PLAYER:�`�Z�b�N�X == TARGET
		SELECTCASE TEQUIP:MASTER:�̈�
			CASE 1
				�}����2 = ����ʂ�
			CASE 2
				�}����2 = ��w�ʂ�
			CASE 3
				�}����2 = �R��ʂ�
			CASE 4
				�}����2 = �Ζʍ��ʂ�
			CASE 5
				�}����2 = �w�ʍ��ʂ�
			CASE 6
				�}����2 = �I�i�z�̂悤�Ȉ�����
			CASEELSE
				�}����2 =
		ENDSELECT

		PRINTL
		PRINT �y�y�j�X�z
		IF TEQUIP:PLAYER:�u�Z�b�N�X == TARGET
			PRINTFORM %CALLNAME:PLAYER%���S����%�}����2%�}������Ă���
		ELSE
			PRINTFORM %CALLNAME:PLAYER%�̃A�i����%�}����2%�}������Ă���
		ENDIF
	ENDIF
ENDIF

;�g�̕��� 1=V, 2=A, 3=VA 4= �q�{
@�[�U��(�L�����o�^�ԍ�, �g�̕���)
#FUNCTION
#DIM �L�����o�^�ԍ�
#DIM �g�̕���
#DIM ���t��
#DIM �g�̗e��

VARSET ���t��

;�Y�����ʂ̐��t�ʂ̎擾
SELECTCASE �g�̕���
	CASE 1
		���t�� = EX:�L�����o�^�ԍ�:�S�����t
	CASE 2
		���t�� = EX:�L�����o�^�ԍ�:�A�i�������t
	CASE 3
		���t�� = EX:�L�����o�^�ԍ�:�S�����t + EX:�L�����o�^�ԍ�:�A�i�������t
	CASE 4
		���t�� = EX:�L�����o�^�ԍ�:�q�{�����t
ENDSELECT

;�Y�����ʂ̗e�ʂ��擾
SELECTCASE TALENT:�L�����o�^�ԍ�:�̌^
	CASE -5
		�g�̗e�� = 300
	CASE -4 TO -2
		�g�̗e�� = 600
	CASE -1
		�g�̗e�� = 1000
	CASE 0
		�g�̗e�� = 1200
	CASE IS > 0
		�g�̗e�� = 1500
ENDSELECT

;�q�{�Ȃ�Ηe�ʔ���
IF �g�̕��� == 4
	�g�̗e�� /= 2
ENDIF
RETURNF 100 * ���t�� / �g�̗e��

;���`��
@LOOK_BELLY(ARG)
IF CFLAG:ARG:�D�P�o�ߓ��� >= 80
		PRINT  �o�Y���T���������͂͂������΂��肾
ELSEIF CFLAG:ARG:�D�P�o�ߓ��� >= 60
		PRINT  �������h���������͑傫���c���ł���
ELSEIF CFLAG:ARG:�D�P�o�ߓ��� >= 40
		PRINT  �����̖c��݂��ڗ����Ă���
ELSEIF CFLAG:ARG:�D�P�o�ߓ��� >= 30
		PRINT  �������c��݂͂��߂�
ELSEIF �[�U��(ARG,3) >= 100
		PRINT  �����͐��t�ŔD�w�̂悤�ɖc���ł���
ENDIF


code:
@PRINT_STATE_JUEL(�I�𒆃L����ID)
#DIM �I�𒆃L����ID
#DIM �\�����ڐ�
PRINTL
PRINTL �� ��� ��---------------------------------------------------------------------------
�\�����ڐ� = 0
FOR LOCAL, 0, 22
	;PALAM.CSV�ɖ��̂��o�^����Ă��Ȃ���CONTINUE
	SIF !STRLENS(PALAMNAME:LOCAL)
		CONTINUE
	;1000,1000000,�P�ʂŋ�؂�
	LOCALS = {JUEL:�I�𒆃L����ID:LOCAL}
	SIF JUEL:�I�𒆃L����ID:LOCAL > 1000000
		LOCALS = {JUEL:�I�𒆃L����ID:LOCAL / 1000}k
	SIF JUEL:�I�𒆃L����ID:LOCAL > 1000000000
		LOCALS = {JUEL:�I�𒆃L����ID:LOCAL / 1000000}m
	PRINTFORM %PALAMNAME:LOCAL,6%�̎�:%LOCALS,7,LEFT%
	�\�����ڐ� += 1
	;���sor�\���ʒu����
	SIF �\�����ڐ� % 4 == 0
		PRINTL
NEXT
;�ے�̎�
LOCALS = {JUEL:�I�𒆃L����ID:100}
SIF JUEL:�I�𒆃L����ID:100 > 1000000
	LOCALS = {JUEL:�I�𒆃L����ID:100 / 1000}k
PRINTFORM %PALAMNAME:100,6%�̎�:%LOCALS,7,LEFT%

@PRINT_STATE_EX(�I�𒆃L����ID)
#DIM �I�𒆃L����ID
#DIM �\�����ڐ�

SIF EX:�I�𒆃L����ID:�b�Ⓒ + EX:�I�𒆃L����ID:�u�Ⓒ + EX:�I�𒆃L����ID:�`�Ⓒ + EX:�I�𒆃L����ID:�a�Ⓒ + EX:�I�𒆃L����ID:�l�Ⓒ + EX:�I�𒆃L����ID:���� + EX:�I�𒆃L����ID:�ː� == 0
	RETURN 0
�\�����ڐ� = 0
PRINTL
PRINTL �� �Ⓒ�� ��-----------------------------------------------------------------------
FOR LOCAL, 0, VARSIZE("EX")
	SIF !EX:�I�𒆃L����ID:LOCAL
		CONTINUE
	SIF !GROUPMATCH(EXNAME:LOCAL, "�b�Ⓒ", "�u�Ⓒ", "�`�Ⓒ", "�a�Ⓒ", "�l�Ⓒ", "����", "�ː�", "���A")
		CONTINUE
	PRINTFORM %EXNAME:LOCAL,12%:{EX:�I�𒆃L����ID:LOCAL,5,LEFT}
	�\�����ڐ� ++
	SIF �\�����ڐ� % 4 == 0
		PRINTL
NEXT

@PRINT_STATE_PERSONAL(�I�𒆃L����ID)
#DIM �I�𒆃L����ID

PRINTL
PRINTL �� �l��� ��-----------------------------------------------------------------------
PRINTL
IF �I�𒆃L����ID == MASTER
	IF CFLAG:MASTER:����
		PRINTFORML ����̏A�Q�����F%�����\��(CFLAG:MASTER:�A�Q���� - DAY * 1440)%
	ELSE
		PRINTFORML ����̏A�Q�����F%�����\��(CFLAG:MASTER:�A�Q���� + 1440 - DAY * 1440)%
	ENDIF
	PRINTFORML �N�������F%�����\��(TIME:3)%
	IF FLAG:�n��
		PRINTFORML
		CALL SHOW_NOUMIN
	ENDIF
ELSE
	PRINT �������ԑ�:
	SELECTCASE �I�𒆃L����ID
	CASE 1
		PRINTL 6�`13�� 14�`23��
	CASE 2
		PRINTL 5�`13�� 14�`24��
	CASE 3
		PRINTL 0�`10�� 17�`24��
	CASE 4
		PRINTL 0�`10�� 16�`24��
	CASE 5
		PRINTL 6�`24��
	CASE 6
		PRINTL 0�`2�� 8�`24��
	CASE 7
		PRINTL 0�`1�� 6�`13�� 14�`24��
	CASE 8
		PRINTL 0�`1�� 6�`13�� 14�`24��
	CASE 9
		PRINTL 0�`5�� 10�`13�� 14�`24��
	CASE 10
		PRINTL 0�`3�� 10�`24��
	CASEELSE
		IF CFLAG:�I�𒆃L����ID:�_�ЍݏZ || CFLAG:MASTER:���݈ʒu == OMANEKIBEYA()
			CALL �N�����ԕ\��(�I�𒆃L����ID)
		ELSE
			CALL �؍ݎ��ԕ\��(�I�𒆃L����ID)
		ENDIF
	ENDSELECT
	IF CFLAG:�I�𒆃L����ID:�悭�s���n�� >= 0
		PRINT �悭�s���n��F
		SELECTCASE CFLAG:�I�𒆃L����ID:�悭�s���n��
		CASE 0
			PRINTL ����_��
		CASE 1
			PRINTL ���@��
		CASE 2
			PRINTL �l�Ԃ̗�
		CASE 3
			PRINTL ���̌΁`�g����
		CASE 4
			PRINTL �����̒|��
		CASE 5
			PRINTL ���@�̐X
		CASE 6
			PRINTL �O�r�̐�`���E
		CASE 7
			PRINTL �d���̎R�i�R�[�j
		CASE 8
			PRINTL �d���̎R�i�R���j
		CASE 9
			PRINTL �n��
		ENDSELECT
	ENDIF
	IF CFLAG:�I�𒆃L����ID:����ʒu && !CFLAG:�I�𒆃L����ID:�_�ЍݏZ
		LOCAL = CFLAG:�I�𒆃L����ID:����ʒu / 10 + 6000
		PRINT ����ʒu�F
		PRINTFORML %STR:LOCAL%
	ELSEIF CFLAG:�I�𒆃L����ID:�_�ЍݏZ
		PRINT ����ʒu�F
		PRINTFORML %GET_MAPNAME(MAIN_MAP)%
	ENDIF
	PRINT �d�����F
	PRINTFORML %CSTR:�I�𒆃L����ID:1%
	PRINT �E��F
	PRINTFORML %CSVCSTR(�I�𒆃L����ID, 2)%
ENDIF

PRINT ���o�n�D:
SIF !CFLAG:�I�𒆃L����ID:332 & 1
	PRINT ����
SIF CFLAG:�I�𒆃L����ID:332 & 1
	PRINT �Z����
SIF CFLAG:�I�𒆃L����ID:332 & 2
	PRINT ����
SIF CFLAG:�I�𒆃L����ID:332 & 3
	PRINT �@�h���ϐ�
SIF CFLAG:�I�𒆃L����ID:332 & 4
	PRINT �@�Ö��ϐ�
SIF CFLAG:�I�𒆃L����ID:332 & 5
	PRINT �@�킳�ёϐ�
SIF CFLAG:�I�𒆃L����ID:332 & 6
	PRINT �@�_���ϐ�
PRINTL �@
PRINTL �@

IF CFLAG:�I�𒆃L����ID:�D���ȑ̈�
	PRINT ��_�F
	SELECTCASE CFLAG:�I�𒆃L����ID:�D���ȑ̈�
	CASE 1
		PRINTL �����
	CASE 2
		PRINTL ��w��
	CASE 3
		PRINTL �R���
	CASE 4
		PRINTL �Ζʍ���
	CASE 5
		PRINTL �w�ʍ���
	CASE 6
		PRINTL ����ʃA�i��
	CASE 7
		PRINTL ��w�ʃA�i��
	CASE 8
		PRINTL �R��ʃA�i��
	CASE 9
		PRINTL �Ζʍ��ʃA�i��
	CASE 10
		PRINTL �w�ʍ��ʃA�i��
	ENDSELECT
	PRINTL �@
ENDIF

PRINTL �@
IF �I�𒆃L����ID == RANDOM_CHARANUM
	;����A���G�Ȏ푰����Ȃǂ͖�����
	PRINTL �� �L�����Љ� ��---------------------------------------------------------------------
	PRINTL
	PRINTFORML �`���u���`�@���푰�F�l�ԁ@���\�́F%CSTR:RANDOM_CHARANUM:15%
ELSEIF CSVCSTR(�I�𒆃L����ID, 10) != ""
	PRINTL �� �L�����Љ� ��---------------------------------------------------------------------
	PRINTL
	;�L�����Љ������̓W�J�ɂ���ĉ��ς������ꍇ�u@CHARA_INFO_KOJO_KX�v���g�p����
	TRYCALLFORM CHARA_INFO_KOJO_K{�I�𒆃L����ID}
	IF !RESULT
		FOR LOCAL,10,20
			SIF CSVCSTR(�I�𒆃L����ID, LOCAL) != ""
				PRINTFORML %CSVCSTR(�I�𒆃L����ID, LOCAL,)%
		NEXT
	ENDIF
ENDIF
IF �I�𒆃L����ID == MASTER && FLAG:�b�㐫��
	PRINTFORML �b�㐫�Ȃ���
	PRINTFORML
ENDIF

IF CFLAG:�I�𒆃L����ID:�����p��
	SIF GETBIT (CFLAG:�I�𒆃L����ID:�����p��, 0)
		PRINTL �ȑO�̎���ŗ���ɂȂ������Ƃ�����
	SIF GETBIT (CFLAG:�I�𒆃L����ID:�����p��, 1)
		PRINTL �ȑO�̎���ŗ��l�ɂȂ������Ƃ�����
ENDIF
SIF CFLAG:�I�𒆃L����ID:��������
	PRINTFORML �������t���������o��%CALLNAME:MASTER%�Ɨ����ɂȂ���
SIF CFLAG:�I�𒆃L����ID:�������� & ����_�L�X
	PRINTFORML %CALLNAME:MASTER%�ɐO�������Ă���
SIF CFLAG:�I�𒆃L����ID:�������� & ����_���ӂ�
	PRINTFORML %CALLNAME:MASTER%�ɑ̂������Ă���
SIF TALENT:�I�𒆃L����ID:���� && TALENT:�I�𒆃L����ID:�����}��
	PRINTFORML �ꉞ���������A���߂���ΊȒP�ɑ̂��J�����낤

IF TALENT:�I�𒆃L����ID:����
	IF TALENT:�I�𒆃L����ID:���m
		PRINTFORML %CALLNAME:�I�𒆃L����ID%��%CALLNAME:MASTER%�̂��ł���ɂȂ�Ɩ����Ɍ��߂Ă���
	ELSEIF !CFLAG:�I�𒆃L����ID:�������� & ����_���ӂ�
		IF TALENT:�I�𒆃L����ID:�呀 > 0
			PRINTFORML ���̊֌W�Ȃǂӂ�����Ȏ��ƍl���Ă���ɂ��ւ�炸�A%CALLNAME:�I�𒆃L����ID%�͐S�̉���ł�%CALLNAME:MASTER%�ƌ���肽���Ǝv���Ă���
		ELSE
			PRINTFORML %CALLNAME:MASTER%�������Ɏ�����Ȃ����Ƃɉ՗����ƕs���������Ă���
		ENDIF
	ENDIF
ENDIF

IF CFLAG:�I�𒆃L����ID:�o�����^�C��
	SELECTCASE CFLAG:�I�𒆃L����ID:�o�����^�C�� % 100
		CASE 1
			LOCALS = �u���b�N�T���_�[
		CASE 2
			LOCALS = ���ʂ̃`���R
		CASE 3
			LOCALS = �����`���R
		CASE 4
			LOCALS = ����`���R
	ENDSELECT
	PRINTFORML �o�����^�C����%LOCALS%�����ꂽ\@ CFLAG:�I�𒆃L����ID:�o�����^�C�� > 100? �i�ԗ�ρj# \@
ENDIF
@�؍ݎ��ԕ\��(�I�𒆃L����ID)
#DIM �I�𒆃L����ID

IF CFLAG:�I�𒆃L����ID:���K���� < CFLAG:�I�𒆃L����ID:�A���
	PRINTFORML {CFLAG:�I�𒆃L����ID:���K���� / 60}���`{CFLAG:�I�𒆃L����ID:�A��� / 60}��
ELSE
	PRINTFORML 0���`{CFLAG:�I�𒆃L����ID:�A��� / 60}�� {CFLAG:�I�𒆃L����ID:���K���� / 60}���`24��
ENDIF

@�N�����ԕ\��(�I�𒆃L����ID)
#DIM �I�𒆃L����ID

IF CFLAG:�I�𒆃L����ID:�N������ < CFLAG:�I�𒆃L����ID:�A�Q����
	PRINTFORML {CFLAG:�I�𒆃L����ID:�N������ / 60}���`{CFLAG:�I�𒆃L����ID:�A�Q���� / 60}��
ELSE
	PRINTFORML 0���`{CFLAG:�I�𒆃L����ID:�A�Q���� / 60}�� {CFLAG:�I�𒆃L����ID:�N������ / 60}���`24��
ENDIF

@���̏��(�I�𒆃L����ID)
#DIM �I�𒆃L����ID
VARSET LOCALS
VARSET LOCAL
PRINTL
PRINTL �� ���̏�� ��-----------------------------------------------------------------------
PRINTL
PRINTL �y���z�@
SIF GETBIT (CFLAG:�I�𒆃L����ID:�����p��, 6)
	PRINTFORML �ǂ�����Ί�����̂�%CALLNAME:MASTER%�ɒm��s������Ă���
IF !EXP:�I�𒆃L����ID:�L�X�o��
	PRINTL �܂��N�ɂ��O�������Ă��Ȃ�
ELSEIF CFLAG:�I�𒆃L����ID:�t�@�[�X�g�L�X�r���L�O��
	PRINTFORM {CFLAG:�I�𒆃L����ID:�t�@�[�X�g�L�X�r���L�O��}���ځA
	SIF CSTR:�I�𒆃L����ID:�t�@�[�X�g�L�X�ʒu != ""
		PRINTFORM %CSTR:�I�𒆃L����ID:�t�@�[�X�g�L�X�ʒu%��
	PRINTFORM %CALLNAME:(CFLAG:�I�𒆃L����ID:�t�@�[�X�g�L�X�r������)%��
	IF CFLAG:�I�𒆃L����ID:�t�@�[�X�g�L�X�r���Ώ� & (�r��_������ | �r��_���� | �r��_�v��)
		PRINTFORML �t�@�[�X�g�L�X�������
	ELSE
		SIF CFLAG:�I�𒆃L����ID:�t�@�[�X�g�L�X�r���Ώ� & �r��_�Ȃ�����
			PRINTFORML �Ȃ������I��
		PRINTFORML �t�@�[�X�g�L�X��D��ꂽ
	ENDIF
ENDIF
SIF EXP:�I�𒆃L����ID:�L�X�o��
	PRINTFORML ���܂�{EXP:�I�𒆃L����ID:�L�X�o��}��̌��Â����o������
SIF CFLAG:�I�𒆃L����ID:�݌v����
	PRINTFORML ���܂�{CFLAG:�I�𒆃L����ID:�݌v����}�̐��t�����݊�����
IF EXP:�I�𒆃L����ID:�����o�� > 150 && ABL:�I�𒆃L����ID:���t���� >= 5
	PRINTFORML ���t�𖡂키�Ɛg�̂��u���Ă��܂�
ELSEIF ABL:�I�𒆃L����ID:���t���� >= 3
	PRINTFORML ���t���R�Ȃ����ނ��Ƃ��o����
ENDIF
IF �I�𒆃L����ID == MASTER
	IF ABL:�I�𒆃L����ID:�� >= 5
		PRINTFORML ��z������Z�ŏ����𗸂ɂ���
	ELSEIF ABL:�I�𒆃L����ID:�� >= 3
		PRINTFORML �I�݂Ȑ�g���ŏ������x�΂���
	ENDIF
ENDIF
PRINTL
PRINTL �y���z
SELECTCASE ABL:�I�𒆃L����ID:�a���o
	CASE IS >= 10
		PRINT ���x���Q�@
	CASE IS >= 5
		PRINT ���x�ǍD�@
ENDSELECT
SIF GETBIT (CFLAG:�I�𒆃L����ID:�����p��, 5)
	PRINTFORML �ǂ�����Ί�����̂�%CALLNAME:MASTER%�ɒm��s������Ă���
SIF CFLAG:�I�𒆃L����ID:�݌v�Ԃ�����
	PRINTFORML ���܂�{CFLAG:�I�𒆃L����ID:�݌v�Ԃ�����}�̐��t�ɂ܂݂ꂽ�@
IF TALENT:�I�𒆃L����ID:����̎�
	;PRINTFORML \@ ABL:�I�𒆃L����ID:�������� >= 3 ? �Â݂̂���~���N�������Ղ�Ƌl�܂��Ă���# �h�����Ă��ΊÂ݂̂���~���N�����݂������낤\@
	PRINTFORML �h�����Ă��ΊÂ݂̂���~���N�����݂������낤
ENDIF
SELECTCASE ABL:�I�𒆃L����ID:��
	CASE IS >= 5
	CASE IS >= 3
ENDSELECT
PRINTL

PRINTL �y�w�z
SELECTCASE ABL:�I�𒆃L����ID:�w
	CASE IS >= 5
		PRINT ����@
	CASE IS >= 3
		PRINT �B�l�@
ENDSELECT
IF �I�𒆃L����ID == MASTER
	IF ABL:�I�𒆃L����ID:�w >= 5
		PRINTFORML ���Ȃ₩�Ȏw�ł̈����͂����܂������𓠂������Ă��܂�
	ELSEIF ABL:�I�𒆃L����ID:�w >= 3
		PRINTFORML �I�݂Ȏw�ق��ŏ������x�΂���
	ENDIF
ENDIF
PRINTL
PRINTL �y�A�i���z
	IF CFLAG:�I�𒆃L����ID:�A�i�������r���L�O�� > 0
		PRINTFORM {CFLAG:�I�𒆃L����ID:�A�i�������r���L�O��}���ځA
		SIF CSTR:�I�𒆃L����ID:�`�����r���ʒu != ""
			PRINTFORM %CSTR:�I�𒆃L����ID:�`�����r���ʒu%��
		SIF CFLAG:�I�𒆃L����ID:�A�i�������r���Ώ� & �r��_���Ԓ�~
			PRINT ���Ԓ�~����
		IF GETBIT (CFLAG:�I�𒆃L����ID:�A�i�������r���Ώ�,3)
			PRINTFORM %CALLNAME:(CFLAG:�I�𒆃L����ID:�A�i�������r������)%�Ƀy�j�X�o���h��
		ELSEIF GETBIT (CFLAG:�I�𒆃L����ID:�A�i�������r���Ώ�,2)
			PRINTFORM %CALLNAME:(CFLAG:�I�𒆃L����ID:�A�i�������r������)%�ɃA�i���o�C�u��
		ELSEIF GETBIT (CFLAG:�I�𒆃L����ID:�A�i�������r���Ώ�,1)
			PRINTFORM %CALLNAME:(CFLAG:�I�𒆃L����ID:�A�i�������r������)%�̃y�j�X��
		ENDIF
		IF CFLAG:�I�𒆃L����ID:�A�i�������r���Ώ� & �r��_���Ԓ�~
			PRINTFORML �K��������D��ꂽ
		ELSE
			PRINTFORML �K�������������
		ENDIF
	ENDIF
SELECTCASE ABL:�I�𒆃L����ID:�`���o
	CASE IS >= 10
		PRINT ���x���Q�@
	CASE IS >= 5
		PRINT ���x�ǍD�@
ENDSELECT
SIF GETBIT (CFLAG:�I�𒆃L����ID:�����p��, 4)
	PRINTFORML �ǂ�����Ί�����̂�%CALLNAME:MASTER%�ɒm��s������Ă���
IF �I�𒆃L����ID
	SELECTCASE �}���s��(�I�𒆃L����ID)
		CASE 3
			PRINTFORML �ƂĂ�%CALLNAME:MASTER%�̃y�j�X���󂯓������悤�ȃT�C�Y�ł͂Ȃ�
			LOCAL:6 ++
		CASE 2
			IF EXP:�I�𒆃L����ID:�`�o�� < 50 && TALENT:MASTER:�֒f�̒m��
				PRINTFORML ���������ق����Ȃ���%CALLNAME:MASTER%�̃y�j�X�͓���Ȃ����낤
				LOCAL:6 ++
			ELSEIF !TALENT:MASTER:�֒f�̒m��
				PRINTFORML %CALLNAME:MASTER%�̃y�j�X��}������͍̂����낤
				LOCAL:6 ++
			ENDIF
		CASE 1
			IF EXP:�I�𒆃L����ID:�`�o�� < 50 || !TALENT:MASTER:�֒f�̒m��
				PRINTFORML ���������ق����Ȃ���%CALLNAME:MASTER%�̃y�j�X�͓���Ȃ����낤
				LOCAL:6 ++
			ENDIF
		CASE -1
			IF ABL:�I�𒆃L����ID:�A�i�� < 2
				PRINTFORML %CALLNAME:MASTER%�̃y�j�X�ł��X�T�C�Y������Ȃ�
				LOCAL:6 ++
			ENDIF
		CASE -2
			IF ABL:�I�𒆃L����ID:�A�i�� < 3
				PRINTFORML �傫�߂��ē���Ă����܂�C�����悭�Ȃ��������c
				LOCAL:6 ++
			ENDIF
	ENDSELECT
	SELECTCASE ABL:�I�𒆃L����ID:�A�i��
		CASE IS >= 5
			PRINTL �ɏ㖼��
			PRINTFORML ���S��%CALLNAME:MASTER%�̃J�^�`�ɍ��ւ���ꂽ�A�i���͓��q�_��忂����ė��݂��Ă���
		CASE IS >= 3
			PRINTL ����
			PRINTFORML �g�����񂾍b�゠���đ�ϋ�̂������ɂȂ���
		CASE 2
			PRINTFORML %CALLNAME:MASTER%���󂯓���邱�ƂɊ��ꂫ���Ă���
		CASE 1
			PRINTL �ق���n�߂ċ���ǂ��Ȃ��Ă���
		CASE 0
			IF !CFLAG:�I�𒆃L����ID:�A�i�������r���L�O��
				PRINTL ���J��
			ELSEIF EXP:�I�𒆃L����ID:�`�o�� < 20
					PRINTL �܂��ٕ����󂯓���邱�ƂɊ���Ă��Ȃ�
			ENDIF
	ENDSELECT
ENDIF
SIF CFLAG:�I�𒆃L����ID:�݌v�A�i�����t
	PRINTFORML ���܂�{CFLAG:�I�𒆃L����ID:�݌v�A�i�����t}�̐��t�𒍂����܂ꂽ

SELECTCASE ABL:�I�𒆃L����ID:��˒���
	CASE IS >= 7
		PRINTFORML �A�i�����ː������Ƒ��K����������
	CASE IS >= 3
		PRINTFORML �A�i�����ː������ƒ������u���Ă��܂�
ENDSELECT

SIF ABL:�I�𒆃L����ID:�`���o >= 5 && CFLAG:�I�𒆃L����ID:���܂��Ă�x > 300 && �I�𒆃L����ID
	PRINTFORML %CALLNAME:MASTER%�ɕ����ꂽ���Ă����������Ă���

IF �[�U��(�I�𒆃L����ID,2) >= 100
	PRINTFORML �����d�݂�������قǂ̗ʂ̐��t�Ŋ��S�ɖ�������Ă���
ELSEIF �[�U��(�I�𒆃L����ID,2) >= 50
	PRINTFORML �����Ś삵�����̐��q��忂��Ă���
ELSEIF �[�U��(�I�𒆃L����ID,2) >= 20
	PRINTFORML �����Ő��q�����C�ɉj������Ă���
ENDIF

PRINTL
IF TALENT:�I�𒆃L����ID:2 & 1
	PRINTL �y�S�z
	IF CFLAG:�I�𒆃L����ID:�����r���L�O��
		PRINTFORM {CFLAG:�I�𒆃L����ID:�����r���L�O��}���ځA
		SIF CSTR:�I�𒆃L����ID:�����r���ʒu != ""
			PRINTFORM %CSTR:�I�𒆃L����ID:�����r���ʒu%��
		SIF CFLAG:�I�𒆃L����ID:�����r���Ώ� & �r��_���Ԓ�~
			PRINT ���Ԓ�~����
		SIF GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�,9)
			PRINT �����Ԃ�Ă���Ƃ�
		SIF GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�,16)
			PRINT �����Ă���Ԃ�

		IF GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�,3)
			PRINTFORM %CALLNAME:(CFLAG:�I�𒆃L����ID:�����r������)%�Ƀy�j�X�o���h��
		ELSEIF GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�,2)
			PRINTFORM %CALLNAME:(CFLAG:�I�𒆃L����ID:�����r������)%�Ƀo�C�u��
		ELSEIF GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�,1)
			SIF CFLAG:�I�𒆃L����ID:�����r���Ώ� & �r��_����
				PRINT ������
			PRINTFORM %CALLNAME:(CFLAG:�I�𒆃L����ID:�����r������)%��\@ GROUPMATCH(TALENT:MASTER:�`��,5,6)? ������# \@�y�j�X��
		ENDIF

		SIF CFLAG:�I�𒆃L����ID:�����r���Ώ� & �r��_�Ȃ�����
			PRINTFORML �Ȃ������I��
		;�����r���Ώۂ����炩�v��ł���A���A�D���ł�������ł������ł��Ȃ��������ł̏ꍇ
		IF (GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�, 11) || GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�, 12)) && ((!GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�,9) && !GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�,13) && !GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�,16)) || GETBIT (CFLAG:�I�𒆃L����ID:�����r���Ώ�,14))
			PRINTFORML �����������
		ELSE
			SIF CFLAG:�I�𒆃L����ID:�����r���Ώ� & �r��_�����
				PRINT �͂�����
			IF �I�𒆃L����ID == MASTER
				PRINTFORML ������^����
			ELSE
				PRINTFORML ������D��ꂽ
			ENDIF
		ENDIF
	ENDIF

	SELECTCASE ABL:�I�𒆃L����ID:�u���o
		CASE IS >= 10
			PRINT ���x���Q�@
		CASE IS >= 5
			PRINT ���x�ǍD�@
	ENDSELECT
	IF �I�𒆃L����ID
		SELECTCASE �}���s��(�I�𒆃L����ID)
			CASE 3
				PRINTFORML �ƂĂ�%CALLNAME:MASTER%�̃y�j�X���󂯓������悤�ȃT�C�Y�ł͂Ȃ�
				LOCAL:5 ++
			CASE 2
				IF EXP:�I�𒆃L����ID:�u�o�� < 50 && TALENT:MASTER:�֒f�̒m��
					PRINTFORML ���������ق����Ȃ���%CALLNAME:MASTER%�̃y�j�X�͓���Ȃ����낤
					LOCAL:5 ++
				ELSEIF !TALENT:MASTER:�֒f�̒m��
					PRINTFORML %CALLNAME:MASTER%�̃y�j�X��}������͍̂����낤
					LOCAL:5 ++
				ENDIF
			CASE 1
				IF EXP:�I�𒆃L����ID:�u�o�� < 50 || !TALENT:MASTER:�֒f�̒m��
					PRINTFORML ���������ق����Ȃ���%CALLNAME:MASTER%�̃y�j�X�͓���Ȃ����낤
					LOCAL:5 ++
				ENDIF
			CASE -1
				IF ABL:�I�𒆃L����ID:�S < 2
					PRINTFORML %CALLNAME:MASTER%�̃y�j�X�ł��X�T�C�Y������Ȃ�
					LOCAL:5 ++
				ENDIF
			CASE -2
				IF ABL:�I�𒆃L����ID:�S < 3
					PRINTFORML �傫�߂��ē���Ă����܂�C�����悭�Ȃ��������c
					LOCAL:5 ++
				ENDIF
		ENDSELECT

		IF TALENT:�I�𒆃L����ID:���� == 1
			PRINTFORML �܂��N��l�Ƃ��Ď󂯓��ꂽ���Ƃ��Ȃ�\@ ABL:�I�𒆃L����ID:�u���o >= 5 ? �ɂ�������炸�A�h����^������Ηe�Ղ��Ⓒ����قǈ���ɊJ������Ă���# \@
		ELSEIF TALENT:�I�𒆃L����ID:���� == -1
			PRINTFORML ���łɏ�����D���Ă��邱�ƂɋC�t���Ă��Ȃ�
		ENDIF
		SIF ABL:�I�𒆃L����ID:�u���o >= 5 && CFLAG:�I�𒆃L����ID:���܂��Ă�x > 300 && �I�𒆃L����ID
			PRINTFORML %CALLNAME:MASTER%�ɕ����ꂽ���Ă����������Ă���
		IF !LOCAL:5
			SELECTCASE ABL:�I�𒆃L����ID:�S
				CASE IS >= 5
					PRINTL �ɏ㖼��
					PRINTFORML ���S��%CALLNAME:MASTER%�̃J�^�`�ɍ��ւ���ꂽ�S���͓��q�_��忂����ė��݂��Ă���
				CASE IS >= 3
					PRINTL ����
					IF TALENT:�I�𒆃L����ID:���� == -1
						PRINTFORML �m��ʊԂ�%CALLNAME:MASTER%���C�����悭�����邽�߂̌��ɍ��ς����Ă��܂���
					ELSE
						PRINTFORML �g�����񂾍b�゠���đ�ϋ�̂������ɂȂ���
					ENDIF
				CASE 2
					PRINTFORML %CALLNAME:MASTER%���󂯓���邱�ƂɊ��ꂫ���Ă���
				CASE 1
					PRINTL �ق���n�߂ċ���ǂ��Ȃ��Ă���
				CASE 0
					;IF EXP:�I�𒆃L����ID:�u�o��
					IF TALENT:�I�𒆃L����ID:���� == 1
						PRINTL ����m��Ȃ����g�p���S
					ELSEIF EXP:�I�𒆃L����ID:�u�o�� < 10
						PRINTL ����m���l�̊K�i�����鋰��o��n�߂��΂�����S�͋��������݂��Ă���
					ELSEIF EXP:�I�𒆃L����ID:�u�o�� < 20
						PRINTL ���g�p�ɋ߂��S�͂܂��d�����c���Ă���
					ENDIF
			ENDSELECT
		ENDIF
	ENDIF

	SIF CFLAG:�I�𒆃L����ID:�݌v�S�����t
		PRINTFORML ���܂�{CFLAG:�I�𒆃L����ID:�݌v�S�����t}�̐��t�𒍂����܂ꂽ
	SELECTCASE ABL:�I�𒆃L����ID:�S�˒���
		CASE IS >= 7
			PRINTFORML �S���ː������Ƒ��K����������
		CASE IS >= 3
			PRINTFORML �S���ː������Ǝq�{���u���Ă��܂�
	ENDSELECT
	SIF CFLAG:�I�𒆃L����ID:������S��
		PRINTFORML %CALLNAME:MASTER%�ɖ�������o�����ꂽ���Ƃ�����
	SIF CFLAG:�I�𒆃L����ID:������ == 1
		PRINTFORML %CALLNAME:MASTER%�ɖ����Ă���ԂɃC�^�Y�����ꂽ���Ƃ�����
	SIF CFLAG:�I�𒆃L����ID:������ == 2
		PRINTFORML %CALLNAME:MASTER%�ɖ����Ă���ԂɔƂ��ꂽ���Ƃ�����
	IF CFLAG:�I�𒆃L����ID:�D���� == 2
		PRINTFORML %CALLNAME:MASTER%�ɐ����Ԃ�Ă���Ƃ����Ƃ��ꂽ���Ƃ�����
	ELSEIF CFLAG:�I�𒆃L����ID:�D���� == 1
		PRINTFORML %CALLNAME:MASTER%�ɐ����Ԃ�Ă���Ƃ����Ƃ��ꂽ���Ƃ����邪�C�Â��Ă��Ȃ�
	ENDIF

	IF �[�U��(�I�𒆃L����ID,1) >= 100
		PRINTFORML �S����%CALLNAME:MASTER%�̐��t�Ŋ��S�ɖ�������Ă���
	ELSEIF �[�U��(�I�𒆃L����ID,1) >= 50
		PRINTFORML �S���Ś삵�����̐��q��忂��Ă���
	ELSEIF �[�U��(�I�𒆃L����ID,1) >= 20
		PRINTFORML �S���Ő��q�����C�ɉj������Ă���
	ELSEIF CFLAG:�I�𒆃L����ID:�������� == 7 && FLAG:������������ && �D�P��(�I�𒆃L����ID)
		PRINTFORML �댯���̎q�{�͐��X�������q��p�ӂ��Ď󐸂�҂��Ă���
	ENDIF
	;PRINTFORML {EX:�I�𒆃L����ID:�q�{�����t}
	IF TALENT:�I�𒆃L����ID:�D�P
		IF CFLAG:�I�𒆃L����ID:�D�P�o�ߓ��� < 20
			PRINTFORML �������~�܂��Ă���
		ELSE
			PRINTFORML �q�{���ł�%CALLNAME:MASTER%�Ƃ̎q�������������ƈ���Ă���
			PRINTFORML ���ݔD�P{CFLAG:�I�𒆃L����ID:�D�P�o�ߓ���}���ڂ�
			CALL LOOK_BELLY(�I�𒆃L����ID)
			SIF INRANGE(CFLAG:�I�𒆃L����ID:�D�P�o�ߓ���,20,29)
					PRINT �܂������ڂɕω��͌����Ȃ�
		ENDIF
	ENDIF
ENDIF
PRINTL
SIF �I�𒆃L����ID == MASTER
	CALL ����՗�(MASTER)

@����՗�(�I�𒆃L����ID)
#DIM �I�𒆃L����ID
#DIM �b���ʂ̑���
#DIM �b���ʂ̗�
#DIM �b���ʂ̎��
SIF !GETBIT(TALENT:�I�𒆃L����ID:2, 1)
	RETURN
PRINTL �y�j����z
SELECTCASE TALENT:�I�𒆃L����ID:�`��
CASE 1
	LOCALS = �q���̂悤�ȉ��炵��
CASE 2
	LOCALS = �n����
CASE 3
	LOCALS = ���̕ϓN���Ȃ�
CASE 4
	LOCALS = ��������
CASE 5
	LOCALS = �C�{���炯��
CASE 6
	LOCALS = �����
ENDSELECT
PRINTFORM %CALLNAME:�I�𒆃L����ID%��%LOCALS%�y�j�X�́A
LOCAL:1 = SUMCARRAY(CFLAG:LOCAL:�݌v����,       1, CHARANUM)
LOCAL:2 = SUMCARRAY(CFLAG:LOCAL:�݌v�Ԃ�����,   1, CHARANUM)
LOCAL:3 = SUMCARRAY(CFLAG:LOCAL:�݌v�S�����t,   1, CHARANUM)
LOCAL:4 = SUMCARRAY(CFLAG:LOCAL:�݌v�A�i�����t, 1, CHARANUM)
IF !TALENT:PLAYER:1
	PRINTFORML ���g�p��
ELSE
	SIF FLAG:������
		PRINTFORML ���܂ł�{FLAG:������}�l�̏������U�炵�A
	PRINTFORML ���������̌�����{LOCAL:1}�A���̂�{LOCAL:2}�A�S����{LOCAL:3}�A�A�i����{LOCAL:4}�̐��t��f���o���Ă���
	;�e�ː��V�`���̍ő�l����
	;�������Ƃ���ʂɏo�����V�`���̌���
	;�������Ƃ���ʂɏo��������̌���
	LOCAL:1 = MAXCARRAY(CFLAG:LOCAL:�݌v����,       1, CHARANUM)
	LOCAL:2 = MAXCARRAY(CFLAG:LOCAL:�݌v�Ԃ�����,   1, CHARANUM)
	LOCAL:3 = MAXCARRAY(CFLAG:LOCAL:�݌v�S�����t,   1, CHARANUM)
	LOCAL:4 = MAXCARRAY(CFLAG:LOCAL:�݌v�A�i�����t, 1, CHARANUM)
	�b���ʂ̗� = 0
	FOR LOCAL:0, 1, 5
		SIF �b���ʂ̗� > LOCAL:(LOCAL:0)
			CONTINUE
		�b���ʂ̎�� = LOCAL:0
		�b���ʂ̗�   = LOCAL:(LOCAL:0)
	NEXT
	SELECTCASE �b���ʂ̎��
	CASE 1
		�b���ʂ̑��� = FINDCHARA(CFLAG:LOCAL:�݌v����,       LOCAL:1, 1, CHARANUM)
		LOCALS = ����
	CASE 2
		�b���ʂ̑��� = FINDCHARA(CFLAG:LOCAL:�݌v�Ԃ�����,   LOCAL:2, 1, CHARANUM)
		LOCALS = ����
	CASE 3
		�b���ʂ̑��� = FINDCHARA(CFLAG:LOCAL:�݌v�S�����t,   LOCAL:3, 1, CHARANUM)
		LOCALS = �S��
	CASE 4
		�b���ʂ̑��� = FINDCHARA(CFLAG:LOCAL:�݌v�A�i�����t, LOCAL:4, 1, CHARANUM)
		LOCALS = �A�i��
	ENDSELECT
	PRINTFORML ����%CALLNAME:�b���ʂ̑���%��%LOCALS%�����C�ɓ��肾
ENDIF
SIF FLAG:�s������s�܂���
	PRINTFORML �s������ɛs�܂������F{FLAG:�s������s�܂���}�l
SIF TALENT:MASTER:�ޏ��s�܂�
	PRINTL �ޏ���s�܂�����������ȃy�j�X��
SIF TALENT:MASTER:�d���s�܂�
	PRINTL �d����s�܂����ƍߓI�ȃy�j�X��
SIF TALENT:MASTER:�d���s�܂�
	PRINTL �d����s�܂�������m�炸�̃y�j�X��
SIF TALENT:MASTER:�V��s�܂�
	PRINTL �V���s�܂����_���̃y�j�X��
SIF TALENT:MASTER:�S�s�܂�
	PRINTL �S��s�܂����S�����Ђ����y�j�X��
SIF TALENT:MASTER:�t�r�_�s�܂�
	PRINTL �t�r�_��s�܂����ߑ��̂Ȃ��y�j�X��
SIF TALENT:MASTER:�_��s�܂�
	PRINTL �_���s�܂����_��������ʃy�j�X��
SIF TALENT:MASTER:�H���s�܂�
	PRINTL �H���l����s�܂������𒴂���y�j�X��
SIF TALENT:MASTER:���\�s�܂�
	PRINTL �@�B���낤���H�삾�낤�������Ȃ鏭���ł��s�܂���l�q�𒴂����y�j�X��
SIF TALENT:MASTER:�Z�����t
	PRINTFORML ���������̐��𗭂ߍ��񂾃y�j�X�͂ނ��Ԃ�悤�ȗY�̏L��������Ă���
SIF BASE:�I�𒆃L����ID:���� >= 1500
	PRINTL ��������Əd���A�X�ɂ͑�ʂ̐��q���~�����Ă���

@�D�P�֘A(ARG)
PRINTL
PRINTL �� �D�P�֘A ��-----------------------------------------------------------------------
;PRINTL
;PRINTFORM �O��̓��ː��� : {EX:ARG:14}
;PRINTL
PRINTFORM �D�P��o�ߎ���: {CFLAG:ARG:903}
;CFLAG:ARG:903 = 40
;PRINTL
;PRINTFORM ���o : {CFLAG:(ARG):910}
;PRINTL
;PRINTFORM �����o�D�P : {CFLAG:ARG:�����o�D�P}
PRINTL
PRINTFORM ���݈玙���q���� : {CFLAG:ARG:�玙�l��}
PRINTL
PRINTFORM ���݈玙�o�ߎ��� : {CFLAG:ARG:908}
PRINTFORML
PRINTFORM �@�@�@�@�q���̐� : {CFLAG:ARG:�q���l��}
PRINTFORML
IF CFLAG:ARG:�q���l��
	FOR LOCAL,1,11
		IF CHILDNAME:ARG:LOCAL != ""
			PRINTFORM ��{LOCAL}�q�F%CHILDNAME:ARG:LOCAL, 15, LEFT%�@\@ CHILD_SEX:ARG:LOCAL == 1 ? �� # �� \@
			CALL PRINT_DATE(CHILD_BIRTHDAY:ARG:LOCAL)
			PRINTFORM ({CHILD_BIRTHDAY:ARG:LOCAL}����)
			SELECTCASE CHILD_WEATHER:ARG:LOCAL
			CASE "�b�q��"
				PRINTFORM �݂�Ȃ̃N���g���X���q����
			CASE "�u�q��"
				PRINTFORM �݂�Ȃ̏����킪�q����
			CASE "�`�q��"
				PRINTFORM �݂�Ȃ���傪�q����
			CASE "�a�q��"
				PRINTFORM �݂�Ȃ̋����q����
			CASE "�l�q��"
				PRINTFORM �݂�Ȃ̐O���q����
			CASE "�X�J�[�g"
				PRINTFORM �X�J�[�g���߂����ē��ɂ���ƋC�����悭�Ȃ�
			CASE "�p���c"
				PRINTFORM �p���c����ь���
			CASEELSE
				PRINTFORM %CHILD_WEATHER:ARG:LOCAL%��
			ENDSELECT
			PRINTFORM ���ɐ��܂ꂽ�@
			IF DAY - CHILD_BIRTHDAY:ARG:LOCAL < 120
				IF CFLAG:ARG:�o�Y�o�ߓ� < CHILD_��b
					PRINTFORML �c����
				ELSEIF CFLAG:ARG:�o�Y�o�ߓ� < CHILD_�����O
					PRINTFORML �c����
				ELSE
					PRINTFORML �v�t��
				ENDIF
			ELSE
				PRINTFORML ����{(DAY - CHILD_BIRTHDAY:ARG:LOCAL) / 124}��
			ENDIF
		ENDIF
	NEXT
ENDIF

@�\��
#DIM �˗��ԍ�

PRINTL �� �\�� ��---------------------------------------------------------------------------
PRINTL
SELECTCASE FLAG:����
	CASE 1
		LOCALS = �I�i�j�[����
	CASE 2
		LOCALS = ���������i
	CASE 3
		LOCALS = �Č��J��
	CASE 4
		LOCALS = �K���J��
	CASE 5
		LOCALS = �����U��
	CASE 6
		LOCALS = �q���ɉh
ENDSELECT
IF FLAG:����
	PRINTFORML ���N�̕���: %LOCALS%
	PRINTL
ENDIF
IF FLAG:����J�Ãt���O
	IF FLAG:�J�n�� - DAY <= 0
		PRINT �{��
	ELSE
		PRINTFORM {FLAG:�J�n�� - DAY}����
	ENDIF
	CALL ����\��\��
	PRINTL
	PRINT ����K�́F
		SELECTCASE FLAG:����K��
			CASE IS >= 5000
				PRINT ����
			CASE IS >= 2500
				PRINT ��
			CASE IS >= 1500
				PRINT ��
			CASEELSE
				PRINT ��
		ENDSELECT

	SIF FLAG:36 > 0
		PRINTL �@�J�V���~
ENDIF
PRINTL
IF FLAG:�ݖ{�ԋp���� >= 2
	FOR LOCAL,1,5
		SIF ITEM:(100 + LOCAL)
			PRINTFORML �؂�Ă���{�F%ITEMNAME:(100 + LOCAL)%
	NEXT
	PRINTL
	IF  FLAG:�ݖ{�ԋp���� == 2
		PRINTFORML �ݖ{�̕ԋp���F�{��
	ELSE
		PRINTFORML �ݖ{�̕ԋp���F{FLAG:�ݖ{�ԋp���� - 2}����
	ENDIF
PRINTL
ENDIF

CALL SHOW_ALL_IRAI_SLOT

SELECTCASE CFLAG:MASTER:����
	CASE 4
		PRINT ���Ƃňꕨ��傫����
		IF CFLAG:MASTER:���͉�� == 6
			PRINTL �Ă���
		ELSE
			PRINTL ��
		ENDIF
		SIF CFLAG:MASTER:���͉�� < 6
			PRINTFORML ���͉�����ς܂ł���{CFLAG:MASTER:���͉��}��
	CASE 5
		PRINT ���Ƃňꕨ���{�ɂ�
		IF CFLAG:MASTER:���͉�� == 6
			PRINTL �Ă���
		ELSE
			PRINTL ��
		ENDIF
		SIF CFLAG:MASTER:���͉�� < 6
			PRINTFORML ���͉�����ς܂ł���{CFLAG:MASTER:���͉��}��
	CASE 6
		PRINT ���Ƃŏ��l�ɂȂ�
		IF CFLAG:MASTER:���͉�� == 3
			PRINTL �Ă���
		ELSE
			PRINTL ��
		ENDIF
		SIF CFLAG:MASTER:���͉�� < 3
			PRINTFORML ���͉�����ς܂ł���{CFLAG:MASTER:���͉��}��
	CASE 7
		PRINTL ���Ƃŏ��l���猳�ɖ߂���
		SIF CFLAG:MASTER:���͉�� < 3
			PRINTFORML ���͉�����ς܂ł���{CFLAG:MASTER:���͉��}��
ENDSELECT
SIF CFLAG:MASTER:����
	PRINTL

@�p���c���W��(�I�𒆃L����ID)
#DIM �I�𒆃L����ID
PRINTL �� �p���c���W�� ��-----------------------------------------------------------------
CALL DISPLAY_COLLECTION(�I�𒆃L����ID)
PRINTFORML �����F{RESULT:0,4}���@�@��ʁF{RESULT:1,2}��@�@�_�u��F{RESULT:0 - RESULT:1,4}��

repo_name: akadiya/eratw

license: unknown


code:
@SOURCE_CHECK
#DIM �L�X�}�[�N����
#DIM �~���s���x�㏸
#DIM �o��������
#DIM �̈ʕۑ�
#DIM �u�Z�b�N�X�ۑ�
#DIM ���ŕ␳
VARSET LOCAL
SELECTCOM = TFLAG:3
���ŕ␳ = 0

;����SELECTCOM�̎��Ԍo��
CALL TRACHECK_TIME

;-------------------------------------------------
;�g�̐ڐG�̌p���A����
;-------------------------------------------------
CALL TOUCH_SUCCESSION(TARGET)

;-------------------------------------------------
;TRYCALLFORM TOUCH_SUCCESSION_{SELECTCOM}(TARGET)
;TOUCH_SUCCESSION�ōs���Ă��鏈�����e�R�}���h�t�@�C���ɕ��U�����邱�ƂŁA�R�}���h�ǉ���e�Ղɂ�����
;-------------------------------------------------

IF !�J�E���^�[�s���R�}���h(SELECTCOM)
	;�J�E���^�[
	FOR LOCAL, 1, GET_TARGETNUM() + 1
		SIF TARGET:LOCAL <= 0
			CONTINUE
		CALL EVENT_COUNTER(TARGET:LOCAL,LOCAL)
		CALL EVENT_COUNTER_SOURCE(TARGET:LOCAL,LOCAL)
	NEXT
	;CALL EVENT_COUNTER_COMBINATION
ENDIF
FOR LOCAL,0,CHARANUM
	SIF CFLAG:LOCAL:���݈ʒu != CFLAG:MASTER:���݈ʒu
		CONTINUE
	;�����t���O�̐ݒ�
	IF TEQUIP:LOCAL:�u�ڐG���� == 1
		TEQUIP:LOCAL:50 = MASTER
	ELSE
		TEQUIP:LOCAL:50 = -1
	ENDIF
	IF TEQUIP:LOCAL:�`�ڐG���� == 1
		TEQUIP:LOCAL:51 = MASTER
	ELSE
		TEQUIP:LOCAL:51 = -1
	ENDIF
	IF TEQUIP:LOCAL:�o�ڐG���� == 6
		TEQUIP:PLAYER:50 = LOCAL
	ELSE
		TEQUIP:PLAYER:50 = -1
	ENDIF
	IF TEQUIP:LOCAL:�o�ڐG���� == 7
		TEQUIP:PLAYER:51 = LOCAL
	ELSE
		TEQUIP:PLAYER:51 = -1
	ENDIF
NEXT

FOR LOCAL,0,CHARANUM
	SIF CFLAG:LOCAL:���݈ʒu != CFLAG:MASTER:���݈ʒu
		CONTINUE
	;�o�������ĂȂ��Ȃ�̈ʃ��Z�b�g
	IF TEQUIP:LOCAL:50 < 0 && TEQUIP:LOCAL:51 < 0
		TEQUIP:LOCAL:�̈� = 0
	;�u���𒆂��O��u�����Ȃ�TEQUIP�͕��A
	ELSEIF TEQUIP:LOCAL:50 >= 0 && TEQUIP:LOCAL:116
		TEQUIP:LOCAL:106 = TEQUIP:LOCAL:116
	;�`���𒆂��O��`�����Ȃ�TEQUIP�͕��A
	ELSEIF TEQUIP:LOCAL:51 >= 0 && TEQUIP:LOCAL:117
		TEQUIP:LOCAL:107 = TEQUIP:LOCAL:117
	ENDIF
	;���łɖu�N�x�̕ۑ�
	CFLAG:LOCAL:�u�N�x = BASE:LOCAL:�u�N
NEXT
;-------------------------------------------------
;@COM�̌Ăяo��
;-------------------------------------------------
;TARGET���Ƃ�COMF�ďo
CALL CALL_COM(TARGET)

�̈ʕۑ� = TEQUIP:�̈�
�u�Z�b�N�X�ۑ� = TEQUIP:�u�Z�b�N�X

LOCAL:100 = RESULT
;RESULT���|1�Ȃ�L�����Z������
SIF LOCAL:100 < 0
	RETURN 0
;RESULT��0�Ȃ�SOURCE�v�ZSKIP
SIF !LOCAL:100
	GOTO SOURCE_SKIP

FOR LOCAL,0,CHARANUM
	�L�X�}�[�N���� = 0
	SIF CFLAG:LOCAL:���݈ʒu == SUKIMA()
		CONTINUE
	;���[�^�[�}��
	IF CFLAG:LOCAL:���[�^�[�}��
		SOURCE:LOCAL:���u += TIME_PROGRESS(TIME:1) * 10
		CFLAG:LOCAL:���[�^�[�}�� = MAX(CFLAG:LOCAL:���[�^�[�}�� - TIME_PROGRESS(TIME:1),0)
		IF CFLAG:LOCAL:���[�^�[�}�� == 0
			PRINTFORMW %CALLNAME:LOCAL%���������Ă������[�^�[�̓d�r���؂ꂽ
			IF TALENT:LOCAL:���� < 1
				EXP:LOCAL:�u�o�� += 9
			ELSE
				TFLAG:2 = 1
			ENDIF
		ENDIF
	ENDIF
	IF CFLAG:LOCAL:���[�^�[A�}��
		SOURCE:LOCAL:���` += TIME_PROGRESS(TIME:1) * 10
		CFLAG:LOCAL:���[�^�[A�}�� = MAX(CFLAG:LOCAL:���[�^�[A�}�� - TIME_PROGRESS(TIME:1),0)
		IF CFLAG:LOCAL:���[�^�[A�}�� == 0
			PRINTFORMW %CALLNAME:LOCAL%���������Ă������[�^�[�̓d�r���؂ꂽ
			EXP:LOCAL:�`�o�� += 9
		ENDIF
	ENDIF
	IF TFLAG:�L�X�}�[�N && LOCAL > 0 && !TFLAG:��� && !FLAG:70 && !CFLAG:LOCAL:����
		IF CFLAG:LOCAL:���݈ʒu == CFLAG:MASTER:���݈ʒu && TFLAG:�L�X�}�[�N != LOCAL
			PRINTFORMW %CALLNAME:LOCAL%��%CALLNAME:MASTER%�̃L�X�}�[�N������߂��c
			IF TALENT:LOCAL:����
				�L�X�}�[�N���� = 500
			ELSEIF TALENT:LOCAL:�v��
				�L�X�}�[�N���� = 300
			ENDIF
			�L�X�}�[�N���� = �L�X�}�[�N���� * (TALENT:LOCAL:�呀 + 2) / 2
			SOURCE:LOCAL:���� += �L�X�}�[�N����
		ENDIF
	ENDIF
;�͂��ĂȂ��ƘI�o������
	SIF EQUIP:LOCAL:6 == 0 && !TALENT:LOCAL:����
		SOURCE:LOCAL:�I�o += TIME_PROGRESS(TIME:1)

	SIF TEQUIP:LOCAL:����z��
		CALL EQUIP_COM11(LOCAL)
	SIF TEQUIP:LOCAL:������
		CALL EQUIP_COM12(LOCAL)
	SIF TEQUIP:LOCAL:�p���L�X
		CALL EQUIP_COM19(LOCAL)
	;�����n�͌�ōl����
	SIF LOCAL > 0 && !CFLAG:LOCAL:����
		CONTINUE
	;-------------------------------------------------
	;��l�A�����A�����҂̔\�͂̏���
	;-------------------------------------------------
	CALL SOURCE_SEX_CHECK(LOCAL)
	CALL PLAYER_SKILL_CHECK(LOCAL)

	;-------------------------------------------------
	;�Z�I�A�D���x�A���[�h�A�����̃`�F�b�N
	;-------------------------------------------------
	FOR LOCAL:1,0,100
		SOURCE:LOCAL:(LOCAL:1) = SOURCE:LOCAL:(LOCAL:1) *  MASTER_FAVOR_CHECK(LOCAL,LOCAL:1) * TECHNIQUE_CHECK(LOCAL,LOCAL:1) / 10000
		SOURCE:LOCAL:(LOCAL:1) = SOURCE:LOCAL:(LOCAL:1) *  MOOD_CHECK(LOCAL,LOCAL:1) * REASON_CHECK(LOCAL,LOCAL:1) / 10000
	NEXT

	;-------------------------------------------------
	;���ŏ[���̃`�F�b�N
	;-------------------------------------------------
	;���Ԓ���
	IF EXP_UP(22,LOCAL)
		FOR LOCAL:1,0,100
			;����,���s��,�~��,����,�I�o,���]
			SIF (LOCAL:1 >= 0 && LOCAL:1 <= 9) || LOCAL:1 == 11 || (LOCAL:1 >= 15 && LOCAL:1 <= 18)
				SOURCE:LOCAL:(LOCAL:1) = SOURCE:LOCAL:(LOCAL:1) * (100 + GET_REVISION(ABL:LOCAL:���Ԓ���, 500, 15)) / 100
		NEXT
	ENDIF
	;-------------------------------------------------
	;�o�C�u�ȂǕt�����ςȂ��A�C�e���̃`�F�b�N
	;-------------------------------------------------
	CALL EQUIP_CHECK(LOCAL)
	;-------------------------------------------------
	;�o�����Z
	;-------------------------------------------------
	CALL SOURCE_EXP(LOCAL)
	;-------------------------------------------------
	;����,����r���̏���
	;-------------------------------------------------
	CALL LOST_VIRGIN(LOCAL)
	;-------------------------------------------------
	;���b�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���b(LOCAL)
	;-------------------------------------------------
	;���u�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���u(LOCAL)
	;-------------------------------------------------
	;���`�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���`(LOCAL)
	;-------------------------------------------------
	;���a�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���a(LOCAL)
	;-------------------------------------------------
	;-------------------------------------------------
	;���l�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���l(LOCAL)
	;-------------------------------------------------
	;�^���b�̃\�[�X
	;-------------------------------------------------
	SIF !(TALENT:PLAYER:2 & 2)
	CALL SOURCE_�^���b(LOCAL)
	;-------------------------------------------------
	;�^���u�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�^���u(LOCAL)
	;-------------------------------------------------
	;�^���`�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�^���`(LOCAL)
	;-------------------------------------------------
	;�^���a�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�^���a(LOCAL)
	;-------------------------------------------------
	;�^���l�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�^���l(LOCAL)
	;-------------------------------------------------
NEXT
CALL ����L�X���o���r��
;-------------------------------------------------
;�����R�}���h�̘A�����s�ɂ��㉺�̏����i���y�n�j
;-------------------------------------------------
IF SELECTCOM == PREVCOM && TFLAG:50 == TFLAG:151 && (SELECTCOM < 350 || SELECTCOM >= 500) && �A�����s()
	;UP:0,1,2,3�͐Ⓒ�ɗ��ނ̂Ő�ɏ������Ă���
	CUP:TARGET:���b /= 2
	CUP:TARGET:���u /= 2
	CUP:TARGET:���` /= 2
	CUP:TARGET:���a /= 2
	CUP:TARGET:���l /= 2
ENDIF
IF TCVAR:TARGET:�����
	TIMES CUP:TARGET:���b, 0.75
	TIMES CUP:TARGET:���u, 0.75
	TIMES CUP:TARGET:���`, 0.75
	TIMES CUP:TARGET:���a, 0.75
	TIMES CUP:TARGET:���l, 0.75
ENDIF
IF TEQUIP:TARGET:�ł炵���[�h
	TIMES CUP:TARGET:���b, 0.80
	TIMES CUP:TARGET:���u, 0.80
	TIMES CUP:TARGET:���`, 0.80
	TIMES CUP:TARGET:���a, 0.80
	TIMES CUP:TARGET:���l, 0.80
ENDIF
IF TCVAR:TARGET:�D��
	TIMES CUP:TARGET:���b, 0.70
	TIMES CUP:TARGET:���u, 0.70
	TIMES CUP:TARGET:���`, 0.70
	TIMES CUP:TARGET:���a, 0.70
	TIMES CUP:TARGET:���l, 0.70
ENDIF

FOR LOCAL,0,CHARANUM
	;�����n�͌�ōl����
	SIF LOCAL > 0 && !CFLAG:LOCAL:����
		CONTINUE
	;���̑��n�\�[�X�v�Z����
	CALL SOURCE_CVAB_EXTRA(LOCAL)

	BASE:LOCAL:�u�N = BASE:LOCAL:�u�N + CUP:LOCAL:���b / 5 + CUP:LOCAL:���u / 10 + CUP:LOCAL:���` / 10 + CUP:LOCAL:���a / 10
	;-------------------------------------------------
	;�Ⓒ����
	;-------------------------------------------------
	CALL ORGASM_ADD(LOCAL)
NEXT

;-------------------------------------------------
;�ː��`�F�b�N�i�ӂ��Ȃ�E�I�g�R�j
;-------------------------------------------------
;�v����
CALL EVENT_SHOOT

FOR LOCAL,0,CHARANUM
	SIF CFLAG:LOCAL:���݈ʒu == SUKIMA()
		CONTINUE
	;�����n�͌�ōl����
	SIF LOCAL > 0 && !CFLAG:LOCAL:����
		CONTINUE
	;-------------------------------------------------
	;�����Ώۂ̕����`�F�b�N
	;-------------------------------------------------
	CALL TARGET_MILK_CHECK(LOCAL)
	;-------------------------------------------------
	;���ŏ[���`�F�b�N
	;-------------------------------------------------
	;���t����,�S�˒���,��˒���
	IF FLAG:70 == 1 && CFLAG:TARGET:344 == 0
	ELSE
		IF EXP_UP(14,LOCAL)
			IF TALENT:MASTER:�Z�����t == 1
				���ŕ␳ = 100 + GET_REVISION(ABL:LOCAL:���t���� * EXP_UP(14,LOCAL), 500, 25)
			ELSE
				���ŕ␳ = 100 + GET_REVISION(ABL:LOCAL:���t���� * EXP_UP(14,LOCAL), 500, 50)
			ENDIF
			SOURCE:LOCAL:� = SOURCE:LOCAL:� * ���ŕ␳ / 100
			SOURCE:LOCAL:���s�� = SOURCE:LOCAL:���s�� * ���ŕ␳ / 100
			SOURCE:LOCAL:�B�� = SOURCE:LOCAL:�B�� * ���ŕ␳ / 100
			SOURCE:LOCAL:�~�� = SOURCE:LOCAL:�~�� * ���ŕ␳ / 100
			SOURCE:LOCAL:���� = SOURCE:LOCAL:���� * ���ŕ␳ / 100
			SOURCE:LOCAL:���] = SOURCE:LOCAL:���] * ���ŕ␳ / 100
		ENDIF
		IF EXP_UP(17,LOCAL)
			IF TALENT:MASTER:�Z�����t == 1
				���ŕ␳ = 100 + GET_REVISION(ABL:LOCAL:��˒��� * EXP_UP(17,LOCAL), 500, 25)
			ELSE
				���ŕ␳ = 100 + GET_REVISION(ABL:LOCAL:��˒��� * EXP_UP(17,LOCAL), 500, 50)
			ENDIF
			SIF TALENT:LOCAL:������ && TEQUIP:LOCAL:�̈� == 2
				���ŕ␳ = ���ŕ␳ * 11 / 10
			SOURCE:LOCAL:� = SOURCE:LOCAL:� * ���ŕ␳ / 100
			SOURCE:LOCAL:���s�� = SOURCE:LOCAL:���s�� * ���ŕ␳ / 100
			SOURCE:LOCAL:�B�� = SOURCE:LOCAL:�B�� * ���ŕ␳ / 100
			SOURCE:LOCAL:�~�� = SOURCE:LOCAL:�~�� * ���ŕ␳ / 100
			SOURCE:LOCAL:���� = SOURCE:LOCAL:���� * ���ŕ␳ / 100
			SOURCE:LOCAL:���] = SOURCE:LOCAL:���] * ���ŕ␳ / 100
		ENDIF
		IF EXP_UP(16,LOCAL)
			IF TALENT:MASTER:�Z�����t == 1
				���ŕ␳ = 100 + GET_REVISION(ABL:LOCAL:�S�˒��� * EXP_UP(16,LOCAL), 500, 25)
			ELSE
				���ŕ␳ = 100 + GET_REVISION(ABL:LOCAL:�S�˒��� * EXP_UP(16,LOCAL), 500, 50)
			ENDIF
			SIF TALENT:LOCAL:������ && TEQUIP:LOCAL:�̈� == 2
				���ŕ␳ = ���ŕ␳ * 11 / 10
			SIF CFLAG:LOCAL:�������� == 7
				���ŕ␳ = ���ŕ␳ * 12 / 10
			SOURCE:LOCAL:� = SOURCE:LOCAL:� * ���ŕ␳ / 100
			SOURCE:LOCAL:���s�� = SOURCE:LOCAL:���s�� * ���ŕ␳ / 100
			SOURCE:LOCAL:�B�� = SOURCE:LOCAL:�B�� * ���ŕ␳ / 100
			SOURCE:LOCAL:�~�� = SOURCE:LOCAL:�~�� * ���ŕ␳ / 100
			SOURCE:LOCAL:���� = SOURCE:LOCAL:���� * ���ŕ␳ / 100
			SOURCE:LOCAL:���] = SOURCE:LOCAL:���] * ���ŕ␳ / 100
		ENDIF
	ENDIF
	;-------------------------------------------------
	;��������̕��A�O����
	;-------------------------------------------------
	CALL DRUNK_RECOVER_BEFORE(TARGET)
	;-------------------------------------------------
	;��̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�(LOCAL)
	;-------------------------------------------------
	;���s���̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���s��(LOCAL)
	;-------------------------------------------------
	;�B���̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�B��(LOCAL)
	;-------------------------------------------------
	;�ɂ݂̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���(LOCAL)
	;-------------------------------------------------
	;����̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���|(LOCAL)
	;-------------------------------------------------
	;�t�̂̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�t��(LOCAL)
	;-------------------------------------------------
	;�~��̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�~��(LOCAL)
	;-------------------------------------------------
	;�����̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_����(LOCAL)
	;-------------------------------------------------
	;�I�o�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�I�o(LOCAL)
	;-------------------------------------------------
	;���]�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���](LOCAL)

	;-------------------------------------------------
	;���y�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���y(LOCAL)
	;-------------------------------------------------
	;�����̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_����(LOCAL)
	;-------------------------------------------------
	;�󓮂̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_��(LOCAL)
	;-------------------------------------------------
	;�U�f�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�U�f(LOCAL)
	;-------------------------------------------------
	;�J�߂̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�J��(LOCAL)
	;-------------------------------------------------
	;�����̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_����(LOCAL)
	;-------------------------------------------------
	;��d�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_��d(LOCAL)
	;-------------------------------------------------
	;���v�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���v(LOCAL)
	;-------------------------------------------------
	;���s�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_���s(LOCAL)

	;-------------------------------------------------
	;�s���̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�s��(LOCAL)
	;-------------------------------------------------
	;�T���̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_�T��(LOCAL)
	;-------------------------------------------------
	;��E�̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_��E(LOCAL)
	;-------------------------------------------------
	;�����̃\�[�X
	;-------------------------------------------------
	CALL SOURCE_����(LOCAL)
	;-------------------------------------------------
	;�f���Ȃǂɂ��㉺�̏���
	;-------------------------------------------------
	CALL SOURCE_EXTRA(LOCAL)
	;-------------------------------------------------
	;�����[�x�̌�������
	;-------------------------------------------------
	CALL �����[�x����(LOCAL)
NEXT
;-------------------------------------------------
;�����R�}���h�̘A�����s�ɂ��㉺�̏���
;-------------------------------------------------
IF SELECTCOM == PREVCOM && TFLAG:50 == TFLAG:151 && (SELECTCOM < 350 || SELECTCOM >= 500) && �A�����s()
	;UP:0,1,2�͐Ⓒ�ɗ��ނ̂Ő�ɏ������Ă���
	UP:�~�� /= 2
	UP:���� /= 2
	UP:���� /= 2
	UP:�K�� /= 2
	UP:�p�� /= 2
	UP:���| /= 2
	UP:��� /= 2
	UP:�D�� /= 2
	UP:�D�z /= 2
ENDIF

LOCAL:1 = 0
FOR LOCAL,0,CHARANUM
	SIF CFLAG:LOCAL:���݈ʒu == SUKIMA()
		CONTINUE
	LOCAL:1 += CUP:LOCAL:�~�� / 5
	LOCAL:1 += MAX(5,(ABL:LOCAL:�}�]���C - 3)) * (CUP:LOCAL:��� + CUP:LOCAL:���) / 2
	LOCAL:1 += MAX(5,(ABL:LOCAL:�}�]���C - 1)) * CUP:LOCAL:�p�� / 2
	LOCAL:1 = MIN(500,LOCAL:1)
	BASE:LOCAL:�u�N = BASE:LOCAL:�u�N + LOCAL:1
	;�����n�͌�ōl����
	SIF LOCAL > 0 && !CFLAG:LOCAL:����
		CONTINUE
	;-------------------------------------------------
	;�̗́E�C�͂̌���
	;-------------------------------------------------
	CALL SOURCE_DOWNBASE(LOCAL)
	;-------------------------------------------------
	;��ɉ��y�o���A��d���y�o���̃`�F�b�N
	;-------------------------------------------------
	CALL EXP_GOT_CHECK(LOCAL)
NEXT

$SOURCE_SKIP
;-------------------------------------------------
;��������
;-------------------------------------------------
;CALL KOJO_MESSAGE_COM
CALL KOJO_MESSAGE_SEND("COMMAND",-1,TARGET,-1,-1)
;�}�G�@���ʌn�@�S������̎ː����A�̈ʂ��Ȃ��Ȃ�̂͂ǂ����Ă�
IF �u�Z�b�N�X�ۑ� != -1 && GROUPMATCH(�̈ʕۑ�,1,2,3,4,5) && !FLAG:�}���A�j���t�B���^ & �A�j���t�B���^_�}��
	SIF FLAG:�摜�\�� && FLAG:�}�G�\��
		PRINTL
	SELECTCASE �̈ʕۑ�
		CASE 1,3,4
			CALL PRINT_IMAGE_ANIMATION_�����("�����_�}��")
		CASE 2,5
			CALL PRINT_IMAGE_ANIMATION_��w��("��w��_�}��")
	ENDSELECT
ENDIF

;�J�E���^�[
IF TARGET
	LOCAL:4 = TARGET
	DRAWLINE
	FOR LOCAL, 1, GET_TARGETNUM() + 1
		SIF TCVAR:(TARGET:LOCAL):30 > 1
			CONTINUE
		SIF TCVAR:(TARGET:LOCAL):20 && TFLAG:193 != 99 && !CFLAG:TARGET:�Y���Q��
			CALL KOJO_MESSAGE_SEND("COUNTER",2,TARGET:LOCAL,0,0)
	NEXT
	TARGET = LOCAL:4
ENDIF

;-------------------------------------------------
;��������̕��A����
;-------------------------------------------------
CALL DRUNK_RECOVER(TARGET)

;-------------------------------------------------
;EXP�擾�\��
;-------------------------------------------------
LOCAL:2 = 0
LOCAL:3 = 0
FOR LOCAL,0,CHARANUM
	SIF CFLAG:LOCAL:���݈ʒu != CFLAG:MASTER:���݈ʒu
		CONTINUE
	SIF TCVAR:LOCAL:�\���J�b�g
		CONTINUE
	FOR LOCAL:1,0,100
		IF EXP_UP(LOCAL:1,LOCAL)
			�o�������� = EXP_UP(LOCAL:1,LOCAL)
			LOCAL:2 ++
			LOCAL:3 ++
			SIF LOCAL:2 == 1
				PRINTL
			IF LOCAL:1 == FLAG:���� && FLAG:���� && LOCAL == MASTER
				EXP:MASTER:(LOCAL:1) ++
				�o�������� ++
			ENDIF
			PRINTFORML %EXPNAME:(LOCAL:1)% +{�o��������}(%CALLNAME:LOCAL%)
			;���Ȃ��͖����o�o���𓾂Ȃ��悤��
			IF LOCAL:1 >= 0 && LOCAL:1 <= 3 && LOCAL && (FLAG:70 || CFLAG:�C�^�Y��)
				EXP:LOCAL:((LOCAL:1) + 60) += 1
			ENDIF
		ENDIF
	NEXT
	LOCAL:2 = 0
NEXT
SIF LOCAL:3
	WAIT
;-------------------------------------------------
;ABLUP
;-------------------------------------------------
IF !FLAG:ABLUP�ȗ�
	FOR LOCAL,0,CHARANUM
		SIF CFLAG:LOCAL:���݈ʒu != CFLAG:MASTER:���݈ʒu
			CONTINUE
		SIF TCVAR:LOCAL:�\���J�b�g
			CONTINUE
		CALL SOURCE_ABLUP(LOCAL)
	NEXT
ENDIF
;-------------------------------------------------
;�G��̎ː����̌���
;-------------------------------------------------
;DEBUG	CALL KOJO_MESSAGE_PALAMCNG_E
CALL KOJO_MESSAGE_SEND("PALAM",5,TARGET,-1,-1)
;-------------------------------------------------
;�z��̐Ⓒ���̌���
;-------------------------------------------------
CALL MESSAGE_PALAMCNG_B2
CALL KOJO_MESSAGE_SEND("PALAM",2,TARGET,-1,-1)
;�}�G�@�}���ɐⒸ
IF NOWEX:�u�Ⓒ && �u�Z�b�N�X�ۑ� != -1 && GROUPMATCH(�̈ʕۑ�,1,2,3,4,5)
	IF !GETBIT(TCVAR:50,1)
		SELECTCASE �̈ʕۑ�
			CASE 1,3,4
				CALL PRINT_IMAGE_ANIMATION_�����("�����_�Ⓒ")
			CASE 2,5
				CALL PRINT_IMAGE_ANIMATION_��w��("��w��_�Ⓒ")
		ENDSELECT
	ENDIF
ENDIF
;DEBUG	CALL KOJO_MESSAGE_PALAMCNG_B

;-------------------------------------------------
;�z��̏ł炵���̌���
;-------------------------------------------------
IF (EX:TARGET:�b���~�� + EX:TARGET:�u���~�� + EX:TARGET:�`���~�� + EX:TARGET:�l���~�� + EX:TARGET:�a���~��) > 0 && TEQUIP:TARGET:�ł炵���[�h
	CALL KOJO_MESSAGE_SEND("PALAM",6,TARGET,-1,-1)
	;�E�t�t���n�������Z�b�g
	FOR LOCAL,10, 80
		SELECTCASE LOCAL
			CASE 18 TO 20, 25 TO 40, 49 TO 51
				CONTINUE
		ENDSELECT
		TEQUIP:TARGET:LOCAL = 0
	NEXT
ENDIF
;-------------------------------------------------
;�����҂̎ː����̌���
;-------------------------------------------------
CALL �ː��Ⓒ�\�L(MASTER)
CALL �ː��Ⓒ�\�L(TARGET)

;DEBUG	CALL KOJO_MESSAGE_PALAMCNG_A
CALL KOJO_MESSAGE_SEND("PALAM",1,TARGET,-1,-1)

;�}�G�@�}���ː��@����ʌn��
IF GETBIT(TCVAR:50,1) && TEQUIP:�u�Z�b�N�X != -1 && !TCVAR:PLAYER:�R���h�[�� && GROUPMATCH(�̈ʕۑ�,1,2,3,4,5)
	SIF FLAG:�摜�\�� && FLAG:�}�G�\��
		PRINTL
	SELECTCASE �̈ʕۑ�
		CASE 1,3,4
			CALL PRINT_IMAGE_ANIMATION_�����("�����_�ː�")
		CASE 2,5
			CALL PRINT_IMAGE_ANIMATION_��w��("��w��_�ː�")
	ENDSELECT
ENDIF

;-------------------------------------------------
;������̌���
;-------------------------------------------------
;DEBUG	CALL KOJO_MESSAGE_PALAMCNG_C
CALL KOJO_MESSAGE_SEND("PALAM",3,TARGET,-1,-1)
;-------------------------------------------------
;�p�����[�^�ϓ��ɂ�����
;-------------------------------------------------
;DEBUG	CALL KOJO_MESSAGE_PALAMCNG_D
CALL KOJO_MESSAGE_SEND("PALAM",4,TARGET,-1,-1)
;-------------------------------------------------
;����擾�̃`�F�b�N(�C�^�Y�����͋֎~)
;-------------------------------------------------
IF !CFLAG:TARGET:�C�^�Y��
	CALL MARK_GOT_CHECK(TARGET)
;-------------------------------------------------
;����擾�ɂ�����(�C�^�Y�����͋֎~)
;-------------------------------------------------
;DEBUG	CALL KOJO_MESSAGE_MARKCNG
	CALL KOJO_MESSAGE_SEND("MARK",-1,TARGET,-1,-1)
;-------------------------------------------------
;�������b�Z�[�W
;-------------------------------------------------
SIF NOWEX:����
	CALL TARGET_MILK_MESSAGE(TARGET)
;-------------------------------------------------
;�]���㏸�ɂ��[��R]�̏��Ń`�F�b�N(�C�^�Y�����͋֎~)
;-------------------------------------------------
	CALL JUJUN_UP_CHECK
ENDIF
RESETCOLOR
;-------------------------------------------------
;�����\�[�X�̕\��
;-------------------------------------------------
CALL SHOW_SOURCE
;-------------------------------------------------
;���l�ϓ��̕\��
;-------------------------------------------------
;����
R = NO:PLAYER
SIF RELATION:R != 0
	PRINTFORML ������{RELATION:R/100}.{RELATION:R%100}�{��

SIF TCVAR:TARGET:�D���ɂ���
	PRINTFORML ���M�΂ꒆ��

SIF SELECTCOM == 21
	PRINTFORML ���y�������Ȃ��z�̌��ʂ�%CALLNAME:MASTER%�̉�����ʑ�����
SIF SELECTCOM == 22
	PRINTFORML ���y�U���󂯂�z�̌��ʂŗD�z������

SIF SELECTCOM == PREVCOM && TFLAG:50 == TFLAG:151 && (SELECTCOM < 350 || SELECTCOM >= 500) && �A�����s()
	PRINTL ������R�}���h�A�����s��

;�C�͂O
SIF BASE:1 <= 0
	PRINTL ���C�͂O��
LOCAL:1 = 0
FOR LOCAL,0,CHARANUM
	SIF CFLAG:LOCAL:���݈ʒu == SUKIMA()
		CONTINUE
	IF DOWNBASE:LOCAL:�̗�
		IF DOWNBASE:LOCAL:�̗� > 0
			SETCOLOR C_YELLOW
			SIF DOWNBASE:LOCAL:�̗� > 150
				SETCOLOR C_RED
			PRINTFORM �̗�-{DOWNBASE:LOCAL:�̗�}
		ELSE
			SETCOLOR C_GREEN
			PRINTFORM �̗�+{-DOWNBASE:LOCAL:�̗�}
		ENDIF
		LOCAL:1 ++
	ENDIF
	IF DOWNBASE:LOCAL:�C��
		IF DOWNBASE:LOCAL:�C�� > 0
			SETCOLOR C_YELLOW
			SIF DOWNBASE:LOCAL:�C�� > 150
				SETCOLOR C_RED
			PRINTFORM �C��-{DOWNBASE:LOCAL:�C��}
		ELSE
			SETCOLOR C_GREEN
			PRINTFORM �C��+{-DOWNBASE:LOCAL:�C��}
		ENDIF
		LOCAL:1 ++
	ENDIF
	RESETCOLOR
	SIF LOCAL:1
		PRINTFORML (%CALLNAME:LOCAL%)
	LOCAL:1 = 0
NEXT
SIF TIME_PROGRESS(TIME:1) > 0 && SELECTCOM != 400 && SELECTCOM != 402 && SELECTCOM != 604 && !CFLAG:MASTER:���ӂ�
	PRINTFORML +{TIME_PROGRESS(TIME:1)}��
PRINTL

;-------------------------------------------------
;�p�����[�^�̏㏸���\���iDOWN�������Łj
;-------------------------------------------------
VARSET LOCAL
FOR LOCAL:1,0,CHARANUM
	SIF TCVAR:�\���J�b�g
		CONTINUE
	LOCAL:3 = 0
	FOR LOCAL,0,100
		SIF PALAMNAME:LOCAL == ""
			CONTINUE
		SIF CUP:(LOCAL:1):LOCAL - CDOWN:(LOCAL:1):LOCAL == 0
			CONTINUE
		IF !LOCAL:3
			PRINTL
			PRINTFORML %CALLNAME:(LOCAL:1)%
		ENDIF
		LOCAL:3 ++
		LOCAL:2 = CUP:(LOCAL:1):LOCAL - CDOWN:(LOCAL:1):LOCAL
		PRINTFORML %PALAMNAME:LOCAL,8,LEFT% {PALAM:(LOCAL:1):LOCAL,10,LEFT} + {CUP:(LOCAL:1):LOCAL,10,LEFT} =   {PALAM:(LOCAL:1):LOCAL + CUP:(LOCAL:1):LOCAL,10,LEFT}
		PALAM:(LOCAL:1):LOCAL += CUP:(LOCAL:1):LOCAL - CDOWN:(LOCAL:1):LOCAL
		CUP:(LOCAL:1):LOCAL = 0
		CDOWN:(LOCAL:1):LOCAL = 0
	NEXT
NEXT
PRINTL
IF GETBIT(TCVAR:50,1) && TEQUIP:�u�Z�b�N�X != -1 && !TCVAR:PLAYER:�R���h�[�� && GROUPMATCH(�̈ʕۑ�,1,2,3,4,5)
	SELECTCASE �̈ʕۑ�
		CASE 1,3,4
			CALL PRINT_IMAGE_ANIMATION_�ː���("�����_���o��")
		CASE 2,5
			CALL PRINT_IMAGE_ANIMATION_�ː���("��w��_���o��")
	ENDSELECT
	IF FLAG:�摜�\�� && FLAG:�}�G�\��
		WAIT
		PRINTL
	ENDIF
ENDIF
DRAWLINE
;-------------------------------------------------
;�~���s���x�㏸
;-------------------------------------------------
IF TCVAR:TARGET:�~���s���x�Ǘ� < GETPALAMLV(PALAM:�~��,15) && TARGET
	�~���s���x�㏸ = (GETPALAMLV(PALAM:�~��,15) - TCVAR:TARGET:�~���s���x�Ǘ�) * (30 + TCVAR:TARGET:���� * 20 + TCVAR:TARGET:�Z�� * 20)
	�~���s���x�㏸ = �~���s���f���␳(TARGET,�~���s���x�㏸)
	SIF TALENT:TARGET:�s������
		�~���s���x�㏸ *= 3
	CFLAG:TARGET:���܂��Ă�x = LIMIT(�~���s���x�㏸ + CFLAG:TARGET:���܂��Ă�x, 0, 1000)
	TCVAR:TARGET:�~���s���x�Ǘ� = GETPALAMLV(PALAM:�~��,15)
ENDIF
;-------------------------------------------------
;�D���x�㏸
;-------------------------------------------------
CALL FAVOR_CALC(TARGET)

;-------------------------------------------------
;�M���x�㏸�i�E�t�t�ȊO���㏸�ΏۃR�}���h���s���j
;-------------------------------------------------
SIF (TFLAG:98 && !CFLAG:TARGET:���ӂ�) && !CFLAG:TARGET:����
	CALL TRUST_CALC(TARGET)
;-------------------------------------------------
;�����[�x0�ɂ��o������
;-------------------------------------------------
SIF CFLAG:MASTER:�C�^�Y�� == 2 && (TCVAR:TARGET:�����[�x <= 0 || !��������(TARGET))
CALL ���������o(TARGET)

;-------------------------------------------------
;���������[�h�̉���
;-------------------------------------------------
IF TFLAG:102 == 3 && TFLAG:���������[�h
	TFLAG:����������|�C���g --
	IF TFLAG:����������|�C���g <= 0
		PRINTFORML %CALLNAME%�͖�������%CALLNAME:MASTER%�̑̂��痣�ꂽ�c
		CALL �����|����I��
		TFLAG:���������[�h = 0
		TCVAR:�������֎~���� = 90 + MAX(10 - ABL:�~�], 0) * 3 - MAX((CFLAG:�ϋɐ� + CFLAG:�p���炢) * 5, 30)
	ENDIF
ENDIF

;-------------------------------------------------
;�ϐ��̃��Z�b�g
;-------------------------------------------------
CVARSET TCVAR, 108, 0
CVARSET TCVAR, 111, 0

;-------------------------------------------------
;�����\�[�X�̕\���iDOWN�������Łj
;-------------------------------------------------
@SHOW_SOURCE
SIF TCVAR:�\���J�b�g
	RETURN 0
;PRINTL �@
SIF SOURCE:���b > 0
	PRINTFORM ���b({SOURCE:���b})
SIF SOURCE:���u > 0
	PRINTFORM ���u({SOURCE:���u})
SIF SOURCE:���` > 0
	PRINTFORM ���`({SOURCE:���`})
SIF SOURCE:���a > 0
	PRINTFORM ���a({SOURCE:���a})
SIF SOURCE:���l > 0
	PRINTFORM ���l({SOURCE:���l})
SIF SOURCE:� > 0
	PRINTFORM �({SOURCE:�})
SIF SOURCE:���s�� > 0
	PRINTFORM ���s��({SOURCE:���s��})
SIF SOURCE:�B�� > 0
	PRINTFORM �B����({SOURCE:�B��})
SIF SOURCE:��� > 0
	PRINTFORM �ɂ�({SOURCE:���})
SIF SOURCE:���| > 0
	PRINTFORM ����({SOURCE:���|})
SIF SOURCE:�t�� > 0
	PRINTFORM �t��({SOURCE:�t��})
SIF SOURCE:�~�� > 0
	PRINTFORM �~��({SOURCE:�~��})
SIF SOURCE:���� > 0
	PRINTFORM ����({SOURCE:����})
SIF SOURCE:�I�o > 0
	PRINTFORM �I�o({SOURCE:�I�o})
SIF SOURCE:���] > 0
	PRINTFORM ����({SOURCE:���]})
SIF SOURCE:���y > 0
	PRINTFORM ���y({SOURCE:���y})
SIF SOURCE:���� > 0
	PRINTFORM ����({SOURCE:����})
SIF SOURCE:���v > 0
	PRINTFORM ����({SOURCE:���v})
SIF SOURCE:�� > 0
	PRINTFORM ��({SOURCE:��})
SIF SOURCE:�s�� > 0
	PRINTFORM �s��({SOURCE:�s��})
SIF SOURCE:�T�� > 0
	PRINTFORM �T��({SOURCE:�T��})
SIF SOURCE:��E > 0
	PRINTFORM ��E({SOURCE:��E})
SIF SOURCE:���� > 0
	PRINTFORM ����({SOURCE:����})
PRINTL �@


code:
@SAMEN_DIRECTION(ARG,ARG:1)
#FUNCTION
;ARG �ː�����l
;ARG:1 �ː������l
LOCALS = /{ARG:1}/
SIF STRCOUNT(CSTR:ARG:10,LOCALS)
	RETURNF 1

@SAMEN_DIRECTION2(ARG,ARG:1)
#FUNCTION
;ARG �ː�����l
;ARG:1 �ː������l
LOCALS = /{ARG:1}/
SIF STRCOUNT(CSTR:ARG:11,LOCALS)
	RETURNF 1

@EVENT_SHOOT
VARSET LOCAL
;TCVAR:2 �ː��ӏ��t���O�i1=�S�� 2=�A�i�� 3=��� 4=���� 5=�p�C�Y�� 6=�f�� 7=���R�L 8=�̕\ 9=�A�i����d 10=���� 11=�G�� 12=�`�ӂ� 13=�u�ӂ߁j
;TCVAR:4 �ː��������x
;�ː��O����
FOR LOCAL,0,CHARANUM
	SIF !(TALENT:LOCAL:2 & 2)
		CONTINUE
	;�R���h�[��
	IF TEQUIP:LOCAL:�R���h�[��
		TCVAR:LOCAL:�R���h�[�� = 1
	ELSE
		TCVAR:LOCAL:�R���h�[�� = 0
	ENDIF
	SIF LOCAL > 0
		CALL TARGET_EJAC_CHECK(LOCAL)
	;�_�u���t�F���Ȃǂ̂ӂ���ߕ␳�Ɏg��
	LOCAL:2 = 0
	FOR LOCAL:1,0,CHARANUM
		IF LOCAL:1 == 0
			LOCAL:3 = 0
		ELSE
			SIF TARGET:(LOCAL:1) <= 0
				CONTINUE
			LOCAL:3 = TARGET:(LOCAL:1)
		ENDIF
		SIF SAMEN_DIRECTION(LOCAL,LOCAL:3)
			CALL EJAC_CHECK(LOCAL,LOCAL:3,LOCAL:2)
		LOCAL:2 ++
	NEXT
NEXT
;�ː�����
FOR LOCAL, 0, GET_TARGETNUM() + 1
	LOCAL:1 = TARGET:LOCAL
	SIF !LOCAL
		LOCAL:1 = MASTER
	;�ː�����
	SIF TCVAR:(LOCAL:1):�ː��������x
		CALL EJAC_CHECK_AFTER(LOCAL:1)
	SIF NOWEX:(LOCAL:1):�ː�
		CALL SAMEN_SHOOT(LOCAL:1)
NEXT

;�K�{�ł͂Ȃ�������\�����킩��₷�����邽�߂Ɏː��󋵂�TFLAG:1�Ɋ���U��(����ł͕K�{�ł�)
;PLAYER����ː��Ώۂւ��S���`�A�i����d�ː��܂ł�TCVAR:12(=1�`9)�ɏ���
SIF SAMEN_DIRECTION2(PLAYER,MASTER_POSE(0,SET_P))
	SETBIT TFLAG:1,TCVAR:PLAYER:12

FOR LOCAL,1,CHARANUM
	IF SAMEN_DIRECTION2(PLAYER,LOCAL)
		SETBIT TCVAR:LOCAL:50,TCVAR:PLAYER:12
	ENDIF
NEXT

;����t�F��
IF TFLAG:50 == 5 && NOWEX:PLAYER:�ː�
	SETBIT TFLAG:1,20
	SETBIT TCVAR:50,20
ENDIF
;�p�C�Y���t�F��
IF TFLAG:50 == 12 && NOWEX:PLAYER:�ː�
	SETBIT TFLAG:1,21
	SETBIT TCVAR:50,21
ENDIF
;�A�x���TARGET�ː�
IF TCVAR:PLAYER:12 == 8
	SETBIT TFLAG:1,8
	SETBIT TCVAR:50,8
ENDIF
;�V�b�N�X�i�C��
IF TFLAG:50 == 1 && (NOWEX:PLAYER:�ː� || NOWEX:�ː�)
	SETBIT TFLAG:1,22
	SETBIT TCVAR:50,22
ENDIF
;�C���}�`�I
IF SELECTCOM == 140 && NOWEX:PLAYER:�ː�
	SETBIT TFLAG:1,23
	SETBIT TCVAR:50,23
ENDIF
;�q�{���ӂ�
IF TFLAG:50 == 7 && NOWEX:PLAYER:�ː�
	SETBIT TFLAG:1,24
	SETBIT TCVAR:50,24
ENDIF
SIF !GETBIT(TFLAG:������,8) && NOWEX:PLAYER:�ː�
	SETBIT TFLAG:������,8

@EJAC_CHECK(ARG,ARG:1,ARG:2)
#DIM �Z�I�␳
#DIM �Q�[�W������
#DIM ���v���y���x
#DIM �o���x�␳
#DIM �]���␳
#DIM �~�]�␳
#DIM ��d���_�␳
#DIM �����␳
;ARG �ː�����l
;ARG:1 �ː�������l
;ARG:2 W�t�F�����ɂ�����ӂ���ߕ␳
;-------------------------------------------------
;�ː��Q�[�W�`�F�b�N
;-------------------------------------------------
;LOCAL:1�`�ɕ␳�l���Ԃ�����ł����܂�
;CFLAG:101 �ː��ӏ��t���O�i1=�S�� 2=�A�i�� 3=��� 4=���� 5=�p�C�Y�� 6=

;�Z�I�i���ʁj
LOCAL = ABL:(ARG:1):�Z�I
�Z�I�␳ = 10 + GET_REVISION(LOCAL, 5 , 5)

;�]���i���ʁj
LOCAL = 0
IF ARG:1 == MASTER
	LOCAL = 3
ELSE
	LOCAL = ABL:(ARG:1):�]��
ENDIF
�]���␳ = 10 + GET_REVISION(LOCAL, 3 , 5)

;��d���_(��d�n)
LOCAL = 0
IF TCVAR:(ARG:1):108 && ARG == PLAYER
	LOCAL = ABL:(ARG:1):��d���_
	��d���_�␳ = 10 + GET_REVISION(LOCAL, 10 , 5)
ELSE
	��d���_�␳ = 10
ENDIF

;�~�](�����n)
�~�]�␳ = 10
IF TCVAR:ARG:2 <= 2
	LOCAL = 0
	IF ARG:1 == MASTER
		LOCAL = 3
	ELSE
		LOCAL = ABL:(ARG:1):�~�]
	ENDIF
	�~�]�␳ = 10 + GET_REVISION(LOCAL, 5 , 3)
ENDIF

;����
�����␳ = 10
IF TCVAR:ARG:2 <= 2 || TCVAR:ARG:2 == 6
	IF PALAM:���� < PALAMLV:2
		�����␳ = 2
	ELSEIF PALAM:���� < PALAMLV:3
		�����␳ = 4
	ELSEIF PALAM:���� < PALAMLV:4
		�����␳ = 6
	ELSEIF PALAM:���� < PALAMLV:7
		�����␳ = 8
	ELSE
		�����␳ = 10
	ENDIF
ENDIF

;�v���C���[�̂b���o���݂�
�o���x�␳ = 10 + ABL:ARG:0 / 2

DEBUGPRINTFORML �␳�O���y���x{TCVAR:ARG:4}
DEBUGPRINTFORML �Z�I�␳{�Z�I�␳}
DEBUGPRINTFORML �~�]�␳{�~�]�␳}
DEBUGPRINTFORML �����␳{�����␳}
DEBUGPRINTFORML ��d���_�␳{��d���_�␳}
DEBUGPRINTFORML �o���x�␳{�o���x�␳}
DEBUGPRINTFORML ���ʕ␳{���ʕ␳(ARG,ARG:1,ARG:2)}
���v���y���x = TCVAR:ARG:4 * �Z�I�␳ * �]���␳ * �o���x�␳ * ��d���_�␳ * �����␳ * �~�]�␳ * ���ʕ␳(ARG,ARG:1,ARG:2) / 10000000 * (ARG:2 + 1)

SIF CFLAG:ARG:���ӂ� != 2
	���v���y���x = ���v���y���x * (BASE:ARG:���� + MAXBASE:ARG:����) / (MAXBASE:ARG:���� * 2)
SIF TCVAR:ARG:�R���h�[��
	���v���y���x = ���v���y���x * 4 / 5
SIF TEQUIP:ARG:�ł炵���[�h
	���v���y���x = ���v���y���x * 4 / 5
SIF TALENT:ARG:�s������
	���v���y���x = ���v���y���x * 4 / 5
�Q�[�W������ = ���v���y���x

DEBUGPRINTFORML �␳����y���x{���v���y���x}

SELECTCASE BASE:ARG:�u�N
	CASE IS < 300
		���v���y���x /= 5
	CASE IS < 500
		���v���y���x /= 4
	CASE IS < 1000
		���v���y���x /= 3
	CASE IS < 1500
		���v���y���x /= 2
	CASE 1500
		���v���y���x = ���v���y���x * 2 / 3
ENDSELECT
BASE:ARG:�u�N = BASE:ARG:�u�N + ���v���y���x / 5

SELECTCASE BASE:ARG:�u�N
	CASE IS < 500
		�Q�[�W������ /= 5
	CASE IS < 1000
		�Q�[�W������ /= 3
	CASE IS < 1500
		�Q�[�W������ = �Q�[�W������ / 5 * 2
	CASE 1500
		�Q�[�W������ /= 2
ENDSELECT
BASE:ARG:�ː� += �Q�[�W������

TCVAR:ARG:�ː��Q�[�W������ = �Q�[�W������

@���ʕ␳(ARG,ARG:1,ARG:2)
;-------------------------------------------------
;LOCAL �␳�O�̉��y���x
;ARG �ː�����l
;ARG:1 �ː�������l
;ARG:2 W�t�F�����ɂ�����ӂ���ߕ␳
;-------------------------------------------------
#FUNCTION

LOCAL = 10
;����
SIF TALENT:(ARG:1):����
	LOCAL += 2

SELECTCASE TCVAR:ARG:2
	;�S
	CASE 1
		;����
		SIF EX:(ARG:1):�����r���`�F�b�N
			LOCAL += 8
		SIF TALENT:(ARG:1):����
			LOCAL += 3
		SIF !FLAG:70
			LOCAL += ((ABL:(ARG:1):�� + ABL:(ARG:1):�S * 2) / 2 - 3)
		SIF NOWEX:(ARG:1):�u�Ⓒ
			LOCAL += 1
		SIF �}���s��(ARG:1) == -1 && ABL:(ARG:1):�S < 2
			LOCAL -= 2
		SIF �}���s��(ARG:1) == -2 && ABL:(ARG:1):�S < 3
			LOCAL -= 5
	;�A�i��
	CASE 2
		SIF !EXP:(ARG:1):�`�����o��
			LOCAL += 8
		SIF TALENT:(ARG:1):�K������
			LOCAL += 3
		SIF !FLAG:70
			LOCAL += ((ABL:(ARG:1):�� + ABL:(ARG:1):�A�i�� * 2) / 2 - 3)
		SIF NOWEX:(ARG:1):�`�Ⓒ
			LOCAL += 1
		SIF �}���s��(ARG:1) == -1 && ABL:(ARG:1):�A�i�� < 2
			LOCAL -= 2
		SIF �}���s��(ARG:1) == -2 && ABL:(ARG:1):�A�i�� < 3
			LOCAL -= 5
	;���
	CASE 3
		SIF TALENT:(ARG:1):��p�Ȏw
			LOCAL += 2
		SIF !FLAG:70 && !CFLAG:�C�^�Y��
			LOCAL += (ABL:(ARG:1):�w - 2) / 2
	;����
	CASE 4
		SIF TALENT:(ARG:1):��g��
			LOCAL += 2
		SIF TALENT:(ARG:1):�L��
			LOCAL -= 2
		SIF !FLAG:70 && !CFLAG:(ARG:1):�C�^�Y��
			LOCAL += (ABL:(ARG:1):�� - 2) / 2
		;�p�C�Y���t�F��
		IF TFLAG:50 == 12
			LOCAL += TALENT:(ARG:1):�o�X�g�T�C�Y
			IF !FLAG:70 && !CFLAG:(ARG:1):�C�^�Y��
				SELECTCASE ABL:(ARG:1):��
					CASE 0 TO 1
						LOCAL = LOCAL - 6 + ABL:(ARG:1):��
					CASE IS >= 2
						LOCAL += (ABL:(ARG:1):�� - 2) / 2
				ENDSELECT
			ENDIF
		ENDIF
		;���łɂ��|���t���O
		IF ABL:(ARG:1):��d���_ >= 2 && ABL:(ARG:1):�Z�I >= 2 && TEQUIP:(ARG:1):�{�[���M���O == 0 && EXP:(ARG:1):�����o�� > 20
			STAIN:ARG:2 = 2
			IF TFLAG:50 == 9 && ARG:1 == MASTER_POSE(SET_M,SET_P,1)
				TFLAG:8 |= 2
			ELSEIF ARG:1 == TARGET
				TFLAG:8 |= 1
			ENDIF
		ENDIF
	;�p�C�Y��
	CASE 5
		LOCAL += TALENT:(ARG:1):�o�X�g�T�C�Y
		IF !FLAG:70 && !CFLAG:(ARG:1):�C�^�Y��
			SELECTCASE ABL:(ARG:1):��
				CASE 0 TO 1
					LOCAL = LOCAL - 6 + ABL:(ARG:1):��
				CASE IS >= 2
					LOCAL += (ABL:(ARG:1):�� - 2) / 2
			ENDSELECT
		ENDIF
		;�p�C�Y���t�F��
		IF TFLAG:50 == 12
			SIF TALENT:(ARG:1):��g��
				ARG += 2
			SIF TALENT:(ARG:1):�L��
				ARG -= 2
			LOCAL += (ABL:(ARG:1):�� - 2) / 2
		ENDIF
		;���|���t���O
		IF ABL:(ARG:1):��d���_ >= 2 && ABL:(ARG:1):�Z�I >= 2 && TEQUIP:(ARG:1):�{�[���M���O == 0 && EXP:(ARG:1):�����o�� > 20
			STAIN:ARG:2 = 2
			IF ARG:1 == ASSI
				TFLAG:8 |= 2
			ELSEIF ARG:1 == TARGET
				TFLAG:8 |= 1
			ENDIF
		ENDIF
	;�f��
	CASE 6
	;���R�L
	CASE 7
		SIF TALENT:(ARG:1):�T�h
			LOCAL += 2
	;�̕\(�A�x��)
	CASE 8
	;�A�i����d
	CASE 9
		SIF TALENT:(ARG:1):��g��
			LOCAL += 2
		SIF TALENT:(ARG:1):�L��
			LOCAL -= 2
		SIF !FLAG:70
			LOCAL += (ABL:(ARG:1):�� - 2) / 2
	;����
	CASE 10
	;�G��
	CASE 11
	;�`�ӂ�
	CASE 12
	;�u�ӂ�
	CASE 13
ENDSELECT

RETURNF LOCAL


code:
;FileName_TRACHECK.ERB ----------------------------- Rev1.00
;�����r�����̏���
;CALL		USER
;ARG		0:�L����NO
;RETURN		VOID
;COMMENT
;-----------------------------------------------------------
@LOST_VIRGIN(ARG)
#DIMS DYNAMIC �r����
#DIMS DYNAMIC �擾��
;-------------------------------------------------
;�����r���̃`�F�b�N
;-------------------------------------------------
IF TALENT:ARG:���� == 1 && EXP_UP(1,ARG) && !TFLAG:2
	PRINTW �����r��
	IF ARG == MASTER
		CFLAG:ARG:�����r������ = TARGET
		�r���� = %CALLNAME:MASTER%
		�擾�� = %CALLNAME:TARGET%
	ELSE
		CFLAG:ARG:�����r������ = PLAYER
		�r���� = %CALLNAME:TARGET%
		�擾�� = %CALLNAME:MASTER%
	ENDIF
	;�����r���t���O(����̃R�}���h)
	TCVAR:ARG:�j�Z = 1
	SIF ARG
		FLAG:������ ++
	IF !CFLAG:ARG:�����r���L�O��
		CFLAG:ARG:�����r���L�O�� = DAY
		SELECTCASE SELECTCOM
			CASE 60,61,65,67,68,71,320,322
				IF TALENT:PLAYER:2 & 2
					CFLAG:ARG:�����r���Ώ� |= �r��_�y�j�X
				ELSE
					CFLAG:ARG:�����r���Ώ� |= �r��_�y�j�o��
				ENDIF
			CASE 64,130,131,132,133
					IF TALENT:TARGET:2 & 2
						CFLAG:ARG:�����r���Ώ� |= �r��_�y�j�X
					ELSE
						CFLAG:ARG:�����r���Ώ� |= �r��_�y�j�o��
					ENDIF
			CASE 44
				SETBIT CFLAG:ARG:�����r���Ώ�, 2
			CASEELSE
				IF TCVAR:TARGET:�J�E���^�[�s�� == 80 || TCVAR:TARGET:�J�E���^�[�s�� == 83
					IF TALENT:TARGET:2 & 2
						CFLAG:ARG:�����r���Ώ� |= �r��_�y�j�X
					ELSE
						CFLAG:ARG:�����r���Ώ� |= �r��_�y�j�o��
					ENDIF
				ELSEIF TCVAR:TARGET:�J�E���^�[�s�� == 85
					IF TALENT:PLAYER:2 & 2
						CFLAG:ARG:�����r���Ώ� |= �r��_�y�j�X
						CFLAG:ARG:�����r���Ώ� |= �r��_������
					ELSE
						CFLAG:ARG:�����r���Ώ� |= �r��_�y�j�o��
						CFLAG:ARG:�����r���Ώ� |= �r��_������
					ENDIF
				ENDIF
		ENDSELECT
	ENDIF
	IF CHK_DATENOW(CFLAG:ARG:�f�[�g��) && CFLAG:ARG:���݈ʒu != OMANEKIBEYA()
		CSTR:ARG:�����r���ʒu = %DATENAME_SPOT()%
	ELSE
		CSTR:ARG:�����r���ʒu = %NAME_FROM_PLACE(CFLAG:ARG:���݈ʒu)%
	ENDIF
	SIF FLAG:70
		CFLAG:ARG:�����r���Ώ� |= �r��_���Ԓ�~
	SIF TCVAR:ARG:�D��
		CFLAG:ARG:�����r���Ώ� |= �r��_�D��
	SIF CFLAG:�C�^�Y��
		CFLAG:ARG:�����r���Ώ� |= �r��_����

	;�r�f�I�B�e
	IF TEQUIP:ARG:28
		;����
		IF TEQUIP:ARG:50
			LOCALS = LV1/
		ELSEIF TEQUIP:13
			LOCALS = LV3/
		;���̑�
		ELSE
			LOCALS = LV4/
		ENDIF
		TSTR:1 += LOCALS
	ENDIF
	IF ARG != MASTER
		;�呀�ϔO
		IF TALENT:ARG:�呀 > 0
			IF !TALENT:ARG:����
				TIMES SOURCE:ARG:� , 0.60
				TIMES SOURCE:ARG:���� , 10.00
			ENDIF
		;�呀���ڒ�
		ELSEIF TALENT:ARG:�呀 < 0
			TIMES SOURCE:ARG:� , 0.60
			TIMES SOURCE:ARG:���� , 0.50
		ELSEIF TALENT:ARG:���m
			TIMES SOURCE:ARG:� , 0.30
			TIMES SOURCE:ARG:���� , 0.75
			SOURCE:ARG:���| += 3000
		ENDIF
		IF CFLAG:ARG:���ӂ� == 2
			TIMES SOURCE:ARG:� , 1.50
			TIMES SOURCE:ARG:���� , 0.25
		ENDIF
	ENDIF
	SETCOLOR 247,171,166
	PRINTFORMW �y�����r���z
	IF TEQUIP:ARG:50 == MASTER && GROUPMATCH(TALENT:MASTER:�`��,5,6)
		PRINTFORMW %�擾��%�̋����ȃC�`���c���A%�r����%�̏�����e�͂Ȃ������􂢂��c�c
		CFLAG:ARG:�����r���Ώ� |= �r��_����
		TIMES SOURCE:ARG:���, 3.00
		TIMES SOURCE:ARG:���|, 3.00
	ENDIF
	IF FLAG:70
		IF ARG == MASTER
			PRINTFORMW %�擾��%�͈ӎ��̂Ȃ��܂܁A\@ TALENT:ARG:�s������? �o������΂����# \@%�r����%�̏�����D�킳�ꂽ�c�c
		ELSE
			PRINTFORMW %�r����%�͈ӎ��̂Ȃ��܂܁A\@ TALENT:ARG:�s������? �o������΂����# \@%�擾��%�ɏ�����D���Ă��܂����c�c
		ENDIF
	ELSE
		;�ח��f���ɂ�鏈��
		;MASTER�r��
		IF ARG == MASTER
			;
			IF TCVAR:TARGET:�D��
				PRINTFORMW ���������܂܂�%�擾��%�́A%�r����%�̏�����D�킳��Ă��܂����c�c
			;�������A���O���p�p�ɂȂ�񂾂�I
			ELSEIF CFLAG:TARGET:����
				PRINTFORMW ����ɂ��Ă���%�擾��%�́A%�r����%�ɋ����ɏ�����D�킳��Ă��܂���
			;���m�ӂ����i�V���^�j�ŏ����r���Ƃ��ō��c�c����A�čl
			ELSEIF TALENT:TARGET:���m
				;IF GROUPMATCH(TALENT:MASTER:�`��,5,6)

				PRINTFORMW ���m���̖R����%�擾��%�͉������ꂽ�̂��킩�炸�A����ȉ�����%�r����%�̗������ɋ����Ă���c�c
				PRINTFORMW %�r����%��%�擾��%��G�߂Ȃ���A����h�炵���Â��Ă���
			;�f�����l
			ELSEIF TALENT:MASTER:���l == TALENT:TARGET:���l || TALENT:TARGET:���� > 1
				PRINTFORMW %�擾��%�͂����Ƃ�Ƃ����\��ŁA%�r����%�̔鏈�������N�������߂Ă���c�c
				TFLAG:150 = 2
				TIMES SOURCE:TARGET:� , 3.00
				TIMES SOURCE:TARGET:���� , 0.10
				 CFLAG:ARG:�����r���Ώ� |= �r��_����
			;����
			ELSEIF TALENT:TARGET:����
				PRINTFORMW %�擾��%�͊������ȏ΂݂𕂂��ׂāA�����������%�r����%�����߂Ă���c�c
				TFLAG:150 = 2
				TIMES SOURCE:TARGET:� , 2.00
				TIMES SOURCE:TARGET:���� , 0.30
				EXP:TARGET:����o�� += 30
				CFLAG:ARG:�����r���Ώ� |= �r��_����
			ELSEIF TALENT:TARGET:�v��
				IF TCVAR:TARGET:����� == 1
					PRINTFORMW %�擾��%�͉����Ɍ˘f���Ȃ���A%�r����%�ɗ܂ɔG�ꂽ���������Ă���c�c
					TIMES SOURCE:TARGET:� , 0.80
					TIMES SOURCE:TARGET:���� , 1.50
					CFLAG:ARG:�����r���Ώ� |= �r��_�����
				ELSEIF TALENT:TARGET:�呀 >= 0
					PRINTFORMW %�擾��%�͍��f���A�ǂ��ƂȂ���������%�r����%�����߂Ă���c�c
					TIMES SOURCE:TARGET:� , 1.30
					TIMES SOURCE:TARGET:���� , 0.80
				ENDIF
				CFLAG:ARG:�����r���Ώ� |= �r��_�v��
			ELSE
				IF TCVAR:TARGET:����� == 1
					TIMES SOURCE:TARGET:� , 0.10
					TIMES SOURCE:TARGET:���� , 3.00
					PRINTFORMW %�擾��%�́A�{��ƌ˘f���𕂂��ׂ�%�r����%���ɂ�ł����c�c
					CFLAG:ARG:�����r���Ώ� |= �r��_�����
				ELSE
					PRINTFORMW %�擾��%�͉������������ȕ\��𕂂��ׂāA%�r����%�Ƃ̌����������߂Ă���c�c
				ENDIF
			ENDIF
		;MASTER��TARGET���S�ɑ}�����Ă���
		ELSEIF TEQUIP:ARG:50 == MASTER
			IF TCVAR:ARG:�D��
				PRINTFORMW %�r����%�͍��������ӎ��̒��ŏ�����D���Ă��܂����c�c
			;�������@�ǂ��q�͖����Ă���ԂɃ}�}�ɂ����Ⴈ���ˁ`
			ELSEIF CFLAG:ARG:����
				PRINTFORMW %�r����%�̏��߂Ă͖����Ă���ԂɒD���Ă��܂����c�c
			ELSEIF TALENT:ARG:���m
				;IF GROUPMATCH(TALENT:MASTER:�`��,5,6)

				PRINTFORMW ���m���̖R����%�r����%�͉������ꂽ�̂��킩�炸�A�����r���̒ɂ݂Ɍ˘f�������Ă���c�c
				PRINTFORMW %�擾��%��%�r����%�𗎂���������
			;�e�������肪��l(���ݐe�����Ȃ��̂ŁA���l�ő�p
			ELSEIF TALENT:ARG:���l || TALENT:ARG:���� > 1
				PRINTFORMW %�r����%��%�擾��%�����߂Ă̑���ł��鎖�ɂ��̏�Ȃ��K���������Ă���悤���c�c
				TFLAG:150 = 2
				TIMES SOURCE:ARG:� , 3.00
				TIMES SOURCE:ARG:���� , 0.10
				 CFLAG:ARG:�����r���Ώ� |= �r��_����
			;���炩���肪��l
			ELSEIF TALENT:ARG:����
				PRINTFORMW %�r����%��%�擾��%�ɏ����������ꂽ���ɍK���������Ă���悤���c�c
				TFLAG:150 = 2
				TIMES SOURCE:ARG:� , 2.00
				TIMES SOURCE:ARG:���� , 0.30
				EXP:ARG:����o�� += 30
				CFLAG:ARG:�����r���Ώ� |= �r��_����
			ELSEIF TALENT:ARG:�v��
				IF TCVAR:ARG:����� == 1
					PRINTFORMW �D�ӂ������Ă�������ɗ��؂�ꂽ%�r����%�́A�嗱�̗܂𗬂��n�߂��c�c
					TIMES SOURCE:ARG:� , 0.80
					TIMES SOURCE:ARG:���� , 1.50
					CFLAG:ARG:�����r���Ώ� |= �r��_�����
				ELSEIF TALENT:ARG:�呀 >= 0
					PRINTFORMW �D�ӂ������Ă����Ƃ͂����A%�r����%��%�擾��%�ɒ呀�܂ł������Ă��܂������Ƃɓ��f���Ă���c�c
					TIMES SOURCE:ARG:� , 1.30
					TIMES SOURCE:ARG:���� , 0.80
				ENDIF
				CFLAG:ARG:�����r���Ώ� |= �r��_�v��
			ELSE
				IF TCVAR:ARG:����� == 1
					TIMES SOURCE:ARG:� , 0.10
					TIMES SOURCE:ARG:���� , 3.00
					PRINTFORMW %�r����%�̒�R�ނȂ����A%�擾��%�ɏ�����D���Ă��܂����c�c
					CFLAG:ARG:�����r���Ώ� |= �r��_�����
				ELSE
					PRINTFORMW %�r����%�͗������܂�%�擾��%�ɏ�����D���Ă��܂����c�c
				ENDIF
			ENDIF
		ENDIF
	ENDIF
ENDIF
RESETCOLOR
;-------------------------------------------------
;�Đ������r���̃`�F�b�N
;-------------------------------------------------
IF TALENT:ARG:���� == 2 && EXP_UP(1,ARG)
	TCVAR:ARG:�j�Z = 2
	;�r�f�I�B�e
	IF TEQUIP:28
		;����
		IF TEQUIP:ARG:50
			LOCALS = LV1/
		ELSEIF TEQUIP:ARG:13
			LOCALS = LV3/
		;���̑�
		ELSE
			LOCALS = LV4/
		ENDIF
		TSTR:1 += LOCALS
	ENDIF
	PRINTW �Đ������r��
ENDIF
;-------------------------------------------------
;�����o�����r���̃`�F�b�N
;-------------------------------------------------
IF TALENT:ARG:���� == -1 && EXP_UP(1,ARG) && CFLAG:ARG:292 == 1 && !FLAG:70 && !TCVAR:ARG:�D�� && !CFLAG:MASTER:�C�^�Y��
	TCVAR:ARG:�j�Z = -1
	CFLAG:ARG:292 = 0
	PRINTW �����r���H
	SETCOLOR 247,171,166
	PRINTFORMW %CALLNAME:ARG%�͋�ɂ炵����ɂ������Ȃ��������Ƃɍ��f���Ă���c
	RESETCOLOR
ENDIF

@����L�X���o���r��
FONTBOLD
SETCOLOR 255,100,255
;����r��
IF !TALENT:PLAYER:1 && TALENT:PLAYER:2 & 2
	SELECTCASE SELECTCOM
		CASE 60,61,62,63,65,66,67,68,69,70
			PRINTW ����r��
			TALENT:PLAYER:1 = 1
	ENDSELECT
	IF TCVAR:TARGET:�J�E���^�[�s�� == 85
			PRINTFORMW ����r��(%CALLNAME:PLAYER%)
			TALENT:PLAYER:1 = 1
	ENDIF
ENDIF
IF !TALENT:TARGET:1 && TALENT:TARGET:2 & 2
	SELECTCASE SELECTCOM
		CASE 64,92,93,94,71,130
			PRINTFORMW ����r��(%CALLNAME:TARGET%)
			TALENT:TARGET:1 = 1
	ENDSELECT
	IF TCVAR:TARGET:�J�E���^�[�s�� == 80
			PRINTFORMW ����r��(%CALLNAME:TARGET%)
			TALENT:TARGET:1 = 1
	ENDIF
ENDIF

;�L�X���o���r��
IF TALENT:PLAYER:6
	SIF GROUPMATCH(SELECTCOM,20,312) || GROUPMATCH(TCVAR:TARGET:�J�E���^�[�s��,60)
		CALL SET_FIRSTKISS(MASTER)
ENDIF
IF TALENT:TARGET:6 && !CFLAG:TARGET:���� && !FLAG:70
	IF GROUPMATCH(SELECTCOM,20,312) || GROUPMATCH(TCVAR:TARGET:�J�E���^�[�s��,60)
		IF TFLAG:193 != 99 && PREVCOM != 309
			EXP:TARGET:����o�� += 5
			CALL SET_FIRSTKISS(TARGET)
		ENDIF
	ENDIF
ENDIF
;�A�i�������r��
IF CFLAG:TARGET:�A�i�������r���Ώ� & �r��_���Ԓ�~ || !CFLAG:TARGET:�A�i�������r���L�O��
	SELECTCASE SELECTCOM
		CASE 45,62,63,66,69,70,71,323
			;���S�ɏ��߂�
			IF !CFLAG:TARGET:�A�i�������r���L�O��
				PRINTFORMW �A�i�������r��(%CALLNAME:TARGET%)
				CFLAG:TARGET:�A�i�������r���L�O�� = DAY
				IF SELECTCOM == 45
					CFLAG:TARGET:�A�i�������r���Ώ� |= �r��_�o�C�u
				ELSEIF TALENT:PLAYER:2 & 2
					CFLAG:TARGET:�A�i�������r���Ώ� |= �r��_�y�j�X
				ELSE
					CFLAG:TARGET:�A�i�������r���Ώ� |= �r��_�y�j�o��
				ENDIF
				IF !FLAG:70
					TCVAR:�`�j�Z = 1
				ELSE
					CFLAG:TARGET:�A�i�������r���Ώ� |= �r��_���Ԓ�~
					TCVAR:�`�j�Z = -2
				ENDIF
			;���Ԓ�~���Ɍo���ς�
			ELSEIF !FLAG:70 && CFLAG:TARGET:�A�i�������r���Ώ� & �r��_���Ԓ�~
				SIF FIRSTTIME("�`�j�Z",0)
					PRINTFORMW �A�i�������r���H(%CALLNAME:TARGET%)
				TCVAR:�`�j�Z = -1
			ENDIF
			IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��) && CFLAG:TARGET:���݈ʒu != OMANEKIBEYA()
				CSTR:TARGET:�`�����r���ʒu = %DATENAME_SPOT()%
			ELSE
				CSTR:TARGET:�`�����r���ʒu = %NAME_FROM_PLACE(CFLAG:TARGET:���݈ʒu)%
			ENDIF
		CASEELSE
			IF TCVAR:TARGET:�J�E���^�[�s�� == 87
				IF !CFLAG:TARGET:�A�i�������r���L�O��
					PRINTFORMW �A�i�������r��(%CALLNAME:TARGET%)
					CFLAG:TARGET:�A�i�������r���L�O�� = DAY
					IF TALENT:PLAYER:2 & 2
						CFLAG:TARGET:�A�i�������r���Ώ� |= �r��_�y�j�X
					ELSE
						CFLAG:TARGET:�A�i�������r���Ώ� |= �r��_�y�j�o��
					ENDIF
				ELSEIF CFLAG:TARGET:�A�i�������r���Ώ� & �r��_���Ԓ�~
				ENDIF
			ENDIF
			IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��) && CFLAG:TARGET:���݈ʒu != OMANEKIBEYA()
				CSTR:TARGET:�`�����r���ʒu = %DATENAME_SPOT()%
			ELSE
				CSTR:TARGET:�`�����r���ʒu = %NAME_FROM_PLACE(CFLAG:TARGET:���݈ʒu)%
			ENDIF
	ENDSELECT
	IF TARGET == MASTER
		CFLAG:MASTER:�A�i�������r������ = PLAYER
	ELSE
		CFLAG:TARGET:�A�i�������r������ = PLAYER
	ENDIF
ENDIF
FONTREGULAR
RESETCOLOR
@LOST_VIRGIN_STOP(ARG)

IF SHIRAHU(ARG) && CFLAG:ARG:�j�Z�L�����Z������L
	;���㑤���犱�\��
	TRYCALLFORM M_KOJO_COLOR_K{ARG}
	TRYCALLFORM M_KOJO_EVENT_K{ARG}_LOST_VIRGIN_STOP
	IF RESULT == 1
		RETURN 1
	ELSE
		RETURN 0
	ENDIF
	RESETCOLOR
ELSEIF !TALENT:ARG:���m && !TALENT:ARG:���� && !TALENT:ARG:���l && !TCVAR:ARG:�҂��� && !CFLAG:�C�^�Y�� && SHIRAHU(ARG)
;�呀�ϔO����or�呀���ʂ��v��Ȃ�
	IF TALENT:ARG:�呀 > 0 || (!TALENT:ARG:�呀 && !TALENT:ARG:�v��)
		PRINTFORMW %CALLNAME:ARG%�͂���͑҂��ė~�����ƌ����o����
		IF (EXP:ARG:60 + EXP:ARG:61 + EXP:ARG:62 + EXP:ARG:63 + EXP:ARG:64) == 0
			IF TALENT:ARG:�呀 > 0
				PRINTFORMW ���΂ɐg�������ł��c�c
			ELSE
				PRINTFORMW �ӊO�ƃK�[�h���ł��c�c
			ENDIF
		ELSE
			PRINTFORMW �ʓ|�L�������c�c
		ENDIF
		PRINTL [0] ������߂�
		PRINTL [1] �����V�H��ʂ�
		INPUT
		IF RESULT == 1
			IF TALENT:ARG:�呀 > 0 && ABL:ARG:�퓬�\�� > ABL:MASTER:�퓬�\�� && !TCVAR:ARG:�����
				PRINTFORMW %CALLNAME:MASTER%�͋����ɔ��������A%CALLNAME:ARG%�����܂�Ɍ�������R����̂ł�����߂�
					RETURN 1
			ELSEIF TALENT:ARG:�呀 > 0
				PRINTFORMW %CALLNAME:ARG%�͖ڂɗ܂𕂂��ׂ�%CALLNAME:MASTER%������
				PRINTL [0] �{�C�Ō������Ȃ̂ł�����߂�
				PRINTL [1] �������Ⴄ
				INPUT
				IF !RESULT
					PRINTFORMW %CALLNAME:ARG%�͂ق��Ƃ��Ă���c
					PRINTFORMW %CALLNAME:MASTER%�͂�����Ə�����
					RETURN 1
				ELSE
					PRINTFORMW %CALLNAME:MASTER%�͌�����%CALLNAME:ARG%�ɂ̂����������c
					TCVAR:ARG:�҂��� = 1
					TCVAR:ARG:����� = 1
					RETURN 0
				ENDIF
			ELSE
				PRINTFORMW %CALLNAME:MASTER%�͋����ɔ����ĉ����؂����c
				TCVAR:ARG:�҂��� = 1
				RETURN 0
			ENDIF
		ELSE
			PRINTFORMW %CALLNAME:ARG%�͂ق��Ƃ��Ă���c
			RETURN 1
		ENDIF
	ENDIF
ENDIF

@SET_FIRSTKISS(ARG, �L�X����, �V�`���G�[�V����)
#DIM �L�X����
;�V�`���G�[�V����	0:�ʏ�
;					1:�f�[�g�A��
;					2:�I�i�o��
#DIM �V�`���G�[�V����
IF ARG == �L�X����
	IF ARG == MASTER
		�L�X���� = TARGET
	ELSE
		�L�X���� = MASTER
	ENDIF
ENDIF
;�L�X���o���r��
IF TALENT:ARG:�L�X���o��
	SETCOLOR 247,171,166
	PRINTFORMW �L�X���o���r��(%CALLNAME:ARG%)
	CFLAG:ARG:�t�@�[�X�g�L�X�r���L�O�� = DAY
	TALENT:ARG:�L�X���o�� = 0
	CFLAG:ARG:�t�@�[�X�g�L�X�r������ = �L�X����
	SELECTCASE �V�`���G�[�V����
		CASE 1
			CSTR:ARG:�t�@�[�X�g�L�X�ʒu = �f�[�g����̋A�蓹
			SIF ARG != MASTER
				CFLAG:ARG:�t�@�[�X�g�L�X�r���Ώ� |= �r��_������
		CASE 2
			IF ARG != MASTER
				CSTR:ARG:�t�@�[�X�g�L�X�ʒu = ����
				CFLAG:ARG:�t�@�[�X�g�L�X�r���Ώ� |= �r��_�Ȃ�����
			ELSE
				CSTR:ARG:�t�@�[�X�g�L�X�ʒu = %CALLNAME:ARG%��
				CFLAG:ARG:�t�@�[�X�g�L�X�r���Ώ� |= �r��_�Ȃ�����
			ENDIF
		CASEELSE
			IF CHK_DATENOW(CFLAG:ARG:�f�[�g��) && CFLAG:ARG:���݈ʒu != OMANEKIBEYA()
				CSTR:ARG:�t�@�[�X�g�L�X�ʒu = %DATENAME_SPOT()%
			ELSE
				CSTR:ARG:�t�@�[�X�g�L�X�ʒu = %NAME_FROM_PLACE(CFLAG:ARG:���݈ʒu)%
			ENDIF
			SIF ARG == MASTER
				CFLAG:ARG:�t�@�[�X�g�L�X�r���Ώ� |= �r��_������
	ENDSELECT
	SIF TALENT:ARG:����
		CFLAG:ARG:�t�@�[�X�g�L�X�r���Ώ� |= �r��_����
	SIF TALENT:ARG:�v��
		CFLAG:ARG:�t�@�[�X�g�L�X�r���Ώ� |= �r��_�v��
	RESETCOLOR
ENDIF


code:
;FileName_TRACHECK.ERB ----------------------------- Rev1.00
;�D���x�㏸�v�Z����
;CALL		USER
;ARG		0:�L����NO
;RETURN		VOID
;COMMENT
;-----------------------------------------------------------
@FAVOR_CALC(ARG)
#DIM �{��㏸�l
#DIM ���[�h�㏸�l
#DIM �M���x�L���b�v�␳

IF FLAG:70 == 1 && CFLAG:TARGET:344 == 0
ELSE
	;COMABLE�͈͊O�}�~
	SIF !TFLAG:102
		RETURN 0
	;�Ώۂ�MASTER�ȊO�̎��N��
	SIF !ARG
		RETURN 0
	;��l(���Ȃ�)�ƑΏۂ̔\�͂��v�Z
	;ABL:�]�����݂�
	TFLAG:97 += (ABL:ARG:�]�� + ABL:ARG:�e��) / 2

	;��l�ƑΏۂ�����
	IF HETEROSEX(TARGET,PLAYER)
		;�j�Ȃ�z�����C�A���Ȃ烌�Y���C������
		IF ABL:ARG:(HETEROSEX(TARGET,PLAYER) + 16) == 0
			TFLAG:97 -= 1
		ELSEIF ABL:ARG:(HETEROSEX(TARGET,PLAYER) + 16) < 5
			TFLAG:97 += 0
		ELSEIF ABL:ARG:(HETEROSEX(TARGET,PLAYER) + 16) < 9
			TFLAG:97 += 1
		ELSE
			TFLAG:97 += 2
		ENDIF
		;�j�Ȃ�a�k���ŁA���Ȃ烌�Y���ł�����
		IF ABL:ARG:(HETEROSEX(TARGET,PLAYER) + 31) > 9
			TFLAG:97 += 2
		ELSEIF ABL:ARG:(HETEROSEX(TARGET,PLAYER) + 31) > 4
			TFLAG:97 += 1
		ENDIF
		;����
		SIF TALENT:ARG:���ʚn�D == -1
			TFLAG:97 += 1
	ENDIF
	;�f���ɂ�鑝��
	;���R�I
	SIF TALENT:ARG:�ԓx > 0
		TFLAG:97 -= 2
	;�v���C�h����
	SIF TALENT:ARG:�v���C�h > 0
		TFLAG:97 -= 1
	;�f��
	SIF TALENT:ARG:�ԓx < 0 && TFLAG:97 > 0
		TFLAG:97 += 1
	;�����S
	SIF TALENT:ARG:�����S
		TFLAG:97 -= 1
	;����R����
	SIF TALENT:ARG:����R����
		TFLAG:97 -= 1
	;��R
	SIF TALENT:ARG:��R
		TFLAG:97 -= 1
	;���g�I
	SIF TALENT:ARG:���g�I && TFLAG:97 > 0
		TFLAG:97 += 1
	;�z�C���m
	SIF TALENT:ARG:�z�C�^�A�C > 0 && TALENT:MASTER:�z�C�^�A�C > 0
		TFLAG:97 += 1

	;�A�C���m
	SIF TALENT:ARG:�z�C�^�A�C < 0 && TALENT:MASTER:�z�C�^�A�C < 0
		TFLAG:97 += 1
	;�����ɑf��
	IF TALENT:ARG:�������� > 0
		TFLAG:97 += 1
	;�����̔ے�
	ELSEIF TALENT:ARG:�������� < 0
		TFLAG:97 -= 1
	ENDIF
	;�@��
	TFLAG:97 += TALENT:ARG:15
	;�j����
	SIF OTOKOGIRAI(ARG)
		TFLAG:97 -= 3
	;����
	IF TALENT:ARG:����
		TFLAG:97 += 2
	;�����
	ELSEIF TCVAR:ARG:�����
		TFLAG:97 ++
		SIF CFLAG:ARG:2 < 1000
			TFLAG:97 ++
	ENDIF
	SIF TALENT:ARG:������ && TALENT:ARG:������ == TFLAG:���␳
		TFLAG:97 += 3
	;�v��
	SIF TALENT:ARG:�v��
		TFLAG:97 += 1
	;��l�̗e�p
	;TFLAG:97 += TALENT:MASTER:�e�p * 2
	;��l�̖���
	SIF TALENT:MASTER:����
		TFLAG:97 += 1
	;��l�̖��f
	SIF TALENT:MASTER:���f
		TFLAG:97 += 1
	;��l�̓�̖���
	SIF TALENT:MASTER:��̖���
		TFLAG:97 += 1
	;��l�̐l�C
	SIF TALENT:MASTER:�l�C
		TFLAG:97 += 1

	IF GETBIT (CFLAG:ARG:�����p��, 1)
		TFLAG:97 += 2
	ELSEIF GETBIT (CFLAG:ARG:�����p��, 0)
		TFLAG:97 += 1
	ENDIF

	LOCAL = 0
	LOCAL:1 = 0
	;�e�����
	;50����A30000��+300 ���̐��l���傫�����SOURCE:ARG�̑����ɑ΂��ē݊��ɂȂ�
	LOCAL += (100 - 30000 / (SOURCE:ARG:���b + SOURCE:ARG:���u + SOURCE:ARG:���` + SOURCE:ARG:���a + 300)) * (1 + TALENT:ARG:��������)
	;�
	LOCAL += (100 - 100000 / (SOURCE:ARG:� + 1000))
	LOCAL:1 += (100 - 100000 / (SOURCE:ARG:� + 1000))
	;�~��
	LOCAL += (20 - 20000 / (SOURCE:ARG:�~�� + 1000))
	LOCAL:1 += (100 - 100000 / (SOURCE:ARG:�~�� + 1000))
	;�B����
	LOCAL += (30 - 30000 / (SOURCE:ARG:�B�� + 1000))
	;����
	LOCAL += (20 - 20000 / (SOURCE:ARG:���� + 1000))
	;����
	LOCAL += (20 - 20000 / (SOURCE:ARG:���] + 1000))
	;�I�o
	LOCAL += (30 - 30000 / (SOURCE:ARG:�I�o + 1000)) * (ABL:ARG:�I�o�� - 3) / 3
	;���|
	LOCAL += (50 - 20000 / (SOURCE:ARG:���| + 400)) * (ABL:ARG:�]�� - 3) / 3
	;���
	LOCAL += (50 - 20000 / (SOURCE:ARG:��� + 400)) * (ABL:ARG:�}�]���C - 3) / 3
	;���y
	LOCAL += (50 - 10000 / (SOURCE:ARG:���y + 2000))
	;����
	LOCAL += (30 - 90000 / (SOURCE:ARG:���� + 3000))
	;��
	LOCAL += (30 - 90000 / (SOURCE:ARG:�� + 3000))
	;�s��
	LOCAL -= (50 - 25000 / (SOURCE:ARG:�s�� + 500)) * (2 - TALENT:ARG:���L�ϐ�) / 2
	;�T��
	LOCAL -= (50 - 15000 / (SOURCE:ARG:�T�� + 300))
	;��E
	LOCAL -= (50 - 25000 / (SOURCE:ARG:��E + 500))
	;����
	LOCAL -= (50 - 10000 / (SOURCE:ARG:���� + 200))

	;�D���x�㏸���Ɍv�Z�l�ǉ�
	TFLAG:97 += LOCAL / 10

	;���펞ON
	IF TFLAG:102 != 2
		;���[�h�ɍD���x�㏸���ǉ�
		���[�h�㏸�l = MIN(ABL:ARG:�e�� + 1,10) * LOCAL / 3
		;���u������Ə㏸�ʔ���
		SIF WITH_MOB()
			���[�h�㏸�l /= 2
		BASE:ARG:���[�h += MIN(���[�h�㏸�l,200)
		BASE:ARG:���[�h = MIN(BASE:ARG:���[�h , MAXBASE:ARG:���[�h)
		;�����Ƀp���p���������Ԃő��̖��ƃ��[�h���グ��Ɠ{�肪���܂�
		IF ARG != 60 && CFLAG:ARG:���݈ʒu == CFLAG:60:���݈ʒu
			IF TALENT:60:����
				BASE:60:�{�� += MIN(ABL:60:�e�� + 1,10) * LOCAL / 3
			ELSEIF TALENT:60:�v��
				BASE:60:�{�� += MIN(ABL:60:�e�� + 1,10) * LOCAL / 5
			ELSEIF CFLAG:60:2 > 500
				BASE:60:�{�� += MIN(ABL:60:�e�� + 1,10) * LOCAL / 8
			ENDIF
		ENDIF
		;�����������x������
		BASE:ARG:���� -= LOCAL:1 * (GETPALAMLV(PALAM:ARG:�~��,10) + 1) / 4 * (CFLAG:ARG:���܂��Ă�x + 1000) / 2000
		BASE:ARG:���� = MAX(BASE:ARG:���� , 0 )
		�{��㏸�l = 0
		;����ON�������\�[�X�L��œ{��l�㏸
		SIF SOURCE:ARG:���� > 0 && TFLAG:102 == 1
			�{��㏸�l = SOURCE:ARG:���� * 3 * (2000 - BASE:ARG:���[�h) * (500 + BASE:ARG:����) / ((2000 + BASE:ARG:���[�h) * (500 + MAXBASE:ARG:����))
		;�o�C�u�p���c��G�艺�����͂��Ă鎞�͓{��l���㏸���Ȃ� �t�M���h�~
		SIF SOURCE:ARG:���� > 0 && TFLAG:102 == 1 && (EQUIP:ARG:�����g�����Q == 28 || EQUIP:ARG:�����g�����Q == 29 || EQUIP:ARG:�����g�����Q == 30)
			�{��㏸�l = 0
		;�呀�т��͂��Ă鎞�͓{��㏸�l������
		SIF SOURCE:ARG:���� > 0 && TFLAG:102 == 1 && EQUIP:ARG:�����g�����Q == 27
			�{��㏸�l = �{��㏸�l * 4 / 3
		;�@���œ{��㏸�l���ω�
		IF TALENT:ARG:15 == 1
			�{��㏸�l = �{��㏸�l * 7 / 10
		ELSEIF TALENT:ARG:15 == -1
			�{��㏸�l = �{��㏸�l * 3 / 2
		ENDIF
		SIF TCVAR:ARG:�����򋭓x == 1 && CFLAG:ARG:�C�^�Y��
			�{��㏸�l = �{��㏸�l / 2
		SIF TCVAR:ARG:�����򋭓x == 2 && CFLAG:ARG:�C�^�Y��
			�{��㏸�l = �{��㏸�l / 5
		SIF TCVAR:ARG:�����򋭓x == 3 && CFLAG:ARG:�C�^�Y��
			�{��㏸�l = 0
		BASE:ARG:�{�� += �{��㏸�l
		;�{�肪�L���V�œ{��t���OON
		SIF BASE:ARG:�{�� > MAXBASE:ARG:�{��
			CALL GET_ANGRY(ARG)
		BASE:ARG:�{�� = MIN(BASE:ARG:�{�� , MAXBASE:ARG:�{�� )
		;�s�@���i��������擾���j��ɓ{��
		IF CFLAG:ARG:�s�@��
			BASE:ARG:�{�� = MAXBASE:ARG:�{��
			CFLAG:ARG:�u�`�M�� = 1
		ENDIF
		;�{��Ɩڊo�߂�
		IF CFLAG:ARG:�u�`�M�� && CFLAG:ARG:����
			CALL CHARA_AWAKE(ARG,1)
			IF CFLAG:ARG:���݈ʒu == CFLAG:MASTER:���݈ʒu && CFLAG:ARG:���݈ʒu == CFLAG:ARG:311
				IF TALENT:ARG:����
					IF CFLAG:ARG:����
						PRINTFORML %CALLNAME:ARG%�͗��K�҂�%CALLNAME:MASTER%�ł��邱�Ɗm�F����Ɣ��Ė����Ă��܂����c
					ELSE
						PRINTFORML %CALLNAME:ARG%�͗��K�҂�%CALLNAME:MASTER%�ł��邱�Ɗm�F����ƈ��g�̕\����������c
					ENDIF
				ELSE
					IF CFLAG:ARG:����
						PRINTFORML %CALLNAME:ARG%�͔��Ė����Ă��܂����c
					ELSE
						PRINTFORML %CALLNAME:ARG%�ɒǂ��o���ꂽ�c
					ENDIF
					CALL GETOUT(MASTER)
				ENDIF
			ENDIF
		ENDIF
		;���ӎD���s�`�F�b�N
		SIF (CFLAG:ARG:�u�`�M�� == 1) && RAND:((ABL:ARG:�e�� + 1) * 3) == 0 && !CFLAG:ARG:���� && FLAG:18
			CALL CARD_GOT_CHECK(ARG)
	ENDIF

	;��������␳
	TFLAG:97 -= (FLAG:4 + 1) * MARK:��������

	;���ʂ���萔�����̏ꍇ
	IF MARK:�������� >= 3 && TFLAG:97 < -3
		TFLAG:97 = -3
	ELSEIF MARK:�������� == 2 && TFLAG:97 < -2
		TFLAG:97 = -2
	ELSEIF MARK:�������� == 1 && TFLAG:97 < -1
		TFLAG:97 = -1
	ELSEIF TFLAG:97 < 0
		TFLAG:97 = 0
	ENDIF

	;���֐S�̏ꍇ�A���炪�Ȃ��ƍD���x���オ��ɂ���
	IF TALENT:ARG:���֐S && !TALENT:ARG:����
		IF TFLAG:97 > 1
			TFLAG:97 /= 2
		ELSEIF TFLAG:97 > 0
			TFLAG:97 = 1
		ENDIF
		SIF ABL:ARG:�T�h���C >= 4
			TFLAG:97 += 1
	ENDIF
	;�����}�����Ɛe���T����グ�ɂ����Ȃ�
	IF TALENT:ARG:�����}��
		TFLAG:97 += 2
		SIF ABL:ARG:�e�� >= 5
			TFLAG:97 /= 2
	ENDIF
	[SKIPSTART]
	;�s�����x�ɂ��y�i���e�B
	SELECTCASE TCVAR:ARG:�s�����x
		CASE IS <= 10
			 TFLAG:97 ++
		CASE 11 TO 20
		CASE 21 TO 50
			TFLAG:97 -= 1
		CASE 51 TO 100
			TFLAG:97 -= 3
		CASE 101 TO 300
			TFLAG:97 -= 5
		CASEELSE
			TFLAG:97 -= 10
	ENDSELECT
	[SKIPEND]
	;���蒲����
	SIF ASSIPLAY == 1
		TFLAG:97 = 0
	;�����
	SIF TCVAR:ARG:�����
		TFLAG:97 = MIN(0,TFLAG:97 * -3)
	;�Ώۂ������Ă�����㏸�l0
	SIF !SHIRAHU(ARG)
		TFLAG:97 = 0
	;�D���x���M���x��4�{�𒴂���Ə㏸�l���ቺ�@�������f�[�g���͗�O
	IF CFLAG:ARG:2 > 500 && CFLAG:ARG:�D���x > CFLAG:ARG:�M���x * 4
		�M���x�L���b�v�␳ = CFLAG:ARG:�D���x
		SIF FLAG:�f�[�g���� == ARG
			�M���x�L���b�v�␳ /= 2
		IF TALENT:ARG:����
			TFLAG:97 = GET_REVISION(CFLAG:ARG:�M���x * 40, TFLAG:97,�M���x�L���b�v�␳)
		ELSEIF TALENT:ARG:�v��
			TFLAG:97 = GET_REVISION(CFLAG:ARG:�M���x * 30, TFLAG:97,�M���x�L���b�v�␳)
		ELSE
			TFLAG:97 = GET_REVISION(CFLAG:ARG:�M���x * 20, TFLAG:97,�M���x�L���b�v�␳)
		ENDIF
	ENDIF
	;�����ɐⒸ
	IF (NOWEX:ARG:�b�Ⓒ || NOWEX:ARG:�a�Ⓒ || NOWEX:ARG:�u�Ⓒ || NOWEX:ARG:�`�Ⓒ || NOWEX:ARG:�l�Ⓒ) && NOWEX:MASTER:�ː�
		TFLAG:97 = TFLAG:97 * 3 / 2
	ELSEIF (NOWEX:MASTER:�b�Ⓒ || NOWEX:MASTER:�a�Ⓒ || NOWEX:MASTER:�u�Ⓒ || NOWEX:MASTER:�`�Ⓒ || NOWEX:MASTER:�l�Ⓒ) && NOWEX:ARG:�ː�
		TFLAG:97 = TFLAG:97 * 3 / 2
	ENDIF
	;����哱���ӂ�
	SIF CFLAG:���ӂ� == 2
		TFLAG:97 = TFLAG:97 * 6 / 5
	;�s������
	SIF TALENT:ARG:�s������
		CALL YUKIZURI_BONUS(ARG)
	;�D���x�}�C�i�X
	SIF TFLAG:�D���x�}�C�i�X && TFLAG:97 > 0
		TFLAG:97 = TFLAG:97 * -1 *TFLAG:�D���x�}�C�i�X
	SIF TFLAG:�D���x�{�[�i�X && TFLAG:97 > 0
		;TFLAG:97 = TFLAG:97 * TFLAG:�D���x�{�[�i�X
		TFLAG:97 = TFLAG:97 * (100 + TFLAG:�D���x�{�[�i�X) / 100

	;�D���x�㏸���Ⴂ�ꍇ�A���_�Z�l�ł��胂�u�������ꏊ�ɂ���΃{�[�i�X
	SIF TFLAG:97 < 3 && WITH_MOB() && MAP_�Z�l(MAIN_MAP,ARG)
		TFLAG:97 ++
	;�R�}���h���s�����ꍇ�D���x�オ��Ȃ�
	SIF TFLAG:98 < 0 || TFLAG:�D���x����Ȃ�
		TFLAG:97 = MIN(0,TFLAG:97)

	SIF TFLAG:3 == 300 && TFLAG:193 < 0
		TFLAG:97 = 0

	;�D�����o�����͖ⓚ���p�ōD���x�啝�ቺ
	SIF TCVAR:ARG:�D�����o��
		TFLAG:97 -= MAX(30 - ABL:ARG:�e��, 0) * 3

	;�D���x�ɏ㏸�l�����Z
	CFLAG:ARG:2 += TFLAG:97

	;�D���x��0�ȉ��ɂ�100���ȏ�ɂ��Ȃ�Ȃ�
	CFLAG:ARG:2 = LIMIT(CFLAG:ARG:2, 0, 999999)
	LOCAL:1 = 0
	FOR LOCAL,0,100
		SIF SOURCE:ARG:LOCAL
			LOCAL:1 ++
	NEXT
	SIF !LOCAL:1
		TFLAG:97 = 0

	;�D���x�\��
	SIF TFLAG:97
		PRINTFORML \@(TFLAG:97 >= 0) ? �D���x�{{TFLAG:97} # �D���x�|{-TFLAG:97}\@
	;�D���x�㏸�l���Z
	FLAG:12 += TFLAG:97
ENDIF

@YUKIZURI_BONUS(ARG)
TFLAG:97 *= 10

LOCAL = GETPALAMLV(PALAM:ARG:�D��,10) - 1

IF LOCAL > 0 && ABL:ARG:�e�� < LOCAL
	CALL COLORMESSAGE(@"�e����{LOCAL}�ɏオ����",C_YELLOW,2,1)
	ABL:ARG:�e�� = LOCAL
ENDIF