SPRITE_BODY			= 0;
SPRITE_EYE			= 1;
SPRITE_PIPEL		= 2;
SPRITE_PIPER		= 3;
SPRITE_TENTACLE1	= 4;
SPRITE_TENTACLE2	= 5;
SPRITE_TENTACLE3	= 6;
SPRITE_TENTACLE4	= 7;
SPRITE_TENTACLE5	= 8;
SPRITE_TENTACLE6	= 9;
SPRITE_TENTACLE_TIP	=10;

SOUND_DAMAGE		= 0;
SOUND_VOICE			= 1;

PARTS_BODY			= 0;
PARTS_EYE			= 1;
PARTS_PIPEL			= 2;
PARTS_PIPER			= 3;
PARTS_TENTACLE1_1	= 4;
PARTS_TENTACLE1_2	= 5;
PARTS_TENTACLE1_3	= 6;
PARTS_TENTACLE1_4	= 7;
PARTS_TENTACLE1_5	= 8;
PARTS_TENTACLE1_TIP	= 9;
PARTS_TENTACLE2_1	= 10;
PARTS_TENTACLE2_2	= 11;
PARTS_TENTACLE2_3	= 12;
PARTS_TENTACLE2_4	= 13;
PARTS_TENTACLE2_5	= 14;
PARTS_TENTACLE2_TIP	= 15;
PARTS_TENTACLE3_1	= 16;
PARTS_TENTACLE3_2	= 17;
PARTS_TENTACLE3_3	= 18;
PARTS_TENTACLE3_4	= 19;
PARTS_TENTACLE3_5	= 20;
PARTS_TENTACLE3_TIP	= 21;
PARTS_TENTACLE4_1	= 22;
PARTS_TENTACLE4_2	= 23;
PARTS_TENTACLE4_3	= 24;
PARTS_TENTACLE4_4	= 25;
PARTS_TENTACLE4_5	= 26;
PARTS_TENTACLE4_TIP	= 27;
PARTS_TENTACLE5_1	= 28;
PARTS_TENTACLE5_2	= 29;
PARTS_TENTACLE5_3	= 30;
PARTS_TENTACLE5_4	= 31;
PARTS_TENTACLE5_5	= 32;
PARTS_TENTACLE5_TIP	= 33;
PARTS_TENTACLE6_1	= 34;
PARTS_TENTACLE6_2	= 35;
PARTS_TENTACLE6_3	= 36;
PARTS_TENTACLE6_4	= 37;
PARTS_TENTACLE6_5	= 38;
PARTS_TENTACLE6_TIP	= 39;

START					=  0;
STAND					=  1;
ATTACK_SPEAR			=  2;
ATTACK_SPEAR2			=  3;
ATTACK_SWING			=  4;
ATTACK_LEFT				=  5;
ATTACK_RIGHT			=  6;

CATCH_LEFT				=  7;
CATCH_CENTER			=  8;
CATCH_RIGHT				=  9;
CATCH_LEFT_START		= 10;
CATCH_CENTER_START		= 11;
CATCH_RIGHT_START		= 12;

CATCH_STRANGLE			= 13;
CATCH_STING				= 14;
CATCH_CAGE				= 15;
CATCH_HEAD				= 16;
CATCH_SQUEEZE			= 17;
INJECTION				= 18;

DEAD_MOTION				= 19;

BIND_CATCH_START		= 0;
BIND_CATCH_STING		= 1;
BIND_CATCH_CAGE			= 2;
BIND_CATCH_HEAD			= 3;
BIND_CATCH_SQUEEZE		= 4;

/*----------------------------------------*/

/* 必須ステータス */
HP = 6000;

MotionNumber		= 30;
KeyFrameNumber		= 40;
PartsNumber			= 40;
BindNumber			= 10;
BindKeyFrameNumber	= 20;

