--永江衣玖用ai
--しなうす式/20220710check

require("function_pun_strage.lua")
head_req_list()

function main()
--シード生成、スレッド生成、base_states設定
	set_seedthreadstates()
--キャラ確認
	char_calling()
--ステージが 核融合炉心部 だと超反応モードに
	set_printsabot()

while true do
--スレッド外初期化
	while_top()

--●どちらかが体力無くなったら待機
	if interbattle_condi()==true then
		interbattle_exe()
--▼開幕行動▼
	elseif kaimaku_condi()==true then
		kaimaku_exe()
--▼移動起き上がり
	elseif my_act==97 or my_act==98 then --基本：画面端より遠ざかる。中央では相手から遠ざか…りたいが、設置技警戒のため、相手側に移動起き上がり。
		movedgetup_exe()

--▼簡易受け身▼：攻撃ないし回避いずれの目的であってもリカバリーポイントは限られるが、そういうことはさておき実装したもの
	elseif recovery_condi()==true then
		recovery_exe()

--▼台風になった時、フラグに従って「緋想の剣」を使用
	elseif y==0 and my_act<=10 and card_check(14) and flag_kishitu==1 then
		print("天候フラグＯＮ　⇒　「緋想の剣」使用");
		card_use(14);

--▼台風▼：近接状態からの強引な状況変更を行う行動。スペカなど使用。
	elseif react_rejecttaihu_condi()==true then
		react_rejecttaihu_exe()

--▼起き攻め▼
	elseif setplay_ongetup_condi()==true then
		setplay_ongetup_exe()
--▼ＨＪＣ▼
	--地上HJC
	elseif hjc_ground_condi()==true then
		hjc_ground_exe()
	--空中HJC
	elseif hjc_air_condi()==true then
		hjc_air_exe()

--▼反応行動
--反応：下段
	elseif 	react_lowattack_condi()==true then
		react_lowattack_exe()
--反応：地対空
	elseif react_g2a_condi()==true then
		react_g2a_exe()
--反応：低空飛翔
	elseif react_lowj6d_condi()==true then
		react_lowj6d_exe()
--上空追いかけ
	elseif ueoikake_condi()==true then
		ueoikake_exe()
--霊撃 or 霊撃札
	elseif reigeki_condi()==true then 
		print("拒否行動：霊撃　⇒　可能ならば使用");
		card_use(0)
		
--▼グレイズ：相手行動に対する反射or一定距離内のオブジェクト感知▼
--モーション反応グレイズ
	elseif
	graze_condition_xrange()==true and
	state_nottrueguard()==true and 
	my_airEX>=1 and 
	my_rei>=0 
	then--近距離時のグレイズ。のさばらせておくと、誤結界の原因となる。ガードの硬直間際ならok
		print("check 1 -> graze act X Range");
		graze_action_xrange()
			
--▼ ガード行動：簡易ガードルーチン▼
--▼ ガード反撃、龍魚の羽衣 13
	elseif hagoromo_1st_condi()==true or hagoromo_condi()==true then
		hagoromo_exe()

--回避結界
	elseif kekkai_condi()==true then
		kekkai_exe()

--▼ 宵越しの銭 12
	elseif yoikoshi_1st_condi()==true or yoikoshi_condi()==true then
		yoikoshi_exe()

--▼汎用中下段ガード
--基本は行動に対して後退入れ込み。下段のみ抽出して反応。通常射撃も同じく下段で受ける(けどメンドウだから今回は省き)。フラグを抜けてくるものは別個に対応
	elseif lowattack_aflags_condi()==true then
		guard_backexpectlowattack_exe()
	elseif overheadattack_aflags_condi()==true then
		guard_backoverheadattack_exe()
--下段判定をフィルタ
	elseif lowattack_flaged_condi()==true then
		guard_backexpectlowattack_exe()
--フラグを抜けてくるものをフィルタ
	elseif lowattack_unflaged_condi()==true then
		guard_backexpectlowattack_exe()
--屈状態では低空昇り攻撃には立てない
	elseif notstand_overhead_upjump_condi()==true then
		guard_backexpectlowattack_exe()
--以下、何もフィルタされなかった場合、立ちガード
	elseif guard_pun_condi()==true then
		guard_backoverheadattack_exe()

--[[▼オブジェが至近距離の場合、着地直前にｈｊを仕込む、タッチ＆ゴーグレイズ
	elseif touchandgo_00_condi() then
		touchandgo_00_exe()
--オブジェが至近距離の場合、ガードの前に、離陸
	elseif touchandgo_01_condi() then
		touchandgo_01_exe()
	elseif touchandgo_02_condi() then
		touchandgo_02_exe()
--]]
--オブジェが至近距離の場合、空中から地上へ飛翔　※咲夜：２D：120.0以上、３D：84.9以上必要
	elseif graze_pun_condi()==true then
		graze_pun_exe()
		
--遠距離時のグレイズ
	elseif graze_farground_condi() then
		graze_farground_exe()
	elseif graze_farair_condi() then
		graze_farair_exe()
		
--特定状況におけるガード
	elseif guard_objgimmick_condi()==true then
		guard_backexpectlowattack_exe()
--オブジェが至近距離の場合、ガード:射撃と打撃を重ねられると、しゃがみガードしてしまう。優先順位の変更が必要
	elseif guard_objclosedis_condi()==true then
		guard_backexpectlowattack_exe()
	
--▼起き上がり直後の行動
	elseif move_soonaftergetup_condi()==true then
		move_soonaftergetup_exe()

--▼コンボ＆固め▼
--汎用として実装したものだが、attack-packのコンボを使うなら不要か
--4A>6C
	elseif my_act==330 and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and ((enemy_act>=50 and enemy_act<=89)or(enemy_act>=143 and enemy_act<=166 and math.random(8)==1)) and is_dir_front==true then
		print("コンボ：4A>6C",my_act);
		key_event2(ACT_C,front);
--A>AA
	elseif my_act==300 and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true then
		print("コンボ：A>AA",my_act);
		key_event(ACT_A);
			
--AA>6C
			elseif my_act==321 and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and ((enemy_act>=50 and enemy_act<=89)or(enemy_act>=143 and enemy_act<=166 and math.random(4)==1)) and is_dir_front==true and my_rei>=200 then
				print("コンボ：AA>6C");
				key_event2(ACT_C,front);
--B>龍魚の一撃
				elseif dis>=400 and dis>=150 and ey==0 and my_act==400 and my_allframe>=11 and ((enemy_act>=50 and enemy_act<=89)or(enemy_act>=143 and enemy_act<=166)) and is_dir_front==true and my_rei>=200 then
					print("コンボ：B>龍魚の一撃");
					key_resetEX();
					key_event(ACT_D);
					lvr236(ACT_B);
