ここは職人が作ったスクリプト置き場です。
自分はこんな関数作った、などあったらどんどん編集してください
直前のモーションおよびフレームの監視スクリプト
東方緋想天 AI関連スレッド1 >>80のスクリプトが発展したもの…かもしれない。有名な某霊夢AIなどに組み込まれていた。
直前行動およびフレームを配列my_preact[0~3]、enemy_preact[0~3]、my_preframe[0~3]、enemy_preframe[0~3]に格納する。
合わせてmy_allframe、enemy_allframeによって、現在行動のフレームを巻き戻ることなくカウントできる。
記述を変更すれば、より長い多くの行動を格納可能。
問題点として、同行動が切れ目なく続いた場合(遠A>遠A等)、判別ができずにフレームがカウントされ続ける事。
また、行動によっては必ずカウントに失敗するものも少しある。
現在のAIツールでは、各モーションに用いられるシーケンスの判別はできないため、判別には各オブジェクトイメージを用いる方法もある。
なお、my_frameおよびenemy_frameを用いるより、各行動のフレーム監視は楽になるが、完璧ではないため、他の環境変数を合わせて監視する方が確実。
--▼新規配列定義:変数の設定、初期化▼ my_preact = {}; enemy_preact = {}; my_preframe = {}; enemy_preframe = {}; my_allframe = 0; enemy_allframe = 0; -- --▼以下関数:別に関数にしなくてもいい▼ function calculation()--※関数名は自由 while true do --直前actと異なっていたら、もしくは同じact番号でもframeが巻き戻っていたら記録する(自分) if not(my_preact[0] == my_act and my_preframe[0] <= my_frame) then for i=3,1,-1 do my_preact[i] = my_preact[i-1]; my_preframe[i] = my_preframe[i-1]; end end --直前actと異なっていたら、もしくは同じact番号でもframeが巻き戻っていたら記録する(相手) if not(enemy_preact[0] == enemy_act and enemy_preframe[0] <= enemy_frame) then for i=3,1,-1 do enemy_preact[i] = enemy_preact[i-1]; enemy_preframe[i] = enemy_preframe[i-1]; end end --フレーム総数の記録(自分) if my_act == my_preact[1] and my_act == my_preact[2] and my_act == my_preact[3] then my_allframe = my_frame + my_preframe[1] + my_preframe[2] + my_preframe[3] + 3 + 1 ; elseif my_act == my_preact[1] and my_act == my_preact[2] then my_allframe = my_frame + my_preframe[1] + my_preframe[2] + 2 + 1 ; elseif my_act == my_preact[1] then my_allframe = my_frame + my_preframe[1] + 1 + 1 ; else my_allframe = my_frame + 1 ; end --フレーム総数の記録(相手) if enemy_act == enemy_preact[1] and enemy_act == enemy_preact[2] and enemy_act == enemy_preact[3] then enemy_allframe = enemy_frame + enemy_preframe[1] + enemy_preframe[2] + enemy_preframe[3] + 3 + 1 ; elseif enemy_act == enemy_preact[1] and enemy_act == enemy_preact[2] then enemy_allframe = enemy_frame + enemy_preframe[1] + enemy_preframe[2] + 2 + 1 ; elseif enemy_act == enemy_preact[1] then enemy_allframe = enemy_frame + enemy_preframe[1] + 1 + 1 ; else enemy_allframe = enemy_frame + 1 ; end --↓1フレーム前の行動およびフレームカウントの記録 my_preact[0] = my_act; my_preframe[0] = my_frame; enemy_preact[0] = enemy_act; enemy_preframe[0] = enemy_frame; -- yield(); end end
環境変数の計算
落下加速度の算出
画面上のキャラは、x軸上では大体が等速運動をするが、y軸上では大体が等加速度運動。
なので、落下加速度を求めれば、それを用いて単位時間後の座標も計算が可能となる。
なお、落下加速度は行動によって異なる。
--▼新規配列定義:変数の設定、初期化▼ old_battle_time = 0; old_my_yspeed = 0; old_enemy_yspeed = 0; my_gspeed = 0; enemy_gspeed = 0; -- --▼落下加速度の演算▼ function g_calculation() if battle_time-old_battle_time ==1 then --更新速度の計測。なくてもいい if y==0 then old_my_yspeed = 0; my_gspeed = 0; elseif y>0 then my_gspeed = my_yspeed - old_my_yspeed; --瞬間の落下加速度の計測 end if ey==0 then old_enemy_yspeed = 0; enemy_gspeed = 0; elseif ey>0 then enemy_gspeed = enemy_yspeed - old_enemy_yspeed; end end --▼1フレーム前の環境変数の記録▼ old_battle_time = battle_time; old_my_yspeed = my_yspeed; old_enemy_yspeed = enemy_yspeed; end
使用例
- その1:天子JA(発生9F)の場合(※y軸のみ)
if (ey+enemy_yspeed*11+(11*(10*enemy_gspeed))/2)-(y+my_yspeed*11+(11*(10*my_gspeed))/2)<=80 then key_event(ACT_A); end
- 解説:
『自分と相手の11フレーム後の座標の差が、指定する値80以下』の時に、Aを入力。
計算には等差数列の総和を利用しており、式としては、(現在の座標)+(現在の速度*時間)+(落下速度の総和)という構成となる。
また発生が9フレームであるのに、設定が11フレームとなっているのは、演算結果がtrueを返してから、キー入力を行うのに1フレーム、入力がゲームに反映されるのに1フレームかかるため。
(※非想天則ver1.03以前はABCのレスポンスが2F。詳細は細東方へ)
範囲設定は目算。厳密に行うには、自他の判定を調べ、それぞれ計算式を充てる必要がある。
- 解説:
各種行動のスクリプト
グレイズ
汎用グレイズ(101230記載)
基本仕様として、中距離以内では行動に反応してグレイズ。それより遠いならオブジェクトを感知してグレイズとなる。
地上、空中は別に分けられ、とりあえずグレイズする。
レミリアには対応していない。諏訪子にはやや対応している。
条件の記述は多いが、一応スキル・スペルカードともに対応。
厳密な設定には劣るものの、これでそれなりに対応できる。
--▼グレイズ:相手行動に対する反射or一定距離内のオブジェクト感知▼ if ( (enemy_act>=400 and enemy_act<=407) or ((enemy_char==1 or enemy_char==4 or enemy_char==13) and enemy_act==408) or (enemy_act>=409 and enemy_act<=417) or (enemy_char==19 and enemy_act==418) or (enemy_act>=419 and enemy_act<=499) or (enemy_act>=500 and enemy_act<700 and not( (enemy_char==0 and ((enemy_act>=540 and enemy_act<=544) or (enemy_act>=560 and enemy_act<=569) or enemy_act==614 or enemy_act==664)) or (enemy_char==1 and ((enemy_act>=500 and enemy_act<=504) or (enemy_act>=520 and enemy_act<=524) or enemy_act==605 or enemy_act==606 or enemy_act==607 or enemy_act==655 or enemy_act==656 or enemy_act==657)) or (enemy_char==2 and ((enemy_act>=500 and enemy_act<=504) or (enemy_act>=570 and enemy_act<=574))) or (enemy_char==3 and ((enemy_act>=545 and enemy_act<=549) or enemy_act==610 or enemy_act==660)) or (enemy_char==4 and ((enemy_act>=510 and enemy_act<=514) or enemy_act==602 or enemy_act==652)) or (enemy_char==5 and ((enemy_act>=520 and enemy_act<=523) or (enemy_act>=540 and enemy_act<=543) or (enemy_act>=545 and enemy_act<=548) or (enemy_act>=550 and enemy_act<=553) or enemy_act==600 or enemy_act==603 or enemy_act==612 or enemy_act==650 or enemy_act==653 or enemy_act==662)) or (enemy_char==6 and ((enemy_act>=500 and enemy_act<=514) or (enemy_act>=540 and enemy_act<=544) or (enemy_act>=560 and enemy_act<=569) or enemy_act==602 or enemy_act==605 or enemy_act==606 or enemy_act==652 or enemy_act==655 or enemy_act==656)) or (enemy_char==7 and (enemy_act>=560 and enemy_act<=574)) or (enemy_char==8 and ((enemy_act>=520 and enemy_act<=524) or (enemy_act>=560 and enemy_act<=569))) or (enemy_char==9 and ((enemy_act>=500 and enemy_act<=504) or (enemy_act>=510 and enemy_act<=514) or (enemy_act>=520 and enemy_act<=529) or enemy_act==600 or enemy_act==601 or enemy_act==603 or enemy_act==604 or enemy_act==605 or enemy_act==612 or enemy_act==650 or enemy_act==651 or enemy_act==653 or enemy_act==654 or enemy_act==655 or enemy_act==662)) or (enemy_char==10 and enemy_act>=565 and enemy_act<=569) or (enemy_char==11 and ((enemy_act>=520 and enemy_act<=529) or (enemy_act>=550 and enemy_act<=554) or enemy_act==601 or enemy_act==606 or enemy_act==612 or enemy_act==651 or enemy_act==656 or enemy_act==662)) or (enemy_char==12 and ((enemy_act>=525 and enemy_act<=534) or (enemy_act>=550 and enemy_act<=554) or enemy_act==600 or enemy_act==601 or enemy_act==604 or enemy_act==611 or enemy_act==650 or enemy_act==651 or enemy_act==654 or enemy_act==661)) or (enemy_char==13 and ((enemy_act>=500 and enemy_act<=504) or (enemy_act>=520 and enemy_act<=524) or (enemy_act>=530 and enemy_act<=534) or enemy_act==601 or enemy_act==651)) or (enemy_char==14 and ((enemy_act>=505 and enemy_act<=509) or (enemy_act>=545 and enemy_act<=549) or (enemy_act>=560 and enemy_act<=574) or enemy_act==601 or enemy_act==602 or enemy_act==605 or enemy_act==608 or enemy_act==651 or enemy_act==652 or enemy_act==655 or enemy_act==658)) or (enemy_char==15 and ((enemy_act>=540 and enemy_act<=544) or enemy_act==605 or enemy_act==655)) or (enemy_char==16 and ((enemy_act>=520 and enemy_act<=534) or (enemy_act>=570 and enemy_act<=574) or enemy_act==603 or enemy_act==607 or enemy_act==608 or enemy_act==653 or enemy_act==657 or enemy_act==658)) or (enemy_char==17 and ((enemy_act>=500 and enemy_act<=514) or (enemy_act>=520 and enemy_act<=529) or (enemy_act>=540 and enemy_act<=544) or (enemy_act>=550 and enemy_act<=554) or enemy_act==604 or enemy_act==605 or enemy_act==606 or enemy_act==607 or enemy_act==609 or enemy_act==654 or enemy_act==655 or enemy_act==656 or enemy_act==657 or enemy_act==659)) or (enemy_char==18 and ((enemy_act>=505 and enemy_act<=509) or enemy_act==608 or enemy_act==609 or enemy_act==610 or enemy_act==658 or enemy_act==659 or enemy_act==660)) or (enemy_char==19 and ((enemy_act>=520 and enemy_act<=524) or (enemy_act>=525 and enemy_act<=529) or (enemy_act>=540 and enemy_act<=544) or (enemy_act>=550 and enemy_act<=554) or enemy_act==602 or enemy_act==605 or enemy_act==652 or enemy_act==655)) )) )and dis<500 and enemy_allframe<=10 and (my_act<=10 or my_act==98 or my_act>=180) then--近距離時のグレイズ if enemy_cahr==9 and enemy_act==402 then--萃香2B対策。 key_on(d_back); else if (my_dir==1 and x<=200) or (my_dir==-1 and x>=1080) then--画面端 if y==0 then--画面端:地上 if math.random(10)<=5 then key_event2(ACT_D,u_back); elseif math.random(10)>=8 then key_event2(ACT_D,ACT_UP); else if my_char==19 then key_on(ACT_D); key_on(front); wait(30); else key_event2(ACT_D,front); end end elseif y>0 then--画面端:空中 if math.random(10)<=5 then key_event2(ACT_D,d_back); elseif math.random(10)>=8 then key_event2(ACT_D,ACT_DOWN); else key_event2(ACT_D,d_front); end
end else--画面中央 if dis<=300 then --画面中央:至近距離 if y==0 then --画面中央:至近距離、地上 if math.random(10)<=5 then key_event2(ACT_D,u_back); elseif math.random(10)>=8 then key_event2(ACT_D,ACT_UP); else if my_char==19 then key_on(ACT_D); key_on(front); wait(30); else key_event2(ACT_D,front); end end elseif y>0 then --画面中央:至近距離、空中 if math.random(10)<=5 then if my_air<=1 or (my_air<=2 and weather==10) then lvr44(); end elseif math.random(10)>=8 then if my_air<=1 or (my_air<=2 and weather==10) then key_event2(ACT_D,ACT_UP); end else if my_air<=1 or (my_air<=2 and weather==10) then key_event2(ACT_D,front); end end
end else --画面中央:近距離以上 if y==0 then--画面中央:近距離以上:地上 if math.random(10)<=3 then key_event2(ACT_D,u_back); elseif math.random(10)>=9 then key_event2(ACT_D,ACT_UP); else if my_char==19 and y==0 then key_on(d_back); wait(5); key_event2(ACT_D,front); else key_event2(ACT_D,front); end end elseif y>0 then--画面中央:近距離以上:空中 if math.random(10)<=3 then if my_air<=1 or (my_air<=2 and weather==10) then lvr44(); else key_event2(ACT_D,d_back); end elseif math.random(10)>=9 then if my_air<=1 or (my_air<=2 and weather==10) then key_event2(ACT_D,ACT_UP); else key_event2(ACT_D,ACT_DOWN); end else if my_air<=1 or (my_air<=2 and weather==10) then key_event2(ACT_D,front); else key_event2(ACT_D,d_front); end end
end end end end elseif obj_dis<=200 and dis>=500 and not(my_act>=150 and my_act<=165) then--遠距離時のグレイズ key_reset(); if my_char==19 then if y>0 then if my_air<=1 or (my_air<=2 and weather==10) then lvr66(); else key_event2(ACT_D,d_front); end elseif y==0 then key_event2(ACT_D,u_front); end else key_event2(ACT_D,front); end end
ガード
簡易汎用ガード(2010/12/30記載)
基本仕様として、battle_timeを利用して、1フレームごとにガードを切り替えるというもの。
完全なガードではないが、記述が少なくて済む。
また、特定の行動にはそれぞれ別途に記述して対策。
--▼ガード行動:簡易ガードルーチン▼ --オブジェが至近距離の場合、ガード if obj_dis<=200 and weather~=13 then key_reset(); key_on(d_back); --通常はスイッチガード。※龍星やスキル、スペルによるアーマー状態時には無効の記述を入れるとよい。 elseif nemy_act>=300 and not(my_act>=50 and my_act<=107) and dis<=500 and weather~=13 then --乱数によるガード方向の調整 if enemy_frame<=1+math.random(2) key_reset(); key_on(back); --相手が空中なら、諏訪子J8Aを除き、立ちガード elseif enemy_char==19 and enemy_act==309 then key_reset(); key_on(d_back); elseif ey>0 then key_reset(); key_on(back); else if battle_time%2==0 then key_on(back); elseif battle_time%2==1 then key_on(d_back); end end end
汎用ガード(2010/12/30記載)
前提として、『直前のモーションおよびフレームの監視スクリプト』あるいは、それに相当する変数・関数が必要。
基本仕様として、フラグを確認してガードするというもの。
条件にかかるもの、あるいは被カウンター判定を検出後、規定フレームまで後退。
その後、1Fごとのスイッチガードに移行し、中下段の判定を認識したあとは、対応したガードに。
空中は、諏訪子J8Aを除き、立ちガード。
そのため、持続当てには正ガードするが、発生含め3F目まではスイッチガードとなる。
また、連打キャンセルや多段には2ヒット目以降に正ガードする。
完全なガードではないが、それなりの精度があり、硬直も突く事が可能。
ただし、被カウンター判定を持たない行動などに割り込もうとするなど、過度な割り込みや漏れがある可能性がある。
--▼ガード行動:簡易ガードルーチン▼ --誤ガード時、かつ同じ行動の場合、スイッチ if my_act>=159 and my_act<=162 and enemy_preact[0]==enemy_act then key_reset(); key_on(d_back); elseif my_act>=163 and my_act<=166 and enemy_preact[0]==enemy_act then key_reset(); key_on(back); --正ガード時、かつ同じ行動の場合、維持 elseif my_act>=150 and my_act<=153 and enemy_preact[0]==enemy_act then key_reset(); key_on(back); elseif my_act>=154 and my_act<=157 and enemy_preact[0]==enemy_act then key_reset(); key_on(d_back); --オブジェが至近距離の場合、ガード elseif obj_dis<=150 and weather~=13 and get_special_data(0,10)<=20 then key_reset(); key_on(d_back); --通常はスイッチガード。互いに正面に捉えている場合だけ。 elseif ((enemy_act>=300 and enemy_act<=399 and enemy_allframe<=10) or get_fflags(1,64) or get_aflags(1,8192) or get_aflags(1,16384) or get_aflags(1,32768)) and not(my_act>=50 and my_act<=107) and enemy_act>=300 and dis<=500 and weather~=13 and get_special_data(0,10)<=20 then key_reset(); --相手が空中なら、諏訪子J8Aを除き、立ちガード if enemy_char==19 and enemy_act==309 then key_reset(); key_on(d_back); elseif ey>0 then key_on(back); else if (enemy_act>=300 and enemy_act<=399 and enemy_allframe<= 2+math.random(5) )or ( enemy_act>=400 and enemy_act<=599 and enemy_allframe<= 7+math.random(5) )or ( enemy_act>=600 and enemy_act<=679 and enemy_allframe<=37+math.random(5) )or ( enemy_act>=680 and enemy_act<=699 and enemy_allframe<= 7+math.random(5) )then key_on(back); else if get_aflags(1,32768)==true then key_on(d_back); elseif get_aflags(1,16384)==true then key_on(back); elseif battle_time%2==0 then key_on(d_back); elseif battle_time%2==1 then key_on(back); end end end end
汎用霊撃札
相手のモーションその初めに反応して霊撃札を使うスクリプト。
霊力が少ないほど高確率になる。
--▼霊撃札▼ if my_act<=10 and enemy_act>=300 and enemy_act<700 and enemy_allframe<=2 and y==0 and dis2<=250 and my_hitstop<=2 and my_card==0 and ((my_rei<=200) or (my_rei<=400 and battle_time%2<=1) or (my_rei<=600 and battle_time%4==1) or (my_rei<=800 and battle_time%8==1) or (my_rei<=1000 and battle_time%16==1)) then key_event(ACT_BC); elseif (my_act<=10 or (my_act>=143 and my_act<=166)) and enemy_act>=300 and enemy_act<700 and enemy_allframe<=5 and y==0 and dis2<=250 and my_hitstop<=2 and (get_card_id(0,0)==0 or get_card_id(0,1)==0 or get_card_id(0,2)==0 or get_card_id(0,3)==0 or get_card_id(0,4)==0) and ((not(get_card_id(0,0)==13 or get_card_id(0,1)==13 or get_card_id(0,2)==13 or get_card_id(0,3)==13 or get_card_id(0,4)==13)) or ((get_card_id(0,0)==13 or get_card_id(0,1)==13 or get_card_id(0,2)==13 or get_card_id(0,3)==13 or get_card_id(0,4)==13) and not(my_act>=143 and my_act<=166))) then if my_card~=0 then if battle_time%2==0 then key_on(ACT_AB); elseif battle_time%2==1 then key_off(ACT_AB); end end end
汎用龍魚の羽衣
相手のモーションその初めに反応して龍魚の羽衣を使うスクリプト。
霊力が少ないほど高確率になる。
--▼龍魚の羽衣▼ if my_act<=10 and enemy_act>=300 and enemy_act<700 and enemy_allframe<=2 and y==0 and dis2<=250 and my_hitstop<=2 and my_card==13 and ((my_rei<=200) or (my_rei<=400 and battle_time%2<=1) or (my_rei<=600 and battle_time%4==1) or (my_rei<=800 and battle_time%8==1) or (my_rei<=1000 and battle_time%16==1)) then key_event(ACT_BC); elseif (my_act<=10 or (my_act>=143 and my_act<=166)) and enemy_act>=300 and enemy_act<700 and enemy_allframe<=5 and y==0 and dis2<=250 and my_hitstop<=2 and (get_card_id(0,0)==13 or get_card_id(0,1)==13 or get_card_id(0,2)==13 or get_card_id(0,3)==13 or get_card_id(0,4)==13) then if my_card~=13 then if battle_time%2==0 then key_on(ACT_AB); elseif battle_time%2==1 then key_off(ACT_AB); end end end
汎用回避結界
相手のモーションに反応して回避結界を行うスクリプト。
霊力が少ないほど高確率になる。
--▼回避結界▼ if my_act>=150 and my_act<=158 and ( (enemy_act>=400 and enemy_act<=407) or ((enemy_char==1 or enemy_char==4 or enemy_char==13) and enemy_act==408) or (enemy_act>=409 and enemy_act<=417) or (enemy_char==19 and enemy_act==418) or (enemy_act>=419 and enemy_act<=499) or (enemy_act>=500 and enemy_act<700 and not( (enemy_char==0 and ((enemy_act>=540 and enemy_act<=544) or (enemy_act>=560 and enemy_act<=569) or enemy_act==614 or enemy_act==664)) or (enemy_char==1 and ((enemy_act>=500 and enemy_act<=504) or (enemy_act>=520 and enemy_act<=524) or enemy_act==605 or enemy_act==606 or enemy_act==607 or enemy_act==655 or enemy_act==656 or enemy_act==657)) or (enemy_char==2 and ((enemy_act>=500 and enemy_act<=504) or (enemy_act>=570 and enemy_act<=574))) or (enemy_char==3 and ((enemy_act>=545 and enemy_act<=549) or enemy_act==610 or enemy_act==660)) or (enemy_char==4 and ((enemy_act>=510 and enemy_act<=514) or enemy_act==602 or enemy_act==652)) or (enemy_char==5 and ((enemy_act>=520 and enemy_act<=523) or (enemy_act>=540 and enemy_act<=543) or (enemy_act>=545 and enemy_act<=548) or (enemy_act>=550 and enemy_act<=553) or enemy_act==600 or enemy_act==603 or enemy_act==612 or enemy_act==650 or enemy_act==653 or enemy_act==662)) or (enemy_char==6 and ((enemy_act>=500 and enemy_act<=514) or (enemy_act>=540 and enemy_act<=544) or (enemy_act>=560 and enemy_act<=569) or enemy_act==602 or enemy_act==605 or enemy_act==606 or enemy_act==652 or enemy_act==655 or enemy_act==656)) or (enemy_char==7 and (enemy_act>=560 and enemy_act<=574)) or (enemy_char==8 and ((enemy_act>=520 and enemy_act<=524) or (enemy_act>=560 and enemy_act<=569))) or (enemy_char==9 and ((enemy_act>=500 and enemy_act<=504) or (enemy_act>=510 and enemy_act<=514) or (enemy_act>=520 and enemy_act<=529) or enemy_act==600 or enemy_act==601 or enemy_act==603 or enemy_act==604 or enemy_act==605 or enemy_act==612 or enemy_act==650 or enemy_act==651 or enemy_act==653 or enemy_act==654 or enemy_act==655 or enemy_act==662)) or (enemy_char==10 and enemy_act>=565 and enemy_act<=569) or (enemy_char==11 and ((enemy_act>=520 and enemy_act<=529) or (enemy_act>=550 and enemy_act<=554) or enemy_act==601 or enemy_act==606 or enemy_act==612 or enemy_act==651 or enemy_act==656 or enemy_act==662)) or (enemy_char==12 and ((enemy_act>=525 and enemy_act<=534) or (enemy_act>=550 and enemy_act<=554) or enemy_act==600 or enemy_act==601 or enemy_act==604 or enemy_act==611 or enemy_act==650 or enemy_act==651 or enemy_act==654 or enemy_act==661)) or (enemy_char==13 and ((enemy_act>=500 and enemy_act<=504) or (enemy_act>=520 and enemy_act<=524) or (enemy_act>=530 and enemy_act<=534) or enemy_act==601 or enemy_act==651)) or (enemy_char==14 and ((enemy_act>=505 and enemy_act<=509) or (enemy_act>=545 and enemy_act<=549) or (enemy_act>=560 and enemy_act<=574) or enemy_act==601 or enemy_act==602 or enemy_act==605 or enemy_act==608 or enemy_act==651 or enemy_act==652 or enemy_act==655 or enemy_act==658)) or (enemy_char==15 and ((enemy_act>=540 and enemy_act<=544) or enemy_act==605 or enemy_act==655)) or (enemy_char==16 and ((enemy_act>=520 and enemy_act<=534) or (enemy_act>=570 and enemy_act<=574) or enemy_act==603 or enemy_act==607 or enemy_act==608 or enemy_act==653 or enemy_act==657 or enemy_act==658)) or (enemy_char==17 and ((enemy_act>=500 and enemy_act<=514) or (enemy_act>=520 and enemy_act<=529) or (enemy_act>=540 and enemy_act<=544) or (enemy_act>=550 and enemy_act<=554) or enemy_act==604 or enemy_act==605 or enemy_act==606 or enemy_act==607 or enemy_act==609 or enemy_act==654 or enemy_act==655 or enemy_act==656 or enemy_act==657 or enemy_act==659)) or (enemy_char==18 and ((enemy_act>=505 and enemy_act<=509) or enemy_act==608 or enemy_act==609 or enemy_act==610 or enemy_act==658 or enemy_act==659 or enemy_act==660)) or (enemy_char==19 and ((enemy_act>=520 and enemy_act<=524) or (enemy_act>=525 and enemy_act<=529) or (enemy_act>=540 and enemy_act<=544) or (enemy_act>=550 and enemy_act<=554) or enemy_act==602 or enemy_act==605 or enemy_act==652 or enemy_act==655)) )) or (weather==5) ) and enemy_allframe<=2 and my_hitstop<=4 and ((my_rei<=200 or weather==0) or (my_rei<=400 and battle_time%4<=1) or (my_rei<=600 and battle_time%8==1) or (my_rei<=800 and battle_time%16==1) or (my_rei<=1000 and battle_time%32==1)) then key_reset(); key_on(ACT_D);yield(); key_off(ACT_D);yield(); key_on(ACT_D); if y==0 then if (my_dir==1 and x<=100) or (my_dir==-1 and x>=1180) then key_on(ACT_DOWN); else key_on(d_back); end elseif y>0 then if (my_dir==1 and x<=100) or (my_dir==-1 and x>=1180) then key_on(front); else key_on(back); end end if my_hitstop>=1 then wait(my_hitstop); end end
簡易移動起き上がり
--▼移動起き上がりのルーチン▼ if my_act==97 or my_act==98 then--基本は画面端から遠ざかる。中央では相手側に移動起き上がり key_reset(); if x<500 then key_event2(ACT_D,ACT_RIGHT); elseif x>780 then key_event2(ACT_D,ACT_LEFT); else key_event2(ACT_D,front); end end
コンボ等
A連打連係
--▼A連▼ if my_act==300 and my_hitstop<=3 and my_hitstop>=1 and my_hitstop==enemy_hitstop and is_dir_front==true then key_event(ACT_A); elseif my_act==320 and my_hitstop<=3 and my_hitstop>=1 and my_hitstop==enemy_hitstop and is_dir_front==true then key_event(ACT_A); elseif my_act==321 and my_hitstop<=3 and my_hitstop>=1 and my_hitstop==enemy_hitstop and is_dir_front==true then key_event(ACT_A); elseif my_act==322 and my_hitstop<=3 and my_hitstop>=1 and my_hitstop==enemy_hitstop and is_dir_front==true then key_event(ACT_A); elseif my_act==323 and my_hitstop<=3 and my_hitstop>=1 and my_hitstop==enemy_hitstop and is_dir_front==true then end
移動の凡例
一定以上相手の上空なら飛び越す。
遠ければ前進し、近ければ後退。
--▼移動▼ elseif y>0 and y>=ey+250 and enemy_yspeed<=0 and dis<=120 and ((my_dir==1 and x<=200 and x<=ex) or (my_dir==-1 and x>=1080 and ex<=x)) then--画面端&空中 ⇒ 前方へ飛翔 key_reset(); key_event2(ACT_D,front); elseif my_act<=299 then key_reset(); if dis>=400 then --遠ければ前進 key_on(front); elseif dis<=300 then--近ければ後退 key_on(back); end end
コメント
要望とか書けば誰かが作ってくれるかも
- どんな感じで書いてゆけばよいか分からないから、とりあえず一つ書き出してみました。 -- 2010-10-14 (木) 23:15:42
- 中身更新しました。記述ミスが思ったよりおおい・・・ -- 2010-12-30 (木) 16:51:39