ProcessNum[PARTS_BODY         ] = 0; DrawNum[PARTS_BODY         ] =38; ParentParts[PARTS_BODY         ] = -1;				SpriteParts[PARTS_BODY         ] = SPRITE_BODY;
ProcessNum[PARTS_EYE          ] = 1; DrawNum[PARTS_EYE          ] =39; ParentParts[PARTS_EYE          ] = PARTS_BODY;		SpriteParts[PARTS_EYE          ] = SPRITE_EYE;
ProcessNum[PARTS_PIPEL        ] = 2; DrawNum[PARTS_PIPEL        ] =36; ParentParts[PARTS_PIPEL        ] = PARTS_BODY;		SpriteParts[PARTS_PIPEL        ] = SPRITE_PIPEL;
ProcessNum[PARTS_PIPER        ] = 3; DrawNum[PARTS_PIPER        ] =37; ParentParts[PARTS_PIPER        ] = PARTS_BODY;		SpriteParts[PARTS_PIPER        ] = SPRITE_PIPER;
ProcessNum[PARTS_TENTACLE1_1  ] = 4; DrawNum[PARTS_TENTACLE1_1  ] = 0; ParentParts[PARTS_TENTACLE1_1  ] = PARTS_BODY;		SpriteParts[PARTS_TENTACLE1_1  ] = SPRITE_TENTACLE1;
ProcessNum[PARTS_TENTACLE1_2  ] = 5; DrawNum[PARTS_TENTACLE1_2  ] = 1; ParentParts[PARTS_TENTACLE1_2  ] = PARTS_TENTACLE1_1;SpriteParts[PARTS_TENTACLE1_2  ] = SPRITE_TENTACLE2;
ProcessNum[PARTS_TENTACLE1_3  ] = 6; DrawNum[PARTS_TENTACLE1_3  ] = 2; ParentParts[PARTS_TENTACLE1_3  ] = PARTS_TENTACLE1_2;SpriteParts[PARTS_TENTACLE1_3  ] = SPRITE_TENTACLE3;
ProcessNum[PARTS_TENTACLE1_4  ] = 7; DrawNum[PARTS_TENTACLE1_4  ] = 3; ParentParts[PARTS_TENTACLE1_4  ] = PARTS_TENTACLE1_3;SpriteParts[PARTS_TENTACLE1_4  ] = SPRITE_TENTACLE4;
ProcessNum[PARTS_TENTACLE1_5  ] = 8; DrawNum[PARTS_TENTACLE1_5  ] = 4; ParentParts[PARTS_TENTACLE1_5  ] = PARTS_TENTACLE1_4;SpriteParts[PARTS_TENTACLE1_5  ] = SPRITE_TENTACLE5;
ProcessNum[PARTS_TENTACLE1_TIP] = 9; DrawNum[PARTS_TENTACLE1_TIP] = 5; ParentParts[PARTS_TENTACLE1_TIP] = PARTS_TENTACLE1_5;SpriteParts[PARTS_TENTACLE1_TIP] = SPRITE_TENTACLE_TIP;
ProcessNum[PARTS_TENTACLE2_1  ] =10; DrawNum[PARTS_TENTACLE2_1  ] = 6; ParentParts[PARTS_TENTACLE2_1  ] = PARTS_BODY;		SpriteParts[PARTS_TENTACLE2_1  ] = SPRITE_TENTACLE2;
ProcessNum[PARTS_TENTACLE2_2  ] =11; DrawNum[PARTS_TENTACLE2_2  ] = 7; ParentParts[PARTS_TENTACLE2_2  ] = PARTS_TENTACLE2_1;SpriteParts[PARTS_TENTACLE2_2  ] = SPRITE_TENTACLE4;
ProcessNum[PARTS_TENTACLE2_3  ] =12; DrawNum[PARTS_TENTACLE2_3  ] = 8; ParentParts[PARTS_TENTACLE2_3  ] = PARTS_TENTACLE2_2;SpriteParts[PARTS_TENTACLE2_3  ] = SPRITE_TENTACLE6;
ProcessNum[PARTS_TENTACLE2_4  ] =13; DrawNum[PARTS_TENTACLE2_4  ] = 9; ParentParts[PARTS_TENTACLE2_4  ] = PARTS_TENTACLE2_3;SpriteParts[PARTS_TENTACLE2_4  ] = SPRITE_TENTACLE1;
ProcessNum[PARTS_TENTACLE2_5  ] =14; DrawNum[PARTS_TENTACLE2_5  ] =10; ParentParts[PARTS_TENTACLE2_5  ] = PARTS_TENTACLE2_4;SpriteParts[PARTS_TENTACLE2_5  ] = SPRITE_TENTACLE3;
ProcessNum[PARTS_TENTACLE2_TIP] =15; DrawNum[PARTS_TENTACLE2_TIP] =11; ParentParts[PARTS_TENTACLE2_TIP] = PARTS_TENTACLE2_5;SpriteParts[PARTS_TENTACLE2_TIP] = SPRITE_TENTACLE_TIP;
ProcessNum[PARTS_TENTACLE3_1  ] =16; DrawNum[PARTS_TENTACLE3_1  ] =12; ParentParts[PARTS_TENTACLE3_1  ] = PARTS_BODY;		SpriteParts[PARTS_TENTACLE3_1  ] = SPRITE_TENTACLE5;
ProcessNum[PARTS_TENTACLE3_2  ] =17; DrawNum[PARTS_TENTACLE3_2  ] =13; ParentParts[PARTS_TENTACLE3_2  ] = PARTS_TENTACLE3_1;SpriteParts[PARTS_TENTACLE3_2  ] = SPRITE_TENTACLE3;
ProcessNum[PARTS_TENTACLE3_3  ] =18; DrawNum[PARTS_TENTACLE3_3  ] =14; ParentParts[PARTS_TENTACLE3_3  ] = PARTS_TENTACLE3_2;SpriteParts[PARTS_TENTACLE3_3  ] = SPRITE_TENTACLE1;
ProcessNum[PARTS_TENTACLE3_4  ] =19; DrawNum[PARTS_TENTACLE3_4  ] =15; ParentParts[PARTS_TENTACLE3_4  ] = PARTS_TENTACLE3_3;SpriteParts[PARTS_TENTACLE3_4  ] = SPRITE_TENTACLE5;
ProcessNum[PARTS_TENTACLE3_5  ] =20; DrawNum[PARTS_TENTACLE3_5  ] =16; ParentParts[PARTS_TENTACLE3_5  ] = PARTS_TENTACLE3_4;SpriteParts[PARTS_TENTACLE3_5  ] = SPRITE_TENTACLE6;
ProcessNum[PARTS_TENTACLE3_TIP] =21; DrawNum[PARTS_TENTACLE3_TIP] =17; ParentParts[PARTS_TENTACLE3_TIP] = PARTS_TENTACLE3_5;SpriteParts[PARTS_TENTACLE3_TIP] = SPRITE_TENTACLE_TIP;
ProcessNum[PARTS_TENTACLE4_1  ] =22; DrawNum[PARTS_TENTACLE4_1  ] =18; ParentParts[PARTS_TENTACLE4_1  ] = PARTS_BODY;		SpriteParts[PARTS_TENTACLE4_1  ] = SPRITE_TENTACLE4;
ProcessNum[PARTS_TENTACLE4_2  ] =23; DrawNum[PARTS_TENTACLE4_2  ] =19; ParentParts[PARTS_TENTACLE4_2  ] = PARTS_TENTACLE4_1;SpriteParts[PARTS_TENTACLE4_2  ] = SPRITE_TENTACLE1;
ProcessNum[PARTS_TENTACLE4_3  ] =24; DrawNum[PARTS_TENTACLE4_3  ] =20; ParentParts[PARTS_TENTACLE4_3  ] = PARTS_TENTACLE4_2;SpriteParts[PARTS_TENTACLE4_3  ] = SPRITE_TENTACLE3;
ProcessNum[PARTS_TENTACLE4_4  ] =25; DrawNum[PARTS_TENTACLE4_4  ] =21; ParentParts[PARTS_TENTACLE4_4  ] = PARTS_TENTACLE4_3;SpriteParts[PARTS_TENTACLE4_4  ] = SPRITE_TENTACLE6;
ProcessNum[PARTS_TENTACLE4_5  ] =26; DrawNum[PARTS_TENTACLE4_5  ] =22; ParentParts[PARTS_TENTACLE4_5  ] = PARTS_TENTACLE4_4;SpriteParts[PARTS_TENTACLE4_5  ] = SPRITE_TENTACLE2;
ProcessNum[PARTS_TENTACLE4_TIP] =27; DrawNum[PARTS_TENTACLE4_TIP] =23; ParentParts[PARTS_TENTACLE4_TIP] = PARTS_TENTACLE4_5;SpriteParts[PARTS_TENTACLE4_TIP] = SPRITE_TENTACLE_TIP;
ProcessNum[PARTS_TENTACLE5_1  ] =28; DrawNum[PARTS_TENTACLE5_1  ] =24; ParentParts[PARTS_TENTACLE5_1  ] = PARTS_BODY;		SpriteParts[PARTS_TENTACLE5_1  ] = SPRITE_TENTACLE2;
ProcessNum[PARTS_TENTACLE5_2  ] =29; DrawNum[PARTS_TENTACLE5_2  ] =25; ParentParts[PARTS_TENTACLE5_2  ] = PARTS_TENTACLE5_1;SpriteParts[PARTS_TENTACLE5_2  ] = SPRITE_TENTACLE3;
ProcessNum[PARTS_TENTACLE5_3  ] =30; DrawNum[PARTS_TENTACLE5_3  ] =26; ParentParts[PARTS_TENTACLE5_3  ] = PARTS_TENTACLE5_2;SpriteParts[PARTS_TENTACLE5_3  ] = SPRITE_TENTACLE1;
ProcessNum[PARTS_TENTACLE5_4  ] =31; DrawNum[PARTS_TENTACLE5_4  ] =27; ParentParts[PARTS_TENTACLE5_4  ] = PARTS_TENTACLE5_3;SpriteParts[PARTS_TENTACLE5_4  ] = SPRITE_TENTACLE5;
ProcessNum[PARTS_TENTACLE5_5  ] =32; DrawNum[PARTS_TENTACLE5_5  ] =28; ParentParts[PARTS_TENTACLE5_5  ] = PARTS_TENTACLE5_4;SpriteParts[PARTS_TENTACLE5_5  ] = SPRITE_TENTACLE4;
ProcessNum[PARTS_TENTACLE5_TIP] =33; DrawNum[PARTS_TENTACLE5_TIP] =29; ParentParts[PARTS_TENTACLE5_TIP] = PARTS_TENTACLE5_5;SpriteParts[PARTS_TENTACLE5_TIP] = SPRITE_TENTACLE_TIP;
ProcessNum[PARTS_TENTACLE6_1  ] =34; DrawNum[PARTS_TENTACLE6_1  ] =30; ParentParts[PARTS_TENTACLE6_1  ] = PARTS_BODY;		SpriteParts[PARTS_TENTACLE6_1  ] = SPRITE_TENTACLE5;
ProcessNum[PARTS_TENTACLE6_2  ] =35; DrawNum[PARTS_TENTACLE6_2  ] =31; ParentParts[PARTS_TENTACLE6_2  ] = PARTS_TENTACLE6_1;SpriteParts[PARTS_TENTACLE6_2  ] = SPRITE_TENTACLE4;
ProcessNum[PARTS_TENTACLE6_3  ] =36; DrawNum[PARTS_TENTACLE6_3  ] =32; ParentParts[PARTS_TENTACLE6_3  ] = PARTS_TENTACLE6_2;SpriteParts[PARTS_TENTACLE6_3  ] = SPRITE_TENTACLE3;
ProcessNum[PARTS_TENTACLE6_4  ] =37; DrawNum[PARTS_TENTACLE6_4  ] =33; ParentParts[PARTS_TENTACLE6_4  ] = PARTS_TENTACLE6_3;SpriteParts[PARTS_TENTACLE6_4  ] = SPRITE_TENTACLE2;
ProcessNum[PARTS_TENTACLE6_5  ] =38; DrawNum[PARTS_TENTACLE6_5  ] =34; ParentParts[PARTS_TENTACLE6_5  ] = PARTS_TENTACLE6_4;SpriteParts[PARTS_TENTACLE6_5  ] = SPRITE_TENTACLE6;
ProcessNum[PARTS_TENTACLE6_TIP] =39; DrawNum[PARTS_TENTACLE6_TIP] =35; ParentParts[PARTS_TENTACLE6_TIP] = PARTS_TENTACLE6_5;SpriteParts[PARTS_TENTACLE6_TIP] = SPRITE_TENTACLE_TIP;

/* 任意の変数 */

/*----------------------------------------*/
global.BOSSID = id;
global.BOSSHPMAX = HP;
frameCount = 0;
BloodAmount = 100;

RealCollisionID = instance_find(objBoss4Eye,irandom(instance_number(objBoss4Eye)));
if(!EDIT()) RealCollision = instance_create(x,y,objExistOnlyEnemy);