--AA>AAA
		elseif my_act==321 and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and ((enemy_act>=50 and enemy_act<=89 and math.random(4)==1)or(enemy_act>=143 and enemy_act<=166)) and is_dir_front==true then
		print("コンボ：AA>AAA",my_act);
			key_event(ACT_A);
--AAA>AAAA
			elseif my_act==322 and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and (enemy_act>=50 and enemy_act<=89) and is_dir_front==true then
				print("コンボ：ＡＡＡＡ");
				key_event(ACT_A);

--遠A>6A
	elseif my_act==301 and dis<=200 and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true and math.random(4)==1 then
		key_resetEX();
		print("遠Ａ＞6A",dis);
		key_event2(ACT_A,front);
--遠A>3A
	elseif my_act==301 and dis<=200 and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true then
		key_resetEX();
		print("遠Ａ＞3A",dis);
		key_event2(ACT_A,d_front);
--2A>3A
	elseif my_act==303 and dis<=200 and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true and math.random(2)==1 then
		key_resetEX();
		print("2A＞3A",dis);
		key_event2(ACT_A,d_front);
--2A>B
	elseif my_act==303 and (enemy_act>=143 and enemy_act<=166) and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true and my_rei>=200 and math.random(4)==1 then
		print("2A>B");
		key_event(ACT_B);
--6A>B
	elseif my_act==302 and (enemy_act>=143 and enemy_act<=166) and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true and my_rei>=200 and math.random(4)==1 then
		print("6A>B");
		key_event(ACT_B);
--3A>B
	elseif my_act==304 and (enemy_act>=143 and enemy_act<=166) and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true and my_rei>=200 and math.random(4)==1 then
		print("6A>2B");
		key_event2(ACT_B,ACT_DOWN);
--6A>6C
	elseif my_act==302 and ((enemy_act>=50 and enemy_act<=89) or (enemy_act>=143 and enemy_act<=166)) and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true and my_rei>=200 then
		print("6A>6C");
		key_event2(ACT_C,front);
--3A>6C
	elseif my_act==304 and ((enemy_act>=50 and enemy_act<=89) or (enemy_act>=143 and enemy_act<=166)) and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true and my_rei>=200 then
		print("6A>6C");
		key_event2(ACT_C,front);
--B>C(画面端用
	elseif my_act==400 and ey==0 and my_allframe>=14 and my_allframe<=25 and (enemy_act>=143 and enemy_act<=166 and enemy_frame+1<=2) and ((enemy_dir==1 and ex>=300) or (enemy_dir==-1 and ex<=980)) and is_dir_front==true and my_rei>=200 then
		print("B>C");
		key_event(ACT_C);
--JA>J2A
	elseif my_act==306 and ey>0 and ((enemy_act>=50 and enemy_act<=89) or (enemy_act>=143 and enemy_act<=166 and math.random(4)==1)) and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true then
		key_resetEX();
		print("ＪＡ＞J2A");
		key_event2(ACT_A,ACT_DOWN);
--JA>J6C
	elseif my_act==306 and (enemy_act>=143 and enemy_act<=166) and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true and (my_air<=1 or (my_air<=2 and weather==10)) then
		key_resetEX();
		print("JA>J6C");
		key_event2(ACT_C,front);
--J6A>J6C
	elseif my_act==307 and (enemy_act>=50 and enemy_act<=89) and my_hitstop<=3 and my_hitstop>=2 and my_hitstop==enemy_hitstop and is_dir_front==true then
		key_resetEX();
		print("JA>J6C");
		key_event2(ACT_C,front);
--]]
--
--▼コンボ
	elseif (enemy_act>=50 and enemy_act<=89) and (my_hitstop>=1 or enemy_hitstop>=1) then
		Combo()
		Combo2()
--▼固め
	elseif 
	(enemy_act>=143 and enemy_act<=166) or 
	(
		(
			(enemy_act<=10 or 
			(enemy_act>=200 and enemy_act<=226) ) and enemy_allframe<=15
		) and 
		(
			(enemy_preact[1]>=143 and enemy_preact[1]<=165) or 
			(enemy_preact[2]>=143 and enemy_preact[2]<=165) or 
			(enemy_preact[3]>=143 and enemy_preact[3]<=165)
		)
	) then
		rock()
--▼バクステに対する超反応射撃
	elseif my_rei>=200 and enemy_act==201 and enemy_allframe<=10 and subs_count>=530 and nega_count ~= 1 then
		if (my_dir==1 and x<1000) or (my_dir==-1 and x>280) and key_hold_C==0 then
			print("バクステに対して６Ｃ");
			key_event2(ACT_C,front);
		else
			print("バクステに対して２Ｂ");
			key_event2(ACT_B,ACT_DOWN);
		end
--▼超ドリルぶっぱ
--スペカ。ぶっぱできるのはドリルのみ。理想としては濃霧。あるいは台風。あるいは川霧発生直前（川霧の次は台風）。
--有利天候時ぶっぱする。霧雨（快晴直前）、曇天、濃霧（花曇直前）、台風（川霧直前）
--ガード時は、５００以内（画面端だと５８０以内）。
--台風時は６７０以内で最速ヒット＝フルヒット。逃げられる可能性を考慮するなら６００以内あたりから撃つのがベストか。予報変更は暗転の中間（暗転中もカウントは進む）なので、発動タイミングに注意。
	elseif 	is_dir_front and dis>300 and y==0 and
				card_check(201)==true and 
				my_spell_more(1500) and 
				not(enemy_act>=6 and enemy_act<=8) and not(enemy_act>=208 and enemy_act<=212) and
				dis<500 and 
				(weather==1 or weather==2 or weather==6 or 
				((weather2==0 or weather2==1 or weather2==5) and weather_time>900 and weather_time<960)) and 
				subs_count>=530 and nega_count ~= 1 then
					print("超ドリルぶっぱ");
					key_resetEX();
					card_use(201);
	elseif 	is_dir_front and dis>300 and y==0 and
				card_check(201)==true and 
				my_spell_more(1500) and 
				not(enemy_act>=6 and enemy_act<=8) and not(enemy_act>=208 and enemy_act<=212) and
				dis<670 and 
				(weather==13 or (weather2==12 and weather_time>900 and weather_time<960)) and 
				subs_count>=530 and nega_count ~= 1 then
					print("超ドリルぶっぱ");
					key_resetEX();
					card_use(201);
