/*-----重力設定--------------------------*/
if( air ){
	gravity = global.G;
	gravity_direction = global.Gdir;
	hspeed *= 0.3;
}else{
	gravity = 0;
	gravity_direction = 0;
	hspeed *= 0.3;
}

Tawami -= (Bullet.y - Bullet.preY)/10;
Tawami -= 0.75;
if(Tawami >  0) Tawami -= abs(Bullet.x - Bullet.preX)/50;
if(Tawami <  0) Tawami += abs(Bullet.x - Bullet.preX)/50;

if(Tawami >  3) Tawami =  3;
if(Tawami < -3) Tawami = -3;
Process[ProcessNum[PARTS_MOUTH01]].PartPicture = 3 + Tawami;

with(objEnemyEdit){ if(Edit_Play) exit; }

/*-----キャラクタとの情報の取得---------------*/
playerDistance = point_distance(x,y,objPlayerDoll.x,objPlayerDoll.y);
playerDirection = point_direction(x,y,objPlayerDoll.x,objPlayerDoll.y);

/*-----モーション毎の処理--------------------*/
if(RECV_DAMAGE) playEnemySound(SOUND_DAMAGE);
Bullet.visible = false;

/*-----モーション変更中も有効-----*/
switch(MotionNum){
	case HIJUMP :
		depth = objPlayerDoll.depth - 1000;
		for(i=0;i<PARTS_MAX;i+=1) with(Draw[i]){ depth = other.depth - other.i*3; }
		break;
	case VORE_FOOT :
		VoreCount += 1;
	case MOUTHATTACK_GROUND_SUCCESS :
		Process[ProcessNum[PARTS_HEAD02]].depth = objPlayerDoll.depth - 1000;
		Process[ProcessNum[PARTS_HEAD01]].depth = objPlayerDoll.depth - 1001;
		objPlayerDoll.HAND3_ABOVE.depth  = Process[ProcessNum[PARTS_HEAD01]].depth - 1001;
		objPlayerDoll.HAND2_ABOVE.depth  = Process[ProcessNum[PARTS_HEAD01]].depth - 1002;
		objPlayerDoll.HAND1_ABOVE.depth  = Process[ProcessNum[PARTS_HEAD01]].depth - 1003;
		if(BindTarget){
			if(!BindTarget.BINDED){
				MotionChange(STAND,0,5);
				with(BindTarget){
					MotionChange(FLYING_1,0,1);
				}
				endBind();
				break;
			}
		}
		break;
	/* ------------------------------------------------------------ */
	case VORE_HEAD :
		VoreCount += 1;
	case MOUTHATTACK_AIR_SUCCESS :
		Process[ProcessNum[PARTS_HEAD02]].depth = objPlayerDoll.depth - 1000;
		Process[ProcessNum[PARTS_HEAD01]].depth = objPlayerDoll.depth - 1001;
		if(BindTarget){
			if(!BindTarget.BINDED){
				MotionChange(STAND,0,5);
				with(BindTarget){
					MotionChange(FLYING_1,0,1);
				}
				endBind();
				break;
			}
		}
		break;
	case VORE_HEAD_TOINSIDE :
	case VORE_FOOT_TOINSIDE :
		depth = objPlayerDoll.depth - 1000;
		for(i=0;i<PARTS_MAX;i+=1) with(Draw[i]){ depth = other.depth - other.i*3; }
		Process[ProcessNum[PARTS_HEAD03]].depth = objPlayerDoll.depth + 1000;
		break;
	case VORE_HEAD_INSIDE :
	case VORE_HEAD_INSIDE_FINISH :
	case VORE_FOOT_INSIDE :
	case VORE_FOOT_INSIDE_FINISH :
		depth = objPlayerDoll.depth + 1000;
		for(i=0;i<PARTS_MAX;i+=1) with(Draw[i]){ depth = other.depth - other.i*3; }
		Process[ProcessNum[PARTS_STOMACH06]].depth = objPlayerDoll.depth - 1002;
		Process[ProcessNum[PARTS_STOMACH05]].depth = objPlayerDoll.depth - 1003;
		Process[ProcessNum[PARTS_STOMACH04]].depth = objPlayerDoll.depth + 2;
		Process[ProcessNum[PARTS_STOMACH03]].depth = objPlayerDoll.depth + 1;
		Process[ProcessNum[PARTS_STOMACH02]].depth = objPlayerDoll.depth - 1004;
		Process[ProcessNum[PARTS_STOMACH01]].depth = objPlayerDoll.depth - 1005;

		Process[ProcessNum[PARTS_STOMACH01]].visible = true;
		Process[ProcessNum[PARTS_STOMACH02]].visible = true;
		Process[ProcessNum[PARTS_STOMACH03]].visible = true;
		Process[ProcessNum[PARTS_STOMACH04]].visible = true;
		Process[ProcessNum[PARTS_STOMACH05]].visible = true;
		Process[ProcessNum[PARTS_STOMACH06]].visible = true;
		break;
	default : 
		Process[ProcessNum[PARTS_STOMACH01]].visible = false;
		Process[ProcessNum[PARTS_STOMACH02]].visible = false;
		Process[ProcessNum[PARTS_STOMACH03]].visible = false;
		Process[ProcessNum[PARTS_STOMACH04]].visible = false;
		Process[ProcessNum[PARTS_STOMACH05]].visible = false;
		Process[ProcessNum[PARTS_STOMACH06]].visible = false;
		break;
}

