code:
;���݂̃o�[�W�������i�[(NYE:"X.YY  NYE"�Aproto:"X.YYproto"�A�C����:"X.YY�C��Z"�Ŕ��p9�������œ���\)
#DIMS CONST eraTW_Version = "4.611"

;SAVESTR
#DIM CONST �{�̃o�[�W���� = 8

;�ח�����
#DIM CONST REQUIRED_TRUST_���� = 500
#DIM CONST REQUIRED_FAVOR_���� = 3000
#DIM CONST REQUIRED_AFFECTION_���� = 10

#DIM CONST REQUIRED_TRUST_�v�� = 200
#DIM CONST REQUIRED_FAVOR_�v�� = 1500
#DIM CONST REQUIRED_AFFECTION_�v�� = 5

#DIM CONST REQUIRED_FAVOR_�Z�t�� = 1500
#DIM CONST REQUIRED_DESIRE_�Z�t�� = 5
#DIM CONST REQUIRED_ECSTACY_�Z�t�� = 200

#DIM CONST REQUIRED_FAVOR_���~ = 3000
#DIM CONST REQUIRED_DESIRE_���~ = 10
#DIM CONST REQUIRED_ECSTACY_���~ = 500

;TFLAG

#DIM CONST ���g�p�� = 60
#DIM CONST ��g�p�� = 61
#DIM CONST �b�g�p�� = 62
#DIM CONST �u�g�p�� = 63
#DIM CONST �`�g�p�� = 64
#DIM CONST �a�g�p�� = 65

#DIM CONST ���| = 40
#DIM CONST ��b = 41
#DIM CONST �퓬 = 42
#DIM CONST ���{ = 43

;#DIM CONST ���� = 44

#DIM CONST ���y = 45
#DIM CONST �V�� = 46
#DIM CONST ������ = 47
#DIM CONST ����� = 48

#DIM CONST ENKAI_SANKA = 49

#DIM CONST ����̕ЂÂ� = 50
#DIM CONST �����Ԃ�� = 51
;== �_�Г� ==
#DIM CONST ���� = 1
#DIM CONST ���� = 2
#DIM CONST �ΑK�� = 3
#DIM CONST �{�a = 4
#DIM CONST �萅�� = 5
#DIM CONST ���u = 6
#DIM CONST �y�� = 7
#DIM CONST �䏊 = 8
#DIM CONST ���� = 9
#DIM CONST ���� = 10
#DIM CONST ��i�P���\�j = 11
#DIM CONST �E�ߏ� = 12

;#DIM CONST ���C = 13

#DIM CONST �g�C�� = 14
#DIM CONST �얲���� = 15
#DIM CONST �{������ = 16
#DIM CONST �������[�� = 17
#DIM CONST ������ = 18
#DIM CONST �傫���[�� = 19
#DIM CONST �{�a�̗� = 20
#DIM CONST ���_�Е��� = 21
#DIM CONST �Q�� = 22
#DIM CONST ����E�E�ߏ� = 23
#DIM CONST ���� = 24
#DIM CONST ����̐X = 25

;== �O�d���̉� ==
#DIM CONST �O�d���̉ƁE���� = 26
#DIM CONST �O�d���̉ƁE�L�� = 27
#DIM CONST �O�d���̉ƁE�K�i = 28
#DIM CONST �O�d���̉ƁE�L�b�`�� = 29
#DIM CONST �O�d���̉ƁE���C = 30
#DIM CONST �O�d���̉ƁE��K�L�� = 31
#DIM CONST �T�j�[���� = 32
#DIM CONST ���i���� = 33
#DIM CONST �X�^�[���� = 34
#DIM CONST �O�d���̉ƁE�n���� = 35

;== ������� ==
#DIM CONST ������ՑO = 36
#DIM CONST ������ՁE��K�ʘH = 37
#DIM CONST ������ՁE���ʏ� = 38
#DIM CONST ������ՁE���� = 39
#DIM CONST ������ՁE�g�C�� = 40
#DIM CONST ������ՁE�H�����k�b�� = 41
#DIM CONST ������ՁE������ = 42
#DIM CONST �������� = 43
#DIM CONST ����莄�� = 44
#DIM CONST ������ՁE�K�i = 45
#DIM CONST ������ՁE��K�ʘH = 46
#DIM CONST ������ՁE�͋� = 47
#DIM CONST ������ՁE��ꎑ���� = 48
#DIM CONST ������ՁE������ = 49
#DIM CONST ������ՁE��񎑗��� = 50
#DIM CONST ������ՁE�q�� = 51

#DIM CONST ���� = 52
#DIM CONST �[�� = 53
#DIM CONST ���l�̒����� = 54
#DIM CONST �a�� = 55
#DIM CONST �Q���̌����� = 56

;== SPOT ==
;- ���@�� -
;#DIM CONST ���@���Q�� = 110
#DIM CONST ���n���ʂ� = 110
#DIM CONST �}������̉� = 120
#DIM CONST ���@������ = 130
#DIM CONST ���@���{�� = 140
#DIM CONST ��n = 150
#DIM CONST �������� = 160

;- �l�Ԃ̗� -
#DIM CONST �L�� = 210
#DIM CONST ���ƒ� = 220
#DIM CONST �ۉ����� = 230
#DIM CONST ���q�� = 240
#DIM CONST ��O���� = 250
#DIM CONST �A�ꍞ�ݏh = 260
#DIM CONST �����X = 270

;- �g���� -
#DIM CONST ���̌� = 310
#DIM CONST �X�̂��܂��� = 320
#DIM CONST �p�m�� = 330
#DIM CONST ���� = 340
#DIM CONST �L�� = 350
#DIM CONST �H�� = 360
#DIM CONST ��}���� = 370
#DIM CONST �n���� = 380

;- �����̒|�� -
#DIM CONST �|�ѓ���� = 410
#DIM CONST �����̏��� = 420
#DIM CONST �Ίp�̒|�� = 430
#DIM CONST �e�̓��� = 440
#DIM CONST �i���� = 450
#DIM CONST �����̋u = 460
#DIM CONST ���z�̔� = 470
#DIM CONST �i�������m�@ = 480

;- ���@�̐X -
#DIM CONST �X�̓���� = 510
#DIM CONST ������ = 520
#DIM CONST �Ö؂̑�� = 530
#DIM CONST ���J���@�X = 540
#DIM CONST �l�`�̗m�� = 550
#DIM CONST �Ďv�̓� = 560
#DIM CONST ������ = 570

;- �O�r�̐�`���E -
#DIM CONST ���L�̓� = 610
#DIM CONST �O�r�̐� = 620
#DIM CONST �}���q�K = 630
#DIM CONST �ފ� = 670
#DIM CONST ���ʘO�� = 680
#DIM CONST ���ʘO = 690

;- �d���̎R �R�[ -
#DIM CONST �[�̎��C = 710
#DIM CONST �����̑� = 720
#DIM CONST ���寂̒r = 730

#DIM CONST ��l�̉��~ = 750
#DIM CONST �Ԍ���n���Z���^�[ = 760

;- �d���̎R �R�� -
#DIM CONST ��V�̑� = 810
#DIM CONST ��i�̋u = 820
#DIM CONST �R�̌� = 830
#DIM CONST ���_�Ћ��� = 840
#DIM CONST ���_�Ж{�a = 850

#DIM CONST �V�E = 890

;- �n�� -
#DIM CONST ���z���� = 910
#DIM CONST �n���̐[�� = 920
#DIM CONST ���n���X�� = 930
#DIM CONST ���n������ = 940
#DIM CONST ���u�z = 950
#DIM CONST �n��a = 960
#DIM CONST �ܔM�n���� = 970

;- ���̐��E�`�� -
#DIM CONST �ň��ʘH = 1010

#DIM CONST ���̓s = 1050
#DIM CONST �Ȍ��� = 1060
#DIM CONST �ʓe�̊X = 1070
#DIM CONST ���с`���l = 1080
#DIM CONST �Â��̊C = 1090

#DEFINE ���ԑ� TIME:2
;1= ����(4�`6) 2=���ߑO(6�`12) 3=��(12�`15) 4=��������(15�`18) 5=�[(18�`20) 6=��(20�`23) 7=�[��(23�`4)
#DEFINE �V�� TIME:5
;0= ���� 1=���V 2=���� 3=�� 4=�J 5=��J 6=���J 7=�� 8=�� 9=���� 10=�א� 11=���� 12=�݂��� 13=����� 14= 15=(Bit 0:�����t���O 1:��BIT 2:�JBIT 3:��BIT)

;�`��֌W
#DIM CONST ���X�g�\���s�� = 20
#DIMS CONST �O�̃y�[�W = "<"
#DIMS CONST ���̃y�[�W = ">"
#DIMS CONST �O�̃L���� = "<<"
#DIMS CONST ���̃L���� = ">>"
#DIMS CONST ��߂� = "^"
#DIM CONST �ĕ`�� = -1
#DIM CONST �A�� = -2
#DIM CONST �`�`�\�� = 99

;�L��������������K�X���₵�Ă�������
#DIM CONST �L�����N�^����� = 130

#DIM CONST �ȈՔ\�͕\���ő�y�[�W�ԍ� = 4
#DIM CONST �ڍה\�͕\���ő�y�[�W�ԍ� = 3
#DIM CONST ���O�\������ = 14
#DIM �\�[�g����, (�ȈՔ\�͕\���ő�y�[�W�ԍ� + 1) * 10

#DIM CONST MAXPANTS = 27
#DIM CONST �p���c�Ǘ� = 100

#DIM SAVEDATA MAIN_MAP

#DIM SAVEDATA YOGORE, 1100
#DIM SAVEDATA LOCK, 1100

#DIM SAVEDATA PLANT_TYPE, 5
#DIM SAVEDATA PLANT_DAYS, 5
#DIM SAVEDATA PLANT_GROW, 5
#DIM SAVEDATA PLANT_DRY, 5
#DIMS SAVEDATA HATAKE_NAME, 5

#DIM SAVEDATA CHARISMA_RATE, 190
#DIM SAVEDATA CHARISMA_TENDENCY, 190

#DIM SAVEDATA CM_SELL_PERIOD
#DIM SAVEDATA CM_SELL_MONTH
#DIM SAVEDATA CM_SELL_AMT
#DIM SAVEDATA CM_SELL_PRICE
#DIM SAVEDATA CM_COMMISSION
#DIM SAVEDATA CM_LIMIT
#DIM SAVEDATA CM_INT_RATE

#DIM COUNTCHARA, 1100

#DIM MAXROOM
#DIM ����
#DIM SAVEDATA �f�t�H���g�����ʒu
#DIM ENTRANCE
#DIM SAVEDATA ���__���
#DIM SAVEDATA ���__��
#DIM KEHAI
#DIM PRIVATEROOM, 100
#DIM MAP_PAGES
#DIMS MAPNAME, 10

#DIMS SAVEDATA ������\��

#DIM CONST RANDOM_CHARANUM = 127
#DIM RANDOM_TALENT_RATE,180
#DIM RANDOM_BASE,2
#DIM CONST MOB_FACETYPES = 11

#DIM BEFORE_MOUSOU_EXP14; ���t�o��
#DIM BEFORE_MOUSOU_EXP15; �����o��
#DIM BEFORE_MOUSOU_EXP16; �S�ˌo��
#DIM BEFORE_MOUSOU_EXP20; �u�����o��
#DIM BEFORE_MOUSOU_EXP21; �`�����o��
#DIM BEFORE_MOUSOU_EXP24; ����o��
#DIM BEFORE_MOUSOU_EXP25; �����o��
#DIM BEFORE_MOUSOU_EXP27; �L�X�o��
#DIM BEFORE_MOUSOU_EXP28; ����g�p�o��
#DIM BEFORE_MOUSOU_EXP29; �}���o��
#DIM BEFORE_MOUSOU_EXP53; �ُ�o��

#DIM CONST BASE_�̗� = 0
#DIM CONST BASE_�C�� = 1
#DIM CONST BASE_���� = 6
#DIM CONST BASE_TSP = 8

#DIM CONST ����_�L�X = 1p0
#DIM CONST ����_���ӂ� = 1p1
#DIM CONST ����_���l = 1p2
#DIM CONST ����_�A�i�� = 1p3
#DIM CONST ����_���d = 1p4
#DIM CONST ����_����d = 1p5
#DIM CONST ����_����d = 1p6
#DIM CONST ����_����d = 1p7
#DIM CONST ����_�ҕ�d = 1p8

#DIM CONST ����_���t = 1p0
#DIM CONST ����_�y�j�X = 1p1
#DIM CONST ����_���t = 1p2
#DIM CONST ����_�A�i�� = 1p3
#DIM CONST ����_��� = 1p4
#DIM CONST ����_�S�t = 1p5
#DIM CONST ����_�j�Z�� = 1p6
#DIM CONST ����_�`���R = 1p7

#DIM CONST �r��_�y�j�X = 1p1
#DIM CONST �r��_�o�C�u = 1p2
#DIM CONST �r��_�y�j�o�� = 1p3
#DIM CONST �r��_���� = 1p4
#DIM CONST �r��_�D�� = 1p9
#DIM CONST �r��_���Ԓ�~ = 1p10
#DIM CONST �r��_���� = 1p11
#DIM CONST �r��_�v�� = 1p12
#DIM CONST �r��_����� = 1p13
#DIM CONST �r��_������ = 1p14
#DIM CONST �r��_�Ȃ����� = 1p15
#DIM CONST �r��_���� = 1p16

#DIM CONST �ُ�_�l�d�Ⓒ = 1p2
#DIM CONST �ُ�_�����o�C�u = 1p4
#DIM CONST �ُ�_�g�� = 1p5
#DIM CONST �ُ�_��O���A = 1p6
#DIM CONST �ُ�_�r�� = 1p7
#DIM CONST �ُ�_�|�� = 1p11

#DIM CONST SET_FROM_P = 101
#DIM CONST SET_FROM_C = 102
#DIM CONST SET_FROM_YUBI = 103
#DIM CONST SET_FROM_M = 104
#DIM CONST SET_FROM_B = 105
#DIM CONST SET_FROM_V = 106
#DIM CONST SET_FROM_A = 107
#DIM CONST SET_FROM_LEG = 108

#DIM CONST SET_P = 1
#DIM CONST SET_C = 2
#DIM CONST SET_YUBI = 3
#DIM CONST SET_M = 4
#DIM CONST SET_B = 5
#DIM CONST SET_V = 6
#DIM CONST SET_A = 7
#DIM CONST SET_LEG = 8

;�z��̓ǂݍ��ݏ��������_���ɂ��邽�߂̔z��BFISHER_YATES_SHAFFLE�ɂăV���b�t�����܂�
#DIM SHAFFLE_ARRAY, 500
;�����̒��g�B
#DIM SAVEDATA MORIYA_BOX, 300

;�A�j���t�B���^
#DIM CONST �A�j���t�B���^_�}�� = 1p0
#DIM CONST �A�j���t�B���^_�Ⓒ = 1p1
#DIM CONST �A�j���t�B���^_�ː� = 1p2
#DIM CONST �A�j���t�B���^_��� = 1p3

;�p���c�ꎞ�ۑ�
#DIM CHARADATA SAVEDATA PANTS_TEMP, 35
#DIM FOUND_PANTS_TYPE
#DIM FOUND_PANTS_OWNER

;�d����
#DIMS JOB_NAME, 120

;�˗��ݒ萔����@�Ƃ肠�����ȃG�l��30�ɂ��Ă���
#DIM CONST MAX_IRAI = 30

;�˗��X���b�g
#DIM SAVEDATA IRAI_SLOT, 6
#DIM SAVEDATA IRAI_DATA, 6
#DIM SAVEDATA IRAI_SUB,  6
;�˗�����
#DIM SAVEDATA IRAI_DEADLINE, 6

;��������̍��ڂ͔p�~
;�˗���
#DIM SAVEDATA IRAI_CLIENT, 6
;�˗��̏������Ȃǂ��ꎞ�ۑ����邽�߂̕ϐ�
#DIM IRAI_SETTING_DEADLINE,MAX_IRAI
#DIM IRAI_SETTING_TARGET,MAX_IRAI
#DIM IRAI_SETTING_CLIENT,MAX_IRAI
#DIMS IRAI_SETTING_COMMANDNAME,MAX_IRAI
;�����܂�

#DIM CHARADATA SAVEDATA BUFF,16

#DIM CHARADATA SAVEDATA COUNTER_SIKOU, 140

;�}���R���{�p
#DIM CHARADATA SAVEDATA EFFECTIVE_PATTERN_V, 3
#DIM CHARADATA SAVEDATA EFFECTIVE_PATTERN_A, 3

;�q���̖��O
#DIMS CHARADATA SAVEDATA CHILDNAME, 11
;�q���̔N��
;#DIM CHARADATA SAVEDATA CHILD_AGE, 11
;�q���̐���
#DIM CHARADATA SAVEDATA CHILD_SEX, 11
;�q���̒a�����P�iX���ځj
#DIM CHARADATA SAVEDATA CHILD_BIRTHDAY, 11
;�q���̒a�����Q�iX�NX��XX���j
#DIM CHARADATA SAVEDATA CHILD_BIRTHDATE, 11
;�q���̈���x
#DIM CHARADATA SAVEDATA CHILD_LOVE, 11
;�q���̒a���������̓V�C
#DIMS CHARADATA SAVEDATA CHILD_WEATHER, 11

#DIM CONST CHILD_���� = 25
#DIM CONST CHILD_�ߋ� = 26
#DIM CONST CHILD_���܂藧�� = 28
#DIM CONST CHILD_�悿�悿 = 30
#DIM CONST CHILD_���� = 35
#DIM CONST CHILD_��b = 45
#DIM CONST CHILD_���� = 55
#DIM CONST CHILD_�A�w = 60
#DIM CONST CHILD_�����O = 90
#DIM CONST CHILD_���� = 120

#DIM ROOMDATA, 100
#DIM CONST �ꏊ_�z�c	= 1p0
#DIM CONST �ꏊ_����	= 1p1	;INROOM
#DIM CONST �ꏊ_���C	= 1p2
#DIM CONST �ꏊ_�~�[	= 1p3
#DIM CONST �ꏊ_�P��	= 1p4
#DIM CONST �ꏊ_�׋�	= 1p5
#DIM CONST �ꏊ_�x�e	= 1p6
#DIM CONST �ꏊ_�g�C��	= 1p7
#DIM CONST �ꏊ_�V��	= 1p8	;OUTROOF_0
#DIM CONST �ꏊ_����	= 1p9
#DIM CONST �ꏊ_�V�̐�	= 1p10
#DIM CONST �ꏊ_�؉�	= 1p11
#DIM CONST �ꏊ_������	= 1p12
#DIM CONST �ꏊ_���ʂ� = 1p13	;OPENPLACE_0
#DIM CONST �ꏊ_������ = 1p14
#DIM CONST �ꏊ_����	= 1p15	;SMALL_PLACE_0
#DIM CONST �ꏊ_�L��	= 1p16
#DIM CONST �ꏊ_�������Q_�\ = 1p17	;CATNAP_PLACE_0
#DIM CONST �ꏊ_�������Q_�펞�� = 1p18
#DIM CONST �ꏊ_�g�̑��� = 1p19
#DIM CONST �ꏊ_���u = 1p20
#DIM CONST �ꏊ_���u�Q = 1p21
#DIM CONST �ꏊ_���u�R = 1p22
#DIM CONST �ꏊ_�ߑa = 1p23
#DIM CONST �ꏊ_�v���C�x�[�g = 1p24
#DIM CONST �ꏊ_�����̏� = 1p25

#DIM CONST �ꏊ_���܂�Ȃ�	= 1p30
#DIM CONST �ꏊ_�������[��	= 1p31

#DIM CONST �ꏊ_�����ʒu	= 1p61
#DIM CONST �ꏊ_����		= 1p62
#DIM CONST �ꏊ_����= 1p63

#DIM CONST YOBAI_�\�t�g = 1p0
#DIM CONST YOBAI_�Z�N�n�� = 1p1
#DIM CONST YOBAI_�K�`�Z�N�n�� = 1p2
#DIM CONST YOBAI_���Ӕ�}�� = 1p3
#DIM CONST YOBAI_���Ӄb�N�X = 1p4
#DIM CONST YOBAI_���C�v = 1p5
#DIM CONST YOBAI_���� = 1p6
#DIM CONST YOBAI_���S = 1p7

;�퓬�֘A
#DIM ENEMY_NUM
#DIMS ENEMY_NAME
#DIM ENEMY_HP
#DIM ENEMY_MAXHP
#DIM ENEMY_ATK
#DIM ENEMY_ATK_DIRECTION

#DIMS ENEMY_SKILL_NAME
#DIM ENEMY_SKILL_ATK
#DIM ENEMY_SKILL_SPD
#DIM ENEMY_SKILL_WAIT

;�F
#DIM CONST C_YELLOW = 0xFFFF00
#DIM CONST C_P_YELLOW = 0x505020
#DIM CONST C_BLUE = 0x0000FF
#DIM CONST C_TEAL = 0x008080
#DIM CONST C_GREEN = 0x00FF00
#DIM CONST C_P_GREEN = 0x70C070
#DIM CONST C_AQUA = 0x66FFFF
#DIM CONST C_ORANGE = 0xFFA500
#DIM CONST C_P_PURPLE = 0xC070C0
#DIM CONST C_WHITE = 0xC0C0C0
#DIM CONST C_RED = 0xFF0000
#DIM CONST C_D_RED = 0x990000
#DIM CONST C_P_BLUE = 0x7070C0
#DIM CONST C_GRAY = 0x404040
#DIM CONST C_L_GRAY = 0x777777
#DIM CONST C_PINK = 0xFFCCFF
#DIM CONST C_D_PINK = 0x990099
#DIM CONST C_CREAM = 0xFFFFCC
#DIM CONST C_M_GREEN = 0x00FA9A

;�J�[�h�Q�[���p�ϐ�
;����p��BJ�ȊO�̊֐��ł��Q�Ƃł���悤�ɍL��ϐ���
;
;�ꉞ�킩��₷�����U�@�̎g������z�肵�č����
;�@CARD_HAND:0:0 == 5       ;�v���C���[0�̎�D0��5�ł�
;�@CARD_HAND:0:1 == 1       ;�v���C���[0�̎�D1��1�ł�
;
;����Ȏg�������ł���i��D�̋L�^�̈���R�D�Ɠ��������m�ۂ��Ă��邽�߁j
;�@CARD_HAND:0:1 == 5       ;CARD1�̓v���C���[5�������Ă܂�
;�@CARD_HAND:0:2 == 1       ;CARD2�̓v���C���[1�������Ă܂�
;�@CARD_HAND:0:3 == -1      ;CARD3��ɕ�����ꂽ��Ԃł�
;�@CARD_HAND:0:4 == -2      ;CARD4�͂��̃Q�[���ł͎g�p���܂���
;�g�p�ϐ������k�ł��邪��D�̏��ԂȂǂ͋L�^�ł��Ȃ��̂����_
;���Ə������e����₱����
;
;���������60���͎Q�������邱�Ƃ��\
;�ECARD_DECK�Ƀf�b�L�̃V���b�t���󋵂��L�^����
;�ECARD_HAND:X:Y�͕ϑ��I�ɗ��p����
;�@X=0,Y=1-60�ł�L���@�ɂ��e�J�[�h�̕��z�󋵂��L�^
;�@X=1,Y=1-60�ł͎Q���L������ID���L�^
;�����Ƃ��A���̋K�͂��ƃJ�[�h���̖̂���������Ȃ���

#DIM NUM_JOKER              ;�g�p����W���[�J�[�̐�
#DIM CONST MAX_JOKER = 8    ;�W���[�J�[�̏����8��
#DIM NUM_CARD               ;�f�b�L�Ɋ܂܂��J�[�h�̖���
#DIM NUM_CARD_PL            ;�J�[�h�Q�[���̎Q���v���C���[�l���i�ő�10�j
#DIM CONST MAX_CARD_PL = 10 ;�Q���v���C���[�����10��
#DIM CARD_PL_ID, 10         ;�ePL�̓o�^�ԍ��A���܂�Ƃ��g���ĂȂ�
#DIM CARD_DECK, 60          ;�R�D�A1�`52�{�W���[�J�[0�`8���A���v60��
#DIM NEW_CARD               ;���Ɉ����R�D�̔ԍ��i�����ݏ�����R�D�̖����j
#DIM CARD_HAND, 10, 60      ;�ePL�̎�D
#DIM NUM_HAND, 10           ;�ePL�̏�������

;�J�[�h�i�g�����v�j�Q�[���p�ėp������ϐ�
;���ӓ_�Ƃ��Ă�
;SUIT:0���u�H�v��RANK:0���uJK�v�ɂ��Ă���_
{
#DIMS CONST CARD_SUIT, 5  = "�H",
	@"%UNICODE(0x2660)%",
	@"%UNICODE(0x2663)%",
	@"%UNICODE(0x2665)%",
	@"%UNICODE(0x2666)%"
}
{
#DIMS CONST CARD_RANK, 14 = "JK",
	"�`", "�Q", "�R", "�S", "�T",
	"�U", "�V", "�W", "�H", "10",
	"�i", "�p", "�j"
}

#DIM CONST COM�N���L���b�v = 42
#DIM CONST COM�I�i�z�[�� = 43;�K�v�Ȃ�����
#DIM CONST COM�o�C�u = 44
#DIM CONST COM�A�i���o�C�u = 45
#DIM CONST COM�A�i���r�[�Y = 46;�K�v�Ȃ�����
#DIM CONST COM�j�v���L���b�v = 47
#DIM CONST COM����@ = 48;�K�v�Ȃ�����
#DIM CONST COM�A�C�}�X�N = 104
#DIM CONST COM�� = 105
#DIM CONST COM�{�[���M���O = 106;�K�v�Ȃ�����
#DIM CONST COM���� = 146;�K�v�Ȃ�����
#DIM CONST COM�g���o���[�� = 147;�K�v�Ȃ�����
#DIM CONST COM�A�i���d�� = 148;�K�v�Ȃ�����
#DIM CONST COM�r�f�I�B�e = 183;�K�v�Ȃ�����
#DIM CONST COM�����C��v���C = 187;�K�v�Ȃ�����
#DIM CONST COM�V�����[ = 188
#DIM CONST COM�V�ȃv���C = 189
#DIM CONST COM�������P = 351

path: 原版+前人整合等各种readme/パッチ/eraTW4.611用色々改良パッチ/ERB/DIM.ERH


code:
@�L�����ړ�����(ARG)
#DIM ���܂藦
#DIM �ړ���
#DIM �ړ�����
#DIM �����ʈړ�
#DIM �����ړ�
#DIM �������[���l���J�E���g
VARSET LOCAL
;���Ȃ��̋��_�����ɂ���L�����݂̂��Ώ�
SIF !AT_HOME(ARG)
	GOTO FINISH

SIF FLAG:���Ԓ�~ || CFLAG:ARG:���� || CFLAG:ARG:������ || CFLAG:ARG:����
	GOTO FINISH

;�d���A�f�B���C�A�Y���Q�A���ӂӁA���s���͈ړ��������Z�b�g
SIF CFLAG:ARG:�s�� == 5 || CFLAG:ARG:�f�B���C || CFLAG:ARG:�Y���Q�� || CFLAG:ARG:���ӂ� || CFLAG:ARG:���s
	GOTO FINISH

;���[�v�O�ɏ���
CALLFORM CHARAMOVE_DATA_{ARG}(4, CFLAG:ARG:���݈ʒu)
���܂藦 = RESULT
;���܂�ɂ����ꏊ
SIF CFLAG:ARG:���݈ʒu == GET_ENTRANCE(MAIN_MAP) || ROOMDATA:(CFLAG:ARG:���݈ʒu % 100) & �ꏊ_���܂�Ȃ�
	���܂藦 += -5
;���Ȃ��Ɠ�����������ԓx�ŗ��܂�
SIF CFLAG:ARG:���݈ʒu == CFLAG:MASTER:���݈ʒu
	���܂藦 += CFLAG:ARG:�ԓx * 2
SIF CFLAG:ARG:���݈ʒu == MAXROOM
	���܂藦 = -5

�����ʈړ� = 0
�����ړ� = 0
IF BATHROOM(CFLAG:ARG:���݈ʒu)
	;�����C�Ȃ�
	IF CFLAG:ARG:���C
		GOTO FINISH
	;������
	ELSE
		�����ʈړ� = 1
	ENDIF
ENDIF
;�g�C���ɋ���10���ȏ�o�߂��Ă���
SIF ROOMDATA:(CFLAG:ARG:���݈ʒu % 100) & �ꏊ_�g�C�� && TIME_PROGRESS(TIME:1) >= 10
	�����ʈړ� = 1
;�V��_���[�W���ɂ�
SIF �V��ɂ��e��(ARG, CFLAG:ARG:���݈ʒu) <= -3
	�����ʈړ� = 1
;���݈ʒu���{������Ȃ��ꏊ�i�Ȃ������Ȃ������Ȃ��j
CALL �L�����ړ���(ARG, CFLAG:ARG:���݈ʒu, ���܂藦)
SIF RESULT <= 0 && CFLAG:ARG:���݈ʒu != CFLAG:MASTER:���݈ʒu
	�����ʈړ� = 1
;�Ȃ�ׂ������Ȃ�
SIF TCVAR:ARG:�Ȃ�ׂ������Ȃ� && !�����ʈړ�
	GOTO FINISH

;���ԃV���b�t��
CALL FISHER_YATES_SHAFFLE(MAXROOM - MINROOM())
;�V���b�t�������̂ňړ��ł������ȂƂ��납�璀���ړ����Ă���
;PRINTFORML %CALLNAME:ARG%��%NAME_FROM_PLACE(CFLAG:ARG:���݈ʒu)%
�ړ����� = 0
$KYOUSEI
FOR LOCAL, 0, MAXROOM - MINROOM()
	�ړ��� = SHAFFLE_ARRAY:LOCAL + MAIN_MAP * 100 + 1
;	PRINTFORML �ړ���F%NAME_FROM_PLACE(�ړ���)%({�ړ���})
	;���݈ʒu
	SIF �ړ��� == CFLAG:ARG:���݈ʒu
		CONTINUE
	;�ړ��ł��Ȃ�
	SIF !(CAN_MOVE(CFLAG:ARG:���݈ʒu, �ړ���) & 1)
		CONTINUE
	;�ړ��ł��Ȃ��Q,�������[���������A�ړ��ɐ���������ꏊ
	SIF !MAP_CAN_MOVE(�ړ���, ARG)
		CONTINUE
	;�O�ɏo���Ȃ�
	SIF �V��ɂ��e��(ARG, �ړ���) <= -3 && CFLAG:ARG:���݈ʒu != MAXROOM && �V��ɂ��e��(ARG, CFLAG:ARG:���݈ʒu) >= -2
		CONTINUE
	;�ړ��悪���Ȃ������ł���A���̃L�����̎����łȂ��A�����ł��Ȃ����E�t�t���̏ꍇ�͓����Ă���Ȃ�
	SIF �ړ��� == CFLAG:MASTER:�����ʒu && �ړ��� != CFLAG:ARG:�����ʒu && �ړ��� == CFLAG:MASTER:���݈ʒu && CFLAG:MASTER:���ӂ�
		CONTINUE
	;���E������
	SIF TEQUIP:MASTER:���E���� && �ړ��� == CFLAG:MASTER:���݈ʒu
		CONTINUE
	CALL �L�����ړ���(ARG, �ړ���, ���܂藦)
;	PRINTFORM ���ړ����F{RESULT * TIME_PROGRESS(TIME:1)}
	;�ړ�����,�����ړ��Ȃ瑦�ړ�
	IF RESULT * TIME_PROGRESS(TIME:1) > RAND:1000
;		PRINTFORMW ���ړ��I
		�ړ����� = �ړ���
		BREAK
	;�����ʈړ����͈ړ���������Α��ړ�,�����ړ����������Ă���Ȃ�ǂ��ł��ړ�
	ELSEIF (RESULT && �����ʈړ�) || �����ړ�
;		PRINTFORMW ���ړ��I
		�ړ����� = �ړ���
		BREAK
	;�ړ���0%����Ȃ���ΏI��
	ELSEIF RESULT
;		PRINTFORMW �����[�v
		BREAK
	ENDIF
NEXT
;�����ʈړ����ɑS���ʈړ���0�Ȃ狭���ړ�
IF �����ʈړ� && !�ړ����� && !�����ړ�
	�����ړ� = 1
	GOTO KYOUSEI
ENDIF
;�ړ����Ȃ�������I��
IF !�ړ�����
	$FINISH
	TCVAR:ARG:�Ȃ�ׂ������Ȃ� = 0
	RETURN
ENDIF

IF (CAN_MOVE(CFLAG:MASTER:���݈ʒu, CFLAG:ARG:���݈ʒu) & 2 || CFLAG:ARG:����) && !CFLAG:MASTER:����
	IF CFLAG:ARG:���݈ʒu != �ړ��� && AT_HOME(MASTER) == 1 && INRANGE(�ړ���,MINROOM(),MAXROOM)
		IF CFLAG:ARG:���݈ʒu == MAXROOM
			PRINTFORMW %CALLNAME:ARG%���y%NAME_FROM_PLACE(�ړ���)%�z�ɂ���Ă���
		ELSE
			PRINTFORM %CALLNAME:ARG%�́y
			PRINTFORMS NAME_FROM_PLACE(CFLAG:ARG:���݈ʒu)
			PRINT �z����y
			PRINTFORMS NAME_FROM_PLACE(�ړ���)
			PRINTW �z�Ɉړ�����
			LOCAL:4 = 1
		ENDIF
	ENDIF
ENDIF
IF ROOMDATA:(CFLAG:ARG:���݈ʒu % 100) & �ꏊ_�������[��
	IF CFLAG:ARG:���݈ʒu == CFLAG:ARG:�����ʒu
		LOCAL:2 = -1
		�������[���l���J�E���g = 0
		WHILE 1
			LOCAL:2 = FINDCHARA(CFLAG:���݈ʒu, CFLAG:ARG:���݈ʒu, LOCAL:2 + 1)
			SIF LOCAL:2 < 0 || TALENT:ARG:����
				BREAK
			IF LOCAL:2 && LOCAL:2 != ARG
				CFLAG:(LOCAL:2):���݈ʒu = �ړ���
				�������[���l���J�E���g ++
			ENDIF
		WEND
		IF LOCAL:4
			IF !TALENT:ARG:���� && CFLAG:ARG:���݈ʒu == CFLAG:MASTER:���݈ʒu
				PRINTFORM %CALLNAME:MASTER%\@ �������[���l���J�E���g ? �B #  \@���A%CALLNAME:ARG%�ɑ�����y
				PRINTFORMS NAME_FROM_PLACE(CFLAG:ARG:���݈ʒu)
				PRINT �z����y
				PRINTFORMS NAME_FROM_PLACE(�ړ���)
				PRINTW �z�Ɉړ�����
				CFLAG:MASTER:���݈ʒu = �ړ���
			ELSEIF �������[���l���J�E���g
				PRINTFORM %CALLNAME:ARG%�ɑ�����A%CALLNAME:MASTER%�ȊO�́y
				PRINTFORMS NAME_FROM_PLACE(CFLAG:MASTER:���݈ʒu)
				PRINT �z����y
				PRINTFORMS NAME_FROM_PLACE(�ړ���)
				PRINTW �z�Ɉړ�����
			ELSE
				PRINTFORMW %CALLNAME:ARG%�́A%CALLNAME:MASTER%�ɗ���Ԃ����肢���Ă�����
			ENDIF
		ENDIF
	ELSEIF CFLAG:ARG:���݈ʒu == CFLAG:MASTER:���݈ʒu && IN_ROOM_NUMBER(CFLAG:ARG:���݈ʒu) == 2
		PRINTFORM %CALLNAME:MASTER%���A%CALLNAME:ARG%�ɑ�����y
		PRINTFORMS NAME_FROM_PLACE(CFLAG:ARG:���݈ʒu)
		PRINT �z����y
		PRINTFORMS NAME_FROM_PLACE(�ړ���)
		PRINTW �z�Ɉړ�����
		CFLAG:MASTER:���݈ʒu = �ړ���
	ENDIF
ENDIF
;�ړ�����
CFLAG:ARG:���݈ʒu = �ړ���
TCVAR:ARG:�Ȃ�ׂ������Ȃ� = 1

;--------------------------------------------------------
;�L����(ARG)���n�_(ARG:1)�ֈړ�����m���^��
;ARG:2=���܂藦�i�}�C�i�X�␳�j
;�����l��10�{��������
;�����֐��ɂ������������c
;--------------------------------------------------------
@�L�����ړ���(ARG, ARG:1, ARG:2)
#DIM �ړ���
#DIM �ړ���
#DIM �����C���肽��
�ړ��� = ARG:1
IF TALENT:ARG:�X��
	�����C���肽�� = 1500
;CHARAMOVE�ɂ����C�������ƋL�q���������L�����i��,��,���ׁj
ELSEIF GROUPMATCH(ARG, 24, 87, 97)
	�����C���肽�� = 1500
ELSEIF TALENT:ARG:���L�ϐ� == -2
	�����C���肽�� = 600
ELSEIF TALENT:ARG:���L�ϐ� == -1
	�����C���肽�� = 800
ELSEIF TALENT:ARG:���L�ϐ� == 0
	�����C���肽�� = 1000
ELSEIF TALENT:ARG:���L�ϐ� == 1
	�����C���肽�� = 1500
ELSEIF TALENT:ARG:���L�ϐ� == 2
	�����C���肽�� = 2000
ENDIF
;��{�ړ���,1.5% / �� = 45.0% / 30��
�ړ��� = 15 + CFLAG:ARG:�ړ����␳
;���Ȃ��������Ă�����ԓx�ŃA�b�v
SIF CAN_MOVE(CFLAG:ARG:���݈ʒu, �ړ���) == 3
	�ړ��� += CFLAG:ARG:�ԓx * 2
;�|���W�͑|��������ɉe�������
SIF TALENT:ARG:�|���W && CFLAG:ARG:�_�ЍݏZ && BETWEENTIME(720,1080)
	�ړ��� += YOGORE:�ړ��� / 300
;MOVEMENT_PRESET�̐ݒ�����p���i�ǉ��̕␳�j
CALLFORM CHARAMOVE_DATA_{ARG}(4, �ړ���)
�ړ��� = �ړ��� + RESULT

;�����C�ɓ��肽�����͓���ɍs��
IF ROOMDATA:(�ړ��� % 100) & �ꏊ_���C
	IF CFLAG:ARG:���C >= �����C���肽��
		�ړ��� = �ړ��� * 10
	ELSE
		�ړ��� = 0
	ENDIF
ENDIF

;����������΍�Ƃ��āA�V��_���[�W���Ȃ��󋵂ŉ����ɂ���ꍇ���O�֍s��������悤��
SIF !ROOMDATA:(�ړ��� % 100) & �ꏊ_���� && �V��ɂ��e��(ARG, �ړ���) >= 0 && ROOMDATA:(CFLAG:ARG:���݈ʒu % 100) & �ꏊ_����
	�ړ��� += 30

;�ړ��ߓx�ɂ���čs���Ȃ��ꏊ��ݒ�
;MAP�Z�l�̃v���C�x�[�g�ӏ��͌ʂɐݒ肵�Ă�������
;1=�q�ɂ�H�n���A�n�������]�v�ȏꏊ�ɂ͈ړ����Ȃ�
;-1=�v���C�x�[�g�ȏꏊ�ł����܂�C�ɂ����ړ�����
;-2=����Ƃ�����Ƃ���Ɉړ�����
IF �ړ��� != CFLAG:ARG:�����ʒu && CFLAG:ARG:���݈ʒu != MAXROOM
	IF CFLAG:ARG:�ړ��ߓx >= 1 && !CFLAG:ARG:�_�ЍݏZ
		SIF ROOMDATA:(�ړ��� % 100) & �ꏊ_�ߑa
			�ړ��� = 0
	ENDIF
	IF CFLAG:ARG:�ړ��ߓx >= 0 && !CFLAG:ARG:�_�ЍݏZ
		SIF ROOMDATA:(�ړ��� % 100) & �ꏊ_�v���C�x�[�g
			�ړ��� = 0
		SIF ROOMDATA:(�ړ��� % 100) & �ꏊ_�ߑa
			�ړ��� = �ړ��� * 1 / 3
	ENDIF
	IF CFLAG:ARG:�ړ��ߓx >= -1
		SIF ROOMDATA:(�ړ��� % 100) & �ꏊ_�v���C�x�[�g && !CFLAG:ARG:�_�ЍݏZ
			�ړ��� = �ړ��� * 2 / 3
		SIF ROOMDATA:(�ړ��� % 100) & �ꏊ_�g�C��
			�ړ��� = �ړ��� * 1 / 3
		SIF �V��ɂ��e��(ARG, �ړ���) <= -1
			�ړ��� = �ړ��� * 1 / 3
	ENDIF
ENDIF
;���܂藦
�ړ��� = MAX(�ړ��� - ARG:2, 0)
RETURN �ړ���

repo_name: akadiya/eratw

license: unknown


code:
@ROOMSETTING_2
VARSET ROOMDATA
FOR LOCAL,1,100
	SIF GROUPMATCH(LOCAL,26,21,24,25,30,31,32,33,34,35)
		ROOMDATA:LOCAL |= �ꏊ_�z�c
	SIF GROUPMATCH(LOCAL,11,12,13,15,16,17,18,19,21,22,23,24,25,26,30,31,32,33,34,35)
		ROOMDATA:LOCAL |= �ꏊ_����
;	SIF GROUPMATCH(LOCAL,)
;		ROOMDATA:LOCAL |= �ꏊ_���C
	SIF GROUPMATCH(LOCAL,21,30,31,32,33,34,35)
		ROOMDATA:LOCAL |= �ꏊ_�~�[
;	SIF GROUPMATCH(LOCAL,)
;		ROOMDATA:LOCAL |= �ꏊ_�P��
	SIF GROUPMATCH(LOCAL,19, 21, 22)
		ROOMDATA:LOCAL |= �ꏊ_�׋�
	SIF GROUPMATCH(LOCAL,13,19, 21, 22,24,26,30,31,32,33,34,35)
		ROOMDATA:LOCAL |= �ꏊ_�x�e
	SIF GROUPMATCH(LOCAL,36)
		ROOMDATA:LOCAL |= �ꏊ_�g�C��
	SIF GROUPMATCH(LOCAL,1,2,3,4,5,6,7,14,20,36,37)
		ROOMDATA:LOCAL |= �ꏊ_�V��
	SIF GROUPMATCH(LOCAL,1,2,3,4,5,6,7,14,20,36,37)
		ROOMDATA:LOCAL |= �ꏊ_����
	SIF GROUPMATCH(LOCAL,7)
		ROOMDATA:LOCAL |= �ꏊ_�V�̐�
;	SIF GROUPMATCH(LOCAL,)
;		ROOMDATA:LOCAL |= �ꏊ_�؉�
	SIF GROUPMATCH(LOCAL,37)
		ROOMDATA:LOCAL |= �ꏊ_������
	SIF GROUPMATCH(LOCAL,1,2,3,4,5,6,7,20)
		ROOMDATA:LOCAL |= �ꏊ_���ʂ�
	SIF GROUPMATCH(LOCAL,21,26,30,31,32,33,34,35)
		ROOMDATA:LOCAL |= �ꏊ_����
	SIF GROUPMATCH(LOCAL,19, 21, 22,26,30,31,32,33,34,35)
		ROOMDATA:LOCAL |= �ꏊ_�������Q_�\
	SIF GROUPMATCH(LOCAL,19,22,23,26)
		ROOMDATA:LOCAL |= �ꏊ_�g�̑���
	SIF GROUPMATCH(LOCAL,24,31,32,33,34,35)
		ROOMDATA:LOCAL |= �ꏊ_�������[��
	SIF GROUPMATCH(LOCAL,1,3,4,5,6)
		ROOMDATA:LOCAL |= �ꏊ_���܂�Ȃ�
;	SIF GROUPMATCH(LOCAL,)
;		ROOMDATA:LOCAL |= �ꏊ_�ߑa
	SIF GROUPMATCH(LOCAL,21,24,26,30,31,32,33,34,35,36,37)
		ROOMDATA:LOCAL |= �ꏊ_�v���C�x�[�g
	SIF GROUPMATCH(LOCAL,1,2,3,4,5,6,7,11,12,14,15,16,17,18,19,23)
		ROOMDATA:LOCAL |= �ꏊ_�����̏�
NEXT

MAXROOM = 238
ENTRANCE = 201
���� = 220
SIF GET_MAPID(���__��) != MAIN_MAP
	���__�� = 230
MAP_PAGES = 3
MAPNAME:1 = �l��
MAPNAME:2 = ����
MAPNAME:3 = ��ވ�

@DEFAULT_OWNER_2
�f�t�H���g�����ʒu = 230
���__��� = 80


code:
@ROOMSETTING_5
VARSET ROOMDATA
FOR LOCAL,1,100
	SIF GROUPMATCH(LOCAL,12,21,22,23,35,41,42,43,44)
		ROOMDATA:LOCAL |= �ꏊ_�z�c
	SIF GROUPMATCH(LOCAL,2)
		ROOMDATA:LOCAL |= �ꏊ_����
	SIF INRANGE(LOCAL,10,15) || INRANGE(LOCAL,21,31) || INRANGE(LOCAL,34,37)|| INRANGE(LOCAL,41,44)
		ROOMDATA:LOCAL |= �ꏊ_����
	SIF GROUPMATCH(LOCAL,14,26,37)
		ROOMDATA:LOCAL |= �ꏊ_���C
	SIF GROUPMATCH(LOCAL,11,25,34)
		ROOMDATA:LOCAL |= �ꏊ_�~�[
	SIF GROUPMATCH(LOCAL,8)
		ROOMDATA:LOCAL |= �ꏊ_�P��
	SIF GROUPMATCH(LOCAL,13, 21, 22, 23, 24, 34, 41, 44)
		ROOMDATA:LOCAL |= �ꏊ_�׋�
	SIF GROUPMATCH(LOCAL,11,12,15,21,22,23,25,34,41,42,43,44)
		ROOMDATA:LOCAL |= �ꏊ_�x�e
	;SIF GROUPMATCH(LOCAL,36)
	;	ROOMDATA:LOCAL |= �ꏊ_�g�C��
	SIF GROUPMATCH(LOCAL,1,3,4,5,6,7,8,9,29,40)
		ROOMDATA:LOCAL |= �ꏊ_�V��
	SIF GROUPMATCH(LOCAL,1,3,4,5,6,7,8,9,29,40)
		ROOMDATA:LOCAL |= �ꏊ_����
	;SIF GROUPMATCH(LOCAL,)
	;	ROOMDATA:LOCAL |= �ꏊ_�V�̐�
	SIF GROUPMATCH(LOCAL,8)
		ROOMDATA:LOCAL |= �ꏊ_�؉�
	SIF GROUPMATCH(LOCAL,3,20,34)
		ROOMDATA:LOCAL |= �ꏊ_������
	SIF GROUPMATCH(LOCAL,1,6,8)
		ROOMDATA:LOCAL |= �ꏊ_���ʂ�
	SIF GROUPMATCH(LOCAL,15)
		ROOMDATA:LOCAL |= �ꏊ_����
	SIF GROUPMATCH(LOCAL,12,21,22,23,35,41,42,43,44)
		ROOMDATA:LOCAL |= �ꏊ_�������Q_�\
	SIF GROUPMATCH(LOCAL,1,3)
		ROOMDATA:LOCAL |= �ꏊ_���܂�Ȃ�
	SIF GROUPMATCH(LOCAL,14,26,37)
		ROOMDATA:LOCAL |= �ꏊ_�g�̑���
	SIF GROUPMATCH(LOCAL,41,42,43,44)
		ROOMDATA:LOCAL |= �ꏊ_�������[��
	SIF GROUPMATCH(LOCAL,6,9,15,28,31,36)
		ROOMDATA:LOCAL |= �ꏊ_�ߑa
	SIF GROUPMATCH(LOCAL,11,12,13,14,15,21,22,23,24,25,26,28,29,30,31,35,36,37,41,42,43,44)
		ROOMDATA:LOCAL |= �ꏊ_�v���C�x�[�g
	SIF GROUPMATCH(LOCAL,2)
		ROOMDATA:LOCAL |= �ꏊ_�����̏�
NEXT

MAXROOM = 546
ENTRANCE = 501
���� = 506

SIF GET_MAPID(���__��) != MAIN_MAP
	���__�� = 511
MAP_PAGES = 4
MAPNAME:1 = ���@�̐X
MAPNAME:2 = �l�`�̗m��
MAPNAME:3 = ��������
MAPNAME:4 = �ӂ�ӂ�G�����̓X

@DEFAULT_OWNER_5
�f�t�H���g�����ʒu = 515
���__��� = 11


code:
@MAP_TIREIDEN

PRINTBUTTON "�P:�n��a�O ",901
PRINTBUTTON "�Q:�G���g�����X ",902
PRINTBUTTON "�R:���ڊ� ",903
PRINTBUTTON "�S:��L�� ",904
PRINTBUTTON "�T:��K�L�� ",905
PRINTBUTTON "�U:��K�g�C�� ",906
;PRINTBUTTON "�V:���K�i ",907
;PRINTBUTTON "�W:���K�i ",908
PRINTBUTTON "�X:�~�[ ",909
PRINTBUTTON "10:�H���� ",910
PRINTBUTTON "11:���󎄎� ",911
PRINTBUTTON "12:���ӎ��� ",912
PRINTBUTTON "13:�H�� ",913
PRINTBUTTON "14:��K�L�� ",914
PRINTBUTTON "15:�o���R�j�[ ",915
PRINTBUTTON "16:���u ",916
PRINTBUTTON "17:��K�g�C�� ",917
PRINTBUTTON "18:���������� ",918
PRINTBUTTON "19:���Ƃ莄�� ",919
PRINTBUTTON "20:���� ",920
PRINTBUTTON "21:���C ",921
PRINTBUTTON "22:�E�ߏ� ",922
PRINTBUTTON "23:���� ",923
;PRINTBUTTON "24:���� ",924
PRINTBUTTON "25:�o���� ",925
PRINTBUTTON "26:���� ",926
PRINTBUTTON "27:�ܔM�n���Փ��� ",927
PRINTL

@MAP_OLD_HELL
PRINTL �@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
PRINT ���@�@�@�@
CALL GETMAP(926)
PRINTL ���@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
PRINTL �������@����������������������������������������������������������������
PRINTL ������������������������������������������������������������������������
PRINTL �������@����������������������������������������������������������������
PRINT ������
CALL GETMAP(927)
PRINTL ����������������������������������������������������������������
PRINTL �`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`
PRINTL �`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`
PRINTL �������@����������������������������������������������������������������
PRINTL �����@�@�@��������������������������������������������������������������
PRINTL �@�@�@�@�@�@�@����������������������������������������������������������
PRINTL �@�@�@�@�@�@�@�@�@�@�@�@�@����������������������������������������������
PRINTL �@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
PRINTL �@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
PRINTL �@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
SETCOLOR 0xff4242
PRINTL �@�@�@���@�΁@�Ή����΁@�@�@�@���΁@�@�@�@�@�@�Ή����@�@�@�@�@�@�@�@�@�@
PRINT �Ή��΁@
CALL GETMAP(928)
SETCOLOR 0xff4242
PRINTL �@�Ή��������ΉΉΉ��Ή����΁@�ΉΉ��ΉΉΉ��ΉΉΉ��Ή΁@�Ή�
RESETCOLOR
PRINTL �������������������������������������������������������������������@����
PRINTL �������������������������������������������������������������������@����
PRINTL �����������������������������@�@�@�@�@�����������������������������@����
PRINTL ���������������������@�@�@�@�@�@�@�@�@�@�@�@�@���������������������@����
PRINT ���������@�@�@�@�@�@�@�@�@�@�@�@�@�@
CALL GETMAP(929)
PRINTL �@�@�@�@�@�@�@�@�@�@�@�������@����
SETCOLOR 0xffedab
PRINT �@�@�@�@�@�@�@�@�@�@�@,,,,,,,,,,,,,,,,,,,,�@�@�@�@�@�@�@�@�@�@�@
RESETCOLOR
PRINTL �@�@�@��
SETCOLOR 0xffedab
PRINTL �@�@�@�@�@,,,,'''''''';;||||||||||||||||||'''''''',,,,,,�@�@�@�@�@�@�@�@
PRINTL �@,,,,,,'''''''''';;;;||||||||||||||||||||||||||||''''''''''''',,,,,,,�@
PRINT '''''''''
CALL GETMAP(930)
SETCOLOR 0xffedab
PRINTL  ''';;;;;|||||||||||||||||||||||||||||||||||||||''''''''''''
RESETCOLOR
PRINTL
PRINTBUTTON "26:���� ",926
PRINTBUTTON "27:�ܔM�n���Փ��� ",927
PRINTBUTTON "28:�ܔM�n���� ",928
PRINTBUTTON "29:�n��s�s�Ő[�� ",929
PRINTBUTTON "30:�n���̐l�H���z ",930

@MAP_OLD_CITY

PRINTBUTTON "�P:�n��a�O ",901
PRINTBUTTON "�Q:�n��a�E�G���g�����X ",902
PRINTBUTTON "31:��ʂ� ",931
PRINTBUTTON "32:���ʂ� ",932
PRINTBUTTON "33:���� ",933
PRINTBUTTON "34:���� ",934
PRINTBUTTON "35:���u�z ",935
PRINTBUTTON "36:�E�V�̉� ",936
PRINTBUTTON "37:�󂫉� ",937
PRINTBUTTON "38:�S�̗��܂�� ",938
PRINTBUTTON "39:�H�n�� ",939
PRINTBUTTON "40:�p���X�B�̉� ",940
PRINTBUTTON "41:���}���̉� ",941
PRINTBUTTON "42:�L�X���̉� ",942
PRINTBUTTON "43:���΂牮 ",943
PRINTBUTTON "44:�ʂ� ",944
PRINTBUTTON "45:��� ",945
PRINTBUTTON "46:�� ",946
;PRINTBUTTON "47:�n�� ",947
PRINTBUTTON "48:�c���̒� ",948
;PRINTBUTTON "49:�n�� ",949
PRINTL

@MAP_CHIREIDEN_1(AA)
#DIMS REF AA, 0

AA:00 = @@@@@@@@@@@@@@@@�@�@�@�@�_�@�@�@�@�@�^�@�@��K���n��a����K
AA:01 = ���������@�@�@�@�@�_�Q�Q�Q�^�@�@�@�@�@�����������@�@
AA:02 = @@@@@ 25 @@@@@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@���@�@�@�@
AA:03 = �������@�@�@�@�@�@�@�@�@�@�@�@23�@#A#B#C#D�@���@�@�@�@
AA:04 = �@�����������������������������������������������@���@����������������������������������������������
AA:05 = �@�����������@���@�@�@�@ 13 �@�@�@�@���@�����Ӂ��@���@���@�������@���@���Ƃ�@���@���ց@���@���C�@��
AA:06 = �@�����~�[09�@���@�����@�����@�����@���@�� 12 ���@���@���@�@18�@�@���@�@19�@�@���@ 20 �@���@ 21 �@��
AA:07 = �@���@�@�@�@�����@�����@�����@�����@���@���@�@���@���@���@�@�@�@�@���@�@�@�@�@���@�@�@�@���@�@�@�@��
AA:08 = �@���������������@�����@�����@�����@���@���������@���@����������������������������������������������
AA:09 = �@�� 10 ���@�@���@�@�@�@�@�@�@�@�@�@���@�����󁡁@���@��17WC���@�@�@�@�@�@�@14�@�@�@�@�@�@�@���E�߁�
AA:10 = �@���������@���������������������������@�� 11 ���@���@���������@���������������������������@�� 22 ��
AA:11 = �@���@�@�@�@���@�@�@�@�@�@�@�@�@�@�@���@���@�@���@���@��16�����@���@�@�@�@�@�@�@�@�@�@�@���@���@�@��
AA:12 = �@���������@���@���@�@�@���@�@�@���@���@���������@���@���������@���@�������������������@���@��������
AA:13 = �@���@||���@���@�@�@�@�@26�@�@�@�@�@���@��||�@���@���@���@||| �@���@�a�@�@�@�@�@�@�@�a�@���@ |||�@��
AA:14 = �@���߄����@���@�@�@�@ ���� �@�@�@�@���@�����߁��@���@���߄����@���@�a�@�@�@�@�@�@�@�a�@���@�����߁�
AA:15 = �@���߄����@���@���@�@���߄��@�@���@���@�����߁��@���@���߄����@���@���@�@�@26�@�@�@���@���@�����߁�
AA:16 = �@��07 |||�@���@�@�@�@��27���@�@�@�@���@||| 08���@���@��07||���@���@�a�@�@ ���� �@�@�a�@���@��||08��
AA:17 = �@���߄����@���@�@�@�@�������@�@�@�@���@�����߁��@���@���߄����@���@�a�@�@�@�@�@�@�@�a�@���@�����߁�
AA:18 = �@���߄����@���@���@�@�@���@�@�@���@���@�����߁��@���@���߄����@���@�������������������@���@�����߁�
AA:19 = �@���@||���@���@�@�@�@�@�@�@�@�@�@�@���@��||�@���@���@���@||| �@���@�@�@�@�@�@�@�@�@�@�@���@ |||�@��
AA:20 = �@���������@���������������������������@���������@���@�������������@�@�@�@�@15�@�@�@�@�@������������
AA:21 = �@��06WC���@�@�@�@�@�@�@05�@�@�@�@�@�@�@���@�@���@���@�@�@�@�@�@�a�@�@�@�@�@�@�@�@�@�@�@�a�@�@�@�@�@
AA:22 = �@�����������������������������������������@�@���@���@�@�@�@�@�@���������������������������@�@�@�@�@
AA:23 = �@�� ���ڊ� ���@�@ �G���g�����X �@�@�� ��L�� ���@��
AA:24 = �@���@ 03 �@���@�@�@���@�@�@���@�@�@���@ 04 �@���@��
AA:25 = �@���@�@�@�@���@�@�@�@�@02�@�@�@�@�@���@�@�@�@���@��
AA:26 = �@�����������������������������������������������@��
AA:27 = �@�@�@�@�@�@�@�@�@�@�@�@01�@�@�@�@�@�@�@�@�@�@�@�@��
AA:28 = �@�@�@�@�@�@�@�@�@�@�@�@���@�@�@�@�@�@�@�@�@�@�@�@��

;���s
@MAP_CHIREIDEN_2(AA)
#DIMS REF AA, 0
AA:00 = �������@���@�@���@�@�������@���@���s�͂����狌�s�ɉ؊X���@�@���@�@���@���@�@�@���@�@�@���@�@�@���n��a�@
AA:01 = �������@���@�@���@�@���@���@����������������焟�����������@�@���@�@���@���@�@�@���@�@�@���@�@�@��焟�����@
AA:02 = �����@�@���@�@���@�@��43���@���@�@�@���@�@��灡�����������������������@�������H�������������������@���@�@
AA:03 = �@�@�@�������������@�������@�����������������@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@���@���@�@
AA:04 = #E�@48�@�@ 46 �@�@�@�@�@�@�@�@�@�@�@�@�@�@���@�@�@�@�@�@�@�@�@�@�@31�@�@�@�@�@�@�@�@�@�@�@�@�@���@���@�@
AA:05 = �@�@�@�������������@�@�@�@�@�@44�@�@�@�@�@���@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@���@���@�@
AA:06 = �����@�@���@�@���@�@������������������������灡���@�����������������������������@���G�������������@���@�@
AA:07 = �������@���@�@���@�@���@40�@���@�@���@�@�����@���@���@�@�@�@�@���@�@�@���@�@���@���@�@���@�@�@���@���@�@
AA:08 = �������@���@�@���@�@�������������������������@���@���@�@�@�@�@���@�@�@�� 37 ���@���@�@���@�@�@���@�@�@�@
AA:09 = �������@���@�@���@�@�@�@�@�@�@�@�@�@�@�@�@��灡���@���@�@33�@�@�����������������@���������@38�@���01�@02��
AA:10 = �������@���@�@���@�@�������������������@�����@���@���@�@�@�@�@���@�@�@���@�@���@�� 36 ���@�@�@���@�@�@�@
AA:11 = ������47���@�@��45�@���@���@�@���@�@���@�����@���@���@�@�@�@�@���@�@�@���@�@���@���@�@���@�@�@���@���@�@
AA:12 = �����������@�@���@�@�������������������@����灡���@�����������������������������@�����������������@���@�@
AA:13 = �����������@�@���@�@�@�@�@�@�@�@�@�@�@�@�@���@�@�@�@�@�@�@�@�@�@�@�@�@32�@�@�@�@�@�@�@�@�@�@�@���@���@�@
AA:14 = �����������@�@���@�@�������@���������@�������@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@���@���@�@
AA:15 = �����������@�@���@�@���@���@�� 42 ���@���@��灡���������u�z���������@�����������������@�����������@���@�@
AA:16 = �����������@�@���@�@��41���@���������@������灡�@�@���@�X�@���@�@���@���@�@�@�@�@�@���@���@�@�@���@���@�@
AA:17 = �����������@�@���@�@���@���@���@�@���@���@��灡�@�@���@�@�@�� 35 ���@���@�@34�@�@�@��39���@�@�@���@���@�@

;���ܔM�n��
@MAP_CHIREIDEN_3(AA)
#DIMS REF AA, 0
AA:00 = �@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
AA:01 = ���@�@�@�@26���@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
AA:02 = �������@����������������������������������������������������������������
AA:03 = ������������������������������������������������������������������������
AA:04 = �������@����������������������������������������������������������������
AA:05 = ������27����������������������������������������������������������������
AA:06 = �`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`
AA:07 = �`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`�`
AA:08 = �������@����������������������������������������������������������������
AA:09 = �����@�@�@��������������������������������������������������������������
AA:10 = �@�@�@�@�@�@�@����������������������������������������������������������
AA:11 = �@�@�@�@�@�@�@�@�@�@�@�@�@����������������������������������������������
AA:12 = �@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
AA:13 = �@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
AA:14 = �@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@�@
AA:15 = �@�@�@���@�΁@�Ή����΁@�@�@�@���΁@�@�@�@�@�@�Ή����@�@�@�@�@�@�@�@�@�@
AA:16 = �Ή��΁@28�@�Ή��������ΉΉΉ��Ή����΁@�ΉΉ��ΉΉΉ��ΉΉΉ��Ή΁@�Ή�
AA:17 = �������������������������������������������������������������������@����
AA:18 = �������������������������������������������������������������������@����
AA:19 = �����������������������������@�@�@�@�@�����������������������������@����
AA:20 = ���������������������@�@�@�@�@�@�@�@�@�@�@�@�@���������������������@����
AA:21 = ���������@�@�@�@�@�@�@�@�@�@�@�@�@�@29�@�@�@�@�@�@�@�@�@�@�@�������@����
AA:22 = �@�@�@�@�@�@�@�@�@�@�@,,,,,,,,,,,,,,,,,,,,�@�@�@�@�@�@�@�@�@�@�@�@�@�@��
AA:23 = �@�@�@�@�@,,,,'''''''';;||||||||||||||||||'''''''',,,,,,�@�@�@�@�@�@�@�@
AA:24 = �@,,,,,,'''''''''';;;;||||||||||||||||||||||||||||''''''''''''',,,,,,,�@
AA:25 = ''''''''' 30 ''';;;;;|||||||||||||||||||||||||||||||||||||||''''''''''''

@ODEKAKEMAP_9(AA)
#DIMS REF AA, 0

AA:00 = �@�@�������@�@�@�����^�^���������������������������������@���@�������@�����@������
AA:01 = �@�@�@�������@�@�@���������������@���H���@���@���@���g���@���@�����@�@�@���@���@�@
AA:02 = ���@01�@�������@�@�@�@�@���������@�������@���@�@�@���@���@�@�@���@�@06�@�@�@��07�@
AA:03 = �����@�@�@�������@�@02�@�@�@�@�@�@�@�@�@�@���������������@�@�@���@�@�@�@�@�@���@�@
AA:04 = �������@�@�@�������@�@�@�@�@�@�@�@03�@�@�@�@�@04�@�@05�@�@���@�����@�@�@���@������
AA:05 = ���������@�@�@�������������������������������������������@���@�������@�����@������

@DRAW_MAP_BG_9(SLICED)
#DIMS SLICED
SELECTCASE SLICED
;�F�������Ƃ��͂���Ȋ���
CASE "��","�|"
	SETCOLOR 0x90EE90
	PRINTS SLICED
	RESETCOLOR
CASE "��","��"
	SETCOLOR 0xff4242
	PRINTS SLICED
	RESETCOLOR
;�Ⴄ������\���������
CASE "#W"
	SETCOLOR 0x90EE90
	PRINT ��
	RESETCOLOR
CASE "#A"
	IF HATAKE_NAME:0 != ""
		SETCOLOR C_P_GREEN
		PRINT VV
		RESETCOLOR
	ELSE
		PRINT �@
	ENDIF
CASE "#B"
	IF HATAKE_NAME:1 != ""
		SETCOLOR C_P_GREEN
		PRINT VV
		RESETCOLOR
	ELSE
		PRINT �@
	ENDIF
CASE "#C"
	IF HATAKE_NAME:2 != ""
		SETCOLOR C_P_GREEN
		PRINT VV
		RESETCOLOR
	ELSE
		PRINT �@
	ENDIF
CASE "#D"
	IF HATAKE_NAME:3 != ""
		SETCOLOR C_P_GREEN
		PRINT VV
		RESETCOLOR
	ELSE
		PRINT �@
	ENDIF
CASE "#E"
	SIF TALENT:MASTER:���ꏊ�@�m && COUNTCHARA:(MAXROOM) > 0 && FLAG:�@�m���[�h == 1
		SETCOLOR 255,100,200
	PRINT ��
	RESETCOLOR
;�ӂ���
CASEELSE
	PRINTS SLICED
ENDSELECT


code:
;--------------------------------------------------
;	�}�b�v���ړ������g���p�b�`�t��
;		�n��MAP�p�֐�
;--------------------------------------------------
@MAP_PLACENAME_9(ARG)
#FUNCTIONS
#DIM PLACEID
IF GET_MAPID(ARG) == MAIN_MAP
	SELECTCASE ARG
		CASE 901 TO (MAXROOM - 1)
			RETURNF STR:(ARG + 8000)
		CASE 998
			RETURNF OMANEKI_PLACE()
		CASE 999
			RETURNF "�X�L�}���"
		CASE MAXROOM
			RETURNF "�n��"
		CASEELSE
			RETURNF "�s��"
	ENDSELECT
ELSE
	RETURNF "�s��"
ENDIF

;@MAP_VIEWING_9
;
;SIF CHK_FOCUS(927,CFLAG:MASTER:���݈ʒu,930)
;	CALL MAP_OLD_HELL
;SIF CHK_FOCUS(902,CFLAG:MASTER:���݈ʒu,926)
;	CALL MAP_TIREIDEN
;SIF (CFLAG:MASTER:���݈ʒu == 901) || CHK_FOCUS(931,CFLAG:MASTER:���݈ʒu,948)
;	CALL MAP_OLD_CITY
;RETURN 1

@MAP_VIEWING_9(AA)
#DIMS REF AA, 0
IF !TFLAG:�}�b�v�؂�ւ�
	IF CHK_FOCUS(927,CFLAG:MASTER:���݈ʒu,930)
		TFLAG:�}�b�v�؂�ւ� = 3
	ELSEIF (CFLAG:MASTER:���݈ʒu == 901) || CHK_FOCUS(931,CFLAG:MASTER:���݈ʒu,948)
		TFLAG:�}�b�v�؂�ւ� = 2
	ELSE
		TFLAG:�}�b�v�؂�ւ� = 1
	ENDIF
ENDIF
CALL DRAW_INFORMATIONLINE(@"%MAPNAME:(TFLAG:�}�b�v�؂�ւ�)%")
PRINTFORML
TRYCALLFORM MAP_CHIREIDEN_{TFLAG:�}�b�v�؂�ւ�}(AA)

@MAP_CAN_MOVE_9(ARG, ARG:1)
#FUNCTION
#DIM �ݑ�
SELECTCASE ARG
	;�����K�i�A���K�i�A�����A�n��
	CASE 907, 908, 924, 947
		RETURNF 0
	;���u�z,���Ȃ��ȊO�͓���Ȃ�
	CASE 935
		SIF ARG:1 != MASTER
			RETURNF 0
	CASEELSE
		RETURNF 1
ENDSELECT
RETURNF 1

@MAP_CANNOT_WORD_9(ARG)
SELECTCASE TFLAG:�ړ��s�\���b�Z�[�W
ENDSELECT
;PRINTW �H����
;CLEARLINE 2
;REUSELASTLINE
;RETURN


code:
@ROOMSETTING_9
VARSET ROOMDATA
FOR LOCAL,1,100
	SIF GROUPMATCH(LOCAL,11,12,18,19,25,35,36,37,40,41,42,43)
		ROOMDATA:LOCAL |= �ꏊ_�z�c
	SIF GROUPMATCH(LOCAL,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,28,29,30,33,34,35,36,37,38,40,41,42,43)
		ROOMDATA:LOCAL |= �ꏊ_����
	SIF GROUPMATCH(LOCAL,21,34)
		ROOMDATA:LOCAL |= �ꏊ_���C
	SIF GROUPMATCH(LOCAL,9,40,41,42,43)
		ROOMDATA:LOCAL |= �ꏊ_�~�[
	SIF GROUPMATCH(LOCAL,1,23,26,45,48)
		ROOMDATA:LOCAL |= �ꏊ_�P��
	SIF GROUPMATCH(LOCAL,13,20,33,43)
		ROOMDATA:LOCAL |= �ꏊ_�׋�
	SIF GROUPMATCH(LOCAL,3,4,11,12,13,15,18,19,20,33,34,35,36,37,38,40,41,42,43)
		ROOMDATA:LOCAL |= �ꏊ_�x�e
	SIF GROUPMATCH(LOCAL,6,17)
		ROOMDATA:LOCAL |= �ꏊ_�g�C��
	;SIF GROUPMATCH(LOCAL,)
	;	ROOMDATA:LOCAL |= �ꏊ_����
	SIF GROUPMATCH(LOCAL,48)
		ROOMDATA:LOCAL |= �ꏊ_�V�̐�
	SIF GROUPMATCH(LOCAL,23)
		ROOMDATA:LOCAL |= �ꏊ_�؉�
	SIF GROUPMATCH(LOCAL,23,45)
		ROOMDATA:LOCAL |= �ꏊ_������
	SIF GROUPMATCH(LOCAL,1,15,23,44,45,46,47)
		ROOMDATA:LOCAL |= �ꏊ_���ʂ�
	SIF GROUPMATCH(LOCAL,6,10,16,17,39)
		ROOMDATA:LOCAL |= �ꏊ_����
	SIF GROUPMATCH(LOCAL,3,4,11,12,13,15,18,19,20,33,34,35,36,37,38,40,41,42,43)
		ROOMDATA:LOCAL |= �ꏊ_�������Q_�\
	SIF GROUPMATCH(LOCAL,22,34)
		ROOMDATA:LOCAL |= �ꏊ_�g�̑���
	SIF GROUPMATCH(LOCAL,5,14,22)
		ROOMDATA:LOCAL |= �ꏊ_���܂�Ȃ�
	SIF GROUPMATCH(LOCAL,36,40,41,42)
		ROOMDATA:LOCAL |= �ꏊ_�������[��
	SIF GROUPMATCH(LOCAL,3,4,10,16,27,28,29,30,38,39)
		ROOMDATA:LOCAL |= �ꏊ_�ߑa
	SIF GROUPMATCH(LOCAL,6,9,10,11,12,16,17,18,19,20,21,22,27,28,29,30,35,36,37,40,41,42,43)
		ROOMDATA:LOCAL |= �ꏊ_�v���C�x�[�g
	SIF GROUPMATCH(LOCAL,33)
		ROOMDATA:LOCAL |= �ꏊ_�����̏�
NEXT

MAXROOM = 949
ENTRANCE = 948
���� = 943
SIF GET_MAPID(���__��) != MAIN_MAP
	���__�� = 943
MAP_PAGES = 3
MAPNAME:1 = �n��a
MAPNAME:2 = ���s
MAPNAME:3 = ���ܔM�n��

@DEFAULT_OWNER_9
���__��� = 49
�f�t�H���g�����ʒu = 943


code:
;--------------------------------------------------
;	MAP_MANAGE.ERB
;	���z���p�b�`�Ǘ�
;				���J�J�n�F2015/09/14
;				�ŏI�X�V�F2015/10/17
;--------------------------------------------------
;
;�����ς݁F
;	"[400]�ړ�"���}�b�v�\��
;	"[400]�ړ�"���ړ��s�\����
;	MASTER�������ړ�
;	�n�_�֘A����������
;	�n��������擾
;	���C�A�|���A�׋��A�P���̃R�}���h�\������
;	CHARA�A��֘A
;	CHARA���C�֘A
;	�d���A����֌W
;�������F
;	�C�z�@�m�̎���
;	���̑�
;------------------------------------------
;"�ړ�����"�ŕ\�������}�b�v��ʂ�\��������
;���z���v��ł�MAIN_MAP�ȊO��ODEKAKEMAP���g���\�肾����
;�v�Q��COMF400_�ړ�.ERB
;------------------------------------------
@MAP_VIEWING
TRYCALLFORM MAP_VIEWING_{MAIN_MAP}

;------------------------------------------
;�C�z�\������������łȂ����ɂ���ď�����ς�����悤�ɂ���GETMAP
;�v�Q��COMF400_�ړ�.ERB�A�Ăяo����
;�v�Q��MAP_0.ERB
;ARG,�ꏊID
;------------------------------------------
@GETMAP(ARG)
IF MAIN_MAP == GET_MAPID(ARG)
	TRYCALLFORM GETMAP_{MAIN_MAP}(ARG)
ELSE
ENDIF
;------------------------------------------
;�Ԃɂ�����CALL GETMAP�����񂾃}�b�v�������N�����̂��ʓ|�������̂ō�����֐�
;------------------------------------------
@PRINTMAP(ARGS,ARG,ARGS:1,ARG:1,ARGS:2,ARG:2,ARGS:3,ARG:3,ARGS:4)
#DIM �n�_��

FOR �n�_��,0,5
	PRINTFORM %ARGS:�n�_��%
	IF !ARG:�n�_��
		PRINTL
		BREAK
	ENDIF
	CALL GETMAP(ARG:�n�_��)
NEXT

;------------------------------------------
;�����������̖��O�������Ԃ��B�������O��TARGET�̂����������������Ԃ�
;�Ăяo����:NAME_FROM_PLACE()
;ARG,VOID
;------------------------------------------
@OMANEKI_PLACE(ARG)
#FUNCTIONS
#DIMS PNAME
#DIM OMANEKI_TARGET
IF CFLAG:MASTER:������
	OMANEKI_TARGET = CFLAG:MASTER:������
ELSE
	OMANEKI_TARGET = TARGET
ENDIF
SIF ARG
	OMANEKI_TARGET = ARG

PNAME = %CALLNAME:(OMANEKI_TARGET)%

IF TEQUIP:�����C��v���C
	PNAME = %PNAME%�̂����C
ELSE
	SELECTCASE OMANEKI_TARGET
		CASE 80;�Ђ�����
				PNAME = �B�c�@
		CASEELSE
			IF OUTROOF(CFLAG:OMANEKI_TARGET:����ʒu)
				PNAME = %PNAME%�̏Z�܂�
			ELSE
				PNAME = %PNAME%�̕���
			ENDIF
	ENDSELECT
ENDIF
RETURNF PNAME

;------------------------------------------
;�Q���i�o������j�̏ꏊID��Ԃ�
;------------------------------------------
@GET_ENTRANCE(MAPID)
#FUNCTION
#DIM MAPID
;	//ODEKAKEMAP�g�p��
SIF MAPID != MAIN_MAP
	RETURNF MAPID * 100

IF GET_EXISTMAP(MAPID)
	RETURNF ENTRANCE
ELSE
	RETURNF MAPID * 100
ENDIF
;------------------------------------------
;�ꏊID��MAPID�̎Q���i�o������j�����肷��
;MAPID���ȗ������ꍇ��MAPID��ARG�̏���MAP��������
;ARG:�ꏊID
;MAPID�F�Ώ�MAP
;------------------------------------------
@CHK_ENTRANCE(ARG, MAPID = 999)
#FUNCTION
#DIM MAPID
;	// MAPID���ȗ����ꂽ�ꍇ
SIF MAPID == 999
	MAPID = GET_MAPID(ARG)
;	//ODEKAKEMAP�g�p��
SIF ARG == GET_ENTRANCE(MAPID)
	RETURNF 1
;�o����p�̃G���g�����X(����),�����̂��߂ɋ�ʂł���悤2�ɂ��Ă���
SIF MAPID == 7 && ARG == 732
	RETURNF 2
RETURNF 0
;------------------------------------------
;	�����z���̕\���Ə���
;------------------------------------------
@SET_MAINHOME
;
;�����o�[�̋N�����ԍĐݒ�
;
PRINTL �����ݒ�ł��܂��B
PRINTL �ǂ��ɂ��܂����H
SETCOLOR C_YELLOW
	PRINTFORML �d���̎R�E�R���͎��������Ă̂��ߕs�����������m���������ł�
RESETCOLOR
FOR LOCAL,0,10
	SIF GET_EXISTMAP(LOCAL)
		PRINTFORML [{LOCAL}] %GET_MAPNAME(LOCAL)%
NEXT
IF DAY
	DRAWLINE
	PRINTL [100]�L�����Z��
ENDIF
$LOOP
INPUT
LOCAL:1 = RESULT
IF GET_EXISTMAP(RESULT)
	FLAG:���݂����_�� = 0
	CALL SET_ENKAI_LOCATIONDISPLAY
	FOR LOCAL,1,CHARANUM
		;���K����
		CFLAG:LOCAL:���K���� = CSVCFLAG(LOCAL,352)
		;�A���
		CFLAG:LOCAL:�A��� = CSVCFLAG(LOCAL,353)
		;�A�Q����
		CFLAG:LOCAL:�A�Q���� = CSVCFLAG(LOCAL,354)
		;�N������
		CFLAG:LOCAL:�N������ = CSVCFLAG(LOCAL,355)
		CFLAG:LOCAL:�_�ЍݏZ = 0
		CFLAG:LOCAL:�����ʒu = CSVCFLAG (LOCAL,311)
		CFLAG:LOCAL:����ʒu = CSVCFLAG (LOCAL,358)
	NEXT
	CALL MAP_DEFAULTRESIDENT(LOCAL:1)
		;�{��
		VARSET LOCK

	FOR LOCAL,1,CHARANUM
		CALL CHARA_SLEEP, LOCAL, 0
	NEXT
ELSEIF RESULT == 100
ELSE
	GOTO LOOP
ENDIF
SIF FLAG:�Ȃ肫�� && CFLAG:(FLAG:�Ȃ肫��):�o�� && MAIN_MAP == GET_MAPID(CSVCFLAG(FLAG:�Ȃ肫��,311))
	CFLAG:MASTER:�����ʒu = CSVCFLAG(FLAG:�Ȃ肫��,311)

@HAS_DUPLICATE_KEY, ARG
#FUNCTION
	FOR LOCAL, 1, CHARANUM
		IF CFLAG:LOCAL:311 == ARG
			SIF TALENT:LOCAL:����
				RETURNF 1
		ENDIF
	NEXT

@MAP_DEFAULTRESIDENT(ARG)
;ARG=�}�b�v�ԍ�
FLAG:15 = 0
MAIN_MAP = ARG
FOR LOCAL,1,CHARANUM
	IF MAP_�Z�l(MAIN_MAP,LOCAL)
		CFLAG:LOCAL:�����ʒu = CSVCFLAG(LOCAL,311)
		CFLAG:LOCAL:�_�ЍݏZ = CFLAG:LOCAL:�����ʒu
		DEBUGPRINTFORML %CALLNAME:LOCAL%�����_�ɏZ�݂܂�
		IF LOCAL == 57
			CFLAG:RESULT:�_�ЍݏZ = 55
			CFLAG:RESULT:�����ʒu = 55
		ELSEIF  LOCAL == 71
			CFLAG:71:�_�ЍݏZ = 54
			CFLAG:71:�����ʒu = 54
		ENDIF
	ELSE
		PRIVATEROOM:(CFLAG:LOCAL:�����ʒu % 100) = 0
		CFLAG:LOCAL:�����ʒu = SUKIMA()
		CFLAG:LOCAL:�_�ЍݏZ = 0
	ENDIF
	CFLAG:LOCAL:���݈ʒu = CFLAG:LOCAL:�����ʒu
	CFLAG:LOCAL:�f�[�g�� = MAIN_MAP
NEXT
PRINTFORMW %GET_MAPNAME(ARG)%�ɐݒ肵�܂���
CALL ROOMSETTING
CFLAG:MASTER:�����ʒu = �f�t�H���g�����ʒu
CFLAG:MASTER:���݈ʒu = CFLAG:MASTER:�����ʒu

@ROOMSETTING
LOCAL:1 = 0
TRYCCALLFORM ROOMSETTING_{MAIN_MAP}
	PRINTFORMW %GET_MAPNAME(MAIN_MAP)%�̕�������ݒ肵�܂���
CATCH
	PRINTFORMW �������̐ݒ�Ɏ��s���܂���
ENDCATCH
FOR LOCAL,1,CHARANUM
	IF MAP_�Z�l(MAIN_MAP,LOCAL) && !CFLAG:LOCAL:�o��
		;PRIVATEROOM�ϐ��ɁA�����̉Ǝ�̔ԍ���ۑ�
		PRIVATEROOM:(CFLAG:LOCAL:�����ʒu % 100) = LOCAL
	 	SIF CFLAG:LOCAL:��ƌ��
			LOCAL:1 ++
	ENDIF
NEXT
IF !�f�t�H���g�����ʒu || �f�t�H���g�����ʒu / 100 != MAIN_MAP
	SIF !LOCAL:1
		GOTO SONOMAMA

	PRINTFORMW ���̃}�b�v�ɂ͎�����₪��������܂��B
	SIF DAY <= 1
		PRINTFORMW ��������ŁA�K�v�M���x�ɂ�����炸������I���ł��܂��B
	PRINTFORML
	FOR LOCAL,1,CHARANUM
		IF MAP_�Z�l(MAIN_MAP,LOCAL) && CFLAG:LOCAL:��ƌ��
			LOCAL:1 ++
			SIF CFLAG:LOCAL:�Z�ݍ��ݕK�v�M���x > CFLAG:LOCAL:�M���x && DAY > 1
				SETCOLOR C_L_GRAY
			IF MAIN_MAP == 0
				LOCALS = %STR:(CFLAG:LOCAL:��ƌ��)%
			ELSE
				LOCALS = %STR:(CFLAG:LOCAL:��ƌ�� + 8000)%
			ENDIF
			PRINTFORML [{LOCAL}] - %LOCALS%�@���:%CALLNAME:LOCAL% �K�v�M���x:{CFLAG:LOCAL:�Z�ݍ��ݕK�v�M���x}
			RESETCOLOR
		ENDIF
	NEXT

	PRINTFORML [0] - ���̂܂�
	$LOOP
	INPUT
	IF MAP_�Z�l(MAIN_MAP,RESULT) && CFLAG:RESULT:��ƌ��
		IF CFLAG:RESULT:�Z�ݍ��ݕK�v�M���x > CFLAG:RESULT:�M���x && DAY > 1
			PRINTFORMW %CALLNAME:RESULT%�͂����܂�%CALLNAME:MASTER%��M�����Ă��Ȃ�
			GOTO LOOP
		ENDIF
		���__��� = RESULT
		�f�t�H���g�����ʒu = CFLAG:RESULT:��ƌ��
		ROOMDATA:(�f�t�H���g�����ʒu % 100) |= �ꏊ_�z�c
		PRINTFORMW %STR:(CFLAG:RESULT:��ƌ�� + (MAIN_MAP ? 8000 # 0) )%�ֈ����z���܂�
	ELSEIF !RESULT
		$SONOMAMA
		TRYCCALLFORM DEFAULT_OWNER_{MAIN_MAP}
		CATCH
			PRINTFORMW �������̐ݒ�Ɏ��s���܂���
		ENDCATCH
			IF MAIN_MAP == 0
				LOCALS = %STR:(�f�t�H���g�����ʒu)%
			ELSE
				LOCALS = %STR:(�f�t�H���g�����ʒu + 8000)%
			ENDIF
			PRINTFORMW %LOCALS%�ֈ����z���܂�
	ELSE
		GOTO LOOP
	ENDIF

ENDIF


code:
@OTHERREGIONS
#DIM ���ݒn�_
#DIM ���v����
#DIM ���ݒnMAPID

CALL FIELDMAP
PRINTL �ǂ��Ɍ������܂����H
���ݒnMAPID = GET_MAPID(CFLAG:MASTER:���݈ʒu)
;	// �_�Ђ��\������Ȃ��̂͂�����Ǝ₵���̂�
PRINTFORM [ 0] - %"����_��", 18, LEFT%
IF ���ݒnMAPID == 0
	SETCOLOR 0 , 255, 0
	PRINTFORM ���ݒn\@ FLAG:70 ? %"   "% # %" "% \@
	RESETCOLOR
ELSEIF FLAG:70
	PRINTFORM �Г� {TIME_REQUIRED0(5000 + ���ݒnMAPID) * 3, 3, RIGHT}TSP
ELSE
	PRINTFORM �Г� {TIME_REQUIRED0(5000 + ���ݒnMAPID), 3, RIGHT}��
ENDIF
PRINTL
;	// �����܂Ő_�Е\��
FOR LOCAL, 5001, 5011
	IF LOCAL == ���ݒnMAPID + 5000
		PRINTFORM [{���ݒnMAPID, 2, RIGHT}] -
		PRINTFORM %NAME_FROM_PLACE(LOCAL), 21, LEFT%
		SETCOLOR 0 , 255, 0
		PRINTFORM ���ݒn\@ FLAG:70 ? %"    "% # %"  "% \@
		RESETCOLOR
		SIF !(LOCAL % 2)
			PRINTL
		CONTINUE
	ENDIF
	PRINTFORM [{LOCAL - 5000, 2, RIGHT}] -
	PRINTFORM %NAME_FROM_PLACE(LOCAL), 18, LEFT%
	PRINTFORM �Г� \@ FLAG:70 ? {TIME_REQUIRED(���ݒnMAPID,LOCAL - 5000) * 3, 3, RIGHT}TSP # {TIME_REQUIRED(���ݒnMAPID,LOCAL - 5000), 3, RIGHT}�� \@
	SIF !(LOCAL % 2)
		PRINTL
NEXT
PRINT [100] - �߂�
$LOOP
INPUT
;�߂�
IF RESULT == 100
	RETURN RESULT
;���Ԓ�~����
ELSEIF RESULT == 101

ELSEIF RESULT == ���ݒnMAPID
	;�S�̃}�b�v������ړ��ł��邯�Ǘ]�v�Ɏ��Ԃ�����,���܂��@�\�Ȃ̂�
	LOCAL:1 = 1
	���ݒn�_ = (CFLAG:MASTER:���݈ʒu - (CFLAG:MASTER:�f�[�g�� * 100)) / 10
	���v���� = ABS(���ݒn�_ - 0) * 3
	FOR LOCAL,0,CHARANUM
		SIF CHK_DATENOW(CFLAG:LOCAL:�f�[�g��)
			CFLAG:LOCAL:���݈ʒu = (CFLAG:LOCAL:�f�[�g�� * 100) + (LOCAL:1 * 10)
	NEXT
	IF FLAG:70 == 1
		BASE:MASTER:TSP -= ���v���� * 2
		IF TFLAG:�^��
			BASE:MASTER:TSP -= ���v���� / 3
			CFLAG:(TFLAG:�^��):���݈ʒu = CFLAG:MASTER:���݈ʒu
		ENDIF
	ELSEIF GETBIT(FLAG:�u�Ԉړ�, 0) && BASE:MASTER:TSP > 10  && !FLAG:�f�[�g����
		BASE:MASTER:TSP -= ���v���� * 2
	ELSE
		TIME += ���v����
		IF CHK_DATENOW(CFLAG:93:�f�[�g��) && !GETBIT (FLAG:�v�[��, 0)
			TIME += ���v���� / 2
			BASE:MASTER:�̗� = MAX(BASE:MASTER:�̗� - 50,500)
		ENDIF
	ENDIF
	RETURN RESULT
ELSEIF RESULT == MAIN_MAP
	IF FLAG:70 && FLAG:�f�[�g����
		PRINTFORMW �A��Ȃ玞�Ԓ�~���������Ă���ɂ��悤
		RETURN 100
	ENDIF
	CALL �O�o�悩��A��
	RETURN MAIN_MAP
ELSE
	���v���� = TIME_REQUIRED(���ݒnMAPID, RESULT)

	;100���̓����͂Ȃ���ł��c
	IF FLAG:�f�[�g���� > 0 && ���v���� >= 100
		PRINTW �������Ĉ�x�ɂ͍s���Ȃ�
		CLEARLINE 2
		GOTO LOOP
	;�����o�����鏈��
	ELSEIF GET_MAPID(CFLAG:MASTER:���݈ʒu) == MAIN_MAP
		LOCAL:1 = 0
		FOR LOCAL,1,CHARANUM
			SIF CFLAG:(LOCAL):���s
				LOCAL:1 ++
		NEXT
		IF LOCAL:1 == 1
			;100���̓����͂Ȃ���ł��c
			IF ���v���� >= 100
				PRINTW �������Ĉ�x�ɂ͍s���Ȃ�
				CLEARLINE 2
				RETURN 100
			ENDIF
			PRINTL �f�[�g�ɏo�|���܂�
			FOR LOCAL,1,CHARANUM
				IF CFLAG:(LOCAL):���s
					TFLAG:�f�[�g�O�D���x = CFLAG:LOCAL:2
					CALL SET_DATE(RESULT,LOCAL)
				ENDIF
			NEXT

		;�����l�f�[�g�����i���ݒ�j
		ELSEIF LOCAL:1 > 1
		;��l
		ELSE
			PRINTL ��l�ŏo�|���܂�
			LOCAL:2 = RESULT
			IF BASE:MASTER:TSP >= ���v���� * 3
				PRINTL TSP������āA���Ԍo�߂Ȃ��ňړ��ł��܂��B
				PRINTL TSP���g���܂����H
				PRINTL [0] ������
				PRINTFORML [1] �͂��iTSP{���v���� * 3}����j
				$LONELYLOOP
				INPUT
				IF RESULT == 0
					TIME += ���v����
				ELSEIF RESULT == 1
					IF BASE:MASTER:TSP < ���v���� * 3
						PRINTW TSP������܂���
						CLEARLINE 2
						GOTO LONELYLOOP
					ELSE
						BASE:MASTER:TSP -= ���v���� * 3
					ENDIF
				ELSE
					GOTO LONELYLOOP
				ENDIF
			ELSE
				TIME += ���v����
			ENDIF
			CALL SET_DATE(LOCAL:2,0)
			RETURN LOCAL:2
		ENDIF
		RETURN RESULT
	ELSEIF FLAG:�f�[�g���� > 0
		PRINTFORML %GET_MAPNAME(RESULT)%�֌������܂�
		CALL SET_DATE(RESULT,(FLAG:�f�[�g����))
		RETURN RESULT
	ELSEIF GETBIT(FLAG:�u�Ԉړ�, 0) && BASE:MASTER:TSP > ���v���� * 3 && !FLAG:�f�[�g����
		BASE:MASTER:TSP -= ���v���� * 3
	ELSEIF FLAG:70
		IF BASE:MASTER:TSP < ���v���� * 3
			PRINTW TSP������܂���
			CLEARLINE 2
			GOTO LOOP
		ELSE
			BASE:MASTER:TSP -= ���v���� * 3
		ENDIF
	ELSE
		TIME += ���v����
		IF CHK_DATENOW(CFLAG:93:�f�[�g��) && !GETBIT (FLAG:�v�[��, 0)
			TIME += ���v���� / 2
			BASE:MASTER:�̗� = MAX(BASE:MASTER:�̗� - 5 * (���v����),500)
		ENDIF
	ENDIF
	FOR LOCAL,0,CHARANUM
		IF CHK_DATENOW(CFLAG:LOCAL:�f�[�g��)
			CFLAG:LOCAL:���݈ʒu = GET_ENTRANCE(RESULT)
			CFLAG:LOCAL:�f�[�g�� = RESULT
		ENDIF
	NEXT
	RETURN RESULT
ENDIF


code:
;�I�v�V�����ݒ菈��
@OPTION
PRINTL �ݒ荀�ڂ�I�����Ă�������
PRINTL [0] - �e�L�X�g�ݒ�
PRINTL [1] - �R�}���h�t�B���^
PRINT [2] - ���Օi�̎����w��
	PRINTFORML \@ FLAG:1001 ? ON # OFF \@
PRINT [3] - ����x�\��
	PRINTFORML \@ FLAG:1002 ? OFF # ON \@
;PRINT [4] - ���Ԓ�~���̐M���x�ቺ
;	PRINTFORML \@ FLAG:1011 ? ON # OFF \@
PRINT [5] - �ړ��������~�܂�̗L��
	SIF FLAG:�����~�܂� == 0
		PRINTL ON (�������ŗ����~�܂�)
	SIF FLAG:�����~�܂� == 1
		PRINTL ON (���オ���݂���ꍇ�̂�)
	SIF FLAG:�����~�܂� == 2
		PRINTL OFF (�����~�܂�Ȃ�)
PRINT [6] - �\�͂��r���ĉ����|����Ȃ��Ȃ锻��
	PRINTFORML \@ FLAG:�����|�� ? ON # OFF \@
PRINT [7] - �������~�߈ړ�
	IF FLAG:�u�Ԉړ� == 1
		PRINTL ON(�O�o��̎U�􎞂̂�)
	ELSEIF FLAG:�u�Ԉړ� == 2
		PRINTL ON(���_���̈ړ����̂�)
	ELSEIF FLAG:�u�Ԉړ� == 3
		PRINTL ON(�O�o��/���_������)
	ELSE
		PRINTL OFF
	ENDIF
PRINT [8] - �Z�ݍ��݃C�x���g
	PRINTFORML \@ FLAG:�Z�ݍ��݃C�x���g ? OFF # ON \@
PRINTL [10] - �o��L�����؂�ւ�
PRINT [11] - ���ӎD�g�p
	PRINTFORML \@ FLAG:���ӎD�g�p ? ON # OFF \@
PRINT [12] - �ꕔ�L�����̃j�[�\�b�N�X���p
	PRINTFORML \@ FLAG:�j�[�\�b�N�X���p ? ON # OFF \@
PRINT [13] - ����̔���
	PRINTFORML \@ FLAG:����̗L�� ? ON # OFF \@
PRINT [14] - �D���x�O�̃L�����͗��K���Ȃ����[�h
	SIF FLAG:�𗬗��K���[�h == 0
		PRINTL ON (���K����)
	SIF FLAG:�𗬗��K���[�h == 1
		PRINTL ON (�D���x0�͗��K���Ȃ�)
	SIF FLAG:�𗬗��K���[�h == 2
		PRINTL OFF (���K���Ȃ�)
PRINT [15] - �D�P�̗L������{OFF�BON�ɂ���ꍇ�͉����������玩�ȐӔC�Ł@�@
	PRINTFORML \@ FLAG:�D�P�X�C�b�` ? ON # OFF \@
PRINT [16] - �E�ߑI��
SELECTCASE FLAG:�E�ߑI��
	CASE 0
		PRINTL [����I��]
	CASE 1
		PRINTL [�S��]
	CASE 2
		PRINTL [���E��]
ENDSELECT
PRINT [17] - ���Ԓ�~�E�ߎ��p���c����
SELECTCASE FLAG:�p���c�D�_
	CASE 0
		PRINTL [����I��]
	CASE 1
		PRINTL [��ɂ����˂�]
	CASE 2
		PRINTL [��ɒE��������]
ENDSELECT
PRINT [18] - ����F�ݒ�
	PRINTFORML \@ FLAG:����F ? ON # OFF \@
PRINTL [19] - �����ς��֘ALook�\���ݒ�
PRINT [20] - �\�͕\���̃{�^���\�L
	PRINTFORML \@ FLAG:�\�͕\�L ? [�����\�L] # [�L���\�L] \@
PRINT [21] - �J�E���^�[�̒n�̕���f���ŕω�������
	PRINTFORML \@ FLAG:�J�E���^�[�n�̕����� ? ON # OFF \@
PRINT [22] - �G�b�`�ȉ�����ǉ�����
	PRINTFORML \@ FLAG:�Z�N�V�[�p���c�ǉ� ? ON # OFF \@
PRINT [23] - �Z�t���n�ח��������n�ח��ւ̕ω�
	PRINTFORML \@ FLAG:�ח��H���ω� ? ���� # ���Ȃ� \@
PRINT [24] - ���肩�獐��
	PRINTFORML \@ FLAG:�����֎~ ? ���Ă��Ȃ� # ���� \@
PRINT [25] - �^�[������ABLUP�ȗ�
	PRINTFORML \@ FLAG:ABLUP�ȗ� ? ON # OFF \@
PRINTFORML [26]\@ FLAG:�摜�\�� ? �� # %" "%- \@ AA�̕\�����摜�ɕύX���� \@ FLAG:�摜�\�� ? ON # OFF \@
SIF FLAG:�摜�\��
	PRINTFORML [27]�� �摜�ڍאݒ�
PRINT [28] - �C�x���g�ɂ�閳�m�r��
	PRINTFORML \@ FLAG:���m�����r���֎~ ? ���Ȃ� # ���� \@
PRINT [29] - ���Ȃ��ւ̍D�ӁE�����̕ǂ�Z�k�\��
	PRINTFORML \@ FLAG:�D�ӗ����Z�k ? ON # OFF \@
PRINT [30] - �q���̕`��
	PRINTFORML \@ FLAG:�q���`�� ? ON # OFF \@
PRINT [31] - �q���̐���
SELECTCASE FLAG:�q���̐���
	CASE 0
		PRINTL [�����_��]
	CASE 1
		PRINTL [���̎q]
	CASE 2
		PRINTL [�j�̎q]
ENDSELECT
PRINTL [32] - �ȈՃt�B���^�̈ꊇ�ݒ�
PRINTL [33] - �����̃I�v�V�����ݒ�
SIF DAY > 120
	PRINTL [99] �o�C�c�@�E�_�X�g
PRINTL [100]-�߂�
$INPUT_LOOP
INPUT
IF RESULT == 0
	CALL OPTION_TEXT_SETTING
ELSEIF RESULT == 1
	CALL OPTION_COMMAND_FILTER
ELSEIF RESULT == 2
	FLAG:1001 = !FLAG:1001
ELSEIF RESULT == 3
	CALL OPTION_HOUSE_INFO
ELSEIF RESULT == 5
	IF FLAG:�����~�܂� == 0
		FLAG:�����~�܂� = 1
	ELSEIF FLAG:�����~�܂� == 1
		FLAG:�����~�܂� = 2
	ELSEIF FLAG:�����~�܂� == 2
		FLAG:�����~�܂� = 0
	ENDIF
ELSEIF RESULT == 6
	FLAG:�����|�� = !FLAG:�����|��
ELSEIF RESULT == 7
	FLAG:�u�Ԉړ� ++
	SIF FLAG:�u�Ԉړ� >= 4
		FLAG:�u�Ԉړ� = 0
ELSEIF RESULT == 8
	FLAG:�Z�ݍ��݃C�x���g = !FLAG:�Z�ݍ��݃C�x���g
ELSEIF RESULT == 16
	IF FLAG:�E�ߑI�� < 2
		FLAG:�E�ߑI�� ++
	ELSE
		FLAG:�E�ߑI�� = 0
	ENDIF
ELSEIF RESULT == 17
	IF FLAG:�p���c�D�_ < 2
		FLAG:�p���c�D�_ ++
	ELSE
		FLAG:�p���c�D�_ = 0
	ENDIF
ELSEIF RESULT == 10
	CALL �o��L�����؂�ւ�
ELSEIF RESULT == 11
	FLAG:���ӎD�g�p = !FLAG:���ӎD�g�p
ELSEIF RESULT == 12
	FLAG:�j�[�\�b�N�X���p = !FLAG:�j�[�\�b�N�X���p
ELSEIF RESULT == 13
	FLAG:����̗L�� = !FLAG:����̗L��
ELSEIF RESULT == 14
	IF FLAG:�𗬗��K���[�h == 0
		FLAG:�𗬗��K���[�h = 1
	ELSEIF FLAG:�𗬗��K���[�h == 1
		FLAG:�𗬗��K���[�h = 2
	ELSEIF FLAG:�𗬗��K���[�h == 2
		FLAG:�𗬗��K���[�h = 0
	ENDIF
ELSEIF RESULT == 15
	FLAG:�D�P�X�C�b�` = !FLAG:�D�P�X�C�b�`
ELSEIF RESULT == 18
	FLAG:����F = !FLAG:����F
ELSEIF RESULT == 19
	CALL �����ς��֘ALook�\���ݒ�
ELSEIF RESULT == 20
	FLAG:�\�͕\�L = !FLAG:�\�͕\�L
ELSEIF RESULT == 21
	FLAG:�J�E���^�[�n�̕����� = !FLAG:�J�E���^�[�n�̕�����
ELSEIF RESULT == 22
	FLAG:�Z�N�V�[�p���c�ǉ� = !FLAG:�Z�N�V�[�p���c�ǉ�
	IF FLAG:�Z�N�V�[�p���c�ǉ� == 0
		PRINTFORMW ���z���ɖK�ꂽ�G�b�`�ȉ����u�[�����I�����܂���
		PRINTL
		PRINTFORML �������Ă���G�b�`�ȉ������폜���܂����H
		PRINTFORML �폜�ΏہF�X�L�����e�B�A�ӂ�ǂ��AG�X�g�����O�A�V�[�X���[�V���[�c�A�I�[�v���V���[�c�A�΂񂻂������A�h�����[�Y�i�ҋ󂫁j
		PRINTL
		PRINTL [0] �����v��Ȃ�
		PRINTL [1] �厖�Ɏ����Ƃ�
		INPUT
		IF RESULT == 0
			CALL DELETE_SEXYPANTS
		ELSE
			RESTART
		ENDIF
	ELSE
		PRINTL
		PRINTFORMW ���z���ɃG�b�`�ȉ��������ʂ��n�߂܂���
		PRINTL
	ENDIF
ELSEIF RESULT == 23
	FLAG:�ח��H���ω� = !FLAG:�ח��H���ω�
ELSEIF RESULT == 24
	FLAG:�����֎~ = !FLAG:�����֎~
ELSEIF RESULT == 25
	FLAG:ABLUP�ȗ� = !FLAG:ABLUP�ȗ�
ELSEIF RESULT == 26
	FLAG:�摜�\�� = !FLAG:�摜�\��
ELSEIF RESULT == 27 && FLAG:�摜�\��
	CALL OPTION_�摜�\���ڍאݒ�
ELSEIF RESULT == 28
	FLAG:���m�����r���֎~ = !FLAG:���m�����r���֎~
ELSEIF RESULT == 29
	FLAG:�D�ӗ����Z�k = !FLAG:�D�ӗ����Z�k
ELSEIF RESULT == 30
	FLAG:�q���`�� = !FLAG:�q���`��
ELSEIF RESULT == 31
	IF FLAG:�q���̐��� < 2
		FLAG:�q���̐��� ++
	ELSE
		FLAG:�q���̐��� = 0
	ENDIF
ELSEIF RESULT == 32
	CALL �ȈՃt�B���^�ꊇ�ݒ�
ELSEIF RESULT == 33
	CALL SET_OPTION_COOKING
ELSEIF RESULT == 99
	IF DAY > 120
		PRINTFORML ���Ԃ𐁂���΂��Ĉ���ڂɖ߂�܂����H
		PRINTL
		PRINTL [0]�u�X�C�b�`�v����������ȁ[�[�b
		PRINTL [1] ������I���E�������ˁI�����b�I
		INPUT
		IF RESULT == 1
			CALL �����ăj���[�Q�[��
		ELSE
;			PRINTW �u�X�C�b�`�v�������͎̂~�߂��Ȃ��������A�K�^�ɂ��I�v�V�����I���܂ł����߂�Ȃ������B
			RESTART
		ENDIF
	ENDIF
ELSEIF RESULT == 100
	RETURN 0
ELSE
	GOTO INPUT_LOOP
ENDIF
RESTART
;�e�L�X�g�֘A
@OPTION_TEXT_SETTING
PRINTL �e�L�X�g�̐ݒ�����Ă�������
PRINT ���݂̐ݒ�F
IF FLAG:6 == 1 && FLAG:7 == 2
	PRINTL �y����e�L�X�g�i��ɕ\���j�{��i�e�L�X�g�z
ELSEIF FLAG:6 == 1 && FLAG:7 == -1
	PRINTL �y��i�e�L�X�g�̂݁z
ELSEIF FLAG:6 == 0 && FLAG:7 == -1
	PRINTL �y�e�L�X�g��\�����Ȃ��z
ENDIF
PRINTL �@
PRINTL [0] - ����e�L�X�g�{��i�e�L�X�g
PRINTL [1] - ��i�e�L�X�g�̂�
PRINTL [2] - �e�L�X�g��\�����Ȃ�
PRINTL [100]-�߂�
$INPUT_LOOP
INPUT
IF RESULT == 100
	RETURN 0
ELSEIF RESULT == 0
	PRINTL �y����e�L�X�g�{��i�e�L�X�g�z�ɐݒ肵�܂���
	FLAG:6 = 1
	FLAG:7 = 2
ELSEIF RESULT == 1
	PRINTL �y��i�e�L�X�g�̂݁z�ɐݒ肵�܂���
	FLAG:6 = 1
	FLAG:7 = -1
ELSEIF RESULT == 2
	PRINTL �y�e�L�X�g��\�����Ȃ��z�ɐݒ肵�܂���
	FLAG:6 = 0
	FLAG:7 = -1
ELSE
	GOTO INPUT_LOOP
ENDIF

@OPTION_HOUSE_INFO
PRINTL �S�~�̎R�����Ȃ��������ɂł��܂�
PRINTL [0] ���\��ON [1] - OFF
INPUT
IF RESULT == 0
	FLAG:1002 = 0
ELSE
	FLAG:1002 = 1
ENDIF

;@OPTION_TIME
;PRINTL ���Ԓ�~���̐M���x�ቺ���I���ɂ��܂�
;PRINTL [0] OFF [1] - ON
;INPUT
;IF RESULT == 0
;
;ELSE
;
;ENDIF

@�o��L�����؂�ւ�
PRINTL �@�w�肵���L������o�ꂵ�Ȃ��悤�ɂ��܂��B�i"*"�͌���̂���L�����j
DRAWLINE
FOR LOCAL,1,CHARANUM
	SIF TALENT:LOCAL:�s������
		CONTINUE
	SIF CFLAG:LOCAL:�o��
		SETCOLOR C_D_RED
	RESULT = 0
	TRYCALLFORM M_KOJO_K{NO:LOCAL}
	PRINTFORMLC [{LOCAL, 3}] \@ RESULT ? * # \@%CALLNAME:LOCAL%
	RESETCOLOR
NEXT
PRINTL �@
DRAWLINE
PRINTFORML [999] �ݒ�I���@�o�փL�����F{FLAG:�o�֐l��}�l�@[998]���Z�b�g
$LOOP
INPUT
IF RESULT >= 1 && RESULT <= CHARANUM
	IF CFLAG:RESULT:�o�� && FLAG:�Ȃ肫�� != RESULT
		CFLAG:RESULT:�o�� = 0
		SIF CFLAG:RESULT:���݈ʒu == CFLAG:RESULT:�����ʒu && CFLAG:RESULT:����
			LOCK:(CFLAG:RESULT:�����ʒu) = 1
		FLAG:�o�֐l�� --
	ELSEIF TALENT:RESULT:�s������
		PRINTFORMW ���̃L�����o�։����ł��܂���
		GOTO LOOP
	ELSEIF FLAG:�Ȃ肫�� == RESULT
		IF CFLAG:(FLAG:�Ȃ肫��):�o�� == 1
			PRINTFORML ���݂��̃L�����ɂȂ肫���Ă��邽�߁A%CALLNAME:RESULT%����l���邱�ƂɂȂ��Ă��܂��܂����c
			PRINTL ����ł��o�ꂳ���܂����H
			PRINTL [0]�͂� [1]������
			INPUT
			IF RESULT == 0
				CFLAG:(FLAG:�Ȃ肫��):�o�� = 0
				SIF CFLAG:(FLAG:�Ȃ肫��):���݈ʒu == CFLAG:(FLAG:�Ȃ肫��):�����ʒu && CFLAG:(FLAG:�Ȃ肫��):����
					LOCK:(CFLAG:(FLAG:�Ȃ肫��):�����ʒu) = 1
				FLAG:�o�֐l�� --
				PRINTFORMW %CALLNAME:(FLAG:�Ȃ肫��)%��o�ꂳ���܂�
			ELSE
				GOTO LOOP
			ENDIF
		ELSE
			CFLAG:(FLAG:�Ȃ肫��):�o�� = 1
			SIF LOCK:(CFLAG:(FLAG:�Ȃ肫��):�����ʒu) && CFLAG:(FLAG:�Ȃ肫��):�����ʒu < 100
				LOCK:(CFLAG:(FLAG:�Ȃ肫��):�����ʒu) = 0
			FLAG:�o�֐l�� ++
		ENDIF
	ELSE
		CFLAG:RESULT:�o�� = 1
		SIF LOCK:(CFLAG:RESULT:�����ʒu) && CFLAG:RESULT:�����ʒu < 100
			LOCK:(CFLAG:RESULT:�����ʒu) = 0
		FLAG:�o�֐l�� ++
	ENDIF
	RESTART
ELSEIF RESULT == 999
	PRINTW �ݒ�I�����܂����B
ELSEIF RESULT == 998
	FOR LOCAL,1,CHARANUM
		SIF FLAG:�Ȃ肫�� == LOCAL
			CONTINUE
		SIF TALENT:LOCAL:�s������
			CONTINUE
		CFLAG:LOCAL:�o�� = 0
	NEXT
	FLAG:�o�֐l�� = 0
	RESTART
ELSE
	GOTO LOOP
ENDIF

@�����ς��֘ALook�\���ݒ�
PRINTL �e�L�X�g�̐ݒ�����Ă�������
PRINT ���݂̐ݒ�F
IF FLAG:Look�\���p���[ == 1 && FLAG:Look�\���p���� == 1
	PRINTL �yLook���`�ʂ����ς��Œ�z
	PRINTL �i����ύX�����Œ肵�܂��j
ELSEIF FLAG:Look�\���p���[ == 1 && FLAG:Look�\���p���� == 0
	PRINTL �yLook���`�ʓ��[�Œ�z
	PRINTL �i�������`�ʂ��ς��A���[�`�ʂ͌Œ肵�܂��j
ELSEIF FLAG:Look�\���p���[ == 0 && FLAG:Look�\���p���� == 1
	PRINTL �yLook���`�ʓ���Œ�z
	PRINTL �i������[�`�ʂ��ς��A����`�ʂ͌Œ肵�܂��j
ELSEIF FLAG:Look�\���p���[ == 0 && FLAG:Look�\���p���� == 0
	PRINTL �yLook���`�ʂ����ς������_���z
	PRINTL �i���񂨂��ς��`�ʂ��ς��܂��j
ENDIF
PRINTL �@
PRINTL [0] - Look���`�ʂ����ς��֘A�Œ�
PRINTL [1] - Look���`�ʓ��[�Œ�
PRINTL [2] - Look���`�ʓ���Œ�
PRINTL [3] - Look���`�ʂ����ς��֘A�����_��
PRINTL [999]-�߂�
$INPUT_LOOP
INPUT
IF RESULT == 999
	RETURN 0
ELSEIF RESULT == 0
	PRINTW �yLook���`�ʂ����ς��Œ�z�ɐݒ肵�܂���
	FLAG:Look�\���p���[ = 1
	FLAG:Look�\���p���� = 1
ELSEIF RESULT == 1
	PRINTW �yLook���`�ʓ��[�Œ�z�ɐݒ肵�܂���
	FLAG:Look�\���p���[ = 1
	FLAG:Look�\���p���� = 0
ELSEIF RESULT == 2
	PRINTW �yLook���`�ʓ���Œ�z�ɐݒ肵�܂���
	FLAG:Look�\���p���[ = 0
	FLAG:Look�\���p���� = 1
ELSEIF RESULT == 3
	PRINTW �yLook���`�ʂ����ς������_���z�ɐݒ肵�܂���
	FLAG:Look�\���p���[ = 0
	FLAG:Look�\���p���� = 0
ELSE
	GOTO INPUT_LOOP
ENDIF

;�ȈՃt�B���^����֐�
;�d�l��̖��Ƃ��āA�ݒ荀�ڂ�����������Ɛ݌v�����Ȃ����K�v������
@�ȈՃt�B���^�ꊇ�ݒ�
#DIM OP_CFLAG_�u�A���t�B���^
#DIM OP_CFLAG_�`�A���t�B���^
#DIM OP_CFLAG_�r�l�A���t�B���^
#DIM OP_CFLAG_��d�A���t�B���^
#DIM OP_CFLAG_�Z�N�n���A���t�B���^
#DIM OP_SETTING
IF !LOCAL
	OP_CFLAG_�u�A���t�B���^       = GETNUM(CFLAG, "�u�A���t�B���^")
	OP_CFLAG_�`�A���t�B���^       = GETNUM(CFLAG, "�`�A���t�B���^")
	OP_CFLAG_�r�l�A���t�B���^     = GETNUM(CFLAG, "�r�l�A���t�B���^")
	OP_CFLAG_��d�A���t�B���^     = GETNUM(CFLAG, "��d�A���t�B���^")
	OP_CFLAG_�Z�N�n���A���t�B���^ = GETNUM(CFLAG, "�Z�N�n���A���t�B���^")
	LOCAL ++
ENDIF
PRINTFORML �`�ȈՃt�B���^�ݒ�`
PRINTFORML ���ʂ̃R�}���h�t�B���^�͂���Ƃ͕ʂɐݒ肳��Ă��܂�
PRINTFORML
PRINTFORML [29] �S�L�����̑S�Ă̊ȈՃt�B���^�I�t
PRINTFORML [28] �S�L�����ւ�[�u]���J��
PRINTFORML [27] �S�L�����ւ�[�`]���J��
PRINTFORML [26] �S�L�����ւ�[�r�l]���J��
PRINTFORML [25] �S�L�����ւ�[��d]���J��
PRINTFORML [24] �S�L�����ւ�[�Z�N�n��]���J��
PRINTFORML [23] [�Ǝ�]���J��
PRINTFORML
PRINTFORML [19] �S�L�����̑S�Ă̊ȈՃt�B���^�I��
PRINTFORML [18] �S�L�����ւ�[�u]�𐧌�
PRINTFORML [17] �S�L�����ւ�[�`]�𐧌�
PRINTFORML [16] �S�L�����ւ�[�r�l]�𐧌�
PRINTFORML [15] �S�L�����ւ�[��d]�𐧌�
PRINTFORML [14] �S�L�����ւ�[�Z�N�n��]�𐧌�
PRINTFORML [13] [�Ǝ�]�𐧌�
PRINTFORML
PRINTFORML [99] �ݒ�I��
DO
	INPUT
	OP_SETTING = (RESULT / 10) - 1
	;20��1�A10��0
	SELECTCASE RESULT
	CASE 29, 19
		CVARSET CFLAG, OP_CFLAG_�u�A���t�B���^, OP_SETTING
		CVARSET CFLAG, OP_CFLAG_�`�A���t�B���^, OP_SETTING
		CVARSET CFLAG, OP_CFLAG_�r�l�A���t�B���^, OP_SETTING
		CVARSET CFLAG, OP_CFLAG_��d�A���t�B���^, OP_SETTING
		CVARSET CFLAG, OP_CFLAG_�Z�N�n���A���t�B���^, OP_SETTING
		FLAG:�Ǝ��A���t�B���^ = OP_SETTING
		IF OP_SETTING
			PRINTFORMW �S�L�����̑S�Ă̊ȈՃt�B���^�����I�t���ɂ��܂���
		ELSE
			PRINTFORMW �S�L�����̑S�Ă̊ȈՃt�B���^�����I�����ɂ��܂���
		ENDIF
	CASE 28, 18
		CVARSET CFLAG, OP_CFLAG_�u�A���t�B���^, OP_SETTING
		IF OP_SETTING
			PRINTFORMW �S�L�����ւ�[�u]�R�}���h�����J�������܂�
		ELSE
			PRINTFORMW �S�L�����ւ�[�u]�R�}���h�������������܂�
		ENDIF
	CASE 27, 17
		CVARSET CFLAG, OP_CFLAG_�`�A���t�B���^, OP_SETTING
		IF OP_SETTING
			PRINTFORMW �S�L�����ւ�[�`]�R�}���h�����J�������܂�
		ELSE
			PRINTFORMW �S�L�����ւ�[�`]�R�}���h�������������܂�
		ENDIF
	CASE 26, 16
		CVARSET CFLAG, OP_CFLAG_�r�l�A���t�B���^, OP_SETTING
		IF OP_SETTING
			PRINTFORMW �S�L�����ւ�[�r�l]�R�}���h�����J�������܂�
		ELSE
			PRINTFORMW �S�L�����ւ�[�r�l]�R�}���h�������������܂�
		ENDIF
	CASE 25, 15
		CVARSET CFLAG, OP_CFLAG_��d�A���t�B���^, OP_SETTING
		IF OP_SETTING
			PRINTFORMW �S�L�����ւ�[��d]�R�}���h�����J�������܂�
		ELSE
			PRINTFORMW �S�L�����ւ�[��d]�R�}���h�������������܂�
		ENDIF
	CASE 24, 14
		CVARSET CFLAG, OP_CFLAG_�Z�N�n���A���t�B���^, OP_SETTING
		IF OP_SETTING
			PRINTFORMW �S�L�����ւ�[�Z�N�n��]�R�}���h�����J�������܂�
		ELSE
			PRINTFORMW �S�L�����ւ�[�Z�N�n��]�R�}���h�������������܂�
		ENDIF
	CASE 23, 13
		FLAG:�Ǝ��A���t�B���^ = OP_SETTING
		IF OP_SETTING
			PRINTFORMW �Ǝ��R�}���h�����J�������܂�
		ELSE
			PRINTFORMW �Ǝ��R�}���h�������������܂�
		ENDIF
	CASE 99
		PRINTFORMW �ȈՃt�B���^�̐ݒ���I�����܂�
		RETURN
	CASEELSE
		PRINTFORML �����ȓ��͂ł�
		CONTINUE
	ENDSELECT
	BREAK
LOOP 1
RESTART

;---------------------------------------------------------------
;	�摜�ڍאݒ�
;	�ݒ肪�������̂ŐV��
;---------------------------------------------------------------
@OPTION_�摜�\���ڍאݒ�
PRINTL
PRINTFORML [*]�� ���݂�\@ FLAG:�����G��� ? ��G # �����G \@�̕\���l�� {FLAG:�摜�\��}�l
PRINTFORML [1]�� ���₷
PRINTFORML [2]�� ���炷
PRINTFORML [3] - �L�����摜�̃^�C�v \@ FLAG:�����G��� ? [��] # [�����G] \@
PRINTFORML [4]\@ FLAG:�}�G�\�� ? �� # %" "%- \@ �}�G��\������ \@ FLAG:�}�G�\�� ? ON # OFF \@
IF FLAG:�}�G�\��
	PRINT [5]�� �ː��摜�̎��
	SELECTCASE FLAG:�ː��摜���
		CASE 0
			PRINTL  [�f�ʁ{���ʉ�]
		CASE 1
			PRINTL  [�f�ʂ̂�]
		CASE 2
			PRINTL  [���ʉ��̂�]
	ENDSELECT
ENDIF
PRINTFORML [6]\@ FLAG:�A�j���[�V���� ? �� # %" "%- \@�A�j���[�V�����ݒ� \@ FLAG:�A�j���[�V���� ? �J��Ԃ��� {FLAG:�A�j���[�V����}�� # OFF \@
SIF FLAG:�A�j���[�V����
	;PRINTFORML [7]���A�j���ʐݒ� �}���F\@FLAG:�}���A�j���t�B���^ & �A�j���t�B���^_�}�� ? [�~]# [�Z]\@�@�Ⓒ�F\@FLAG:�}���A�j���t�B���^ & �A�j���t�B���^_�Ⓒ ? [�~]# [�Z]\@�@�ː��F\@FLAG:�}���A�j���t�B���^ & �A�j���t�B���^_�ː� ? [�~]# [�Z]\@�@���F\@FLAG:�}���A�j���t�B���^ & �A�j���t�B���^_��� ? [�~]# [�Z]\@
	PRINTFORML [7]���}�����͖��^�[���A�j���\���F\@FLAG:�}���A�j���t�B���^ & �A�j���t�B���^_�}�� ? [�~]# [�Z]\@
PRINTFORML [8] - \@ FLAG:�����G��� ? ��G # �����G \@�̕\���ʒu [\@ FLAG:�摜�\���ʒu ? ����# ������ \@]
PRINTFORML [9] - �摜�\���ɘg������ \@ FLAG:�摜�g�\�� ? ON # OFF \@
PRINTFORML [999] - �߂�
INPUT
IF RESULT == 999
	RETURN 0
ELSEIF RESULT == 1
	FLAG:�摜�\��++
	SIF FLAG:�摜�\�� > 10
		FLAG:�摜�\�� = 10
ELSEIF RESULT == 2
	FLAG:�摜�\��--
	SIF FLAG:�摜�\�� < 1
		FLAG:�摜�\�� = 1
ELSEIF RESULT == 3
	FLAG:�����G��� = !FLAG:�����G���
ELSEIF RESULT == 4
	FLAG:�}�G�\�� = !FLAG:�}�G�\��
ELSEIF RESULT == 5 && FLAG:�}�G�\��
	FLAG:�ː��摜���++
	SIF FLAG:�ː��摜��� >= 3
		FLAG:�ː��摜��� = 0
ELSEIF RESULT == 6
	FLAG:�A�j���[�V����++
	SIF FLAG:�A�j���[�V���� >= 6
		FLAG:�A�j���[�V���� = 0
ELSEIF RESULT == 7
	INVERTBIT FLAG:�}���A�j���t�B���^, 0
	;CALL ASK_M("�}���\���ؑ�",1,"�Ⓒ�\���ؑ�",1,"�ː��\���ؑ�",1,"�ː��\���ؑ�",1,"�߂�",1)
	;SIF RESULT == 4
	;	RESTART
	;INVERTBIT FLAG:�}���A�j���t�B���^, RESULT
	RESTART
ELSEIF RESULT == 8
	FLAG:�摜�\���ʒu = !FLAG:�摜�\���ʒu
ELSEIF RESULT == 9
	FLAG:�摜�g�\�� = !FLAG:�摜�g�\��
ENDIF
RESTART

;�����I�v�V�����ݒ�֐�
;0:�蓮����,1:�ٕ��s��,2:�򕨕s��
@SET_OPTION_COOKING
#DIM CONST OP_BIT_�蓮���� = 0
#DIM CONST OP_BIT_�ٕ��s�� = 1
#DIM CONST OP_BIT_�򕨕s�� = 2
#DIM CONST OP_BIT_�̓_�I�� = 3
PRINTFORML �����֘A�̃I�v�V������ݒ肵�܂�
PRINTFORML ���݂̐ݒ�
IF GET_OPTION_COOKING("�������e�蓮����")
	PRINTFORML �@�������e�F�蓮�Ō���
ELSE
	PRINTFORML �@�������e�F�����Ō���
ENDIF
IF GET_OPTION_COOKING("�ٕ������s��")
	PRINTFORML �@�ٕ������F���Ȃ�
ELSE
	PRINTFORML �@�ٕ������F����
ENDIF
IF GET_OPTION_COOKING("�򕨍����s��")
	PRINTFORML �@�򕨍����F���Ȃ�
ELSE
	PRINTFORML �@�򕨍����F����
ENDIF
SELECTCASE GET_OPTION_COOKING("�������t���ݒ�")
CASE 0
	PRINTFORML �@�������t�F���Ȃ�
CASE 10
	PRINTFORML �@�������t�F�����ŕ��ʂ̖�
CASE 11
	PRINTFORML �@�������t�F�����ŔZ����
CASE 12
	PRINTFORML �@�������t�F�����Ŕ���
ENDSELECT
IF GET_OPTION_COOKING("�̓_�@�\�I�t")
	PRINTFORML �@�̓_�@�\�F�I�t
ELSE
	PRINTFORML �@�̓_�@�\�F�I��
ENDIF
DO
	PRINTFORML [9] �������e�̐ݒ�ύX
	PRINTFORML [8] �ٕ������̐ݒ�ύX
	PRINTFORML [7] �򕨍����̐ݒ�ύX
	PRINTFORML [6] �������t�̐ݒ�ύX
	PRINTFORML [5] �̓_�@�\�̐ݒ�ύX
	PRINTFORML
	PRINTFORML
	PRINTFORML [0] ����
	INPUT
	SELECTCASE RESULT
	CASE 9
		INVERTBIT FLAG:�����I�v�V����, OP_BIT_�蓮����
	CASE 8
		INVERTBIT FLAG:�����I�v�V����, OP_BIT_�ٕ��s��
	CASE 7
		INVERTBIT FLAG:�����I�v�V����, OP_BIT_�򕨕s��
	CASE 6
		PRINTFORML �������t���@�\�̐ݒ�
		PRINTFORML [12] �������t����������
		PRINTFORML [11] �������t�����Z������
		PRINTFORML [10] �������t�������ʂ̖���
		PRINTFORML [ 0] �������t�����g��Ȃ�
		DO
			INPUT
			SELECTCASE RESULT
			CASE 10, 11, 12
				CLEARBIT FLAG:�����I�v�V����, 10, 11, 12
				SETBIT   FLAG:�����I�v�V����, RESULT
			CASE 0
				CLEARBIT FLAG:�����I�v�V����, 10, 11, 12
			CASEELSE
			PRINTFORML �����ȓ��͂ł�
			CONTINUE
			ENDSELECT
			BREAK
		LOOP 1
	CASE 5
		INVERTBIT FLAG:�����I�v�V����, OP_BIT_�̓_�I��
	CASE 0
		RETURN
	CASEELSE
		PRINTFORML �����ȓ��͂ł�
		CONTINUE
	ENDSELECT
	BREAK
LOOP 1
RESTART

;�����I�v�V�����̓��e�擾�֐�
@GET_OPTION_COOKING(TYPE)
#FUNCTION
#DIMS DYNAMIC TYPE
#DIM CONST OP_BIT_�蓮���� = 0
#DIM CONST OP_BIT_�ٕ������s�� = 1
#DIM CONST OP_BIT_�򕨍����s�� = 2
#DIM CONST OP_BIT_�̓_�@�\�I�� = 3
#DIM CONST OP_BIT_�������t��_���� = 10
#DIM CONST OP_BIT_�������t��_�Z�� = 11
#DIM CONST OP_BIT_�������t��_���� = 12
SELECTCASE TYPE
CASE "�������e�蓮����"
	SIF GETBIT(FLAG:�����I�v�V����, OP_BIT_�蓮����)
		RETURNF 1
CASE "�������e��������"
	RETURNF !GET_OPTION_COOKING("�������e�蓮����")

CASE "�ٕ������s��"
	SIF GETBIT(FLAG:�����I�v�V����, OP_BIT_�ٕ������s��)
		RETURNF 1
CASE "�ٕ������\"
	RETURNF !GET_OPTION_COOKING("�ٕ������s��")

CASE "�򕨍����s��"
	SIF GETBIT(FLAG:�����I�v�V����, OP_BIT_�򕨍����s��)
		RETURNF 1
CASE "�򕨍����\"
	RETURNF !GET_OPTION_COOKING("�򕨍����s��")
CASE "�������t���ݒ�"
	SIF GETBIT(FLAG:�����I�v�V����, OP_BIT_�������t��_����)
		RETURNF OP_BIT_�������t��_����
	SIF GETBIT(FLAG:�����I�v�V����, OP_BIT_�������t��_�Z��)
		RETURNF OP_BIT_�������t��_�Z��
	SIF GETBIT(FLAG:�����I�v�V����, OP_BIT_�������t��_����)
		RETURNF OP_BIT_�������t��_����
CASE "�̓_�@�\�I��"
	SIF GETBIT(FLAG:�����I�v�V����, OP_BIT_�̓_�@�\�I��)
		RETURNF 1
CASE "�̓_�@�\�I�t"
	RETURNF !GET_OPTION_COOKING("�̓_�@�\�I��")
CASEELSE
	THROW �s����TYPE%TYPE%
ENDSELECT
RETURNF 0

@SIMATTYAUOJISAN
;TW414_�ړ��p�b�`�ɂĉE�N���b�N��}�N���ɂ��X�L�b�v�����܂����Ⴄ�悤�ɏC��
;PRINT�ł̃E�F�C�g���Ȃ���������FORCEWAIT�ŃX�L�b�v��������悤��
;
FORCEWAIT
PRINT �u��ʏ�ɕ\������Ă��Ȃ���������ł�����q�͂������ȁH�v
FORCEWAIT
PRINT ���܂����Ⴄ�������񂪌��ꂽ�I
FORCEWAIT
PRINT �u�����A��ʏ�ɕ\������Ă��Ȃ���������ł�����q�̂����́A�ǂ�ǂ񂵂܂����Ⴄ����ˁv
FORCEWAIT
PRINTFORM ���܂����Ⴄ���������%CALLNAME:MASTER%�̗L��������܂��Ă��܂���
MONEY = 0
FORCEWAIT
PRINT �u��ʏ�ɕ\������Ă��Ȃ���������ł�����q�̃A�C�e�����A�ǂ�ǂ񂵂܂����Ⴄ����ˁv
FORCEWAIT
PRINTFORM %CALLNAME:MASTER%�̃A�C�e���͂��܂��Ă��܂���
FOR LOCAL,0,500
	ITEM:LOCAL = 0
NEXT
FORCEWAIT
PRINT �u��ʏ�ɕ\������Ă��Ȃ���������ł�����q�̋Z�I���A�ǂ�ǂ񂵂܂����Ⴄ����ˁv
FORCEWAIT
PRINTFORM %CALLNAME:MASTER%�̋Z�I�͂��܂��Ă��܂���
FORCEWAIT
FOR LOCAL,0,100
	ABL:0:LOCAL = 0
NEXT
PRINT �u��ʏ�ɕ\������Ă��Ȃ���������ł�����q�̌o�����A�ǂ�ǂ񂵂܂����Ⴄ����ˁv
FORCEWAIT
PRINTFORM %CALLNAME:MASTER%�̌o���͂��܂��Ă��܂���
FORCEWAIT
FOR LOCAL,0,100
	EXP:0:LOCAL = 0
NEXT
;�������������R���N�V���������܂����Ⴂ�܂��傤�ieraTW4.15�p���c�΍�p�b�`�ɂĒǉ��j
;
PRINT �u��ʏ�ɕ\������Ă��Ȃ���������ł�����q�̃p���c�R���N�V�������A�ǂ�ǂ񂵂܂����Ⴄ����ˁv
FORCEWAIT
PRINTFORM %CALLNAME:MASTER%���O�����߂Ď��W������ʂ̃p���c�R���N�V�����͂��܂��Ă��܂���
FORCEWAIT
FLAG:700 = 0
FOR LOCAL,1,CHARANUM
	FOR LOCAL:1,0,MAXPANTS
		CFLAG:LOCAL:(LOCAL:1 + �p���c�Ǘ�) = 0
	NEXT
NEXT
PRINT �u��ʏ�ɕ\������Ă��Ȃ���������ł�����q�̐M�����A�ǂ�ǂ񂵂܂����Ⴄ����ˁv
FORCEWAIT
PRINTFORM %CALLNAME:MASTER%�̏�����������̐M���͂��܂��Ă��܂���
FOR LOCAL,1,CHARANUM
	CFLAG:LOCAL:�M���x = 0
NEXT
FORCEWAIT
;
;
;PRINT �u��ʏ�ɕ\������Ă��Ȃ���������ł�����q�̊�b�\�͂��A�ǂ�ǂ񂵂܂����Ⴄ����ˁv
;FORCEWAIT
;PRINTFORM %CALLNAME:MASTER%�̊�b�\�͂͂��܂��Ă��܂���
;FOR LOCAL,0,9
;	MAXBASE:0:LOCAL = 99
;	BASE:0:LOCAL = min(MAXBASE:0:LOCAL,BASE:0:LOCAL)
;NEXT
;�������ɂ��߂��͗ǂ��Ȃ��Ǝv�����̂ŃN���b�N�A�łŋ����Ă݂�
;��җl�ց@����ɓ��Ă��p�b�`�ł��̂ŕs�����ł����炱�̕��������p�b�`�O�ɖ߂��Ă��������č\���܂���B
;
;
FORCEWAIT
PRINTW �������߂����`�`�`�`

;�Z�N�V�[�p���c�폜
@DELETE_SEXYPANTS
#DIM �Ώ�
#DIM ���
#DIM ���L��

VARSET RESULT

FOR �Ώ�,1,CHARANUM
	FOR ���,20,26
		���L�� = CFLAG:�Ώ�:(��� + 100)
		IF ���L�� >= 1
			RESULT:0 += (���L��)
			CFLAG:�Ώ�:(��� + 100) = 0
		ENDIF
	NEXT
NEXT

;�o�C�u�p���c�폜
@DELETE_VIBEPANTS
#DIM �Ώ�
#DIM ���
#DIM ���L��

VARSET RESULT

FOR �Ώ�,1,CHARANUM
	FOR ���,27,30
		���L�� = CFLAG:�Ώ�:(��� + 100)
		IF ���L�� >= 1
			RESULT:0 += (���L��)
			CFLAG:�Ώ�:(��� + 100) = 0
		ENDIF
	NEXT
NEXT


code:
;FILTER�p��COMNAME�擾�֐�
;�Ƃ肠����0�`599�͈̔͂Ŏg���ĉ�����
@GET_COMNAME(ID_COM)
#FUNCTIONS
#DIM ID_COM
;�h���R�}���h�p
SIF INRANGE(ID_COM, 500, 599)
	RETURNF STR:(1000 + ID_COM)
SIF INRANGE(ID_COM, 0, 499)
	RETURNF TRAINNAME:ID_COM
THROW �s����COM�ԍ����n����܂��� {ID_COM}

@QUICKFILTER(ID_COM)
#FUNCTION
#DIM ID_COM
#DIM CONST BIT_�u�n       = 1
#DIM CONST BIT_�`�n       = 2
#DIM CONST BIT_��d�n     = 5
#DIM CONST BIT_SM�n       = 6
#DIM CONST BIT_�Z�N�n���n = 7
#DIM CONST BIT_�Ǝ��n     = 9
#DIM CONST BIT_���Ԍn     = 13  ;���Ԃ�����ĂȂ�
SIF IS_COM_VAGINA(ID_COM)   && !CFLAG:TARGET:�u�A���t�B���^
	RETURNF 0
SIF IS_COM_ANAL(ID_COM)     && !CFLAG:TARGET:�`�A���t�B���^
	RETURNF 0
SIF IS_COM_HOUSI(ID_COM)    && !CFLAG:TARGET:��d�A���t�B���^
	RETURNF 0
SIF IS_COM_SM(ID_COM)       && !CFLAG:TARGET:�r�l�A���t�B���^
	RETURNF 0
SIF IS_COM_KAJI(ID_COM)     && !FLAG:�Ǝ��A���t�B���^
	RETURNF 0
SIF IS_COM_SEKUHARA(ID_COM) && !CFLAG:TARGET:�Z�N�n���A���t�B���^ && (!FLAG:70 || CFLAG:TARGET:344 == 1)
	RETURNF 0
;SIF IS_COM_ONANISM(ID_COM)  && !CFLAG:TARGET:���ԃA���t�B���^
;	RETURNF 0
RETURNF 1

@�t�B���^�\��
PRINT �@�@�@�@�@
CALL PRINTBUTTON_EX("[�u]",831,!CFLAG:TARGET:�u�A���t�B���^)
PRINTPLAIN
CALL PRINTBUTTON_EX("[�`]",832,!CFLAG:TARGET:�`�A���t�B���^)
PRINTPLAIN
CALL PRINTBUTTON_EX("[�r�l]",836,!CFLAG:TARGET:�r�l�A���t�B���^)
PRINTPLAIN
CALL PRINTBUTTON_EX("[��d]",835,!CFLAG:TARGET:��d�A���t�B���^)
PRINTPLAIN
;CALL PRINTBUTTON_EX("[����]",843,!CFLAG:TARGET:���ԃA���t�B���^)
;PRINTPLAIN
CALL PRINTBUTTON_EX("[�Z�N�n��]",837,!CFLAG:TARGET:�Z�N�n���A���t�B���^)
PRINTPLAIN
CALL PRINTBUTTON_EX("[�Ǝ�]",839,!FLAG:�Ǝ��A���t�B���^)
PRINTL
PRINTL

;������ϐ��ɕۑ����Ă݂�
@OPTION_COMMAND_FILTER
#LOCALSIZE 600
#DIM ID_COM
CALL LOAD_COM_FILTER(LOCAL)
DRAWLINE
FOR ID_COM ,0, 600
	SIF !STRLENS(GET_COMNAME(ID_COM))
		CONTINUE
	CALL PRINTBUTTON_EXC(@"%GET_COMNAME(ID_COM)%[{ID_COM,3}]", ID_COM, STRCOUNT(SAVESTR:0, @"/{ID_COM}/"))
NEXT
PRINTL
DRAWLINE
PRINTFORML [1101] - �u�t�B���^     [1102] - �`�t�B���^       [1103] - ��d�t�B���^
PRINTFORML [1104] - �r�l�t�B���^   [1105] - �Z�N�n���t�B���^ [1106] - �Ǝ��t�B���^
PRINTFORML [1111] - �`�k�k�t�B���^
PRINTFORML [2000] - USERCOM�t�B���^
PRINTFORML [3000] - �t�B���^�̕ۑ� [3001] - �t�B���^�̓Ǎ�
PRINTFORML [1000] - ����
PRINTL
PRINTFORML [9999] - ���Z�b�g
PRINTL
INPUT
SELECTCASE RESULT
CASE 1000
	RETURN 0
CASE 9999
	SAVESTR:0 =
CASE 3000
	CALL SAVE_GLOBAL_COM_FILTER
CASE 3001
	CALL LOAD_GLOBAL_COM_FILTER
CASE 2000
	CALL SETUP_USERCOM_FILTER
CASE 1101
	CALL SET_FILTER_NG_VAGINA
CASE 1102
	CALL SET_FILTER_NG_ANAL
CASE 1103
	CALL SET_FILTER_NG_HOUSI
CASE 1104
	CALL SET_FILTER_NG_SM
CASE 1105
	CALL SET_FILTER_NG_SEKUHARA
CASE 1106
	CALL SET_FILTER_NG_KAJI
CASE 1111
	CALL SET_FILTER_NG_ALL
CASEELSE
	IF STRLENS(GET_COMNAME(RESULT))
		LOCAL:RESULT = !LOCAL:RESULT
		IF LOCAL:RESULT
			CALL ADD_COM_FILTER(RESULT)
		ELSE
			CALL DEL_COM_FILTER(RESULT)
			;SAVE_COM_FILTER(LOCAL)
		ENDIF
	ENDIF
ENDSELECT
RESTART

;�t�B���^�[��NG��COM�ǉ�����֐�
@ADD_COM_FILTER(NG_ID)
#DIM NG_ID
SIF SAVESTR:0 == ""
	SAVESTR:0 = /
SIF STRCOUNT(SAVESTR:0, @"/{NG_ID}/")
	RETURN
SAVESTR:0 += @"{NG_ID}/"

;�t�B���^�[����NG��COM�폜����֐�
;���K�\���Ƃ��낭�ɐG�������ƂȂ��񂾂�����œ�����H
@DEL_COM_FILTER(NG_ID)
#DIM NG_ID
SIF !STRCOUNT(SAVESTR:0, @"/{NG_ID}/")
	RETURN
SAVESTR:0 '= REPLACE(SAVESTR:0, @"%ESCAPE("/")%{NG_ID}%ESCAPE("/")%", ESCAPE("/"))

;REF�g�pCOM_FILTER�ۑ��֐�
;�z�񁨕�����
;�z��̗v�f����600�������Ɠ{����
@SAVE_COM_FILTER(NG_LIST)
#DIM REF NG_LIST
#DIM ID_COM
SAVESTR:0 = /
FOR ID_COM, 0, 600
	SIF !NG_LIST:ID_COM
		CONTINUE
	SIF STRCOUNT(SAVESTR:0, @"/{ID_COM}/")
		CONTINUE
	SAVESTR:0 += @"{ID_COM}/"
NEXT
;#;PRINTFORML SAVE_COM_FILTER�F%SAVESTR:0%

;REF�g�pCOM_FILTER�Ǎ��֐�
;�����񁨔z��
;�z��̗v�f����600�������Ɠ{����
@LOAD_COM_FILTER(NG_LIST)
#DIM REF NG_LIST
#DIM ID_COM
VARSET NG_LIST
IF SAVESTR:0 == ""
	SAVESTR:0 = /
ELSE
	FOR ID_COM, 0, 600
		SIF STRCOUNT(SAVESTR:0, @"/{ID_COM}/")
			NG_LIST:ID_COM = 1
	NEXT
ENDIF
;#;PRINTFORML LOAD_COM_FILTER�F%SAVESTR:0%

;NG�������GLOBAL�ɕۑ�
@SAVE_GLOBAL_COM_FILTER
LOADGLOBAL
FOR LOCAL, 0, 3
	PRINTFORM [{LOCAL}] -
	IF STRLENS(GLOBALS:(LOCAL * 2 + 1))
		PRINTFORML [%GLOBALS:(LOCAL * 2 + 1)%]
	ELSE
		PRINTL ----------
	ENDIF
NEXT
PRINTL [100] - �߂�
INPUT
DO
	LOCAL = RESULT
	SIF RESULT == 100
		RETURN
	SIF !INRANGE(RESULT, 0, 2)
		CONTINUE
	SIF STRLENS(GLOBALS:(RESULT * 2 + 1))
		PRINTFORML �y%GLOBALS:(RESULT * 2 + 1)%�z ���̃f�[�^�ɏ㏑�����܂�
	PRINTL �R�}���h�t�B���^�̖��O��o�^���Ă�������
	INPUTS
	GLOBALS:(LOCAL * 2 + 1) = %RESULTS%
	GLOBALS:(LOCAL * 2) = %SAVESTR:0%
	PRINTFORMW �R�}���h�t�B���^�y%GLOBALS:(LOCAL * 2 + 1)%�z��o�^���܂���
	SAVEGLOBAL
	RETURN
LOOP 1

;NG�������GLOBAL����Ǎ�
@LOAD_GLOBAL_COM_FILTER
LOADGLOBAL
FOR LOCAL, 0, 3
	PRINTFORM [{LOCAL}] -
	IF STRLENS(GLOBALS:(LOCAL * 2 + 1))
		PRINTFORML [%GLOBALS:(LOCAL * 2 + 1)%]
	ELSE
		PRINTL ----------
	ENDIF
NEXT
PRINTL [100] - �߂�
INPUT
DO
	SIF RESULT == 100
		RETURN
	SIF !INRANGE(RESULT, 0, 2)
		CONTINUE
	PRINTFORMW �R�}���h�t�B���^�y%GLOBALS:(RESULT * 2 + 1)%�z��ǂݍ��݂܂���
	SAVESTR:0 = %GLOBALS:(RESULT * 2)%
	RETURN
LOOP 1

;�Ԃ����Ⴏ�g��Ȃ��C������
@SETUP_USERCOM_FILTER
CALL PRINTBUTTON_EXC("����\��[800]",             800, GETBIT(FLAG:USERCOM�t�B���^, 12))
CALL PRINTBUTTON_EXC("����\��[801]",             801, GETBIT(FLAG:USERCOM�t�B���^,  0))
CALL PRINTBUTTON_EXC("�����ς���[802]",         802, GETBIT(FLAG:USERCOM�t�B���^,  1))
CALL PRINTBUTTON_EXC("�\�͕\��[803]",             803, GETBIT(FLAG:USERCOM�t�B���^,  2))
CALL PRINTBUTTON_EXC("�\�͕\���i�}�X�^�[�j[804]", 804, GETBIT(FLAG:USERCOM�t�B���^,  3))
CALL PRINTBUTTON_EXC("�������~�߈ړ�[995]", 995, GETBIT(FLAG:USERCOM�t�B���^,  13))
CALL PRINTBUTTON_EXC("�R�}���h�t�B���^[809]",     809, GETBIT(FLAG:USERCOM�t�B���^, 11))
PRINTL
PRINTC �߂� [0]
INPUT
SELECTCASE RESULT
CASE 0
	RETURN
CASE 801
	INVERTBIT FLAG:USERCOM�t�B���^, 0
CASE 802
	INVERTBIT FLAG:USERCOM�t�B���^, 1
CASE 803
	INVERTBIT FLAG:USERCOM�t�B���^, 2
CASE 804
	INVERTBIT FLAG:USERCOM�t�B���^, 3
CASE 809
	INVERTBIT FLAG:USERCOM�t�B���^, 11
	IF GETBIT (FLAG:USERCOM�t�B���^, 11)
		PRINTW ���肷��Ǝ�ł���[809]����͂��邩OPTION����łȂ��Ɩ߂��Ȃ��Ȃ�܂�
		CLEARLINE 1
	ENDIF
CASE 800
	INVERTBIT FLAG:USERCOM�t�B���^, 12
CASE 995
	INVERTBIT FLAG:USERCOM�t�B���^, 13
ENDSELECT
CLEARLINE 3
RESTART

;V�g�p�R�}���h����
;FLAG:1013, 1
@IS_COM_VAGINA(ID_COM)
#FUNCTION
#DIM ID_COM
SIF GROUPMATCH(ID_COM, 3, 44, 60, 61, 65, 67, 68, 71, 122, 141, 143, 185, 316, 368, 369, 503, 504, 506, 507, 513)
	RETURNF 1
RETURNF 0

@SET_FILTER_NG_VAGINA
#DIM ID_COM
FOR ID_COM, 0, 600
	;V
	SIF !IS_COM_VAGINA(ID_COM)
		CONTINUE
	CALL ADD_COM_FILTER(ID_COM)
NEXT

;A�g�p�R�}���h����
;FLAG:1013, 2
@IS_COM_ANAL(ID_COM)
#FUNCTION
#DIM ID_COM
SIF GROUPMATCH(ID_COM, 4, 5, 45, 62, 63, 66, 69, 70, 314, 142, 143, 146, 147, 148, 314, 368, 369, 514, 515)
	RETURNF 1
RETURNF 0

@SET_FILTER_NG_ANAL
#DIM ID_COM
FOR ID_COM, 0, 600
	;A
	SIF !IS_COM_ANAL(ID_COM)
		CONTINUE
	CALL ADD_COM_FILTER(ID_COM)
NEXT

;��d�R�}���h����
;FLAG:1013, 5
@IS_COM_HOUSI(ID_COM)
#FUNCTION
#DIM ID_COM
SIF INRANGE(ID_COM, 80, 85) || GROUPMATCH(ID_COM, 120, 121, 140, 501, 505, 508, 509, 510, 511, 512)
	RETURNF 1
RETURNF 0

@SET_FILTER_NG_HOUSI
#DIM ID_COM
FOR ID_COM, 0, 600
	;HOUSI
	SIF !IS_COM_HOUSI(ID_COM)
		CONTINUE
	CALL ADD_COM_FILTER(ID_COM)
NEXT

;SM�R�}���h����
;FLAG:1013, 6
@IS_COM_SM(ID_COM)
#FUNCTION
#DIM ID_COM
SIF INRANGE(ID_COM, 100, 119) || INRANGE(ID_COM, 140, 159)
	RETURNF 1
RETURNF 0

@SET_FILTER_NG_SM
#DIM ID_COM
FOR ID_COM, 0, 600
	;SM
	SIF !IS_COM_SM(ID_COM)
		CONTINUE
	CALL ADD_COM_FILTER(ID_COM)
NEXT

;�Z�N�n���R�}���h����
;FLAG:1013, 7
@IS_COM_SEKUHARA(ID_COM)
#FUNCTION
#DIM ID_COM
SIF INRANGE(ID_COM, 305, 316) || INRANGE(ID_COM, 560, 563) || GROUPMATCH(ID_COM, 330, 350, 352, 429)
	RETURNF 1
RETURNF 0

@SET_FILTER_NG_SEKUHARA
#DIM ID_COM
FOR ID_COM, 0, 600
	;�Z�N�n��
	SIF !IS_COM_SEKUHARA(ID_COM)
		CONTINUE
	CALL ADD_COM_FILTER(ID_COM)
NEXT

;�Ǝ��R�}���h����
;FLAG:1013, 9
@IS_COM_KAJI(ID_COM)
#FUNCTION
#DIM ID_COM
SIF INRANGE(ID_COM, 410, 419) || GROUPMATCH(ID_COM, 403, 450)
	RETURNF 1
RETURNF 0

@SET_FILTER_NG_KAJI
#DIM ID_COM
FOR ID_COM, 0, 600
	SIF !IS_COM_KAJI(ID_COM)
		CONTINUE
	CALL ADD_COM_FILTER(ID_COM)
NEXT

;���ԃR�}���h����
;FLAG:1013, 13
@IS_COM_ONANISM(ID_COM)
#FUNCTION
#DIM ID_COM
SIF INRANGE(ID_COM, 700, 712) || INRANGE(ID_COM, 740, 752) || GROUPMATCH(ID_COM, 433)
	RETURNF 1
RETURNF 0

@SET_FILTER_NG_ONANISM
#DIM ID_COM
FOR ID_COM, 0, 600
	SIF !IS_COM_ONANISM(ID_COM)
		CONTINUE
	CALL ADD_COM_FILTER(ID_COM)
NEXT

;�`�k�k�R�}���h����
@SET_FILTER_NG_ALL
#DIM ID_COM
FOR ID_COM, 0, 600
	CALL ADD_COM_FILTER(ID_COM)
NEXT