--▼龍神の怒り
	elseif card_check(106) and my_rei>=200 and
			dis>=400 and y==0 and ey<=50 and
			not(enemy_act>=97 and enemy_act<=98) and 
			not(enemy_act>=197 and enemy_act<=199) and   
			not(my_act>=545 and my_act<=546) and
			my_rei>=900 and
			key_hold_B==0 and subs_count>=530 and nega_count ~= 1 then
				card_1st(106)
				if my_card==106 then
					print("Ｂ龍神の怒り");
					key_resetEX();
					key_on(ACT_BC);
					wait(2);
					key_on(ACT_B);
					key_hold_B = 1
					B_count = 0
				end
	elseif get_skill_lv(0,6)>=0 and my_rei>=200 and weather~=13 and
			dis>=400 and y==0 and ey<=50 and
			not(enemy_act>=97 and enemy_act<=98) and 
			not(enemy_act>=197 and enemy_act<=199) and   
			not(my_act>=545 and my_act<=546) and
			my_rei>=900 and
			key_hold_B==0 and subs_count>=530 and nega_count ~= 1 then
				print("Ｂ龍神の怒り");
				key_resetEX();
				key_resetEX();
				lvr22h(ACT_B);
				wait(2);
				key_hold_B = 1
				B_count = 0
	elseif get_skill_lv(0,6)>=0 and my_rei>=200 and
			dis>=400 and y==0 and ey<=50 and
			not(enemy_act>=97 and enemy_act<=98) and 
			not(enemy_act>=197 and enemy_act<=199) and  
			not(my_act>=545 and my_act<=546) and
			my_rei>=900 and
			key_hold_C==0 and subs_count>=530 and nega_count ~= 1 then
				print("Ｃ龍神の怒り");
				key_resetEX();
				key_resetEX();
				lvr22h(ACT_C);
				wait(2);
				key_hold_C = 1
				C_count = 0

--]]
		
--▼攻撃▼

--▼spell card▼

--▼cost1

--電符「雷鼓弾」200,600,650,g,a
	--Ground,air
	elseif card_check(200)==true and
	my_spell_more(500) and
	dis<400 and
	dis>200 and
	dis_y<100 and
	--ey<200 and
	my_frontside>400 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("電符「雷鼓弾」");
		for i=1,10 do
			card_use(200);
			yield()
		end

--羽衣「羽衣は時の如く」208,608,g
	--Ground
	elseif card_check(208)==true and
	my_spell_more(500) and
	my_rei<200 and
	dis2>300 and
	y==0 and
	--ey<200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("羽衣「羽衣は時の如く」");
		for i=1,10 do
			card_use(208);
			yield()
		end

--▼cost2

--雷魚「雷雲魚遊泳弾」206,606,g
	--Ground
	elseif card_check(206)==true and
	my_spell_more(1000) and
	dis>300 and
	y==0 and
	ey<200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("雷魚「雷雲魚遊泳弾」");
		for i=1,10 do
			card_use(206);
			yield()
		end

--▼cost3

--魚符「龍魚ドリル」201,601,g
	--Ground
	elseif card_check(201)==true and
	my_spell_more(1500) and
	dis>400 and
	y==0 and
	ey<100 and
	my_frontside>400 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("魚符「龍魚ドリル」");
		for i=1,10 do
			card_use(201);
			yield()
		end

--雷符「エレキテルの龍宮」202,602,g
	--Ground
	elseif card_check(202)==true and
	my_spell_more(1500) and
	dis<150 and
	y==0 and
	ey<200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	--enemy_obj_range_in(150,60)==false and 
	--is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("雷符「エレキテルの龍宮」");
		for i=1,10 do
			card_use(202);
			yield()
		end

--光星「光龍の吐息」203,603,g
	--Ground,Air
	elseif card_check(203)==true and
	my_spell_more(1500) and
	dis<150 and
	y==0 and
	ey>200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("光星「光龍の吐息」");
		for i=1,10 do
			card_use(203);
			yield()
		end

--棘符「雷雲棘魚」209,609,g
	--Ground
	elseif card_check(209)==true and
	my_spell_more(1500) and
	--dis<300 and
	y==0 and
	ey<200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	(enemy_act==97 or enemy_act==98 or (enemy_act>=180 and enemy_act<=199)) and
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("棘符「雷雲棘魚」");
		for i=1,10 do
			card_use(209);
			yield()
		end

--▼cost4

	--羽衣「羽衣は空の如く」207,607,g
	--Ground
	elseif card_check(207)==true and
	my_spell_more(2000) and
	dis<150 and
	y==0 and
	ey<100 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	--enemy_obj_range_in(150,60)==false and 
	--is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("羽衣「羽衣は空の如く」");
		for i=1,10 do
			card_use(207);
			yield()
		end

--珠符「五爪龍の珠」211,611,661,g,a
	--Ground
	elseif card_check(211)==true and
	my_spell_more(2000) and
	dis>400 and
	dis_y<=200 and
	--ey<100 and
	my_frontside>600 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	--is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("珠符「五爪龍の珠」");
		for i=1,10 do
			card_use(211);
			yield()
		end

--▼cost5

--龍魚「龍宮の使い遊泳弾」 210,610,660,g,a
	--Ground
	elseif card_check(210)==true and
	my_spell_more(2500) and
	dis<300 and
	dis_y>=100 and
	y<ey and
	--ey<100 and
	my_frontside>300 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	--is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("龍魚「龍宮の使い遊泳弾」");
		for i=1,10 do
			card_use(210);
			yield()
		end

--▼skill card▼

--▼スキル236

--龍魚の一撃,100,500,g

	elseif get_skill_lv(0,0)>=0 and my_rei>=400 and 
	dis<300 and
	y==0 and
	ey<50 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍魚の一撃");
		lvr236(ACT_B);
		
	elseif get_skill_lv(0,0)>=0 and my_rei>=400 and 
	dis>150 and
	dis<450 and
	y==0 and
	ey<50 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍魚の一撃");
		lvr236(ACT_C);
		
	elseif card_check(100)==true and my_rei>=400 and
	dis<300 and
	y==0 and
	ey<50 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍魚の一撃");
		for i=1,10 do
			card_use(100);
			yield()
		end
	
--龍神の一撃,104,505,g

	elseif get_skill_lv(0,4)>=0 and my_rei>=400 and 
	dis>150 and
	dis<450 and
	y==0 and
	ey<200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の一撃");
		lvr236(ACT_B);
		
	elseif get_skill_lv(0,4)>=0 and my_rei>=400 and 
	dis>150 and
	dis<450 and
	y==0 and
	ey>200 and
	ey<500 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の一撃");
		lvr236(ACT_C);
		
	elseif card_check(104)==true and my_rei>=400 and
	dis>150 and
	dis<450 and
	y==0 and
	ey<200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の一撃");
		for i=1,10 do
			card_use(104);
			yield()
		end

	