/*-----モーション遷移中は実行されない処理-----*/
if(!ChangeMotion){
	switch(MotionNum){
		case STAND :
			/* 相手の方を向く */
			if(objPlayerDoll.x > x) Direction = Right;
			else Direction = Left;

			if(!global.DeathEffectWait){
				if(!air){
					if(random(100)<20){
						MotionChange(BULLET_EMIT,0,2);
					}else if(playerDistance<100 && !air){
						if(random(100)<10){
							MotionChange(MOUTHATTACK_GROUND,0,2);
						}else{
							MotionChange(HARITE,0,2);
						}
						break;
					}else if(200 < playerDistance && playerDistance<450){
						if(random(100)<10)			MotionChange(HIJUMP,0,2);
						else if(objPlayerDoll.air)	MotionChange(MOUTHATTACK_AIR,0,2);
						else				 		MotionChange(MOUTHATTACK_GROUND,0,2);
						break;
					}else if(playerDistance<500){
						MotionChange(JUMP,0,2);
						break;
					}else if(!objPlayerDoll.air){
						if(random(100)<10){
							MotionChange(JUMP,0,2);
						}else{
							MotionChange(HIJUMP,0,2);
						}
						break;
					}
				}
			}
			break;
		/* ------------------------------------------------------------ */
		case JUMP :
			switch(KeyFrmNum){
				case 3 : 
					if(KEYFRAME){
						vspeed = -25;
						JumpAmount = abs(objPlayerDoll.x - x)/500;

						/* ジャンプ時に近くにいるとぶちかまされる */
						with( collision_circle( x,y, 100, objPlayerDoll,0,1) ){
							if(!INV && !BINDED){
								DamageVoiceRandom_Mid();
								scrollFix(10);
								with(other){ playEnemySound(SOUND_SMASH); }

								if( Direction!=other.Direction ) addDamage(20,FLYING_0, 0, 1, FLYING_0, 0, 2);
								else							 addDamage(20,FLYING_1, 0, 1, FLYING_1, 0, 2);
								hspeed = 40*other.Direction*-1;
								vspeed = -30;
								sound_play(sndBulletHit);
								Quake(15,5);
								other.JumpAmount = 1;
							}
						}

					}
					if(place_free(x-JumpAmount*20.0*Direction,y))  x += JumpAmount*20.0*-Direction;
					else{
						if(Direction)	move_contact_solid(180,JumpAmount*20.0);
						else			move_contact_solid(  0,JumpAmount*20.0);
					}
					break;
				case 4 : 
					if(place_free(x-JumpAmount*15.0*Direction,y))  x += JumpAmount*15.0*-Direction;
					else{
						if(Direction)	move_contact_solid(180,JumpAmount*15.0);
						else			move_contact_solid(  0,JumpAmount*15.0);
					}
					if(!place_free(x,y+abs(vspeed)*3+1)){
						MotionChange(TAKEON,0,3);
						playEnemySound(SOUND_TAKEON);
						Quake(30,15);

						/* 着地時に地面にいると足を取られる */
						with( collision_line( x-300,y+100, x+300,y+100, objPlayerDoll,0,1) ){
							if(!INV && !BINDED){
								if(!air){
									DamageVoiceRandom_Low();
									addDamage(0,BALANCE, 0, 2, -1, -1, -1);
								}
							}
						}
	
						/* 着地時に下にいると潰される */
						with( collision_line( x-60,y+100, x+60,y+100, objPlayerDoll,0,1) ){
							if(!INV && !BINDED){
								DamageVoiceRandom_High();
								with(other){ playEnemySound(SOUND_SMASH); }
								if( Direction!=other.Direction ) addDamage(20,DOWN_0, 0, 1, DOWN_0, 0, 2);
								else							 addDamage(20,DOWN_1_FRONT, 2, 1, DOWN_1_FRONT, 2, 2);
								vspeed = other.vspeed;
								Quake(45,30);
							}
						}
					}
					break;
			}
			if(MOTIONEND){
				MotionChange(JUMP,4,5);
			}
			break;
		/* ------------------------------------------------------------ */
		case HIJUMP :
			switch(KeyFrmNum){
				case 6 : 
					flag_hit = false;
					if(KEYFRAME){
						vspeed = -45;
						JumpAmount = abs(objPlayerDoll.x - x)/320;

						/* ジャンプ時に近くにいるとぶちかまされる */
						with( collision_circle( x,y, 100, objPlayerDoll,0,1) ){
							if(!INV && !BINDED){
								DamageVoiceRandom_Mid();
								scrollFix(10);
								with(other){ playEnemySound(SOUND_SMASH); }

								if( Direction!=other.Direction ) addDamage(20,FLYING_0, 0, 1, FLYING_0, 0, 2);
								else							 addDamage(20,FLYING_1, 0, 1, FLYING_1, 0, 2);
								hspeed = 80*other.Direction*-1;
								vspeed = -10;
								sound_play(sndBulletHit);
								Quake(15,5);
								other.JumpAmount = 1;
							}
						}

					}
					if(place_free(x-JumpAmount*20.0*Direction,y))  x += JumpAmount*5.0*-Direction;
					else{
						if(Direction)	move_contact_solid(180,JumpAmount*20.0);
						else			move_contact_solid(  0,JumpAmount*20.0);
					}
					break;
				case 6 : 
				case 7 : 
				case 8 : 
					if(place_free(x-JumpAmount*15.0*Direction,y))  x += JumpAmount*5.0*-Direction;
					else{
						if(Direction)	move_contact_solid(180,JumpAmount*15.0);
						else			move_contact_solid(  0,JumpAmount*15.0);
					}
					if(!place_free(x,y+abs(vspeed)*2+1)){
						flag_hit = false;
						playEnemySound(SOUND_TAKEON);
						/* 着地時に地面にいると足を取られる */
						with( collision_line( x-1000,y+100, x+1000,y+100, objPlayerDoll,0,1) ){
							if(!INV && !BINDED){
								if(!air){
									DamageVoiceRandom_Low();
									addDamage(0,BALANCE, 0, 5, -1, -1, -1);
								}
							}
						}
						/* 着地時に下にいると潰される */
						with( collision_line( x-90,y+100, x+90,y+100, objPlayerDoll,0,1) ){
							if(!INV && !BINDED){
								other.flag_hit = true;
								with(other){ playEnemySound(SOUND_SMASH); }
								if( Direction!=other.Direction ) addDamage(50,DOWN_0, 0, 1, DEATHPRESS_DOWN_0, 0, 2);
								else							 addDamage(50,DOWN_1_FRONT, 2, 1, DEATHPRESS_DOWN_1, 2, 2);
								vspeed = other.vspeed;
								DamageVoiceRandom_High();
								if(isGameOver()) SpecialVoice(V_MUSE,0);
							}
						}
						MotionChange(HIJUMP,9,2);
						Quake(45,30);
					}
					break;
				case 10 : 
					if(KEYFRAME){
						if(global.PlayerHP<=0){
							Fluid(x,y-64,COLOR_BLOOD,40,10,20,0,180,0.3);
							Flash(c_red,0.5,0.02);
							sound_play(sndBone00);
							global.DeathEffectWait = 300;
						}
						if(flag_hit) HitStop(40,null);
					}
					break;
			}
			if(MOTIONEND){
				MotionChange(STAND,0,5);
			}
			break;
		/* ------------------------------------------------------------ */
		case TAKEON :
			if(MOTIONEND){
				MotionChange(STAND,0,1);
			}
			break;
		/* ------------------------------------------------------------ */
		case BULLET_EMIT :
			switch(KeyFrmNum){
				case 5 : 
					if(KEYFRAME){
						sound_play(sndVore03);
						for(i=0;i<10;i+=1){
							if(!instance_exists(FluidBullet[i])){
								/* 弾の作成 */
								Fluid(x-20+i*10,y,c_white,5,15,10,30+10*i,10,0.5);
								FluidBullet[i] = createBullet(x-20+i*5,y);
								FluidBullet[i].vspeed		= -30;
								FluidBullet[i].hspeed		= -20+i*5;
								FluidBullet[i].Picture		= SPRITE_BULLET;
							}
						}
					}
					break;
			}
			if(MOTIONEND){
				MotionChange(STAND,0,1);
			}
			break;
		/* ------------------------------------------------------------ */
		case MOUTHATTACK_GROUND :
			Bullet.visible = true;
			switch(KeyFrmNum){
				case 1 : 
					flag_hit = false;
					break;
				case 3 : 
				case 4 : 
				case 5 : 
					if(!flag_hit){
						VoreCount = 0;
						col = collision_line( Bullet.x,Bullet.y, Bullet.preX,Bullet.preY, objPlayerDoll,0,1)
						with( col ){
							if(!INV && !BINDED){
								DamageVoiceRandom_Mid();
								scrollFix(5);
								with(other){
									other.Direction = -1*Direction;

									flag_hit = true;
									playEnemySound(SOUND_SMASH);

									startBind( col,BIND_ROOT,0,other.BINDED_BOSSFROG_MOUTHATTACK_GROUND_SUCCESS,KeyFrmNum-3,1 );
									MotionChange(MOUTHATTACK_GROUND_SUCCESS,KeyFrmNum,1);
								}
								hspeed = 60*other.Direction*-1;
								vspeed = -15;
								sound_play(sndBulletHit);
								Quake(15,5);
							}
						}
					}
					break;
			}
			if(MOTIONEND){
				MotionChange(STAND,0,1);
			}
			break;
		/* ------------------------------------------------------------ */
		case MOUTHATTACK_GROUND_SUCCESS :
			Bullet.visible = true;
			switch(KeyFrmNum){
				case 9 : 
					FearVoiceRandom_Low();
					Fluid(Bullet.x-96*Direction,Bullet.y,c_white,30,5,10,0,180,0.3);
					if(KEYFRAME){
						Quake(15,5);
						Flash(c_red,0.5,0.01);
						playEnemySound(SOUND_INSIDE);
					}
					break;
			}
			if(MOTIONEND){
				startBind( BindTarget,BIND_ROOT,0,BindTarget.BINDED_BOSSFROG_VORE_FOOT,0,1 );
				MotionChange(VORE_FOOT,0,1);
			}
			break;
		/* ------------------------------------------------------------ */
		case VORE_FOOT :
			addDamage(0.1,-1, -1, -1, -1, -1, -1,);
			if(MOTIONEND){
				Flash(c_red,0.1,0.01);
				Quake(10,5);
				Fluid(x-96*Direction,y,c_white,5,5,10,0,180,0.3);
				VoreSound();

				if(VoreCount > 150){
					if(random(100)<80){
						if(random(100)<50) VoreVoiceRandom_Low();
						else VoreVoiceRandom_Mid();
					}
					global.GameOver = true;
					with(objNana_Gun){
						if(!instance_exists(objGun)){
							new = instance_create(sprite_x[Gun],sprite_y[Gun],objGun);
							new.rot = sprite_angle[Gun];
						}
					}
					startBind( BindTarget,BIND_ROOT,0,BindTarget.BINDED_BOSSFROG_VORE_FOOT_TOINSIDE,0,5);
					MotionChange(VORE_FOOT_TOINSIDE,0,5);
				}else{
					DamageVoiceRandom_Low();
					var keyNum;
					keyNum = round(random(3));
					startBind( BindTarget,BIND_ROOT,0,BindTarget.BINDED_BOSSFROG_VORE_FOOT,keyNum,5);
					MotionChange(VORE_FOOT,keyNum,5);
				}
			}
			break;
		/* ------------------------------------------------------------ */
		case VORE_FOOT_TOINSIDE :
			switch(KeyFrmNum){
				case  3 : 
				case  6 : 
				case  9 : 
				case 13 : 
				case 16 : 
					if(KEYFRAME){
						if(random(100)<80){
							if(random(100)<50) VoreVoiceRandom_Low();
							else VoreVoiceRandom_Mid();
						}
						Quake(10,10);
						Flash(c_red,0.5,0.02);
						VoreSound();
					}
					break;
			}
			addDamage(0.1,-1, -1, -1, -1, -1, -1,);
			if(MOTIONEND){
				VoreVoiceRandom_Mid();
				Flash(c_red,0.1,0.01);
				Quake(10,5);
				Fluid(x-96*Direction,y,c_white,5,5,10,0,180,0.3);
				playEnemySound(SOUND_INSIDE);
				startBind( BindTarget,BIND_ROOT,0,BindTarget.BINDED_BOSSFROG_VORE_FOOT_INSIDE,0,5);
				SpecialVoice(V_HA,4)
				MotionChange(VORE_FOOT_INSIDE,0,5);
			}
			break;
		/* ------------------------------------------------------------ */
		case VORE_FOOT_INSIDE :
			addDamage(0.1,-1, -1, -1, -1, -1, -1,);
			if(MOTIONEND){
				Flash(c_red,0.1,0.01);
				VoreSound();
				var keyNum;
				keyNum = round(random(3));
				if(global.PlayerHP>0){
					DamageVoiceRandom_Low();
					startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,keyNum,5);
					MotionChange(VORE_FOOT_INSIDE,keyNum,5);
				}else{
					startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,0,5);
					MotionChange(VORE_FOOT_INSIDE_FINISH,0,5);
				}
			}
			break;
		/* ------------------------------------------------------------ */
		case VORE_FOOT_INSIDE_FINISH :
			switch(KeyFrmNum){
				case  1 : 
				case  4 : 
					if(KEYFRAME){
						DamageVoiceRandom_Mid();
						Quake(5,5);
						Flash(c_red,0.5,0.02);
						VoreSound();
						startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,0,5);
					}
					break;
				case  7 : 
					if(KEYFRAME){
						VoreVoiceRandom_High();
						Quake(15,5);
						Flash(c_red,0.8,0.01);
						playEnemySound(SOUND_INSIDE);
						startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,0,5);
					}
					break;
			}
			addDamage(0.3,-1, -1, -1, -1, -1, -1,);
			if(MOTIONEND){
				Flash(c_red,0.3,0.01);
				VoreSound();
				var keyNum;
				keyNum = round(random(2));
				startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,keyNum,5);
				MotionChange(VORE_FOOT_INSIDE_FINISH,9+keyNum,5);
			}
			break;
		/* ------------------------------------------------------------ */
		case MOUTHATTACK_AIR :
			Bullet.visible = true;
			switch(KeyFrmNum){
				case 1 : 
					flag_hit = false;
					break;
				case 2 : 
				case 3 : 
				case 4 : 
				case 5 : 
					if(!flag_hit){
						VoreCount = 0;
						col = collision_line( Bullet.x,Bullet.y, Bullet.preX,Bullet.preY, objPlayerDoll,0,1);
						with( col ){
							if(!INV && !BINDED){
								DamageVoiceRandom_Mid();
								scrollFix(50);
								addDamage(5,-1, -1, -1, -1, -1, -1,);
								with(other){
									other.Direction = -1*Direction;

									flag_hit = true;
									playEnemySound(SOUND_SMASH);

									startBind( col,BIND_ROOT,0,other.BINDED_BOSSFROG_MOUTHATTACK_AIR_SUCCESS,KeyFrmNum-2,1 );
									MotionChange(MOUTHATTACK_AIR_SUCCESS,KeyFrmNum,1);
								}
								hspeed = 0*other.Direction*-1;
								vspeed = -15;
								sound_play(sndBulletHit);
								Quake(15,5);
							}
						}
					}
					break;
			}
			if(MOTIONEND){
				MotionChange(STAND,0,1);
			}
			break;
		/* ------------------------------------------------------------ */
		case MOUTHATTACK_AIR_SUCCESS :
			Bullet.visible = true;
			switch(KeyFrmNum){
				case 8 : 
				case 13 : 
					if(KEYFRAME){
						DamageVoiceRandom_High();
						Fluid(Bullet.x,Bullet.y-64,COLOR_BLOOD,10,10,20,0,180,0.3);
						HitStop(30,null);
						Quake(30,30);
						Flash(c_red,0.5,0.02);
						addDamage(10,-1, -1, -1, -1, -1, -1,);
						playEnemySound(SOUND_SMASH);
					}
					break;
				case 19 : 
					Fluid(Bullet.x-96*Direction,Bullet.y,c_white,30,5,10,0,180,0.3);
					if(KEYFRAME){
						VoreVoiceRandom_Mid();
						Quake(15,5);
						Flash(c_red,0.5,0.01);
						playEnemySound(SOUND_INSIDE);
					}
					break;
			}
			if(MOTIONEND){
				startBind( BindTarget,BIND_ROOT,0,BindTarget.BINDED_BOSSFROG_VORE_HEAD,0,1 );
				MotionChange(VORE_HEAD,0,1);
			}
			break;
		/* ------------------------------------------------------------ */
		case VORE_HEAD :
			addDamage(0.1,-1, -1, -1, -1, -1, -1,);
			if(MOTIONEND){
				Flash(c_red,0.1,0.01);
				Quake(10,5);
				Fluid(x-96*Direction,y,c_white,5,5,10,0,180,0.3);
				VoreSound();
				if(random(100)<80){
					if(random(100)<50) VoreVoiceRandom_Low();
					else VoreVoiceRandom_Mid();
				}
				if(VoreCount > 150){
					global.GameOver = true;
					with(objNana_Gun){
						if(!instance_exists(objGun)){
							new = instance_create(sprite_x[Gun],sprite_y[Gun],objGun);
							new.rot = sprite_angle[Gun];
						}
					}
					startBind( BindTarget,BIND_ROOT,0,BindTarget.BINDED_BOSSFROG_VORE_HEAD_TOINSIDE,0,5);
					MotionChange(VORE_HEAD_TOINSIDE,0,5);
				}else{
					var keyNum;
					keyNum = round(random(3));
					startBind( BindTarget,BIND_ROOT,0,BindTarget.BINDED_BOSSFROG_VORE_HEAD,keyNum,5);
					MotionChange(VORE_HEAD,keyNum,5);
				}
			}
			break;
		/* ------------------------------------------------------------ */
		case VORE_HEAD_TOINSIDE :
			switch(KeyFrmNum){
				case  3 : 
				case  6 : 
				case  9 : 
				case 13 : 
				case 16 : 
					if(KEYFRAME){
						if(random(100)<80){
							if(random(100)<50) VoreVoiceRandom_Low();
							else VoreVoiceRandom_Mid();
						}
						Quake(10,10);
						Flash(c_red,0.5,0.02);
						VoreSound();
					}
					break;
			}
			addDamage(0.1,-1, -1, -1, -1, -1, -1,);
			if(MOTIONEND){
				Flash(c_red,0.1,0.01);
				Quake(10,5);
				Fluid(x-96*Direction,y,c_white,5,5,10,0,180,0.3);
				playEnemySound(SOUND_INSIDE);
				if(random(100)<50){
					BindTarget.Direction = Direction;
					startBind( BindTarget,BIND_ROOT,0,BindTarget.BINDED_BOSSFROG_VORE_HEAD_INSIDE2,0,5);
				}else{
					startBind( BindTarget,BIND_ROOT,0,BindTarget.BINDED_BOSSFROG_VORE_HEAD_INSIDE,0,5);
				}
				SpecialVoice(V_HA,4);
				MotionChange(VORE_HEAD_INSIDE,0,5);
			}
			break;
		/* ------------------------------------------------------------ */
		case VORE_HEAD_INSIDE :
			addDamage(0.1,-1, -1, -1, -1, -1, -1,);
			if(MOTIONEND){
				Flash(c_red,0.3,0.01);
				VoreSound();
				var keyNum;
				keyNum = round(random(3));
				if(global.PlayerHP>0){
					DamageVoiceRandom_Low();
					startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,keyNum,5);
					MotionChange(VORE_HEAD_INSIDE,keyNum,5);
				}else{
					startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,0,5);
					MotionChange(VORE_HEAD_INSIDE_FINISH,0,5);
				}
			}
			break;
		/* ------------------------------------------------------------ */
		case VORE_HEAD_INSIDE_FINISH :
			switch(KeyFrmNum){
				case  1 : 
				case  4 : 
					if(KEYFRAME){
						VoreVoiceRandom_Mid();
						Quake(5,5);
						Flash(c_red,0.5,0.02);
						VoreSound();
						startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,0,5);
					}
					break;
				case  7 : 
					if(KEYFRAME){
						VoreVoiceRandom_High();
						Quake(15,5);
						Flash(c_red,0.8,0.01);
						playEnemySound(SOUND_INSIDE);
						startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,0,5);
					}
					break;
			}
			addDamage(0.3,-1, -1, -1, -1, -1, -1,);
			if(MOTIONEND){
				Flash(c_red,0.3,0.01);
				VoreSound();
				var keyNum;
				keyNum = round(random(2));
				startBind( BindTarget,BIND_ROOT,0,BindTarget.MotionNum,keyNum,5);
				MotionChange(VORE_HEAD_INSIDE_FINISH,9+keyNum,5);
			}
			break;
		/* ------------------------------------------------------------ */
		case HARITE :
			switch(KeyFrmNum){
				case 1 : 
					flag_hit = false;
					break;
				case 4 : 
					if(KEYFRAME){
						/* 近くにいると張り手される */
						with( collision_circle( Process[ProcessNum[PARTS_HAND_ABOVE_03]].x,Process[ProcessNum[PARTS_HAND_ABOVE_03]].y, 100, objPlayerDoll,0,1) ){
							if(!INV && !BINDED){
								DamageVoiceRandom_Mid();
								scrollFix(5);
								other.flag_hit = true;
								with(other){ playEnemySound(SOUND_SMASH); }

								if( Direction!=other.Direction ) addDamage(20,FLYING_0, 0, 1, FLYING_0, 0, 2);
								else							 addDamage(20,FLYING_1, 0, 1, FLYING_1, 0, 2);
								hspeed = 60*other.Direction*-1;
								vspeed = -15;
								sound_play(sndBulletHit);
								Quake(15,5);
							}
						}
					}
					break;
			}
			if(MOTIONEND){
				if(!flag_hit)	MotionChange(STAND,0,1);
				else{
					if(random(100)<50)	MotionChange(JUMP,0,1);
					else				MotionChange(HIJUMP,0,1);
				}
			}
			break;
		/* ------------------------------------------------------------ */
		case DEAD_MOTION :
			switch(KeyFrmNum){
				case 1 : 
					playEnemySound(SOUND_DEAD);
					HitStop(40,null);
					break;
			}
			if(MOTIONEND){
				objDisplay.alarm[11] = 60;
				effect_create_above(ef_explosion,x,y,1,COLOR_BLOOD);
				Flash(c_white,0.1,0.05);
				Fluid(x,y,COLOR_BLOOD,35,5,30,0,180,0.5);
				Quake(5,5);
				sound_play(sndFluid);
				instance_destroy();
			}
			break;
		/* ------------------------------------------------------------ */

	}
}

