さて、本来ならゲームブックで一番先に説明をするはずの、セクション移動の関数について説明します。switch分岐が基本ですが、サイコロにsetTimeout()関数を使っているので、話は少しややこしくなります。
セクション <input id="input_Section" type="text" size="8" value="0"> <input type="button" value="GoTo" onClick="click_goto()">
ユーザーが、input_Section のテキストボックスに何か入力して、「GoTo」ボタンをクリックします。するとclick_goto()関数が実行されます。click_goto()関数は、戦闘中でなければセクション制御関数Section.ctrl()を呼び出します。テキストボックスの中身は文字列として扱われる仕様なので、プログラム内部ではセクション番号 Section.num は数値ではなく文字列です。そのほうが夢時間セクションや、マーリンの隠れ家、『逃亡』など単なる数字では表現しにくいセクションも表現できるので好都合だったりします。また、セクションを移動するたびに毒で生命点を失ったり、セクションに移動する前に使う必要のある魔法(具体的には友好の仮面)の処理はこのclick_goto() 関数でやっています。
function click_goto() { var input_Section = document.getElementById("input_Section"); if (combat.onCombat === true) { add_msg("戦闘中にセクションは選べない"); } else { Section.num = input_Section.value; add_msg("現在のセクションは" + Section.num); Section.subnum = 0; Section.ctrl(); } if (Pip.scorpion_poison === true) { add_msg("サソリの毒で生命点を2点失った。"); Pip.LIFE_POINT -= 2; } Pip.Mask_of_Friendship_currentSection = Pip.Mask_of_Friendship_nextSection; Pip.Mask_of_Friendship_nextSection = false; if (Pip.Mask_of_Friendship_currentSection === true) { data_magic[11].label = "今発動"; } else { data_magic[11].label = "つける"; } update_status(); }
セクション毎に違う出来事が起きる所作は、このSection.ctrl()関数が戦闘以外全てやっています。サブセクションという数値 Subsection.subnumでセクション内の出来事を細かく区切っています。区切る目安は、サイコロを振るタイミングです。サイコロの動作には、setTimeout()関数が使われているので、区切らないで書くと、setTimeout関数は素通りして以降の行にどんどん進んでしまい、最後まで処理が終わってから思い出したようにsetTimeout関数の中身が実行されるからです。他にも、1セクション内で複雑な条件分岐がある場合には、そのセクションをSection.subnumで細かく分けています。
Section.ctrl = function () { var i, res, decode, found_gold, found_copper, found_pewter; switch (Section.num) { case "0": switch (Section.subnum) { case 0: add_msg("生命点を決める。サイコロ2個を3回振れ。(1回目)"); add_msg("回るサイコロをクリックすれば、サイコロの目が決まる。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: Pip.starting_LIFE_POINT = dice.dice12pip*4; // add_msg("サイコロ1の目は" + dice.dice1pip); // add_msg("サイコロ2の目は" + dice.dice2pip); // add_msg("dice.dice12pipの値は" + dice.dice12pip); add_msg("ピップの仮生命点は " + Pip.starting_LIFE_POINT/4 + " x 4 = " + Pip.starting_LIFE_POINT + "点。"); add_msg("生命点を決める。サイコロ2個を3回振れ。(2回目)"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 2: Pip.starting_LIFE_POINT = Math.max(dice.dice12pip*4, Pip.starting_LIFE_POINT); add_msg("ピップの仮生命点は " + Pip.starting_LIFE_POINT/4 + " x 4 = " + Pip.starting_LIFE_POINT + "点。"); add_msg("生命点を決める。サイコロ2個を3回振れ。(3回目)"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 3: Pip.starting_LIFE_POINT = Math.max(dice.dice12pip*4, Pip.starting_LIFE_POINT); add_msg("ピップの生命点原点は" + Pip.starting_LIFE_POINT/4 + " x 4 = " + Pip.starting_LIFE_POINT + "点に決まった。"); Pip.max_LIFE_POINT = Math.floor(Pip.starting_LIFE_POINT + Pip.EXPERIENCE_POINT/20 ); Pip.LIFE_POINT = Pip.max_LIFE_POINT; update_status(); break; } break;
case "1": if (Pip.starting_LIFE_POINT === 0) { // まだ生命点を決めていない Section.num = "0"; click_goto(); } break;
case "2": if (Pip.starting_LIFE_POINT === 0) { // まだ生命点を決めていない Section.num = "0"; click_goto(); } break;
case "3": if (Pip.starting_LIFE_POINT === 0) { // まだ生命点を決めていない Section.num = "0"; click_goto(); } break;
case "6": decode = prompt("恋文から解読した暗号を入力せよ。",""); if (decode === "ギネビア、ナイン") { add_msg("正解! 経験値1獲得。女性はギネビア、セクションは9。"); Pip.EXPERIENCE_POINT++; update_status(); } break;
case "7": switch (Section.subnum) { case 0: add_msg("戸を修理するのを手伝う。サイコロを2個振れ。"); Section.subnum++; dice.start(2,"Section.ctrl()"); break; case 1: if (dice.dice12pip >= 10) { add_msg("なんとか戸を直した。28へ行け。"); } else { add_msg("戸は直らない。サイコロを2個振れ。"); dice.start(2, 'Section.ctrl()'); } break; } break;
case "8": get_event("治療薬", 18); break;
case "9": decode = prompt("荷札から解読した暗号を入力せよ。",""); if (decode === "FORTYTHREE" || decode === "43") { add_msg("正解! 経験値1獲得。43へ行け。"); Pip.EXPERIENCE_POINT++; update_status(); } break;
case "10": get_event("羊皮紙",1); break;
case "11": add_msg("食料はあるか? なければマーリンの隠れ家へ戻って探せ。"); break;
case "13": decode = prompt("山脈のなかの矢印を指でなぞって、次の飛び先のセクションを探り出せ。",""); if (decode === "89") { add_msg("正解! 経験値1獲得。89へ行け。"); Pip.EXPERIENCE_POINT++; update_status(); } break;
case "14": switch (Section.subnum) { case 0: add_msg("新しい生命点を決める。サイコロ2個を振れ。(1回のみ)"); dice.die1pip = 0; dice.die2pip = 0; dice.die3pip = 0; Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: Pip.starting_LIFE_POINT = dice.dice12pip*4; clear_event(); clear_equip(); clear_magic(); update_status(); add_msg("さあ元気に3から出発ッ-!"); break;
} break;
case "16": add_msg("黒衣の祭司が巨石の前に立っている。"); combat.encounter(); // 黒衣の祭司 break;
case "17": add_msg("砂のドラゴンが猛烈な勢いでこっちに向かって突進してくる。"); combat.encounter(); // 砂のドラゴン break;
case "18": get_event("ノコギリ草", 1); break;
case "19": res = confirm("野蛮人に降伏するか?"); if (res===true) { add_msg("魔法とE・J以外のすべての装備品を失った。"); clear_event(); clear_equip(); update_status(); } else { add_msg("それでは野蛮人を闘うぞ。"); combat.encounter(); // 野蛮人 } break;
case "20": add_msg("狼は手強いぞ、心してかかれ。"); combat.encounter(); // 狼 break;
case "22": get_event("警告球", 1); break;
case "23": if (Pip.starting_LIFE_POINT === 0) { Section.num = "0"; click_goto(); } break;
case "30": get_event("ルビー", 1); break;
case "33": add_msg("く、首に、ボルトが刺さってる!"); Pip.LIFE_POINT -= 3; update_status(); get_event("首に刺さったボルト", 1); get_event("眠り玉", 1); break;
case "34": get_event("治療薬", 18); get_event("眠り玉", 1); break;
case "35": add_msg("澄んだ美しい水をすくって口にふくむと、元気が出てきた。"); Pip.LIFE_POINT = Math.min(Pip.LIFE_POINT + 2, Pip.max_LIFE_POINT); update_status(); break;
case "36": switch (Section.subnum) { case 0: res = confirm("水晶の結晶板を持っているか?"); if (res===true) { add_msg("三つ目獣は立ちどまって釘付けになった。42に行け。"); } else { add_msg("やっかいだが三つ目獣と闘わなければならぬ。"); combat.encounter(); // 三つ目獣 } break; case 1: add_msg("うっかり三つ目獣を殺してしまった。小人の兵士ベンが襲いかかってきた。"); combat.encounter(); // 小人の兵士ベン break; } break;
case "39": switch (Section.subnum) { case 0: res = confirm("川の南岸に上陸を試みるか?"); if (res===true) { add_msg("サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } else { // do_nothing } break; case 1: if (dice.dice12pip >= 4) { add_msg("大成功、81へ行ける。"); } else { add_msg("筏がひっくりかえって激流にのまれ……溺死、14へ。"); } break; } break;
case "41": res = confirm("3人の盗賊と闘うか?"); if (res===true) { combat.encounter(); // 盗賊 } else { } break;
case "42": get_event("ブロンの歯", 1); break;
case "46": add_msg("きみはすばやく男の喉もとを殴り、先制攻撃権を得た。"); combat.encounter(); // 間抜けな百姓with棍棒 break;
case "48": switch (Section.subnum) { case 0: add_msg("砂塵のなかをさまよっている。サイコロを2個振れ。"); Section.subnum++; dice.start(2,"Section.ctrl()"); break; case 1: if (dice.dice12pip === 2) { add_msg("砂嵐から抜けだした。103へ行け。"); } else if(dice.dice12pip === 4) { add_msg("砂嵐から抜けだした。77へ行け。"); } else if (dice.dice12pip === 7) { add_msg("砂嵐から抜けだした。11へ行け。"); } else if (dice.dice12pip === 12) { add_msg("砂嵐から抜けだした。92へ行け。"); } else { add_msg("まだ砂嵐から抜けだせない。サイコロを2個振れ。"); Pip.LIFE_POINT--; update_status(); dice.start(2,"Section.ctrl()"); } break; } break;
case "49": get_event("ハチミツ", 36); break;
case "53": switch (Section.subnum) { case 0: res = confirm("バネつき靴をはいて、南岸にジャンプするか?"); if (res===true) { add_msg("サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } else { // do_nothing } break; case 1: if (dice.dice12pip >= 7) { add_msg("ジャンプ成功、南岸の81へ。"); } else { add_msg("失敗! 川に落ちて激流にのみこまれ、溺死(14)だ。"); } break; } break;
case "54": res = confirm("通行料の金貨300枚を払うか?"); if (res===true) { found_gold = -1; for (i = 0; i < Pip_event.length; i++) { if (data_event[ Pip_event[i].id_num ].name === "金貨") { found_gold = i; } } if (found_gold >= 0 && Pip_event[found_gold].num >= 300) { add_msg("虹の橋の通行料を支払った。"); lose_event("金貨", 300); } else { add_msg("金貨が足りない!"); } } else { res = confirm("カメレオン怪人と闘うか?"); if (res===true){ combat.encounter(); // カメレオン怪人 } } break;
case "55": get_event("E・J", 1); break;
case "56": res = confirm("巨人と闘うか?"); if (res===true) { combat.encounter(); // 巨人 } break;
case "59": switch (Section.subnum) { case 0: if (Section.pip6count === 2) { add_msg("6が2回出た。南西の、76へ。"); Section.pip6count = 0; Section.pip4count = 0; Section.pip1count = 0; } else if (Section.pip4count === 2) { add_msg("4が2回出た。西の、47へ。"); Section.pip6count = 0; Section.pip4count = 0; Section.pip1count = 0; } else if (Section.pip1count === 2) { add_msg("1が2回出た。北西の、71へ。"); Section.pip6count = 0; Section.pip4count = 0; Section.pip1count = 0; } else { add_msg("6,4,1が2回出るまでサイコロを1個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } break; case 1: if (dice.die1pip === 6) { Section.pip6count++; } else if (dice.die1pip === 4) { Section.pip4count++; } else if (dice.die1pip === 1) { Section.pip1count++; } Section.subnum = 0; window.setTimeout(Section.ctrl, Section.wait_time); break; } break;
case "60": get_event("E・J", 1); break;
case "65": switch (Section.subnum) { case 0: add_msg("野蛮人1の持っている金貨を決める。サイコロを2個振れ。"); Section.subnum++; dice.start(2,"Section.ctrl()"); break; case 1: get_event("金貨", dice.dice12pip * 10); add_msg("野蛮人2の持っている金貨を決める。サイコロを2個振れ。"); Section.subnum++; dice.start(2,"Section.ctrl()"); break; case 2: get_event("金貨", dice.dice12pip * 10); add_msg("野蛮人3の持っている金貨を決める。サイコロを2個振れ。"); Section.subnum++; dice.start(2,"Section.ctrl()"); break; case 3: get_event("金貨", dice.dice12pip * 10); break; } break;
case "66": add_msg("ずんぐりした百姓が、大きな木の棍棒を振りおろしてきた!"); combat.encounter(); // ずんぐりした百姓 break;
case "68": lose_event("首に刺さったボルト", 1); break;
case "69": switch (Section.subnum) { case 0: res = confirm("通行料の金貨200枚を払うか?"); if (res===true) { found_gold = -1; for (i = 0; i < Pip_event.length; i++) { if (data_event[ Pip_event[i].id_num ].name === "金貨") { found_gold = i; } } if (found_gold >= 0 && Pip_event[found_gold].num >= 300) { add_msg("虹の橋の通行料を支払った。"); lose_event("金貨", 300); } else { add_msg("金貨が足りない!"); } } else { res = confirm("'ドロシー'と大声で叫ぶか?"); if (res===true) { add_msg("'ドロシー'と叫ぶ回数を決める。サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); } } break; case 1: Pip.LIFE_POINT -= dice.die1pip; update_status(); break; } break;
case "70": res = confirm("醜い百姓の一団をやっつけるか?"); if (res===true) { combat.encounter(); // 醜い百姓 } break;
case "73": add_msg("足もとに小さなサソリがいるのに気がつかなかった。"); combat.encounter(); // サソリ break;
case "75": add_msg("まぬけな百姓はもはや棍棒を持っていないので、遠慮することはない。"); combat.encounter(); // 間抜けな百姓with素手 break;
case "78": switch (Section.subnum) { case 0: add_msg("見て? そこに、デザートに食べるのにちょうどよさそうなのがいるよ!"); combat.encounter(); // 魔女ミニー break; case 1: combat.encounter(); // 魔女アギー break; case 2: combat.encounter(); // 魔女スクロッグ break; } break;
case "79": get_event("金貨", 500*3); break;
case "80": switch (Section.subnum) { case 0: add_msg("サイコロを2個振って川に飛びこめ。"); Section.subnum++; dice.start(2,"Section.ctrl()"); break; case 1: if (dice.dice12pip >= 4) { add_msg("縄梯子まで、泳ぎついた。"); } else { add_msg("激流にのみこまれて、あえなく溺死だ。……14へ。"); } break; } break;
case "81": switch (Section.subnum) { case 0: res = confirm("北岸にジャンプするつもりか?"); if (res===true) { add_msg("バネつき靴をはいて、サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } else { // do_nothing } break; case 1: if (dice.dice12pip >= 10) { add_msg("大成功、53へ。"); } else { add_msg("川に落ちて溺死、14まで流されろ。"); } break; } break;
case "82": add_msg("襲われたのはたしかだが、姿がまるっきり見えない。"); combat.encounter(); // 見えない敵 break;
case "83": add_msg("三人の男はみるみる岩棚をよじのぼった。さあ、闘いが始まるぞ!") combat.encounter(); // 乱暴な百姓 break;
case "84": switch (Section.subnum) { case 0: res = confirm("舌が青いか?"); if (res===true) { } else { add_msg("嘘をついた罰でパンチの制裁を受ける。サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); } break; case 1: Pip.LIFE_POINT -= dice.die1pip; update_status(); break; } break;
case "85": switch (Section.subnum) { case 0: res = confirm("つけ髭をつけているか?"); if (res===true) { } else { add_msg("小人のパトロール警官に見つかるかどうか、サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); } break; case 1: if (dice.die1pip >= 4) { add_msg("見つからなかった。無事に奇岩城のセクションに進める。"); } else { add_msg("小人のパトロール警官にでくわした。警官が何人か、サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); } break; case 2: add_msg("小人のパトロール警官の数は" + dice.die1pip + "人。"); res = confirm("小人の警官と闘って殺すか?"); if (res===true) { combat.encounter(); // パトロール警官 break; } else { res = confirm("この場で、罰金として金貨200枚を支払うか?"); if (res===true) { lose_event("金貨", 200); } else { add_msg("罰金も払わないし、裁判所に行くのもいやだというのなら、サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } } break; case 3: if (dice.dice12pip >= 10) { add_msg("忠告だけで解放された。"); } else if (dice.dice12pip >= 7) { add_msg("監獄行き、86へ。"); } else { add_msg("不運にも絞首刑だ。"); } break; } break;
case "86": switch (Section.subnum) { case 0: Pip.LIFE_POINT--; res = confirm("脱獄法その1を試みるか?"); if (res===true) { add_msg("天井の穴登りに挑戦だ。サイコロ2個を5回振れ。"); Section.subnum = 1; dice.start(2, "Section.ctrl()"); } else { res = confirm("脱獄法その2を試みるか?"); if (res===true) { Pip.LIFE_POINT -= 5; update_status(); Section.pip_even_count = 0; add_msg("錠外しに挑戦だ。サイコロ2個を5回振れ。"); Section.subnum = 6; dice.start(2, "Section.ctrl()"); } else { res = confirm("脱獄法その3を試みるか?"); if (res===true) { Section.pip20count = 0; Section.warder20count = 0; add_msg("ギャンブルに挑戦だ。きみのサイコロを1個振れ。"); Section.subnum = 11; dice.start(1, "Section.ctrl()"); } else { add_msg("三日間、飲まず食わずで閉じ込められた。サイコロ1個を3回振れ。"); Section.subnum = 13; dice.start(1, "Section.ctrl()"); } } } break; case 1: if (dice.dice12pip <= 4) { Pip.LIFE_POINT -= 10; add_msg("転落して生命点を10点失った。"); update_status(); Section.subnum = 0; window.setTimeout(Section.ctrl, Section.wait_time); } else { add_msg("1回目成功。2回目のサイコロを振れ。"); Section.subnum++; dice.start(2, 'Section.ctrl()'); } break; case 2: if (dice.dice12pip <= 4) { Pip.LIFE_POINT -= 10; add_msg("転落して生命点を10点失った。"); update_status(); Section.subnum = 0; window.setTimeout(Section.ctrl, Section.wait_time); } else { add_msg("2回目成功。3回目のサイコロを振れ。"); Section.subnum++; dice.start(2, 'Section.ctrl()'); } break; case 3: if (dice.dice12pip <= 4) { Pip.LIFE_POINT -= 10; add_msg("転落して生命点を10点失った。"); update_status(); Section.subnum = 0; window.setTimeout(Section.ctrl, Section.wait_time); } else { add_msg("3回目成功。4回目のサイコロを振れ。"); Section.subnum++; dice.start(2, 'Section.ctrl()'); } break; case 4: if (dice.dice12pip <= 4) { Pip.LIFE_POINT -= 10; add_msg("転落して生命点を10点失った。"); update_status(); Section.subnum = 0; window.setTimeout(Section.ctrl, Section.wait_time); } else { add_msg("4回目成功。5回目のサイコロを振れ。"); Section.subnum++; dice.start(2, 'Section.ctrl()'); } break; case 5: if (dice.dice12pip <= 4) { Pip.LIFE_POINT -= 10; add_msg("転落して生命点を10点失った。"); update_status(); Section.subnum = 0; window.setTimeout(Section.ctrl, Section.wait_time); } else { add_msg("5回目成功。よじ登って、80へ。"); } break; case 6: if (dice.dice12pip === Math.round(dice.dice12pip/2) * 2) { Section.pip_even_count++; } add_msg("これまでの偶数の出た回数は" + Section.pip_even_count + "回。"); if (Section.pip_even_count === 3) { add_msg("成功、脱獄して、74へ。"); } else { add_msg("2回目のサイコロを振れ。"); Section.subnum++; dice.start(2, 'Section.ctrl()'); } break; case 7: if (dice.dice12pip === Math.round(dice.dice12pip/2) * 2) { Section.pip_even_count++; } add_msg("これまでの偶数の出た回数は" + Section.pip_even_count + "回。"); if (Section.pip_even_count === 3) { add_msg("成功、脱獄して、74へ。"); } else { add_msg("3回目のサイコロを振れ。"); Section.subnum++; dice.start(2, 'Section.ctrl()'); } break; case 8: if (dice.dice12pip === Math.round(dice.dice12pip/2) * 2) { Section.pip_even_count++; } add_msg("これまでの偶数の出た回数は" + Section.pip_even_count + "回。"); if (Section.pip_even_count === 3) { add_msg("成功、脱獄して、74へ。"); } else { add_msg("4回目のサイコロを振れ。"); Section.subnum++; dice.start(2, 'Section.ctrl()'); } break; case 9: if (dice.dice12pip === Math.round(dice.dice12pip/2) * 2) { Section.pip_even_count++; } add_msg("これまでの偶数の出た回数は" + Section.pip_even_count + "回。"); if (Section.pip_even_count === 3) { add_msg("成功、脱獄して、74へ。"); } else { add_msg("5回目のサイコロを振れ。"); Section.subnum++; dice.start(2, 'Section.ctrl()'); } break; case 10: if (dice.dice12pip === Math.round(dice.dice12pip/2) * 2) { Section.pip_even_count++; } add_msg("これまでの偶数の出た回数は" + Section.pip_even_count + "回。"); if (Section.pip_even_count === 3) { add_msg("成功、脱獄して、74へ。"); } else if (Section.pip_even_count === 0) { add_msg("1回も偶数が出なかった。脱獄がばれて死刑!"); } else { Pip.LIFE_POINT -= 5; update_status(); add_msg("ダイヤル錠は開かなかった。生命点を5点消耗した。"); Section.subnum = 0; window.setTimeout(Section.ctrl, Section.wait_time); } Section.pip_even_count = 0; break; case 11: Section.pip20count += dice.die1pip; if (Section.pip20count === 20) { add_msg("ギャンブルに勝った。監獄を開けて逃がしてもらい、74へ。"); } else if (Section.pip20count > 20) { add_msg("きみのサイコロの合計が20を越えてしまった。0からやりなおしだ。"); Section.pip20count = 0; } else { add_msg("きみのサイコロの合計は" + Section.pip20count + "。看守のサイコロを1個振れ。"); Section.subnum = 12; dice.start(1, 'Section.ctrl()'); } break; case 12: Section.warder20count += dice.die1pip; if (Section.warder20count === 20) { add_msg("ギャンブルに負けた。"); found_gold = -1; for (i = 0; i < Pip_event.length; i++) { if (data_event[ Pip_event[i].id_num ].name === "金貨") { found_gold = i; } } if (found_gold >= 0 && Pip_event[found_gold].num >= 100) { add_msg("看守に金貨を100枚渡した。"); lose_event("金貨", 100); Section.subnum = 0; window.setTimeout(Section.ctrl, Section.wait_time); } else { add_msg("金貨が足りない! 脱獄を叫ばれて死刑に。"); } } else if (Section.warder20count > 20) { add_msg("看守のサイコロの合計が20を越えた。0からやりなおしだ。"); Section.warder20count = 0; } else { add_msg("看守のサイコロの合計は" + Section.warder20count + "。きみのサイコロを1個振れ。"); Section.subnum = 11; dice.start(1, 'Section.ctrl()'); } break; case 13: Pip.LIFE_POINT -= dice.die1pip; add_msg("2回目のサイコロを1個振れ。"); update_status(); Section.subnum++; dice.start(1, 'Section.ctrl()'); break; case 14: Pip.LIFE_POINT -= dice.die1pip; add_msg("3回目のサイコロを1個振れ。"); update_status(); Section.subnum++; dice.start(1, 'Section.ctrl()'); break; case 15: Pip.LIFE_POINT -= dice.die1pip; update_status(); break; } break;
case "88": add_msg("値札の金額を計算した。経験値1獲得。"); Pip.EXPERIENCE_POINT++; get_event("金貨", 20); break;
case "90": get_event("サクラの花", 1); break;
case "91": switch (Section.subnum) { case 0: res = confirm("縄梯子をつかんでみるか?"); if (res===true) { add_msg("サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } else { // do_nothing } break; case 1: if (dice.dice12pip >= 5) { add_msg("縄梯子にしがみついて、85へよじのぼっていけ。"); } else { add_msg("川に転落して溺れ死んだ。"); } break; } break;
case "93": switch (Section.subnum) { case 0: res = confirm("問答無用で見張りに斬りかかるか?"); if (res===true) { Section.subnum++; add_msg("見張りが何人いるか、サイコロを2個振れ。"); dice.start(2, "Section.ctrl()"); } break; case 1: combat.encounter(); // 見張り break; } break;
case "97": switch (Section.subnum) { case 0: get_event("稲妻の矢", 1); get_event("魔法のラッパ", 1); get_event("ドラゴン・ファイア錠", 2); res = confirm("サイコロを1個振るか?"); if (res===true) { Section.subnum = 1; dice.start(1, "Section.ctrl()"); } else { add_msg("ではサイコロを2個振れ。"); Section.subnum = 2; dice.start(2, "Section.ctrl()"); } break; case 1: add_msg("奇数だったら、59へ。偶数だったら、71へ。"); break; } break;
case "100": get_event("通行許可硬貨", 1); break;
case "101": switch (Section.subnum) { case 0: add_msg("この世のエネルギーに身を任せ、サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip === 1) { add_msg("1が出た。32へ。"); } else if (dice.die1pip === 2) { add_msg("2が出た。59へ。"); } else if (dice.die1pip === 3) { add_msg("3が出た。13へ。"); } else if (dice.die1pip === 4) { add_msg("4が出た。99へ。"); } else if (dice.die1pip === 5) { add_msg("5が出た。58へ。"); } else { add_msg("乱気流に巻き込まれ、手、足、胴がバラバラになった。14へ。"); } break; } break;
case "105": add_msg("「魔獣王国にようこそ!」"); combat.encounter(); // 食屍鬼 break;
case "106": switch (Section.subnum) { case 0: get_event("象牙の杖", 1); add_msg("泳いで戻る。サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip >= 3) { add_msg("成功、北の40へ向かえ。"); } else { add_msg("溺死して、14へ直行だ。"); } break; } break;
case "107": get_event("音楽堂のチケット", 1); break;
case "110": add_msg("「罪人だ」「間違いない」"); combat.encounter(); // 僧 break;
case "111": decode = prompt("巨石の謎の道しるべの意味は?",""); if (decode === "GOTO 128") { add_msg("正解! 経験値1獲得。128へ行け。"); Pip.EXPERIENCE_POINT++; update_status(); } break;
case "114": switch (Section.subnum) { case 0: res = confirm("悪魔の落とし子と闘うか?"); if (res===true) { combat.encounter(); // 悪魔の落とし子 } else { add_msg("一か八か泳いで逃げる。サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); } break; case 1: if (dice.die1pip >= 3) { add_msg("成功、北の40へ向かえ。"); } else { add_msg("溺れてしまった。14へ。"); } break; } break;
case "116": switch (Section.subnum) { case 0: res = confirm("ブロンの歯を持っているか?"); if (res===true) { add_msg("ブロンは近づくが、襲ってこなかった。"); } else { add_msg("ブロンが何匹いるか、サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); } break; case 1: combat.encounter(); // ブロン break; } break;
case "117": switch (Section.subnum) { case 0: add_msg("稼いだ金貨はいくらか、サイコロを2個振れ。"); Section.subnum++; dice.start(2,"Section.ctrl()"); break; case 1: get_event("金貨", dice.dice12pip * 100); break; } break;
case "120": res = confirm("金貨500枚を要求されたか?"); if (res===true) { found_gold = -1; for (i = 0; i < Pip_event.length; i++) { if (data_event[ Pip_event[i].id_num ].name === "金貨") { found_gold = i; } } if (found_gold >= 0 && Pip_event[found_gold].num >= 500) { add_msg("詩的魔神にワイロを支払った。"); lose_event("金貨", 500); } else { add_msg("金貨が足りない!"); } } break;
case "123": switch (Section.subnum) { case 0: add_msg("川に投げ込まれた! 急いでサイコロを1個振れ!"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip === 1 || dice.die1pip === 6) { add_msg("縄梯子につかまった。サイコロ2個だけ生命点を消耗する。サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } else { add_msg("激流にのみこまれて、あえなく溺死……14へ。"); } break; case 2: Pip_LIFE_POINT -= dice.dice12pip; } break;
case "125": get_event("八角形の合金の硬貨", 1); break;
case "129": add_msg("「とまれ!」きみは逃走中の小人に襲いかかった。"); combat.encounter(); // こそ泥サム break;
case "131": switch (Section.subnum) { case 0: combat.encounter(); // アドルフ break; case 1: add_msg("造船所の賃金はいくらか、サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 2: get_event("金貨", dice.die1pip * 2 * 100); add_msg("最後の日に給料を受け取るために、170へ。"); break; } break;
case "132": get_event("楕円のメダル", 1); break;
case "134": get_event("博物館のチケット", 1); break;
case "136": get_event("八角形の合金の硬貨", 1); break;
case "138": switch (Section.subnum) { case 0: add_msg("洗濯から解放された。くだびれきって生命点を失う。サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: Pip.LIFE_POINT -= dice.die1pip; update_status(); break; } break;
case "143": get_event("八角形の銅貨", 1); break;
case "144": get_event("楕円のメダル", 1); break;
case "145": switch (Section.subnum) { case 0: res = confirm("問答無用で見張りに斬りかかるか?"); if (res===true) { Section.subnum++; add_msg("見張りが何人いるか、サイコロを2個振れ。"); dice.start(2, "Section.ctrl()"); } break; case 1: combat.encounter(); // 見張り break; } break;
case "146": add_msg("マオ同志との4回戦を始める。"); combat.encounter(); // マオ break;
case "147": switch (Section.subnum) { case 0: add_msg("この世のエネルギーに身を任せ、サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip === 1) { add_msg("1が出た。54へ。"); } else if (dice.die1pip === 2) { add_msg("2が出た。48へ。"); } else if (dice.die1pip === 3) { add_msg("3が出た。13へ。"); } else if (dice.die1pip === 4) { add_msg("4が出た。59へ。"); } else if (dice.die1pip === 5) { add_msg("5が出た。58へ。"); } else { add_msg("乱気流に巻き込まれ、手足がバラバラになった。14へ。"); } break; } break;
case "149": add_msg("袋だたきにされ、生命点を3点失ったすえに、投獄されてしまった……86へ。"); Pip.LIFE_POINT -= 3; update_status(); break;
case "154": switch (Section.subnum) { case 0: res = confirm("警官と闘うか?"); if (res===true) { combat.encounter(); // 警官 } else { res = confirm("罰金として金貨を全部渡すか?"); if (res===true) { for (i = 0; i < Pip_event.length; i++) { if (data_event[ Pip_event[i].id_num ].name === "金貨") { add_msg("警官に金貨を全部渡した。"); Pip_event[i].num = 0; } } } else { res = confirm("裁判所に行くか?"); if (res===true) { } else { add_msg("罰金も裁判もごめんなら、サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } } } break; case 1: if (dice.dice12pip >= 10) { add_msg("忠告だけで解放された。"); } else if (dice.dice12pip >= 7) { add_msg("E・Jを除く魔法の品をすべて没収された。"); clear_magic(); update_status(); } else { add_msg("監獄に放り込まれる――86へ。"); } break; } break;
case "156": decode = prompt("天井に押しつぶされる前に、暗号を入力せよ。",""); if (decode === "GOTO 105") { add_msg("正解! 経験値1獲得。105へ行け。"); Pip.EXPERIENCE_POINT++; update_status(); } break;
case "159": lose_event("八角形の合金の硬貨", 1); break;
case "160": get_event("八角形の銅貨", 1); break;
case "161": switch (Section.subnum) { case 0: add_msg("急いでサイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip >= 7) { get_event("八角形の合金の硬貨", 1); } else { add_msg("177へ。"); } break; } break;
case "162": switch (Section.subnum) { case 0: add_msg("バーテンのサイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: enemy_party.quick = dice.die1pip; add_msg("きみのサイコロを1個振れ。"); Section.subnum++; window.setTimeout("dice.start(1, 'Section.ctrl()');", Section.wait_time); break; case 2: Pip.quick = dice.die1pip; if (Pip.quick > enemy_party.quick) { add_msg("サイコロ賭博に勝った。"); get_event("八角形の合金の硬貨", 1); } else if (Pip.quick < enemy_party.quick) { add_msg("サイコロ賭博に負けた。酒をおごってやれ。"); } else { add_msg("引き分けだ。もう一回やりなおし。"); Section.num = 0; window.setTimeout(Section.ctrl, Section.wait_time); } } break;
case "164": get_event("八角形の銅貨", 1); break;
case "166": switch (Section.subnum) { case 0: add_msg("見張りに気づかれずに逃走できるかどうか、サイコロを2個振ってみろ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip >= 5) { add_msg("みごと脱走した。城のほかの場所をあたれ。"); } else { add_msg("逮捕されてまた監獄に放り込まれる、86へ。"); } break; } break;
case "167": add_msg("十字架扉の魔法を解いた。経験値1獲得。"); Pip.EXPERIENCE_POINT++; update_status(); get_event("八角形の合金の硬貨", 1); break;
case "168": lose_event("金貨", 1); break;
case "170": lose_event("金貨", 10); get_event("八角形の銅貨", 1); break;
case "171": get_event("エクスカリバー", 1); add_msg("ワニガエル獣は手強いぞ、ピップ。"); res = confirm("象牙の杖とルビーを持っているか?"); if (res===true) { enemy_data[31].LIFE_POINT = enemy_data[31].max_LIFE_POINT - 40; // ワニガエル獣 } combat.encounter(); // ワニガエル獣 break;
case "172": switch (Section.subnum) { case 0: add_msg("こしょうプリンを平らげるぞ、サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip === 12) { add_msg("悪夢の食事を終えた。135へ。"); } else if (dice.dice12pip === 8) { add_msg("こしょうのために大くしゃみをして、つけ髭を落とし、ただちに警察に通報されて、監獄に放り込まれる。――86へ。"); } else { add_msg("まだ食べ終えられない。もう一度サイコロを2個振れ。"); dice.start(2, 'Section.ctrl()'); } break; } break;
case "175": get_event("八角形の合金の硬貨", 1); break;
case "177": switch (Section.subnum) { case 0: add_msg("コソ泥がばれて、85の橋から川へ投げ落とされた! サイコロを2個振れ。"); Section.subnum++; dice.start(2,"Section.ctrl()"); break; case 1: if (dice.dice12pip >= 6) { add_msg("無事に縄梯子にしがみついてよじのぼれた。"); } else { add_msg("川にまっさかさまに転落し、岩のように沈んで、14へ。"); } break; } break;
case "178": switch (Section.subnum) { case 0: add_msg("見張りに気づかれずに逃走できるかどうか、サイコロを2個振ってみろ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip <= 4) { add_msg("逮捕されて監獄に逆戻りだ、86へ。"); } else { add_msg("みごと脱走した。城のほかの場所に行ける。"); } break; } break;
case "180": for (i = 0; i < Pip_event.length; i++) { if (data_event[ Pip_event[i].id_num ].name === "金貨") { lose_event("金貨", Math.floor(Pip_event[i].num)); } } add_msg("金貨を半分盗まれた。"); found_copper = -1; found_pewter = -1; for (i = 0; i < Pip_event.length; i++) { if (data_event[ Pip_event[i].id_num ].name === "八角形の銅貨") { found_copper = i; } else if (data_event[ Pip_event[i].id_num ].name === "八角形の合金の硬貨") { found_pewter = i; } } if (found_copper > 0 && found_pewter > 0) { res = confirm("八角形のコインを1枚盗まれた。銅貨を失ったことにするか?"); if (res===true) { lose_event("八角形の銅貨", 1); } else { lose_event("八角形の合金の硬貨", 1); } } else if (found_copper > 0 && found_pewter < 0) { lose_event("八角形の銅貨", 1); } else if (found_copper < 0 && found_pewter > 0) { lose_event("八角形の合金の硬貨", 1); } break;
case "190": switch (Section.subnum) { case 0: add_msg("頭上からギロチンの刃が落ちてきた! 急いでサイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip === 1 || dice.die1pip === 6) { add_msg("運よくかわせた。"); } else if (dice.die1pip === 2 || dice.die1pip === 5) { add_msg("傷を負って生命点を3点失った。"); Pip.LIFE_POINT -= 3; update_status(); } else { add_msg("首と胴がまっぷたつになって……14へ。"); } break; } break;
case "194": switch (Section.subnum) { case 0: add_msg("下からサッと槍が3本突き出てきた! 槍1本につきサイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip === 4) { add_msg("あわれ串刺し!"); } else { add_msg("2本目の槍につきサイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } break; case 2: if (dice.dice12pip === 4) { add_msg("あわれ串刺し!"); } else { add_msg("3本目の槍につきサイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } break; case 3: if (dice.dice12pip === 4) { add_msg("あわれ串刺し!"); } else { add_msg("3本ともよけきれた。185へ。"); } break; } break;
case "200": switch (Section.subnum) { case 0: add_msg("いきなり左右から鉄串が飛びだしてきた! サイコロ2個を急いで振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip === 7 || dice.dice12pip === 11) { add_msg("鉄串はきみの脇腹を貫通する!――14へ。"); } else { add_msg("鉄串をかわした。220へ。"); } break; } break;
case "206": switch (Section.subnum) { case 0: add_msg("左右の戸口から鉄串が飛びだしてきた! サイコロ2個を急いで振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip === 7) { add_msg("鉄串はきみの脇腹を貫通!――14へ。"); } else { add_msg("助かった。209へ。"); } break; } break;
case "212": switch (Section.subnum) { case 0: add_msg("足元にピンと張られていたワイヤーに足をとられた! サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip === 1 || dice.die1pip === 3 || dice.die1pip === 5) { add_msg("ワイヤーにひっかかって転倒! サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); } else { add_msg("転ばずにすんだ。222へ。"); } break; case 2: Pip.LIFE_POINT -= dice.dice12pip; update_status(); add_msg("転んで生命点を" + dice.dice12pip + "点失った。"); break; } break;
case "216": add_msg("ドスン!! ゼリー・モンスターの上に落ちた。"); combat.encounter(); // ゼリー・モンスター break;
case "221": switch (Section.subnum) { case 0: add_msg("また闇の穴を飛び越えて戻らなくてはならないぞ。気を取り直して、サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip >= 6) { add_msg("216へ。"); } else { add_msg("224へ。"); } break; } break;
case "226": switch (Section.subnum) { case 0: res = confirm("エクスカリバーが本物かニセ物か確かめるか?"); if (res===true) { Section.subnum++; add_msg("闇の穴をジャンプして、奥の大理石へ飛べ。サイコロ2個を思いっきり振れ。"); dice.start(2, "Section.ctrl()"); } break; case 1: if (dice.dice12pip >= 6) { add_msg("221へ。"); } else { add_msg("216へ。"); } break; } break;
case "RUNNING": switch (Section.subnum) { case 0: add_msg("『逃亡』サイコロを1個振ってみろ!"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip === 1) { add_msg("敵に背後から襲われて殺されてしまう――14へ。"); } else if (dice.die1pip === 2) { add_msg("2が出た。24へ。"); } else if (dice.die1pip === 3) { add_msg("3が出た。71へ。"); } else if (dice.die1pip === 4) { add_msg("4が出た。76へ。"); } else if (dice.die1pip === 5) { add_msg("5が出た。19へ。"); } else { add_msg("5が出た。38へ。"); } break; } break;
case "M1": add_msg("固い玄武岩の中にいる。4分たったら14へ行け。"); break;
case "M2": add_msg("装備品の倉庫だ。ここに来るたびに装備を2つ選べる。"); show_Marlins_equip(); break;
case "M3": add_msg("マーリンの魔法の品が蓄えられている一室だ。魔法の品を1つだけ選べ。"); show_Marlins_magic(); break;
case "M4": switch (Section.subnum) { case 0: add_msg("眠って、サイコロ2個振った分の生命点を回復できる。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: Pip.LIFE_POINT = Math.min(Pip.LIFE_POINT + dice.dice12pip, Pip.max_LIFE_POINT); update_status(); break; } break;
case "M6": add_msg("いまの生命点の半分を失った。"); Pip.LIFE_POINT = Math.floor(Pip.LIFE_POINT / 2); update_status(); break;
case "D2": switch (Section.subnum) { case 0: res = confirm("笑わせることに失敗したか?"); if (res===true) { Section.subnum++; add_msg("サイコロを2個振れ。"); dice.start(2, "Section.ctrl()"); } break; case 1: if (dice.dice12pip === Math.round(dice.dice12pip /2) *2) { add_msg("笑ってお目覚め。"); } else { add_msg("生命点を10点失って、不快なお目覚め。"); Pip.LIFE_POINT -= 10; update_status(); } break; } break;
case "D3": switch (Section.subnum) { case 0: add_msg("頭から蝋燭の芯が突き出て、その芯に火がついている。サイコロ1個を4回振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip === 1) { add_msg("火を消せた。"); } else { add_msg("火が消えない。サイコロを1個振れ。(2回目)"); Section.subnum++; dice.start(1, "Section.ctrl()"); } break; case 2: if (dice.die1pip === 1) { add_msg("火を消せた。"); } else { add_msg("火が消えない。サイコロを1個振れ。(3回目)"); Section.subnum++; dice.start(1, "Section.ctrl()"); } break; case 3: if (dice.die1pip === 1) { add_msg("火を消せた。"); } else { add_msg("火が消えない。サイコロを1個振れ。(4回目)"); Section.subnum++; dice.start(1, "Section.ctrl()"); } break; case 4: if (dice.die1pip === 1) { add_msg("火を消せた。"); } else { add_msg("4回とも失敗した。全身がどろどろに溶けて、14へ。"); } break; } break;
case "D4": switch (Section.subnum) { case 0: add_msg("マーリンの寝ている毛布の山をよじ登っている。サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip === Math.round(dice.dice12pip/4)*4) { add_msg("マーリンが寝返りをうった。毛布の雪崩にあって遭難死!"); } else { add_msg("無事毛布の山を登りきった。"); } break; } break;
case "D5": switch (Section.subnum) { case 0: add_msg("巨大ドミノが倒れるか、サイコロ1個を3回振れ。(1回目)"); i = 0; Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip === Math.round(dice.die1pip/2)*2) { add_msg("偶数が出た。これまでの奇数は" + i + "回。サイコロを1個振れ。(2回目)"); } else { i++; add_msg("奇数が出た。これまでの奇数は" + i + "回。サイコロを1個振れ。(2回目)"); } Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 2: if (dice.die1pip === Math.round(dice.die1pip/2)*2) { add_msg("偶数が出た。これまでの奇数は" + i + "回。サイコロを1個振れ。(3回目)"); } else { i++; add_msg("奇数が出た。これまでの奇数は" + i + "回。サイコロを1個振れ。(3回目)"); } Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 3: if (dice.die1pip === Math.round(dice.die1pip/2)*2) { add_msg("偶数が出た。これまでの奇数は" + i + "回。"); } else { i++; add_msg("奇数が出た。これまでの奇数は" + i + "回。"); } if (i === 2) { Pip.LIFE_POINT -= 5; update_status(); add_msg("足を引っかけて巨大ドミノを倒した。下敷きになって、生命点を5点失った。"); } break; } break;
case "D7": add_msg("きみの身体から、するりと骨が抜け出して戦いを挑んできた。"); combat.encounter(); // 骸骨 break;
case "D8": switch (Section.subnum) { case 0: add_msg("今まで殺してきた敵の亡霊達がゾロゾロお礼参りにやってきたぞ! 亡霊の数を決めるために、サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: combat.encounter(); // 亡霊 break; } break;
case "D9": switch (Section.subnum) { case 0: add_msg("耳が異様に大きくなり、パタパタはばたきはじめた。サイコロを1個振れ。"); Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip >= 5) { add_msg("耳はもとにもどった。"); } else { add_msg("失敗した。14まで頭を持っていかれた。"); } break; } break;
case "D10": add_msg("E・Jがプリンになってしまった!"); add_msg("以後2回の戦いに限り、与える被害点は2点になってしまう。"); EJ.pudding = 2; combat.encounter(); // 骸骨 break;
case "D11": switch (Section.subnum) { case 0: add_msg("アーサー王「黒い水を飲む悪魔め!」。サイコロを2個振れ。"); Section.subnum++; dice.start(2, "Section.ctrl()"); break; case 1: if (dice.dice12pip === 7) { add_msg("アーサー王の誤解が解けた。"); } else { add_msg("もう一度サイコロを振って夢時間セクションを選びなおせ。"); dice.start(2, "Section.num = 'D' + dice.dice12pip; Section.ctrl()"); } break; } break;
case "D12": switch (Section.subnum) { case 0: add_msg("ヨガで身体がほどけなくなった! 手のサイコロを1個振れ。"); i = 0; Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 1: if (dice.die1pip !== Math.round(dice.die1pip/2)*2) { i++; add_msg("奇数が出た。これまでの奇数は" + i + "回。足のサイコロを1個振れ。"); } else { i++; add_msg("偶数が出た。これまでの奇数は" + i + "回。足のサイコロを1個振れ。"); } Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 2: if (dice.die1pip !== Math.round(dice.die1pip/2)*2) { i++; add_msg("奇数が出た。これまでの奇数は" + i + "回。頭のサイコロを1個振れ。"); } else { i++; add_msg("偶数が出た。これまでの奇数は" + i + "回。頭のサイコロを1個振れ。"); } Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 3: if (dice.die1pip !== Math.round(dice.die1pip/2)*2) { i++; add_msg("奇数が出た。これまでの奇数は" + i + "回。胴のサイコロを1個振れ。"); } else { i++; add_msg("偶数が出た。これまでの奇数は" + i + "回。胴のサイコロを1個振れ。"); } Section.subnum++; dice.start(1, "Section.ctrl()"); break; case 4: if (dice.die1pip !== Math.round(dice.die1pip/2)*2) { i++; add_msg("奇数が出た。以後" + i + "回の戦いだけ、敵に与える被害点が2点マイナスされる。"); } else { i++; add_msg("偶数が出た。これまでの奇数は" + i + "回の戦いだけ、敵に与える被害点が2点マイナスされる。"); } Pip.yoga = i; break; } break;
}
このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー と 利用規約 が適用されます。
1文字以上入力してください
本文は少なくとも1文字以上必要です。
1文字以上入力してください。