--水得の龍魚,108,510,g

	elseif get_skill_lv(0,8)>=0 and my_rei>=400 and 
	dis<100 and
	y==0 and
	ey<50 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("水得の龍魚");
		lvr236(ACT_B);
		
	elseif get_skill_lv(0,8)>=0 and my_rei>=400 and 
	dis<100 and
	y==0 and
	ey<50 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("水得の龍魚");
		lvr236(ACT_C);
		
	elseif card_check(108)==true and my_rei>=400 and
	dis<100 and
	y==0 and
	ey<50 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("水得の龍魚");
		for i=1,10 do
			card_use(108);
			yield()
		end
	
--▼スキル623

--羽衣は水の如く,101,520,g

	elseif get_skill_lv(0,1)>=0 and my_rei>=400 and 
	dis<350 and
	y==0 and
	ey<250 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	--enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("羽衣は水の如く");
		lvr623(ACT_B);
		
	elseif get_skill_lv(0,1)>=0 and my_rei>=400 and 
	dis<350 and
	y==0 and
	ey<250 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	--enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("羽衣は水の如く");
		lvr623(ACT_C);
		
	elseif card_check(101)==true and my_rei>=400 and
	dis<350 and
	y==0 and
	ey<250 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	--enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("羽衣は水の如く");
		for i=1,10 do
			card_use(101);
			yield()
		end
	
--羽衣は風の如く,105,525,g,a
	--g,a
	elseif get_skill_lv(0,5)>=0 and my_rei>=400 and 
	--dis>0 and
	--y==0 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==true and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("羽衣は風の如く");
		lvr623(ACT_B);
		
	elseif get_skill_lv(0,5)>=0 and my_rei>=400 and 
	--dis>0 and
	--y==0 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==true and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("羽衣は風の如く");
		lvr623(ACT_C);
		
	elseif card_check(105)==true and my_rei>=400 and
	--dis>0 and
	--y==0 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==true and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("羽衣は風の如く");
		for i=1,10 do
			card_use(105);
			yield()
		end
	
--天女の一撃,109,530,g

	elseif get_skill_lv(0,9)>=0 and my_rei>=400 and 
	dis>200 and
	dis<400 and
	y==0 and
	ey>50 and
	ey<250 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("天女の一撃");
		lvr623(ACT_B);
		
	elseif get_skill_lv(0,9)>=0 and my_rei>=400 and 
	dis>200 and
	dis<400 and
	y==0 and
	ey>50 and
	ey<250 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("天女の一撃");
		lvr623(ACT_C);
		
	elseif card_check(109)==true and my_rei>=400 and
	dis>200 and
	dis<400 and
	y==0 and
	ey>50 and
	ey<250 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("天女の一撃");
		for i=1,10 do
			card_use(109);
			yield()
		end

--▼スキル22

	--龍魚の怒り,102,540,g
	--lv4
	elseif get_skill_lv(0,2)>=4 and my_rei>=400 and 
	--dis>100 and
	dis<250 and
	y==0 and
	ey<400 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	--is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍魚の怒り");
		lvr22(ACT_B);
		
	elseif get_skill_lv(0,2)>=0 and my_rei>=400 and 
	dis>100 and
	dis<250 and
	y==0 and
	ey<400 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	--is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍魚の怒り");
		lvr22(ACT_B);
		
	elseif get_skill_lv(0,2)>=0 and my_rei>=400 and 
	dis>100 and
	dis<250 and
	y==0 and
	ey<400 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	--is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍魚の怒り");
		lvr22(ACT_C);
		
	elseif card_check(102)==true and my_rei>=400 and
	dis>100 and
	dis<250 and
	y==0 and
	ey<400 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	--is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍魚の怒り");
		for i=1,10 do
			card_use(102);
			yield()
		end

	
--龍神の怒り,106,545,g

	elseif get_skill_lv(0,6)>=0 and my_rei>=400 and 
	dis>400 and
	y==0 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の怒り");
		lvr22(ACT_B);
		
	elseif get_skill_lv(0,6)>=0 and my_rei>=400 and 
	dis>300 and
	dis<600 and
	y==0 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の怒り");
		lvr22(ACT_C);
		
	elseif card_check(106)==true and my_rei>=400 and
	dis>400 and
	y==0 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の怒り");
		for i=1,10 do
			card_use(106);
			yield()
		end
	
--龍神の髭,110,550,g

	elseif get_skill_lv(0,10)>=0 and my_rei>=400 and 
	dis>200 and
	y==0 and
	ey>0 and
	ey<dis/2 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の髭");
		lvr22(ACT_B);
		if math.random(3)==1 and ey<200 then
			key_on(ACT_DOWN)
		elseif math.random(3)==2 and ey>200 then
			key_on(ACT_UP)
		end
		wait(40)
		
	elseif get_skill_lv(0,10)>=0 and my_rei>=400 and 
	dis>400 and
	y==0 and
	ey>0 and
	ey<dis/2 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の髭");
		lvr22(ACT_C);
		if math.random(3)==1 and ey<200 then
			key_on(ACT_DOWN)
		elseif math.random(3)==2 and ey>200 then
			key_on(ACT_UP)
		end
		wait(70)
		
	elseif card_check(110)==true and my_rei>=400 and
	dis>200 and
	y==0 and
	ey>0 and
	ey<dis/2 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の髭");
		for i=1,10 do
			card_use(110);
			yield()
		end
		if math.random(3)==1 and ey<200 then
			key_on(ACT_DOWN)
		elseif math.random(3)==2 and ey>200 then
			key_on(ACT_UP)
		end
		wait(40)

--▼スキル214

	--静電誘導弾,103,560,g,a
	--B:g,a
	elseif get_skill_lv(0,3)>=0 and my_rei>=400 and 
	dis>400 and
	dis_y<50 and
	--y==0 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("静電誘導弾");
		lvr214(ACT_B);
	--C:g
	elseif get_skill_lv(0,3)>=0 and my_rei>=400 and 
	dis>350 and
	y==0 and
	ey>dis-50 and
	ey<dis+50 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("静電誘導弾");
		lvr214(ACT_C);
	--C:a
	elseif get_skill_lv(0,3)>=0 and my_rei>=400 and 
	dis>350 and
	y==0 and
	ey-y>-dis-50 and
	ey-y<-dis+50 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("静電誘導弾");
		lvr214(ACT_C);
		
	elseif card_check(103)==true and my_rei>=400 and
	dis>400 and
	dis_y<50 and
	--y==0 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("静電誘導弾");
		for i=1,10 do
			card_use(103);
			yield()
		end
	