/*-----飛び道具の処理--------------------*/
for(i=0;i<10;i+=1){
	if(instance_exists(FluidBullet[i])){
		with(FluidBullet[i]){
			gravity = 2;
			image_angle = direction;
			image_alpha = 0.4;
			col = checkBlock(x,y);
			if( col ){
				sound_play(sndLotion);
				FluidwithLine(x,y-vspeed,c_white,10,5,10,0,180,0.5,col);
				destroyBullet();
			}
			col = checkPlayer(x,y);
			if( col ){
				with(col){
					if(!INV && !BINDED){
						DamageVoiceRandom_Mid();
						sound_play(sndLotion);
						if(BINDED) addDamage(0, -1, -1, -1, -1, -1, -1);
						else{
							if(air){
								if(Direction){
									if(other.hspeed > 0) addDamage(0,FLYING_0, 0, 1, FLYING_0, 0, 2);
									else				 addDamage(0,FLYING_1, 0, 1, FLYING_1, 0, 2);
								}else{
									if(other.hspeed < 0) addDamage(0,FLYING_0, 0, 1, FLYING_0, 0, 2);
									else				 addDamage(0,FLYING_1, 0, 1, FLYING_1, 0, 2);
								}
							}else{
								speed = 0;
								if(Direction){
									if(other.hspeed > 0){
										if(random(100)<50) addDamage(0,BINDED_FLUID_0, 0, 1, DOWN_1, 0, 2);
										else			   addDamage(0,BINDED_FLUID_1, 0, 1, DOWN_1, 0, 2);
									}else				 addDamage(0,BINDED_FLUID_2, 0, 1, DOWN_1, 0, 2);
								}else{
									if(other.hspeed < 0){
										if(random(100)<50) addDamage(0,BINDED_FLUID_0, 0, 1, DOWN_1, 0, 2);
										else			   addDamage(0,BINDED_FLUID_1, 0, 1, DOWN_1, 0, 2);
									}else				 addDamage(0,BINDED_FLUID_2, 0, 1, DOWN_1, 0, 2);
								}
								HALFBINDED = true;
							}
						}
						sound_play(sndBulletHit);
						Quake(5,5);
						with(other){
							FluidwithLine(x,y-vspeed,c_white,20,5,10,0,180,0.5,col.Process[round(random(col.PARTS_MAX-1))]);
							destroyBullet();
						}
					}
				}
			}
			if(Time > 150) destroyBullet();
		}
	}
}