; コマンドRPG(多対多バトル)デビルスローン ; ご自由にスクリプトを改造して使用してください ; 2006/12/17 シフトアップネット shiftup.net ; ; ; スクリプト利用方法の例 ; レベル0:変更せずにそのまま使う ; レベル1:各名称や文章などを書き換える ; レベル2:画像や音楽などのファイルを他のものに変更する ; レベル3:画像ファイルを自分で用意したものに変更する ; レベル4:【キャラ】のステータス、【装備品】、【魔法】などの値を書き換える ; レベル5:【キャラ】や【装備品】などの種類を増やす ; レベル6:【拠点】や【道のり】に手を加える ; レベル7:【イベント】の変更や追加をする ; msg ロード中・・・ . ; 【拠点】 --------------------------------------------------------------------------------------------------------------------------- ; 説明 ; CITY_IMG:画像ファイル ※最後の0が終わりの印 ; CITY_BGM:BGMファイル ; CITY_NM :名前 ; CITY_RD0:【道のり】番号 ; CITY_RD1:同上 ; CITY_RD2:同上 ; CITY_RD3:同上 ; CITY_INN:【宿屋】番号 ; CITY_SHP:【ショップ】番号 ; CITY_EV0:【イベント】番号 ; CITY_EV1:同上 ; 番号 0 1 2 3 4 5 6 7 8 9 CITY_IMG = "town1_1b" "town1_2b" "town1_3b" "town1_4b" "kawa1_1b" "dang4_1b" "fore1_1b" "fore1_4b" "arechi1_1b" "dang2_4b" 0 ; <- この0が終わりの印 CITY_BGM = "A16_036" "A16_039" "A16_034" "B16_137" "B16_006" "A16_034" "A16_076" "B16_129" "B16_023" "A16_031" CITY_NM = "昼の町" "朝の町" "夕の町" "夜の町" "上流" "噴火口" "西の森" "東の森" "不毛の地" "魔王の間" CITY_RD0 = 0 3 3 6 0 5 6 7 8 9 CITY_RD1 = 1 1 4 7 -1 -1 -1 -1 9 -1 CITY_RD2 = 2 5 2 8 -11 -1 -1 -1 -1 -1 CITY_RD3 = -1 -1 -1 4 -11 -1 -1 -1 -1 -1 CITY_INN = 0 1 2 1 -1 -1 -1 -1 0 -1 CITY_SHP = 0 1 2 3 -1 -1 -1 -1 -1 -1 CITY_EV0 = 0 2 4 5 1 3 6 7 10 8 CITY_EV1 = -1 -1 -1 -1 -1 -1 -1 -1 -1 9 ; 【道のり】 --------------------------------------------------------------------------------------------------------------------------- ; 説明 ; ROAD_IMG:画像ファイル ※最後の0が終わりの印 ; ROAD_BGM:BGMファイル ; ROAD_NM :名前 ; ROAD_CNT:距離(敵遭遇回数) ; ROAD_ENE0:【キャラ】番号(-1のとき無し) ; ROAD_ENE1:同上 ; ROAD_ENE2:同上 ; ROAD_ENE3:同上 ; 番号 0 1 2 3 4 5 6 7 8 9 ROAD_IMG = "kawa2_1b" "mroad1_1b" "umi1_2b" "umi1_2b" "sabaku1_3b" "mroad1_3b" "sougen2_1b" "sougen1_2b" "arechi1_4b" "dang2_3b" 0 ; <- この0が終わりの印 ROAD_BGM = "B16_002" "B16_023" "A16_031" "A16_031" "B16_006" "B16_002" "B16_075" "B16_020" "B16_006" "A16_041" ROAD_NM = "川" "山道" "東の海" "西の海" "砂漠" "火山" "西の草原" "東の草原" "荒れ地" "魔城" ROAD_CNT = 3 3 4 3 5 3 2 2 4 5 ROAD_ENE0 = 11 8 29 29 17 15 20 20 23 26 ROAD_ENE1 = 8 9 30 30 18 16 21 22 24 27 ROAD_ENE2 = -1 9 31 31 -1 16 20 22 25 28 ROAD_ENE3 = -1 -1 -1 10 -1 -1 22 21 -1 28 ; 【宿屋】 --------------------------------------------------------------------------------------------------------------------------- ; 説明 ; INN_FACE:宿屋主人の画像ファイル ; INN_GOLD:宿代 INN_FACE = "face_a16" "face_b04" "face_a14" INN_GOLD = 5 7 10 ; 【ショップ】 --------------------------------------------------------------------------------------------------------------------------- ; 説明 ; SHP_FACE:店主の画像ファイル ; SHP_ITM:【アイテム】番号の配列(-1まで) SHP_FACE = "face_b11" "face_b07" "face_b03" "face_a03" SHP_ITM = 0 1 2 3 4 5 9 10 15 17 -1 0 1 2 5 6 7 8 11 12 18 -1 5 6 7 8 9 11 15 16 19 -1 5 6 7 8 10 12 13 14 16 20 -1 -999 ; 【イベント】 --------------------------------------------------------------------------------------------------------------------------- ; 説明 ; EVE_NM:イベント名 ; 番号 0 1 2 3 4 5 6 7 8 9 10 EVE_NM = "長老の家" "怪しげな所" "酒場" "怪しげな所" "酒場" "酒場" "屋敷" "隠れ家" "魔王の座" "不思議な扉" "魔法屋" ; 【効果音】 --------------------------------------------------------------------------------------------------------------------------- loads SE_ATK ; 打撃 loads SE_DMG ; ダメージ loads SE_FIRE ; 気合 loads SE_BEHAVE ; 防御 loads SE_MGC ; ワープ loads A5_03091 ; 回復 loads A5_03064 ; 能力ダウン loads A5_03096 ; 能力アップ loads A5_06179 ; 宿泊 loads A5_03066 ; 炎 loads A5_03069 ; 氷 loads A5_03072 ; 雷 loads A5_06183 ; レベルアップ loads A5_06181 ; 仲間に加わる ; 【BGM】 --------------------------------------------------------------------------------------------------------------------------- BGM_BTL = "B16_089" ; 通常バトル BGM_BOSS = "B16_001" ; ボス戦 BGM_WIN = "A16_058" ; 勝利 BGM_LOSE = "A16_046" ; 全滅 ; 【エフェクト】 --------------------------------------------------------------------------------------------------------------------------- EF_ANM = "effectAtk.swf" "effectFire.swf" "effectCure.swf" "effectUp.swf" "effectDown.swf" "effectIce.swf" "effectThunder.swf" 0 ; 先に1度読む i = 0 *loop_100 load $EF_ANM[i]$ grpEffect 0 i + 1 if EF_ANM[i] != 0 goto loop_100 ; 【キャラ】 --------------------------------------------------------------------------------------------------------------------------- ; 説明 ; ENE_IMG :画像ファイル ; ENE_NM :名前 ; ENE_MHP :最大HP(レベル1のステータス) ; ENE_MMP :最大MP(同上) ; ENE_ATK :攻撃力(同上) ; ENE_DEF :防御力(同上) ; ENE_SPD :素早さ(同上) ; ENE_MATK:魔法攻撃力(同上) ; ENE_MDEF:魔法防御力(同上) ; ENE_TKG0:【魔法】番号(-1なら無し) ; ENE_TKG1:同上 ; ENE_TKG2:同上 ; ENE_TKG3:同上 ; ENE_LV :出現時のレベル ; 番号 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 ENE_IMG = "0ni.gif" "0bu.gif" "0vr.gif" "0mj.gif" "0kn.gif" "" "" "" "orcs.png" "armadillo.png" "magician.png" "yadokari.png" "seadragon.png" "capricorn.png" "yggrdrasill.png" "salamander.png" "Basilisk.png" "scorpion.png" "wyvern.png" "skeleton.png" "flower.png" "will o'the wisp.png" "mantis.png" "madhand.png" "ro-pa-.png" "ghast.png" "Spector.png" "mirror.png" "Belial.png" "sakana.png" "serpent.png" "naga.png" "0mr.gif" "death.png" "dullahan.png" ENE_NM = "戦士" "勇者" "ヴァル" "魔法使い" "賢者" "" "" "" "オーク" "アクマジロ" "魔術師" "ヤドカル" "シードラシータ" "火山のボス" "荒地のボス" "サラマンダ" "バジリスク" "サソリスト" "ワイバーン" "スケルトン" "マンイータ" "ウィスプ" "ギガティス" "マドハンド" "ローパー" "ゴースト" "スペクター" "悪魔の鏡" "ベリアル" "キラーフィッシュ" "サーペント" "ナーガ" "ピクト" "デス" "デュラハン" ENE_MHP = 19 15 16 11 12 0 0 0 12 13 11 6 16 40 60 8 10 8 11 10 13 10 12 9 11 10 13 11 17 6 15 10 45 55 60 ENE_MMP = 11 13 10 20 23 0 0 0 11 6 20 14 5 15 10 15 10 7 10 5 11 15 7 11 12 15 10 15 11 10 14 10 120 80 70 ENE_ATK = 10 11 12 8 7 0 0 0 10 9 7 8 10 10 10 8 12 11 10 12 12 10 13 11 10 8 14 8 12 11 12 15 11 12 16 ENE_DEF = 13 10 10 9 10 0 0 0 9 11 6 11 10 9 8 10 10 15 12 11 7 10 11 11 10 9 10 15 11 10 8 6 11 9 13 ENE_SPD = 5 10 12 11 7 0 0 0 10 5 9 6 7 8 5 13 10 17 11 10 5 9 8 4 7 10 10 7 8 15 10 11 20 10 10 ENE_MATK = 7 8 7 12 13 0 0 0 10 4 11 10 7 10 12 11 8 8 10 10 10 13 10 10 11 10 10 12 8 10 10 8 9 11 8 ENE_MDEF = 5 7 8 10 9 0 0 0 9 1 10 4 6 9 8 20 8 6 8 7 10 20 6 7 8 15 9 14 6 10 6 5 22 14 9 ENE_TKG0 = 3 0 4 2 6 0 0 0 0 5 4 4 13 2 7 2 2 3 -1 0 1 8 10 11 12 11 2 10 4 13 14 13 13 11 2 ENE_TKG1 = 5 1 15 -1 -1 0 0 0 1 -1 8 6 3 8 -1 -1 -1 -1 -1 -1 -1 -1 15 -1 16 12 11 9 -1 16 15 14 9 9 9 ENE_TKG2 = 10 4 0 7 12 0 0 0 4 -1 10 7 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 13 1 -1 -1 -1 -1 10 0 1 ENE_TKG3 = -1 9 16 8 17 0 0 0 -1 -1 11 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 3 -1 -1 ENE_LV = 5 1 8 1 8 0 0 0 1 3 4 1 6 10 18 4 5 6 6 7 8 9 9 10 10 11 14 15 15 3 4 4 22 20 21 ; 【魔法】 --------------------------------------------------------------------------------------------------------------------------- ; 説明 ; TKG_NM :名前 ; TKG_EX :説明文 ; TKG_MP :使用MP ; TKG_BTL :1なら戦闘中に使用可 ; TKG_MAP :1ならフィールドで使用可 ; TKG_ALL :1なら全体魔法 ; TKG_ASRT:1なら敵に対する魔法 ; TKG_DEAD:1なら戦闘不能者に対する魔法 ; TKG_LV :魔法を覚えるレベル ; 番号 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 TKG_NM = "チユ" "スイマ" "フォノ" "ドク" "アプ" "ディプ" "チユゼ" "スイマゼ" "フォノゼ" "ソセー" "マフージ" "コルム" "コルムゼ" "ボルト" "ボルトゼ" "ハプ" "リフレク" "ムコー" "ワープ" TKG_EX = "仲間1体のHPを回復" "敵1体を数ターン眠らせる" "敵1体に炎で攻撃(気合有効)" "敵1体に毎ターン毒ダメージ" "仲間1体の攻撃力を数ターン上昇" "仲間1体の防御力を数ターン上昇" "仲間全体のHPを回復" "敵全体を数ターン眠らせる" "敵全体に炎で攻撃(気合有効)" "仲間1体をHP半分で復活" "敵1体の魔法を封じる" "敵1体に氷で攻撃(気合解除)" "敵全体に氷で攻撃(気合解除)" "敵1体に雷で攻撃(防御無効)" "敵全体に雷で攻撃(防御無効)" "仲間1体の素早さを数ターン上昇" "仲間1体への魔法を数回効かなくする" "敵1体の魔法効果と気合を解除" "他の場所へ瞬時に移動する" TKG_MP = 2 3 3 3 4 4 10 6 7 8 3 3 7 3 7 4 2 8 1 TKG_BTL = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 TKG_MAP = 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 TKG_ALL = 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 0 0 0 2 TKG_ASRT = 0 1 1 1 0 0 0 1 1 0 1 1 1 1 1 0 0 1 0 TKG_DEAD = 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 TKG_LV = 1 2 1 1 3 2 5 6 4 7 4 1 4 1 4 1 3 1 1 ; 【装備品】 --------------------------------------------------------------------------------------------------------------------------- ; 説明 ; SB_NM :名前 ; SB_POS :装備種類(0:武器、1:かぶと、2:よろい、3:たて、4:アクセサリー) ; SB_FROM:SB_TOとセットで、装備できる【キャラ】番号の範囲(つまりキャラが連続していないとならないので注意) ; SB_TO :上記参考 ; SB_PRS :ショップでの値段 ; SB_ATK :攻撃力の上昇値 ; SB_DEF :防御力の上昇値 ; SB_SPD :素早さの上昇値 ; SB_MATK:魔法攻撃力の上昇値 ; SB_MDEF:魔法防御力の上昇値 ; 番号 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 SB_NM = "皮のぼうし" "皮のよろい" "皮のたて" "ひのきのぼう" "こんぼう" "鉄の剣" "鉄のかぶと" "鉄のよろい" "鉄のたて" "きぬのローブ" "魔道士のつえ" "賢者のつえ" "クロスボウ" "勇者の剣" "キラーランス" "パワーリング" "うさぎのしっぽ" "聖なる剣" "聖なる杖" "聖なる斧" "聖なるムチ" SB_POS = 1 2 3 0 0 0 1 2 3 2 0 0 0 0 0 4 4 0 0 0 0 SB_FROM = 0 0 0 0 0 0 0 0 0 2 3 4 2 1 0 0 2 0 3 0 2 SB_TO = 9 9 9 9 2 2 2 2 2 4 4 4 2 1 0 9 4 2 4 1 4 SB_PRS = 30 80 35 5 30 110 100 200 90 90 170 320 310 330 325 100 200 2000 3000 2500 2000 SB_ATK = 0 0 0 2 4 7 0 0 0 0 5 7 12 14 16 4 0 26 22 28 24 SB_DEF = 2 4 2 0 0 0 5 10 6 8 0 0 0 0 0 0 5 10 0 0 0 SB_SPD = 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 12 SB_MATK = 0 0 0 0 0 0 0 0 0 0 3 4 0 0 0 0 2 0 14 0 0 SB_MDEF = 0 0 0 0 0 0 0 0 0 0 0 4 0 4 0 0 0 0 0 10 0 ; その他定数 --------------------------------------------------------------------------------------------------------------------------- MAX_KIAI = 3 ; 気合最大ため数 MAX_SLEEP = 3 ; 眠りターン最大数 MAX_POISON = 7 ; 毒ターン最大数 MIN_POISON = 3 ; 毒ターン最小数 PAR_POISON = 10 ; 毒ダメージ(MHPに対する割合)1%〜100% MAX_ATK_UP = 5 ; 攻撃力上昇ターン最大数 MIN_ATK_UP = 3 ; 攻撃力上昇ターン最小数 PAR_ATK_UP = 50 ; 攻撃力上昇割合(ATKに対する割合)1%〜 MAX_DEF_UP = 5 ; 防御力上昇ターン最大数 MIN_DEF_UP = 2 ; 防御力上昇ターン最小数 PAR_DEF_UP = 50 ; 防御力上昇割合(DEFに対する割合)1%〜 MAX_SPD_UP = 8 ; 素早さ上昇ターン最大数 MIN_SPD_UP = 4 ; 素早さ上昇ターン最小数 PAR_SPD_UP = 100 ; 素早さ上昇割合(SPDに対する割合)1%〜 MAX_SILENCE = 6 ; 魔法封じターン最大数 MIN_SILENCE = 3 ; 魔法封じターン最小数 MAX_REF = 3 ; リフレクターン最大数 MIN_REF = 1 ; リフレクターン最小数 STS_NM = "最大HP" "最大MP" "攻撃力" "防御力" "素早さ" "魔法攻撃" "魔法防御" POS_NM = "武器" "かぶと" "よろい" "たて" "装飾" MAX_LV = 99 ; レベル最大値 PAR_LVUP = 20 ; 1回のレベルアップで上がる値(初期ステータス値に対する割合)1%〜100% PAR_YURAGI = 6 ; 各ステータス値のゆらぎ(プラスマイナスPAR_YURAGIの半分%) EXP_LVUP = 1000 ; レベルアップに必要な経験値 ENE_GOLD = 6 ; 敵1体あたりGOLD MAX_GOLD = 999999999 ; GOLDの最大値 MAX_STS = 999 ; ステータスの最大値 ; 色 COL_RED < 255 * 256 * 256 COL_GREEN < 255 * 256 COL_BLUE < 255 COL_BLUERED < 128 * 256 * 256 + 128 ; 仲間パーティー数(ptNm等の配列数) SUU_PARTY = 4 MAX_PARTY < SUU_PARTY - 1 ; 所持数(itms等の配列数) SUU_ITM = 30 MAX_ITM < SUU_ITM - 1 SUU_TKG = 8 ; 魔法を覚える最大数(btlTkg0〜btlTkg7) MAX_TKG < SUU_TKG - 1 DT_CD = 560748831 ; 識別用の数列(とくに必要ないが、開発やデバッグがやりやすいように使用)※適当な9桁以内の数字に変更してください DT_VER = 1 ; セーブデータバージョン SUU_MOJI_NM = 4 ; 名前の文字数(これ以上大きくすると、PC環境によってはハミ出ることがあるので注意) ; 作業用データ --------------------------------------------------------------------------------------------------------------------------- ; ※SUU_ITM分の要素数必要 ary0 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ary1 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ary2 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ary3 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ary4 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ary5 = "" "" "" "" ; SUU_PARTY個 startBgmSv = 0 ; いきなりrestartBgmが呼ばれた場合に備える ; 戦闘用データ --------------------------------------------------------------------------------------------------------------------------- SUU_BTL_DT = 10 MAX_BTL_DT < SUU_BTL_DT - 1 btlSuu = 0 ; 敵の数 btlLv = 0 ; 敵のLV合計 btlGold = 0 isBtlEnd = 0 btlPartyNo = 0 0 0 0 0 0 0 0 0 0 ; 味方のステータス番号(1〜4)paintAllSts内でセットされる ; タイトル --------------------------------------------------------------------------------------------------------------------------- *title ; セーブ必要データの初期化 --------------------------------------------------------------------------------------------------------------------------- ; ロードに失敗したときも初期化するためここに(配列の定義は最初にする必要があるためサブルーチン化できない) dt_cd = 0 dt_ver = 0 flgBgm = 1 suuBtl = 0 suuWin = 0 ; パーティー情報 ※SUU_PARTY個の配列 ptLv = 1 1 1 1 ptExp = 0 0 0 0 ptEquip0 = -1 -1 -1 -1 ; 装備 武器 ptEquip1 = -1 -1 -1 -1 ; 装備 かぶと ptEquip2 = -1 -1 -1 -1 ; 装備 よろい ptEquip3 = -1 -1 -1 -1 ; 装備 たて ptEquip4 = -1 -1 -1 -1 ; 装備 アクセサリ ptGold = 100 suuPt = 0 ; 道具 ※SUU_ITM個の配列 itms = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ; 道具種類 itmSb = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ; 装備中の人 nowMap = 0 ; 現在の拠点 flgs = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; イベントフラグやカウンタ ; 0:上流ボス済、1:荒地ボス済、2:2人目の仲間済、3:1人目の仲間済、4:噴火口救出済、5:道案内済、6:道案内中、7:西の仲間済、8:東の仲間済、9:ラスボス済、 ; 10:ワープの書、11:サバイバル連勝数、12:ミラー連勝数、13:エンカウント加算LV、 ; 以下はパーティー情報としてbtlAsrt〜btlTkg7のMAX_PARTYまでをセーブ btlAsrt = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ; 以下、SUU_BTL_DT個の配列 btlKind = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 btlNm = 0 0 0 0 0 0 0 0 0 0 btlMhp = 0 0 0 0 0 0 0 0 0 0 btlMmp = 0 0 0 0 0 0 0 0 0 0 btlAtk = 0 0 0 0 0 0 0 0 0 0 btlDef = 0 0 0 0 0 0 0 0 0 0 btlSpd = 0 0 0 0 0 0 0 0 0 0 btlMatk = 0 0 0 0 0 0 0 0 0 0 btlMdef = 0 0 0 0 0 0 0 0 0 0 btlHp = 0 0 0 0 0 0 0 0 0 0 btlMp = 0 0 0 0 0 0 0 0 0 0 btlTkg0 = 0 0 0 0 0 0 0 0 0 0 btlTkg1 = 0 0 0 0 0 0 0 0 0 0 btlTkg2 = 0 0 0 0 0 0 0 0 0 0 btlTkg3 = 0 0 0 0 0 0 0 0 0 0 btlTkg4 = 0 0 0 0 0 0 0 0 0 0 btlTkg5 = 0 0 0 0 0 0 0 0 0 0 btlTkg6 = 0 0 0 0 0 0 0 0 0 0 btlTkg7 = 0 0 0 0 0 0 0 0 0 0 btlCmnd = 0 0 0 0 0 0 0 0 0 0 btlAite = 0 0 0 0 0 0 0 0 0 0 btlJunban = 0 0 0 0 0 0 0 0 0 0 btlJoutai0 = 0 0 0 0 0 0 0 0 0 0 ; 気合 btlJoutai1 = 0 0 0 0 0 0 0 0 0 0 ; 眠り btlJoutai2 = 0 0 0 0 0 0 0 0 0 0 ; 毒 btlJoutai3 = 0 0 0 0 0 0 0 0 0 0 ; 攻撃力上昇 btlJoutai4 = 0 0 0 0 0 0 0 0 0 0 ; 防御力上昇 btlJoutai5 = 0 0 0 0 0 0 0 0 0 0 ; 魔法封じ btlJoutai6 = 0 0 0 0 0 0 0 0 0 0 ; 素早さ上昇 btlJoutai7 = 0 0 0 0 0 0 0 0 0 0 ; はね返し数 msg 0 デビルスローン Ver.0.93 . menu m0 続きから 初めから endmenu if m0 = 0 then gosub lblLoad if loadRet = 0 goto title else dt_cd = DT_CD dt_ver = DT_VER endif ; デバッグ ;nowMap = 5 ;nowMap = 8 ; 荒地 ;nowMap = 3 ; 夜の町 ;nowMap = 2 gosub initMap gosub initBtlDt if m0 = 1 then ; デバッグ ;goto lblDebug ; 初めから ; プロローグ ここは海と山に囲まれた『$CITY_NM[0]$』と呼ばれる人里 load $ENE_IMG[1]$ grpFace 2000 paint grpFace wipe ここに暮らす1人の少年、名前は・・・ clear tsukeru0 = ENE_NM[1] tsukeru1 = SUU_MOJI_NM gosub tsukeru2 ENE_NM[1] = tsukeru0 名前は『$ENE_NM[1]$』 今まさに冒険の旅に出発しようとしていた・・・ clear ; 長老の家 gosub event0 *lblDebug gosub setPt2BtlDt ; 初期メンバー endif clear ; デバッグ ;flgs[9] = 0 ; クリア ;flgs[4] = 1 ; 噴火口救出済 ;btlAtk = 1000 1000 1000 1000 ;btlDef = 1000 1000 1000 1000 ;btlMdef = 100 100 100 100 ;btlMdef = 20 40 15 20 ;ptGold = 10000 ;addItem0 = 4 ;gosub addItem ;addItem0 = 3 ;gosub addItem ;addItem0 = 1 ;gosub addItem ;addItem0 = 2 ;gosub addItem ;addItem0 = 0 ;gosub addItem ;soubi0 = 1 ;soubi1 = 2 ;gosub soubi ;soubi0 = 0 ;soubi1 = 1 ;gosub soubi ;btlTkg1[0] = 15 ; ハプ ;btlTkg2[0] = 16 ; リフレク ;btlTkg3[0] = 17 ; ムコー ;btlTkg4[0] = 18 ; ワープ ;btlTkg5[0] = 7 ;btlTkg6[0] = 8 ;btlTkg7[0] = 4 ;btlTkg6[3] = 15 ; ハプ ;btlTkg7[3] = 16 ; リフレク ;btlTkg7[1] = 17 ; ムコー ;for i = 0 to 1 ; upLevelPt0 = 0 ; upLevelPt1 = 0 ; gosub upLevelPt ;endfor ;flgs[0] = 1 ;flgs[5] = 1 arg0 = -1 gosub paintAllSts *title_500 clear 0 if flgBgm = 1 then wk0 = "出さない" else wk0 = "出す" endif wk2 = "" menu m0 mpos 10 120 100 移動 $wk2$ 魔法 $wk2$ 装備 $wk2$ アイテム $wk2$ ステータス $wk2$ セーブ $wk2$ 音を $wk0$ タイトルへ $wk2$ endmenu if m0 = 0 then ; 移動 gosub idou else if m0 = 1 then ; 魔法 gosub fieldTkg else if m0 = 2 then ; 装備 gosub fieldSb else if m0 = 3 then ; アイテム gosub item else if m0 = 4 then ; ステータス gosub status else if m0 = 5 then ; セーブ gosub lblSave else if m0 = 6 then if flgBgm = 1 then flgBgm = 0 stopm else flgBgm = 1 gosub restartBgm endif else if m0 = 7 then ; はじめから msg 本当によろしいですか? . menu m0 はい いいえ endmenu if m0 = 0 then end endif endif clear 0 goto title_500 ; ステータス表示 --------------------------------------------------------------------------------------------------------------------------- *paintGold msg paintGold0 375 paintGold1 200 1 FFFFFF 0000FF FFFFFF left G:$ptGold$ . return ; ステータス表示 --------------------------------------------------------------------------------------------------------------------------- *status msg 5 375 110 200 1 FFFFFF 0000FF FFFFFF left G:$ptGold$ . selectMikataStr = "誰の?" gosub selectMikata clear 5 if ret0 >= 0 then status0 = ret0 gosub subStatus clear erase grpSts gosub repaintAllSts goto status endif return *subStatus subStatus0 = btlKind[status0] load $ENE_IMG[subStatus0]$ grpSts 1000 locate grpSts -260 -190 paint grpSts ; 基本 msg 1 130 10 200 3 FFFFFF 0000FF 000000 left $btlNm[status0]$ レベル:$ptLv[status0]$ 経験値:$ptExp[status0]$ . ; ステ getArySts0 = status0 gosub getArySts msg 3 10 150 170 7 FFFFFF 008800 000000 left $STS_NM[0]$:$btlMhp[status0]$ $STS_NM[1]$:$btlMmp[status0]$ $STS_NM[2]$:$ary3[0]$ $STS_NM[3]$:$ary3[1]$ $STS_NM[4]$:$ary3[2]$ $STS_NM[5]$:$ary3[3]$ $STS_NM[6]$:$ary3[4]$ . ; 魔法 arg0 = status0 gosub getAryTkg ary1 = "" "" "" "" "" "" "" "" "" "" ret0 - 1 for subStatus_i = 0 to ret0 subStatus1 = ary0[subStatus_i] ary1[subStatus_i] = TKG_NM[subStatus1] endfor msg 2 200 120 155 8 FFFFFF 008800 000000 left $ary1[0]$ $ary1[1]$ $ary1[2]$ $ary1[3]$ $ary1[4]$ $ary1[5]$ $ary1[6]$ $ary1[7]$ . ; 装備 getArySb0 = status0 gosub getArySb msg 4 370 10 165 5 FFFFFF 008800 000000 left $ary1[0]$ $ary1[1]$ $ary1[2]$ $ary1[3]$ $ary1[4]$ . text 0 クリックで戻る . return ; フィールドで魔法 --------------------------------------------------------------------------------------------------------------------------- *fieldTkg worped = 0 ; ワープしたか selectMikataStr = "誰が?" gosub selectMikata if ret0 >= 0 then selTkg0 = ret0 *fieldTkg_100 selTkgFlg = 0 gosub selTkg if selTkg1 >= 0 then actionTkg0 = selTkg0 actionTkg1 = selTkg1 actionTkg2 = selTkg2 gosub actionTkg if worped = 0 goto fieldTkg_100 else goto fieldTkg endif endif return ; BGM(引数:startBgm0=BGMファイル名※0なら無し、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *startBgm startBgmSv = startBgm0 *restartBgm if startBgmSv = 0 then stopm else if flgBgm = 1 then music $startBgmSv$ else stopm endif endif return ; 拠点初期化 --------------------------------------------------------------------------------------------------------------------------- *initMap fadeout 000000 msg $CITY_NM[nowMap]$ . startBgm0 = CITY_BGM[nowMap] gosub startBgm load $CITY_IMG[nowMap]$ grpBack 100 fit grpBack paint grpBack fadein 000000 clear 0 return ; 拠点到着(引数:arrive0=道のり、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- ; 到着地=同じ道のりを持つ、現在の拠点以外 *arrive arrive_i = 0 *arrive_100 if ROAD_IMG[arrive_i] = 0 then return endif if arrive_i != nowMap then if CITY_RD0[arrive_i] = arrive0 goto arrive_900 if CITY_RD1[arrive_i] = arrive0 goto arrive_900 if CITY_RD2[arrive_i] = arrive0 goto arrive_900 if CITY_RD3[arrive_i] = arrive0 goto arrive_900 endif arrive_i + 1 goto arrive_100 *arrive_900 nowMap = arrive_i gosub initMap ; 到着時のイベント if nowMap = 3 then ; 夜の町 if flgs[6] = 1 then ; 道案内中 partMikata1 = 11 load $ENE_IMG[partMikata1]$ grpFace 2000 paint grpFace wipe $ENE_NM[partMikata1]$「ふぅ、やっと着いたね!」 $ENE_NM[partMikata1]$「え?!もう道順覚えた?!・・・そっか、じゃあぼくの役目はここまでだね」 $ENE_NM[partMikata1]$「それじゃ、元気でね!」 gosub partMikata clear ; ステータスの間が詰まることがあるため gosub repaintAllSts erase grpFace wipe $ENE_NM[partMikata1]$は去っていった clear 0 flgs[6] = 0 ; 道案内中解除 flgs[5] = 1 ; 道案内済 endif else if nowMap = 8 then ; 不毛の地 if flgs[1] = 0 then ; 荒地のボス ary1 = 24 14 24 -1 ary2 = 100 200 100 -1 ary3 = 1 2 1 -1 gosub btlBoss if battleRet = 0 then ; 勝利 flgs[1] = 1 endif gosub initMap endif endif return ; 移動 --------------------------------------------------------------------------------------------------------------------------- *idou clear 0 ; 移動先メニュー idouSuu = 0 if CITY_INN[nowMap] >= 0 then ary0[idouSuu] = 0 ary1[idouSuu] = "宿屋" idouSuu + 1 endif if CITY_SHP[nowMap] >= 0 then ary0[idouSuu] = 1 ary1[idouSuu] = "武器屋" idouSuu + 1 endif ary0[idouSuu] = 2 ary1[idouSuu] = "外へ" idouSuu + 1 if CITY_EV0[nowMap] >= 0 then ary0[idouSuu] = 3 idou1 = CITY_EV0[nowMap] ary1[idouSuu] = EVE_NM[idou1] idouSuu + 1 endif if CITY_EV1[nowMap] >= 0 then ary0[idouSuu] = 4 idou1 = CITY_EV1[nowMap] ary1[idouSuu] = EVE_NM[idou1] idouSuu + 1 endif menu idou0 ary1 idouSuu mpos 10 120 150 戻る endmenu if idou0 = idouSuu then ; 戻る clear 0 return endif idou0 = ary0[idou0] if idou0 = 0 then ; 宿屋 paintGold0 = 5 paintGold1 = 110 gosub paintGold idou2 = CITY_INN[nowMap] arg0 = 0 gosub getSuuZan idou1 < ret0 * INN_GOLD[idou2] load $INN_FACE[idou2]$ grpFace 2000 paint grpFace wipe msg 1晩 $idou1$ GOLDですが、よろしいですか? . menu idouM mpos 10 120 70 はい いいえ endmenu clear 0 if idouM = 1 goto inn_end if idou1 > ptGold then GOLDが足りません goto inn_end endif ptGold - idou1 ; HP,MPを全てMAXに for idou_i = 0 to MAX_PARTY btlHp[idou_i] = btlMhp[idou_i] btlMp[idou_i] = btlMmp[idou_i] endfor fadeout 000000 if flgBgm = 1 then sound A5_06179 endif gosub repaintAllSts fadein 000000 *inn_end msg お気をつけて . erase grpFace wipe clear 0 clear 5 ; goto idou else if idou0 = 1 then ; 武器屋 gosub shop ; goto idou else if idou0 = 2 then ; 町の外 goto goOut else ; イベント if idou0 = 3 then idou1 = CITY_EV0[nowMap] else if idou0 = 4 then idou1 = CITY_EV1[nowMap] endif ; 個別のイベント if idou1 = 0 then ; 長老の家 gosub event0 goto idou else if idou1 = 1 then ; 怪しげな所 ary1 = 12 -1 ; シードラシータ ary2 = 200 -1 ary3 = 2 -1 gosub btlBoss if battleRet = 0 then ; 勝利 if flgs[0] = 0 then ; 財宝 addGold0 = 300 $addGold0$GOLDの財宝を見つけた gosub addGold flgs[0] = 1 endif endif gosub initMap else if idou1 = 2 then ; 酒場 2人目の仲間 if flgs[2] = 0 then setMikata1 = 0 load $ENE_IMG[setMikata1]$ grpFace 2000 paint grpFace wipe $ENE_NM[setMikata1]$「腕に覚えがありそうだな。オレと勝負してみないか?」 menu m0 はい いいえ endmenu if m0 = 0 then ary1 = setMikata1 -1 ary2 = 100 -1 ary3 = 1 -1 gosub btlBoss if battleRet = 0 then ; 勝利 load $ENE_IMG[setMikata1]$ grpFace 2000 paint grpFace wipe $ENE_NM[setMikata1]$「強いな。オレをパーティーに加えてくれ!」 $ENE_NM[setMikata1]$「オレの名前は・・・」 clear tsukeru0 = ENE_NM[setMikata1] tsukeru1 = SUU_MOJI_NM gosub tsukeru2 ENE_NM[setMikata1] = tsukeru0 $ENE_NM[setMikata1]$「オレの名前は$ENE_NM[setMikata1]$だ。よろしくな!」 flgs[2] = 1 gosub setMikata gosub repaintAllSts if flgBgm = 1 then sound A5_06181 endif $ENE_NM[setMikata1]$が仲間になった! else $ENE_NM[setMikata1]$「オレの見込み違いか」 endif else $ENE_NM[setMikata1]$「オレの見込み違いか」 endif clear 0 erase grpFace wipe gosub initMap else load "face_a05" grpFace 2000 paint grpFace wipe 村人「$CITY_NM[5]$で巨大な化物を見たやつがいるらしい。本当かどうか知らんが近づかないに越したことはないな」 erase grpFace wipe goto idou endif else if idou1 = 3 then ; 怪しげな所 ; 火山のボス ary1 = 15 13 15 -1 ary2 = 100 200 100 -1 ary3 = 1 2 1 -1 gosub btlBoss if battleRet = 0 then ; 勝利 if flgs[4] = 0 then ; 救出 setMikata1 = 11 load $ENE_IMG[setMikata1]$ grpFace 2000 paint grpFace wipe $ENE_NM[setMikata1]$が現れた $ENE_NM[setMikata1]$「待って!ぼく悪い$ENE_NM[setMikata1]$じゃないよ。$ENE_NM[13]$にいじめられてたんだ」 $ENE_NM[setMikata1]$「助けてくれてありがとう。ぼくの家は$ROAD_NM[4]$にあるんだ。今度お礼させてね」 flgs[4] = 1 clear 0 erase grpFace wipe endif endif gosub initMap else if idou1 = 4 then ; 酒場 load "face_a12" grpFace 2000 paint grpFace wipe 村人「$ROAD_NM[4]$はには行くな。道しるべが何もないんだ。迷って行き倒れになるのがオチだぞ」 erase grpFace wipe goto idou else if idou1 = 5 then ; 酒場 load "face_a15" grpFace 2000 paint grpFace wipe 村人「$CITY_NM[6]$の$ENE_NM[2]$と$CITY_NM[7]$の$ENE_NM[4]$はどういうわけか、いがみ合っている」 村人「どちらかを味方につければもう一方を敵に回すことになるよ」 erase grpFace wipe goto idou else if idou1 = 6 then ; 西の森の屋敷 if flgs[7] = 0 then setMikata1 = 2 if flgs[8] = 1 then ; 戦闘 ary1 = setMikata1 -1 ary2 = 100 -1 ary3 = 2 -1 gosub btlBoss gosub initMap else load $ENE_IMG[setMikata1]$ grpFace 2000 paint grpFace wipe $ENE_NM[setMikata1]$「いっしょに$ENE_NM[4]$をやっつけようぜ」 menu m0 はい いいえ endmenu if m0 = 0 then $ENE_NM[setMikata1]$「アタシの名前は・・・」 clear tsukeru0 = ENE_NM[setMikata1] tsukeru1 = SUU_MOJI_NM gosub tsukeru2 ENE_NM[setMikata1] = tsukeru0 $ENE_NM[setMikata1]$「アタシの名前は$ENE_NM[setMikata1]$だ。よろしくな!」 flgs[7] = 1 gosub setMikata gosub repaintAllSts if flgBgm = 1 then sound A5_06181 endif $ENE_NM[setMikata1]$が仲間になった! endif clear 0 erase grpFace wipe endif else 誰もいなかった endif else if idou1 = 7 then ; 東の森の隠れ家 if flgs[8] = 0 then setMikata1 = 4 if flgs[7] = 1 then ; 戦闘 ary1 = setMikata1 -1 ary2 = 100 -1 ary3 = 2 -1 gosub btlBoss gosub initMap else load $ENE_IMG[setMikata1]$ grpFace 2000 paint grpFace wipe $ENE_NM[setMikata1]$「私の力が必要か?」 menu m0 はい いいえ endmenu if m0 = 0 then $ENE_NM[setMikata1]$「ならば力を貸そう」 $ENE_NM[setMikata1]$「私の名前は・・・」 clear tsukeru0 = ENE_NM[setMikata1] tsukeru1 = SUU_MOJI_NM gosub tsukeru2 ENE_NM[setMikata1] = tsukeru0 $ENE_NM[setMikata1]$「私の名前は$ENE_NM[setMikata1]$だ。よろしく」 flgs[8] = 1 gosub setMikata gosub repaintAllSts if flgBgm = 1 then sound A5_06181 endif $ENE_NM[setMikata1]$が仲間になった! endif clear 0 erase grpFace wipe endif else 誰もいなかった endif else if idou1 = 8 then ; 魔王の座 setMikata1 = 32 load $ENE_IMG[setMikata1]$ grpFace 2000 paint grpFace wipe if flgs[9] = 0 then $ENE_NM[setMikata1]$が現れた $ENE_NM[setMikata1]$「待って!ぼく魔王につかまっていじめられてるんだ。助けてくれるよね?」 menu m0 はい いいえ endmenu $ENE_NM[setMikata1]$「・・・」 $ENE_NM[setMikata1]$「ククク・・・」 if m0 = 0 then $ENE_NM[setMikata1]$「ばーか、ぼくが魔王だよ!覚悟しろ!!」 else $ENE_NM[setMikata1]$「よく見破ったな。そうさぼくが魔王だよ!覚悟しろ!!」 endif ; 戦闘 *btlMaou erase grpFace ary1 = 33 setMikata1 34 -1 ;ary1 = 32 32 32 -1 ary2 = 150 100 150 -1 ary3 = 2 2 2 -1 gosub btlBoss if battleRet = 0 then load $ENE_IMG[setMikata1]$ grpFace 2000 paint grpFace wipe $ENE_NM[setMikata1]$「ごめんよ、もう悪いことしないから許して・・・」 *btlMaou200 menu m0 はい いいえ endmenu if m0 = 1 then $ENE_NM[setMikata1]$「じゃあ、もう1度勝負する?」 menu m0 はい いいえ endmenu if m0 = 0 then $ENE_NM[setMikata1]$「今度は負けないぞ!」 goto btlMaou else $ENE_NM[setMikata1]$「じゃあ、許してくれる?」 goto btlMaou200 endif endif $ENE_NM[setMikata1]$「ありがとう!」 $ENE_NM[setMikata1]$「お礼にこのイスに座らせてあげるよ」 $ENE_NM[setMikata1]$「ぼく座っただけで強くなっちゃったんだよ」 $btlNm[0]$たちは順番に魔王の座についた for upLevelPt0 = 0 to MAX_PARTY ;デバッグ ;ix=$upLevelPt0$ asrt=$btlAsrt[upLevelPt0]$ lv=$ptLv[upLevelPt0]$ if btlAsrt[upLevelPt0] = 0 then if ptLv[upLevelPt0] < MAX_LV then if flgBgm = 1 then sound A5_06183 endif $btlNm[upLevelPt0]$はレベルが上がった! upLevelPt1 = 1 gosub upLevelPt endif endif ; HP,MPを全てMAXに $btlNm[upLevelPt0]$は体力が回復した btlHp[upLevelPt0] = btlMhp[upLevelPt0] btlMp[upLevelPt0] = btlMmp[upLevelPt0] gosub repaintAllSts endfor $ENE_NM[setMikata1]$「じゃ、また遊んでね!」 flgs[9] = 1 endif else $ENE_NM[setMikata1]$「遊ぼう!」 erase grpFace ary1 = 34 33 setMikata1 33 34 -1 ary2 = 100 100 100 100 100 -1 ary3 = 2 2 2 2 2 -1 gosub btlBoss if battleRet = 0 then if flgs[13] < MAX_LV then flgs[13] + 1 扉以外で遭遇するモンスターのレベルが1上がった! endif endif endif if battleRet = 0 then if flgs[10] = 0 then ワープの書を手に入れた! learnMgc0 = 18 gosub learnMgc if learnMgcRet = 1 then flgs[10] = 1 endif endif endif clear 0 erase grpFace wipe gosub initMap goto idou else if idou1 = 9 then ; 不思議な扉 if flgs[9] = 0 then 今は開かなかった・・・ else ; クリア後 *lblTobira menu m0 mpos 10 120 150 能力アップの扉 サバイバルの扉 鏡の扉 戻る endmenu if m0 = 0 then gosub doorUp else if m0 = 1 then gosub taikai else if m0 = 2 then gosub mirror ; else if m0 < 3 then ; ※準備中です。バージョンアップまでお待ちください。 ; clear 0 ; goto lblTobira endif endif else if idou1 = 10 then ; 魔法屋 gosub shopMgc goto idou endif endif return *goOut ; 町の外メニュー goOutSuu = 0 if CITY_RD0[nowMap] >= 0 then ary0[goOutSuu] = CITY_RD0[nowMap] goOut1 = ary0[goOutSuu] ary1[goOutSuu] = ROAD_NM[goOut1] goOutSuu + 1 endif if CITY_RD1[nowMap] >= 0 then ary0[goOutSuu] = CITY_RD1[nowMap] goOut1 = ary0[goOutSuu] ary1[goOutSuu] = ROAD_NM[goOut1] goOutSuu + 1 endif if CITY_RD2[nowMap] >= 0 then ary0[goOutSuu] = CITY_RD2[nowMap] goOut1 = ary0[goOutSuu] ary1[goOutSuu] = ROAD_NM[goOut1] goOutSuu + 1 endif if CITY_RD3[nowMap] >= 0 then ary0[goOutSuu] = CITY_RD3[nowMap] goOut1 = ary0[goOutSuu] ary1[goOutSuu] = ROAD_NM[goOut1] goOutSuu + 1 endif modeMenu = 8 menu goOut0 ary1 goOutSuu mpos 50 140 150 戻る endmenu modeMenu = -1 if goOut0 = goOutSuu then ; 戻る clear 0 goto idou endif goOut0 = ary0[goOut0] ; 移動先を選んだときのイベント if nowMap = 0 then ; 昼の町 if goOut0 != 0 then ; 昼<->上流以外 if flgs[0] = 0 then ; 上流クリアしてない まだそちらへは行けない clear 0 goto goOut endif endif if flgs[3] = 0 then ; 1人目の仲間済でない if suuPt = 1 then ; まだ1人 ; 1人目の仲間 setMikata1 = 3 load $ENE_IMG[setMikata1]$ grpFace 2000 paint grpFace wipe $ENE_NM[setMikata1]$「1人じゃ危ないよ。一緒に行こうか?」 menu m0 はい いいえ endmenu if m0 = 0 then $ENE_NM[setMikata1]$「私の名前は・・・」 clear tsukeru0 = ENE_NM[setMikata1] tsukeru1 = SUU_MOJI_NM gosub tsukeru2 ENE_NM[setMikata1] = tsukeru0 $ENE_NM[setMikata1]$「私の名前は$ENE_NM[setMikata1]$。よろしくね!」 flgs[3] = 1 ; setMikata0 = suuPt gosub setMikata gosub repaintAllSts if flgBgm = 1 then sound A5_06181 endif $ENE_NM[setMikata1]$が仲間になった! else endif clear 0 erase grpFace wipe endif endif else if nowMap = 2 then ; 夕の町 if goOut0 = 4 then ; 夕<->夜 if flgs[5] = 0 then ; 道案内済でない if flgs[4] = 1 then ; 噴火口救出済 if flgs[6] = 0 then ; 道案内中でない setMikata1 = 11 load $ENE_IMG[setMikata1]$ grpFace 2000 paint grpFace wipe $ENE_NM[setMikata1]$「こんにちは!この前は助けてくれてありがとう」 $ENE_NM[setMikata1]$「ここを抜けるには道案内が必要だよ。ぼくにまかせて!」 ; setMikata0 = suuPt gosub setMikata gosub repaintAllSts if flgBgm = 1 then sound A5_06181 endif $ENE_NM[setMikata1]$が仲間になった! clear 0 erase grpFace wipe flgs[6] = 1 endif else いやな予感がする。他の場所で情報を集めてから来よう clear 0 goto idou endif endif endif endif ; 移動開始 fadeout 000000 startBgm0 = ROAD_BGM[goOut0] gosub startBgm load $ROAD_IMG[goOut0]$ grpBack 100 fit grpBack paint grpBack fadein 000000 goOut_cnt = 0 *goOut_500 clear 0 menu goOut_m mpos 10 120 70 進む 引き返す 魔法 装備 アイテム ステータス endmenu if goOut_m = 0 then ; 進む goOut_cnt + 1 if goOut_cnt > ROAD_CNT[goOut0] then ; 到着 arrive0 = goOut0 gosub arrive return else ; エンカウント goto idouEncount endif else if goOut_m = 1 then ; 戻る goOut_cnt - 1 if goOut_cnt < 0 then ; 元の拠点 gosub initMap return else ; エンカウント goto idouEncount endif else if goOut_m = 2 then ; 魔法 gosub fieldTkg if worped > 0 then return endif else if goOut_m = 3 then ; 装備 gosub fieldSb else if goOut_m = 4 then ; アイテム gosub item else if goOut_m = 5 then ; ステータス gosub status endif goto goOut_500 *idouEncount ; エンカウント gosub encount if encount0 = 1 then ; 敗北 ; 元の拠点 gosub initMap return endif if encount0 = 2 then ; 逃げた ; 戻る goOut_cnt - 1 if goOut_cnt < 0 then ; 元の拠点 gosub initMap return endif endif startBgm0 = ROAD_BGM[goOut0] gosub startBgm goto goOut_500 ; 長老の家 *event0 load "face_a13" grpFace 2000 paint grpFace wipe if flgs[0] = 0 then 長老「旅立つ前に力を示せ。$ROAD_NM[0]$を抜けた先に出没するドラゴンを倒すのだ。そうすれば新たな道が開かれるだろう」 else 長老「今こそ旅立つ時だ。世界を回りより多くの力を得るのだ」 長老「だが無理はするな。まずは$ROAD_NM[1]$を越え、$CITY_NM[1]$へ行くのがいいだろう」 endif erase grpFace wipe return ; ボス戦(引数:ary1=ボス6体まで最後-1、ary2=表示倍率、ary3=1ザコ2ボス、戻り:battleRet=0勝利,1敗北,2逃走) --------------------------------------------------------------------------------------------------------------------------- *btlBoss startBgm0 = BGM_BOSS gosub startBgm setChr2BtlDtLV = flgs[13] ;flgs[13]=$flgs[13]$ gosub setEneParty gosub paintBtl gosub battle return ; 敵パーティセット(引数:ary1=敵6体まで最後-1、ary2=表示倍率、ary3=1ザコ2ボス、setChr2BtlDtLV=加算レベル、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *setEneParty btlBoss_i = 0 *btlBoss_100 if btlBoss_i = 6 goto btlBoss_500 if ary1[btlBoss_i] < 0 goto btlBoss_500 setChr2BtlDt0 < btlBoss_i + SUU_PARTY setChr2BtlDt1 = ary1[btlBoss_i] btlAsrt[setChr2BtlDt0] = ary3[btlBoss_i] gosub setChr2BtlDt btlBoss_i + 1 goto btlBoss_100 *btlBoss_500 gosub initBtl btlBoss0 < btlBoss_i - 1 for btlBoss_i = 0 to btlBoss0 btlBoss1 < btlBoss_i + SUU_PARTY zoom grpEne[btlBoss1] ary2[btlBoss_i] ary2[btlBoss_i] endfor return ; エンカウント(引数:goOut0=道のり、戻り:encount0=0勝利,1敗北,2逃走,-1エンカウントせず) --------------------------------------------------------------------------------------------------------------------------- *encount encount0 = -1 ; 敵セット setEneRoad0 = goOut0 setEneRoadLV = flgs[13] gosub setEneRoad if setEneRoad1 > 0 then startBgm0 = BGM_BTL gosub startBgm suuBtl + 1 gosub paintBtl gosub battle ; バトル encount0 = battleRet endif return ; サバイバル(引数:なし、戻り:なし、) --------------------------------------------------------------------------------------------------------------------------- *taikai stopm taikai0 = 0 ; 連勝数 taikai1 = 0 ; 道のり taikai2 = 0 ; 加算レベル *taikai_050 if flgs[11] > 1 then msg サバイバルの扉 現在 $taikai0$勝 今までの最高記録 $flgs[11]$連勝 . else msg サバイバルの扉 現在 $taikai0$勝 . endif menu taikaiM バトル開始 終了する endmenu clear 0 if taikaiM = 0 goto taikai_100 if taikai0 > 0 then 本当によろしいですか? menu taikaiM はい いいえ endmenu clear 0 if taikaiM = 1 goto taikai_050 endif goto taikai_900 *taikai_100 wait 1 setEneRoad0 = taikai1 setEneRoadLV = taikai2 gosub setEneRoad if setEneRoad1 < 0 goto taikai_100 startBgm0 = ROAD_BGM[taikai1] gosub startBgm gosub paintBtl gosub battle ; バトル if battleRet = 0 then ; 勝利 if taikai0 < MAX_GOLD then taikai0 + 1 endif taikai1 + 1 if ROAD_IMG[taikai1] = 0 then taikai1 = 0 taikai2 + 10 if taikai2 > MAX_LV then taikai2 = MAX_LV endif endif goto taikai_050 endif *taikai_900 if taikai0 > 1 then 今回の記録は$taikai0$連勝でした if flgs[11] < taikai0 then flgs[11] = taikai0 endif endif gosub initMap return ; ミラー(引数:なし、戻り:なし、) --------------------------------------------------------------------------------------------------------------------------- *mirror stopm mirror0 = 0 ; 連勝数 *mirror_050 if flgs[12] > 1 then msg 鏡の扉 現在 $mirror0$勝 今までの最高記録 $flgs[12]$連勝 . else msg 鏡の扉 現在 $mirror0$勝 . endif menu mirrorM バトル開始 終了する endmenu clear 0 if mirrorM = 0 goto mirror_100 if mirror0 > 0 then 本当によろしいですか? menu mirrorM はい いいえ endmenu clear 0 if mirrorM = 1 goto mirror_050 endif goto mirror_900 *mirror_100 for mirror_i = 0 to MAX_PARTY if btlAsrt[mirror_i] = 0 then setPt2Ene1 = mirror_i setPt2Ene0 < SUU_PARTY + mirror_i gosub setPt2Ene endif endfor gosub initBtl startBgm0 = BGM_BOSS gosub startBgm gosub paintBtl gosub battle ; バトル if battleRet = 0 then ; 勝利 if mirror0 < MAX_GOLD then mirror0 + 1 endif goto mirror_050 endif *mirror_900 if mirror0 > 1 then 今回の記録は$mirror0$連勝でした if flgs[12] < mirror0 then flgs[12] = mirror0 endif endif gosub initMap return ; バトル(引数:なし、戻り:battleRet=0勝利,1敗北,2逃走,-1エンカウントせず) --------------------------------------------------------------------------------------------------------------------------- *battle erase grpFace *battle_10 clear 0 menu battle0 mpos 10 120 80 たたかう オート色々 オート攻撃 にげる endmenu gosub initTurn if battle0 = 3 then ; にげる setEscape0 = 0 gosub setEscape else if battle0 = 0 then ; たたかう gosub allInput if ret0 < 0 then goto battle_10 endif else if battle0 = 1 then ; オート色々 autoAll0 = 0 autoKind = 0 gosub autoAll else ; オート攻撃 autoAll0 = 0 autoKind = 1 gosub autoAll endif autoAll0 = 1 autoKind = 0 gosub autoAll gosub setJunban gosub allAction arg0 = 0 gosub getSuuZan if ret0 = 0 then startBgm0 = BGM_LOSE gosub startBgm ; 味方全滅 ぜんめつしました GOLDを半分失った・・・ ptGold / 2 ; HP,MPを全てMAXに for battle0 = 0 to MAX_PARTY btlHp[battle0] = btlMhp[battle0] btlMp[battle0] = btlMmp[battle0] endfor gosub repaintAllSts battleRet = 1 goto battle_end endif arg0 = 1 gosub getSuuZan if ret0 = 0 then startBgm0 = BGM_WIN gosub startBgm ; 敵全滅 戦闘に勝利しました suuWin + 1 gosub termBtl battleRet = 0 goto battle_end endif if isBtlEnd = 0 goto battle_10 *battle_end for battle0 = 0 to MAX_BTL_DT ; キャラ画像消去 erase grpEne[battle0] ; 味方の戦闘不能を解除 if btlAsrt[battle0] = 0 then if btlHp[battle0] = 0 then btlHp[battle0] = 1 endif endif endfor gosub initBtlDt gosub repaintAllSts stopm return ; バトル情報初期化 --------------------------------------------------------------------------------------------------------------------------- *initBtlDt btlJoutai0 = 0 0 0 0 0 0 0 0 0 0 btlJoutai1 = 0 0 0 0 0 0 0 0 0 0 btlJoutai2 = 0 0 0 0 0 0 0 0 0 0 btlJoutai3 = 0 0 0 0 0 0 0 0 0 0 btlJoutai4 = 0 0 0 0 0 0 0 0 0 0 btlJoutai5 = 0 0 0 0 0 0 0 0 0 0 btlJoutai6 = 0 0 0 0 0 0 0 0 0 0 btlJoutai7 = 0 0 0 0 0 0 0 0 0 0 ; 敵キャラのみクリア for initBtlDt0 = SUU_PARTY to MAX_BTL_DT btlAsrt[initBtlDt0] = -1 endfor return ; 仲間パーティー初期ステータスを全てバトル情報にセット --------------------------------------------------------------------------------------------------------------------------- *setPt2BtlDt setMikata1 = 1 gosub setMikata return ; キャラデータをバトル情報に味方としてパーティーの空き位置にセット(引数:setMikata1=キャラ種類、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *setMikata gosub getSeat if getSeat0 = SUU_PARTY then return ; 空きなし endif setChr2BtlDt1 = setMikata1 setChr2BtlDt0 = getSeat0 btlAsrt[getSeat0] = 0 ; 味方 setChr2BtlDtLV = 0 gosub setChr2BtlDt ptLv[getSeat0] = ENE_LV[setMikata1] suuPt + 1 return ; キャラデータを味方から外す(引数:partMikata1=キャラ種類、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *partMikata for partMikata0 = 0 to MAX_PARTY if btlAsrt[partMikata0] = 0 then if btlKind[partMikata0] = partMikata1 then btlAsrt[partMikata0] = -1 partMikata0 = MAX_PARTY endif endif endfor suuPt - 1 return ; パーティーの空き位置(引数:なし、戻り:getSeat0=位置※SUU_PARTYなら空きなし) --------------------------------------------------------------------------------------------------------------------------- *getSeat for getSeat0 = 0 to MAX_PARTY if btlAsrt[getSeat0] < 0 then return endif endfor return ; 道のりのモンスターをバトル情報にセット(引数:setEneRoad0=道のり、setEneRoadLV=加算レベル、戻り:setEneRoad1=数) --------------------------------------------------------------------------------------------------------------------------- *setEneRoad setEneRoad1 = 0 if ROAD_ENE0[setEneRoad0] >= 0 then ; 1体追加 ary1[setEneRoad1] = ROAD_ENE0[setEneRoad0] setEneRoad1 + 1 ; ランダムでもう1体 rand 1 setEneRoad2 if setEneRoad2 > 0 then ary1[setEneRoad1] = ROAD_ENE0[setEneRoad0] setEneRoad1 + 1 endif endif if ROAD_ENE1[setEneRoad0] >= 0 then ; ランダムで1体 rand 1 setEneRoad2 if setEneRoad2 > 0 then ary1[setEneRoad1] = ROAD_ENE1[setEneRoad0] setEneRoad1 + 1 endif endif if ROAD_ENE2[setEneRoad0] >= 0 then ; ランダムで1体 rand 1 setEneRoad2 if setEneRoad2 > 0 then ary1[setEneRoad1] = ROAD_ENE2[setEneRoad0] setEneRoad1 + 1 endif endif if ROAD_ENE3[setEneRoad0] >= 0 then ; ランダムで1体 rand 1 setEneRoad2 if setEneRoad2 > 0 then ary1[setEneRoad1] = ROAD_ENE3[setEneRoad0] setEneRoad1 + 1 endif ; ランダムでもう1体 rand 1 setEneRoad2 if setEneRoad2 > 0 then ary1[setEneRoad1] = ROAD_ENE3[setEneRoad0] setEneRoad1 + 1 endif endif ary1[setEneRoad1] = -1 ary2 = 100 100 100 100 100 100 -1 ary3 = 1 1 1 1 1 1 setChr2BtlDtLV = setEneRoadLV gosub setEneParty return ; キャラデータをバトル情報にセット(引数:setChr2BtlDt0=先、setChr2BtlDt1=元、setChr2BtlDtLV=加算レベル、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *setChr2BtlDt btlKind[setChr2BtlDt0] = setChr2BtlDt1 btlNm[setChr2BtlDt0] = ENE_NM[setChr2BtlDt1] btlMhp[setChr2BtlDt0] = ENE_MHP[setChr2BtlDt1] btlMmp[setChr2BtlDt0] = ENE_MMP[setChr2BtlDt1] btlAtk[setChr2BtlDt0] = ENE_ATK[setChr2BtlDt1] btlDef[setChr2BtlDt0] = ENE_DEF[setChr2BtlDt1] btlSpd[setChr2BtlDt0] = ENE_SPD[setChr2BtlDt1] btlMatk[setChr2BtlDt0] = ENE_MATK[setChr2BtlDt1] btlMdef[setChr2BtlDt0] = ENE_MDEF[setChr2BtlDt1] ; レベル setChr2BtlDt3 < setChr2BtlDtLV + ENE_LV[setChr2BtlDt1] if setChr2BtlDt3 > MAX_LV then setChr2BtlDt3 = MAX_LV endif ; 魔法セット ; 初期レベルで使える魔法のみセット ary0 = ENE_TKG0[setChr2BtlDt1] ENE_TKG1[setChr2BtlDt1] ENE_TKG2[setChr2BtlDt1] ENE_TKG3[setChr2BtlDt1] -1 -1 -1 -1 for setChr2BtlDt_i = 0 to 7 setChr2BtlDt2 = ary0[setChr2BtlDt_i] if setChr2BtlDt2 >= 0 then if setChr2BtlDt3 < TKG_LV[setChr2BtlDt2] then ary0[setChr2BtlDt_i] = -1 endif endif endfor btlTkg0[setChr2BtlDt0] = ary0[0] btlTkg1[setChr2BtlDt0] = ary0[1] btlTkg2[setChr2BtlDt0] = ary0[2] btlTkg3[setChr2BtlDt0] = ary0[3] btlTkg4[setChr2BtlDt0] = ary0[4] btlTkg5[setChr2BtlDt0] = ary0[5] btlTkg6[setChr2BtlDt0] = ary0[6] btlTkg7[setChr2BtlDt0] = ary0[7] ; 初期レベル setLevel0 = setChr2BtlDt0 setLevel1 = setChr2BtlDt3 gosub setLevel btlHp[setChr2BtlDt0] = btlMhp[setChr2BtlDt0] btlMp[setChr2BtlDt0] = btlMmp[setChr2BtlDt0] return ; パーティのコピーをバトル情報にセット(引数:setPt2Ene0=先、setPt2Ene1=元、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *setPt2Ene getArySts0 = setPt2Ene1 gosub getArySts btlAsrt[setPt2Ene0] = 1 btlKind[setPt2Ene0] = btlKind[setPt2Ene1] btlNm[setPt2Ene0] = "ニセ" btlNm[setPt2Ene0] + btlNm[setPt2Ene1] btlMhp[setPt2Ene0] = btlMhp[setPt2Ene1] btlMmp[setPt2Ene0] = btlMmp[setPt2Ene1] btlAtk[setPt2Ene0] = ary3[0] btlDef[setPt2Ene0] = ary3[1] btlSpd[setPt2Ene0] = ary3[2] btlMatk[setPt2Ene0] = ary3[3] btlMdef[setPt2Ene0] = ary3[4] ; 魔法セット btlTkg0[setPt2Ene0] = btlTkg0[setPt2Ene1] btlTkg1[setPt2Ene0] = btlTkg1[setPt2Ene1] btlTkg2[setPt2Ene0] = btlTkg2[setPt2Ene1] btlTkg3[setPt2Ene0] = btlTkg3[setPt2Ene1] btlTkg4[setPt2Ene0] = btlTkg4[setPt2Ene1] btlTkg5[setPt2Ene0] = btlTkg5[setPt2Ene1] btlTkg6[setPt2Ene0] = btlTkg6[setPt2Ene1] btlTkg7[setPt2Ene0] = btlTkg7[setPt2Ene1] btlHp[setPt2Ene0] = btlMhp[setPt2Ene0] btlMp[setPt2Ene0] = btlMmp[setPt2Ene0] return ; バトル情報のキャラを指定レベルにする※元はレベル1という前提(引数:setLevel0=相手、setLevel1=レベル、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- ; 微妙に乱数によるゆらぎ ※ステータス値が低くてレベルも低いと全く上がらない場合もあり *setLevel setLevelSub0 = setLevel0 setLevelSub1 = 0 setLevelSubSuu < setLevel1 - 1 gosub setLevelSub ;text 9 10 150 170 7 FFFFFF 008800 000000 left ; デバッグ ; $STS_NM[0]$:$btlMhp[setLevel0]$ ; $STS_NM[1]$:$btlMmp[setLevel0]$ ; $STS_NM[2]$:$btlAtk[setLevel0]$ ; $STS_NM[3]$:$btlDef[setLevel0]$ ; $STS_NM[4]$:$btlSpd[setLevel0]$ ; $STS_NM[5]$:$btlMatk[setLevel0]$ ; $STS_NM[6]$:$btlMdef[setLevel0]$ ;. return ; バトル情報のキャラのレベルを上げる(引数:setLevelSub0=相手、setLevelSubSuu=上げるレベル数、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *setLevelSub setLevelSubKind = btlKind[setLevelSub0] setLevelSubTo = ENE_MHP[setLevelSubKind] gosub subSetLevel btlMhp[setLevelSub0] + setLevelSub3 setLevelSubTo = ENE_MMP[setLevelSubKind] gosub subSetLevel btlMmp[setLevelSub0] + setLevelSub3 setLevelSubTo = ENE_ATK[setLevelSubKind] gosub subSetLevel btlAtk[setLevelSub0] + setLevelSub3 setLevelSubTo = ENE_DEF[setLevelSubKind] gosub subSetLevel btlDef[setLevelSub0] + setLevelSub3 setLevelSubTo = ENE_SPD[setLevelSubKind] gosub subSetLevel btlSpd[setLevelSub0] + setLevelSub3 setLevelSubTo = ENE_MATK[setLevelSubKind] gosub subSetLevel btlMatk[setLevelSub0] + setLevelSub3 setLevelSubTo = ENE_MDEF[setLevelSubKind] gosub subSetLevel btlMdef[setLevelSub0] + setLevelSub3 return *subSetLevel setLevelSub3 < setLevelSubTo * setLevelSubSuu * PAR_LVUP / 100 ; プラスマイナス(PAR_YURAGIの半分)% setLevelSub4 < setLevelSub3 * PAR_YURAGI / 100 rand setLevelSub4 setLevelSub5 setLevelSub3 < setLevelSub3 - setLevelSub4 / 2 + setLevelSub5 if setLevelSub3 < 0 then setLevelSub3 = 0 endif return ; バトル情報のキャラのレベルを1上げる(引数:upLevel0=相手、upLevel1=メッセージ有無、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- ; ステータスの上昇がかなりランダム(レベルアップ用) *upLevel upLevelKind = btlKind[upLevel0] upLevelSts < ENE_MHP[upLevelKind] + ENE_MMP[upLevelKind] + ENE_ATK[upLevelKind] + ENE_DEF[upLevelKind] + ENE_SPD[upLevelKind] + ENE_MATK[upLevelKind] + ENE_MDEF[upLevelKind] upLevelSts < upLevelSts * PAR_LVUP / 100 if upLevel1 = 1 then ary0 = "" "" "" "" "" "" "" upLevelAry_i = 0 endif ary1 = ENE_MHP[upLevelKind] ENE_MMP[upLevelKind] ENE_ATK[upLevelKind] ENE_DEF[upLevelKind] ENE_SPD[upLevelKind] ENE_MATK[upLevelKind] ENE_MDEF[upLevelKind] ary2 = btlMhp[upLevel0] btlMmp[upLevel0] btlAtk[upLevel0] btlDef[upLevel0] btlSpd[upLevel0] btlMatk[upLevel0] btlMdef[upLevel0] for upLevel4 = 0 to 6 upLevelTo = ary1[upLevel4] gosub subUpLevel ary2[upLevel4] + upLevel3 if ary2[upLevel4] > MAX_STS then ary2[upLevel4] = MAX_STS endif endfor btlMhp[upLevel0] = ary2[0] btlMmp[upLevel0] = ary2[1] btlAtk[upLevel0] = ary2[2] btlDef[upLevel0] = ary2[3] btlSpd[upLevel0] = ary2[4] btlMatk[upLevel0] = ary2[5] btlMdef[upLevel0] = ary2[6] if upLevel1 = 1 then text 0 $ary0[0]$ $ary0[1]$ $ary0[2]$ $ary0[3]$ $ary0[4]$ $ary0[5]$ $ary0[6]$ . endif return *subUpLevel upLevel3 = 0 for upLevel_i = 1 to upLevelTo if upLevelSts <= 0 goto subUpLevel_end ; リミット rand 99 upLevel5 if upLevel5 < PAR_LVUP then upLevel3 + 1 upLevelSts - 1 endif endfor *subUpLevel_end if upLevel3 > 0 then if upLevel1 = 1 then ary0[upLevelAry_i] + STS_NM[upLevel4] subUpLevel0 = "が " ary0[upLevelAry_i] + subUpLevel0 ary0[upLevelAry_i] + upLevel3 subUpLevel0 = " 上がった" ary0[upLevelAry_i] + subUpLevel0 endif endif upLevelAry_i + 1 return ; バトル情報のパーティーのレベルを1上げる(引数:upLevelPt0=相手、upLevelPt1=メッセージ有無、戻り:upLevelPtRet=-1NG,新レベル) --------------------------------------------------------------------------------------------------------------------------- *upLevelPt upLevelPtRet = -1 upLevelPt2 = ptLv[upLevelPt0] if upLevelPt2 >= MAX_LV then return endif upLevelPt2 + 1 upLevel0 = upLevelPt0 upLevel1 = upLevelPt1 gosub upLevel ptLv[upLevelPt0] = upLevelPt2 upLevelPtRet = upLevelPt2 ; 新たに魔法を覚えるか upLevelPtKind = btlKind[upLevelPt0] ary4 = ENE_TKG0[upLevelPtKind] ENE_TKG1[upLevelPtKind] ENE_TKG2[upLevelPtKind] ENE_TKG3[upLevelPtKind] for upLevelPt_i = 0 to 3 upLevelPtTkg = ary4[upLevelPt_i] if upLevelPtTkg >= 0 then if TKG_LV[upLevelPtTkg] = upLevelPt2 then ; 魔法配列取得 arg0 = upLevelPt0 gosub getAryTkg upLevelPtSuu = ret0 ; すでに覚えていないか ariTkg0 = upLevelPtSuu ariTkg1 = upLevelPtTkg gosub ariTkg if ariTkgRet = 0 then ; まだ覚えてない $TKG_NM[upLevelPtTkg]$を覚えた oboeruTkg1 = upLevelPtTkg gosub oboeruTkg ; 魔法を配列から戻す arg0 = upLevelPt0 gosub setAryTkg endif endif endif endfor return ; 魔法を覚える(引数:arg0=魔法配列、oboeruTkg1=魔法、戻り値:なし) --------------------------------------------------------------------------------------------------------------------------- *oboeruTkg for oboeruTkg_i = 0 to MAX_TKG if ary0[oboeruTkg_i] < 0 then ary0[oboeruTkg_i] = oboeruTkg1 return endif endfor ・・・しかしこれ以上覚えられない for oboeruTkg_i = 0 to MAX_TKG oboeruTkg3 = ary0[oboeruTkg_i] ary1[oboeruTkg_i] = TKG_NM[oboeruTkg3] ary2[oboeruTkg_i] = TKG_MP[oboeruTkg3] endfor ary0[SUU_TKG] = oboeruTkg1 ary1[SUU_TKG] = TKG_NM[oboeruTkg1] ary2[SUU_TKG] = TKG_MP[oboeruTkg1] selTkgSuu < SUU_TKG + 1 *oboeruTkg_100 どれを忘れますか? clear 0 modeMenu = 2 menu selTkg3 ary1 selTkgSuu ary2 selTkgSuu mpos 10 115 80 endmenu modeMenu = -1 clear 9 $ary1[selTkg3]$を忘れます。よろしいですか? menu oboeruTkg0 はい いいえ endmenu if oboeruTkg0 = 1 goto oboeruTkg_100 $ary1[selTkg3]$を忘れた if selTkg3 < SUU_TKG then ary0[selTkg3] = -1 goto oboeruTkg endif return ; すでに魔法を持っているか(引数:arg0=魔法配列、ariTkg0=魔法配列数、ariTkg1=魔法、戻り値:ariTkgRet=0無,1有) --------------------------------------------------------------------------------------------------------------------------- *ariTkg ariTkg0 - 1 for ariTkgRet = 0 to ariTkg0 if ary0[ariTkgRet] = ariTkg1 then ariTkgRet = 1 return endif endfor ariTkgRet = 0 return ; 指定魔法を誰かに覚えさせる(引数:learnMgc0=魔法、戻り値:learnMgcRet=0戻る,1OK) --------------------------------------------------------------------------------------------------------------------------- *learnMgc $TKG_NM[learnMgc0]$を覚える仲間を選んでください selectMikataStr = "誰が?" gosub selectMikata if ret0 < 0 then learnMgcRet = 0 return endif learnMgc1 = ret0 ; 魔法配列取得 arg0 = learnMgc1 gosub getAryTkg ; 覚える $btlNm[learnMgc1]$は$TKG_NM[learnMgc0]$を覚えた oboeruTkg1 = learnMgc0 gosub oboeruTkg ; 魔法を配列から戻す arg0 = learnMgc1 gosub setAryTkg learnMgcRet = 1 return ; 味方全員ステータス表示(引数:arg0=強調、戻り値:なし) --------------------------------------------------------------------------------------------------------------------------- *paintAllSts paintAllStsVal = arg0 *repaintAllSts paintAllStsX = 5 paintAllStsNo = 1 for paintAllSts0 = 0 to MAX_BTL_DT if btlAsrt[paintAllSts0] = 0 then ; 味方 if btlHp[paintAllSts0] = 0 then paintAllStsCol = COL_RED else paintAllStsHalf < btlMhp[paintAllSts0] / 2 if paintAllStsHalf >= btlHp[paintAllSts0] then paintAllStsCol = COL_BLUERED else paintAllStsCol = COL_BLUE endif endif paintAllStsY = 0 if paintAllSts0 = paintAllStsVal then paintAllStsY + 10 endif if btlJoutai1[paintAllSts0] > 0 then paintAllStsH = "眠" else if btlJoutai5[paintAllSts0] > 0 then paintAllStsH = "封" else paintAllStsH = "H:" endif if btlJoutai7[paintAllSts0] > 0 then paintAllStsM = "光" else if btlJoutai2[paintAllSts0] > 0 then paintAllStsM = "毒" else paintAllStsM = "M:" endif msg paintAllStsNo paintAllStsX paintAllStsY 120 3 FFFFFF paintAllStsCol paintAllStsCol left $btlNm[paintAllSts0]$ $paintAllStsH$$btlHp[paintAllSts0]$/$btlMhp[paintAllSts0]$ $paintAllStsM$$btlMp[paintAllSts0]$/$btlMmp[paintAllSts0]$ . btlPartyNo[paintAllSts0] = paintAllStsNo paintAllStsNo + 1 paintAllStsX + 135 endif endfor return ; バトル初期化 --------------------------------------------------------------------------------------------------------------------------- *initBtl isBtlEnd = 0 btlLv = 0 btlGold = 0 btlLastTkg = -1 ; 最後に敵が使った魔法 ; 敵画像ロード initBtl2 = 1000 initBtlSuu = 0 for initBtl0 = 0 to MAX_BTL_DT if btlAsrt[initBtl0] > 0 then initBtl1 = btlKind[initBtl0] load $ENE_IMG[initBtl1]$ grpEne[initBtl0] initBtl2 initBtl2 + 10 initBtlSuu + 1 endif endfor ; 画像位置&経験値や金 initBtlX < 550 / ( initBtlSuu + 1 ) initBtl2 < -275 + initBtlX for initBtl0 = 0 to MAX_BTL_DT if btlAsrt[initBtl0] > 0 then locateCenter grpEne[initBtl0] initBtl2 0 initBtl2 + initBtlX if btlHp[initBtl0] > 0 then ; 経験値や金 initBtlKind = btlKind[initBtl0] btlLv + ENE_LV[initBtlKind] btlGold < btlGold + ENE_GOLD * ENE_LV[initBtlKind] endif endif endfor btlSuu = initBtlSuu clear ; 味方ステータス arg0 = -1 gosub paintAllSts return ; バトル表示 --------------------------------------------------------------------------------------------------------------------------- *paintBtl for paintBtl0 = 0 to MAX_BTL_DT if btlAsrt[paintBtl0] > 0 then if btlHp[paintBtl0] > 0 then msg 0 $btlNm[paintBtl0]$が現れた . paint grpEne[paintBtl0] wipe endif endif endfor return ; バトル勝利時 --------------------------------------------------------------------------------------------------------------------------- *termBtl btlLv / btlSuu arg0 = 0 gosub getSuuZan btlLv < btlLv + btlSuu - ret0 termBtl2 = btlLv for termBtl0 = 0 to MAX_BTL_DT if btlAsrt[termBtl0] = 0 then if btlHp[termBtl0] > 0 then termBtl1 = 1200 for termBtl_i = termBtl2 to ptLv[termBtl0] termBtl1 / 2 ; 1200,600,300(同LV),150,75... if termBtl1 < 1 then termBtl1 = 1 termBtl_i = ptLv[termBtl0] ; break endif endfor $btlNm[termBtl0]$は$termBtl1$の経験値を獲得 ptExp[termBtl0] + termBtl1 *termBtl_500 if ptExp[termBtl0] >= EXP_LVUP then if ptLv[termBtl0] < MAX_LV then if flgBgm = 1 then sound A5_06183 endif termBtl1 < ptLv[termBtl0] + 1 $btlNm[termBtl0]$はレベル$termBtl1$になった! upLevelPt0 = termBtl0 upLevelPt1 = 1 gosub upLevelPt gosub repaintAllSts ptExp[termBtl0] - EXP_LVUP goto termBtl_500 else ptExp[termBtl0] < EXP_LVUP - 1 endif endif endif endif endfor $btlGold$GOLD獲得 addGold0 = btlGold gosub addGold ; 敵が唱えた魔法を覚える if btlLastTkg >= 0 then ; ランダムで覚える相手 arg0 = 0 gosub autoMikata termBtl0 = ret0 ; 生きてるか if btlHp[termBtl0] > 0 then ; 魔法配列取得 arg0 = termBtl0 gosub getAryTkg ; すでに覚えているか ariTkg0 = ret0 ariTkg1 = btlLastTkg gosub ariTkg if ariTkgRet = 0 then ; 一定の確率? ; 覚える $btlNm[termBtl0]$は敵の使った$TKG_NM[btlLastTkg]$を覚えた! oboeruTkg1 = btlLastTkg gosub oboeruTkg ; 魔法を配列から戻す arg0 = termBtl0 gosub setAryTkg endif endif endif return ; GOLD加算(引数:addGold0=加算値、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *addGold ptGold + addGold0 if ptGold > MAX_GOLD then ptGold = MAX_GOLD endif return ; 状態クリア(引数:arg0=番号、戻り値:なし) --------------------------------------------------------------------------------------------------------------------------- *clearJoutai btlJoutai0[arg0] = 0 btlJoutai1[arg0] = 0 btlJoutai2[arg0] = 0 btlJoutai3[arg0] = 0 btlJoutai4[arg0] = 0 btlJoutai5[arg0] = 0 btlJoutai6[arg0] = 0 btlJoutai7[arg0] = 0 return ; ターン初期化 --------------------------------------------------------------------------------------------------------------------------- *initTurn btlCmnd = -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 return ; 順番決定 --------------------------------------------------------------------------------------------------------------------------- *setJunban ; 素早さ順に並べる ary0 = 0 0 0 0 0 0 0 0 0 0 for setJunban0 = 0 to MAX_BTL_DT setJunbanMax = -1 setJunbanMaxNo = -1 for setJunban1 = 0 to MAX_BTL_DT getArySts0 = setJunban1 gosub getArySts if ary3[2] > setJunbanMax then if ary0[setJunban1] = 0 then setJunbanMax = ary3[2] setJunbanMaxNo = setJunban1 endif endif endfor btlJunban[setJunban0] = setJunbanMaxNo ary0[setJunbanMaxNo] = 1 endfor ; 素早さが近いほど高い確率で前後を入れ替える for setJunban0 = 1 to MAX_BTL_DT setJunban1 < setJunban0 - 1 setJunban0a = btlJunban[setJunban0] setJunban1a = btlJunban[setJunban1] getArySts0 = setJunban0a gosub getArySts if ary3[2] > 0 then setJunban2 = ary3[2] getArySts0 = setJunban1a gosub getArySts setJunban2 < ary3[2] / setJunban2 rand setJunban2 setJunbanR if setJunbanR = 0 then ; 入れ替え btlJunban[setJunban0] = setJunban1a btlJunban[setJunban1] = setJunban0a endif endif endfor return ; 全員行動 (引数:なし、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *allAction for allAction0 = 0 to MAX_BTL_DT allAction1 = btlJunban[allAction0] if btlAsrt[allAction1] >= 0 then arg0 = allAction1 gosub action ; チェック if isBtlEnd != 0 then allAction0 = MAX_BTL_DT ; ループを抜ける endif endif endfor return ; 一定時間またはマウスボタン押下まで待つ (引数:なし、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *waitBtl wait 5 for waitBtl0 = 0 to 10 wait 1 mouse waitBtlX waitBtlY waitBtlBtn if waitBtlBtn != 0 then return endif endfor return ; 1体行動 (引数:arg0=番号、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *action action0 = arg0 if btlHp[action0] = 0 then return endif ; 毒チェック if btlJoutai2[action0] > 0 then btlJoutai2[action0] - 1 if btlJoutai2[action0] = 0 then msg 0 $btlNm[action0]$の体の毒が消え去った . gosub waitBtl else msg 0 $btlNm[action0]$は毒におかされている . gosub waitBtl ; ダメージ arg1 < btlMhp[action0] * PAR_POISON / 100 if arg1 < 1 then arg1 = 1 endif arg0 = action0 gosub damage if btlHp[action0] = 0 goto action_end endif endif ; 攻撃力上昇ターン終了チェック if btlJoutai3[action0] > 0 then btlJoutai3[action0] - 1 if btlJoutai3[action0] = 0 then msg 0 $btlNm[action0]$の$STS_NM[2]$が元に戻った . gosub waitBtl endif endif ; 防御力上昇ターン終了チェック if btlJoutai4[action0] > 0 then btlJoutai4[action0] - 1 if btlJoutai4[action0] = 0 then msg 0 $btlNm[action0]$の$STS_NM[3]$が元に戻った . gosub waitBtl endif endif ; 素早さ上昇ターン終了チェック if btlJoutai6[action0] > 0 then btlJoutai6[action0] - 1 if btlJoutai6[action0] = 0 then msg 0 $btlNm[action0]$の$STS_NM[4]$が元に戻った . gosub waitBtl endif endif ; 魔法封じターン終了チェック if btlJoutai5[action0] > 0 then btlJoutai5[action0] - 1 if btlJoutai5[action0] = 0 then msg 0 $btlNm[action0]$は魔法を使えるようになった . gosub waitBtl endif endif ; 眠りチェック if btlJoutai1[action0] > 0 then btlJoutai1[action0] - 1 if btlJoutai1[action0] = 0 then msg 0 $btlNm[action0]$は目を覚ました . else msg 0 $btlNm[action0]$は眠っている . endif gosub waitBtl gosub repaintAllSts return endif action2 = btlAite[action0] ; 相手番号 ; 強調 if btlAsrt[action0] = 0 then ; 味方 arg0 = action0 gosub paintAllSts else ; 敵 getGrpZoom grpEne[action0] actionZx actionZy ; 現在の拡大率を取得 endif ; 行動 if btlCmnd[action0] = -1 then ; 攻撃 if btlHp[action2] = 0 then ; 相手がすでにやられてる ; 他の相手を自動セット arg0 = btlAsrt[action0] gosub autoAite action2 = ret0 endif msg 0 $btlNm[action0]$の攻撃 . ; 効果音 if flgBgm = 1 then sound SE_ATK endif ; アニメーション if btlAsrt[action0] > 0 then ; 敵 actionZx2 < actionZx * 15 / 10 ; 1.5倍 actionZy2 < actionZy * 15 / 10 ; 1.5倍 clearAnim grpEne[action0] addAnimZoom grpEne[action0] 1 4 actionZx2 actionZy2 startAnim grpEne[action0] else ; 味方 getGrpPos grpEne[action2] actionX actionY load $EF_ANM[0]$ grpEffect 2000 locateCenter grpEffect actionX actionY paint grpEffect endif gosub waitBtl ; ダメージ値算出 getArySts0 = action0 gosub getArySts arg1 = ary3[0] getArySts0 = action2 gosub getArySts arg0 = ary3[1] arg1 < arg1 / 2 - arg0 / 4 if arg1 <= 0 then arg1 = 1 endif if btlJoutai0[action0] > 0 then ; 気合 arg1 < arg1 * btlJoutai0[action0] * 2 endif if btlCmnd[action2] = -2 then ; 防御 arg1 / 2 endif arg0 = action2 gosub damage btlJoutai0[action0] = 0 ; アニメーション後処理 if btlAsrt[action0] > 0 then ; 敵 stopAnim grpEne[action0] clearAnim grpEne[action0] addAnimZoom grpEne[action0] 1 4 actionZx actionZy startAnim grpEne[action0] endif else if btlCmnd[action0] >= 0 then ; 魔法 actionTkg0 = action0 actionTkg1 = btlCmnd[action0] actionTkg2 = action2 gosub actionTkg else if btlCmnd[action0] = -2 then ; 防御 ; アニメーション if btlAsrt[action0] > 0 then ; 敵 actionZx2 < actionZx * 15 / 10 ; 1.5倍 actionZy2 < actionZy * 7 / 10 ; 0.7倍 clearAnim grpEne[action0] addAnimZoom grpEne[action0] 1 4 actionZx2 actionZy2 startAnim grpEne[action0] endif ; 効果音 if flgBgm = 1 then sound SE_BEHAVE endif msg 0 $btlNm[action0]$は身を守っている . gosub waitBtl ; アニメーション後処理 if btlAsrt[action0] > 0 then ; 敵 stopAnim grpEne[action0] clearAnim grpEne[action0] addAnimZoom grpEne[action0] 1 4 actionZx actionZy startAnim grpEne[action0] endif else if btlCmnd[action0] = -3 then ; 気合 ; アニメーション if btlAsrt[action0] > 0 then ; 敵 actionZx2 < actionZx * 7 / 10 ; 0.7倍 actionZy2 < actionZy * 15 / 10 ; 1.5倍 clearAnim grpEne[action0] addAnimZoom grpEne[action0] 1 4 actionZx2 actionZy2 startAnim grpEne[action0] endif ; 効果音 if flgBgm = 1 then sound SE_FIRE endif msg 0 $btlNm[action0]$は気合をためた . gosub waitBtl if btlJoutai0[action0] = MAX_KIAI then msg 0 しかしこれ以上上がらなかった . gosub waitBtl else btlJoutai0[action0] + 1 endif ; アニメーション後処理 if btlAsrt[action0] > 0 then ; 敵 stopAnim grpEne[action0] clearAnim grpEne[action0] addAnimZoom grpEne[action0] 1 4 actionZx actionZy startAnim grpEne[action0] endif else if btlCmnd[action0] = -8 then 逃げ出した battleRet = 2 isBtlEnd = 1 endif *action_end ; 強調解除 if btlAsrt[action0] = 0 then ; 味方 arg0 = -1 gosub paintAllSts endif return ; 魔法発動 (引数:actionTkg0=自分、actionTkg1=魔法、actionTkg2=相手、戻り値:actionTkg3=-1NG,0OK、)--------------------------------------------------------------------------------------------------------------------------- *actionTkg actionTkg3 = -1 if actionTkg2 >= 0 then ; 単体 if btlHp[actionTkg2] = 0 then ; 相手がすでにやられてる if TKG_DEAD[actionTkg1] = 0 then ; 死者に効かない return endif endif endif msg 0 $btlNm[actionTkg0]$は$TKG_NM[actionTkg1]$をとなえた . ; MPチェック(MP吸い取り系の魔法を使われた場合のために) if TKG_MP[actionTkg1] > btlMp[actionTkg0] then gosub waitBtl ; となえた分のウェイト msg 0 しかしMPが足りなかった . gosub waitBtl return endif ; 魔法封じチェック if btlJoutai5[actionTkg0] > 0 then gosub waitBtl ; となえた分のウェイト msg 0 しかし魔法を封じられている . gosub waitBtl return endif actionTkgAsrt = 0 ; 対象が味方か敵か ; アニメーション if btlAsrt[actionTkg0] > 0 then ; 敵が使用 actionZx2 < actionZx * 15 / 10 ; 1.5倍 actionZy2 < actionZy * 15 / 10 ; 1.5倍 clearAnim grpEne[actionTkg0] addAnimZoom grpEne[actionTkg0] 1 4 actionZx2 actionZy2 startAnim grpEne[actionTkg0] if TKG_ASRT[actionTkg1] = 0 then ; 敵が味方に使用 actionTkgAsrt = 1 endif btlLastTkg = actionTkg1 ; 敵が唱えた魔法を保存 else ; 味方が使用 if TKG_ASRT[actionTkg1] = 1 then ; 味方が敵に使用 actionTkgAsrt = 1 endif endif ; 敵に if actionTkg2 >= 0 then ; 単体 arg0 = actionTkg1 arg1 = actionTkg2 gosub animTkg2Ene else if TKG_ALL[actionTkg1] = 2 then ; 即効 if actionTkg1 = 18 then ; ワープ if flgBgm = 1 then sound SE_MGC endif gosub waitBtl endif else ; 全体 for actionTkg_i = 0 to MAX_BTL_DT ; if btlAsrt[actionTkg_i] = actionTkgAsrt then arg0 = btlAsrt[actionTkg_i] if arg0 > 1 then arg0 = 1 endif if arg0 = actionTkgAsrt then arg0 = actionTkg1 arg1 = actionTkg_i gosub animTkg2Ene endif endfor endif ; 結果 if actionTkg2 >= 0 then ; 単体 arg0 = actionTkg1 arg1 = actionTkg0 arg2 = actionTkg2 gosub kekkaTkg else if TKG_ALL[actionTkg1] = 2 then ; 即効 if actionTkg1 = 18 then ; ワープ clear 0 menu m0 CITY_NM 10 mpos 10 115 120 mrow 7 やめる endmenu if m0 < 10 then nowMap = m0 gosub initMap worped = 1 else ; ワープ中止 return ; MPを減らさないために endif endif else ; 全体 for actionTkg_i = 0 to MAX_BTL_DT arg0 = btlAsrt[actionTkg_i] if arg0 > 1 then arg0 = 1 endif if arg0 = actionTkgAsrt then arg0 = actionTkg1 arg1 = actionTkg0 arg2 = actionTkg_i gosub kekkaTkg endif endfor endif ;btlMp[actionTkg0]=$btlMp[actionTkg0]$ TKG_MP[actionTkg1]=$TKG_MP[actionTkg1]$ actionTkg1=$actionTkg1$ btlMp[actionTkg0] - TKG_MP[actionTkg1] btlJoutai0[actionTkg0] = 0 if btlAsrt[actionTkg0] = 0 then gosub repaintAllSts endif ; アニメーション後処理 if btlAsrt[actionTkg0] > 0 then ; 敵 stopAnim grpEne[actionTkg0] clearAnim grpEne[actionTkg0] addAnimZoom grpEne[actionTkg0] 1 4 actionZx actionZy startAnim grpEne[actionTkg0] endif return ; 魔法効果を1体に (引数:arg0=魔法、arg1=敵、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *animTkg2Ene animTkg2Ene0 = arg0 animTkg2Ene1 = arg1 if btlHp[animTkg2Ene1] = 0 then ; 相手がすでにやられてる if TKG_DEAD[animTkg2Ene0] = 0 then ; 死者に効かない return endif endif if animTkg2Ene0 = 0 goto animTkg2Ene_0 ; チユ if animTkg2Ene0 = 1 goto animTkg2Ene_1 ; スイマ if animTkg2Ene0 = 2 goto animTkg2Ene_2 ; フォノ if animTkg2Ene0 = 3 goto animTkg2Ene_3 ; ドク if animTkg2Ene0 = 4 goto animTkg2Ene_4 ; アプ if animTkg2Ene0 = 5 goto animTkg2Ene_5 ; ディプ if animTkg2Ene0 = 6 goto animTkg2Ene_0 ; チユゼ if animTkg2Ene0 = 7 goto animTkg2Ene_1 ; スイマゼ if animTkg2Ene0 = 8 goto animTkg2Ene_2 ; フォノゼ if animTkg2Ene0 = 9 goto animTkg2Ene_6 ; ソセー if animTkg2Ene0 = 10 goto animTkg2Ene_7 ; マフージ if animTkg2Ene0 = 11 goto animTkg2Ene_8 ; コルム if animTkg2Ene0 = 12 goto animTkg2Ene_8 ; コルムゼ if animTkg2Ene0 = 13 goto animTkg2Ene_9 ; ボルト if animTkg2Ene0 = 14 goto animTkg2Ene_9 ; ボルトゼ if animTkg2Ene0 = 15 goto animTkg2Ene_10 ; ハプ if animTkg2Ene0 = 16 goto animTkg2Ene_11 ; リフレク if animTkg2Ene0 = 17 goto animTkg2Ene_12 ; ムコー return *animTkg2Ene_0 ; チユ系 *animTkg2Ene_6 ; ソセー系 if flgBgm = 1 then sound A5_03091 endif if btlAsrt[animTkg2Ene1] > 0 then animTkg2Ene2 = 2 gosub animEffect endif gosub waitBtl return *animTkg2Ene_2 ; フォノ系 if flgBgm = 1 then sound A5_03066 endif if btlAsrt[animTkg2Ene1] > 0 then animTkg2Ene2 = 1 gosub animEffect endif gosub waitBtl return *animTkg2Ene_1 ; スイマ系 *animTkg2Ene_3 ; ドク系 *animTkg2Ene_7 ; マフージ系 *animTkg2Ene_12 ; ムコー系 if flgBgm = 1 then sound A5_03064 endif if btlAsrt[animTkg2Ene1] > 0 then animTkg2Ene2 = 4 gosub animEffect endif gosub waitBtl return *animTkg2Ene_4 ; アプ系 *animTkg2Ene_5 ; ディプ系 *animTkg2Ene_10 ; ハプ系 *animTkg2Ene_11 ; リフレク系 if flgBgm = 1 then sound A5_03096 endif if btlAsrt[animTkg2Ene1] > 0 then animTkg2Ene2 = 3 gosub animEffect endif gosub waitBtl return *animTkg2Ene_8 ; コルム系 if flgBgm = 1 then sound A5_03069 endif if btlAsrt[animTkg2Ene1] > 0 then animTkg2Ene2 = 5 gosub animEffect endif gosub waitBtl return *animTkg2Ene_9 ; ボルト系 if flgBgm = 1 then sound A5_03072 endif if btlAsrt[animTkg2Ene1] > 0 then animTkg2Ene2 = 6 gosub animEffect endif gosub waitBtl return ; 魔法効果 (引数:animTkg2Ene1=相手、animTkg2Ene2=EF_ANM番号、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *animEffect getGrpPos grpEne[animTkg2Ene1] animEffectX animEffectY load $EF_ANM[animTkg2Ene2]$ grpEffect 2000 zoom grpEffect 200 200 locateCenter grpEffect animEffectX animEffectY paint grpEffect return ; 魔法結果 (引数:arg0=魔法、arg1=使用者、arg2=相手、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *kekkaTkg kekkaTkg0 = arg0 kekkaTkg1 = arg1 kekkaTkg2 = arg2 if btlHp[kekkaTkg2] = 0 then ; 相手がすでにやられてる if TKG_DEAD[kekkaTkg0] = 0 then ; 死者に効かない return endif else ; リフレクチェック if btlJoutai7[kekkaTkg2] > 0 then msg 0 $btlNm[kekkaTkg2]$の光の壁が魔法をさえぎった . gosub waitBtl btlJoutai7[kekkaTkg2] - 1 if btlJoutai7[kekkaTkg2] = 0 then gosub repaintAllSts msg 0 光の壁は消え去った . gosub waitBtl endif return endif endif getArySts0 = kekkaTkg1 gosub getArySts getAryStsMatk = ary3[3] getArySts0 = kekkaTkg2 gosub getArySts getAryStsMdef = ary3[4] if kekkaTkg0 = 0 goto kekkaTkg_0 ; チユ if kekkaTkg0 = 1 goto kekkaTkg_1 ; スイマ if kekkaTkg0 = 2 goto kekkaTkg_2 ; フォノ if kekkaTkg0 = 3 goto kekkaTkg_3 ; ドク if kekkaTkg0 = 4 goto kekkaTkg_4 ; アプ if kekkaTkg0 = 5 goto kekkaTkg_5 ; ディプ if kekkaTkg0 = 6 goto kekkaTkg_0 ; チユゼ if kekkaTkg0 = 7 goto kekkaTkg_1 ; スイマゼ if kekkaTkg0 = 8 goto kekkaTkg_2 ; フォノゼ if kekkaTkg0 = 9 goto kekkaTkg_6 ; ソセー if kekkaTkg0 = 10 goto kekkaTkg_7 ; マフージ if kekkaTkg0 = 11 goto kekkaTkg_8 ; コルム if kekkaTkg0 = 12 goto kekkaTkg_8 ; コルムゼ if kekkaTkg0 = 13 goto kekkaTkg_9 ; ボルト if kekkaTkg0 = 14 goto kekkaTkg_9 ; ボルトゼ if kekkaTkg0 = 15 goto kekkaTkg_10 ; ハプ if kekkaTkg0 = 16 goto kekkaTkg_11 ; リフレク if kekkaTkg0 = 17 goto kekkaTkg_12 ; ムコー return *kekkaTkg_0 ; チユ系 kekkaTkgVal < getAryStsMatk btlHp[kekkaTkg2] + kekkaTkgVal if btlHp[kekkaTkg2] > btlMhp[kekkaTkg2] then kekkaTkgVal < kekkaTkgVal - ( btlHp[kekkaTkg2] - btlMhp[kekkaTkg2] ) btlHp[kekkaTkg2] = btlMhp[kekkaTkg2] endif if btlAsrt[kekkaTkg2] = 0 then gosub repaintAllSts endif msg 0 $btlNm[kekkaTkg2]$のHPが$kekkaTkgVal$回復した . gosub waitBtl return *kekkaTkg_1 ; スイマ系 gosub checkBoss if checkBossRet > 0 then return endif kekkaTkgVal = MAX_SLEEP if getAryStsMdef > 0 then kekkaTkgVal < getAryStsMatk * 2 / getAryStsMdef endif ;スイマ matk=$getAryStsMatk$ mdef=$getAryStsMdef$ turn=$kekkaTkgVal$ if kekkaTkgVal <= 0 then msg 0 $btlNm[kekkaTkg2]$には効かなかった . else btlJoutai1[kekkaTkg2] + kekkaTkgVal if btlJoutai1[kekkaTkg2] > MAX_SLEEP then btlJoutai1[kekkaTkg2] = MAX_SLEEP endif gosub repaintAllSts msg 0 $btlNm[kekkaTkg2]$は眠ってしまった . endif gosub waitBtl return *kekkaTkg_2 ; フォノ系 ; ダメージ値算出 arg1 < getAryStsMatk - getAryStsMdef / 2 if arg1 <= 0 then arg1 = 1 endif if btlJoutai0[kekkaTkg1] > 0 then ; 気合 arg1 < arg1 * btlJoutai0[kekkaTkg1] * 2 endif if btlCmnd[kekkaTkg2] = -2 then ; 防御 arg1 / 2 endif arg0 = kekkaTkg2 gosub damage return *kekkaTkg_3 ; ドク系 kekkaTkgVal = MAX_POISON if getAryStsMdef > 0 then kekkaTkgVal < getAryStsMatk * 2 / getAryStsMdef + MIN_POISON endif btlJoutai2[kekkaTkg2] + kekkaTkgVal if btlJoutai2[kekkaTkg2] > MAX_POISON then btlJoutai2[kekkaTkg2] = MAX_POISON endif gosub repaintAllSts msg 0 $btlNm[kekkaTkg2]$は毒におかされた . gosub waitBtl return *kekkaTkg_4 ; アプ系 kekkaTkgVal < getAryStsMatk / 10 + MIN_ATK_UP btlJoutai3[kekkaTkg2] + kekkaTkgVal if btlJoutai3[kekkaTkg2] > MAX_ATK_UP then btlJoutai3[kekkaTkg2] = MAX_ATK_UP endif msg 0 $btlNm[kekkaTkg2]$の$STS_NM[2]$が上がった . gosub waitBtl return *kekkaTkg_5 ; ディプ系 kekkaTkgVal < getAryStsMatk * 10 + MIN_DEF_UP btlJoutai4[kekkaTkg2] + kekkaTkgVal if btlJoutai4[kekkaTkg2] > MAX_DEF_UP then btlJoutai4[kekkaTkg2] = MAX_DEF_UP endif msg 0 $btlNm[kekkaTkg2]$の$STS_NM[3]$が上がった . gosub waitBtl return *kekkaTkg_10 ; ハプ系 kekkaTkgVal < getAryStsMatk / 10 + MIN_SPD_UP btlJoutai6[kekkaTkg2] + kekkaTkgVal if btlJoutai6[kekkaTkg2] > MAX_SPD_UP then btlJoutai6[kekkaTkg2] = MAX_SPD_UP endif msg 0 $btlNm[kekkaTkg2]$の$STS_NM[4]$が上がった . gosub waitBtl return *kekkaTkg_6 ; ソセー系 if btlHp[kekkaTkg2] > 0 then msg 0 $btlNm[kekkaTkg2]$には何も起こらなかった . gosub waitBtl else btlHp[kekkaTkg2] < btlMhp[kekkaTkg2] / 2 gosub repaintAllSts msg 0 $btlNm[kekkaTkg2]$が復活した . paint grpEne[kekkaTkg2] gosub waitBtl endif return *kekkaTkg_7 ; マフージ系 gosub checkBoss if checkBossRet > 0 then return endif kekkaTkgVal = MAX_SILENCE if getAryStsMdef > 0 then kekkaTkgVal < getAryStsMatk * 2 / getAryStsMdef + MIN_SILENCE endif btlJoutai5[kekkaTkg2] + kekkaTkgVal if btlJoutai5[kekkaTkg2] > MAX_SILENCE then btlJoutai5[kekkaTkg2] = MAX_SILENCE endif gosub repaintAllSts msg 0 $btlNm[kekkaTkg2]$は魔法を封じられた . gosub waitBtl return *kekkaTkg_8 ; コルム系 ; ダメージ値算出 arg1 < getAryStsMatk - getAryStsMdef / 2 if arg1 <= 0 then arg1 = 1 endif if btlJoutai0[kekkaTkg2] > 0 then ; 相手の気合 msg 0 $btlNm[kekkaTkg2]$は気合が元に戻った . gosub waitBtl btlJoutai0[kekkaTkg2] = 0 endif if btlCmnd[kekkaTkg2] = -2 then ; 防御 arg1 / 2 endif arg0 = kekkaTkg2 gosub damage return *kekkaTkg_9 ; ボルト系 ; ダメージ値算出 arg1 < getAryStsMatk - getAryStsMdef / 2 if arg1 <= 0 then arg1 = 1 endif arg0 = kekkaTkg2 gosub damage return *kekkaTkg_11 ; リフレク系 kekkaTkgVal < getAryStsMatk / 10 + MIN_REF btlJoutai7[kekkaTkg2] + kekkaTkgVal if btlJoutai7[kekkaTkg2] > MAX_REF then btlJoutai7[kekkaTkg2] = MAX_REF endif gosub repaintAllSts msg 0 $btlNm[kekkaTkg2]$を光の壁が包んだ . gosub waitBtl return *kekkaTkg_12 ; ムコー系 arg0 = kekkaTkg2 gosub clearJoutai gosub repaintAllSts msg 0 $btlNm[kekkaTkg2]$の状態が全て元に戻った . gosub waitBtl return ; ボスに効かない魔法のときに呼ぶ --------------------------------------------------------------------------------------------------------------------------- *checkBoss checkBossRet = 0 if btlAsrt[arg2] > 1 then ; ボス msg 0 しかし$btlNm[arg2]$には効かなかった! . gosub waitBtl checkBossRet = 1 endif return ; ダメージ (引数:arg0=番号、arg1=値、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *damage damage0 = arg0 damage1 = arg1 ; 効果音 if flgBgm = 1 then sound SE_DMG endif ; アニメーション if btlAsrt[damage0] = 0 then ; 味方 shake btlPartyNo[damage0] else ; 敵 clearAnim grpEne[damage0] if btlAsrt[damage0] = 1 then ; ザコ ; ぶっとび getGrpZoom grpEne[damage0] damageX damageY damageX2 < damageX / 2 damageY2 < damageY / 2 addAnimRotate grpEne[damage0] 0 4 359 0 addAnimZoom grpEne[damage0] 1 4 damageX2 damageY2 else ; ボス ; 点滅 for damage2 = 0 to 3 addAnimAlpha grpEne[damage0] 1 1 0 addAnimAlpha grpEne[damage0] 1 1 100 endfor endif startAnim grpEne[damage0] endif msg 0 $btlNm[damage0]$は$damage1$のダメージ . gosub waitBtl ; アニメーション後処理 if btlAsrt[damage0] > 0 then ; 敵 stopAnim grpEne[damage0] if btlAsrt[damage0] = 1 then ; ザコ zoom grpEne[damage0] damageX damageY ; ぶっとび解除 else ; ボス alpha grpEne[damage0] 100 ; 点滅解除 endif rotate grpEne[damage0] 0 endif btlHp[damage0] - damage1 if btlHp[damage0] <= 0 then ; やられた btlHp[damage0] = 0 if btlAsrt[damage0] > 0 then erase grpEne[damage0] wipe endif ; 状態クリア arg0 = damage0 gosub clearJoutai ; 全滅かチェック arg0 = btlAsrt[damage0] gosub getSuuZan if ret0 = 0 then isBtlEnd = 1 endif endif if btlAsrt[damage0] = 0 then gosub repaintAllSts endif return ; 味方全員コマンド入力 (引数:なし、戻り値:ret0=-1戻る,0OK、)--------------------------------------------------------------------------------------------------------------------------- *allInput allInput0 = 0 allInput1 = 1 ; 方向 *allInput_100 if btlAsrt[allInput0] = 0 then ; 味方 if btlHp[allInput0] > 0 then ; 生きてる ; 眠りチェック if btlJoutai1[allInput0] = 0 then ; 眠ってない ; 1体コマンド入力 arg0 = allInput0 gosub inputCommand if ret0 < 0 then ; 戻る btlCmnd[allInput0] = -9 ; 1体前へ allInput1 = -1 else ; 次へ allInput1 = 1 endif endif endif endif allInput0 + allInput1 if allInput0 = SUU_BTL_DT then ; 全員OK ret0 = 0 else if allInput0 < 0 then ; 戻る ret0 = -1 else goto allInput_100 endif arg0 = -1 gosub paintAllSts return ; 魔法配列取得 (引数:arg0=使用者、戻り値:ary0[]=魔法配列、ret0=魔法数、)--------------------------------------------------------------------------------------------------------------------------- *getAryTkg ret0 = 0 ary0 = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ; SUU_TKG以上 if btlTkg0[arg0] >= 0 then ary0[ret0] = btlTkg0[arg0] ret0 + 1 endif if btlTkg1[arg0] >= 0 then ary0[ret0] = btlTkg1[arg0] ret0 + 1 endif if btlTkg2[arg0] >= 0 then ary0[ret0] = btlTkg2[arg0] ret0 + 1 endif if btlTkg3[arg0] >= 0 then ary0[ret0] = btlTkg3[arg0] ret0 + 1 endif if btlTkg4[arg0] >= 0 then ary0[ret0] = btlTkg4[arg0] ret0 + 1 endif if btlTkg5[arg0] >= 0 then ary0[ret0] = btlTkg5[arg0] ret0 + 1 endif if btlTkg6[arg0] >= 0 then ary0[ret0] = btlTkg6[arg0] ret0 + 1 endif if btlTkg7[arg0] >= 0 then ary0[ret0] = btlTkg7[arg0] ret0 + 1 endif return ; 魔法配列戻す (引数:arg0=使用者、ary0[]=魔法配列、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *setAryTkg btlTkg0[arg0] = ary0[0] btlTkg1[arg0] = ary0[1] btlTkg2[arg0] = ary0[2] btlTkg3[arg0] = ary0[3] btlTkg4[arg0] = ary0[4] btlTkg5[arg0] = ary0[5] btlTkg6[arg0] = ary0[6] btlTkg7[arg0] = ary0[7] return ; 1体コマンド入力 (引数:arg0=番号、戻り値:ret0=-1戻る,0OK、)--------------------------------------------------------------------------------------------------------------------------- *inputCommand inputCommand0 = arg0 *inputCommand_100 clear 0 gosub paintAllSts menu m0 mpos 10 120 70 こうげき まほう ぼうぎょ ためる 戻る endmenu if m0 = 0 then ; 攻撃 ; 相手選択 gosub selectAite if ret0 < 0 goto inputCommand_100 btlCmnd[inputCommand0] = -1 ; 攻撃 btlAite[inputCommand0] = ret0 ret0 = 0 return else if m0 = 1 then ; 魔法 ; 魔法封じチェック if btlJoutai5[inputCommand0] > 0 then 魔法は封じられている goto inputCommand_100 endif selTkg0 = inputCommand0 selTkgFlg = 1 gosub selTkg if selTkg1 < 0 goto inputCommand_100 btlCmnd[inputCommand0] = selTkg1 btlAite[inputCommand0] = selTkg2 ret0 = 0 return else if m0 = 2 then ; 防御 btlCmnd[inputCommand0] = -2 ; 防御 ret0 = 0 return else if m0 = 3 then ; 気合 btlCmnd[inputCommand0] = -3 ; 気合 ret0 = 0 return endif ; 戻る ret0 = -1 return ; 味方が魔法を選択(引数:selTkg0=使用者、selTkgFlg=0フィールド,1バトル、戻り値:selTkg1=魔法OR-1、selTkg2=相手OR-1、) --------------------------------------------------------------------------------------------------------------------------- *selTkg selTkg1 = -1 arg0 = selTkg0 gosub getAryTkg selTkgSuu = ret0 if selTkgSuu = 0 then 魔法を覚えていない return endif selTkgMax < selTkgSuu - 1 for selTkgi = 0 to selTkgMax selTkg3 = ary0[selTkgi] ary1[selTkgi] = TKG_NM[selTkg3] ary2[selTkgi] = TKG_MP[selTkg3] endfor *selTkg_100 clear 0 modeMenu = 2 menu selTkg3 ary1 selTkgSuu ary2 selTkgSuu mpos 10 115 80 戻る "" endmenu modeMenu = -1 clear 9 if selTkg3 = selTkgSuu then ; 戻る return endif if ary2[selTkg3] > btlMp[selTkg0] then MPが足りません goto selTkg_100 endif selTkg3 = ary0[selTkg3] if selTkgFlg = 1 then if TKG_BTL[selTkg3] = 0 then 戦闘中は使えません goto selTkg_100 endif else if TKG_MAP[selTkg3] = 0 then フィールドでは使えません goto selTkg_100 endif endif selTkg2 = -1 if TKG_ALL[selTkg3] = 0 then *selTkg_aite if TKG_ASRT[selTkg3] = 0 then ; 味方選択 selectMikataStr = "誰に?" gosub selectMikata else ; 敵選択 gosub selectAite endif if ret0 < 0 goto selTkg ; ary使用済みのため再セット if btlHp[ret0] = 0 then ; 相手がすでにやられてる if TKG_DEAD[selTkg3] = 0 then ; 死者に効かない goto selTkg_aite endif else ; 相手がすでにやられてない if TKG_DEAD[selTkg3] = 1 then ; 死者に効く goto selTkg_aite endif endif selTkg2 = ret0 endif selTkg1 = selTkg3 return ; 味方が敵を選択(引数:なし、戻り値:ret0=-1戻る,0以上、) --------------------------------------------------------------------------------------------------------------------------- *selectAite wk1 = 0 selectAiteSv = -9999 for i = 0 to MAX_BTL_DT if btlAsrt[i] > 0 then ; 敵 if btlHp[i] > 0 then ; 生きてる ary0[wk1] = i getGrpPos grpEne[i] selectAiteX selectAiteY getGrpSize grpEne[i] selectAiteW selectAiteH ary1[wk1] < selectAiteX - selectAiteW / 2 ary2[wk1] < selectAiteY - selectAiteH / 2 ary3[wk1] = selectAiteW ary4[wk1] = selectAiteH if ary1[wk1] < selectAiteSv then ; 左隣と重なっているので短く selectAiteZ < ( selectAiteSv - ary1[wk1] ) / 2 ary1[wk1] + selectAiteZ ary3[wk1] - selectAiteZ endif selectAiteSv < selectAiteX + selectAiteW / 2 wk1 + 1 endif endif endfor if wk1 = 1 then ; 敵が残り1体 wk1 - 1 ret0 = ary0[wk1] return endif msg 9 425 300 150 1 FFFFFF 0000FF 0000FF left 戻る . ary1[wk1] = 150 ary2[wk1] = 100 ary3[wk1] = 150 ary4[wk1] = 50 selectAiteMax = wk1 wk1 + 1 msg 0 どれに? . modeMenu = 0 clickmap m1 wk1 ary1 ary2 ary3 ary4 endclickmap modeMenu = -1 clear 9 if m1 = selectAiteMax then ; 戻る ret0 = -1 return endif ; 相手選択した ret0 = ary0[m1] return ; 味方が味方を選択(引数:selectMikataStr=「誰に」「誰が」、戻り値:ret0=-1戻る,0以上、) --------------------------------------------------------------------------------------------------------------------------- *selectMikata selectMikata0 = 0 selectMikataX = -260 for selectMikata_i = 0 to MAX_BTL_DT if btlAsrt[selectMikata_i] = 0 then ; 味方 ary0[selectMikata0] = selectMikata_i ary1[selectMikata0] = selectMikataX ary2[selectMikata0] = -190 ary3[selectMikata0] = 115 ary4[selectMikata0] = 80 selectMikata0 + 1 selectMikataX + 135 endif endfor msg 0 $selectMikataStr$ . msg 9 425 300 150 1 FFFFFF 0000FF 0000FF left 戻る . ary1[selectMikata0] = 150 ary2[selectMikata0] = 100 ary3[selectMikata0] = 150 ary4[selectMikata0] = 50 selectMikataMax = selectMikata0 selectMikata0 + 1 modeMenu = 1 clickmap m1 selectMikata0 ary1 ary2 ary3 ary4 endclickmap modeMenu = -1 clear 9 if m1 = selectMikataMax then ; 戻る ret0 = -1 return endif ; 相手選択した ret0 = ary0[m1] return ; 先頭の1体にコマンド逃げるセット (引数:setEscape0=0味方,1敵、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *setEscape if setEscape0 > 1 then setEscape0 = 1 endif for setEscape_i = 0 to MAX_BTL_DT arg0 = btlAsrt[setEscape_i] if arg0 > 1 then arg0 = 1 endif if arg0 = setEscape0 then if btlHp[setEscape_i] > 0 then ; 生きてる if btlJoutai1[setEscape_i] = 0 then ; 眠ってない btlCmnd[setEscape_i] = -8 ; 逃げる return endif endif endif endfor return ; 全員コマンド自動セット (引数:autoAll0=0味方,1敵、autoKind=0いろいろ,1攻撃のみ、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *autoAll if autoAll0 > 1 then autoAll0 = 1 endif for autoAll1 = 0 to MAX_BTL_DT arg0 = btlAsrt[autoAll1] if arg0 > 1 then arg0 = 1 endif if arg0 = autoAll0 then if btlHp[autoAll1] > 0 then ; 生きてる arg0 = autoAll1 gosub autoCommand endif endif endfor return ; 1体コマンド自動セット (引数:arg0=番号、autoKind=0いろいろ,1攻撃のみ、戻り値:なし)--------------------------------------------------------------------------------------------------------------------------- *autoCommand autoCommand0 = arg0 if autoKind = 1 then autoCommand1 = 0 else rand 3 autoCommand1 endif ; デバッグ ;autoCommand1 = 1 if autoCommand1 = 1 then ; 魔法 autoCommand1 = 0 ; やっぱり攻撃 ; 魔法封じチェック if btlJoutai5[autoCommand0] > 0 goto autoCommand_900 ; 魔法は封じられている ; 魔法を配列にセット arg0 = autoCommand0 gosub getAryTkg autoCommand2 = ret0 if autoCommand2 > 0 then ; 魔法を1つ以上覚えている autoCommand3 < autoCommand2 - 1 rand autoCommand3 autoCommand4 autoCommand4 = ary0[autoCommand4] ; デバッグ ;btlMp[autoCommand0] = 99; ;autoCommand4 = 9 ; ソセー ;autoCommand4 = 7 ; スイマゼ ;autoCommand4 = 4 ; アプ ;rand 2 autoCommand4 ;if autoCommand4 = 0 then ; autoCommand4 = 1 ; スイマ ;else if autoCommand4 = 1 then ; autoCommand4 = 10 ; マフージ ;else ; autoCommand4 = 3 ; ドク ;endif if TKG_MP[autoCommand4] <= btlMp[autoCommand0] then ; MPが足りている if TKG_BTL[autoCommand4] = 1 then ; 戦闘中使用可 ret0 = -1 if TKG_ALL[autoCommand4] = 0 then ; 単体 arg0 = btlAsrt[autoCommand0] if TKG_ASRT[autoCommand4] = 0 then gosub autoMikata else gosub autoAite endif if btlHp[ret0] = 0 then if TKG_DEAD[autoCommand4] = 0 then ret0 = -2 ; 相手HP=0でソセー系でない endif else if TKG_DEAD[autoCommand4] = 1 then ret0 = -2 ; 相手HP>0でソセー系 endif endif endif if ret0 != -2 then if autoCommand4 = 0 then ; チユ if btlHp[ret0] >= btlMhp[ret0] then ret0 = -2; ; 相手HPが減ってない endif else if autoCommand4 = 6 then ; チユゼ getSuuPinch0 = btlAsrt[autoCommand0] gosub getSuuPinch if getSuuPinch1 < 2 then ret0 = -2; ; 2体以上HPが減ってない endif endif endif if ret0 != -2 then ; 魔法発動 autoCommand1 = -1 btlCmnd[autoCommand0] = autoCommand4 btlAite[autoCommand0] = ret0 endif endif endif endif else if autoCommand1 = 2 then ; 防御 rand 1 autoCommand3 if autoCommand3 = 0 then autoCommand1 = 0 ; やっぱり攻撃 else btlCmnd[autoCommand0] = -2 ; 防御 endif else if autoCommand1 = 3 then ; 気合 if btlJoutai0[autoCommand0] = MAX_KIAI then autoCommand1 = 0 ; やっぱり攻撃 else btlCmnd[autoCommand0] = -3 ; 気合 endif endif *autoCommand_900 if autoCommand1 = 0 then ; 攻撃 ; 相手自動セット arg0 = btlAsrt[autoCommand0] gosub autoAite btlCmnd[autoCommand0] = -1 ; 攻撃 btlAite[autoCommand0] = ret0 endif return ; 味方でHPが減っている人数(引数:getSuuPinch0=asrt、戻り値:getSuuPinch1=数) --------------------------------------------------------------------------------------------------------------------------- *getSuuPinch if getSuuPinch0 > 1 then getSuuPinch0 = 1 endif getSuuPinch1 = 0 for getSuuPinch_i = 0 to MAX_BTL_DT getSuuPinch2 = btlAsrt[getSuuPinch_i] if getSuuPinch2 > 1 then getSuuPinch2 = 1 endif if getSuuPinch2 = getSuuPinch0 then ; 味方 if btlHp[getSuuPinch_i] > 0 then ; 生きてる if btlHp[getSuuPinch_i] < btlMhp[getSuuPinch_i] then ; HP減っている getSuuPinch1 + 1 endif endif endif endfor return ; 敵を自動選択(引数:arg0=自分のasrt、戻り値:ret0=相手) --------------------------------------------------------------------------------------------------------------------------- *autoAite autoAite0 = arg0 if autoAite0 > 1 then autoAite0 = 1 endif rand 5 autoAiteR autoAite1 = 0 *autoAite_100 if btlAsrt[autoAite1] != -1 then autoAite9 = btlAsrt[autoAite1] if autoAite9 > 1 then autoAite9 = 1 endif if autoAite9 != autoAite0 then ; 敵 if btlHp[autoAite1] > 0 then ; 生きてる autoAiteR - 1 if autoAiteR < 0 then ; 決定 ret0 = autoAite1 return endif endif endif endif autoAite1 + 1 if autoAite1 > MAX_BTL_DT then autoAite1 = 0 endif goto autoAite_100 ; 味方を自動選択(引数:arg0=自分のasrt、戻り値:ret0=相手) --------------------------------------------------------------------------------------------------------------------------- *autoMikata autoMikata0 = arg0 if autoMikata0 > 1 then autoMikata0 = 1 endif rand 5 autoMikataR autoMikata1 = 0 *autoMikata_100 autoMikata9 = btlAsrt[autoMikata1] if autoMikata9 > 1 then autoMikata9 = 1 endif if autoMikata9 = autoMikata0 then ; 味方 autoMikataR - 1 if autoMikataR < 0 then ; 決定 ret0 = autoMikata1 return endif endif autoMikata1 + 1 if autoMikata1 > MAX_BTL_DT then autoMikata1 = 0 endif goto autoMikata_100 ; 敵か味方の残数(引数:arg0=asrt、戻り値:ret0=数) --------------------------------------------------------------------------------------------------------------------------- *getSuuZan ret0 = 0 getSuuZan0 = arg0 if getSuuZan0 > 1 then getSuuZan0 = 1 endif for getSuuZan1 = 0 to MAX_BTL_DT getSuuZan9 = btlAsrt[getSuuZan1] if getSuuZan9 > 1 then getSuuZan9 = 1 endif if getSuuZan9 = getSuuZan0 then if btlHp[getSuuZan1] > 0 then ; 生きてる ret0 + 1 endif endif endfor return ; アイテム追加(引数:addItem0=種類、戻り:addItem1=0以上OK,-1持ち物いっぱい) --------------------------------------------------------------------------------------------------------------------------- *addItem for addItem_i = 0 to MAX_ITM if itms[addItem_i] < 0 then itms[addItem_i] = addItem0 addItem1 = addItem_i ; 入れた位置を返す return endif endfor addItem1 = -1 ; 持ち物いっぱい return ; アイテム削除(引数:delItem0=itms番号、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *delItem if itmSb[delItem0] >= 0 then delItem1 = itms[delItem0] hazusuItem0 = itmSb[delItem0] hazusuItem1 = SB_POS[delItem1] gosub hazusuItem endif itms[delItem0] = -1 return ; アイテム装備可能か(引数:soubi2=アイテム種類、soubi1=相手、戻り:soubi2=0以上OK,-1以下NG) --------------------------------------------------------------------------------------------------------------------------- *okSoubi if soubi2 < 0 then return ; 指定itms番号にアイテムなし endif if btlKind[soubi1] < SB_FROM[soubi2] then soubi2 = -2 return ; その相手はそのアイテムを装備できない endif if btlKind[soubi1] > SB_TO[soubi2] then soubi2 = -2 return ; その相手はそのアイテムを装備できない endif return ; アイテム装備(引数:soubi0=itms番号、soubi1=相手、戻り:soubi2=0以上OK,-1以下NG) --------------------------------------------------------------------------------------------------------------------------- *soubi soubi2 = itms[soubi0] ; アイテム種類 gosub okSoubi if soubi2 < 0 then return endif ary0 = ptEquip0[soubi1] ptEquip1[soubi1] ptEquip2[soubi1] ptEquip3[soubi1] ptEquip4[soubi1] soubi3 = SB_POS[soubi2] if ary0[soubi3] >= 0 then ; その部位にすでに装備してあるものを外す soubi4 = ary0[soubi3] itmSb[soubi4] = -1 endif ary0[soubi3] = soubi0 ptEquip0[soubi1] = ary0[0] ptEquip1[soubi1] = ary0[1] ptEquip2[soubi1] = ary0[2] ptEquip3[soubi1] = ary0[3] ptEquip4[soubi1] = ary0[4] itmSb[soubi0] = soubi1 return ; アイテム外す(引数:hazusuItem0=相手、hazusuItem1=部位、戻り:なし) --------------------------------------------------------------------------------------------------------------------------- *hazusuItem ary0 = ptEquip0[hazusuItem0] ptEquip1[hazusuItem0] ptEquip2[hazusuItem0] ptEquip3[hazusuItem0] ptEquip4[hazusuItem0] hazusuItem2 = ary0[hazusuItem1] if hazusuItem2 >= 0 then itmSb[hazusuItem2] = -1 ary0[hazusuItem1] = -1 ptEquip0[hazusuItem0] = ary0[0] ptEquip1[hazusuItem0] = ary0[1] ptEquip2[hazusuItem0] = ary0[2] ptEquip3[hazusuItem0] = ary0[3] ptEquip4[hazusuItem0] = ary0[4] endif return ; 指定アイテムを装備しているか(引数:isSoubi0=使用者、isSoubi1=アイテム、戻り値:isSoubi2=0No,1Yes、使用:ary0[]) --------------------------------------------------------------------------------------------------------------------------- *isSoubi ary0 = ptEquip0[isSoubi0] ptEquip1[isSoubi0] ptEquip2[isSoubi0] ptEquip3[isSoubi0] ptEquip4[isSoubi0] isSoubi2 = SB_POS[isSoubi1] isSoubi2 = ary0[isSoubi2] if isSoubi2 >= 0 then if itms[isSoubi2] = isSoubi1 then isSoubi2 = 1 return endif endif isSoubi2 = 0 return ; 装備配列取得(引数:getArySb0=使用者、戻り値:ary0[]=装備配列、ary1[]=装備名) --------------------------------------------------------------------------------------------------------------------------- *getArySb ary0 = ptEquip0[getArySb0] ptEquip1[getArySb0] ptEquip2[getArySb0] ptEquip3[getArySb0] ptEquip4[getArySb0] ary1 = "" "" "" "" "" for getArySb_i = 0 to 4 if ary0[getArySb_i] >= 0 then getArySb1 = ary0[getArySb_i] getArySb2 = itms[getArySb1] ary1[getArySb_i] = SB_NM[getArySb2] endif endfor return ; 装備と魔法効果を考慮したステータス配列取得(引数:getArySts0=使用者、戻り値:ary3[]=ステータス配列) --------------------------------------------------------------------------------------------------------------------------- *getArySts ary3 = btlAtk[getArySts0] btlDef[getArySts0] btlSpd[getArySts0] btlMatk[getArySts0] btlMdef[getArySts0] if getArySts0 < SUU_PARTY then ary4 = ptEquip0[getArySts0] ptEquip1[getArySts0] ptEquip2[getArySts0] ptEquip3[getArySts0] ptEquip4[getArySts0] for getArySts_i = 0 to 4 if ary4[getArySts_i] >= 0 then getArySts2 = ary4[getArySts_i] getArySts1 = itms[getArySts2] ary3[0] + SB_ATK[getArySts1] ary3[1] + SB_DEF[getArySts1] ary3[2] + SB_SPD[getArySts1] ary3[3] + SB_MATK[getArySts1] ary3[4] + SB_MDEF[getArySts1] endif endfor endif if btlJoutai3[getArySts0] > 0 then ary3[0] < ary3[0] * ( PAR_ATK_UP + 100 ) / 100 endif if btlJoutai4[getArySts0] > 0 then ary3[1] < ary3[1] * ( PAR_DEF_UP + 100 ) / 100 endif if btlJoutai6[getArySts0] > 0 then ary3[2] < ary3[2] * ( PAR_SPD_UP + 100 ) / 100 endif return ; フィールドで装備 --------------------------------------------------------------------------------------------------------------------------- *fieldSb selectMikataStr = "誰が?" gosub selectMikata if ret0 >= 0 then selSb0 = ret0 *fieldSb_100 gosub selSb if selSb1 >= 0 then goto fieldSb_100 else goto fieldSb endif endif return ; 味方が装備入れ替え(引数:selSb0=使用者、戻り値:selSb1=0以上OK、-1戻る) --------------------------------------------------------------------------------------------------------------------------- *selSb getArySb0 = selSb0 gosub getArySb modeMenu = 3 menu selSb1 POS_NM 5 ary1 5 mpos 10 120 120 戻る "" endmenu modeMenu = -1 if selSb1 = 5 then selSb1 = -1 return endif selSb4 = ary0[selSb1] ; 現在装備中のアイテムOR-1 ; 選んだ部位に装備できるアイテムをメニューに selSb2 = 0 if selSb4 >= 0 then ary1[selSb2] = -1 ary2[selSb2] = -1 ary3[selSb2] = "外す" ary4[selSb2] = "" selSb2 + 1 endif for selSb_i = 0 to MAX_ITM if itms[selSb_i] >= 0 then selSb3 = itms[selSb_i] if SB_POS[selSb3] = selSb1 then ary1[selSb2] = selSb_i ; itms位置 ary2[selSb2] = selSb3 ; 種類 ary3[selSb2] = SB_NM[selSb3] ; 名称 if itmSb[selSb_i] >= 0 then selSb3 = itmSb[selSb_i] ary4[selSb2] = btlNm[selSb3] ; 装備者 else ary4[selSb2] = "" endif selSb2 + 1 endif endif endfor modeMenu = 4 menu selSb3 ary3 selSb2 ary4 selSb2 mpos 10 120 140 mrow 7 戻る "" endmenu modeMenu = -1 if selSb3 = selSb2 goto selSb if ary1[selSb3] < 0 then ; 外すだけ hazusuItem0 = selSb0 hazusuItem1 = selSb1 gosub hazusuItem else ; 装備 soubi0 = ary1[selSb3] soubiSv = itmSb[soubi0] if soubiSv >= 0 then ; 装備者がいるなら ; 外す hazusuItem0 = soubiSv hazusuItem1 = selSb1 gosub hazusuItem endif soubi1 = selSb0 gosub soubi if soubi2 < 0 then 装備できません clear 0 ; 外した場合戻す if soubiSv >= 0 then ; 装備 soubi0 = ary1[selSb3] soubi1 = soubiSv gosub soubi endif endif endif return ; 武器屋 --------------------------------------------------------------------------------------------------------------------------- *shop clear paintGold0 = 1 paintGold1 = 10 gosub paintGold shop2 = CITY_SHP[nowMap] msg いらっしゃいませ . load $SHP_FACE[shop2]$ grpFace 2000 paint grpFace wipe clear 0 *shop_100 menu shopM mpos 10 120 70 買う 売る やめる endmenu if shopM = 0 goto shop_buy if shopM = 1 goto shop_sell msg ありがとうございました . erase grpFace wipe clear 0 gosub repaintAllSts return *shop_buy shop4 = 0 shop_i = 0 *shop_buy50 if shop4 = shop2 goto shop_buy100 *shop_buy70 shop_i + 1 if SHP_ITM[shop_i] < 0 then shop4 + 1 shop_i + 1 goto shop_buy50 endif goto shop_buy70 *shop_buy100 shop1 = 0 *shop_buy150 if SHP_ITM[shop_i] >= 0 then shop0 = SHP_ITM[shop_i] ary1[shop1] = shop_i ary2[shop1] = shop0 ary3[shop1] = SB_NM[shop0] ary4[shop1] = SB_PRS[shop0] shop4 = "G" ary4[shop1] + shop4 shop1 + 1 shop_i + 1 goto shop_buy150 endif modeMenu = 5 menu shopM ary3 shop1 ary4 shop1 mpos 10 50 120 mrow 11 戻る "" endmenu modeMenu = -1 clear 5 clear 6 if shopM = shop1 goto shop_100 ; 戻る msg $ary4[shopM]$ですが、よろしいですか? . menu shop0 mpos 10 120 70 はい いいえ endmenu if shop0 = 0 then shop0 = ary2[shopM] if ptGold < SB_PRS[shop0] then GOLDが足りません else addItem0 = shop0 gosub addItem if addItem1 < 0 then 持ち物がいっぱいです else ptGold - SB_PRS[shop0] gosub paintGold ありがとうございました endif endif endif clear 0 goto shop_buy *shop_sell shop1 = 0 for shop_i = 0 to MAX_ITM if itms[shop_i] >= 0 then shop0 = itms[shop_i] ary1[shop1] = shop_i ary2[shop1] = shop0 ary3[shop1] = SB_NM[shop0] ary4[shop1] < SB_PRS[shop0] / 2 shop4 = "G" ary4[shop1] + shop4 shop0 = itmSb[shop_i] if shop0 >= 0 then shop4 = " E:" ary3[shop1] + shop4 ary3[shop1] + btlNm[shop0] endif shop1 + 1 endif endfor modeMenu = 6 menu shopM ary3 shop1 ary4 shop1 mpos 10 50 170 mrow 11 戻る "" endmenu modeMenu = -1 clear 5 if shopM = shop1 goto shop_100 ; 戻る msg $ary4[shopM]$で買い取りますが、よろしいですか? . menu shop0 mpos 10 120 70 はい いいえ endmenu if shop0 = 0 then shop0 = ary2[shopM] addGold0 < SB_PRS[shop0] / 2 gosub addGold gosub paintGold delItem0 = ary1[shopM] gosub delItem ありがとうございました endif clear 0 goto shop_sell ; 魔法屋 --------------------------------------------------------------------------------------------------------------------------- *shopMgc msg いらっしゃいませ . load "face_a16" grpFace 2000 paint grpFace wipe clear 0 *shopMgc_100 paintGold0 = 5 paintGold1 = 110 gosub paintGold ary0 = 17 8 12 14 ary1 = "ムコーの書" "フォノゼの書" "コルムゼの書" "ボルトゼの書" ary2 = 500 1000 1000 1000 selTkgSuu = 4 clear 0 modeMenu = 2 menu selTkg3 ary1 selTkgSuu ary2 selTkgSuu mpos 10 115 160 やめる "" endmenu modeMenu = -1 clear 9 if selTkg3 < selTkgSuu then msg $ary2[selTkg3]$Gですが、よろしいですか? . menu shopMgc0 mpos 10 120 70 はい いいえ endmenu if shopMgc0 = 0 then if ptGold < ary2[selTkg3] then GOLDが足りません else shopMgc0 = ary2[selTkg3] learnMgc0 = ary0[selTkg3] gosub learnMgc if learnMgcRet = 1 then ptGold - shopMgc0 gosub paintGold endif endif endif clear 0 goto shopMgc_100 endif msg ありがとうございました . erase grpFace wipe clear gosub repaintAllSts return ; 能力アップ --------------------------------------------------------------------------------------------------------------------------- *doorUp load "zugaikotsu.png" grpFace 2000 paint grpFace wipe *doorUp_100 paintGold0 = 5 paintGold1 = 110 gosub paintGold doorUpP = 5000 ; 料金 ;デバッグ ;doorUpP = 1000 selectMikataStr = "誰の能力を上げますか?" gosub selectMikata if ret0 >= 0 then doorUpChr = ret0 doorUp0 = btlKind[ret0] ary1 = ENE_MHP[doorUp0] ENE_MMP[doorUp0] ENE_ATK[doorUp0] ENE_DEF[doorUp0] ENE_SPD[doorUp0] ENE_MATK[doorUp0] ENE_MDEF[doorUp0] ary2 = btlMhp[doorUpChr] btlMmp[doorUpChr] btlAtk[doorUpChr] btlDef[doorUpChr] btlSpd[doorUpChr] btlMatk[doorUpChr] btlMdef[doorUpChr] msg 0 どの能力を上げますか?(1回$doorUpP$G) . *doorUp_500 menu doorUp1 STS_NM 7 ary1 7 mpos 10 112 160 やめる "" endmenu if doorUp1 < 7 then if ptGold < doorUpP then GOLDが足りません else if ary2[doorUp1] = MAX_STS then 最大値に達しています else ary2[doorUp1] + ary1[doorUp1] if ary2[doorUp1] > MAX_STS then ary2[doorUp1] = MAX_STS endif btlMhp[doorUpChr] = ary2[0] btlMmp[doorUpChr] = ary2[1] btlAtk[doorUpChr] = ary2[2] btlDef[doorUpChr] = ary2[3] btlSpd[doorUpChr] = ary2[4] btlMatk[doorUpChr] = ary2[5] btlMdef[doorUpChr] = ary2[6] ptGold - doorUpP gosub paintGold msg 0 $btlNm[doorUpChr]$の$STS_NM[doorUp1]$が$ary1[doorUp1]$上がった . if flgBgm = 1 then sound A5_03096 endif goto doorUp_500 endif endif clear 0 goto doorUp_100 endif erase grpFace wipe clear gosub repaintAllSts return ; アイテム一覧 --------------------------------------------------------------------------------------------------------------------------- *item clear item0 = 0 for item_i = 0 to MAX_ITM if itms[item_i] >= 0 then item1 = itms[item_i] ary1[item0] = item_i ary2[item0] = item1 ary3[item0] = SB_NM[item1] item2 = itmSb[item_i] if item2 >= 0 then ary4[item0] = btlNm[item2] else ary4[item0] = "" endif item0 + 1 endif endfor *item_500 modeMenu = 7 menu itemM ary3 item0 ary4 item0 mpos 10 50 120 mrow 11 戻る "" endmenu modeMenu = -1 clear 5 clear 6 if itemM = item0 goto item_900 ; 戻る msg 0 $ary3[itemM]$ . menu item2 mpos 10 120 70 捨てる 戻る endmenu clear 0 if item2 = 1 goto item_500 ; 戻る msg 本当によろしいですか? . menu item2 mpos 10 120 70 はい いいえ endmenu if item2 = 0 then delItem0 = ary1[itemM] gosub delItem $ary3[itemM]$を捨てた clear 0 endif goto item *item_900 gosub repaintAllSts return ; 文字列入力(引数:tsukeru0=デフォルト、tsukeru1=文字数、戻り値:tsukeru0=文字列、tsukeruRet=0,1:NG,OK) -------------------------------------------------------------------------------- *tsukeru *tsukeru_100 clear input tsukeru0 tsukeru3 tsukeru2 ; メッセージ入力 if tsukeru3 = 1 then ; 戻る tsukeruRet = 0 return else if tsukeru3 = 2 then 使用できない文字が含まれています。 goto tsukeru_100 else if tsukeru2 = 0 then goto tsukeru_100 else if tsukeru2 > tsukeru1 then $tsukeru1$文字までです。 goto tsukeru_100 endif ; OK tsukeruRet = 1 return ; 必ず入力 *tsukeru2 tsukeru2_0 = tsukeru0 gosub tsukeru if tsukeruRet = 0 then tsukeru0 = tsukeru2_0 goto tsukeru2 endif return ; ロード (引数:なし、loadRet=0,1:NG,OK) -------------------------------------------------------------------------------- *lblLoad loadRet = 0 dummy = 0 loadval m0 ; セーブデータをロード(saveと同じ内容に) dt_cd dt_ver flgBgm suuBtl suuWin ptLv[0] ptLv[1] ptLv[2] ptLv[3] ptExp[0] ptExp[1] ptExp[2] ptExp[3] ptEquip0[0] ptEquip0[1] ptEquip0[2] ptEquip0[3] ptEquip1[0] ptEquip1[1] ptEquip1[2] ptEquip1[3] ptEquip2[0] ptEquip2[1] ptEquip2[2] ptEquip2[3] ptEquip3[0] ptEquip3[1] ptEquip3[2] ptEquip3[3] ptEquip4[0] ptEquip4[1] ptEquip4[2] ptEquip4[3] ptGold suuPt itms[0] itms[1] itms[2] itms[3] itms[4] itms[5] itms[6] itms[7] itms[8] itms[9] itms[10] itms[11] itms[12] itms[13] itms[14] itms[15] itms[16] itms[17] itms[18] itms[19] itms[20] itms[21] itms[22] itms[23] itms[24] itms[25] itms[26] itms[27] itms[28] itms[29] itmSb[0] itmSb[1] itmSb[2] itmSb[3] itmSb[4] itmSb[5] itmSb[6] itmSb[7] itmSb[8] itmSb[9] itmSb[10] itmSb[11] itmSb[12] itmSb[13] itmSb[14] itmSb[15] itmSb[16] itmSb[17] itmSb[18] itmSb[19] itmSb[20] itmSb[21] itmSb[22] itmSb[23] itmSb[24] itmSb[25] itmSb[26] itmSb[27] itmSb[28] itmSb[29] nowMap flgs[0] flgs[1] flgs[2] flgs[3] flgs[4] flgs[5] flgs[6] flgs[7] flgs[8] flgs[9] flgs[10] flgs[11] flgs[12] flgs[13] flgs[14] flgs[15] flgs[16] flgs[17] flgs[18] flgs[19] btlAsrt[0] btlAsrt[1] btlAsrt[2] btlAsrt[3] btlKind[0] btlKind[1] btlKind[2] btlKind[3] btlNm[0] btlNm[1] btlNm[2] btlNm[3] btlMhp[0] btlMhp[1] btlMhp[2] btlMhp[3] btlMmp[0] btlMmp[1] btlMmp[2] btlMmp[3] btlAtk[0] btlAtk[1] btlAtk[2] btlAtk[3] btlDef[0] btlDef[1] btlDef[2] btlDef[3] btlSpd[0] btlSpd[1] btlSpd[2] btlSpd[3] btlMatk[0] btlMatk[1] btlMatk[2] btlMatk[3] btlMdef[0] btlMdef[1] btlMdef[2] btlMdef[3] btlHp[0] btlHp[1] btlHp[2] btlHp[3] btlMp[0] btlMp[1] btlMp[2] btlMp[3] btlTkg0[0] btlTkg0[1] btlTkg0[2] btlTkg0[3] btlTkg1[0] btlTkg1[1] btlTkg1[2] btlTkg1[3] btlTkg2[0] btlTkg2[1] btlTkg2[2] btlTkg2[3] btlTkg3[0] btlTkg3[1] btlTkg3[2] btlTkg3[3] btlTkg4[0] btlTkg4[1] btlTkg4[2] btlTkg4[3] btlTkg5[0] btlTkg5[1] btlTkg5[2] btlTkg5[3] btlTkg6[0] btlTkg6[1] btlTkg6[2] btlTkg6[3] btlTkg7[0] btlTkg7[1] btlTkg7[2] btlTkg7[3] dummy ; 後でセーブデータを増やすときのためにダミー dummy dummy dummy dummy dummy dummy dummy dummy dummy endloadval if m0 < 0 then セーブデータがありません return else if dt_cd != DT_CD then ; 他のスクリプトでセーブしたデータだった(リリース後は起こらないが、開発やデバッグ時に起こりうるので念のため) 他のスクリプトのデータです return else if dt_ver != DT_VER then バージョンアップにより今までのセーブデータが使用できなくなりました endif endif ロードOK! loadRet = 1 return ; セーブ (引数:なし、saveRet=0,1:NG,OK) -------------------------------------------------------------------------------- *lblSave dummy = 0 save m0 ; データをセーブ(loadvalと同じ内容に) dt_cd dt_ver flgBgm suuBtl suuWin ptLv[0] ptLv[1] ptLv[2] ptLv[3] ptExp[0] ptExp[1] ptExp[2] ptExp[3] ptEquip0[0] ptEquip0[1] ptEquip0[2] ptEquip0[3] ptEquip1[0] ptEquip1[1] ptEquip1[2] ptEquip1[3] ptEquip2[0] ptEquip2[1] ptEquip2[2] ptEquip2[3] ptEquip3[0] ptEquip3[1] ptEquip3[2] ptEquip3[3] ptEquip4[0] ptEquip4[1] ptEquip4[2] ptEquip4[3] ptGold suuPt itms[0] itms[1] itms[2] itms[3] itms[4] itms[5] itms[6] itms[7] itms[8] itms[9] itms[10] itms[11] itms[12] itms[13] itms[14] itms[15] itms[16] itms[17] itms[18] itms[19] itms[20] itms[21] itms[22] itms[23] itms[24] itms[25] itms[26] itms[27] itms[28] itms[29] itmSb[0] itmSb[1] itmSb[2] itmSb[3] itmSb[4] itmSb[5] itmSb[6] itmSb[7] itmSb[8] itmSb[9] itmSb[10] itmSb[11] itmSb[12] itmSb[13] itmSb[14] itmSb[15] itmSb[16] itmSb[17] itmSb[18] itmSb[19] itmSb[20] itmSb[21] itmSb[22] itmSb[23] itmSb[24] itmSb[25] itmSb[26] itmSb[27] itmSb[28] itmSb[29] nowMap flgs[0] flgs[1] flgs[2] flgs[3] flgs[4] flgs[5] flgs[6] flgs[7] flgs[8] flgs[9] flgs[10] flgs[11] flgs[12] flgs[13] flgs[14] flgs[15] flgs[16] flgs[17] flgs[18] flgs[19] btlAsrt[0] btlAsrt[1] btlAsrt[2] btlAsrt[3] btlKind[0] btlKind[1] btlKind[2] btlKind[3] btlNm[0] btlNm[1] btlNm[2] btlNm[3] btlMhp[0] btlMhp[1] btlMhp[2] btlMhp[3] btlMmp[0] btlMmp[1] btlMmp[2] btlMmp[3] btlAtk[0] btlAtk[1] btlAtk[2] btlAtk[3] btlDef[0] btlDef[1] btlDef[2] btlDef[3] btlSpd[0] btlSpd[1] btlSpd[2] btlSpd[3] btlMatk[0] btlMatk[1] btlMatk[2] btlMatk[3] btlMdef[0] btlMdef[1] btlMdef[2] btlMdef[3] btlHp[0] btlHp[1] btlHp[2] btlHp[3] btlMp[0] btlMp[1] btlMp[2] btlMp[3] btlTkg0[0] btlTkg0[1] btlTkg0[2] btlTkg0[3] btlTkg1[0] btlTkg1[1] btlTkg1[2] btlTkg1[3] btlTkg2[0] btlTkg2[1] btlTkg2[2] btlTkg2[3] btlTkg3[0] btlTkg3[1] btlTkg3[2] btlTkg3[3] btlTkg4[0] btlTkg4[1] btlTkg4[2] btlTkg4[3] btlTkg5[0] btlTkg5[1] btlTkg5[2] btlTkg5[3] btlTkg6[0] btlTkg6[1] btlTkg6[2] btlTkg6[3] btlTkg7[0] btlTkg7[1] btlTkg7[2] btlTkg7[3] dummy ; 後でセーブデータを増やすときのためにダミー dummy dummy dummy dummy dummy dummy dummy dummy endsave if m0 < 0 then ; ユーザが保存領域を確保しなかったとき等 セーブできませんでした saveRet = 0 else saveRet = 1 セーブOK! endif return ; メニュー ============================================ ; このラベル内には、text、menu、wait、各load等、待ちの発生するコマンドを書かないでください(書くと動作がおかしくなる) *onMoveMenu ; この名前のラベルは、メニューやクリッカブルマップで自動的に呼ばれる(詳しくはマニュアル参照) if modeMenu = 0 then ; 味方が敵を選択 if m1 = selectAiteMax then msg 9 425 300 150 1 0000FF FFFFF FFFFF left 戻る . else onMoveMenu0 = ary0[m1] msg 0 $btlNm[onMoveMenu0]$ . endif else if modeMenu = 1 then ; 味方が味方を選択 if m1 = selectMikataMax then msg 9 425 300 150 1 0000FF FFFFFF FFFFFF left 戻る . else onMoveMenu0 = ary0[m1] msg 0 $btlNm[onMoveMenu0]$ . endif else if modeMenu = 2 then ; 魔法メニュー選択 if selTkg3 = selTkgSuu then clear 9 else onMoveMenu0 = ary0[selTkg3] msg 9 187 320 350 2 FFFFFF 000000 FFFFFF left $TKG_EX[onMoveMenu0]$ . endif else if modeMenu = 3 then ; 装備箇所選択 if selSb1 = 5 then clear 5 else onMoveMenu0 = ary0[selSb1] if onMoveMenu0 >= 0 then onMoveMenu0 = itms[onMoveMenu0] msg 5 375 120 150 5 FFFFFF 008800 000000 left $STS_NM[2]$ +$SB_ATK[onMoveMenu0]$ $STS_NM[3]$ +$SB_DEF[onMoveMenu0]$ $STS_NM[4]$ +$SB_SPD[onMoveMenu0]$ $STS_NM[5]$ +$SB_MATK[onMoveMenu0]$ $STS_NM[6]$ +$SB_MDEF[onMoveMenu0]$ . else clear 5 endif endif else if modeMenu = 4 then ; 装備品選択 if selSb3 = selSb2 then clear 5 else if ary1[selSb3] < 0 then ; 外す ary0 = 0 0 0 0 0 else onMoveMenu0 = ary2[selSb3] soubi2 = onMoveMenu0 soubi1 = selSb0 gosub okSoubi if soubi2 < 0 then msg 5 310 120 220 5 FFFFFF 008800 000000 left 装備不可 . return endif ary0 = SB_ATK[onMoveMenu0] SB_DEF[onMoveMenu0] SB_SPD[onMoveMenu0] SB_MATK[onMoveMenu0] SB_MDEF[onMoveMenu0] endif if selSb4 >= 0 then ; 装備中 onMoveMenu0 = itms[selSb4] msg 5 310 120 220 5 FFFFFF 008800 000000 left $STS_NM[2]$ +$SB_ATK[onMoveMenu0]$→+$ary0[0]$ $STS_NM[3]$ +$SB_DEF[onMoveMenu0]$→+$ary0[1]$ $STS_NM[4]$ +$SB_SPD[onMoveMenu0]$→+$ary0[2]$ $STS_NM[5]$ +$SB_MATK[onMoveMenu0]$→+$ary0[3]$ $STS_NM[6]$ +$SB_MDEF[onMoveMenu0]$→+$ary0[4]$ . else msg 5 310 120 220 5 FFFFFF 008800 000000 left $STS_NM[2]$ +0→+$ary0[0]$ $STS_NM[3]$ +0→+$ary0[1]$ $STS_NM[4]$ +0→+$ary0[2]$ $STS_NM[5]$ +0→+$ary0[3]$ $STS_NM[6]$ +0→+$ary0[4]$ . endif endif else if modeMenu = 5 then ; 購入選択 if shopM = shop1 then clear 5 clear 6 else onMoveMenu0 = ary2[shopM] gosub subOmmShop gosub subOmmSb endif else if modeMenu = 6 then ; 売却選択 if shopM = shop1 then clear 5 else onMoveMenu0 = ary2[shopM] gosub subOmmShop endif else if modeMenu = 7 then ; アイテム選択 if itemM = item0 then clear 5 clear 6 else onMoveMenu0 = ary2[itemM] gosub subOmmShop gosub subOmmSb endif else if modeMenu = 8 then ; 道選択 if goOut0 = goOutSuu then clear 5 else gosub subOmmRoad endif endif return *subOmmRoad onMoveMenu0 = ary0[goOut0] onMoveMenu1 = 0 *subOmmRoad_100 if CITY_IMG[onMoveMenu1] = 0 goto subOmmRoad_900 if onMoveMenu1 = nowMap goto subOmmRoad_300 if CITY_RD0[onMoveMenu1] = onMoveMenu0 goto subOmmRoad_500 if CITY_RD1[onMoveMenu1] = onMoveMenu0 goto subOmmRoad_500 if CITY_RD2[onMoveMenu1] = onMoveMenu0 goto subOmmRoad_500 if CITY_RD3[onMoveMenu1] = onMoveMenu0 goto subOmmRoad_500 *subOmmRoad_300 onMoveMenu1 + 1 goto subOmmRoad_100 *subOmmRoad_500 msg 0 $CITY_NM[onMoveMenu1]$へ . *subOmmRoad_900 return *subOmmShop msg 5 375 60 150 5 FFFFFF 008800 000000 left $STS_NM[2]$ $SB_ATK[onMoveMenu0]$ $STS_NM[3]$ $SB_DEF[onMoveMenu0]$ $STS_NM[4]$ $SB_SPD[onMoveMenu0]$ $STS_NM[5]$ $SB_MATK[onMoveMenu0]$ $STS_NM[6]$ $SB_MDEF[onMoveMenu0]$ . return *subOmmSb ary5 = "" "" "" "" ; SUU_PARTY個 for onMoveMenu1 = 0 to MAX_PARTY if btlKind[onMoveMenu1] >= SB_FROM[onMoveMenu0] then if btlKind[onMoveMenu1] <= SB_TO[onMoveMenu0] then ary5[onMoveMenu1] = btlNm[onMoveMenu1] isSoubi0 = onMoveMenu1 isSoubi1 = onMoveMenu0 gosub isSoubi if isSoubi2 = 1 then isSoubi2 = " E" ary5[onMoveMenu1] + isSoubi2 endif endif endif endfor msg 6 375 230 150 4 FFFFFF 008800 000000 left $ary5[0]$ $ary5[1]$ $ary5[2]$ $ary5[3]$ . return ; このラベル内には、text、menu、wait、各load等、待ちの発生するコマンドを書かないでください(書くと動作がおかしくなる) *onOutMenu ; この名前のラベルは、メニューやクリッカブルマップで自動的に呼ばれる(詳しくはマニュアル参照) if modeMenu = 0 then ; 味方が敵を選択 msg 9 425 300 150 1 FFFFFF 0000FF 0000FF left 戻る . msg 0 どれに? . else if modeMenu = 1 then ; 味方が味方を選択 msg 9 425 300 150 1 FFFFFF 0000FF 0000FF left 戻る . msg 0 $selectMikataStr$ . else if modeMenu = 2 then clear 9 else if modeMenu = 3 then clear 5 else if modeMenu = 4 then clear 5 else if modeMenu = 5 then clear 5 clear 6 else if modeMenu = 6 then clear 5 else if modeMenu = 7 then clear 5 clear 6 else if modeMenu = 8 then clear 0 endif return