--龍神の稲光り,107,565,g,a
	--g,a
	elseif get_skill_lv(0,7)>=0 and my_rei>=400 and 
	dis2>350 and
	--y==0 and
	ey-y>-dis/2 and
	ey-y<dis+200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の稲光りB");
		lvr214(ACT_B);
		
	elseif get_skill_lv(0,7)>=0 and my_rei>=400 and 
	dis2>350 and
	--y==0 and
	ey-y>-dis/2 and
	ey-y<dis+200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の稲光りC");
		lvr214(ACT_C);
		
	elseif card_check(107)==true and my_rei>=400 and
	dis2>350 and
	--y==0 and
	ey-y>-dis/2 and
	ey-y<dis+200 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍神の稲光りB");
		for i=1,10 do
			card_use(107);
			yield()
		end
	
--龍の眼,111,570,g,a
	--g,a
	elseif get_skill_lv(0,11)>=0 and my_rei>=400 and 
	dis>400 and
	y<250 and
	ey<300 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍の眼");
		lvr214(ACT_B);
		
	elseif get_skill_lv(0,11)>=0 and my_rei>=400 and 
	dis>400 and
	y<250 and
	ey<300 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍の眼");
		lvr214(ACT_C);
		
	elseif card_check(111)==true and my_rei>=400 and
	dis>400 and
	y<250 and
	ey<300 and
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(160)==1 then
		print("龍の眼");
		for i=1,10 do
			card_use(111);
			yield()
		end
--]]

--▼空中打撃▼
--J8A:309,x20-107,y169-312,12-27f/+0-37.8x/+0-126y/,1-12f/(慣性),13f/xs4.5(初速:抵抗0.3)/ys15(初速:抵抗1.0)
	elseif	y>0 and 
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	--is_dir_front==true and
	subs_count>=530 and nega_count ~= 1 and math.random(4)==1 and
	(y+my_yspeed*14+(14*(13*m_gs))/2)>0 	and
		(
			(
			 			(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	>=	20	-30 and
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	<=	107	+30 and
										(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		>=	169	-160 and
										(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		<=	239	-40
			) or
			(
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	>=	40	-30 and
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	<=	99	+30 and
										(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		>=	225	-160 and
										(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		<=	280	-40
			) or
			(
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	>=	57	-30 and
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	<=	96	+30 and
										(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		>=	268	-160 and
										(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		<=	312	-40
			)
		) then
					print("J8A");
					key_event2(ACT_A,ACT_UP)
--J2A:308,x89-293,y-11-95,13-14f/v*1(慣性),
	elseif	y>0 and 
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	--is_dir_front==true and
	subs_count>=530 and nega_count ~= 1 and math.random(2)==1 and
	(y+my_yspeed*1+(1*(0*m_gs))/2)>0 	and
		(
			(
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*16)			-	(ex+(enemy_xspeedEX*enemy_dir)*16)	)	>=	89	-30 and
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*16)			-	(ex+(enemy_xspeedEX*enemy_dir)*16)	)	<=	172	+30 and
										(ey+enemy_yspeed*16+(16*(15*e_gs))/2)	-	(y+my_yspeed*16+(16*(15*m_gs))/2)		>=	46	-160 and
										(ey+enemy_yspeed*16+(16*(15*e_gs))/2)	-	(y+my_yspeed*16+(16*(15*m_gs))/2)		<=	95	-40
			) or
			(
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*16)			-	(ex+(enemy_xspeedEX*enemy_dir)*16) )	>=	138	-30 and
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*16)			-	(ex+(enemy_xspeedEX*enemy_dir)*16) )	<=	235	+30 and
										(ey+enemy_yspeed*16+(16*(15*e_gs))/2)	-	(y+my_yspeed*16+(16*(15*m_gs))/2)		>=	19	-160 and
										(ey+enemy_yspeed*16+(16*(15*e_gs))/2)	-	(y+my_yspeed*16+(16*(15*m_gs))/2)		<=	76	-40
			) or
			(
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*16)			-	(ex+(enemy_xspeedEX*enemy_dir)*16) )	>=	208	-30 and
						(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*16)			-	(ex+(enemy_xspeedEX*enemy_dir)*16) )	<=	293	+30 and
										(ey+enemy_yspeed*16+(16*(15*e_gs))/2)	-	(y+my_yspeed*16+(16*(15*m_gs))/2)		>=	-11	-160 and
										(ey+enemy_yspeed*16+(16*(15*e_gs))/2)	-	(y+my_yspeed*16+(16*(15*m_gs))/2)		<=	36	-40
			)
		) then
					print("J2A");
					key_event2(ACT_A,ACT_DOWN);
--J6A:307,x25-337,y144-244,13-19f/xs3(等速)/ys2(初速:gs0.3)/+33-51x/+38.5-44.2y,1-2F(慣性),3-nF/xs3(等速)/+3-n*3,3-nF/ys5(初速:gs0.3)/+5-38.5-44.2-0
	elseif	y>0 and 
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	--is_dir_front==true and
	subs_count>=530 and nega_count ~= 1 and math.random(8)==1 and
	(y+my_yspeed*5+(5*(4*m_gs))/2)>0 	and
		(
			(
				(my_dir*-1)*(	(x+((my_xspeedEX*my_dir)*5)+((3*my_dir)*11))	-	(ex+(enemy_xspeedEX*enemy_dir)*16)	)						>=	25	-30 and
				(my_dir*-1)*(	(x+((my_xspeedEX*my_dir)*5)+((3*my_dir)*11))	-	(ex+(enemy_xspeedEX*enemy_dir)*16)	)						<=	142	+30 and
								(ey+enemy_yspeed*16+(16*(15*e_gs))/2)			-	(y+my_yspeed*5+(5*(4*e_gs))/2+5*11+(11*(10*(-0.3)))/2)	>=	144	-160 and
								(ey+enemy_yspeed*16+(16*(15*e_gs))/2)			-	(y+my_yspeed*5+(5*(4*e_gs))/2+5*11+(11*(10*(-0.3)))/2)	<=	194	-40
			) or
			(
				(my_dir*-1)*(	(x+((my_xspeedEX*my_dir)*5)+((3*my_dir)*11))	-	(ex+(enemy_xspeedEX*enemy_dir)*16)	)						>=	97	-30 and
				(my_dir*-1)*(	(x+((my_xspeedEX*my_dir)*5)+((3*my_dir)*11))	-	(ex+(enemy_xspeedEX*enemy_dir)*16)	)						<=	266	+30 and
								(ey+enemy_yspeed*16+(16*(15*e_gs))/2)			-	(y+my_yspeed*5+(5*(4*e_gs))/2+5*11+(11*(10*(-0.3)))/2)	>=	167	-160 and
								(ey+enemy_yspeed*16+(16*(15*e_gs))/2)			-	(y+my_yspeed*5+(5*(4*e_gs))/2+5*11+(11*(10*(-0.3)))/2)	<=	224	-40
			) or
			(
				(my_dir*-1)*(	(x+((my_xspeedEX*my_dir)*5)+((3*my_dir)*11))	-	(ex+(enemy_xspeedEX*enemy_dir)*16) )						>=	198	-30 and
				(my_dir*-1)*(	(x+((my_xspeedEX*my_dir)*5)+((3*my_dir)*11))	-	(ex+(enemy_xspeedEX*enemy_dir)*16) )						<=	337	+30 and
								(ey+enemy_yspeed*16+(16*(15*e_gs))/2)			-	(y+my_yspeed*5+(5*(4*e_gs))/2+5*11+(11*(10*(-0.3)))/2)	>=	207	-160 and
								(ey+enemy_yspeed*16+(16*(15*e_gs))/2)			-	(y+my_yspeed*5+(5*(4*e_gs))/2+5*11+(11*(10*(-0.3)))/2)	<=	244	-40
			)
		) then
					print("J6A");
					key_event2(ACT_A,front);
