code:
@COM604
#DIM ���ݒn�_
#DIM �ړ���n�_
#DIM ���v����,11
#DIM �s����
#DIM ����V���[�g�J�b�g
;�U�􂷂�
VARSET LOCAL
DRAWLINEFORM �`

CALL DRAW_MAP("ODEKAKE")

DRAWLINEFORM �`
PRINTL �ǂ��Ɍ������܂����H
LOCAL = 6000 + (CFLAG:MASTER:���݈ʒu / 100) * 10
���ݒn�_ = (CFLAG:MASTER:���݈ʒu - (CFLAG:MASTER:�f�[�g�� * 100)) / 10
FOR LOCAL:2, 1, 10
	LOCAL ++
	;���݈ʒu�̓X�L�b�v
	IF (LOCAL - 6000) * 10 == CFLAG:MASTER:���݈ʒu
		PRINT [0] -
		PRINTFORM %NAME_FROM_PLACE(LOCAL), 18, LEFT%
		SETCOLOR 0 , 255, 0
		PRINT ���ݒn
		RESETCOLOR
		LOCAL:3 ++
		SIF !(LOCAL:3 % 2)
			PRINTL
		CONTINUE
	ENDIF
	;�n�_������`�ɂȂ�����X�L�b�v
	SIF NAME_FROM_PLACE(LOCAL) == "" || LOCAL > 6000 + ((CFLAG:MASTER:���݈ʒu / 100) * 10) + 9
		CONTINUE
	���v����:(LOCAL:2) = ABS(���ݒn�_ - LOCAL:2) * 3
	;�i��������
	SIF LOCAL == 6048
		���v����:(LOCAL:2) = ABS(���ݒn�_ - 5) * 3 + 3
	;������
	SIF LOCAL == 6049
		���v����:(LOCAL:2) = ABS(���ݒn�_ - 7) * 3 + 3
	����V���[�g�J�b�g = 0
	;�����̔\��
	IF FLAG:�f�[�g���� == 76
		���v����:(LOCAL:2) = (���v����:(LOCAL:2) * 2) / 3
		����V���[�g�J�b�g = 1
	ENDIF
	;�킩�����P�̕��S
	SIF FLAG:�f�[�g���� == 93 && !GETBIT (FLAG:�v�[��, 0)
		���v����:(LOCAL:2) = (���v����:(LOCAL:2) * 3) / 2
	;�V���[�g�J�b�g����
	SELECTCASE LOCAL
		;�����̒|��
		CASE 6041 TO 6047
			IF SHORTCUT(6)
				���v����:(LOCAL:2) = (���v����:(LOCAL:2) * 2) / 3
				����V���[�g�J�b�g = 2
			ENDIF
		;�V�E
		CASE 6081 TO 6085
			IF CFLAG:MASTER:���݈ʒu == �V�E && SHORTCUT(2)
				���v����:(LOCAL:2) = ���v����:(LOCAL:2) / 2
				����V���[�g�J�b�g = 2
			ENDIF
		CASE 6089
			IF SHORTCUT(2)
				���v����:(LOCAL:2) = ���v����:(LOCAL:2) / 2
				����V���[�g�J�b�g = 2
			ENDIF
		;���E
		CASE 6061, 6062
			IF CFLAG:MASTER:���݈ʒu >= 670 && CFLAG:MASTER:���݈ʒu <= 690 && SHORTCUT(3)
				���v����:(LOCAL:2) = ���v����:(LOCAL:2) / 2
				����V���[�g�J�b�g = 2
			ENDIF
		CASE 6067, 6068, 6069
			IF CFLAG:MASTER:���݈ʒu >= 610 && CFLAG:MASTER:���݈ʒu <= 620 && SHORTCUT(3)
				���v����:(LOCAL:2) = ���v����:(LOCAL:2) / 2
				����V���[�g�J�b�g = 2
			ENDIF
	ENDSELECT
	PRINTFORM [{LOCAL:2}] -
	PRINTFORM %NAME_FROM_PLACE(LOCAL)%
	PRINTFORM %" " *(20 - STRLENS(NAME_FROM_PLACE(LOCAL)))%
	SIF ���v����:(LOCAL:2) < 10
		PRINT
	IF ����V���[�g�J�b�g == 1
		SETCOLOR 250, 220, 180
	ELSEIF ����V���[�g�J�b�g == 2
		SETCOLOR 100, 250, 140
	ENDIF
	PRINTFORM {���v����:(LOCAL:2)}��
	RESETCOLOR
	LOCAL:3 ++
	SIF !(LOCAL:3 % 2)
		PRINTL
NEXT
SIF GROUPMATCH(CFLAG:MASTER:�f�[�g��, 2, 4, 5, 6, 8, 9)
	PRINTL
IF CFLAG:MASTER:���݈ʒu == �V�E && (ABL:MASTER:���{ >= 2 || ABL:(FLAG:�f�[�g����):���{ >= 2)
	���v���� = 10
	SIF SHORTCUT(2)
		���v���� = 5
	PRINT [67] - �ފ݁@�@�@�@�@�@�@
	PRINTFORML {���v����}��
ELSEIF CFLAG:MASTER:���݈ʒu == ������ && (ABL:MASTER:���{ >= 2 || ABL:(FLAG:�f�[�g����):���{ >= 2)
	���v���� = 5
	SIF SHORTCUT(3)
		���v���� = 3
	PRINT [68] - ���E�@�@�@�@�@�@�@
	PRINTFORML {���v����}��
ENDIF
PRINTL [100] - �߂�@�@�@�@�@�@�@�@�@[99] - ���̒n��Ɉړ�
$INPUT_LOOP
INPUT
�s���� = RESULT * 10 + CFLAG:MASTER:�f�[�g�� * 100
SIF RESULT == 100 || RESULT == 0
	RETURN -1
IF RESULT == 99
	DRAWLINE
	CALL OTHERREGIONS
	IF RESULT == 100
		RETURN -1
	ELSE
	ENDIF
	RETURN 1
ELSEIF RESULT == 67
	IF CFLAG:MASTER:���݈ʒu == �V�E && (ABL:MASTER:���{ >= 2 || ABL:(FLAG:�f�[�g����):���{ >= 2)
		CFLAG:MASTER:���݈ʒu = �ފ�
		CFLAG:MASTER:�f�[�g�� = 6
		CFLAG:(FLAG:�f�[�g����):���݈ʒu = �ފ�
		CFLAG:(FLAG:�f�[�g����):�f�[�g�� = 6
		IF FLAG:70
			BASE:MASTER:TSP -= ���v���� * 2
		ELSE
			TIME += ���v����
		ENDIF
		RETURN 1
	ELSE
		RETURN -1
	ENDIF
ELSEIF RESULT == 68
	IF CFLAG:MASTER:���݈ʒu == ������ && (ABL:MASTER:���{ >= 2 || ABL:(FLAG:�f�[�g����):���{ >= 2)
		CFLAG:MASTER:���݈ʒu = ���ʘO��
		CFLAG:MASTER:�f�[�g�� = 6
		CFLAG:(FLAG:�f�[�g����):���݈ʒu = ���ʘO��
		CFLAG:(FLAG:�f�[�g����):�f�[�g�� = 6
		IF FLAG:70
			BASE:MASTER:TSP -= ���v���� * 2
		ELSE
			TIME += ���v����
		ENDIF
		RETURN 1
	ELSE
		RETURN -1
	ENDIF
ELSEIF RESULT < 1 || RESULT > (LOCAL - (6000 + (CFLAG:MASTER:���݈ʒu / 100) * 10) + 1)
	CLEARLINE 1
	RESTART
ELSEIF NAME_FROM_PLACE(RESULT + 6000 + (CFLAG:MASTER:���݈ʒu / 100) * 10) == ""
	CLEARLINE 1
	RESTART
ENDIF

CALL SANSAKU_UNIQUEPLACE(�s����)
SIF RESULT == -1
	RESTART

�ړ���n�_ = RESULT
�s���� = �ړ���n�_ * 10 + CFLAG:MASTER:�f�[�g�� * 100
[IF_DEBUG]
PRINTFORML �ړ���n�_��{�ړ���n�_}�A�s�����{�s����}
[ENDIF]
FOR LOCAL,0,CHARANUM
	SIF CHK_DATENOW(CFLAG:LOCAL:�f�[�g��)
		CFLAG:LOCAL:���݈ʒu = �s����
NEXT
IF FLAG:70 == 1
	BASE:MASTER:TSP -= ���v����:�ړ���n�_ * 2
	IF TFLAG:�^��
		BASE:MASTER:TSP -= ���v����:�ړ���n�_ / 3
		CFLAG:(TFLAG:�^��):���݈ʒu = CFLAG:MASTER:���݈ʒu
	ENDIF
ELSEIF FLAG:�u�Ԉړ� && BASE:MASTER:TSP > 10  && !FLAG:�f�[�g����
	BASE:MASTER:TSP -= ���v����:�ړ���n�_ * 2
ELSE
	TIME += ���v����:�ړ���n�_
	SIF CHK_DATENOW(CFLAG:93:�f�[�g��) && !GETBIT (FLAG:�v�[��, 0)
		BASE:MASTER:�̗� = MAX(BASE:MASTER:�̗� - 50,500)
ENDIF
SIF !FLAG:70
	PRINTFORML {���v����:�ړ���n�_}��������%STR:(6000 + �s���� / 10)%�Ɉړ�����

RETURN 1

;-------------------------------------------------
;���s�\����
;-------------------------------------------------
;�U�􂷂�
@COM_ABLE604
SIF TFLAG:�ϑz��
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(604)
	RETURN RESULT
;�f�[�g���ȊO
SIF AT_HOME(MASTER)
	RETURN 0
SIF CFLAG:���ӂ�
	RETURN 0
;�f�[�g����
SIF (CFLAG:���݈ʒu % 100) % 10
	RETURN 0
;�ϑz��
SIF TFLAG:�ϑz�� == 1
	RETURN 0
RETURN 1

@SANSAKU_UNIQUEPLACE(ARG)
#DIM ���ݒn�_
#DIM �ړ���n�_

���ݒn�_ = (CFLAG:MASTER:���݈ʒu - (CFLAG:MASTER:�f�[�g�� * 100)) / 10
�ړ���n�_ = (ARG - (CFLAG:MASTER:�f�[�g�� * 100)) / 10

SELECTCASE ARG
	CASE �ފ�, ���ʘO��, ���ʘO, �V�E
		IF ABL:MASTER:���{ < 1 && ABL:(FLAG:�f�[�g����):���{ < 1
			PRINTFORMW �����������{��t���Ȃ��Ɗ댯��
			CLEARLINE 2
			RETURN -1
		ENDIF
	CASE ���̓s, �Ȍ���, �ʓe�̊X, ���с`���l, �Â��̊C
		IF ABL:MASTER:���{ < 2 && ABL:(FLAG:�f�[�g����):���{ < 2
			PRINTFORMW �����������{��t���Ȃ��Ɗ댯��
			CLEARLINE 2
			RETURN -1
		ENDIF
	CASE 480
		IF !FLAG:70 && !�i�����N������()
			PRINTL ���֓��낤�Ƃ������A������œe�����Ɏ~�߂�ꂽ
			IF ���ݒn�_ == 5
				RETURN -1
			ELSE
				RETURN 5
			ENDIF
		ENDIF
		SIF FLAG:70
			PRINTFORMW ���f�œ�����
	CASE �A�ꍞ�ݏh,���u�z
		IF !FLAG:�f�[�g����
			PRINTW ��l�ōs���Ă��d���Ȃ�
			CLEARLINE 2
			RETURN -1
		ENDIF
		IF MONEY < 3000
			PRINTW ����������Ȃ�
			CLEARLINE 2
			RETURN -1
		ENDIF
		SIF !GETBIT(CFLAG:(FLAG:�f�[�g����):�������� , 1)
			CALL ������((FLAG:�f�[�g����))
		IF TCVAR:(FLAG:�f�[�g����):�����񂹏��� >= 6 && !TCVAR:(FLAG:�f�[�g����):�D��
				PRINTFORMW %CALLNAME:(FLAG:�f�[�g����)%�ɓ���̂����ۂ���Ă��܂���
				IF TCVAR:(FLAG:�f�[�g����):�����񂹏��� == 6
					PRINTFORMW ������%CALLNAME:(FLAG:�f�[�g����)%�͂܂񂴂�ł��Ȃ�������
					CLEARLINE 1
				ENDIF
			CLEARLINE 2
			RETURN -1
		ELSE
			PRINTL \3000������܂��B�X�����ł����H
			CALL ASK_YN
			IF RESULT == 0
				MONEY -= 3000
				IF TCVAR:(FLAG:�f�[�g����):�D��
					PRINTFORMW %CALLNAME:(FLAG:�f�[�g����)%���N�O�Ƃ��Ă���̂��������ƂɁA%CALLNAME:MASTER%�͔ޏ���%STR:(6000 + ARG / 10)%�ւƘA�ꍞ��
				ELSE
					PRINTFORMW %CALLNAME:MASTER%��%CALLNAME:(FLAG:�f�[�g����)%��%STR:(6000 + ARG / 10)%�ɓ�����
				ENDIF
				RETURN �ړ���n�_
			ELSE
				CFLAG:(FLAG:�f�[�g����):���ӂ� = 0
				CFLAG:MASTER:���ӂ� = 0
				RETURN -1
			ENDIF
			CFLAG:(FLAG:�f�[�g����):���ӂ� = 0
			CFLAG:MASTER:���ӂ� = 0
		ENDIF
ENDSELECT

RETURN �ړ���n�_


code:
;�ނ������
@COM621
#DIM �ނꂽ����
#DIM �ނ�p���[
#DIM �ނ�p���[M
#DIM �ނ�p���[T
#DIM �ނ�Ȃ��␳
#DIM �ނ�^
#DIM CHARA
#DIM �������ނ���
�������ނ��� = 0
;�Q���Ҕ���
IF FLAG:�f�[�g����
	CHARA = FLAG:�f�[�g����
ELSEIF TARGET && ABL:TARGET:�e�� >= 5 - ABL:TARGET:�ނ�Z�\
	CHARA = TARGET
ELSE
	CHARA = 0
ENDIF
;���킢�����G�G
IF CHARA == 93 || TARGET == 93
	PRINTFORMW �ޏ��̑O�Œނ������͍̂��Ȃ��̂��c
	RETURN -1
ENDIF

;���ւ���-50�`+50,�A�C�e���₨�F�蓙�ŕ␳�������邱�Ƃ���
�ނ�^ = FLAG:���ւ��C�x���g / 10 - 50
;�ނ�̑�햡�͑҂����Ԃ��ƕ�����
FOR LOCAL, 0, 5
	REUSELASTLINE  \@ CHARA ? %CALLNAME:CHARA%�ƈꏏ�� #  \@�ނ蒆.%"." * COUNT%
	TWAIT 150, 1
NEXT
;�ނ�p���[�ݒ�
�ނ�p���[M = 10 + ABL:MASTER:�ނ�Z�\ * 15 + �ނ�^ + �ނ�Ȃ��␳
SIF CHARA
	�ނ�p���[T = 10 + ABL:CHARA:�ނ�Z�\ * 15 + �ނ�Ȃ��␳

;�i�ނ�p���[�j���Œނ��
IF RAND:100 < �ނ�p���[M
	�ނ�p���[ = �ނ�p���[M
	$FISH
	;�ނꂽ��␳���Z�b�g
	�ނ�Ȃ��␳ = 0
	;�ނ�p���[�Œނ����̂��ς��
	SELECTCASE MIN(RAND:�ނ�p���[, 100)
	CASE IS < 5
		;�؍�
		�ނꂽ���� = 610
	CASE IS < 10
		;���̎�D
		�ނꂽ���� = 131
	CASE IS < 20
		;�E�O�C
		�ނꂽ���� = 1
	CASE IS < 30
		;�A�}�S
		�ނꂽ���� = 2
	CASE IS < 40
		;���}�������
		�ނꂽ���� = 3
	CASE IS < 50
		;�C���i
		�ނꂽ���� = 4
	CASE IS < 60
		;�J�G��
		�ނꂽ���� = 706
	CASE IS < 70
		IF DAY:2 == 3
			;�T�P,�H
			�ނꂽ���� = 11
		ELSEIF DAY:2 == 4
			;���J�T�M,�~
			�ނꂽ���� = 12
		ELSE
			;�j�W�}�X
			�ނꂽ���� = 13
		ENDIF
	CASE IS < 80
		;���c���E�i�M
		�ނꂽ���� = 14
	CASE IS < 90
		;�J�����`�[
		�ނꂽ���� = 15
	CASE IS < 95
		;���[�^�[
		�ނꂽ���� = 21
	CASEELSE
		IF DAY:2 == 4
			;�X�̗�,�~
			�ނꂽ���� = 609
		ELSE
			;���̒�
			�ނꂽ���� = 606
		ENDIF
		;�{�[�i�X
		IF �������ނ���
			EXP:CHARA:�ނ�o�� ++
		ELSE
			EXP:MASTER:�ނ�o�� ++
		ENDIF
	ENDSELECT
	;�A�C�e���ɒǉ�
	SELECTCASE �ނꂽ����
	CASE IS < 10
		ITEM:�� ++
	CASE IS < 20
		ITEM:���܂��� ++
	CASE 21
		ITEM:���[�^�[ ++
	CASEELSE
		ITEM:�ނꂽ���� ++
	ENDSELECT
;CHARA���ނ����ꍇ
ELSEIF CHARA && RAND:100 < �ނ�p���[T
	�ނ�p���[ = �ނ�p���[T
	�������ނ��� = 1
	GOTO FISH
;�ނ�Ȃ�������␳���Z,�ނ��܂Œ~�ς��Ă���
ELSE
	�ނ�Ȃ��␳ += 10
	�ނꂽ���� = 0
ENDIF

;��{�̌o��
EXP:MASTER:�ނ�o�� ++
SIF CHARA
	EXP:CHARA:�ނ�o�� ++
;�ނ����l�̒ǉ��o��
IF �ނꂽ����
	IF �������ނ���
		EXP:CHARA:�ނ�o�� ++
	ELSE
		EXP:MASTER:�ނ�o�� ++
	ENDIF
ENDIF
;�f�[�g�o��
IF CHK_DATENOW(CFLAG:CHARA:�f�[�g��) && CHARA > 0
	EXP:MASTER:�f�[�g�o�� ++
	EXP:CHARA:�f�[�g�o�� ++
ENDIF

;���Ȃ����ނ�����̗͌���
SIF �ނꂽ���� && !�������ނ���
	DOWNBASE:MASTER:�̗� = 50
DOWNBASE:MASTER:�C�� = 100

;�Q���҂̃\�[�X,�K���ɐݒ肵�Ă܂�,����R�}���h�������󂯂Ȃ��̂ōT���߂�,�������ނ�Ȃ��Ɩ��񔼌�
IF CHARA > 0
	;�Œ�Ŋl������\�[�X
	SOURCE:CHARA:���y = 400
	SOURCE:CHARA:� = 50

	;ABL:�]�����݂�
	IF ABL:�]�� <= 1
		SOURCE:CHARA:���y += (ABL:�]�� * 40)
		SOURCE:CHARA:� += (ABL:�e�� * 20)
	ELSEIF ABL:�]�� <= 3
		SOURCE:CHARA:���y += 200 + (ABL:�]�� * 40)
		SOURCE:CHARA:� += 50 + (ABL:�e�� * 30)
	ELSEIF ABL:�]�� <= 5
		SOURCE:CHARA:���y += 500 + (ABL:�]�� * 40)
		SOURCE:CHARA:� += 200 + (ABL:�e�� * 30)
	ELSEIF ABL:�]�� <= 8
		SOURCE:CHARA:���y += 750 + (ABL:�]�� * 60)
		SOURCE:CHARA:� += 300 + (ABL:�e�� * 40)
	ELSEIF ABL:�]�� <= 11
		SOURCE:CHARA:���y += 1000 + (ABL:�]�� * 60)
		SOURCE:CHARA:� += 600 + (ABL:�e�� * 40)
	ELSE
		SOURCE:CHARA:���y += 1600 + (ABL:�]�� * 30)
		SOURCE:CHARA:� += 1000 + (ABL:�e�� * 20)
	ENDIF
	SIF CHARA != FLAG:�f�[�g����
		SOURCE:CHARA:� = 0

	;�D���x�݂͂Ȃ�

	SOURCE:CHARA:�� = 200 + 100 * ABL:�]��
	SOURCE:CHARA:���� = 200 + 100 * ABL:�T�h���C

	;�މʂ��݂�
	SELECTCASE �ނꂽ����
	;�ނ�Ȃ�
	CASE 0
		TIMES SOURCE:CHARA:���y , 0.50
		TIMES SOURCE:CHARA:�� , 0.50
		TIMES SOURCE:CHARA:���� , 0.50
	;�؍�, ���̎�D
	CASE 610, 131
		TIMES SOURCE:CHARA:���y , 0.10
		TIMES SOURCE:CHARA:�� , 0.50
		TIMES SOURCE:CHARA:���� , 0.50
		SOURCE:CHARA:�B�� = 20
	;�E�O�C, �A�}�S, ���}�������, �C���i
	CASE 1, 2, 3, 4
		TIMES SOURCE:CHARA:���y , 1.00
		TIMES SOURCE:CHARA:�� , 1.00
		TIMES SOURCE:CHARA:���� , 1.00
		SOURCE:CHARA:�B�� = 100
	;�J�G��
	CASE 706
		;�`���m
		IF CHARA == 14
			TIMES SOURCE:CHARA:���y , 2.00
			TIMES SOURCE:CHARA:�� , 2.00
			TIMES SOURCE:CHARA:���� , 2.00
		;�z�K�q
		ELSEIF CHARA == 33
			TIMES SOURCE:CHARA:���y , 0.50
			TIMES SOURCE:CHARA:�� , 0.50
			TIMES SOURCE:CHARA:���� , 0.50
		ELSE
			TIMES SOURCE:CHARA:���y , 1.25
			TIMES SOURCE:CHARA:�� , 1.00
			TIMES SOURCE:CHARA:���� , 1.00
		ENDIF
		SOURCE:CHARA:�B�� = 150
	;�T�P, ���J�T�M, �j�W�}�X, �J�����`�[
	CASE 11, 12, 13, 15
		TIMES SOURCE:CHARA:���y , 1.50
		TIMES SOURCE:CHARA:�� , 1.50
		TIMES SOURCE:CHARA:���� , 1.50
		SOURCE:CHARA:�B�� = 200
	;���c���E�i�M
	CASE 14
		;�݂����[
		IF CHARA == 28
			TIMES SOURCE:CHARA:���y , 2.00
			TIMES SOURCE:CHARA:�� , 2.00
			TIMES SOURCE:CHARA:���� , 2.00
		ELSE
			TIMES SOURCE:CHARA:���y , 1.50
			TIMES SOURCE:CHARA:�� , 1.50
			TIMES SOURCE:CHARA:���� , 1.50
		ENDIF
		SOURCE:CHARA:�B�� = 250
	;���[�^�[
	CASE 21
		SOURCE:CHARA:�~�� = 200
	;�X�̗�, ���̒�
	CASE 609, 606
		TIMES SOURCE:CHARA:���y , 2.00
		TIMES SOURCE:CHARA:�� , 2.00
		TIMES SOURCE:CHARA:���� , 2.00
		SOURCE:CHARA:�B�� = 300
	ENDSELECT
ENDIF

;���Ԍo��
TIME += 20

;�t���O�����n��
TFLAG:SELECTCOM�̕��� = �ނꂽ����
TFLAG:SOURCE�Ȃǂɉe�����Ȃ�SELECTCOM�̕��� = CHARA + (�������ނ��� * 1000)

RETURN 1

;-------------------------------------------------
;���s�\����
;-------------------------------------------------
;�ނ������
@COM_ABLE621
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(621)
	RETURN RESULT
;�ނ�Ƃ��Ȃ�
SIF !ITEM:�ނ��
	RETURN 0
;���_�ł͂ł��Ȃ��i���j
SIF !FISHING_SPOT(CFLAG:MASTER:���݈ʒu)
	RETURN 0
;�f�[�g���̓f�[�g����Ƃ���
SIF FLAG:�f�[�g���� && TARGET != FLAG:�f�[�g����
	RETURN 0
;������
SIF CFLAG:MASTER:����
	RETURN 0
;���Ԓ�~��
SIF FLAG:70
	RETURN 0
RETURN 1

repo_name: akadiya/eratw

license: unknown


code:
;-------------------------------------------------
;������K�˂�
;-------------------------------------------------
@COM697
#DIM �Ǝ�
#DIM ���i
#DIM ���C
#DIM �����̉���
FOR LOCAL,1,CHARANUM
	IF CFLAG:LOCAL:����ʒu == CFLAG:MASTER:���݈ʒu
		SIF CFLAG:LOCAL:�o��
			CONTINUE
		SIF LOCAL == TARGET
			CONTINUE
		SIF CFLAG:LOCAL:��݈����
			SETCOLOR C_AQUA
		SIF CFLAG:LOCAL:���݈ʒu != SUKIMA() || !VISIT(LOCAL) || CFLAG:LOCAL:���_���K || BASE:LOCAL:�̗� < 1000
			SETCOLOR C_GRAY
		PRINTFORML [{LOCAL}] %OMANEKI_PLACE(LOCAL)%
		RESETCOLOR
	ENDIF
NEXT
DRAWLINE
PRINTL [999] ��߂�
INPUT
SIF RESULT == 999
	RETURN -1
SIF CFLAG:RESULT:����ʒu != CFLAG:MASTER:���݈ʒu
	RETURN -1

�Ǝ� = RESULT

;�ʂ̎q�ƃf�[�g��
IF FLAG:�f�[�g����
	PRINTFORMW %OMANEKI_PLACE(�Ǝ�)%�ɓ��낤�Ƃ������A%CALLNAME:(FLAG:�f�[�g����)%�Ɏv���������ɂ܂ꂽ
	RETURN -1
ENDIF

;�����ĂȂ����`�F�b�N
���C = 0
���i = 0
FOR LOCAL,1,CHARANUM
	IF LOCAL != �Ǝ� && CFLAG:LOCAL:���݈ʒu == CFLAG:MASTER:���݈ʒu
		SIF LOCAL == 60
			���i = 60
		SIF TALENT:LOCAL:���� && CFLAG:LOCAL:�M���x < 1000
			���C = LOCAL
	ENDIF
NEXT
;�p���X�B���o����4�l���Z��ł���n��a�͂��Ȃ��Փx������
;�A���L�������삯���Ă���̂œ�҂��Ă�Ƒ��
IF ���i || ���C
	PRINTFORM %OMANEKI_PLACE(�Ǝ�)%�ɓ��낤�Ƃ������A
	IF ���i
		PRINTFORMW �S�̂悤�Ȍ`����%CALLNAME:���i%�Ɏז����ꂽ
	ELSE
		PRINTFORMW ���b�Ȋ������%CALLNAME:���C%�ɌĂю~�߂�ꂽ
	ENDIF
	RETURN -1
ENDIF

IF TCVAR:�Ǝ�:����K��
	PRINTFORML �����͂�����߂Ă�����
	RETURN -1
ENDIF

SELECTCASE RAND:10
	CASE IS <= 1
		TFLAG:193 = 1
	CASE 2 TO 4
	;���Z
		TFLAG:193 = 2
	CASE 5,6,7
	;������Ƃ���
		TFLAG:193 = 3
	CASE 8,9
	;�グ�Ă��炦��
		TFLAG:193 = 4
ENDSELECT
SIF !TALENT:�Ǝ�:���� && !TALENT:�Ǝ�:�v�� && TFLAG:193 > 2
	TFLAG:193 --

SIF CFLAG:�Ǝ�:���݈ʒu != SUKIMA() || !VISIT(�Ǝ�) || CFLAG:�Ǝ�:���_���K || BASE:�Ǝ�:�̗� < 1000
	TFLAG:193 = 1

PRINTFORMW %CALLNAME:MASTER%��%OMANEKI_PLACE(�Ǝ�)%��K�˂�
TCVAR:�Ǝ�:����K�� = 1
[IF_DEBUG]
IF FLAG:�e�X�g�v���C�p�I�i�o����������
	CALL ONABARE(�Ǝ�)
	GOTO OWARI
ENDIF
[ENDIF]

CALL IRAI_VISIT_HOME(�Ǝ�)
SIF RESULT
	GOTO OWARI

IF DAY:2 == 3 && (DAY:3 == 13 || DAY:3 == 15) && TFLAG:193 > 1
	PRINTFORML %CALLNAME:�Ǝ�%���o�Ă���
	PRINTFORMW �u�ڂ����ړ�����A�O�p�΂����Ƀ\�o������I�v%CALLNAME:MASTER%�͖L����F����
	IF ABL:�Ǝ�:���{ >= 5 || �Ǝ� == 77 || �Ǝ� == 78
		PRINTFORML %CALLNAME:�Ǝ�%�͂��َq�����ꂽ�I
		;�����������Ă��邨�َq�������_����
		SELECTCASE RAND:5
			CASE 0
				ITEM:120 ++
			CASE 1
				ITEM:212 ++
			CASE 2
				ITEM:213 ++
			CASE 3
				ITEM:216 ++
			CASEELSE
				ITEM:376 ++
		ENDSELECT
	ELSE
		PRINTFORML %CALLNAME:�Ǝ�%�͉��b�Ȋ�����Ă���c�ǂ����u�ڂ����ځv��m��Ȃ��悤��
		PRINTFORML %CALLNAME:�Ǝ�%�͖ق��Ĕ���߂Ă��܂���
		PRINTFORML %CALLNAME:MASTER%�͔߂����Ȃ���
	ENDIF
	TIME += 10
	RETURN 1
ENDIF

IF TFLAG:193 > 1 && CFLAG:�Ǝ�:���܂��Ă�x > 300
	IF RAND:(CFLAG:�Ǝ�:���܂��Ă�x + TFLAG:�K�^�␳ * 50) >= RAND:700
		CALL ONABARE(�Ǝ�)
		GOTO OWARI
	ELSEIF ITEM:�e���u�J�^���v
		PRINTL ����A�J�^���̗l�q���c�H
		CALL ASK_YN("���o��","�����Ă���")
		IF !RESULT
			ITEM:�e���u�J�^���v --
			CALL COLORMESSAGE(@"�e���u�J�^���v�������I",C_YELLOW,2)
			CALL ONABARE(�Ǝ�)
			GOTO OWARI
		ENDIF
	ENDIF
ENDIF
SELECTCASE TFLAG:193
	CASE 1
		IF CFLAG:MASTER:���݈ʒu == CFLAG:�Ǝ�:���݈ʒu
			PRINTFORMW �ڂ̑O�ɂ���%CALLNAME:�Ǝ�%����A����ɓ���Ȃƌ���ꂽ
		ELSE
			PRINTFORMW �Ԏ����Ȃ��c�@���炩�Q�Ă���̂��낤
		ENDIF
	CASE 2
		PRINTFORMW %CALLNAME:�Ǝ�%���o�Ă���
		IF !TALENT:�Ǝ�:���� && !TALENT:�Ǝ�:�v��
			PRINTFORM %CALLNAME:�Ǝ�%�͖��f�����ɁA
		ELSE
			PRINTFORM %CALLNAME:�Ǝ�%�͐\����Ȃ������ɁA
		ENDIF
		PRINTFORMW �����͎��Ԃ��Ȃ�����܂����x�ƌ�����
		PRINTFORM ������邩�����Ă݂�ƁA
		IF !RAND:2 && !GETBIT (TFLAG:������,5)
			PRINTFORMW ������%GET_MAPNAME(MAIN_MAP)%�ɍs������Ƃ̂��Ƃ�
			CFLAG:�Ǝ�:�������K = 1
			SETBIT TFLAG:������,5
		ELSE
			PRINTFORMW ������Ƃ킩��Ȃ��A�ƌ���ꂽ
		ENDIF
		CALL COM697_1(�Ǝ�)
		TIME += 5
	CASE 3
		PRINTFORML %CALLNAME:�Ǝ�%���o�Ă���
		PRINTFORML %CALLNAME:�Ǝ�%�ɉ�����Ȃ������痈���ƌ����ƁA���������Ȃ�Əグ�Ă��炦��
		PRINTFORMW �c
		PRINTFORMW �c�c
		PRINTFORMW �c�c�c
		PRINTFORMW %CALLNAME:�Ǝ�%�Ƃ��΂炭�k�΂���
		PRINTFORMW �ʂ�ہA������邩�����Ă݂�
		IF !RAND:2 && !GETBIT (TFLAG:������,5)
			PRINTFORMW ������%GET_MAPNAME(MAIN_MAP)%�ɍs������Ƃ̂��Ƃ�
			CFLAG:�Ǝ�:�������K = 1
			SETBIT TFLAG:������,5
		ELSE
			PRINTFORMW ������Ƃ킩��Ȃ��A�ƌ���ꂽ
		ENDIF
		CALL COM697_1(�Ǝ�)
		TIME += 27
	CASE 4
		PRINTFORMW %CALLNAME:�Ǝ�%���o�Ă���
		PRINTFORMW %CALLNAME:�Ǝ�%�͊����������c
		CALL ASK_YN("�f�[�g�ɗU��","���ז�����")
		IF !RESULT || !TALENT:�Ǝ�:����
			IF !RESULT
				PRINTFORMW %CALLNAME:�Ǝ�%���f�[�g�ɗU����
			ELSE
				PRINTFORML ���ז������ė~�����Ɗ�������A���ۂ���Ă��܂���
				PRINTFORMW ����Ƀf�[�g�Ȃ�ƒ�Ă���A%CALLNAME:MASTER%�͈������������Ȃ�����
			ENDIF
			CFLAG:MASTER:���s = 60
			CFLAG:�Ǝ�:���s = 60
			CFLAG:�Ǝ�:���݈ʒu = CFLAG:MASTER:���݈ʒu
			CFLAG:�Ǝ�:�f�[�g�� = CFLAG:MASTER:���݈ʒu / 100
			CFLAG:�Ǝ�:���_���K = 1
			FLAG:�f�[�g���� = �Ǝ�
			TFLAG:�f�[�g�O�D���x = CFLAG:�Ǝ�:2
		ELSE
			CFLAG:�Ǝ�:�f�[�g�� = CFLAG:MASTER:���݈ʒu / 100
			CALL OMANEKI_ENTER(�Ǝ�)
		ENDIF
ENDSELECT

$OWARI
TIME += 3
RETURN 1

@COM697_1(ARG)
#DIM ���yUP
#DIM ��UP
#DIM ����UP

;��b�̃R���p�`
TFLAG:98 = 5
;�Œ�Ŋl������\�[�X
���yUP = 200
��UP = 0
����UP = 0
;ABL:�e�����݂�
IF ABL:ARG:�e�� <= 1
	���yUP += (ABL:ARG:�]�� * 40)
ELSEIF ABL:ARG:�e�� <= 3
	���yUP += 200 + (ABL:ARG:�]�� * 40)
ELSEIF ABL:ARG:�e�� <= 5
	���yUP += 500 + (ABL:ARG:�]�� * 40)
ELSEIF ABL:ARG:�e�� <= 8
	���yUP += 750 + (ABL:ARG:�]�� * 60)
ELSEIF ABL:ARG:�e�� <= 10
	���yUP += 1000 + (ABL:ARG:�]�� * 60)
ELSE
	���yUP += 1600 + (ABL:ARG:�]�� * 30)
ENDIF

;�D���x���݂�
IF CFLAG:ARG:2 <= 1000
	���yUP += CFLAG:ARG:2
ELSEIF CFLAG:2 <= 5000
	���yUP += 500 + (CFLAG:ARG:2 - 500) / 3
ELSE
	���yUP += 2000 + (CFLAG:ARG:2 - 5000) / 5
ENDIF
SIF ���yUP < 0
	���yUP = 0

��UP = 100 + 100 * ABL:ARG:�]��
����UP = 100 + 100 * ABL:ARG:�T�h���C

SELECTCASE ABL:MASTER:�b�p�Z�\
	CASE 0
		TIMES ���yUP , 0.20
		TIMES ����UP , 0.20
		TIMES ��UP , 0.20
	CASE 1
		TIMES ���yUP , 0.40
		TIMES ����UP , 0.40
		TIMES ��UP , 0.40
	CASE 2
		TIMES ���yUP , 0.70
		TIMES ����UP , 0.70
		TIMES ��UP , 0.70
	CASE 3
		TIMES ���yUP , 1.00
		TIMES ����UP , 1.00
		TIMES ��UP , 1.00
	CASE 4
		TIMES ���yUP , 1.20
		TIMES ����UP , 1.20
		TIMES ��UP , 1.20
	CASEELSE
		TIMES ���yUP , 1.50
		TIMES ����UP , 1.50
		TIMES ��UP , 1.50
ENDSELECT

IF TFLAG:193 == 3
	TIMES ���yUP , 3.50
	TIMES ����UP , 3.50
	TIMES ��UP , 3.50
	TFLAG:�D���x�{�[�i�X = 200
ENDIF
SOURCE:ARG:���y = ���yUP
SOURCE:ARG:���� = ����UP
SOURCE:ARG:�� = ��UP

CALL FAVOR_CALC(ARG)
CALL TRUST_CALC(ARG)
TFLAG:�D���x�{�[�i�X = 0

;-------------------------------------------------
;���s�\����
;-------------------------------------------------
;������K�˂�
@COM_ABLE697
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(697)
	RETURN RESULT
SIF AT_HOME(MASTER)
	RETURN 0
;���Ԓ�~��
SIF FLAG:70
	RETURN 0
LOCAL:1 = 0
FOR LOCAL,1,CHARANUM
	SIF CFLAG:LOCAL:�o��
		CONTINUE
	SIF CFLAG:LOCAL:����ʒu == CFLAG:MASTER:���݈ʒu && !CFLAG:LOCAL:�_�ЍݏZ && LOCAL != TARGET; && (TALENT:LOCAL:�v�� || TALENT:LOCAL:����)
		LOCAL:1 ++
NEXT

SIF !LOCAL:1
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;��b
;����n�R�}���h�@���x��1
;-------------------------------------------------
@COM300

;��b�ݐϒl��臒l�𒴂���Ǝ��s
IF TCVAR:302 && !TALENT:����
	PRINTFORML %CALLNAME:TARGET%�ɘb�������悤�Ƃ��������t��������Ȃ�
	PRINTW ������ɋC�܂�����C�����ꂽ�c
	TIME += 10
	IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
		LOSEBASE:�C�� += 50
		DOWNBASE:MASTER:�C�� += 50
		TFLAG:193 = -1
		CALL DATE_GOES_ON(1)
	ELSE
		LOSEBASE:�C�� += 100
		DOWNBASE:MASTER:�C�� += 100
		TFLAG:193 = -1
	ENDIF
	RETURN 1
ENDIF
IF MARK:�������� >= 3
	PRINTFORML %CALLNAME:TARGET%��%CALLNAME:MASTER%�Ƃ͌������������Ȃ��悤��
	SOURCE:���� = 300
	BASE:MASTER:�C�� -= 100
	RETURN -1
ENDIF
LOCAL = RAND:100
LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
SIF LOCAL:1 > 99
	LOCAL:1 = 99
;���肪�D�������Ƒ听���ɂ����s�ɂ��Ȃ�Ȃ�
SIF TCVAR:�D��
	LOCAL = 50
IF LOCAL <= 9
	;10���ő听��
	TFLAG:193 = 1
	TFLAG:98 = 2
	EXP:MASTER:��b�o�� ++
	IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
		EXP:MASTER:�f�[�g�o�� ++
		EXP:TARGET:�f�[�g�o�� ++
	ENDIF
ELSEIF LOCAL >= LOCAL:1
	;10�`1���Ŏ��s
	TFLAG:193 = -1
	TFLAG:98 = -1
ELSE
	;�c��͐���
	TFLAG:193 = 0
	TFLAG:98 = 0
ENDIF
;�搧�������͎��s���Ȃ�
SIF TCVAR:20
	TFLAG:193 = MAX(TFLAG:193,0)
IF CFLAG:TARGET:�Y���Q��
	DOWNBASE:MASTER:�C�� += 10
	SOURCE:� = 200
ELSE
	DOWNBASE:�C�� += 20
	DOWNBASE:MASTER:�C�� += 20
ENDIF

SIF ABL:���{ > ABL:MASTER:���{ + 3
	TFLAG:193 = -2

;�Œ�Ŋl������\�[�X
SOURCE:���y = 200

;ABL:�e�����݂�
IF ABL:�e�� <= 1
	SOURCE:���y += (ABL:�e�� * 40)
ELSEIF ABL:�e�� <= 3
	SOURCE:���y += 200 + (ABL:�e�� * 40)
ELSEIF ABL:�e�� <= 5
	SOURCE:���y += 500 + (ABL:�e�� * 40)
ELSEIF ABL:�e�� <= 8
	SOURCE:���y += 750 + (ABL:�e�� * 60)
ELSEIF ABL:�e�� <= 10
	SOURCE:���y += 1000 + (ABL:�e�� * 60)
ELSE
	SOURCE:���y += 1600 + (ABL:�e�� * 30)
ENDIF

;�D���x���݂�
;IF CFLAG:2 <= 1000
;	SOURCE:���y += CFLAG:2
;ELSEIF CFLAG:2 <= 5000
;	SOURCE:���y += 500 + (CFLAG:2 - 500) / 3
;ELSE
;	SOURCE:���y += 2000 + (CFLAG:2 - 5000) / 5
;ENDIF

SOURCE:���y = LIMIT(SOURCE:���y,0,5000)

SOURCE:�� = 100 + 100 * ABL:�]��
SOURCE:���� = 100 + 100 * ABL:�T�h���C

IF TFLAG:193 == -1 || TFLAG:193 == -2
	TIMES SOURCE:���y , 0.10
	TIMES SOURCE:���� , 0.50
	TIMES SOURCE:�� , 0.50
ELSEIF TFLAG:193 == 0
	TIMES SOURCE:���y , 1.00
	TIMES SOURCE:���� , 1.00
	TIMES SOURCE:�� , 1.00
ELSE
	TIMES SOURCE:���y , 2.00
	TIMES SOURCE:���� , 2.00
	TIMES SOURCE:�� , 2.00
ENDIF
SELECTCASE ABL:MASTER:�b�p�Z�\
	CASE 0
		TIMES SOURCE:���y , 0.20
		TIMES SOURCE:���� , 0.20
		TIMES SOURCE:�� , 0.20
	CASE 1
		TIMES SOURCE:���y , 0.40
		TIMES SOURCE:���� , 0.40
		TIMES SOURCE:�� , 0.40
	CASE 2
		TIMES SOURCE:���y , 0.70
		TIMES SOURCE:���� , 0.70
		TIMES SOURCE:�� , 0.70
	CASE 3
		TIMES SOURCE:���y , 1.00
		TIMES SOURCE:���� , 1.00
		TIMES SOURCE:�� , 1.00
	CASE 4
		TIMES SOURCE:���y , 1.20
		TIMES SOURCE:���� , 1.20
		TIMES SOURCE:�� , 1.20
	CASEELSE
		TIMES SOURCE:���y , 1.50
		TIMES SOURCE:���� , 1.50
		TIMES SOURCE:�� , 1.50
ENDSELECT

;��b�ݐϒl
IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
	TCVAR:301 += 100 / (2 + ABL:MASTER:�b�p�Z�\)
ELSE
	TCVAR:301 += 200 / (2 + ABL:MASTER:�b�p�Z�\)
ENDIF

TIME += 10
;IF TARGET == 110
;	PRINTFORML �M�k�����̂ł�����Ǝ��Ԃ����������c
;	TIME += 15
;ENDIF
EXP:MASTER:��b�o�� ++
IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
	EXP:MASTER:�f�[�g�o�� ++
	EXP:TARGET:�f�[�g�o�� ++
	CALL DATE_GOES_ON(1)
ENDIF

;���肪�D�������ƌ��ʑ啝�ጸ
IF TCVAR:�D��
	TIMES SOURCE:���y , 0.10
	TIMES SOURCE:���� , 0.10
	TIMES SOURCE:�� , 0.10
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE300
;��b���s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(300)
	RETURN RESULT
;������
SIF CFLAG:���� && !CFLAG:�Y���Q��
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;��~���͕s��
SIF FLAG:70
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�����🹂��
;����n�R�}���h�@���x��1
;-------------------------------------------------
@COM301
LOCAL = RAND:100
LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
SIF LOCAL:1 > 99
	LOCAL:1 = 99
IF LOCAL <= 9
	;10���ő听��
	EXP:MASTER:��b�o�� ++
	TFLAG:193 = 1
	TFLAG:98 = 2
ELSEIF LOCAL >= LOCAL:1
	;10�`1���Ŏ��s
	TFLAG:193 = -1
	TFLAG:98 = -2
ELSE
	;�c��͐���
	TFLAG:193 = 0
	TFLAG:98 = 0
ENDIF
;�搧�������͎��s���Ȃ�
SIF TCVAR:20
	TFLAG:193 = MAX(TFLAG:193,0)
DOWNBASE:MASTER:�C�� += 100
DOWNBASE:MASTER:�̗� += 50

;�M��
TFLAG:98 += 3

;���̏�ɋ���TARGET�S���ŉ�
LOCAL:1 = TARGET
FOR LOCAL, 1, GET_TARGETNUM() + 1
	SIF TARGET:LOCAL <= 0
		CONTINUE
	SIF CFLAG:(TARGET:LOCAL):����
		CONTINUE
	TARGET = TARGET:LOCAL
	CALL COM301_1
NEXT
TARGET = LOCAL:1
SIF GETBIT(TCVAR:MASTER:���ʂȂ���, 0)
	CLEARBIT TCVAR:MASTER:���ʂȂ���, 0
TIME += 30
RETURN 1

@COM301_1

DOWNBASE:�C�� += 10

;�Œ�Ŋl������\�[�X
SOURCE:���y = 500

;ABL:�]�����݂�
IF ABL:�]�� <= 1
	SOURCE:���y += (ABL:�]�� * 60)
ELSEIF ABL:�]�� <= 3
	SOURCE:���y += 200 + (ABL:�]�� * 60)
ELSEIF ABL:�]�� <= 5
	SOURCE:���y += 500 + (ABL:�]�� * 60)
ELSEIF ABL:�]�� <= 8
	SOURCE:���y += 750 + (ABL:�]�� * 75)
ELSEIF ABL:�]�� <= 11
	SOURCE:���y += 1000 + (ABL:�]�� * 75)
ELSE
	SOURCE:���y += 2000 + (ABL:�]�� * 30)
ENDIF

;�D���x���݂�
IF CFLAG:2 <= 500
	SOURCE:���y += CFLAG:2
ELSEIF CFLAG:2 <= 5000
	SOURCE:���y += 500 + (CFLAG:2 - 500) / 3
ELSE
	SOURCE:���y += 2000 + (CFLAG:2 - 5000) / 5
ENDIF
SIF SOURCE:���y < 0
	SOURCE:���y = 0

SOURCE:�� = 200 + 100 * ABL:�]��
SOURCE:���� = 200 + 100 * ABL:�T�h���C

IF TFLAG:193 == -1
	TIMES SOURCE:���y , 0.10
	TIMES SOURCE:���� , 0.50
	TIMES SOURCE:�� , 0.50
ELSEIF TFLAG:193 == 0
	TIMES SOURCE:���y , 1.00
	TIMES SOURCE:���� , 1.00
	TIMES SOURCE:�� , 1.00
ELSE
	TIMES SOURCE:���y , 2.00
	TIMES SOURCE:���� , 2.00
	TIMES SOURCE:�� , 2.00
ENDIF

IF GETBIT(TCVAR:MASTER:���ʂȂ���, 0)
	SELECTCASE TARGET
		CASE 15, 16, 17, 38, 50, 54, 59, 75
			TIMES SOURCE:���y , 2.00
			TIMES SOURCE:���� , 2.00
			TIMES SOURCE:�� , 2.00
		CASEELSE
			TIMES SOURCE:���y , 1.50
			TIMES SOURCE:���� , 1.50
			TIMES SOURCE:�� , 1.50
	ENDSELECT
ENDIF

;���������񂾃t���O
TCVAR:300 = 1440 * DAY + TIME

RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE301
;�����🹂����s����
SIF !TFLAG:100
	RETURN 0
SIF TFLAG:131
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(301)
	RETURN RESULT
;�񎞊ԊԊu
SIF TIME_PROGRESS(TCVAR:300) < 120
	RETURN 0
;������
SIF CFLAG:����
	RETURN 0
;�Y���Q��
SIF CFLAG:�Y���Q��
	RETURN 0
;����
;SIF CFLAG:MASTER:���݈ʒu == 13 || CFLAG:MASTER:���݈ʒu == 24 || CFLAG:MASTER:���݈ʒu == 30 || CFLAG:MASTER:���݈ʒu == 39
SIF BATHCHECK(CFLAG:MASTER:���݈ʒu)
	RETURN 0
;���
SIF CFLAG:350 == 49
	RETURN 0
;�f�[�g��
SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
	RETURN 0
;�O�o��Ŏ��s���͐e��3��v��
SIF (GET_MAPID(CFLAG:MASTER:���݈ʒu) != MAIN_MAP) && ABL:�e�� < 3
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;��~���͕s��
SIF FLAG:70
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�X�L���V�b�v
;����n�R�}���h�@���x��1
;-------------------------------------------------
@COM302
LOCAL = RAND:100
LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
SIF LOCAL:1 > 99
	LOCAL:1 = 99
IF LOCAL <= 9
	;10���ő听��
	TFLAG:193 = 1
	TFLAG:98 = 1
	IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
		EXP:MASTER:�f�[�g�o�� ++
		EXP:TARGET:�f�[�g�o�� ++
	ENDIF
ELSEIF LOCAL >= LOCAL:1
	;10�`1���Ŏ��s
	TFLAG:193 = -1
	TFLAG:98 = -2
ELSE
	;�c��͐���
	TFLAG:193 = 0
ENDIF
;���s�����ꍇ�ł��A����̐Ȃł�10%�Ő���
SIF TFLAG:193 == -1 && RAND:100 <= 9 && CFLAG:350 == 49
	TFLAG:193 = 0
;�搧�������͎��s���Ȃ�
SIF TCVAR:20
	TFLAG:193 = MAX(TFLAG:193,0)

DOWNBASE:�C�� += 30
DOWNBASE:MASTER:�C�� += 30

;�Œ�Ŋl������\�[�X
SOURCE:���y = 100
SOURCE:� = 100
SOURCE:�I�o = 20
SOURCE:���� = 50

;ABL:�e�����݂�
IF ABL:�e�� <= 1
	SOURCE:� += (ABL:�e�� * 30)
ELSEIF ABL:�e�� <= 3
	SOURCE:���y += 100 + (ABL:�e�� * 40)
	SOURCE:� += 200 + (ABL:�e�� * 30)
ELSEIF ABL:�e�� <= 5
	SOURCE:���y += 400 + (ABL:�e�� * 50)
	SOURCE:� += 400 + (ABL:�e�� * 30)
ELSEIF ABL:�e�� <= 8
	SOURCE:���y += 700 + (ABL:�e�� * 60)
	SOURCE:� += 600 + (ABL:�e�� * 40)
ELSEIF ABL:�e�� <= 11
	SOURCE:���y += 1200 + (ABL:�e�� * 80)
	SOURCE:� += 800 + (ABL:�e�� * 40)
ELSE
	SOURCE:���y += 2000 + (ABL:�e�� * 50)
	SOURCE:� += 1800 + (ABL:�e�� * 20)
ENDIF

;�D���x���݂�
IF CFLAG:2 <= 500
	SOURCE:���y += CFLAG:2
ELSEIF CFLAG:2 <= 5000
	SOURCE:���y += 500 + (CFLAG:2 - 500) / 3
ELSE
	SOURCE:���y += 2000 + (CFLAG:2 - 5000) / 5
ENDIF
SIF SOURCE:���y < 0
	SOURCE:���y = 0

LOCAL = 0
;�e�����Ⴂ�ƍD���x�ቺ
IF ABL:�e�� == 0
	LOCAL -= 3
ELSEIF ABL:�e�� == 1
	LOCAL -= 2
ELSEIF ABL:�e�� == 2
	LOCAL -= 1
ENDIF
;�D���x���Ⴂ�ƍD���x�ቺ
IF CFLAG:2 <= 50
	LOCAL -= 3
ELSEIF CFLAG:2 <= 100
	LOCAL -= 2
ELSEIF CFLAG:2 <= 250
	LOCAL -= 1
ENDIF

SOURCE:�� = 100 + 200 * ABL:�]��
SOURCE:���� = 100 + 200 * ABL:�T�h���C

;�D���x�ω�
TFLAG:97 += LOCAL

IF TFLAG:193 == -1
	TIMES SOURCE:���y , 0.10
	TIMES SOURCE:� , 0.50
	TIMES SOURCE:���� , 0.50
	TIMES SOURCE:�� , 0.50
ELSEIF TFLAG:193 == 0
	TIMES SOURCE:���y , 1.00
	TIMES SOURCE:� , 1.00
	TIMES SOURCE:���� , 1.00
	TIMES SOURCE:�� , 1.00
ELSE
	TIMES SOURCE:���y , 2.00
	TIMES SOURCE:� , 2.00
	TIMES SOURCE:���� , 2.00
	TIMES SOURCE:�� , 2.00
ENDIF
TIME += 10
IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
	EXP:MASTER:�f�[�g�o�� ++
	EXP:TARGET:�f�[�g�o�� ++
	CALL DATE_GOES_ON(1)
ELSE
	;�X�L���V�b�v�����t���O
	TCVAR:303 = 1440 * DAY + TIME
ENDIF

RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE302
;�X�L���V�b�v���s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(302)
	RETURN RESULT
;1���ԊԊu
SIF TIME_PROGRESS(TCVAR:303) < 60 && !CHK_DATENOW(CFLAG:�f�[�g��)
	RETURN 0
;������
SIF CFLAG:����
	RETURN 0
;�Y���Q��
SIF CFLAG:�Y���Q��
	RETURN 0
;�d����
SIF CFLAG:�s�� == 5
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;��~���͕s��
SIF FLAG:70
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�ӂ�
;����n�R�}���h�@���x��1
;-------------------------------------------------
@COM303
LOCAL = RAND:100
LOCAL:1 = ABL:MASTER:�b�p�Z�\ * 2 + ABL:�e��

IF LOCAL < LOCAL:1
	TFLAG:193 = 1
	;�M��
	TFLAG:98 = 1
ELSEIF LOCAL < LOCAL:1 + 30
	TFLAG:193 = 0
ELSE
	TFLAG:193 = -1
ENDIF

DOWNBASE:MASTER:�̗� += 50
DOWNBASE:MASTER:�C�� += 200

IF TARGET > 0 && CFLAG:�u�`�M�� && !CFLAG:����
	;�Œ�Ŋl������\�[�X
	SOURCE:���� = 400
	;ABL:�]���`�F�b�N
	IF ABL:�]�� <= 1
		SOURCE:���� += 2000 - (ABL:�]�� * 30)
	ELSEIF ABL:�]�� <= 3
		SOURCE:���� += 1000 - (ABL:�]�� * 30)
	ELSEIF ABL:�]�� <= 5
		SOURCE:���� += 750 - (ABL:�]�� * 40)
	ELSEIF ABL:�]�� <= 8
		SOURCE:���� += 500 - (ABL:�]�� * 20)
	ELSEIF ABL:�]�� <= 11
		SOURCE:���� += 200 - (ABL:�]�� * 20)
	ELSE
		SOURCE:���� += 100 - (ABL:�]�� * 10)
	ENDIF

	;ABL:�e���`�F�b�N
	IF ABL:�e�� <= 1
		SOURCE:���� -= (ABL:�e�� * 60)
	ELSEIF ABL:�e�� <= 3
		SOURCE:���� -= (ABL:�e�� * 60)
	ELSEIF ABL:�e�� <= 5
		SOURCE:���� -= (ABL:�e�� * 60)
	ELSEIF ABL:�e�� <= 8
		SOURCE:���� -= (ABL:�e�� * 50)
	ELSEIF ABL:�e�� <= 11
		SOURCE:���� -= (ABL:�e�� * 40)
	ELSE
		SOURCE:���� -= (ABL:�e�� * 30)
	ENDIF

	SIF SOURCE:���� < 0
		SOURCE:���� = 0
ENDIF
;�������Ă�����{���ԉ���
IF TFLAG:193 == 0
	CFLAG:�u�`�M�� = 0
	CFLAG:�s�@�� = 0
	BASE:�{�� /= 2
ELSEIF TFLAG:193 == 1
	CFLAG:�u�`�M�� = 0
	CFLAG:�s�@�� = 0
	BASE:�{�� = 0
ELSE
	;���������I�c�O���I
ENDIF
SIF BASE:�{�� < 0
	BASE:�{�� = 0
IF ITEM:�َq�܂� && MARK:TARGET:�������� == 1
	IF TFLAG:193 == -1
		TFLAG:193 = -2
	ELSE
		MARK:TARGET:�������� = 0
		TFLAG:193 = 2
		ITEM:�َq�܂� --
	ENDIF
ENDIF

;���v����
IF ABL:�]�� <= 5
	TIME += 90
ELSEIF ABL:�]�� <= 10
	TIME += 60
ELSE
	TIME += 45
ENDIF

RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE303
;�ӂ���s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(303)
	RETURN RESULT
;�{�蒆�łȂ�
SIF !CFLAG:�u�`�M�� && !(ITEM:�َq�܂� && MARK:TARGET:�������� == 1)
	RETURN 0
;������
SIF CFLAG:����
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;��~���͕s��
SIF FLAG:70
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�d������`��
;����n�R�}���h�@���x��1
;-------------------------------------------------
@COM304
SIF FLAG:70 && CFLAG:TARGET:350 == 41
	RETURN 0

CALL JOB_EFFICIENCY(CFLAG:TARGET:350)

IF FLAG:70
	IF BASE:�d���� <= 0
		PRINTFORML ����%CALLNAME:TARGET%�̎d���͕Еt����
		BASE:MASTER:TSP -= 10
		RETURN 0
	ELSE
		BASE:MASTER:TSP -= 200
	ENDIF
ELSE
	SELECTCASE CFLAG:350
		;���|
		CASE 40
			DOWNBASE:MASTER:�̗� += 50
			DOWNBASE:MASTER:�C�� += 100
			SIF TALENT:MASTER:���|����
				DOWNBASE:MASTER:�C�� -= 50
		;��b
		CASE 41
			DOWNBASE:MASTER:�̗� += 50
			DOWNBASE:MASTER:�C�� += 150
		;�퓬
		CASE 42
			DOWNBASE:MASTER:�̗� += 200
			DOWNBASE:MASTER:�C�� += 50
		;���{
		CASE 43
			DOWNBASE:MASTER:�̗� += 50
			DOWNBASE:MASTER:�C�� += 200
		;����
		CASE 44
			DOWNBASE:MASTER:�̗� += 50
			DOWNBASE:MASTER:�C�� += 100
		CASE 46
			DOWNBASE:MASTER:�̗� += 50
			DOWNBASE:MASTER:�C�� += 50
	ENDSELECT
	;���v����
	IF CFLAG:TARGET:350 == 48 || CFLAG:TARGET:350 == 50
		TIME += 30
	ELSE
		;�d���̎��q�����ƌ�Еt����`��14���`14��30���܂�
		IF TARGET == 67 && TIME >= 840
			TIME += 30
		;�d���̎��q�����ƌ�Еt����`��14��10���`14��30���܂�
		ELSEIF TARGET == 67 && TIME >= 850
			TIME += 20
		;�d���̎��q�����ƌ�Еt����`��14��20���`14��30���܂�
		ELSEIF TARGET == 67 && TIME >= 860
			TIME += 10
		;�G�����̌Ăэ��ݎ�`��
		ELSEIF TARGET == 44 && TCVAR:TARGET:354 < 25
			TIME += 30
		ELSE
			TIME += 60
		ENDIF
	ENDIF
	DOWNBASE:�C�� += 10
	;�M��
	TFLAG:98 += 5

	;�Œ�Ŋl������\�[�X
	SOURCE:���y = 300
	SIF CFLAG:TARGET:350 == 49
		SOURCE:���y += 200

	;ABL:�]�����݂�
	IF ABL:�]�� <= 1
		SOURCE:���y += (ABL:�]�� * 50)
	ELSEIF ABL:�]�� <= 3
		SOURCE:���y += 100 + (ABL:�]�� * 40)
	ELSEIF ABL:�]�� <= 5
		SOURCE:���y += 200 + (ABL:�]�� * 50)
	ELSEIF ABL:�]�� <= 8
		SOURCE:���y += 400 + (ABL:�]�� * 70)
	ELSEIF ABL:�]�� <= 11
		SOURCE:���y += 500 + (ABL:�]�� * 60)
	ELSE
		SOURCE:���y += 800 + (ABL:�]�� * 40)
	ENDIF

	;ABL:�e���`�F�b�N
	IF ABL:�e�� <= 1
		SOURCE:���y += 70 + (ABL:�e�� * 50)
	ELSEIF ABL:�e�� <= 3
		SOURCE:���y += 120 + (ABL:�e�� * 50)
	ELSEIF ABL:�e�� <= 5
		SOURCE:���y += 200 + (ABL:�e�� * 50)
	ELSEIF ABL:�e�� <= 8
		SOURCE:���y += 500 + (ABL:�e�� * 40)
	ELSEIF ABL:�e�� <= 11
		SOURCE:���y += 800 + (ABL:�e�� * 40)
	ELSE
		SOURCE:���y += 1200 + (ABL:�e�� * 30)
	ENDIF

	;�D���x���݂�
	IF CFLAG:2 <= 500
		SOURCE:���y += CFLAG:2
	ELSEIF CFLAG:2 <= 5000
		SOURCE:���y += 500 + (CFLAG:2 - 500) / 3
	ELSE
		SOURCE:���y += 2000 + (CFLAG:2 - 5000) / 5
	ENDIF
	SIF SOURCE:���y < 0
		SOURCE:���y = 0

	SOURCE:�� = 230 + 80 * ABL:�]��
	SOURCE:���� = 150 + 200 * ABL:�T�h���C
ENDIF
SIF BASE:TARGET:�d���� <= 0
	CALL CHARA_JOBEND(TARGET)
RETURN 1

@JOB_EFFICIENCY(ARG)
IF ARG >= 40 && ARG <= 45
	LOCAL = RAND:100
	LOCAL:1 = 75 + ABL:MASTER:ARG * 5
	IF LOCAL <= 10 + ABL:MASTER:ARG * 2
		;�Z�\����ő听��
		TFLAG:193 = 1
		LOCAL:2 = (50 + (ABL:MASTER:ARG) * 75) * 2
		TFLAG:98 = 2
	ELSEIF LOCAL >= LOCAL:1
		;10�`1���Ŏ��s
		TFLAG:193 = -1
		LOCAL:2 = 0
		TFLAG:98 = -1
	ELSE
		;�c��͐���
		TFLAG:193 = 0
		LOCAL:2 = 50 + (ABL:MASTER:ARG) * 75
		TFLAG:98 = 0
	ENDIF
ELSEIF ARG == 46
	LOCAL = RAND:100
	LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
	SIF LOCAL:1 > 99
		LOCAL:1 = 99
	LOCAL:2 = 0
	IF LOCAL <= 9
		;10���ő听��
		TFLAG:193 = 1
		TFLAG:98 = 2
		EXP:MASTER:��b�o�� ++
	ELSEIF LOCAL >= LOCAL:1
		;10�`1���Ŏ��s
		TFLAG:193 = -1
		TFLAG:98 = -1
	ELSE
		;�c��͐���
		TFLAG:193 = 0
		TFLAG:98 = 0
	ENDIF
ENDIF

SELECTCASE ARG
	;���|
	CASE 40
		SIF TFLAG:193 == 1
		EXP:MASTER:���|�o�� ++
		SIF !RAND:4
		EXP:MASTER:���|�o�� ++
	;��b
	CASE 41
		SIF TFLAG:193 == 1
		EXP:MASTER:��b�o�� ++
		SIF !RAND:4
		EXP:MASTER:��b�o�� ++
	;�퓬
	CASE 42
		SIF TFLAG:193 == 1
		EXP:MASTER:�퓬�o�� ++
		SIF !RAND:4
		EXP:MASTER:�퓬�o�� ++
	;���{
	CASE 43
		SIF TFLAG:193 == 1
		EXP:MASTER:�w�K�o�� ++
		SIF !RAND:4
		EXP:MASTER:�w�K�o�� ++
	;����
	CASE 44
		SIF TFLAG:193 == 1
			EXP:MASTER:�����o�� ++
		EXP:MASTER:�����o�� ++
	;���y
	;CASE 45
	;����ЂÂ�
	CASE 50
		SIF TFLAG:193 == 1
		EXP:MASTER:���|�o�� ++
		SIF !RAND:4
		EXP:MASTER:���|�o�� ++
ENDSELECT

;��V�{��
LOCAL:4 = TCVAR:TARGET:����

;���������d���ʌ���
LOCAL:3 = (LOCAL:2 + RAND:150)

;���R���Ԓ�~���͉�b�n�̎�`���͂ł��Ȃ�
SIF FLAG:70 && GROUPMATCH(ARG, 41)
	LOCAL:3 = 0
SIF TCVAR:TARGET:��`���Ȃ� == 2 && FLAG:70
	LOCAL:3 /= 5
;�����m��
IF TARGET == 52 && DAY % 7 == 4
	FLAG:���܌o�� ++
	SIF ABL:MASTER:���{ > RAND:5
		FLAG:���܌o�� ++
	IF FLAG:���܌o�� > (100 - ABL:MASTER:���{ * 10) && !TALENT:MASTER:�����m��
		PRINTFORMW %CALLNAME:MASTER%�͉��x�����܂���`���Ă��邤���ɁA���悤���܂˂�[�����m��]��g�ɂ���
		TALENT:MASTER:�����m�� = 1
	ENDIF
ENDIF

;�Ăэ��݂͎d���ʏ��Ȃ߁i�G�����j
SIF TARGET == 44 && CFLAG:TARGET:350 == 41
	LOCAL:3 /= 2
;�݂����[�͗����o���ɂ��܂�
SIF TARGET == 28
	EXP:MASTER:�����o�� ++
;TCVAR:315��2����Ȃ���Ύd���ʌ���
IF TCVAR:TARGET:��`���Ȃ� != 2
	BASE:�d���� = BASE:�d���� - LOCAL:3
ENDIF
IF BASE:�d���� < 0 && CFLAG:TARGET:20 > 0
	BASE:�d���� = 1
ELSEIF BASE:�d���� < 0
	BASE:�d���� = 0
ENDIF
;���������A�i�^�̎d���ʂ𑝉��i��V�ɉe���j
TCVAR:MASTER:��`������ += LOCAL:3 * LOCAL:4
TCVAR:TARGET:��`������ += LOCAL:3
IF ARG != 46
	PRINTFORML ���Ȃ����d����{LOCAL:3}
ENDIF

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE304
;�d������`�����s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(304)
	RETURN RESULT
;�d�����łȂ�
SIF CFLAG:�s�� != 5
	RETURN 0
;����Q���҂͕ʈ���
SIF GROUPMATCH(CFLAG:�E��, ENKAI_SANKA, �����Ԃ��)
	RETURN 0
SIF TCVAR:315 == 1
	RETURN 0
SIF CFLAG:350 == 47
	RETURN 0
;�d�����I����Ă�
SIF BASE:�d���� <= 0
	RETURN 0
;������
SIF CFLAG:����
	RETURN 0
;�Y���Q��
SIF CFLAG:�Y���Q��
	RETURN 0
;�f�[�g��
SIF CHK_DATENOW(CFLAG:�f�[�g��)
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�G�����Ă��炤
;����n�R�}���h�@���x��2
;-------------------------------------------------
@COM305
IF TALENT:MASTER:�̌^ > TALENT:�̌^ + 2
	PRINTFORML %CALLNAME:MASTER%�̓����ڂ���ꂽ%CALLNAME:TARGET%�͊^�����݂Ԃ��ꂽ�悤�Ȑ����グ��
	PRINTFORML %CALLNAME:MASTER%�͍Q�Ăē����ǂ���
	BASE:�̗� -= 500
	BASE:�C�� -= 500
	TFLAG:193 = -5
	TFLAG:�D���x����Ȃ� = 1
	TFLAG:97 = -20
	RETURN -1
ELSE
LOCAL = RAND:110
LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
SIF LOCAL:1 > 109
	LOCAL:1 = 109
IF LOCAL <= 9
	;10���ő听��
	TFLAG:193 = 1
	;�M��
	TFLAG:98 = 5
ELSEIF LOCAL >= LOCAL:1
	;10�`1���Ŏ��s
	TFLAG:193 = -1
	;�M��
	TFLAG:98 = -2
ELSE
	;�c��͐���
	TFLAG:193 = 0
	;�M��
	TFLAG:98 = 3
ENDIF
;�搧�������͎��s���Ȃ�
SIF TFLAG:102 == 3
	TFLAG:193 = MAX(TFLAG:193,0)
DOWNBASE:�C�� += 100
DOWNBASE:MASTER:�C�� += 50

;�Œ�Ŋl������\�[�X
SOURCE:� = 170
SOURCE:�I�o = 55
SOURCE:���� = 50
SIF TFLAG:193 == -1
	SOURCE:���� += 150

;ABL:�e�����݂�
IF ABL:�e�� <= 1
	SOURCE:� += (ABL:�e�� * 20)
ELSEIF ABL:�e�� <= 3
	SOURCE:� += 200 + (ABL:�e�� * 20)
ELSEIF ABL:�e�� <= 5
	SOURCE:� += 400 + (ABL:�e�� * 20)
ELSEIF ABL:�e�� <= 8
	SOURCE:� += 600 + (ABL:�e�� * 30)
	SOURCE:�I�o += 200 + (ABL:�~�] * 10)
ELSEIF ABL:�e�� <= 11
	SOURCE:� += 800 + (ABL:�e�� * 30)
	SOURCE:�I�o += 300 + (ABL:�~�] * 10)
ELSE
	SOURCE:� += 1800 + (ABL:�e�� * 20)
	SOURCE:�I�o += 700 + (ABL:�~�] * 10)
ENDIF

;�D���x���݂�
IF CFLAG:2 <= 500
	SOURCE:���� = CFLAG:2 / 5
ELSEIF CFLAG:2 <= 5000
	SOURCE:���� = 150 + CFLAG:2 / 20
ELSE
	SOURCE:���� = 400 + CFLAG:2 / 100
ENDIF
SIF SOURCE:���� < 0
	SOURCE:���� = 0

LOCAL = 0
;�D���x���Ⴂ�ƍD���x�ቺ
IF CFLAG:2 <= 50
	LOCAL -= 3
ELSEIF CFLAG:2 <= 100
	LOCAL -= 2
ELSEIF CFLAG:2 <= 250
	LOCAL -= 1
ENDIF

SOURCE:�� = 120 + 240 * ABL:�]��

;�D���x�ω�
TFLAG:97 += LOCAL

IF TFLAG:193 == -1
	TIMES SOURCE:� , 0.50
	TIMES SOURCE:�� , 0.50
	TIMES SOURCE:�I�o , 0.40
ELSEIF TFLAG:193 == 0
	TIMES SOURCE:� , 1.00
	TIMES SOURCE:�� , 1.00
	TIMES SOURCE:�I�o , 0.90
ELSE
	TIMES SOURCE:� , 1.50
	TIMES SOURCE:�� , 2.00
	TIMES SOURCE:�I�o , 1.80
ENDIF
TIME += 20
CALL SET_DERAY(6,TARGET)
;�G���t���O
TCVAR:310 = 1440 * DAY + TIME
RETURN 1
ENDIF

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE305
;�G�����s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(305)
	RETURN RESULT
;��ꍇ�����x1
SIF TCVAR:MASTER:��ꍇ�� < 1
	RETURN 0
;�����̂�
SIF !(INROOM(CFLAG:MASTER:���݈ʒu))
	RETURN 0
;���C��
SIF BATHROOM()
	RETURN 0
;������
SIF CFLAG:����
	RETURN 0
;�d����
SIF CFLAG:�s�� == 5
	RETURN 0
;�C�^�Y�����A�Y���Q���͖���
SIF CFLAG:�C�^�Y�� || CFLAG:�Y���Q��
	RETURN 0
;1���ԊԊu
SIF TIME_PROGRESS(TCVAR:310) < 60
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;�V�b�N�X�i�C���̐�
SIF TEQUIP:�V�b�N�X�i�C��
	RETURN 0
;��~���͕s��
SIF FLAG:70
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�����𕏂ł�
;����n�R�}���h�@���x��2
;-------------------------------------------------
@COM306
;-------------------------------------------------
;�\�[�X�ǉ�����
;-------------------------------------------------
;�j�Z�}��
TFLAG:2 = 1

;����̗́A�C��
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 10
	CUP:���u = 30 + ABL:PLAYER:�w * 5
;���ߕ␳
SIF TEQUIP:1 > 1
	TIMES SOURCE:���u , 0.50
ELSE
DOWNBASE:�̗� += 5
DOWNBASE:�C�� += 30
CUP:���u = BASE:TARGET:���[�h / 100 + 30 + ABL:PLAYER:�w * 5
SOURCE:���y = 150
SOURCE:� = 100
SOURCE:�~�� = 30
SOURCE:�I�o = 10
SOURCE:���� = 150 - BASE:TARGET:���[�h / 100
SOURCE:�� = 120
IF TALENT:�D�P == 1
	DOWNBASE:�̗� += 5
	DOWNBASE:�C�� += 30
	SOURCE:���y = 350 + 240 * ABL:�]��
	SOURCE:� = 150
	SOURCE:���� = 50
	SOURCE:�� = 120
	SIF TALENT:����
		EXP:����o�� ++
ENDIF
;���ߕ␳
IF TEQUIP:1 > 1
	TIMES SOURCE:���u , 0.50
	TIMES SOURCE:�~�� , 0.70
	TIMES SOURCE:�I�o , 0.30
ENDIF
IF !TALENT:���� && !TALENT:�v��
	CUP:���u /= 2
	SOURCE:���y /= 2
ENDIF
;�D���x�ω�
IF ABL:�e�� <= 5
	TFLAG:97 -= 3
	TFLAG:193 = -1
ELSEIF TALENT:�D�P
	TFLAG:97 += 3
	TFLAG:193 = 1
ENDIF
;-------------------------------------------------
;����\�[�X����
;-------------------------------------------------
;�}���A��R�����ɂ́A�}�T�\�[�X�ǉ�
SIF TALENT:���Ȉ� < 0 || TALENT:��R
	SOURCE:�T�� += 20

;-------------------------------------------------
;�o���̏���
;-------------------------------------------------
IF HETEROSEX(TARGET,PLAYER)
	EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 1
	EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 1
ENDIF
TIME += 10
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE306
;�������ł���s����
SIF !TFLAG:100
	RETURN 0
SIF !TARGET
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(306)
	RETURN RESULT
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;��ꍇ�����x1
SIF TCVAR:MASTER:��ꍇ�� < 1
	RETURN 0
;�d����
SIF CFLAG:�s�� == 5
	RETURN 0
;�r�g�p��
SIF TFLAG:61
	RETURN 0
SIF GETBIT (TCVAR:26,1)
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�j���܂�
;����n�R�}���h�@���x��2
;-------------------------------------------------
@COM307
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 20
	SOURCE:��� = 150
ELSE
	TIME += 10

	LOCAL = RAND:110
	LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
	SIF LOCAL:1 > 109
		LOCAL:1 = 109
	IF LOCAL <= 9
		;�听��
		TFLAG:193 = 1
		TFLAG:98 = 2
	ELSEIF LOCAL >= LOCAL:1
		;���s
		TFLAG:193 = -1
		TFLAG:98 = -2
	ELSE
		;�c��͐���
		TFLAG:193 = 0
		TFLAG:98 = 0
	ENDIF

	;�搧�������͎��s���Ȃ�
	SIF TFLAG:102 == 3
		TFLAG:193 = MAX(TFLAG:193,0)

	IF CFLAG:TARGET:����
		DOWNBASE:MASTER:�C�� += 50
	ELSE
		DOWNBASE:�̗� += 20
		DOWNBASE:�C�� += 50
		DOWNBASE:MASTER:�C�� += 50
	ENDIF

;�Œ�Ŋl������\�[�X
SOURCE:���y = 100
SOURCE:��� = 150
SOURCE:���� = 120

;ABL:�e�����݂�
IF ABL:�e�� <= 3
	SOURCE:���y += 100 + (ABL:�e�� * 20)
	SOURCE:� += 150 + (ABL:�e�� * 30)
ELSEIF ABL:�e�� <= 5
	SOURCE:���y += 300 + (ABL:�e�� * 40)
	SOURCE:� += 350 + (ABL:�e�� * 30)
ELSEIF ABL:�e�� <= 8
	SOURCE:���y += 600 + (ABL:�e�� * 50)
	SOURCE:� += 500 + (ABL:�e�� * 40)
ELSEIF ABL:�e�� <= 11
	SOURCE:���y += 800 + (ABL:�e�� * 70)
	SOURCE:� += 700 + (ABL:�e�� * 60)
ELSE
	SOURCE:���y += 1200 + (ABL:�e�� * 40)
	SOURCE:� += 1500 + (ABL:�e�� * 20)
ENDIF

;�D���x���݂�
IF CFLAG:2 <= 500
	SOURCE:���y += CFLAG:2
ELSEIF CFLAG:2 <= 5000
	SOURCE:���y += 200 + (CFLAG:2 - 500) / 3
ELSE
	SOURCE:���y += 1000 + (CFLAG:2 - 5000) / 5
ENDIF
SIF SOURCE:���y < 0
	SOURCE:���y = 0

;�Q�Ă�ꍇ����
IF CFLAG:���� && SOURCE:���y > 0
	SOURCE:���y = SOURCE:���y / 2
	SOURCE:� = SOURCE:� / 2
	SOURCE:���� = SOURCE:���� * 2
ENDIF

LOCAL = 0
;�������͍D���x�ω�����
IF !CFLAG:����
	;�e�����Ⴂ�ƍD���x�ቺ
	IF ABL:�e�� == 0
		LOCAL -= 3
	ELSEIF ABL:�e�� == 1
		LOCAL -= 2
	ELSEIF ABL:�e�� == 2
		LOCAL -= 1
	ENDIF
	;�D���x���Ⴂ�ƍD���x�ቺ
	IF CFLAG:2 <= 50
		LOCAL -= 3
	ELSEIF CFLAG:2 <= 100
		LOCAL -= 2
	ELSEIF CFLAG:2 <= 250
		LOCAL -= 1
	ENDIF
ENDIF

;�D���x�ω�
TFLAG:97 += LOCAL

;�M���x�ω�
;TFLAG:98 += 1

IF TFLAG:193 == -1
	TIMES SOURCE:���y , 0.10
	TIMES SOURCE:� , 0.50
	TIMES SOURCE:�� , 0.50
	TIMES SOURCE:���] , 1.50
	TIMES SOURCE:���� , 1.50
ELSEIF TFLAG:193 == 0
	TIMES SOURCE:���y , 1.00
	TIMES SOURCE:� , 1.00
	TIMES SOURCE:�� , 1.00
	TIMES SOURCE:���] , 1.00
ELSE
	TIMES SOURCE:���y , 2.00
	TIMES SOURCE:� , 2.00
	TIMES SOURCE:�� , 2.00
	TIMES SOURCE:���] , 0.50
	TIMES SOURCE:���� , 0.75
ENDIF

ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE307
;���s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(307)
	RETURN RESULT
SIF TARGET == 0
	RETURN 0
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	;��ꍇ�����x1
	SIF (TCVAR:MASTER:��ꍇ�� < 1)
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
	;�f�[�g��
	SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
		RETURN 0
ENDIF
;�C��0
SIF BASE:MASTER:�C�� <= 0
		RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�j����
;����n�R�}���h�@���x��1
;-------------------------------------------------
@COM308
LOCAL = RAND:110
LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
SIF LOCAL:1 > 109
	LOCAL:1 = 109
IF LOCAL <= 9
	;�听��
	TFLAG:193 = 1
ELSEIF LOCAL >= LOCAL:1
	;���s
	TFLAG:193 = -1
ELSE
	;�c��͐���
	TFLAG:193 = 0
ENDIF

IF CFLAG:TARGET:�Y���Q��
	DOWNBASE:MASTER:�C�� += 50
ELSE
	DOWNBASE:�C�� += 50
	DOWNBASE:MASTER:�C�� += 50
ENDIF

;�Œ�Ŋl������\�[�X
SOURCE:���y = 80
SOURCE:� = 50
SOURCE:���� = 200

;ABL:�e�����݂�
IF ABL:�e�� <= 3
	SOURCE:���y += 100 + (ABL:�e�� * 20)
	SOURCE:� += 150 + (ABL:�e�� * 30)
ELSEIF ABL:�e�� <= 5
	SOURCE:���y += 300 + (ABL:�e�� * 40)
	SOURCE:� += 350 + (ABL:�e�� * 30)
ELSEIF ABL:�e�� <= 8
	SOURCE:���y += 600 + (ABL:�e�� * 50)
	SOURCE:� += 500 + (ABL:�e�� * 40)
ELSEIF ABL:�e�� <= 11
	SOURCE:���y += 800 + (ABL:�e�� * 70)
	SOURCE:� += 700 + (ABL:�e�� * 60)
ELSE
	SOURCE:���y += 1200 + (ABL:�e�� * 40)
	SOURCE:� += 1500 + (ABL:�e�� * 20)
ENDIF

;�D���x���݂�
IF CFLAG:2 <= 500
	SOURCE:���y += CFLAG:2
ELSEIF CFLAG:2 <= 5000
	SOURCE:���y += 200 + (CFLAG:2 - 500) / 3
ELSE
	SOURCE:���y += 1000 + (CFLAG:2 - 5000) / 5
ENDIF
SIF SOURCE:���y < 0
	SOURCE:���y = 0

SOURCE:���] = 500
SOURCE:�� = 100 + 200 * ABL:�]��

IF TFLAG:193 == -1
	TIMES SOURCE:���y , 0.10
	TIMES SOURCE:� , 0.50
	TIMES SOURCE:�� , 0.50
	TIMES SOURCE:���] , 1.50
	TIMES SOURCE:���� , 1.50
ELSEIF TFLAG:193 == 0
	TIMES SOURCE:���y , 1.00
	TIMES SOURCE:� , 1.00
	TIMES SOURCE:�� , 1.00
	TIMES SOURCE:���] , 1.00
ELSE
	TIMES SOURCE:���y , 2.00
	TIMES SOURCE:� , 2.00
	TIMES SOURCE:�� , 2.00
	TIMES SOURCE:���] , 0.50
	TIMES SOURCE:���� , 0.75
ENDIF
TIME += 10
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE308
;�j�������s����
SIF !TFLAG:100
	RETURN 0
;��������
SIF CFLAG:�C�^�Y�� > 1
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(308)
	RETURN RESULT
;�������łȂ�
SIF !CFLAG:���� && !CFLAG:�Y���Q��
	RETURN 0
;�C�^�Y�����łȂ�
SIF !CFLAG:�C�^�Y�� && !CFLAG:�Y���Q��
	RETURN 0
;�d����
SIF CFLAG:�s�� == 5
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;���𕏂ł�
;����n�R�}���h�@���x��2
;-------------------------------------------------
@COM309
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 10
ELSE
	LOCAL = RAND:110
	LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
	SIF LOCAL:1 > 109
		LOCAL:1 = 109
	IF LOCAL <= 9
		;�听��
		TFLAG:193 = 1
		IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
			EXP:MASTER:�f�[�g�o�� ++
			EXP:TARGET:�f�[�g�o�� ++
		ENDIF
		TFLAG:98 = 2
	ELSEIF LOCAL >= LOCAL:1
		;���s
		TFLAG:193 = -1
		TFLAG:98 = -2
	ELSE
		;�c��͐���
		TFLAG:193 = 0
		TFLAG:98 = 0
	ENDIF

	;�搧�������͎��s���Ȃ�
	SIF TFLAG:102 == 3
		TFLAG:193 = MAX(TFLAG:193,0)
	IF CFLAG:�Y���Q��
		DOWNBASE:MASTER:�C�� += 50
	ELSEIF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
		DOWNBASE:�C�� += 30
		DOWNBASE:MASTER:�C�� += 30
	ELSE
		DOWNBASE:�C�� += 50
		DOWNBASE:MASTER:�C�� += 50
	ENDIF

	TFLAG:98 += 1

	;�Œ�Ŋl������\�[�X
	SOURCE:���y = 150
	SOURCE:� = 150
	SOURCE:���� = 100

	;ABL:�e�����݂�
	IF ABL:�e�� <= 3
		SOURCE:���y += 150 + (ABL:�e�� * 50)
		SOURCE:� += 180 + (ABL:�e�� * 40)
	ELSEIF ABL:�e�� <= 5
		SOURCE:���y += 500 + (ABL:�e�� * 50)
		SOURCE:� += 450 + (ABL:�e�� * 30)
	ELSEIF ABL:�e�� <= 8
		SOURCE:���y += 800 + (ABL:�e�� * 50)
		SOURCE:� += 700 + (ABL:�e�� * 50)
	ELSEIF ABL:�e�� <= 11
		SOURCE:���y += 1000 + (ABL:�e�� * 90)
		SOURCE:� += 900 + (ABL:�e�� * 50)
	ELSE
		SOURCE:���y += 1800 + (ABL:�e�� * 40)
		SOURCE:� += 2000 + (ABL:�e�� * 20)
	ENDIF

	;�D���x���݂�
	IF CFLAG:2 <= 500
		SOURCE:���y += CFLAG:2
	ELSEIF CFLAG:2 <= 5000
		SOURCE:���y += 500 + (CFLAG:2 - 500) / 3
	ELSE
		SOURCE:���y += 2000 + (CFLAG:2 - 5000) / 5
	ENDIF
	SIF SOURCE:���y < 0
		SOURCE:���y = 0

	;�Q�Ă�ꍇ���ʔ��z
	IF CFLAG:���� && SOURCE:���y > 0
		SOURCE:���y = SOURCE:���y / 2
		SOURCE:� = SOURCE:� / 2
	ENDIF

	LOCAL = 0
	;�������͍D���x�ω�����
	IF !CFLAG:����
		;�e�����Ⴂ�ƍD���x�ቺ
		IF ABL:�e�� == 0
			LOCAL -= 3
		ELSEIF ABL:�e�� == 1
			LOCAL -= 2
		ELSEIF ABL:�e�� == 2
			LOCAL -= 1
		ENDIF
		;�D���x���Ⴂ�ƍD���x�ቺ
		IF CFLAG:2 <= 50
			LOCAL -= 3
		ELSEIF CFLAG:2 <= 100
			LOCAL -= 2
		ELSEIF CFLAG:2 <= 250
			LOCAL -= 1
		ENDIF
	ENDIF

	SOURCE:�~�� = 50 + 150 * ABL:�~�]
	SOURCE:�� = 100 + 200 * ABL:�]��

	;�D���x�ω�
	TFLAG:97 += LOCAL

	IF TFLAG:193 == -1
		TIMES SOURCE:���y , 0.10
		TIMES SOURCE:� , 0.50
		TIMES SOURCE:�� , 0.50
		TIMES SOURCE:�~�� , 0.50
		TIMES SOURCE:���� , 1.50
	ELSEIF TFLAG:193 == 0
		TIMES SOURCE:���y , 1.00
		TIMES SOURCE:� , 1.00
		TIMES SOURCE:�� , 1.00
		TIMES SOURCE:�~�� , 1.00
	ELSE
		TIMES SOURCE:���y , 2.00
		TIMES SOURCE:� , 2.00
		TIMES SOURCE:�� , 2.00
		TIMES SOURCE:�~�� , 2.00
		TIMES SOURCE:���� , 0.75
	ENDIF

	IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
		TIME += 10
		EXP:MASTER:�f�[�g�o�� ++
		EXP:TARGET:�f�[�g�o�� ++
		;���𕏂ł��t���O
		TCVAR:304 = 1440 * DAY + TIME
		CALL DATE_GOES_ON(1)
	ELSE
		TIME += 20
		;���𕏂ł��t���O
		TCVAR:304 = 1440 * DAY + TIME
	ENDIF
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE309
;���𕏂ł���s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(309) && !CFLAG:�C�^�Y�� && !CFLAG:�Y���Q��
	RETURN RESULT
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	;��ꍇ�����x1
	SIF (TCVAR:MASTER:��ꍇ�� < 1) && !CFLAG:����
		RETURN 0
	;������
	SIF CFLAG:���� && !CFLAG:�C�^�Y�� && !CFLAG:�Y���Q��
		RETURN 0
	;��������
	SIF CFLAG:�C�^�Y�� > 1
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
	;1���ԊԊu
	SIF TIME_PROGRESS(TCVAR:304) < 60 && !CFLAG:�C�^�Y�� && !CFLAG:�Y���Q��
		RETURN 0
ENDIF
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0

RETURN 1


code:
;-------------------------------------------------
;�K�𕏂ł�
;����n�R�}���h�@���x��1
;-------------------------------------------------
@COM310
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 10
ELSE
	IF FLAG:�b�㐫�� && !CFLAG:���ӂ�
		PRINTFORMW %CALLNAME:MASTER%�ɂ͂���ȓx���͂Ȃ�
		RETURN -1
	ENDIF
	DOWNBASE:�C�� += 50
	DOWNBASE:MASTER:�C�� += 50

	;�M��
	TFLAG:98 = -3

	;�Œ�Ŋl������\�[�X
	SOURCE:���y = 100
	SOURCE:� = 100
	SOURCE:�I�o = 100
	SOURCE:���� = 900

	;ABL:�e�����݂�
	IF ABL:�e�� <= 5
		SOURCE:���� -= (ABL:�e�� * 15)
		LOCAL = RAND:110
		LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
		SIF LOCAL:1 > 109
			LOCAL:1 = 109
		IF LOCAL <= 9
			;�听��
			TFLAG:193 = 1
		ELSEIF LOCAL >= LOCAL:1
			;���s
			TFLAG:193 = -1
		ELSE
			;�c��͐���
			TFLAG:193 = 0
		ENDIF
	ELSEIF ABL:�e�� <= 7
		SOURCE:���y += 400 + (ABL:�e�� * 50)
		SOURCE:� += 400 + (ABL:�e�� * 30)
		SOURCE:���� -= (ABL:�e�� * 15)
		TFLAG:193 = RAND:4
	ELSEIF ABL:�e�� <= 9
		SOURCE:���y += 700 + (ABL:�e�� * 60)
		SOURCE:� += 600 + (ABL:�e�� * 40)
		SOURCE:���� -= (ABL:�e�� * 25)
		TFLAG:193 = RAND:4
	ELSEIF !TALENT:����
		SOURCE:���y += 1200 + (ABL:�e�� * 80)
		SOURCE:� += 800 + (ABL:�e�� * 40)
		SOURCE:���� -= (ABL:�e�� * 35)
		TFLAG:193 = RAND:5
	ELSE
		SOURCE:���y += 2000 + (ABL:�e�� * 50)
		SOURCE:� += 1800 + (ABL:�e�� * 20)
		SOURCE:���� -= (ABL:�e�� * 50)
		TFLAG:193 = RAND:5
	ENDIF
	SIF SOURCE:���� < 0
		SOURCE:���� = 0
	;�D���x���݂�
	IF CFLAG:2 < 3000
	ELSEIF CFLAG:2 <= 5000
		SOURCE:���y += CFLAG:2 / 2
	ELSEIF CFLAG:2 <= 10000
		SOURCE:���y += 500 + (CFLAG:2 - 500) / 3
	ELSE
		SOURCE:���y += 2000 + (CFLAG:2 - 5000) / 5
	ENDIF
	SIF SOURCE:���y < 0
		SOURCE:���y = 0
	;�搧�������͎��s���Ȃ�
	SIF TFLAG:102 == 3
		TFLAG:193 = MAX(TFLAG:193,0)

	LOCAL = 0
	;�e�����Ⴂ�ƍD���x�ቺ
	IF ABL:�e�� <= 5
		LOCAL -= 10
	ELSEIF ABL:�e�� <= 7
		LOCAL -= 5
	ELSEIF ABL:�e�� <= 9
		LOCAL -= 3
	ELSEIF TALENT:����
		LOCAL -= 1
	ENDIF

	SOURCE:�~�� = 100 + 200 * ABL:�~�]
	SOURCE:�� = 100 + 200 * ABL:�]��

	;�D���x�ω�
	TFLAG:97 += LOCAL

	IF TFLAG:193 == -1
		TIMES SOURCE:���y , 0.10
		TIMES SOURCE:� , 0.50
		TIMES SOURCE:�� , 0.50
		TIMES SOURCE:�~�� , 0.50
		TIMES SOURCE:���� , 1.50
	ELSEIF TFLAG:193 == 0
		TIMES SOURCE:���y , 1.00
		TIMES SOURCE:� , 1.00
		TIMES SOURCE:�� , 1.00
		TIMES SOURCE:�~�� , 1.00
	ELSEIF TFLAG:193 <= 2
		TIMES SOURCE:���y , 1.50
		TIMES SOURCE:� , 1.50
		TIMES SOURCE:�� , 1.50
		TIMES SOURCE:�~�� , 1.50
	ELSE
		TIMES SOURCE:���y , 2.00
		TIMES SOURCE:� , 2.00
		TIMES SOURCE:�� , 2.00
		TIMES SOURCE:�~�� , 2.00
		TIMES SOURCE:���� , 0.75
	ENDIF
	TIME += 10
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE310
;�K�𕏂ł���s����
SIF !TFLAG:100
	RETURN 0
SIF !TARGET
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(310)
	RETURN RESULT
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	SIF CFLAG:���� == 0 && GET_TARGETNUM() == 0
		RETURN 0
	;������
	SIF CFLAG:���� && !CFLAG:�C�^�Y��
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
	;�Y���Q��
	SIF CFLAG:�Y���Q��
		RETURN 0
	;�f�[�g��
	SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
		RETURN 0
ENDIF
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;�r�g�p��
SIF TFLAG:61
	RETURN 0
SIF GETBIT (TCVAR:26,1)
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�����t��
;����n�R�}���h�@���x��2
;-------------------------------------------------
@COM311
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 10
	IF HETEROSEX(TARGET,PLAYER)
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 1
	ENDIF
ELSE
	IF FLAG:�b�㐫�� && !CFLAG:���ӂ�
		PRINTFORMW %CALLNAME:MASTER%�ɂ͂���ȓx���͂Ȃ�
		RETURN -1
	ENDIF
	LOCAL = RAND:110
	LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
	SIF LOCAL:1 > 109
		LOCAL:1 = 109
	IF LOCAL <= 9
		;10���ő听��
		TFLAG:193 = 1
		IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
			EXP:MASTER:�f�[�g�o�� ++
			EXP:TARGET:�f�[�g�o�� ++
		ENDIF
	ELSEIF LOCAL >= LOCAL:1
		;10�`1���Ŏ��s
		TFLAG:193 = -1
	ELSE
		;�c��͐���
		TFLAG:193 = 0
	ENDIF
	;�搧�������͎��s���Ȃ�
	SIF TFLAG:102 == 3
		TFLAG:193 = MAX(TFLAG:193,0)
	IF CFLAG:TARGET:�Y���Q��
		DOWNBASE:MASTER:�C�� += 50
	ELSE
		DOWNBASE:�C�� += 100
		DOWNBASE:MASTER:�C�� += 50
	ENDIF

	;�Œ�Ŋl������\�[�X
	SOURCE:���y = 120
	SOURCE:� = 160
	SOURCE:�I�o = 55
	SOURCE:���� = 250

	;ABL:�e�����݂�
	IF ABL:�e�� <= 1
		SOURCE:� += (ABL:�e�� * 30)
	ELSEIF ABL:�e�� <= 3
		SOURCE:� += 200 + (ABL:�e�� * 30)
	ELSEIF ABL:�e�� <= 5
		SOURCE:� += 400 + (ABL:�e�� * 30)
	ELSEIF ABL:�e�� <= 8
		SOURCE:� += 600 + (ABL:�e�� * 40)
		SOURCE:�I�o += 200 + (ABL:�~�] * 15)
	ELSEIF ABL:�e�� <= 11
		SOURCE:� += 800 + (ABL:�e�� * 40)
		SOURCE:�I�o += 300 + (ABL:�~�] * 15)
	ELSE
		SOURCE:� += 1800 + (ABL:�e�� * 20)
		SOURCE:�I�o += 700 + (ABL:�~�] * 10)
	ENDIF

	;�D���x���݂�
	IF CFLAG:2 <= 1000
	ELSEIF CFLAG:2 <= 5000
		SOURCE:���� = CFLAG:2 / 5
	ELSEIF CFLAG:2 <= 10000
		SOURCE:���� = 100 + CFLAG:2 / 20
	ELSE
		SOURCE:���� = 350 + CFLAG:2 / 100
	ENDIF
	SIF SOURCE:���� < 0
		SOURCE:���� = 0

	LOCAL = 0
	;�D���x���Ⴂ�ƍD���x�ቺ
	IF CFLAG:2 <= 50
		LOCAL -= 3
	ELSEIF CFLAG:2 <= 100
		LOCAL -= 2
	ELSEIF CFLAG:2 <= 250
		LOCAL -= 1
	ENDIF

	SOURCE:�� = 120 + 240 * ABL:�]��
	SOURCE:���� = 120 + 240 * ABL:�T�h���C

	;�D���x�ω�
	TFLAG:97 += LOCAL

	IF TFLAG:193 == -1
		TIMES SOURCE:���y , 0.10
		TIMES SOURCE:� , 0.50
		TIMES SOURCE:���� , 0.50
		TIMES SOURCE:�� , 0.50
		TIMES SOURCE:�I�o , 0.40
	ELSEIF TFLAG:193 == 0
		TIMES SOURCE:���y , 1.00
		TIMES SOURCE:� , 1.00
		TIMES SOURCE:���� , 1.00
		TIMES SOURCE:�� , 1.00
		TIMES SOURCE:�I�o , 0.90
	ELSE
		TIMES SOURCE:���y , 2.00
		TIMES SOURCE:� , 2.00
		TIMES SOURCE:���� , 2.00
		TIMES SOURCE:�� , 2.00
		TIMES SOURCE:�I�o , 1.80
	ENDIF
	TIME += 10

	IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
		EXP:MASTER:�f�[�g�o�� ++
		EXP:TARGET:�f�[�g�o�� ++
		CALL DATE_GOES_ON(1)
	ENDIF

	IF HETEROSEX(TARGET,PLAYER)
		EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 1
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 1
	ENDIF
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE311
;�����t�����s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(311)
	RETURN RESULT
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	;��ꍇ�����x1
	SIF TCVAR:MASTER:��ꍇ�� < 1 && !CFLAG:�Y���Q��
		RETURN 0
	;������
	SIF CFLAG:���� && !CFLAG:�Y���Q��
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
ENDIF
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;�r�g�p��
SIF TFLAG:61
	RETURN 0
SIF GETBIT (TCVAR:26,1)
	RETURN 0
;�V�b�N�X�i�C���̐�
SIF TEQUIP:�V�b�N�X�i�C��
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�L�X����
;����n�R�}���h�@���x��2
;-------------------------------------------------
@COM312
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 10
	SOURCE:���l = ABL:PLAYER:�� * 2 + 10
	EXP:MASTER:�L�X�o�� += 1
	IF HETEROSEX(TARGET,PLAYER)
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 2
	ENDIF
ELSE
	IF FLAG:�b�㐫�� && !GETBIT(CFLAG:�������� ,0)
		PRINTFORMW %CALLNAME:MASTER%�ɂ͂���ȓx���͂Ȃ�
		RETURN -1
	ENDIF
	;���┻��
	IF REJECT_CHECK(SELECTCOM) && !CFLAG:����
		TFLAG:193 = 99
		LOCAL = 0
		;�Œ�l���\�[�X
		SOURCE:���� = 500
		SOURCE:���| = 300
		;�D���x���Ⴂ�ƍD���x�ቺ
		IF CFLAG:2 <= 100
			LOCAL -= 50
		ELSEIF CFLAG:2 <= 300
			LOCAL -= 30
		ELSEIF CFLAG:2 <= 500
			LOCAL -= 10
		ENDIF
		;�D���x�ω�
		TFLAG:97 += LOCAL
		TIME += 10
		RETURN 1
	ENDIF

	LOCAL = RAND:110
	LOCAL:1 = 90 + GET_SUCCESS_RATE() / 5
	SIF LOCAL:1 > 109
		LOCAL:1 = 109
	IF LOCAL <= 9
		;10���ő听��
		TFLAG:193 = 1
		IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
			EXP:MASTER:�f�[�g�o�� ++
			EXP:TARGET:�f�[�g�o�� ++
		ENDIF
	ELSEIF LOCAL >= LOCAL:1
		;10�`1���Ŏ��s
		TFLAG:193 = -1
	ELSE
		;�c��͐���
		TFLAG:193 = 0
	ENDIF
	;�搧�������͎��s���Ȃ�
	SIF TFLAG:102 == 3
		TFLAG:193 = MAX(TFLAG:193,0)

	IF CFLAG:TARGET:�Y���Q��
		DOWNBASE:MASTER:�C�� += 50
	ELSEIF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
		DOWNBASE:�C�� += 30
		DOWNBASE:MASTER:�C�� += 50
	ELSE
		DOWNBASE:�C�� += 70
		DOWNBASE:MASTER:�C�� += 100
	ENDIF

	;�Œ�Ŋl������\�[�X
	SOURCE:���l = ABL:PLAYER:�� * 2 + 10
	SOURCE:PLAYER:���l = ABL:�� * 2 + 10
	SOURCE:���y = 150
	SOURCE:� = 150
	SOURCE:�I�o = 80
	SOURCE:���� = 300
	SIF CFLAG:����
		SOURCE:���� = 200

	;ABL:�e�����݂�
	IF ABL:�e�� <= 1
		SOURCE:� += (ABL:�e�� * 30)
	ELSEIF ABL:�e�� <= 3
		SOURCE:���y += 150 + (ABL:�e�� * 30)
		SOURCE:� += 150 + (ABL:�e�� * 30)
		SOURCE:�~�� += 65 + (ABL:�e�� * 20)
	ELSEIF ABL:�e�� <= 5
		SOURCE:���y += 300 + (ABL:�e�� * 40)
		SOURCE:� += 280 + (ABL:�e�� * 30)
		SOURCE:�~�� += 130 + (ABL:�e�� * 26)
		SOURCE:�I�o += 80 + (ABL:�e�� * 15)
	ELSEIF ABL:�e�� <= 8
		SOURCE:���y += 450 + (ABL:�e�� * 70)
		SOURCE:� += 380 + (ABL:�e�� * 40)
		SOURCE:�~�� += 170 + (ABL:�e�� * 30)
		SOURCE:�I�o += 110 + (ABL:�e�� * 18)
	ELSEIF ABL:�e�� <= 11
		SOURCE:���y += 500 + (ABL:�e�� * 85)
		SOURCE:� += 480 + (ABL:�e�� * 50)
		SOURCE:�~�� += 230 + (ABL:�e�� * 35)
		SOURCE:�I�o += 160 + (ABL:�e�� * 20)
	ELSE
		SOURCE:���y += 800 + (ABL:�e�� * 80)
		SOURCE:� += 760 + (ABL:�e�� * 45)
		SOURCE:�~�� += 350 + (ABL:�e�� * 30)
		SOURCE:�I�o += 260 + (ABL:�e�� * 17)
	ENDIF

	;�D���x���݂�
	IF CFLAG:2 <= 500
		SOURCE:� += CFLAG:2
	ELSEIF CFLAG:2 <= 5000
		SOURCE:� += 400 + (CFLAG:2 - 500) / 5
		SOURCE:���y += 400 + (CFLAG:2 - 500) / 4
	ELSE
		SOURCE:� += 1200 + (CFLAG:2 - 5000) / 7
		SOURCE:���y += 1200 + (CFLAG:2 - 5000) / 4
	ENDIF
	SIF SOURCE:� < 0
		SOURCE:� = 0

	LOCAL = 0
	;�D���x���Ⴂ�ƍD���x�ቺ
	IF CFLAG:2 <= 100
		LOCAL -= 3
	ELSEIF CFLAG:2 <= 300
		LOCAL -= 2
	ELSEIF CFLAG:2 <= 500
		LOCAL -= 1
	ENDIF

	SOURCE:�� = 150 + 300 * ABL:�]��
	SOURCE:���� = 150 + 300 * ABL:�T�h���C

	;�D���x�ω�
	SIF !CFLAG:����
		TFLAG:97 += LOCAL

	;��l���肾�ƌ��ʃA�b�v�A�����łȂ��ƘI�o�ȊO�_�E��=============
	FOR LOCAL,1,CHARANUM
		SIF CFLAG:LOCAL:����
			LOCAL:2 ++
	NEXT
	IF LOCAL:2 == 1
		TIMES SOURCE:���y , 1.20
		TIMES SOURCE:� , 1.20
		TIMES SOURCE:���� , 1.20
		TIMES SOURCE:�� , 1.20
	ELSE
		TIMES SOURCE:���y , 0.70
		TIMES SOURCE:� , 0.80
		TIMES SOURCE:���� , 0.80
		TIMES SOURCE:�� , 0.90
		TIMES SOURCE:�I�o , 1.10
	ENDIF
	;���[�h�̉e��=====================================================
	IF BASE:���[�h == MAXBASE:���[�h
		TIMES SOURCE:���y , 1.30
		TIMES SOURCE:� , 1.30
		TIMES SOURCE:���� , 1.20
		TIMES SOURCE:�� , 1.20
		TIMES SOURCE:�I�o , 1.30
	ELSEIF BASE:���[�h < 600 && BASE:���[�h > 200 && !TALENT:�L�X��
		TIMES SOURCE:���y , 0.70
		TIMES SOURCE:� , 0.75
		TIMES SOURCE:���� , 0.70
		TIMES SOURCE:�� , 0.60
		TIMES SOURCE:�I�o , 0.50
	ELSEIF BASE:���[�h <= 200 && !TALENT:�L�X��
		TIMES SOURCE:���y , 0.40
		TIMES SOURCE:� , 0.40
		TIMES SOURCE:���� , 0.40
		TIMES SOURCE:�� , 0.40
		TIMES SOURCE:�I�o , 0.35
	ENDIF
	;�L�X��===============================================================
	IF TALENT:�L�X��
		TIMES SOURCE:���y , 1.40
		TIMES SOURCE:� , 1.40
	ENDIF
	;=====================================================================
	IF TFLAG:193 == -1
		TIMES SOURCE:���y , 0.10
		TIMES SOURCE:� , 0.50
		TIMES SOURCE:���� , 0.50
		TIMES SOURCE:�� , 0.50
		TIMES SOURCE:�I�o , 0.40
	ELSEIF TFLAG:193 == 0
		TIMES SOURCE:���y , 1.00
		TIMES SOURCE:� , 1.00
		TIMES SOURCE:���� , 1.00
		TIMES SOURCE:�� , 1.00
		TIMES SOURCE:�I�o , 0.90
	ELSE
		TIMES SOURCE:���y , 2.00
		TIMES SOURCE:� , 2.00
		TIMES SOURCE:���� , 2.00
		TIMES SOURCE:�� , 2.00
		TIMES SOURCE:�I�o , 1.80
	ENDIF
	TIME += 10
	SIF !CFLAG:����
		EXP:�L�X�o�� += 1
		EXP:�l�o�� += 1
		EXP:MASTER:�l�o�� += 1
	EXP:MASTER:�L�X�o�� += 1
	IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
		EXP:MASTER:�f�[�g�o�� ++
		EXP:TARGET:�f�[�g�o�� ++
		CALL DATE_GOES_ON(1)
	ENDIF
	IF HETEROSEX(TARGET,PLAYER)
		EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 2
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 2
	ENDIF
	;�L�X�����t���O
	SIF !TALENT:���� && !TALENT:���l && !TALENT:���~ && !TALENT:�Z�t��
		TCVAR:314 = 1440 * DAY + TIME
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE312
;�L�X������s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(312)
	RETURN RESULT
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	;��ꍇ�����x1
	SIF (TCVAR:MASTER:��ꍇ�� < 1) && !CFLAG:����
		RETURN 0
	;������
	SIF CFLAG:���� && !CFLAG:�C�^�Y�� && !CFLAG:�Y���Q��
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
	;1���ԊԊu
	SIF TIME_PROGRESS(TCVAR:314) < 60
		RETURN 0
ENDIF
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;���g�p��
SIF TFLAG:60 && MASTER_POSE(SET_M, SET_M) != TARGET
	RETURN 0
SIF GETBIT (TCVAR:26,2)
	RETURN 0
;�V�b�N�X�i�C���̐�
SIF TEQUIP:�V�b�N�X�i�C��
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;������
;����n�R�}���h�@���x��3
;-------------------------------------------------
@COM313
;-------------------------------------------------
;COM��FLAG�̐ݒ�
;-------------------------------------------------
;�s�׎�
TCVAR:116 = PLAYER
;-------------------------------------------------
;�\�[�X�ǉ�����
;-------------------------------------------------
;����̗́A�C��
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 20
	SOURCE:���a = 80
	IF ABL:PLAYER:�w >= 4
		SOURCE:���a += 50
	ELSE
		SOURCE:���a += ABL:PLAYER:�w * 10
	ENDIF
	;���ߕ␳
	IF TEQUIP:1 > 1
		TIMES SOURCE:���a , 0.80
		TIMES SOURCE:�~�� , 0.80
		TIMES SOURCE:�I�o , 0.80
	ENDIF
ELSE
	IF FLAG:�b�㐫�� && !CFLAG:���ӂ�
		PRINTFORMW %CALLNAME:MASTER%�ɂ͂���ȓx���͂Ȃ�
		RETURN -1
	ENDIF
	DOWNBASE:�̗� += 5
	DOWNBASE:�C�� += 50
	SOURCE:���a = 80
	SOURCE:���y = 100
	SOURCE:�~�� = 50
	SOURCE:�I�o = 70
	SOURCE:���� = 700
	SOURCE:�� = 120 + 240 * ABL:�]��

	;�D���x���݂�
	SELECTCASE ABL:�e��
		CASE IS < 5
			SOURCE:���� -= (ABL:�e�� * 10)
		CASE IS < 10
			SOURCE:� += ABL:�e�� * 5
			SOURCE:�~�� += ABL:�e�� * 10
			SOURCE:���� -= (ABL:�e�� * 20)
		CASEELSE
			SOURCE:� += ABL:�e�� * 15
			IF !TALENT:���� && !TALENT:�Z�t��
				SOURCE:� += ABL:�e�� * 5
				SOURCE:�~�� += (ABL:�e�� * 20)
				SOURCE:���� -= (ABL:�e�� * 50)
			ELSE
				SOURCE:�~�� += (ABL:�e�� * 15)
				SOURCE:���� -= (ABL:�e�� * 30)
			ENDIF
	ENDSELECT
	SIF SOURCE:���� < 0
		SOURCE:���� = 0
	SOURCE:�~�� = MIN(SOURCE:�~��,500)
	SOURCE:� = MIN(SOURCE:�,300)

	IF ABL:PLAYER:�w >= 4
		SOURCE:���a += 50
	ELSE
		SOURCE:���a += ABL:PLAYER:�w * 10
	ENDIF
	;���ߕ␳
	IF TEQUIP:1 > 1
		TIMES SOURCE:���a , 0.80
		TIMES SOURCE:�~�� , 0.80
		TIMES SOURCE:�I�o , 0.80
	ENDIF

	;�M��
	TFLAG:98 = -5

	;-------------------------------------------------
	;����\�[�X����
	;-------------------------------------------------
	;�}���A��R�����ɂ́A�}�T�\�[�X�ǉ�
	SIF TALENT:���Ȉ� < 0 || TALENT:��R
		SOURCE:�T�� += 20
ENDIF
;-------------------------------------------------
;����̏���
;-------------------------------------------------
;�z��̂a�̒����҂̎w�̉��ꂪ�ړ�
STAIN:5 |= STAIN:PLAYER:1
STAIN:PLAYER:1 |= STAIN:5
;-------------------------------------------------
;�o���̏���
;-------------------------------------------------
IF FLAG:70 == 1
	IF HETEROSEX(TARGET,PLAYER)
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 3
	ENDIF
ELSE
	IF HETEROSEX(TARGET,PLAYER)
		EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 3
		EXP:MASTER:���Y�o�� += 3
	ENDIF
	TIME += 10
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE313
;���������s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(313)
	RETURN RESULT
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	;��ꍇ�����x2
	SIF (TCVAR:MASTER:��ꍇ�� < 2) && !CFLAG:����
		RETURN 0
	;������
	SIF CFLAG:���� && !CFLAG:�C�^�Y��
		RETURN 0
	;�Y���Q��
	SIF CFLAG:�Y���Q��
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
	;�f�[�g��
	SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
		RETURN 0
ENDIF
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;�r�g�p��
SIF TFLAG:61 && MASTER_POSE(SET_B,SET_YUBI) != TARGET
	RETURN 0
SIF GETBIT (TCVAR:26,3)
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�A�i������
;����n�R�}���h�@���x��3
;-------------------------------------------------
@COM314
;-------------------------------------------------
;COM��FLAG�̐ݒ�
;-------------------------------------------------
;�s�׎�
TCVAR:116 = PLAYER

;-------------------------------------------------
;�\�[�X�ǉ�����
;-------------------------------------------------
;����̗́A�C��
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 40
	SOURCE:���` = 80
	IF ABL:PLAYER:�w >= 4
		SOURCE:���` += 50
	ELSE
		SOURCE:���` += ABL:PLAYER:�w * 10
	ENDIF
	;���˂����߂Ȃ��ߑ�
	IF TEQUIP:0 & 16
		TIMES SOURCE:���` , 0.60
		TIMES SOURCE:�~�� , 0.60
		TIMES SOURCE:�I�o , 0.60
	;�X�J�[�g�ȊO�̉����𗚂��Ă�
	ELSEIF TEQUIP > 1
		TIMES SOURCE:���` , 0.80
		TIMES SOURCE:�~�� , 0.80
		TIMES SOURCE:�I�o , 0.80
	IF HETEROSEX(TARGET,PLAYER)
		EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 4
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 4
	ENDIF
	SIF TFLAG:60 < 2
		EXP:PLAYER:����o�� ++
	ENDIF
ELSE
	IF FLAG:�b�㐫�� && !CFLAG:���ӂ�
		PRINTFORMW %CALLNAME:MASTER%�ɂ͂���ȓx���͂Ȃ�
		RETURN -1
	ENDIF
	DOWNBASE:�̗� += 40
	DOWNBASE:�C�� += 100

	SOURCE:���` = 80
	SOURCE:��� = 50
	SOURCE:���] = 100
	SOURCE:�I�o = 120
	SOURCE:�~�� = 170
	SOURCE:���y = 50
	SOURCE:��E = 80
	SOURCE:���� = 60
	SOURCE:�� = 150 + 300 * ABL:�]��
	IF ABL:PLAYER:�w >= 4
		SOURCE:���` += 50
	ELSE
		SOURCE:���` += ABL:PLAYER:�w * 10
	ENDIF
	;���˂����߂Ȃ��ߑ�
	IF TEQUIP:0 & 16
		TIMES SOURCE:���` , 0.60
		TIMES SOURCE:�~�� , 0.60
		TIMES SOURCE:�I�o , 0.60
	;�X�J�[�g�ȊO�̉����𗚂��Ă�
	ELSEIF TEQUIP > 1
		TIMES SOURCE:���` , 0.80
		TIMES SOURCE:�~�� , 0.80
		TIMES SOURCE:�I�o , 0.80
	ENDIF

	;�M��
	TFLAG:98 = -7

	;-------------------------------------------------
	;����\�[�X����
	;-------------------------------------------------
	;�}���A��R�����ɂ́A�}�T�\�[�X�ǉ�
	SIF TALENT:���Ȉ� < 0 || TALENT:��R
		SOURCE:�T�� += 100
ENDIF
;A�ւ̋�ɂ͐�ɏ������Ă���
SIF TCVAR:20 == 72 && !TEQUIP:�V�b�N�X�i�C��
	CALL PAIN_CHECK_A(TARGET)

;-------------------------------------------------
;����̏���
;-------------------------------------------------
IF TCVAR:20 == 72 && !TEQUIP:�V�b�N�X�i�C��
	;�z��̂`�̒����҂̎w�̉��ꂪ�ړ�
	STAIN:PLAYER:0 |= STAIN:4
	STAIN:4 |= STAIN:PLAYER:0
ELSE
	;�z��̂`�̒����҂̎w�̉��ꂪ�ړ�
	STAIN:PLAYER:1 |= STAIN:4
	STAIN:PLAYER:1 |= STAIN:7
	STAIN:4 |= STAIN:PLAYER:1
	STAIN:7 |= STAIN:PLAYER:1
ENDIF
;-------------------------------------------------
;�o���̏���
;-------------------------------------------------
IF FLAG:70 == 1
	IF HETEROSEX(TARGET,PLAYER)
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 4
	ENDIF
	SIF TFLAG:60 < 2
		EXP:PLAYER:����o�� ++
	SIF TEQUIP:�V�b�N�X�i�C�� || TCVAR:20 == 72
		EXP:PLAYER:�����o�� ++
ELSE
	IF HETEROSEX(TARGET,PLAYER)
		EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 4
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 4
	ENDIF
	SIF TFLAG:60 < 2
		EXP:PLAYER:����o�� ++
	SIF TEQUIP:�V�b�N�X�i�C�� || TCVAR:20 == 72
		EXP:PLAYER:�����o�� ++
	TIME += 10
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE314
;�A�i���������s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(314)
	RETURN RESULT
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	;��ꍇ�����x1
	SIF TCVAR:MASTER:��ꍇ�� < 2
		RETURN 0
	;������
	SIF CFLAG:����
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
	;�Y���Q��
	SIF CFLAG:�Y���Q��
		RETURN 0
	;�f�[�g��
	SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
		RETURN 0
ENDIF
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
SIF TEQUIP:51 >= 0
	RETURN 0
;��ʋR��A�i��(�r������)
SIF TCVAR:20 == 72
	RETURN 1
;�V�b�N�X�i�C���̐�(�r������)
SIF TEQUIP:�V�b�N�X�i�C��
	RETURN 1
;�r�g�p��
SIF TFLAG:61 && MASTER_POSE(SET_A,SET_YUBI) != TARGET
	RETURN 0
SIF GETBIT (TCVAR:26,4)
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�N������
;����n�R�}���h�@���x��3
;-------------------------------------------------
@COM315

;-------------------------------------------------
;COM��FLAG�̐ݒ�
;-------------------------------------------------
;�s�׎�
TCVAR:116 = PLAYER
;-------------------------------------------------
;�\�[�X�ǉ�����
;-------------------------------------------------
;����̗́A�C��
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 20
	SOURCE:���b = 80
	IF ABL:PLAYER:�w >= 4
		SOURCE:���b += 50
	ELSE
		SOURCE:���b += ABL:PLAYER:�w * 10
	ENDIF
	;���˂����߂Ȃ��ߑ�
	IF TEQUIP:0 & 16
		TIMES SOURCE:���b , 0.80
		TIMES SOURCE:�~�� , 0.80
		TIMES SOURCE:�I�o , 0.80
	;�X�J�[�g�ȊO�̉����𗚂��Ă�
	ELSEIF TEQUIP > 1
		TIMES SOURCE:���b , 0.90
		TIMES SOURCE:�~�� , 0.90
		TIMES SOURCE:�I�o , 0.90
	ENDIF
ELSE
	IF FLAG:�b�㐫�� && !CFLAG:���ӂ�
		PRINTFORMW %CALLNAME:MASTER%�ɂ͂���ȓx���͂Ȃ�
		RETURN -1
	ENDIF
	DOWNBASE:�̗� += 5
	DOWNBASE:�C�� += 50

	SOURCE:���y = 100
	SOURCE:� = 150
	SOURCE:�~�� = 150
	SOURCE:�I�o = 100
	SOURCE:���� = 370
	SOURCE:���b = 80
	SOURCE:�� = 145 + 270 * ABL:�]��
	IF ABL:PLAYER:�w >= 4
		SOURCE:���b += 50
	ELSE
		SOURCE:���b += ABL:PLAYER:�w * 10
	ENDIF
	;���˂����߂Ȃ��ߑ�
	IF TEQUIP:0 & 16
		TIMES SOURCE:���b , 0.80
		TIMES SOURCE:�~�� , 0.80
		TIMES SOURCE:�I�o , 0.80
	;�X�J�[�g�ȊO�̉����𗚂��Ă�
	ELSEIF TEQUIP > 1
		TIMES SOURCE:���b , 0.90
		TIMES SOURCE:�~�� , 0.90
		TIMES SOURCE:�I�o , 0.90
	ENDIF

	;�M��
	TFLAG:98 = -5

	;-------------------------------------------------
	;����\�[�X����
	;-------------------------------------------------
	;�}���A��R�����ɂ́A�}�T�\�[�X�ǉ�
	SIF TALENT:���Ȉ� < 0 || TALENT:��R
		SOURCE:�T�� += 20
ENDIF
;-------------------------------------------------
;����̏���
;-------------------------------------------------
;�z��̂u�̒����҂̌��̉��ꂪ�ړ�
STAIN:3 |= STAIN:PLAYER:1
STAIN:PLAYER:1 |= STAIN:3
IF FLAG:70 == 1
	IF HETEROSEX(TARGET,PLAYER)
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 3
	ENDIF
ELSE
	IF HETEROSEX(TARGET,PLAYER)
		EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 3
		EXP:MASTER:���Y�o�� += 3
	ENDIF
	TIME += 10
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE315
;�N���������s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(315)
	RETURN RESULT
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	;��ꍇ�����x2
	SIF (TCVAR:MASTER:��ꍇ�� < 2)  && CFLAG:���� == 0
		RETURN 0
	;������
	SIF CFLAG:���� && !CFLAG:�C�^�Y��
		RETURN 0
	;�Y���Q��
	SIF CFLAG:�Y���Q��
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
	;�f�[�g��
	SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
		RETURN 0
ENDIF
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;�r�g�p��
SIF TFLAG:61 && MASTER_POSE(SET_C,3) != TARGET && MASTER_POSE(SET_P,SET_YUBI) != TARGET && MASTER_POSE(SET_V,SET_YUBI) != TARGET && MASTER_POSE(SET_A,SET_YUBI) != TARGET
	RETURN 0
SIF GETBIT (TCVAR:26,5)
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�w�}����
;����n�R�}���h�@���x��3
;-------------------------------------------------
@COM316
;-------------------------------------------------
;COM��FLAG�̐ݒ�
;-------------------------------------------------
;�s�׎�
TCVAR:116 = PLAYER

;�j�Z�}��
TFLAG:2 = 1

;-------------------------------------------------
;�\�[�X�ǉ�����
;-------------------------------------------------
;����̗́A�C��
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 40
	IF !TALENT:���� || TALENT:���� -1
		SOURCE:���u = 120
	ELSE
		SOURCE:���u = 60
	ENDIF
ELSE
	IF FLAG:�b�㐫�� && !CFLAG:���ӂ�
		PRINTFORMW %CALLNAME:MASTER%�ɂ͂���ȓx���͂Ȃ�
		RETURN -1
	ENDIF
	DOWNBASE:�̗� += 30
	DOWNBASE:�C�� += 80

	IF !TALENT:���� || TALENT:���� -1
		SOURCE:���u = 120
		SOURCE:� = 150
		SOURCE:��� = 250
		SOURCE:�~�� = 200
		SOURCE:�I�o = 120
		SOURCE:��E = 150
		SOURCE:���� = 200
	;V�o����0�̎���V�o���𔺂�Ȃ����ɔh��
	;V�̎�͓���Ȃ����A��V�������Ɗ��炵�Ă��邽�ߏ����r�����ɉe��
	ELSE
		SOURCE:���u = 60
		SOURCE:� = 150
		SOURCE:��� = 250
		SOURCE:�~�� = 200
		SOURCE:�I�o = 120
		SOURCE:��E = 300
		SOURCE:���� = 400
	ENDIF

	;�M��
	TFLAG:98 = -7

	;-------------------------------------------------
	;����\�[�X����
	;-------------------------------------------------
	;�}���A��R�����ɂ́A�}�T�\�[�X�ǉ�
	IF TALENT:���Ȉ� < 0 || TALENT:��R
		SOURCE:�T�� += 20
		;����
		SIF TALENT:����
			SOURCE:�T�� += 10
	ENDIF
ENDIF
;V�ւ̋��
CALL PAIN_CHECK_V(TARGET)
;-------------------------------------------------
;����̏���
;-------------------------------------------------
;�z����S���̒����҂̎w�̉��ꂪ�ړ�
STAIN:6 |= STAIN:PLAYER:1
STAIN:PLAYER:1 |= STAIN:6
;-------------------------------------------------
;�o���̏���
;-------------------------------------------------
EXP:PLAYER:����o�� ++
IF FLAG:70 == 1
	IF HETEROSEX(TARGET,PLAYER)
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 4
	ENDIF
ELSE
	IF HETEROSEX(TARGET,PLAYER)
		EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 4
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 4
	ENDIF
	TIME += 10
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE316
;�w�}������s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(316)
	RETURN RESULT
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	;��ꍇ�����x2
	SIF (TCVAR:MASTER:��ꍇ�� < 2) && CFLAG:���� == 0
		RETURN 0
	;����
	SIF TEQUIP:0 & 4
		RETURN 0
	;������
	SIF CFLAG:���� && CFLAG:�C�^�Y�� < 2
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
	;�f�[�g��
	SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
		RETURN 0
	;�Y���Q��
	SIF CFLAG:�Y���Q��
		RETURN 0
	SIF TEQUIP:50 >= 0
		RETURN 0
ENDIF
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;�r�g�p��
SIF TFLAG:61 && MASTER_POSE(SET_C,3) != TARGET && MASTER_POSE(SET_P,SET_YUBI) != TARGET && MASTER_POSE(SET_V,SET_YUBI) != TARGET && MASTER_POSE(SET_A,SET_YUBI) != TARGET
	RETURN 0
SIF GETBIT (TCVAR:26,5)
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;���𓮂���(V)
;����n�R�}���h�@���x��3
;-------------------------------------------------
@COM317

IF ABL:MASTER:�� >= 3
	CALL ASK_M("������",1,"�˂�������",1,"�O���C���h",1)
	TFLAG:194 = RESULT + 1

	IF EFFECTIVE_PATTERN_V:(TEQUIP:�u�R���{) == TFLAG:194
		TEQUIP:�u�R���{ ++
		TFLAG:193 = TEQUIP:�u�R���{
		SIF TEQUIP:�u�R���{ == 3
			TEQUIP:�u�R���{ = 0
	ENDIF
ENDIF
;-------------------------------------------------
;COM��FLAG�̐ݒ�
;-------------------------------------------------
;�s�׎�
TCVAR:116 = PLAYER

CSTR:PLAYER:10 += @"{TARGET}/"
;TCVAR:2 �ː��ӏ��t���O�i-1=�R���h�[�� 1=�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:PLAYER:2 = 1
;���x
TCVAR:PLAYER:4 = 500 + ABL:�� * 50 + ABL:�S * 50

CSTR:TARGET:10 += @"{PLAYER}/"
;TCVAR:2 �ː��ӏ��t���O�i-1=�R���h�[�� 1=�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:TARGET:2 = 13
;���x
TCVAR:TARGET:4 = 1500

;-------------------------------------------------
;�\�[�X�ǉ�����
;-------------------------------------------------
;����̗́A�C��
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 80
	SOURCE:MASTER:���b = 40 + ABL:�S * 50
	SOURCE:���u = 40 + ABL:PLAYER:�� * 30
	IF HETEROSEX(TARGET,PLAYER)
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 4
	ENDIF
	EXP:�u�����o�� ++
	EXP:PLAYER:�}���o�� ++
ELSE
	DOWNBASE:PLAYER:�̗� += 50
	DOWNBASE:PLAYER:�C�� += 80

	SOURCE:MASTER:���b = 40 + ABL:�� * 50 + ABL:�S * 50
	SOURCE:���u = 50 + ABL:PLAYER:�� * 20
	SOURCE:� = 200
	SOURCE:��� = 250
	SOURCE:�~�� = 250
	SOURCE:�I�o = 150
	SOURCE:��E = 150
	SOURCE:���� = 100

	;-------------------------------------------------
	;����\�[�X����
	;-------------------------------------------------
	;�}���A��R�����ɂ́A�}�T�\�[�X�ǉ�
	IF TALENT:���Ȉ� < 0 || TALENT:��R
		SOURCE:�T�� += 20
	ENDIF
	;V�ւ̋��
	CALL PAIN_CHECK_V(TARGET)
	;-------------------------------------------------
	;�o���̏���
	;-------------------------------------------------
	EXP:PLAYER:�}���o�� ++
	;�������@���Y�Ȃ�߂�l1�Q�C�Ȃ�߂�l2
	IF HETEROSEX(TARGET,PLAYER)
		EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 4
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 4
	ENDIF
	EXP:�u�����o�� ++
	;-------------------------------------------------
	;�R���{
	;-------------------------------------------------
	IF TFLAG:193 == 2
		SOURCE:���u += 10 + ABL:PLAYER:�� * 15
		SOURCE:�~�� += 100
		SOURCE:���] += 100
		SOURCE:� += 50
		TCVAR:PLAYER:4 += ABL:�S * 50
		EXP:�u�����o�� ++
	ELSEIF TFLAG:193 == 3
		SOURCE:���u += 50 + ABL:PLAYER:�� * 30
		SOURCE:�~�� += 200
		SOURCE:���] += 300
		SOURCE:� += 200
		TCVAR:PLAYER:4 += ABL:�S * 150
		SIF ABL:�u���o >= 5
		SOURCE:���b += 30
		EXP:�u�����o�� ++
		TFLAG:�D���x�{�[�i�X = 100
	ENDIF
	TIME += 5
ENDIF
;-------------------------------------------------
;����̏���
;-------------------------------------------------
;�z����S���̒����҂̂o�̉��ꂪ�ړ�
STAIN:PLAYER:2 |= STAIN:3
STAIN:PLAYER:2 |= STAIN:6
STAIN:3 |= STAIN:PLAYER:2
STAIN:6 |= STAIN:PLAYER:2
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE317
;���s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(317)
	RETURN RESULT
;��~���͕s��
SIF FLAG:70
	RETURN 0
;��ꍇ�����x2
SIF (TCVAR:MASTER:��ꍇ�� < 2) && CFLAG:���� == 0
	RETURN 0
;����
SIF TEQUIP:0 & 4
	RETURN 0
;������
SIF CFLAG:���� && CFLAG:�C�^�Y�� < 2
	RETURN 0
;�d����
SIF CFLAG:�s�� == 5
	RETURN 0
;�f�[�g��
SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
	RETURN 0
;�Y���Q��
SIF CFLAG:�Y���Q��
	RETURN 0
SIF TCVAR:TARGET:100 != PLAYER
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
SIF GETBIT (TCVAR:26,8)
	RETURN 0
SIF CFLAG:���ӂ� != 2
	RETURN 0
;TARGET���}������ĂȂ�
SIF TEQUIP:�u�ڐG���� != 1
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;���𓮂���(A)
;����n�R�}���h�A���x��3
;-------------------------------------------------
@COM318

IF ABL:MASTER:�� >= 3
	CALL ASK_M("������",1,"�˂�������",1,"�O���C���h",1)
	TFLAG:194 = RESULT + 1

	IF EFFECTIVE_PATTERN_A:(TEQUIP:�`�R���{) == TFLAG:194
		TEQUIP:�`�R���{ ++
		TFLAG:193 = TEQUIP:�`�R���{
		SIF TEQUIP:�`�R���{ == 3
			TEQUIP:�`�R���{ = 0
	ENDIF
ENDIF
;-------------------------------------------------
;COM��FLAG�̐ݒ�
;-------------------------------------------------
;�s�׎�
TCVAR:116 = PLAYER

CSTR:PLAYER:10 += @"{TARGET}/"
;TCVAR:2 �ː��ӏ��t���O�i-1=�R���h�[�� 1=�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:PLAYER:2 = 2
;���x
TCVAR:PLAYER:4 = 500 + ABL:�� * 50 + ABL:�A�i�� * 50

CSTR:TARGET:10 += @"{PLAYER}/"
;TCVAR:2 �ː��ӏ��t���O�i-1=�R���h�[�� 1=�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:TARGET:2 = 12
;���x
TCVAR:TARGET:4 = 1500

;-------------------------------------------------
;�\�[�X�ǉ�����
;-------------------------------------------------
;����̗́A�C��
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 80
	SOURCE:MASTER:���b = 40 + ABL:�A�i�� * 50
	SOURCE:���` = 40 + ABL:PLAYER:�� * 30
	IF HETEROSEX(TARGET,PLAYER)
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 4
	ENDIF
	EXP:�`�����o�� ++
	EXP:PLAYER:�}���o�� ++
ELSE
	DOWNBASE:PLAYER:�̗� += 50
	DOWNBASE:PLAYER:�C�� += 80

	SOURCE:MASTER:���b = 40 + ABL:�� * 50 + ABL:�A�i�� * 50
	SOURCE:���` = 50 + ABL:PLAYER:�� * 20
	SOURCE:� = 200
	SOURCE:��� = 250
	SOURCE:�~�� = 250
	SOURCE:�I�o = 150
	SOURCE:��E = 150
	SOURCE:���� = 100

	;-------------------------------------------------
	;����\�[�X����
	;-------------------------------------------------
	;�}���A��R�����ɂ́A�}�T�\�[�X�ǉ�
	IF TALENT:���Ȉ� < 0 || TALENT:��R
		SOURCE:�T�� += 20
	ENDIF
	;A�ւ̋��
	CALL PAIN_CHECK_A(TARGET)
	;-------------------------------------------------
	;�o���̏���
	;-------------------------------------------------
	EXP:PLAYER:�}���o�� ++
	;�������@���Y�Ȃ�߂�l1�Q�C�Ȃ�߂�l2
	IF HETEROSEX(TARGET,PLAYER)
		EXP:(50 + HETEROSEX(TARGET,PLAYER)) += 4
		EXP:PLAYER:(50 + HETEROSEX(TARGET,PLAYER)) += 4
	ENDIF
		EXP:�`�����o�� ++
	;-------------------------------------------------
	;�R���{
	;-------------------------------------------------
	IF TFLAG:193 == 2
		SOURCE:���` += 10 + ABL:PLAYER:�� * 15
		SOURCE:�~�� += 100
		SOURCE:���] += 100
		SOURCE:� += 50
		TCVAR:PLAYER:4 += ABL:�A�i�� * 50
		EXP:�`�����o�� ++
	ELSEIF TFLAG:193 == 3
		SOURCE:���` += 50 + ABL:PLAYER:�� * 30
		SOURCE:�~�� += 200
		SOURCE:���] += 300
		SOURCE:� += 200
		TCVAR:PLAYER:4 += ABL:�A�i�� * 150
		SIF ABL:�`���o >= 5
		SOURCE:���b += 30
		EXP:�`�����o�� ++
		TFLAG:�D���x�{�[�i�X = 100
	ENDIF
	TIME += 5
ENDIF
;-------------------------------------------------
;����̏���
;-------------------------------------------------
;�z��̃A�i�����̒����҂̂o�̉��ꂪ�ړ�
STAIN:PLAYER:2 |= STAIN:4
STAIN:PLAYER:2 |= STAIN:7
STAIN:4 |= STAIN:PLAYER:2
STAIN:7 |= STAIN:PLAYER:2
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE318
;���s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(317)
	RETURN RESULT
;��~���͕s��
SIF FLAG:70
	RETURN 0
;��ꍇ�����x2
SIF (TCVAR:MASTER:��ꍇ�� < 2) && CFLAG:���� == 0
	RETURN 0
;����
SIF TEQUIP:0 & 4
	RETURN 0
;������
SIF CFLAG:���� && CFLAG:�C�^�Y�� < 2
	RETURN 0
;�d����
SIF CFLAG:�s�� == 5
	RETURN 0
;�f�[�g��
SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
	RETURN 0
;�Y���Q��
SIF CFLAG:�Y���Q��
	RETURN 0
SIF TCVAR:TARGET:100 != PLAYER
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
SIF GETBIT (TCVAR:26,8)
	RETURN 0
SIF CFLAG:���ӂ� != 2
	RETURN 0
;TARGET���}������ĂȂ�
SIF TEQUIP:�`�ڐG���� != 1
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�X�J�[�g���߂���
;����n�R�}���h�A���x��1
;-------------------------------------------------
@COM330
#DIM MEKURI
IF FLAG:70 == 1
	BASE:MASTER:TSP -= 10
ELSE
	IF FLAG:�b�㐫��
		PRINTFORMW %CALLNAME:MASTER%�ɂ͂���ȓx���͂Ȃ�
		RETURN -1
	ENDIF
	;�Œ�Ŋl������\�[�X
	SOURCE:�I�o = 300
	SOURCE:���� = 700
	IF FLAG:�ُ�C�� == 6
		MEKURI = MAX(0,5000 - 500 * ABL:�e��)
		SELECTCASE MARK:��������
			CASE 0
				MEKURI /= 2
			CASE 2
				MEKURI *= 2
			CASE 3
				MEKURI *= 4
		ENDSELECT
		[IF_DEBUG]
		PRINTFORMW �X�J�[�g�����{MEKURI}
		[ENDIF]
		CUP:���u += MEKURI
	ENDIF
	;�D���x���݂�
	SELECTCASE CFLAG:2
		CASE 1000 TO 3000
			SOURCE:� += CFLAG:2 / 100
			SOURCE:���� -= (ABL:�e�� * 10)
		CASE 3001 TO 5000
			SOURCE:� += 100 + (CFLAG:2 - 500) / 5
			SOURCE:���y += 100 + (CFLAG:2 - 500) / 4
			SOURCE:�~�� += (ABL:�e�� * 10)
			SOURCE:�I�o += (ABL:�e�� * 15)
			SOURCE:���� -= (ABL:�e�� * 15)
		CASE IS > 5000
			SOURCE:� += 500 + (CFLAG:2 - 5000) / 7
			SOURCE:���y += 500 + (CFLAG:2 - 5000) / 4
			IF !TALENT:����
				SOURCE:�~�� += (ABL:�e�� * 15)
				SOURCE:�I�o += (ABL:�e�� * 20)
				SOURCE:���� -= (ABL:�e�� * 25)
			ELSE
				SOURCE:�~�� += (ABL:�e�� * 20)
				SOURCE:�I�o += (ABL:�e�� * 30)
				SOURCE:���� -= (ABL:�e�� * 40)
			ENDIF
	ENDSELECT
	SIF SOURCE:���� < 0
		SOURCE:���� = 0
	SIF SOURCE:� < 0
		SOURCE:� = 0

	LOCAL = 0
	;�D���x���Ⴂ�ƍD���x�ቺ
	IF CFLAG:2 <= 100
		TFLAG:193 = -5
		DOWNBASE:MASTER:�̗� -= ABL:�퓬�\�� * 100
		TFLAG:�X�J�[�g�߂��肷�� += RAND:30
	ELSEIF CFLAG:2 <= 1000
		TFLAG:193 = -3
		DOWNBASE:MASTER:�̗� -= ABL:�퓬�\�� * 30
		TFLAG:�X�J�[�g�߂��肷�� += RAND:20
	ELSEIF CFLAG:2 <= 3000
		TFLAG:193 = -1
		TFLAG:�X�J�[�g�߂��肷�� += RAND:10
	ELSEIF CFLAG:2 <= 5000
		TFLAG:193 = 0
		TFLAG:�X�J�[�g�߂��肷�� += RAND:10
	ELSE
		TFLAG:193 = 1
		TFLAG:�X�J�[�g�߂��肷�� += RAND:5
	ENDIF

	SOURCE:�� = 100 + 150 * ABL:�]��
	SOURCE:���� = 100 + 150 * ABL:�T�h���C

	;��l���肾�ƌ��ʃA�b�v�A�����łȂ��ƘI�o�ȊO�_�E��=============
	FOR LOCAL,1,CHARANUM
		SIF CFLAG:LOCAL:����
			LOCAL:2 ++
	NEXT
	IF LOCAL:2 == 1
		TIMES SOURCE:�~�� , 1.20
		TIMES SOURCE:�I�o , 0.80
		LOCAL:3 = 1
	ELSE
		TIMES SOURCE:�~�� , 0.50
		TIMES SOURCE:�I�o , 2.00
		TIMES SOURCE:���� , 1.50
	ENDIF
	;���[�h�̉e��=====================================================
	IF BASE:���[�h == MAXBASE:���[�h
		TIMES SOURCE:�~�� , 1.20
		TIMES SOURCE:�I�o , 1.20
		TIMES SOURCE:���� , 0.50
	ELSEIF BASE:���[�h < 600 && BASE:���[�h
		TIMES SOURCE:�~�� , 1.00
		TIMES SOURCE:�I�o , 1.00
		TIMES SOURCE:���� , 1.00
	ELSEIF BASE:���[�h <= 200
		TIMES SOURCE:�~�� , 0.80
		TIMES SOURCE:�I�o , 0.80
		TIMES SOURCE:���� , 1.50
	ENDIF

	TIME += 5
	IF CHK_DATENOW(CFLAG:TARGET:�f�[�g��)
		EXP:MASTER:�f�[�g�o�� ++
		EXP:TARGET:�f�[�g�o�� ++
		CALL DATE_GOES_ON(1)
	ENDIF
ENDIF
RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE330
;�X�J�[�g�߂�����s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(330)
	RETURN RESULT
;���Ԓ�~���̓X�L�b�v
IF !FLAG:70
	;������
	SIF CFLAG:����
		RETURN 0
	;�d����
	SIF CFLAG:�s�� == 5
		RETURN 0
	;�f�[�g��
	SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
		RETURN 0
	;�Y���Q��
	SIF CFLAG:�Y���Q��
		RETURN 0
ENDIF
;��������
SIF !(EQUIP:�X�J�[�g || EQUIP:�����s�[�X || EQUIP:����) || EQUIP:0 == 0
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
SIF !TARGET
	RETURN 0
;�����|���ꒆ�̐���
SIF GETBIT (TCVAR:26,7)
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�����🹂��(�����)
;����n�R�}���h�A���x��1
;-------------------------------------------------
@COM331
#DIM ��������
#DIM ���o�m��
#DIM �����m��
�������� = 0
�����m�� = RAND:100
IF �����m�� <= 9
	;10���ő听��
	EXP:MASTER:��b�o�� ++
	TFLAG:193 = 1
	TFLAG:98 = 2
ELSE
	;�c��͈ꎞ�I�ɐ���
	TFLAG:193 = 0
	TFLAG:98 = 0
ENDIF
LOCAL:2 = 0
LOCAL:1 = TARGET
���o�m�� = TALENT:MASTER:�����m�� ? 5 # 3
;IF TALENT:MASTER:�����m��
;	���o�m�� = 5
;ELSE
;	���o�m�� = 3
;ENDIF
FOR LOCAL, 1, GET_TARGETNUM() + 1
	;�Q�Ă���l�Ɉ��܂����Ȃ�
	SIF CFLAG:(TARGET:LOCAL):����
		CONTINUE
	TARGET = TARGET:LOCAL
	;������A�C�X�e�B�[�͖��C�������Ă���ƈ��܂Ȃ�
	IF TCVAR:TARGET:�����򋭓x >= 2 && TFLAG:131 == 252
		;PRINTFORML %CALLNAME:TARGET%�͂����т����Ȃ��炨����f����
		TCVAR:TARGET:�����򂨒��g�p = 0
		CONTINUE
	;���Ƃ��͗��炪�Ȃ���Έ���ł���Ȃ�
	ELSEIF TARGET == 49
		IF !TALENT:TARGET:����
			LOCAL:2 ++
			;PRINTFORML %CALLNAME:TARGET%�͂����Ɍ������Ȃ�����
			CONTINUE
		ENDIF
	;[���L�q��][���ȏ�]�͈Ⴂ�̕�����l
	;���o����\���͒����m���̗L����1/2��1/1
	ELSEIF TALENT:TARGET:61 < 0
		IF (���o�m�� - 3) ? !RAND:(���o�m�� - 3) # 1
			LOCAL:2 ++
			;PRINTFORML %CALLNAME:TARGET%�͂����Ɍ������Ȃ�����
			CONTINUE
		ENDIF
	;���L�ϐ��̑f�����Ȃ���Δ��o����\���͒����m���̗L����1/5��1/3
	ELSEIF TALENT:TARGET:61 == 0
		IF !RAND:���o�m��
			LOCAL:2 ++
			;PRINTFORML %CALLNAME:TARGET%�͂����Ɍ������Ȃ�����
			CONTINUE
		ENDIF
	ENDIF
	;[���L�݊�][���ꖳ��]������Ίm��ň��ށA�������
	;SIF LOCAL:2
		;BREAK
	CALL COM331_1
	;TFLAG:193�̐��۔����COM��TARGET��p�Ȃ̂ŏC��
	SIF TARGET == LOCAL:1
		�������� = 1
NEXT
;SIF TCVAR:TARGET:�Z�� != 210 && TCVAR:TARGET:���A�� != 210 && TCVAR:TARGET:����� != 1 && !TCVAR:TARGET:�����򋭓x >= 2
SIF !��������
	TFLAG:193 = -1
TFLAG:98 += 3
SIF LOCAL:2 > 0
	TFLAG:98 = 0
DOWNBASE:MASTER:�C�� += 100
DOWNBASE:MASTER:�̗� += 50
TIME += 30
TARGET = LOCAL:1
TFLAG:131 = 0
RETURN 1

@COM331_1

DOWNBASE:�C�� += 10

;�Œ�Ŋl������\�[�X
SOURCE:���y = 500

;ABL:�]�����݂�
IF ABL:�]�� <= 1
	SOURCE:���y += (ABL:�]�� * 60)
ELSEIF ABL:�]�� <= 3
	SOURCE:���y += 200 + (ABL:�]�� * 60)
ELSEIF ABL:�]�� <= 5
	SOURCE:���y += 500 + (ABL:�]�� * 60)
ELSEIF ABL:�]�� <= 8
	SOURCE:���y += 750 + (ABL:�]�� * 75)
ELSEIF ABL:�]�� <= 11
	SOURCE:���y += 1000 + (ABL:�]�� * 75)
ELSE
	SOURCE:���y += 2000 + (ABL:�]�� * 30)
ENDIF

;�D���x���݂�
IF CFLAG:2 <= 500
	SOURCE:���y += CFLAG:2
ELSEIF CFLAG:2 <= 5000
	SOURCE:���y += 500 + (CFLAG:2 - 500) / 3
ELSE
	SOURCE:���y += 2000 + (CFLAG:2 - 5000) / 5
ENDIF
SIF SOURCE:���y < 0
	SOURCE:���y = 0

SOURCE:�� = 200 + 100 * ABL:�]��
SOURCE:���� = 200 + 100 * ABL:�T�h���C

IF TFLAG:193 == -1
	TIMES SOURCE:���y , 0.10
	TIMES SOURCE:���� , 0.50
	TIMES SOURCE:�� , 0.50
ELSEIF TFLAG:193 == 0
	TIMES SOURCE:���y , 1.00
	TIMES SOURCE:���� , 1.00
	TIMES SOURCE:�� , 1.00
ELSE
	TIMES SOURCE:���y , 2.00
	TIMES SOURCE:���� , 2.00
	TIMES SOURCE:�� , 2.00
ENDIF
IF TFLAG:131 == 41
	TCVAR:TARGET:�Z�� = 210
	DOWNBASE:TARGET:�C�� += 150
	DOWNBASE:TARGET:�̗� += 150
	;PRINTFORML %CALLNAME:TARGET%�͛Z�����̂��������ɂ���
ELSEIF TFLAG:131 == 42
	TCVAR:TARGET:���A�� = 210
	DOWNBASE:TARGET:�C�� += 150
	DOWNBASE:TARGET:�̗� += 150
	;PRINTFORML %CALLNAME:TARGET%�͗��A�ܓ���̂��������ɂ���
ELSEIF TFLAG:131 == 250
	;PRINTFORML %CALLNAME:TARGET%�͍�������̂��������ɂ���
	TCVAR:TARGET:����� = 210
	DOWNBASE:TARGET:�C�� += 150
	DOWNBASE:TARGET:�̗� += 150
ELSEIF TFLAG:131 == 252
	;PRINTFORML %CALLNAME:TARGET%�͐��������̂��������ɂ���
	IF TCVAR:TARGET:�����򋭓x < 2
		TCVAR:TARGET:�����򋭓x = 2
		TCVAR:TARGET:�����򂨒��g�p = 1
	ENDIF
ENDIF
;���������񂾃t���O
TCVAR:300 = 1440 * DAY + TIME

RETURN 1

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE331
;�����🹂����s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(301)
	RETURN RESULT
;�񎞊ԊԊu
SIF TIME_PROGRESS(TCVAR:300) < 120
	RETURN 0
;������
SIF CFLAG:����
	RETURN 0
;�Y���Q��
SIF CFLAG:�Y���Q��
	RETURN 0
SIF !TFLAG:131
	RETURN 0
;����
;SIF CFLAG:MASTER:���݈ʒu == 13 || CFLAG:MASTER:���݈ʒu == 24 || CFLAG:MASTER:���݈ʒu == 30 || CFLAG:MASTER:���݈ʒu == 39
SIF BATHCHECK(CFLAG:MASTER:���݈ʒu) && GET_MAPID(CFLAG:MASTER:���݈ʒu) == MAIN_MAP
	RETURN 0
;�f�[�g��
SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;��~���͕s��
SIF FLAG:70
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;�������ӂ�܂�
;����n�R�}���h�A���x��1
;-------------------------------------------------
@COM332
VARSET LOCALS

PRINTL �������߂悤���H
CALL ���ꗗ�\��(1)
IF RESULT
	;���ގ��̎��
	TFLAG:194 = RESULT
	ITEM:RESULT --
ELSE
	RETURN -1
ENDIF
PRINTFORML %CALLNAME:MASTER%��%ITEMNAME:RESULT%�𒍂���%CALLNAME:TARGET%�ɍ����o�����c

;�b��I�ɐ����t���O�𗧂Ă�
TFLAG:193 = 0

IF !TALENT:TARGET:���� && CFLAG:TARGET:�D���� == 2
	PRINTFORML %CALLNAME:TARGET%�͂���%CALLNAME:MASTER%�Ƃ͂��������ދC���Ȃ��悤���c
	SOURCE:���� += 3000
	BASE:���[�h = 0
	BASE:�{�� = 1500
;	TFLAG:193 = -2
	RETURN -1
ENDIF
IF BASE:���C > MAXBASE:���C * 2 / 3
	PRINTFORML %CALLNAME:TARGET%�͂���ȏ���ދC�͂Ȃ��悤��
;	TFLAG:193 = -1
	RETURN -1
ELSEIF TALENT:TARGET:��ϐ� == -2 && CFLAG:TARGET:���ˈ��� < 5
	SELECTCASE CFLAG:TARGET:���ˈ���
		CASE IS < -10
			LOCALS = %CALLNAME:TARGET%�͕s������I��ɂ���
		CASE IS <= -3
			LOCALS = �ȑO���Ȏv��������%CALLNAME:TARGET%�͈��݂����Ȃ��������c
		CASEELSE
		IF TARGET == 55
			LOCALS = %CALLNAME:TARGET%�͂��������ނ킯�ɂ͂����Ȃ��ƒf����
		ELSE
			LOCALS = ���˂�%CALLNAME:TARGET%�͂��������ދC���Ȃ��悤���c
		ENDIF
	ENDSELECT
	PRINTFORML %LOCALS%
	PRINTFORML [0] ������߂�
	PRINTFORML [1] ��������
	$LOOP
	INPUT
	IF RESULT == 0 || TARGET == 55
	;�Ђ����@���I�M���Ȃ̂Ő�Έ��܂Ȃ�
		PRINTFORML %CALLNAME:TARGET%�ɂ��������ޗl�q���Ȃ������̂ŁA������߂��c
		TFLAG:193 = -5
		RETURN 0
	ELSEIF RESULT == 1
		IF (ABL:�e�� * 200 + ABL:MASTER:�b�p�Z�\ * 100 + MIN(3,CFLAG:���ˈ���) * 300) * BASE:���[�h / MAXBASE:���[�h >= 1500
			PRINTFORML %CALLNAME:MASTER%�̐����ɂ��%CALLNAME:TARGET%�͂��������Ƃ����Ɍ������͂��߂��c
			CFLAG:���ˈ��� += 1
			TFLAG:193 = 1
		ELSEIF CFLAG:���ˈ��� < -10
			PRINTFORML %CALLNAME:TARGET%�͂Ƃ��Ƃ��{��o���Ă��܂���
			SOURCE:���� += 3000
			BASE:���[�h = 0
			BASE:�{�� = 1500
			TFLAG:�D���x�}�C�i�X = 5
			TFLAG:193 = -2
			RETURN 1
		ELSE
			PRINTFORML %CALLNAME:MASTER%�������������ƁA%CALLNAME:TARGET%�͂����Ɍ������Ȃ������c
			SOURCE:���� += 500
			BASE:���[�h /= 2
			TFLAG:�D���x�}�C�i�X = 1
			TFLAG:193 = -1
			RETURN 1
		ENDIF
	ELSE
		GOTO LOOP
	ENDIF
ENDIF

DOWNBASE:MASTER:�C�� += 100
DOWNBASE:MASTER:�̗� += 50
CALL DRUNKEN(MASTER,TFLAG:194)

CALL COM332_1

TIME += 30
RETURN 1

@COM332_1
#DIM ���C������
#DIM ���␳
DOWNBASE:�C�� += 10

;�Œ�Ŋl������\�[�X
SOURCE:���y = 500

CALL DRUNKEN(TARGET,TFLAG:194)

;�A�����s���͔���������
SIF PREVCOM == SELECTCOM
	SOURCE:���� = 100

;ABL:�]�����݂�
IF ABL:�]�� <= 1
	SOURCE:���y += (ABL:�]�� * 30)
ELSEIF ABL:�]�� <= 3
	SOURCE:���y += 400 + (ABL:�]�� * 30)
ELSEIF ABL:�]�� <= 5
	SOURCE:���y += 600 + (ABL:�]�� * 30)
ELSEIF ABL:�]�� <= 8
	SOURCE:���y += 800 + (ABL:�]�� * 50)
ELSEIF ABL:�]�� <= 11
	SOURCE:���y += 1000 + (ABL:�]�� * 70)
ELSE
	SOURCE:���y += 1500 + (ABL:�]�� * 40)
ENDIF

;�D���x���݂�
IF CFLAG:2 <= 500
	SOURCE:���y += CFLAG:2
ELSEIF CFLAG:2 <= 5000
	SOURCE:���y += 700 + (CFLAG:2 - 500) / 3
ELSE
	SOURCE:���y += 2500 + (CFLAG:2 - 5000) / 5
ENDIF
SIF SOURCE:���y < 0
	SOURCE:���y = 0

SOURCE:�� = 200 + 100 * ABL:�]��
SOURCE:���� = 200 + 100 * ABL:�T�h���C

IF TFLAG:193 == -1
	TIMES SOURCE:���y , 0.10
	TIMES SOURCE:���� , 0.50
	TIMES SOURCE:�� , 0.50
ELSEIF TFLAG:193 == 0
	TIMES SOURCE:���y , 1.00
	TIMES SOURCE:���� , 1.00
	TIMES SOURCE:�� , 1.00
ELSE
	TIMES SOURCE:���y , 2.00
	TIMES SOURCE:���� , 2.00
	TIMES SOURCE:�� , 2.00
ENDIF

;���ɂ��␳
���␳ = ALCOHOL_TASTE(TFLAG:194)
IF TALENT:TARGET:��ϐ� == -2 && ALCOHOL_TASTE(TFLAG:194) < 15
	IF CFLAG:TARGET:���ˈ��� < 3
		���␳ /= 2
		PRINTFORML %CALLNAME:TARGET%��������t���������ł�߂Ă��܂���
	ELSEIF CFLAG:TARGET:���ˈ��� < 5
		���␳ = ���␳ / 3 * 2
		PRINTFORML %CALLNAME:TARGET%�͈ȑO�������ɒ�R���Ȃ��Ȃ����悤��
	ELSE
		PRINTFORML %CALLNAME:TARGET%���Y��ɔu����ɂ���
	ENDIF
ENDIF

SOURCE:���y = SOURCE:���y * ���␳ / 10
SOURCE:���� = SOURCE:���� * ���␳ / 10
SOURCE:�� = SOURCE:�� * ���␳ / 10

;�M��
TFLAG:98 = ALCOHOL_TASTE(TFLAG:194) / 5

IF ALCOHOL_TASTE(TFLAG:194) < 10
	PRINTFORMW %CALLNAME:TARGET%�̌��ɂ͍���Ȃ������悤���c
	IF TALENT:TARGET:��ϐ� == -2
		CFLAG:TARGET:���ˈ��� --
		TFLAG:�D���x�}�C�i�X = 1
		TFLAG:98 = -1
	ENDIF
ELSEIF ALCOHOL_TASTE(TFLAG:194) >= 15
	PRINTFORMW %CALLNAME:TARGET%��%ITEMNAME:(TFLAG:194)%���C�ɓ����Ă��ꂽ�悤���c
	SIF CFLAG:TARGET:���ˈ��� < 5
		CFLAG:TARGET:���ˈ��� ++
	CALL KIGEN_CHANGE(TARGET,40,1)
ENDIF

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE332
;����������
SIF !ITEM:51 && !ITEM:52 && !ITEM:53 && !ITEM:54 && !ITEM:55 && !ITEM:56 && !ITEM:57
	RETURN 0
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(332)
	RETURN RESULT
;������
SIF CFLAG:����
	RETURN 0
;�Y���Q��
SIF CFLAG:�Y���Q��
	RETURN 0
;�D�P���o��Ԃ͕s��
SIF CFLAG:�D�P���o��� == 1
	RETURN 0
;����
SIF BATHCHECK(CFLAG:MASTER:���݈ʒu)
	RETURN 0
;�f�[�g��
SIF CHK_DATENOW(CFLAG:�f�[�g��) && CFLAG:���݈ʒu != OMANEKIBEYA()
	RETURN 0
;�O�o��Ŏ��s���͐e��3��v��
SIF CFLAG:MASTER:���݈ʒu > 99 && ABL:�e�� < 3
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;��~���͕s��
SIF FLAG:70
	RETURN 0
SIF TARGET < 1
	RETURN 0
RETURN 1


code:
;-------------------------------------------------
;��s�𕷂�
;����n�R�}���h�A���x��2
;-------------------------------------------------
@COM333
VARSET LOCAL

;�Œ�Ŋl������\�[�X
SOURCE:���y = 400

LOCAL = 50 + ABL:MASTER:�b�p�Z�\ * 5 + ABL:�e�� * 2

SIF BASE:���C > MAXBASE:���C / 2
	LOCAL -= 15

SELECTCASE RAND:LOCAL
	CASE IS < 20
		TFLAG:193 = 1
	CASE 20 TO 50
		TFLAG:193 = 2
	CASEELSE
		TFLAG:193 = 3
ENDSELECT
SIF BASE:���C > MAXBASE:���C / 2
	TFLAG:193 += 3

SELECTCASE TFLAG:193
	CASE 1
		SOURCE:���� = 100
	CASE 2
		SOURCE:���y += ABL:�e�� * 30
		TALENT:�@�� ++
		BASE:�{�� /= 2
		CFLAG:�s�@�� = 0
	CASE 3
		SOURCE:���y += ABL:�e�� * 50
		SOURCE:� = 200
		TALENT:�@�� ++
		BASE:�{�� /= 2
		CFLAG:�s�@�� = 0
	CASE 4
		SOURCE:���� = 1000
		SOURCE:���y += ABL:�e�� * 30
	CASE 5
		SOURCE:���y += ABL:�e�� * 50
	CASE 6
		SOURCE:���y += ABL:�e�� * 75
		SOURCE:� = 300
		TALENT:�@�� = 1
		BASE:�{�� /= 2
		CFLAG:�s�@�� = 0
ENDSELECT

TIME += 20

;-------------------------------------------------
;���s����
;-------------------------------------------------
@COM_ABLE333
;��s�𕷂����s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(333)
	RETURN RESULT
SIF FLAG:70
	RETURN 0
SIF ABL:�e�� < 3
	RETURN 0
SIF MARK:��������
	RETURN 0
SIF CFLAG:���ӂ�
	RETURN 0
SIF TALENT:�@�� >= 0
	RETURN 0
;�C��0
SIF BASE:MASTER:�C�� <= 0
	RETURN 0
;������
SIF CFLAG:����
	RETURN 0
RETURN 1