<!-- var1.03変更内容:HP0以下でダメ計時に割合表示を初期化 -->
<!-- var1.03変更内容:ステラテラス用の1.2倍補正を内部的には4915/4096に修正 -->
<!-- var1.04変更内容:乗算記号代わりの「x」を「×」に統一 -->
<!-- var1.04変更内容:ダメージ計算時の状況の表示を追加 -->
<!-- var1.05変更内容:半減実の発動条件『タイプ相性が2倍以上の時』を削除(ホズのみの存在から) -->
<!-- var1.06変更内容:応援効果の解析結果に基づいて一部修正 -->
<!-- var1.07変更内容:でんきだまの処理が正しくされないバグを修正 -->
<!-- var1.03変更内容:ステラテラス用の1.2倍補正を内部的には4915/4096に修正 -->
<!-- var1.04変更内容:乗算記号代わりの「x」を「×」に統一 -->
<!-- var1.04変更内容:ダメージ計算時の状況の表示を追加 -->
<!-- var1.05変更内容:半減実の発動条件『タイプ相性が2倍以上の時』を削除(ホズのみの存在から) -->
<!-- var1.06変更内容:応援効果の解析結果に基づいて一部修正 -->
<!-- var1.07変更内容:でんきだまの処理が正しくされないバグを修正 -->
<!-- 以下をエディタにコピペして拡張子を.htmlにして保存&ブラウザ等で開く -->
<!-- 参考:https://latest.pokewiki.net/%E3%83%80%E3%83%A1%E3%83%BC%E3%82%B8%E8%A8%88%E7%AE%97%E5%BC%8F --> <!-- 参考:https://wiki.xn--rckteqa2e.com/wiki/%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8 --> <!-- var1.07 --> <body> <!-------- フォーム --------> <form name="myForm"> <!-------- 攻撃側ポケモン --------> <h2>ダメ計ツール</h2> <h3>攻撃側情報</h3> <b>攻撃側ポケモンのレベル</b><br> <input type="number" name="AtkLv" id="AtkLv" size="30" value="100" min="0" max="100" step="1" style="background-color:#FFCCCC"> <input type="button" name="Deflv100" value="100" onclick="change_value('AtkLv', 100)"> <input type="button" name="Deflv90" value="90" onclick="change_value('AtkLv', 90)"> <input type="button" name="Deflv75" value="75" onclick="change_value('AtkLv', 75)"> <input type="button" name="Deflv50" value="50" onclick="change_value('AtkLv', 50)"> <input type="button" name="Deflv45" value="45" onclick="change_value('AtkLv', 45)"> <br> 攻撃側ポケモンのAC<br> <table border="1"> <tr><td>種族値</td><td>個体値</td><td>努力値</td><td>性格補正</td></tr> <tr><td><input type="number" name="AtkSn" size="30" value="0" min="0" max="255" step="1"></td> <td><input type="number" name="AtkKn" size="30" value="31" min="0" max="31" step="1"></td> <td> <input type="number" name="AtkDn" id="AtkDn" size="30" value="0" min="0" max="252" step="4"> <input type="button" name="AtkDn0" value="0" onclick="change_value('AtkDn', 0)"> <input type="button" name="AtkDn252" value="252" onclick="change_value('AtkDn', 252)"> </td> <td> +<input type="checkbox" name ="Atkup" id="Atkup" class="check" onclick="uncheck(['Atkdn'])"> -<input type="checkbox" name ="Atkdn" id="Atkdn" class="check" onclick="uncheck(['Atkup'])"> </td> </tr> </table> <b>AC実数値</b> <input type="number" name="AtkJn" size="30" value="0" id="AtkJn" min="0" max="99999" step="1" style="background-color:#FFCCCC"> <input type="button" name="CalcAtKJn" value="計算" onclick="calc_AtkJn()"> <br> 能力ランク <select name="AtkRank" size="1" > <option value="6">+6</option> <option value="5">+5</option> <option value="4">+4</option> <option value="3">+3</option> <option value="2">+2</option> <option value="1">+1</option> <option value="0" selected="selected">0</option> <option value="-1">-1</option> <option value="-2">-2</option> <option value="-3">-3</option> <option value="-4">-4</option> <option value="-5">-5</option> <option value="-6">-6</option> </select> <br> <br> 攻撃側特性 <select name="AtkAbility" size="1" onchange="showSoudaishou(this.value)"> <option value="None__None">----------</option> <option value="Pow_1.3__アナライズ (威力 ×1.3)">アナライズ (威力 ×1.3)</option> <option value="Iromegane__いろめがね (半減時与ダメ ×2)">いろめがね (半減時与ダメ ×2)</option> <option value="AC_1.5__いわはこび (AorC ×1.5)">いわはこび (AorC ×1.5)</option> <option value="Pow_1.2__エレキスキン (威力 ×1.2)">エレキスキン (威力 ×1.2)</option> <option value="Pow_1.3__かたいつめ (威力 ×1.3)">かたいつめ (威力 ×1.3)</option> <option value="Pow_1.5__がんじょうあご (威力 ×1.5)">がんじょうあご (威力 ×1.5)</option> <option value="Pow_1.5__きれあじ (威力 ×1.5)">きれあじ (威力 ×1.5)</option> <option value="AC_1.3__クォークチャージ (AorC ×1.3)">クォークチャージ (AorC ×1.3)</option> <option value="AC_1.5__げきりゅう (AorC ×1.5)">げきりゅう (AorC ×1.5)</option> <option value="AC_1.3__こだいかっせい (AorC ×1.3)">こだいかっせい (AorC ×1.3)</option> <option value="AC_1.5__こんじょう (A ×1.5)">こんじょう (A ×1.5)</option> <option value="AC_1.5__サンパワー (C ×1.5)">サンパワー (C ×1.5)</option> <option value="AC_1.5__しんりょく (AorC ×1.5)">しんりょく (AorC ×1.5)</option> <option value="AC_2.0__すいほう (AorC ×2)">すいほう (AorC ×2)</option> <option value="Pow_1.2__すてみ (威力 ×1.2)">すてみ (威力 ×1.2)</option> <option value="Sniper__スナイパー (急所時与ダメ ×1.5)">スナイパー (急所時与ダメ ×1.5)</option> <option value="Pow_1.3__すなのちから (威力 ×1.3)">すなのちから (威力 ×1.3)</option> <option value="SlowStart__スロースタート (A ×0.5)">スロースタート (A ×0.5)</option> <option value="Soudaishou">そうだいしょう (威力 ×1.n)</option> <option value="Pow_1.3__ちからずく (威力 ×1.3)">ちからずく (威力 ×1.3)</option> <option value="AC_2.0__ちからもち (A ×2)">ちからもち (A ×2)</option> <option value="Pow_1.5__テクニシャン (威力 ×1.5)">テクニシャン (威力 ×1.5)</option> <option value="Pow_1.2__てつのこぶし (威力 ×1.2)">てつのこぶし (威力 ×1.2)</option> <option value="Pow_1.25__とうそうしん (威力 ×1.25)">とうそうしん+ (威力 ×1.25)</option> <option value="Pow_0.75__とうそうしん (威力 ×0.75)">とうそうしん- (威力 ×0.75)</option> <option value="Pow_1.5__どくぼうそう (威力 ×1.5)">どくぼうそう (威力 ×1.5)</option> <option value="AC_1.3__トランジスタ (AorC ×1.3)">トランジスタ (AorC ×1.3)</option> <option value="Pow_1.5__ねつぼうそう (威力 ×1.5)">ねつぼうそう (威力 ×1.5)</option> <option value="AC_1.333__ハドロンエンジン (C ×4/3)">ハドロンエンジン (C ×4/3)</option> <option value="Harikiri__はりきり (A ×1.5)">はりきり (A ×1.5)</option> <option value="AC_2.0__はりこみ (A ×2)">はりこみ (A ×2)</option> <option value="Pow_1.3__パンクロック (威力 ×1.3)">パンクロック (威力 ×1.3)</option> <option value="AC_1.333__ひひいろのこどう (A ×4/3)">ひひいろのこどう (A ×4/3)</option> <option value="Pow_1.2__フェアリースキン (威力 ×1.2)">フェアリースキン (威力 ×1.2)</option> <option value="AC_1.5__プラス (C ×1.5)">プラス (C ×1.5)</option> <option value="AC_1.5__マイナス (C ×1.5)">マイナス (C ×1.5)</option> <option value="AC_1.5__むしのしらせ (AorC ×1.5)">むしのしらせ (AorC ×1.5)</option> <option value="Pow_1.5__メガランチャー (威力 ×1.5)">メガランチャー (威力 ×1.5)</option> <option value="AC_1.5__もうか (AorC ×1.5)">もうか (AorC ×1.5)</option> <option value="AC_1.5__もらいび (AorC ×1.5)">もらいび (AorC ×1.5)</option> <option value="AC_2.0__ヨガパワー (A ×2)">ヨガパワー (A ×2)</option> <option value="AC_1.5__りゅうのあぎと (AorC ×1.5)">りゅうのあぎと (AorC ×1.5)</option> </select> <span id="Soudaishow" style="display:none;"> そうだいしょう上昇率 <select name="Soudaishou_rate"> <option value="Pow_1.1_p__そうだいしょう1体 (威力 ×1.1)">1体 (威力 ×1.1)</option> <option value="Pow_1.2__そうだいしょう2体 (威力 ×1.2)">2体 (威力 ×1.2)</option> <option value="Pow_1.3__そうだいしょう3体 (威力 ×1.3)">3体 (威力 ×1.3)</option> <option value="Pow_1.4__そうだいしょう4体 (威力 ×1.4)">4体 (威力 ×1.4)</option> <option value="Pow_1.5__そうだいしょう5体 (威力 ×1.5)">5体 (威力 ×1.5)</option> </select> </span> <br> 攻撃側道具 <select name="AtkItem" size="1" onchange="showMetoro(this.value)"> <option value="None__None">----------</option> <option value="Metoro">メトロノーム (与ダメ ×1.2~2.0)</option> <option value="Dam_1.2__たつじんのおび (与ダメ ×1.2)">たつじんのおび (与ダメ ×1.2)</option> <option value="Pow_1.2__タイプ強化アイテム (威力 ×1.2)">タイプ強化アイテム (威力 ×1.2)</option> <option value="AC_1.5__こだわりハチマキ (AorC ×1.5)">こだわりハチマキ/メガネ (AorC ×1.5)</option> <option value="Dam_1.3__いのちのたま (与ダメ ×1.3)">いのちのたま (与ダメ ×1.3)</option> <option value="Pow_1.1_p__パンチグローブ (威力 ×1.1)">パンチグローブ (威力 ×1.1)</option> <option value="Pow_1.3__ノーマルジュエル (威力 ×1.3)">ノーマルジュエル (威力 ×1.3)</option> <option value="Pow_1.1__ちからのハチマキ (威力 ×1.1)">ちからのハチマキ (威力 ×1.1)</option> <option value="Pow_1.1__ものしりめがね (威力 ×1.1)">ものしりメガネ (威力 ×1.1)</option> <option value="AC_2.0__でんきだま (AorC ×2)">でんきだま (AorC ×2)</option> </select> <span id="Metoroshow" style="display:none;"> メトロノーム上昇率 <select name="Metoro_rate"> <option value="Dam_1.2__メトロノーム2回目 (与ダメ ×1.2)">2回目 (与ダメ ×1.2)</option> <option value="Dam_1.4__メトロノーム3回目 (与ダメ ×1.4)">3回目 (与ダメ ×1.4)</option> <option value="Dam_1.6__メトロノーム4回目 (与ダメ ×1.6)">4回目 (与ダメ ×1.6)</option> <option value="Dam_1.8__メトロノーム5回目 (与ダメ ×1.8)">5回目 (与ダメ ×1.8)</option> <option value="Dam_2.0__メトロノーム6回目 (与ダメ ×2.0)">6回目 (与ダメ ×2.0)</option> </select> </span> <br> <details> <summary>その他の攻撃側補正</summary> <input type="checkbox" name="Multi" id="Multi">全体攻撃 (与ダメ ×0.75)<br> <input type="checkbox" name="Burn" id="Burn">やけど (与ダメ ×0.5)<br> <input type="checkbox" name="Helping" id="Helping">てだすけ (威力 ×1.5)<br> <input type="checkbox" name="Yell_A" id="Yell_A" class="check" onclick="uncheck(['Yell_A_2'])">攻撃応援(通常) (AorC ×1.5)<br> <input type="checkbox" name="Yell_A_2" id="Yell_A_2" class="check" onclick="uncheck(['Yell_A'])">攻撃応援(瀕死重複) (AorC ×2.0)<br> <input type="checkbox" name="Charge" id="Charge">じゅうでん (威力 ×2)<br> <input type="checkbox" name="Weather_A_plus" id="Weather_A_plus" class="check" onclick="uncheck(['Weather_A_minus', 'Weather_D'])">晴/雨 (与ダメ ×1.5)<br> <input type="checkbox" name="Weather_A_minus" id="Weather_A_minus" class="check" onclick="uncheck(['Weather_A_plus', 'Weather_D'])">晴/雨 (与ダメ ×0.5)<br> <input type="checkbox" name="Field_plus" id="Field_plus" class="check" onclick="uncheck(['Field_minus'])">フィールド (威力 ×1.3)<br> <input type="checkbox" name="Field_minus" id="Field_minus" class="check" onclick="uncheck(['Field_plus'])">フィールド (威力 ×0.5)<br> <input type="checkbox" name="Ruin_AC" id="Ruin_AC">わざわいのおふだ/うつわ (AorC ×0.75)<br> <input type="checkbox" name="Battery_1" id="Battery_1" class="check" onclick="uncheck(['Battery_2', 'Battery_3'])">バッテリー×1 (威力 ×1.3)<br> <input type="checkbox" name="Battery_2" id="Battery_2" class="check" onclick="uncheck(['Battery_1', 'Battery_3'])">バッテリー×2 (威力 ×1.69)<br> <input type="checkbox" name="Battery_3" id="Battery_3" class="check" onclick="uncheck(['Battery_1', 'Battery_2'])">バッテリー×3 (威力 ×2.12)<br> <input type="checkbox" name="SteelyS_1" id="SteelyS_1" class="check" onclick="uncheck(['SteelyS_2', 'SteelyS_3', 'SteelyS_4'])">はがねのせいしん×1 (威力 ×1.5)<br> <input type="checkbox" name="SteelyS_2" id="SteelyS_2" class="check" onclick="uncheck(['SteelyS_1', 'SteelyS_3', 'SteelyS_4'])">はがねのせいしん×2 (威力 ×2.25)<br> <input type="checkbox" name="SteelyS_3" id="SteelyS_3" class="check" onclick="uncheck(['SteelyS_1', 'SteelyS_2', 'SteelyS_4'])">はがねのせいしん×3 (威力 ×3.375)<br> <input type="checkbox" name="SteelyS_4" id="SteelyS_4" class="check" onclick="uncheck(['SteelyS_1', 'SteelyS_2', 'SteelyS_3'])">はがねのせいしん×4 (威力 ×5.0625)<br> <input type="checkbox" name="PowerS" id="PowerS">パワースポット (威力 ×1.3)<br> <input type="checkbox" name="Other_Pow_x" id="Other_Pow_x" class="check" onclick="uncheck(['Other_Pow_y', 'Other_Pow_a', 'Other_Pow_b', 'Other_Pow_c'])">相手の状態を参照する技の2倍 (与ダメ ×2)<br> <input type="checkbox" name="Other_Pow_y" id="Other_Pow_y" class="check" onclick="uncheck(['Other_Pow_x', 'Other_Pow_a', 'Other_Pow_b', 'Other_Pow_c'])">アクセルブレイクorイナズマドライブの4/3倍 (与ダメ ×4/3)<br> <input type="checkbox" name="Other_Pow_a" id="Other_Pow_a" class="check" onclick="uncheck(['Other_Pow_x', 'Other_Pow_y', 'Other_Pow_b', 'Other_Pow_c'])">その他技固有効果の2倍 (威力 ×2)<br> <input type="checkbox" name="Other_Pow_b" id="Other_Pow_b" class="check" onclick="uncheck(['Other_Pow_x', 'Other_Pow_y', 'Other_Pow_a', 'Other_Pow_c'])">その他技固有効果の1.5倍 (威力 ×1.5)<br> <input type="checkbox" name="Other_Pow_c" id="Other_Pow_c" class="check" onclick="uncheck(['Other_Pow_x', 'Other_Pow_y', 'Other_Pow_a', 'Other_Pow_b'])">その他技固有効果の0.5倍 (威力 ×0.5)<br> <input type="button" name="AtkAllClear" value="全てのチェックを外す" onclick="uncheck(['Multi', 'Burn', 'Helping', 'Yell_A', 'Yell_A_2', 'Charge', 'Weather_A_plus', 'Weather_A_minus', 'Field_plus', 'Field_minus', 'Ruin_AC', 'Battery_1', 'Battery_2', 'Battery_3', 'SteelyS_1', 'SteelyS_2', 'SteelyS_3', 'SteelyS_4', 'PowerS', 'Other_Pow_x', 'Other_Pow_y', 'Other_Pow_a', 'Other_Pow_b', 'Other_Pow_c'])"> <br> </details> <br> <!-------- 受け側ポケモン --------> <h3>受け側情報</h3> 受け側ポケモンのレベル<br> <input type="number" name="DefLv" id="DefLv" size="30" value="100" min="0" max="100" step="1"> <input type="button" name="Deflv100" value="100" onclick="change_value('DefLv', 100)"> <input type="button" name="Deflv90" value="90" onclick="change_value('DefLv', 90)"> <input type="button" name="Deflv75" value="75" onclick="change_value('DefLv', 75)"> <input type="button" name="Deflv50" value="50" onclick="change_value('DefLv', 50)"> <input type="button" name="Deflv45" value="45" onclick="change_value('DefLv', 45)"> <br> <details> <summary>受け側ポケモンのHP</summary> <table border="1"> <tr><td>種族値</td><td>個体値</td><td>努力値</td><td>レイドボス補正</td></tr> <tr><td><input type="number" name="HPSn" size="30" value="0" min="0" max="255" step="1"></td> <td><input type="number" name="HPKn" size="30" value="31" min="0" max="31" step="1"></td> <td> <input type="number" name="HPDn" id="HPDn" size="30" value="0" min="0" max="252" step="4"> <input type="button" name="HPDn0" value="0" onclick="change_value('HPDn', 0)"> <input type="button" name="HPDn252" value="252" onclick="change_value('HPDn', 252)"> </td> <td> <input type="number" name="HPBoss" id="HPBoss" size="30" value="1" min="1" max="100" step="1"> <input type="button" name="HPBoss1" value="通常" onclick="change_value('HPBoss', 1)"> <input type="button" name="HPBoss12" value="☆4" onclick="change_value('HPBoss', 12)"> <input type="button" name="HPBoss20" value="☆5" onclick="change_value('HPBoss', 20)"> <input type="button" name="HPBoss25" value="☆6" onclick="change_value('HPBoss', 25)"> <input type="button" name="HPBoss30" value="×30" onclick="change_value('HPBoss', 30)"> <input type="button" name="HPBoss35" value="×35" onclick="change_value('HPBoss', 35)"> <input type="button" name="HPBoss30" value="×50" onclick="change_value('HPBoss', 50)"> </td> </tr> </table> <b>HP実数値</b> <input type="number" name="HPJn" size="30" value="0" id="HPJn" min="0" max="99999" step="1"> <input type="button" name="CalcHPJn" value="計算" onclick="calc_HPJn()"> <br> </details> 受け側ポケモンのBD<br> <table border="1"> <tr><td>種族値</td><td>個体値</td><td>努力値</td><td>性格補正</td></tr> <tr><td><input type="number" name="DefSn" size="30" value="0" min="0" max="255" step="1"></td> <td><input type="number" name="DefKn" size="30" value="31" min="0" max="31" step="1"></td> <td> <input type="number" name="DefDn" id="DefDn" size="30" value="0" min="0" max="252" step="4"> <input type="button" name="DefDn0" value="0" onclick="change_value('DefDn', 0)"> <input type="button" name="DefDn252" value="252" onclick="change_value('DefDn', 252)"> </td> <td> +<input type="checkbox" name ="Defup" id="Defup" class="check" onclick="uncheck(['Defdn'])"> -<input type="checkbox" name ="Defdn" id="Defdn" class="check" onclick="uncheck(['Defup'])"> </td> </tr> </table> <b>BD実数値</b> <input type="number" name="DefJn" size="30" value="0" id="DefJn" min="0" max="99999" step="1" style="background-color:#FFCCCC"> <input type="button" name="CalcDefJn" value="計算" onclick="calc_DefJn()"> <br> 能力ランク <select name="DefRank" size="1" > <option value="6">+6</option> <option value="5">+5</option> <option value="4">+4</option> <option value="3">+3</option> <option value="2">+2</option> <option value="1">+1</option> <option value="0" selected="selected">0</option> <option value="-1">-1</option> <option value="-2">-2</option> <option value="-3">-3</option> <option value="-4">-4</option> <option value="-5">-5</option> <option value="-6">-6</option> </select> <br> <br> 受け側特性 <select name="DefAbility" size="1"> <option value="None__None">----------</option> <option value="AC_0.5__あついしぼう (相手のAorC ×0.5)">あついしぼう (相手のAorC ×0.5)</option> <option value="Pow_1.25__かんそうはだ (威力 ×1.25)">かんそうはだ (威力 ×1.25)</option> <option value="AC_0.5__きよめのしお (相手のAorC ×0.5)">きよめのしお (相手のAorC ×0.5)</option> <option value="BD_1.3__クォークチャージ (BorD ×1.3)">クォークチャージ (BorD ×1.3)</option> <option value="BD_1.5__くさのけがわ (B ×1.5)">くさのけがわ (B ×1.5)</option> <option value="Mhalf__こおりのりんぷん (被ダメ ×0.5)">こおりのりんぷん (被ダメ ×0.5)</option> <option value="BD_1.3__こだいかっせい (BorD ×1.3)">こだいかっせい (BorD ×1.3)</option> <option value="AC_0.5__すいほう (相手のAorC ×0.5)">すいほう (相手のAorC ×0.5)</option> <option value="AC_0.5__たいねつ (相手のAorC ×0.5)">たいねつ (相手のAorC ×0.5)</option> <option value="Filter__ハードロック (抜群時被ダメ ×0.75)">ハードロック (抜群時被ダメ ×0.75)</option> <option value="Mhalf__パンクロック (被ダメ ×0.5)">パンクロック (被ダメ ×0.5)</option> <option value="BD_2.0__ファーコート (B ×2)">ファーコート (B ×2)</option> <option value="Mhalf__ファントムガード (被ダメ ×0.5)">ファントムガード (被ダメ ×0.5)</option> <option value="Filter__フィルター (抜群時被ダメ ×0.75)">フィルター (抜群時被ダメ ×0.75)</option> <option value="BD_1.5__ふしぎなうろこ (B ×1.5)">ふしぎなうろこ (B ×1.5)</option> <option value="Filter__プリズムアーマー (抜群時被ダメ ×0.75)">プリズムアーマー (抜群時被ダメ ×0.75)</option> <option value="Mhalf__マルチスケイル (HPMax時被ダメ ×0.5)">マルチスケイル (被ダメ ×0.5)</option> <option value="Mhalf__もふもふ (接触技被ダメ ×0.5)">もふもふ (接触技被ダメ ×0.5)</option> <option value="Mofu__もふもふ (炎技被ダメ ×2)">もふもふ (炎技被ダメ ×2)</option> </select> <br> 受け側道具 <select name="DefItem" size="1"> <option value="None__None">----------</option> <option value="BD_1.5__とつげきチョッキ (D ×1.5)">とつげきチョッキ (D ×1.5)</option> <option value="HangenMi__半減実 (被ダメ ×0.5)">半減実 (被ダメ ×0.5)</option> <option value="BD_1.5__しんかのきせき (BorD ×1.5)">しんかのきせき (BorD ×1.5)</option> </select> <br> テラレイドシールド <select name="Shield" size="1"> <option value="0">--------</option> <option value="1">通常(☆4~6)</option> <option value="2">イベント☆5</option> <option value="3">☆7</option> <option value="4">☆7ピカチュウ</option> </select> <select name="TeraMatch" size="1"> <option value="0">--------</option> <option value="1">非テラスタル時</option> <option value="2">テラスタル非一致技</option> <option value="3">テラスタル一致技</option> </select> <br> <details> <summary>その他の受け側補正</summary> <input type="checkbox" name="Yell_D" id="Yell_D" class="check" onclick="uncheck(['Yell_D_2'])">防御応援(通常) (BorD ×1.5)<br> <input type="checkbox" name="Yell_D_2" id="Yell_D_2" class="check" onclick="uncheck(['Yell_D'])">防御応援(瀕死重複) (BorD ×2.0)<br> <input type="checkbox" name="Wall_s" id="Wall_s" class="check" onclick="uncheck(['Wall_m'])">壁(単体) (被ダメ ×1/2)<br> <input type="checkbox" name="Wall_m" id="Wall_m" class="check" onclick="uncheck(['Wall_s'])">壁(全体) (被ダメ ×2/3)<br> <input type="checkbox" name="Weather_D" id="Weather_D" class="check" onclick="uncheck(['Weather_A_minus', 'Weather_A_plus'])">雪/砂 (BorD ×1.5)<br> <input type="checkbox" name="Friend_1" id="Friend_1" class="check" onclick="uncheck(['Friend_2', 'Friend_3'])">フレンドガード×1 (被ダメ ×3/4)<br> <input type="checkbox" name="Friend_2" id="Friend_2" class="check" onclick="uncheck(['Friend_1', 'Friend_3'])">フレンドガード×2 (被ダメ ×9/16)<br> <input type="checkbox" name="Friend_3" id="Friend_3" class="check" onclick="uncheck(['Friend_1', 'Friend_2'])">フレンドガード×3 (被ダメ ×27/64)<br> <input type="checkbox" name="Ruin_BD" id="Ruin_BD">わざわいのつるぎ/たま (BorD ×0.75)<br> <input type="button" name="AtkAllClear" value="全てのチェックを外す" onclick="uncheck(['Yell_D', 'Yell_D_2', 'Wall_s', 'Wall_m', 'Weather_D', 'Friend_1', 'Friend_2', 'Friend_3', 'Ruin_BD'])"> <br> </details> <br> <!-------- 技情報 --------> <h3>技情報</h3> <b>技威力</b> <input type="number" name="Power" id="Power" size="5" value="0" style="background-color:#FFCCCC"> 相性 <select name="Eff" size="1" > <option value="16">×16</option> <option value="8">×8</option> <option value="4">×4</option> <option value="2">×2</option> <option value="1" selected="selected">×1</option> <option value="0.5">÷2</option> <option value="0.25">÷4</option> <option value="0.125">÷8</option> </select> 一致補正 <select name="Match" size="1" > <option value="2.25">×2.25(適応力+一致テラス)</option> <option value="2">×2</option> <option value="1.5">×1.5</option> <option value="1.2">×1.2(ステラ)</option> <option value="1" selected="selected">×1</option> </select> <br><br> <!-------- 計算ボタン --------> <h3>計算</h3> <input type="button" name="myButton" value="ダメージ計算" onclick="setResult()"> </form> <!-------- 結果表示部 --------> <details> <summary>状況</summary> <table border="1"> <tr><td rowspan="4">攻撃側</td><td>レベル</td><td><span id="Disp_AtkLv">***</span></td></tr> <tr><td>AC実数値</td><td><span id="Disp_AtkJn">***</span></td></tr> <tr><td>ランク</td><td><span id="Disp_AtkRank">***</span></td></tr> <tr><td>補正</td><td><span id="Disp_AtkOthers">***</span></td></tr> <tr><td rowspan="4">受け側</td><td>HP実数値</td><td><span id="Disp_DefHP">***</span></td></tr> <tr><td>BD実数値</td><td><span id="Disp_DefJn">***</span></td></tr> <tr><td>ランク</td><td><span id="Disp_DefRank">***</span></td></tr> <tr><td>補正</td><td><span id="Disp_DefOthers">***</span></td></tr> <tr><td rowspan="3">技</td><td>威力</td><td><span id="Disp_Power">***</span></td></tr> <tr><td>相性</td><td><span id="Disp_Eff">***</span></td></tr> <tr><td>一致</td><td><span id="Disp_Match">***</span></td></tr> </table> </details> <br> 数値 <table border="1"> <tr><td>乱数</td><td>85<td>86</td> <td>87</td><td>88</td> <td>89</td><td>90</td> <td>91</td><td>92</td> <td>93</td><td>94</td> <td>95</td><td>96</td> <td>97</td><td>98</td> <td>99</td><td>100</td></tr> <tr><td>通常</td><td><span id="NRes_085">***</span></td><td><span id="NRes_086">***</span></td> <td><span id="NRes_087">***</span></td><td><span id="NRes_088">***</span></td> <td><span id="NRes_089">***</span></td><td><span id="NRes_090">***</span></td> <td><span id="NRes_091">***</span></td><td><span id="NRes_092">***</span></td> <td><span id="NRes_093">***</span></td><td><span id="NRes_094">***</span></td> <td><span id="NRes_095">***</span></td><td><span id="NRes_096">***</span></td> <td><span id="NRes_097">***</span></td><td><span id="NRes_098">***</span></td> <td><span id="NRes_099">***</span></td><td><span id="NRes_100">***</span></td></tr> <tr><td>急所</td><td><span id="CRes_085">***</span></td><td><span id="CRes_086">***</span></td> <td><span id="CRes_087">***</span></td><td><span id="CRes_088">***</span></td> <td><span id="CRes_089">***</span></td><td><span id="CRes_090">***</span></td> <td><span id="CRes_091">***</span></td><td><span id="CRes_092">***</span></td> <td><span id="CRes_093">***</span></td><td><span id="CRes_094">***</span></td> <td><span id="CRes_095">***</span></td><td><span id="CRes_096">***</span></td> <td><span id="CRes_097">***</span></td><td><span id="CRes_098">***</span></td> <td><span id="CRes_099">***</span></td><td><span id="CRes_100">***</span></td></tr> </table> <br> 割合(%) <table border="1"> <tr><td>乱数</td><td>85<td>86</td> <td>87</td><td>88</td> <td>89</td><td>90</td> <td>91</td><td>92</td> <td>93</td><td>94</td> <td>95</td><td>96</td> <td>97</td><td>98</td> <td>99</td><td>100</td></tr> <tr><td>通常</td><td><span id="NRes_085_p">***</span></td><td><span id="NRes_086_p">***</span></td> <td><span id="NRes_087_p">***</span></td><td><span id="NRes_088_p">***</span></td> <td><span id="NRes_089_p">***</span></td><td><span id="NRes_090_p">***</span></td> <td><span id="NRes_091_p">***</span></td><td><span id="NRes_092_p">***</span></td> <td><span id="NRes_093_p">***</span></td><td><span id="NRes_094_p">***</span></td> <td><span id="NRes_095_p">***</span></td><td><span id="NRes_096_p">***</span></td> <td><span id="NRes_097_p">***</span></td><td><span id="NRes_098_p">***</span></td> <td><span id="NRes_099_p">***</span></td><td><span id="NRes_100_p">***</span></td></tr> <tr><td>急所</td><td><span id="CRes_085_p">***</span></td><td><span id="CRes_086_p">***</span></td> <td><span id="CRes_087_p">***</span></td><td><span id="CRes_088_p">***</span></td> <td><span id="CRes_089_p">***</span></td><td><span id="CRes_090_p">***</span></td> <td><span id="CRes_091_p">***</span></td><td><span id="CRes_092_p">***</span></td> <td><span id="CRes_093_p">***</span></td><td><span id="CRes_094_p">***</span></td> <td><span id="CRes_095_p">***</span></td><td><span id="CRes_096_p">***</span></td> <td><span id="CRes_097_p">***</span></td><td><span id="CRes_098_p">***</span></td> <td><span id="CRes_099_p">***</span></td><td><span id="CRes_100_p">***</span></td></tr> </table> <br> <!-------- JavaScript --------> <script type="text/javascript"> ShieldCorrectionArray = [ [1.0, 1.0, 1.0, 1.0], [1.0, 0.2, 0.35, 0.75], [1.0, 0.2, 0.4, 0.8], [1.0, 0.2, 0.3, 0.7], [1.0, 0.01, 0.7, 1.2], ]; /*==== ダメ計結果を計算して表示 ====*/ function setResult(){ // 攻撃側情報 var AtkLv = parseInt(document.myForm.AtkLv.value, 10); var AtkJn = parseInt(document.myForm.AtkJn.value, 10); var AtkRank = parseInt(document.myForm.AtkRank.value, 10); var AtkAbility = document.myForm.AtkAbility.value; if (AtkAbility == "Soudaishou") AtkAbility = document.myForm.Soudaishou_rate.value; AtkAbility_name = AtkAbility.split("__")[1]; AtkAbility = AtkAbility.split("__")[0]; var AtkItem = document.myForm.AtkItem.value; if (AtkItem == "Metoro") AtkItem = document.myForm.Metoro_rate.value; AtkItem_name = AtkItem.split("__")[1]; AtkItem = AtkItem.split("__")[0]; // 受け側情報 var HPJn = parseInt(document.myForm.HPJn.value, 10); var DefJn = parseInt(document.myForm.DefJn.value, 10); var DefRank = parseInt(document.myForm.DefRank.value, 10); var DefAbility = document.myForm.DefAbility.value; DefAbility_name = DefAbility.split("__")[1]; DefAbility = DefAbility.split("__")[0]; var DefItem = document.myForm.DefItem.value; DefItem_name = DefItem.split("__")[1]; DefItem = DefItem.split("__")[0]; // 技と相性情報 var Power = parseInt(document.myForm.Power.value, 10); var Eff = parseFloat(document.myForm.Eff.value); var Match = parseFloat(document.myForm.Match.value); if (Match == 1.2) Match = 4915/4096; // シールド情報 var Shield = parseFloat(document.myForm.Shield.value); var TeraMatch = parseFloat(document.myForm.TeraMatch.value); //状況まとめ var AtkOthers = ""; AtkOthers = add_text(AtkOthers, AtkAbility_name); AtkOthers = add_text(AtkOthers, AtkItem_name); AtkOthers = AtkOthers_reflectCB(AtkOthers); var DefOthers = ""; DefOthers = add_text(DefOthers, DefAbility_name); DefOthers = add_text(DefOthers, DefItem_name); if (ShieldCorrectionArray[Shield][TeraMatch] != 1.0){ DefOthers = add_text(DefOthers, "テラレイドシールド (被ダメ ×" + ShieldCorrectionArray[Shield][TeraMatch] + ")"); } DefOthers = DefOthers_reflectCB(DefOthers); //状況表示 document.getElementById("Disp_AtkLv").innerHTML = AtkLv; document.getElementById("Disp_AtkJn").innerHTML = AtkJn; if (AtkRank > 0) document.getElementById("Disp_AtkRank").innerHTML = "+"+AtkRank; else if (AtkRank == 0) document.getElementById("Disp_AtkRank").innerHTML = "±"+0; else document.getElementById("Disp_AtkRank").innerHTML = AtkRank; document.getElementById("Disp_AtkOthers").innerHTML = AtkOthers; if (HPJn > 0) document.getElementById("Disp_DefHP").innerHTML = HPJn; else document.getElementById("Disp_DefHP").innerHTML = "未設定"; document.getElementById("Disp_DefJn").innerHTML = DefJn; if (DefRank > 0) document.getElementById("Disp_DefRank").innerHTML = "+"+DefRank; else if (DefRank == 0) document.getElementById("Disp_DefRank").innerHTML = "±"+0; else document.getElementById("Disp_DefRank").innerHTML = DefRank; document.getElementById("Disp_DefOthers").innerHTML = DefOthers; document.getElementById("Disp_Power").innerHTML = Power; document.getElementById("Disp_Eff").innerHTML = "×"+Eff; if (Match == 4915/4096) document.getElementById("Disp_Match").innerHTML = "×1.2"; else document.getElementById("Disp_Match").innerHTML = "×"+Match; // 応援による実数値変化を反映 if (document.myForm.Yell_A.checked) AtkJn = Math.round(-1* AtkJn*1.5)*-1; if (document.myForm.Yell_A_2.checked) AtkJn = Math.round(-1* AtkJn*2.0)*-1; if (document.myForm.Yell_D.checked) DefJn = Math.round(-1* DefJn*1.5)*-1; if (document.myForm.Yell_D_2.checked) DefJn = Math.round(-1* DefJn*2.0)*-1; // 攻撃側のAC補正値を計算 var AtkJnCorrection = 4096; if (AtkAbility == "SlowStart") AtkJnCorrection = Math.round(AtkJnCorrection*1/2); if (document.myForm.Ruin_AC.checked) AtkJnCorrection = Math.round(AtkJnCorrection*3/4); AtkJnCorrection = calc_AtkJnCorrection(AtkJnCorrection, AtkAbility); AtkJnCorrection = calc_AtkJnCorrection(AtkJnCorrection, AtkItem); AtkJnCorrection = calc_AtkJnCorrection(AtkJnCorrection, DefAbility); // 受け側のBD補正値を計算 var DefJnCorrection = 4096; if (document.myForm.Ruin_BD.checked) DefJnCorrection = Math.round(DefJnCorrection*3/4); DefJnCorrection = calc_DefJnCorrection(DefJnCorrection, DefAbility); DefJnCorrection = calc_DefJnCorrection(DefJnCorrection, DefItem); // 技威力の補正値計算 var PowCorrection = 4096; if (AtkAbility == "Pow_2.0" || AtkAbility == "Pow_1.5" || AtkAbility == "Pow_1.4"){ if (document.myForm.Battery_1.checked) AtkJnCorrection = Math.round(AtkJnCorrection*5325/4096); if (document.myForm.Battery_2.checked) AtkJnCorrection = Math.round(AtkJnCorrection*6923/4096); if (document.myForm.Battery_3.checked) AtkJnCorrection = Math.round(AtkJnCorrection*9000/4096); if (document.myForm.PowerS.checked) PowCorrection = Math.round(PowCorrection*5325/4096); PowCorrection = calc_PowCorrection(PowCorrection, AtkAbility); }else{ PowCorrection = calc_PowCorrection(PowCorrection, AtkAbility); if (document.myForm.Battery_1.checked) AtkJnCorrection = Math.round(AtkJnCorrection*5325/4096); if (document.myForm.Battery_2.checked) AtkJnCorrection = Math.round(AtkJnCorrection*6923/4096); if (document.myForm.Battery_3.checked) AtkJnCorrection = Math.round(AtkJnCorrection*9000/4096); if (document.myForm.PowerS.checked) PowCorrection = Math.round(PowCorrection*5325/4096); } if (document.myForm.SteelyS_1.checked) PowCorrection = Math.round(PowCorrection*3/2); if (document.myForm.SteelyS_2.checked) PowCorrection = Math.round(Math.round(PowCorrection*3/2)*3/2); if (document.myForm.SteelyS_3.checked) PowCorrection = Math.round(Math.round(Math.round(PowCorrection*3/2)*3/2)*3/2); if (document.myForm.SteelyS_4.checked) PowCorrection = Math.round(Math.round(Math.round(Math.round(PowCorrection*3/2)*3/2)*3/2)*3/2); PowCorrection = calc_PowCorrection(PowCorrection, DefAbility); PowCorrection = calc_PowCorrection(PowCorrection, AtkItem); if (document.myForm.Other_Pow_c.checked) PowCorrection = Math.round(PowCorrection*1/2); if (document.myForm.Other_Pow_b.checked) PowCorrection = Math.round(PowCorrection*3/2); if (document.myForm.Helping.checked) PowCorrection = Math.round(PowCorrection*3/2); if (document.myForm.Other_Pow_a.checked) PowCorrection = Math.round(PowCorrection*2); if (document.myForm.Charge.checked) PowCorrection = Math.round(PowCorrection*2); if (document.myForm.Field_plus.checked) PowCorrection = Math.round(PowCorrection*5325/4096); if (document.myForm.Field_minus.checked) PowCorrection = Math.round(PowCorrection*1/2); // 与ダメージの補正値計算 var NDamageCorrection = 4096; var CDamageCorrection = 4096; if (document.myForm.Wall_s.checked) NDamageCorrection = Math.round(NDamageCorrection * 1/2); if (document.myForm.Wall_m.checked) NDamageCorrection = Math.round(NDamageCorrection * 2732/4096); if (document.myForm.Other_Pow_x.checked) { NDamageCorrection = Math.round(NDamageCorrection * 5461/4096); CDamageCorrection = Math.round(CDamageCorrection * 5461/4096); } if (AtkAbility == "Sniper") CDamageCorrection = Math.round(CDamageCorrection * 3/2); if (AtkAbility == "Iromegane" && Eff < 1) { NDamageCorrection = Math.round(NDamageCorrection * 2/1); CDamageCorrection = Math.round(CDamageCorrection * 2/1); } if (DefAbility == "Mofu") { NDamageCorrection = Math.round(NDamageCorrection * 2/1); CDamageCorrection = Math.round(CDamageCorrection * 2/1); } if (DefAbility == "Mhalf") { NDamageCorrection = Math.round(NDamageCorrection * 1/2); CDamageCorrection = Math.round(CDamageCorrection * 1/2); } if (DefAbility == "Filter" && Eff > 1) { NDamageCorrection = Math.round(NDamageCorrection * 3/4); CDamageCorrection = Math.round(CDamageCorrection * 3/4); } if (document.myForm.Friend_1.checked) { NDamageCorrection = Math.round(NDamageCorrection * 3/4); CDamageCorrection = Math.round(CDamageCorrection * 3/4); } if (document.myForm.Friend_2.checked) { NDamageCorrection = Math.round(Math.round(NDamageCorrection * 3/4)*3/4); CDamageCorrection = Math.round(Math.round(CDamageCorrection * 3/4)*3/4); } if (document.myForm.Friend_3.checked) { NDamageCorrection = Math.round(Math.round(Math.round(NDamageCorrection * 3/4)*3/4)*3/4); CDamageCorrection = Math.round(Math.round(Math.round(CDamageCorrection * 3/4)*3/4)*3/4); } NDamageCorrection = calc_DamageCorrection(NDamageCorrection, AtkItem); CDamageCorrection = calc_DamageCorrection(CDamageCorrection, AtkItem); NDamageCorrection = calc_DamageCorrection(NDamageCorrection, DefItem); CDamageCorrection = calc_DamageCorrection(CDamageCorrection, DefItem); if (DefItem == "HangenMi"){ NDamageCorrection = Math.round(NDamageCorrection * 1/2); CDamageCorrection = Math.round(CDamageCorrection * 1/2); } if (document.myForm.Other_Pow_x.checked) { NDamageCorrection = Math.round(NDamageCorrection * 2); CDamageCorrection = Math.round(CDamageCorrection * 2); } // ランク&補正込みAC実数値計算 if (AtkRank >= 0){ var NAtkJn = Math.floor(AtkJn * (2+AtkRank)/2); var CAtkJn = Math.floor(AtkJn * (2+AtkRank)/2); } else{ var NAtkJn = Math.floor(AtkJn * 2/(2-AtkRank)); var CAtkJn = Math.floor(AtkJn); } if (AtkAbility== "Harikiri"){ NAtkJn = Math.floor(NAtkJn*3/2); CAtkJn = Math.floor(CAtkJn*3/2); } NAtkJn = Math.round(-1 * NAtkJn * AtkJnCorrection / 4096)*-1; CAtkJn = Math.round(-1 * CAtkJn * AtkJnCorrection / 4096)*-1; if (NAtkJn < 1) NAtkJn = 1; if (CAtkJn < 1) CAtkJn = 1; // ランク&補正込みBD実数値計算 if (DefRank >= 0){ var NDefJn = Math.floor(DefJn * (2+DefRank)/2); var CDefJn = Math.floor(DefJn); } else{ var NDefJn = Math.floor(DefJn * 2/(2-DefRank)); var CDefJn = Math.floor(DefJn * 2/(2-DefRank)); } if (document.myForm.Weather_D.checked){ NDefJn = Math.floor(NDefJn*3/2); CDefJn = Math.floor(CDefJn*3/2); } NDefJn = Math.round(-1 * NDefJn * DefJnCorrection / 4096)*-1; CDefJn = Math.round(-1 * CDefJn * DefJnCorrection / 4096)*-1; if (NDefJn < 1) NDefJn = 1; if (CDefJn < 1) CDefJn = 1; // 補正込み技威力計算 Power = Math.round(-1 * Power * PowCorrection / 4096)*-1; if (Power < 1) Power = 1; // ダメージ計算 var Damage = Math.floor(AtkLv*2/5+2); var NDamage = Math.floor(Damage * Power * NAtkJn / NDefJn); NDamage = Math.floor(NDamage / 50+2); var CDamage = Math.floor(Damage * Power * CAtkJn / CDefJn); CDamage = Math.floor(CDamage / 50+2); // 範囲補正(全体攻撃は0.75倍) if (document.myForm.Multi.checked){ NDamage = Math.round(-1 * NDamage * 3/4) *-1; CDamage = Math.round(-1 * CDamage * 3/4) *-1; } // 天候補正 if (document.myForm.Weather_A_plus.checked){ NDamage = Math.round(-1 * NDamage * 3/2) *-1; CDamage = Math.round(-1 * CDamage * 3/2) *-1; }else if (document.myForm.Weather_A_minus.checked){ NDamage = Math.round(-1 * NDamage * 1/2) *-1; CDamage = Math.round(-1 * CDamage * 1/2) *-1; } // 急所補正 CDamage = Math.round(-1* CDamage * 1.5)*-1; for(i=0; i<16; i++){ tmpNDamage = NDamage; tmpCDamage = CDamage; // 乱数補正 tmpNDamage = Math.floor(tmpNDamage * (85+i)/100); tmpCDamage = Math.floor(tmpCDamage * (85+i)/100); // タイプ一致補正 tmpNDamage = Math.round(-1 * tmpNDamage*Match)*-1; tmpCDamage = Math.round(-1 * tmpCDamage*Match)*-1; // 相性補正 tmpNDamage = Math.floor(tmpNDamage*Eff); tmpCDamage = Math.floor(tmpCDamage*Eff); // やけど補正 if (document.myForm.Burn.checked){ tmpNDamage = Math.round(-1 * tmpNDamage * 1/2) *-1; tmpCDamage = Math.round(-1 * tmpCDamage * 1/2) *-1; } // ダメージ補正 tmpNDamage = Math.round(-1 * tmpNDamage * NDamageCorrection / 4096) *-1; tmpCDamage = Math.round(-1 * tmpCDamage * CDamageCorrection / 4096) *-1; // シールド補正 tmpNDamage = Math.round(-1 * tmpNDamage * ShieldCorrectionArray[Shield][TeraMatch]) * -1; tmpCDamage = Math.round(-1 * tmpCDamage * ShieldCorrectionArray[Shield][TeraMatch]) * -1; if(i == 15){ document.getElementById("NRes_100").innerHTML = tmpNDamage; document.getElementById("CRes_100").innerHTML = tmpCDamage; if (HPJn > 0){ document.getElementById("NRes_100_p").innerHTML = (tmpNDamage/HPJn*100).toFixed(1); document.getElementById("CRes_100_p").innerHTML = (tmpCDamage/HPJn*100).toFixed(1); }else { document.getElementById("NRes_100_p").innerHTML = "***"; document.getElementById("CRes_100_p").innerHTML = "***"; } } else{ document.getElementById("NRes_0"+(i+85)).innerHTML = tmpNDamage; document.getElementById("CRes_0"+(i+85)).innerHTML = tmpCDamage; if (HPJn > 0){ document.getElementById("NRes_0"+(i+85)+"_p").innerHTML = (tmpNDamage/HPJn*100).toFixed(1); document.getElementById("CRes_0"+(i+85)+"_p").innerHTML = (tmpCDamage/HPJn*100).toFixed(1); }else { document.getElementById("NRes_0"+(i+85)+"_p").innerHTML = "***"; document.getElementById("CRes_0"+(i+85)+"_p").innerHTML = "***"; } } } return; } /*==== 攻撃側ACへの補正値計算 ====*/ function calc_AtkJnCorrection(correction, value){ if (value.includes("AC")){ if (value == "AC_2.0") correction = correction * 2.0; else if(value == "AC_1.5") correction = correction * 3/2; else if(value == "AC_1.333") correction = correction * 5461/4096; else if(value == "AC_1.3") correction = correction * 5325/4096; else if(value == "AC_0.5") correction = correction * 1/2; else console.log("Error"); } return Math.round(correction); } /*==== 防御側BDへの補正値計算 ====*/ function calc_DefJnCorrection(correction, value){ if (value.includes("BD")){ if (value == "BD_2.0") correction = correction * 2.0; else if(value == "BD_1.5") correction = correction * 3/2; else if(value == "BD_1.3") correction = correction * 5325/4096; else if(value == "BD_0.5") correction = correction * 1/2; else console.log("Error"); } return Math.round(correction); } /*==== 技威力への補正値計算 ====*/ function calc_PowCorrection(correction, value){ if (value.includes("Pow")){ if (value == "Pow_2.0") correction = correction * 2.0; else if(value == "Pow_1.5") correction = correction * 3/2; else if(value == "Pow_1.4") correction = correction * 5734/4096; else if(value == "Pow_1.3") correction = correction * 5325/4096; else if(value == "Pow_1.25") correction = correction * 5/4; else if(value == "Pow_1.2") correction = correction * 4915/4096; else if(value == "Pow_1.1_p") correction = correction * 4506/4096; else if(value == "Pow_1.1") correction = correction * 4505/4096; else if(value == "Pow_0.75") correction = correction *3/4; else if(value == "Pow_0.5") correction = correction *1/2; else console.log("Error"); } return Math.round(correction); } function calc_DamageCorrection(correction, value){ if (value.includes("Dam")){ if (value == "Dam_2.0") correction = correction * 2.0; else if(value == "Dam_1.8") correction = correction * 7372/4096; else if(value == "Dam_1.6") correction = correction * 6553/4096; else if(value == "Dam_1.4") correction = correction * 5734/4096; else if(value == "Dam_1.3") correction = correction * 5324/4096; else if(value == "Dam_1.2") correction = correction * 4915/4096; else if(value == "Dam_0.5") correction = correction * 1/2; else console.log("Error"); } return Math.round(correction); } /*==== チェックボックスの排他処理 ====*/ function uncheck(ids){ for(i=0; i<ids.length; i++){ var checkbox = document.getElementById(ids[i]); checkbox.checked = false; } return; } /*==== ボタンによる数値入力処理 ====*/ function change_value(id, value){ var element = document.getElementById(id); element.value = value; return; } /*==== 実数値計算処理 ====*/ function calc_AtkJn(){ var Lv = parseInt(document.myForm.AtkLv.value, 10); var Sn = parseInt(document.myForm.AtkSn.value, 10); var Kn = parseInt(document.myForm.AtkKn.value, 10); var Dn = parseInt(document.myForm.AtkDn.value, 10); var Jn = Sn*2 + Kn + Math.floor(Dn/4); Jn = Jn * Lv; Jn = Math.floor(Jn /100)+5; if(document.myForm.Atkup.checked){Jn = Math.floor(Jn*1.1)} if(document.myForm.Atkdn.checked){Jn = Math.floor(Jn*0.9)} document.myForm.AtkJn.value = Jn; return; } function calc_DefJn(){ var Lv = parseInt(document.myForm.DefLv.value, 10); var Sn = parseInt(document.myForm.DefSn.value, 10); var Kn = parseInt(document.myForm.DefKn.value, 10); var Dn = parseInt(document.myForm.DefDn.value, 10); var Jn = Sn*2 + Kn + Math.floor(Dn/4); Jn = Jn * Lv; Jn = Math.floor(Jn /100)+5; if(document.myForm.Defup.checked){Jn = Math.floor(Jn*1.1)} if(document.myForm.Defdn.checked){Jn = Math.floor(Jn*0.9)} document.myForm.DefJn.value = Jn; return; } function calc_HPJn(){ var Lv = parseInt(document.myForm.DefLv.value, 10); var Sn = parseInt(document.myForm.HPSn.value, 10); var Kn = parseInt(document.myForm.HPKn.value, 10); var Dn = parseInt(document.myForm.HPDn.value, 10); var Boss = parseInt(document.myForm.HPBoss.value, 10); var Jn = Sn*2 + Kn + Math.floor(Dn/4); Jn = Jn * Lv; Jn = Math.floor(Jn /100) + Lv + 10; Jn = Jn * Boss document.myForm.HPJn.value = Jn; return; } /*==== そうだいしょう、メトロノームの追加選択枠表示 ====*/ function showSoudaishou(value){ var Soudaishow = document.getElementById("Soudaishow"); if (value == "Soudaishou"){ Soudaishow.style.display = "inline"; } else{ Soudaishow.style.display = "none"; } } function showMetoro(value){ var Metoroshow = document.getElementById("Metoroshow"); if (value == "Metoro"){ Metoroshow.style.display = "inline"; } else{ Metoroshow.style.display = "none"; } } /*==== 表示用文字列の追加 ====*/ function add_text(text, add_value){ if (add_value != "None"){ if (text != "") text += "<br>"; text += add_value; } return text } function AtkOthers_reflectCB(text){ if (document.myForm.Multi.checked) text = add_text(text, "全体攻撃 (与ダメ ×0.75)"); if (document.myForm.Burn.checked) text = add_text(text, "やけど (与ダメ ×0.5)"); if (document.myForm.Helping.checked) text = add_text(text, "てだすけ (威力 ×1.5)"); if (document.myForm.Yell_A.checked) text = add_text(text, "攻撃応援(通常) (AorC ×1.5)"); if (document.myForm.Yell_A_2.checked) text = add_text(text, "攻撃応援(アタリ) (AorC ×2.0)"); if (document.myForm.Charge.checked) text = add_text(text, "じゅうでん (威力 ×2)"); if (document.myForm.Weather_A_plus.checked) text = add_text(text, "晴/雨 (与ダメ ×1.5)"); if (document.myForm.Weather_A_minus.checked) text = add_text(text, "晴/雨 (与ダメ ×0.5)"); if (document.myForm.Field_plus.checked) text = add_text(text, "フィールド (威力 ×1.3)"); if (document.myForm.Field_minus.checked) text = add_text(text, "フィールド (威力 ×0.5)"); if (document.myForm.Ruin_AC.checked) text = add_text(text, "わざわいのおふだ/うつわ (AorC ×0.75)"); if (document.myForm.Battery_1.checked) text = add_text(text, "バッテリー×1 (威力 ×1.3)"); if (document.myForm.Battery_2.checked) text = add_text(text, "バッテリー×2 (威力 ×1.69)"); if (document.myForm.Battery_3.checked) text = add_text(text, "バッテリー×3 (威力 ×2.12)"); if (document.myForm.SteelyS_1.checked) text = add_text(text, "はがねのせいしん×1 (威力 ×1.5)"); if (document.myForm.SteelyS_2.checked) text = add_text(text, "はがねのせいしん×2 (威力 ×2.25)"); if (document.myForm.SteelyS_3.checked) text = add_text(text, "はがねのせいしん×3 (威力 ×3.375)"); if (document.myForm.SteelyS_4.checked) text = add_text(text, "はがねのせいしん×4 (威力 ×5.0625)"); if (document.myForm.PowerS.checked) text = add_text(text, "パワースポット (威力 ×1.3)"); if (document.myForm.Other_Pow_x.checked) text = add_text(text, "相手の状態を参照する技の2倍 (与ダメ ×2)"); if (document.myForm.Other_Pow_y.checked) text = add_text(text, "アクセルブレイクorイナズマドライブの4/3倍 (与ダメ ×4/3)"); if (document.myForm.Other_Pow_a.checked) text = add_text(text, "その他技固有効果の2倍 (威力 ×2)"); if (document.myForm.Other_Pow_b.checked) text = add_text(text, "その他技固有効果の1.5倍 (威力 ×1.5)"); if (document.myForm.Other_Pow_c.checked) text = add_text(text, "その他技固有効果の0.5倍 (威力 ×0.5)"); return text; } function DefOthers_reflectCB(text){ if (document.myForm.Yell_D.checked) text = add_text(text, "防御応援(通常) (BorD ×1.5)"); if (document.myForm.Yell_D_2.checked) text = add_text(text, "防御応援(アタリ) (BorD ×2.0)"); if (document.myForm.Wall_s.checked) text = add_text(text, "壁(単体) (被ダメ ×1/2)"); if (document.myForm.Wall_m.checked) text = add_text(text, "壁(全体) (被ダメ ×2/3)"); if (document.myForm.Weather_D.checked) text = add_text(text, "雪/砂 (BorD ×1.5)"); if (document.myForm.Friend_1.checked) text = add_text(text, "フレンドガード×1 (被ダメ ×3/4)"); if (document.myForm.Friend_2.checked) text = add_text(text, "フレンドガード×2 (被ダメ ×9/16)"); if (document.myForm.Friend_3.checked) text = add_text(text, "フレンドガード×3 (被ダメ ×27/64)"); if (document.myForm.Ruin_BD.checked) text = add_text(text, "わざわいのつるぎ/たま (BorD ×0.75)"); return text; } </script> </body>