--J5A:306,x29-188,y46-157,13-14f/v*1(慣性)
	elseif	y>0 and 
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	--is_dir_front==true and
	subs_count>=530 and nega_count ~= 1 and math.random(1)==1 and
	(y+my_yspeed*15+(15*(14*m_gs))/2)>0 	and
		(
			(
				(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	>=	113	-30 and
				(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	<=	188	+30 and
								(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		>=	46	-160 and
								(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		<=	108	-40
			) or
			(
				(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	>=	72	-30 and
				(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	<=	150	+30 and
								(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		>=	73	-160 and
								(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		<=	130	-40
			) or
			(
				(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	>=	29	-30 and
				(my_dir*-1)*(	(x+(my_xspeedEX*my_dir)*15)			-	(ex+(enemy_xspeedEX*enemy_dir)*15)	)	<=	103	+30 and
								(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		>=	101	-160 and
								(ey+enemy_yspeed*15+(15*(14*e_gs))/2)	-	(y+my_yspeed*15+(15*(14*m_gs))/2)		<=	157	-40
			)
		) then
			print("J5A");
			key_event(ACT_A);
--▼対空行動

--j/hj攻撃不能時間:6f
--J5A:306,x29-188,y46-157,13-14f/v*1(慣性)
--8j	:x 0.0,y12.0(初速),gs0.35,1-5F(地上),1-5-6-40-75f,0-0-0-0-0x,0-0-12-211.75-0y
--9/7j	:x 3.5,y11.0(初速),gs0.35,1-5F(地上),1-5-6-37-69f,0-0-3.5-112-224x,0-0-11-178.4-0y
--8hj	:208,x 0.0,y18.5(初速),gs0.50,1-5F(地上),1-5-6-42-80f,0-0-0-0-0x,0-0-18.5-351.5-0y
--9/7hj	:20x,x 7.0,y15.0(初速),gs0.50,1-5F(地上),1-5-6-35-66f,0-0-7-210-427x,0-0-15-232.5-0y
--D8hj	:211,x 2.0,y17.5(初速),gs0.50,b0:1-5F(地上,x8.5),b1:6-76F(hj,xs 2.0),x+76-146-218,y+18-315(6-40F)
--D9hj	:212,x 8.0,y15.0(初速),gs0.50,b0:1-5F(地上,x8.5),b1:6-64F(hj,xs 8.0),x+84-316-556,y+15-232(6-34F)

--対空9HJ>J5A:
	elseif y==0 and 
	(ey>0 or --空中か
		(
			(enemy_char~=19 and (enemy_act==0 or (enemy_act>=5 and enemy_act<=10) or (enemy_act>=150 and enemy_act<=153) or (enemy_act>=159 and enemy_act<=162)) --諏訪子以外の立ち状態か
			) or
			(enemy_char==19 and ((enemy_act>=1 and enemy_act<=3) or (enemy_act>=154 and enemy_act<=157) or (enemy_act>=163 and enemy_act<=166)) --諏訪子のしゃがみ状態
			)
		)
	) and 
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and
	subs_count>=530 and nega_count ~= 1 and math.random(1)==1 and
		(
			(
				(my_dir*-1)*(	(x+18*14)								-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	>=	113	-30 and
				(my_dir*-1)*(	(x+18*14)								-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	<=	188	+30 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+15*14+(14*(13*(-0.5)))/2)			>=	52	-160 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+15*14+(14*(13*(-0.5)))/2)			<=	109	-40
			) or
			(
				(my_dir*-1)*(	(x+18*14)								-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	>=	72	-30 and
				(my_dir*-1)*(	(x+18*14)								-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	<=	150	+30 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+15*14+(14*(13*(-0.5)))/2)			>=	76	-160 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+15*14+(14*(13*(-0.5)))/2)			<=	131	-40
			) or
			(
				(my_dir*-1)*(	(x+18*14)								-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	>=	29	-30 and
				(my_dir*-1)*(	(x+18*14)								-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	<=	103	+30 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+15*14+(14*(13*(-0.5)))/2)			>=	101	-160 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+15*14+(14*(13*(-0.5)))/2)			<=	158	-40
			)
		) then
					print("AA:9HJ>J5A");
					key_event2(ACT_D,u_front)
					wait(3)
					key_event(ACT_A);
					wait(3)
					
--対空8HJ>J5A:
	elseif y==0 and 
	(ey>0 or --空中か
		(
			(enemy_char~=19 and (enemy_act==0 or (enemy_act>=5 and enemy_act<=10) or (enemy_act>=150 and enemy_act<=153) or (enemy_act>=159 and enemy_act<=162)) --諏訪子以外の立ち状態か
			) or
			(enemy_char==19 and ((enemy_act>=1 and enemy_act<=3) or (enemy_act>=154 and enemy_act<=157) or (enemy_act>=163 and enemy_act<=166)) --諏訪子のしゃがみ状態
			)
		)
	) and 
	not(my_act>=50 and my_act<180) and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and
	subs_count>=530 and nega_count ~= 1 and math.random(1)==1 and
		(
			(
				(my_dir*-1)*(	(x)										-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	>=	113	-30 and
				(my_dir*-1)*(	(x)										-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	<=	188	+30 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+18.5*14+(14*(13*(-0.5)))/2)		>=	52	-160 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+18.5*14+(14*(13*(-0.5)))/2)		<=	109	-40
			) or
			(
				(my_dir*-1)*(	(x)										-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	>=	72	-30 and
				(my_dir*-1)*(	(x)										-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	<=	150	+30 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+18.5*14+(14*(13*(-0.5)))/2)		>=	76	-160 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+18.5*14+(14*(13*(-0.5)))/2)		<=	131	-40
			) or
			(
				(my_dir*-1)*(	(x)										-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	>=	29	-30 and
				(my_dir*-1)*(	(x)										-	(ex+(enemy_xspeedEX*enemy_dir)*20)	)	<=	103	+30 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+18.5*14+(14*(13*(-0.5)))/2)		>=	101	-160 and
								(ey+enemy_yspeed*20+(20*(19*e_gs))/2)	-	(y+18.5*14+(14*(13*(-0.5)))/2)		<=	158	-40
			)
		) then
					print("AA:9HJ>J5A");
					key_event2(ACT_D,u_front)
					wait(3)
					key_event(ACT_A);
					wait(3)

		
--▼通常技/Arts▼
--霊撃:-155-150,295
	
--DC:418,x45-234,y12-126,27-40f/+212.5-310,1-5f/xs10.5(初速:抵抗0.5),6-40f/xs7.5(等速)/+310x,6-40f/yx5(初速:gs0.3)/0-5-44.2-40.7-0y
	elseif dis<=234+310+30+(enemy_xspeedEX)*42 and
	dis>310 and
	y==0 and 
	(ey+enemy_yspeed*42+(42*(41*e_gs))/2)<=126-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("DC");
		key_on(frontEX());
		key_event2(ACT_D,ACT_C);
--DB:408,x20-251,y54-221,19-28f/+237.5-316.2,1-19f/xs12.5(等速),19-35f/xs12.5(初速:抵抗0.75)/+335.5x
	elseif dis<=251+316+30+(enemy_xspeedEX)*30 and
	dis>335 and
	y==0 and 
	(ey+enemy_yspeed*30+(30*(29*e_gs))/2)<=221-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("DB");
		key_on(frontEX());
		key_event2(ACT_D,ACT_B);
--DA:305,x37-207,y33-159,16-17f/+133-139.5,1-13f/xs8.5(等速),13-29f/xs8.5(初速:抵抗0.5)/+178.5x
	elseif dis<=207+133+30+(enemy_xspeedEX)*18 and
	dis>178 and
	y==0 and 
	(ey+enemy_yspeed*18+(18*(17*e_gs))/2)<=159-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("DA");
		key_on(frontEX());
		key_event2(ACT_D,ACT_A);
--

--▼射撃のデータ取りは未実施
--J1Ch :412(801,225),(-80-80,39-199),(0-65,0-20),v15,1-49F(初速1/5:慣性)
--J2Ch :412(801,225),(-80-80,39-199),(0-65,0-20),v15,1-49F(初速1/5:慣性)

--J1C :412(801,225),(-80-80,39-199),(0-65,0-20),v15,1-49F(初速1/5:慣性)
--J2C :412(801,225),(-80-80,39-199),(0-65,0-20),v15,1-49F(初速1/5:慣性)

--2C  :412(801,225),(-80-80,20-180),(0-65,0-20),v15

--J6Ch
--6Ch

--J6C
--6C
	elseif my_rfunc>0.65 and
	dis>280 and
	--y>0 and
	ey-y>-0.2*(ex-x+500)*my_dir+125 and 
	ey-y<0.2*(ex-x+500)*my_dir+125 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(32)==1 then
		print("6C/J6C");
		key_event2(ACT_C,front);

--J5Ch:
--5Ch:

--J5C :414(801,225),(148-189,84-171),(0-65,0-20),v18-22,1-59F(初速1/5:慣性)
--5C  :410(801,225),(148-189,81-168),(0-65,0-20),v18-22
	elseif my_rfunc>0.65 and
	dis>280 and
	--y>0 and
	ey-y>-0.2*(ex-x+500)*my_dir+125 and 
	ey-y<0.2*(ex-x+500)*my_dir+125 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(32)==1 then
		print("5C/J5C");
		key_event(ACT_C);

--2Bh:
--2B  :402(800,208-209-210),(82.4,62.4),(28-61,-30-61),v17.5
	elseif my_rfunc>0.65 and
	dis>280 and
	y==0 and
	ey-y>-0.5*(ex-x-83)*my_dir+63 and 
	ey-y<0.5*(ex-x-83)*my_dir+63 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(16)==1 then
		print("2B");
		key_event2(ACT_B,ACT_DOWN);
		
--J5Bh:405(800,208-209-210),(87.5,110),(0-89,0-42),v17.5,1-67F(初速1/5:慣性)
--5Bh :401(800,208-209-210),(67.5,110),(0-89,0-42),v17.5,a0.01
	elseif my_rfunc>0.65 and
	dis>280 and
	--y==0 and
	ey-y>-0.5*(ex-x-68)*my_dir+110 and 
	ey-y<0.5*(ex-x-68)*my_dir+110 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(64)==1 then
		print("6Bh/J6Bh");
		key_on(ACT_B)
		key_on(frontEX());
		wait(10+2)
		
--J5B :404(800,426-427-428-429),(85,110),(-30-30,-30-30),v15,1-37F(初速1/5:慣性)
--5B  :400(800,426-427-428-429),(65,110),(-30-30,-30-30),v15
	elseif my_rfunc>0.65 and
	dis>280 and
	--y==0 and
	ey-y>-0.5*(ex-x-65)*my_dir+110 and 
	ey-y<0.5*(ex-x-65)*my_dir+110 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and 
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(16)==1 then
		print("5B/J5B");
		key_event(ACT_B);
--▲データ取り未実施

--3Ah(12):304(b1),x20-186,y0-60,32-37f/+78-115.5,28-29f/xs25(初速:抵抗0.5),30-49f/xs10(初速:抵抗0.5)/+154.5
	elseif dis<=186+78+30+(enemy_xspeedEX)*34 and
	y==0 and 
	(ey+enemy_yspeed*34+(34*(33*e_gs))/2)<=60-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(32)==1 then
		print("3AHr");
		key_on(ACT_A)
		key_on(d_front);
		wait(12+2)
		
--3A:304,x20-186,y0-60,17-22f/+50.5-75.5x,13-14f/xs15(初速:抵抗0.5),15-29f/xs7.5(初速:抵抗0.5)/+89.5x
	elseif dis<=186+50+30+(enemy_xspeedEX)*19 and
	y==0 and 
	(ey+enemy_yspeed*19+(19*(18*e_gs))/2)<=60-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(16)==1 then
		print("3A");
		key_event2(ACT_A,d_front);
		
--6Ah(12):302(b1),x37-230,y80-179,31-32f/+54-63x,27f/xs12(初速:抵抗0.6)/+126x
	elseif dis<=230+54+30+(enemy_xspeedEX)*33 and
	y==0 and 
	(ey+enemy_yspeed*33+(33*(32*e_gs))/2)<=179-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(32)==1 then
		print("6AHr");
		key_on(ACT_A)
		key_on(frontEX());
		wait(12+2)
		
--6A:302,x38-187,y80-167,16-17f/+44-??x,12f/xs10(初速:抵抗0.6)/+???x
	elseif dis<=187+44+30+(enemy_xspeedEX)*18 and
	y==0 and 
	(ey+enemy_yspeed*18+(18*(17*e_gs))/2)<=167-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(16)==1 then
		print("6A");
		key_event2(ACT_A,front);

--2A:303,x11-162/31-184,y46-105/42-96,12-14f/15-18f,+0
	elseif dis<=162+30+(enemy_xspeedEX)*14 and
	y==0 and 
	(ey+enemy_yspeed*10+(10*(9*e_gs))/2)<=105-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(2)==1 then
		print("2A");
		key_event2(ACT_A,ACT_DOWN);
	elseif dis<=184+30+(enemy_xspeedEX)*20 and
	y==0 and 
	(ey+enemy_yspeed*10+(10*(9*e_gs))/2)<=96-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(2)==1 then
		print("2A");
		key_event2(ACT_A,ACT_DOWN);

--L5A(>=120):301,x37-207,y33-159,16-18f/+70-85.8x,16f:x10(初速,抵抗1.5)/+98.5x
	elseif dis>120 and 
	dis<=207+70+30+(enemy_xspeedEX)*18 and
	y==0 and 
	(ey+enemy_yspeed*18+(18*(18*e_gs))/2)<=159-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(1)==1 then
		print("L5A");
		key_event(ACT_A);
		
--AAAA	:323,83-251,54-221,16-35,12-14f/xs15,15f/xs12,+57
--AAA	:322,17-245,19-179,9-12,+0
--AA	:321,19-230,80-259,14-15,+0

--S5A(<120):300,x20-124,y100-152,8-9f
	elseif dis<120 and 
	dis<=124+30+(enemy_xspeedEX)*11 and
	y==0 and 
	(ey+enemy_yspeed*11+(11*(10*e_gs))/2)<=152-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(1)==1 then
		print("S5A");
		key_event(ACT_A);

--4A:330,20-124,100-152,8-9
	elseif --dis<=120 and 
	dis<=124+30+(enemy_xspeedEX)*11 and
	y==0 and 
	(ey+enemy_yspeed*11+(11*(10*e_gs))/2)<=152-40 and
	not(my_act>=50 and my_act<180) and my_act~=200 and my_act<600 and 
	get_fflags(0,32)==true and
	get_fflags(0,8)==false and get_fflags(1,8)==false and 
	enemy_obj_range_in(150,60)==false and
	is_dir_front==true and 
	subs_count>=530 and nega_count ~= 1 and math.random(1)==1 then
		print("4A");
		key_event2(ACT_A,back);
		
--]]
--立	:y 1-203
--屈	:y 1-130
--8j	:x 0.0,y12.0(初速),gs0.35,1-5F(地上),1-5-6-40-75f,0-0-0-0-0x,0-0-12-211.75-0y
--9/7j	:x 3.5,y11.0(初速),gs0.35,1-5F(地上),1-5-6-37-69f,0-0-3.5-112-224x,0-0-11-178.4-0y
--8hj	:208,x 0.0,y18.5(初速),gs0.50,1-5F(地上),1-5-6-42-80f,0-0-0-0-0x,0-0-18.5-351.5-0y
--9/7hj	:20x,x 7.0,y15.0(初速),gs0.50,1-5F(地上),1-5-6-35-66f,0-0-7-210-427x,0-0-15-232.5-0y
--D8hj	:211,x 2.0,y17.5(初速),gs0.50,b0:1-5F(地上,x8.5),b1:6-76F(hj,xs 2.0),x+76-146-218,y+18-315(6-40F)
--D9hj	:212,x 8.0,y15.0(初速),gs0.50,b0:1-5F(地上,x8.5),b1:6-64F(hj,xs 8.0),x+84-316-556,y+15-232(6-34F)
--6		:1F6,2F~2.5
--4		:1F5,2F~3
--飛	:y ,v10,1-6(溜め,v0)/7-10(発進,v10)/11-15(飛行,v10)/16-(落下:gs0.6,慣性:vと角度の合成)
--j66	:202,1-5f:静止,x9(慣性),y3(初速,9F-),gs0.35,1-8-9-11/12-31/32-49/50-,0-0-9-27/36-207/216-369/378-
--j44	:
--6D	:200,x11,b0:1-8F(待機),b0:9-12F(発進:8.5-34),b1:13F-(走行:42.5-),
--ブレーキ:204,1-23F(6D入力より14Fから,慣性,抵抗0.35:51-150),終端でxs0
--4D	:

--]]
--中距離以上からの８ｈｊ
	elseif move_8hjattakeovermidrange_condi()==true then
		print("中距離以上で８ＨＪ");
		key_event2(ACT_D,ACT_UP);
--中距離からのダッシュ
	elseif move_6dattakeovermidrange_condi()==true then
		print("ダッシュ接近");
		key_event2(ACT_D,front);
--低空飛翔で接近
	elseif move_approachbylowflaying_condi()==true then
		move_approachbylowflaying_exe()
--８８３飛翔
	elseif move_approachby883d_condi()==true then
		move_approachby883d_exe()
--▼ 終端運動
--▼ 相手上空へ飛び上がった際の処理
	elseif move_attakeoverhead_condi()==true then
		move_attakeoverhead_exe()
--▼ 終端機動
	--▼ 対台風時
	elseif move_terminationtaihu_condi()==true then
		move_terminationtaihu_exe()
	--▼ 終端機動1
	--台風じゃない時だが…
	elseif move_termination1_condi()==true then
		move_termination1_exe()
	--▼ 終端機動2
	--ただ動く事で自律性を錯覚させる事が目的の機動。静止やラインの設定に大きな根拠はない。
	--霊力が一定の評価を下回った場合、実行しない。
	elseif move_termination2_condi()==true then
		move_termination2_exe()
	end
	
	yield()
end
end