Created
February 13, 2014 02:02
-
-
Save gozen-bro3/8968408 to your computer and use it in GitHub Desktop.
ブラウザ三国志 領地敵兵算出機(Map f-1t) mixi17鯖用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name bro3_calc_f-1t | |
// @namespace http://3g-ws.com/ | |
// @include http://m1.3gokushi.jp/facility/castle_send_troop.php* | |
// @include http://m17.3gokushi.jp/facility/castle_send_troop.php* | |
// @include http://s1.3gokushi.jp/facility/castle_send_troop.php* | |
// @description <内蔵版>ブラウザ三国志 領地敵兵算出機(Map f-1t) by BSE(原版作者 きょう)(Calc1.5.2 Map f-1t) | |
// @author BSE,base_Kyou | |
// @version 1.5.2 Map f-1t | |
// ==/UserScript== | |
// 2010年~2012年の更新情報は省略します。見たい人は、サイトへGo! | |
// 2013.01.31 ver1.4.b10 mixi10期対応暫定計算人柱版発行 | |
// 2013.01.31 ver1.4.b11 mixi10期対応暫定版 | |
// 2013.02.01 ver1.4.b12 mixi10期対応版 | |
// 2013.03.03 ver1.4.b13 ☆6(2-2-2-0)基準値修正 | |
// 2013.03.13 ver1.4.b14 基準値の再確認・再計算完了 | |
// 2013.08.02 ver1.4.b19 (Map f-1) | |
// 2013.11.18 ver1.5.b1 Map e-2t | |
// 2013.11.28 08:20 ver1.5.b1 Map f-1t 人柱。一部同盟に配布。 | |
// 2013.11.28 10:30 ver1.5.b2 Map f-1t 人柱。一部同盟に配布。 | |
// 2013.11.28 11:45 ver1.5.b3 Map f-1t 数値確定。諸要素調整のため、一部同盟に配布。 | |
// 2013.12.01 23:40 ver1.5.b5 Map f-1t | |
// 2013.12.03 02:00 ver1.5.1 Map f-1t 標準経験値表記の追加、更新インジケータ正式搭載、中間値 | |
// 2013.12.03 19:59 ver1.5.2 Map f-1t 中間値を各自で設定しやすくしました。一部色彩変更 | |
// 2013.12.05 16:40 S | |
// | |
// ※※※派生版を公開配布する方へ、状況把握のため、ご一報願います。※※※ | |
// ※※※Beyondへの当ツールまたは、派生物の混載は推奨しません。※※※ | |
// | |
//各自設定用 | |
//各自設定用~乱数中間値とか、状況に応じて自由な値を設定したい旨の提案が有ったためこうなりました。 | |
var sifon_j = 2;//デフォルト「2」。1.2~2.8まで、0.2刻みの9段階自由にどうぞ! | |
//参考情報::MIN「1.0」MAX「3.0」 | |
var sifon_txt = "¶中間値:" ;//デフォルト中間値なのでその様に表記。後は趣味にお任せ。 | |
//表示部分フォント追加分 | |
var red_f = "</b></font>\n";//太字フォント閉じる。 | |
var fon_f = "</font>\n";//フォント閉じる | |
var red_s = "<font color=red><b>";//最大値用フォント | |
var gre_s = "<font color=blue>";//最小値用フォント | |
var whi_s = "<font color=thistle>";//中間値・経験値表記系の薄い色の設定 | |
var whi2_s = "<font color=white>";//表示しない系設定 | |
//以下、配布関連情報 | |
//バージョン配置用 | |
var ver_rack = "ver1.5.2 【Map f-1t】</b>"; | |
//配布管理系 | |
var se_rack = "<b><内蔵版>ブラウザ三国志 領地敵兵算出機 by BSE "; | |
var url_rack = "http://dev.3g-ws.com/?tools"; | |
var com_rack = "【Map f-1t】誰かのせいで付いた『n』を撤去しました。"; | |
var img_URL = "http://ms.3g-ws.com/calc/f-1t-2.png"; | |
var img_alt = "※※非常連絡用※※"; | |
var img_txt = whi2_s + "←青ロゴ:通常 緑ロゴ:一部に異常 赤ロゴ:異常事態" +fon_f ; | |
// 出兵距離格納変数 | |
var length; | |
// 出兵先のタイル数格納変数(平地、木、岩、鉄、穀、荒地)の順。 | |
var tile = new Array(0,0,0,0,0,0); | |
// 出兵先のパネル構成ごとの兵数計算パラメータ | |
var point = { | |
//Map f-1t | |
//パターン数列:["凡例",剣,盾,槍,弓,馬,大剣,重盾,矛,弩,近衛], | |
"20009":["☆1(2-0-0-0)",6.5,0,0,0,0,0,0,0,0,0], | |
"02009":["☆1(0-2-0-0)",6.5,0,0,0,0,0,0,0,0,0], | |
"00209":["☆1(0-0-2-0)",6.5,0,0,0,0,0,0,0,0,0], | |
"00029":["☆1(0-0-0-2)",6.5,0,0,0,0,0,0,0,0,0], | |
"300014":["☆2(3-0-0-0)",0,0,1.5,15.5,1.5,0,0,0,0,0], | |
"030014":["☆2(0-3-0-0)",0,0,15.5,1.5,1.5,0,0,0,0,0], | |
"003014":["☆2(0-0-3-0)",0,0,1.5,1.5,15.5,0,0,0,0,0], | |
"111121":["☆3(1-1-1-1)",0,12,16.5,16.5,16.5,0,0,0,0,0], | |
"000126":["☆3(0-0-0-1)",0,36,6.5,6.5,6.5,0,0,0,0,0], | |
"111016":["☆3(1-1-1-0)",0,0,19,19,19,0,0,0,0,0], | |
"111127":["☆4(1-1-1-1)",0,55.5,25,25,25,0,0,0,0,0], | |
"000813":["☆4(0-0-0-8)",0,70.5,18,18,18,0,0,0,0,0], | |
"222218":["☆4(2-2-2-2)",0,30,31.5,31.5,31.5,0,0,0,0,0], | |
"222019":["☆4(2-2-2-0)",0,0,40.5,40.5,40.5,0,0,0,0,0], | |
"111120":["☆5(1-1-1-1)",0,57,56.5,56.5,56.5,0,0,0,0,0], | |
"000129":["☆5(0-0-0-1)",0,129,32.5,32.5,32.5,0,0,0,0,0], | |
"600020":["☆5(6-0-0-0)",0,0,41.5,139,41.5,0,0,0,0,0], | |
"060020":["☆5(0-6-0-0)",0,0,139,41.5,41.5,0,0,0,0,0], | |
"006020":["☆5(0-0-6-0)",0,0,41.5,41.5,139,0,0,0,0,0], | |
"1000014":["☆6(10-0-0-0)",0,0,0,0,0,0,0,62.5,225,62.5], | |
"0100014":["☆6(0-10-0-0)",0,0,0,0,0,0,0,225,62.5,62.5], | |
"0010014":["☆6(0-0-10-0)",0,0,0,0,0,0,0,62.5,62.5,225], | |
"000028":["☆6(0-0-0-0)",0,0,0,0,0,0,0,106.5,106.5,106.5], | |
"442023":["☆7(4-4-2-0)",0,0,0,0,0,0,0,220,220,110], | |
"424023":["☆7(4-2-4-0)",0,0,0,0,0,0,0,110,220,220], | |
"244023":["☆7(2-4-4-0)",0,0,0,0,0,0,0,220,110,220], | |
"000029":["☆7(0-0-0-0)",0,0,0,0,0,0,0,183.5,183.5,183.5], | |
"0001216":["☆7(0-0-0-12)",0,0,0,0,0,0,279,90,90,90], | |
"445222":["☆8(4-4-5-2)",0,0,0,0,0,0,90,205,205,316], | |
"544222":["☆8(5-4-4-2)",0,0,0,0,0,0,90,205,316,205], | |
"454222":["☆8(4-5-4-2)",0,0,0,0,0,0,90,316,205,205], | |
"0001531":["☆8(0-0-0-15)",0,0,0,0,0,0,450,175,175,175], | |
"000037":["☆8(0-0-0-0)",0,0,0,0,0,0,262.5,262.5,262.5,262.5], | |
"700438":["☆9(7-0-0-4)",0,0,0,0,0,0,600,125,900,125], | |
"070438":["☆9(0-7-0-4)",0,0,0,0,0,0,600,900,125,125], | |
"007438":["☆9(0-0-7-4)",0,0,0,0,0,0,600,125,125,900], | |
"000041":["☆9(0-0-0-0)",0,0,0,0,0,0,195,600,600,600], | |
"333317":["☆9(3-3-3-3)",0,0,0,0,0,0,468,469,469,469], | |
"000049":["NPC拠点<font color=red size=+4><br><b>NPC拠点と推測されます。中身をうかがい知ることは出来ません。</b></font>"], | |
"333337":["君主城:プレイヤー本拠地<font color=red size=+4><br><b>誰かの本拠地と推測されます。中身をうかがい知ることは出来ません。</b></font>"] | |
}; | |
// 兵科に対する各ユニットの防御値 | |
var def = { | |
//:[剣,盾,槍,弓,騎,大剣,重盾,矛,弩,近衛], | |
"ken":[15,24,50,52,54,85,60,140,145,151],//剣兵防御 | |
"yari":[10,108,40,58,28,56,270,100,145,70],//槍兵防御 | |
"yumi":[10,104,25,42,60,56,260,63,105,150],//yumi兵防御 | |
"ki":[10,112,55,26,44,56,280,137,65,110]//騎兵防御 | |
}; | |
// 各ユニットの攻撃力 | |
var atk = { | |
"ken":15, | |
"tate":5, | |
"yari":40, | |
"yumi":42, | |
"ki":44, | |
"dai":85, | |
"jt":10, | |
"hoko":100, | |
"do":105, | |
"kono":110 | |
}; | |
(function(){ | |
// 出兵拠点座標の取得 | |
var areas = document.evaluate('//li[@class="gnavi02"]//a/@href', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
basecord = areas.snapshotItem(0).textContent; | |
basecord = basecord.replace(/^.*x=(-?[0-9]+).*y=(-?[0-9]+)/, "$1,$2"); | |
bcordx = RegExp.$1; | |
bcordy = RegExp.$2; | |
// 出兵先座標(x)の取得 | |
areas = document.evaluate('//input[@name="village_x_value"]/@value', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
tocordx = areas.snapshotItem(0).textContent; | |
// 出兵先座標(y)の取得 | |
areas = document.evaluate('//input[@name="village_y_value"]/@value', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
tocordy = areas.snapshotItem(0).textContent; | |
// 距離の計算 | |
length = Math.sqrt((bcordx-tocordx)*(bcordx-tocordx)+(bcordy-tocordy)*(bcordy-tocordy)); | |
// 出兵先タイルパターン取得のためのHTTP要求 starに★数、tile[]に各タイル数を格納。 | |
var url = "http://"+location.hostname+"/land.php?x="+tocordx+"&y="+tocordy; | |
GM_xmlhttpRequest({ | |
method:"GET", | |
url:url, | |
onload:function(x){ | |
// 読み込み後の処理は関数 getFieldType() 内で行う。 | |
getFieldType(x.responseText); | |
} | |
}); | |
})(); | |
// タイルパターンの取得 及び 兵力計算・表示用関数 | |
function getFieldType(x){ | |
// ページ内のタイル数をカウントするための変数 初期化 | |
var panel = { | |
"平地":0, | |
"森林":0, | |
"岩山":0, | |
"鉄鉱山":0, | |
"穀物":0, | |
"荒地":0 | |
}; | |
// GM_xmlhttpRequestの取得データをxml形式に変換 | |
var responseXML = document.createElement('div'); | |
responseXML.innerHTML = x; | |
// ソース中のタイルの行からtitleの文字列を取得 | |
var panels = document.evaluate('.//*[@id="mapOverlayMap"]//area/@title', | |
responseXML, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
// 1行ずつ対応するタイルの変数を加算していく | |
for (var i = 0; i < panels.snapshotLength; i++) { | |
panel[panels.snapshotItem(i).textContent]++; | |
} | |
// タイル数→キー("111116"など)の作成 | |
var key = String(panel["森林"])+String(panel["岩山"])+String(panel["鉄鉱山"])+String(panel["穀物"])+String(panel["平地"]); | |
// 兵力パラメータの取得 | |
var list = point[key]; | |
var i; | |
var tmp = 0; | |
var sum = 0; | |
var kenk = 0; | |
var yarik = 0; | |
var yumik = 0; | |
var kik = 0; | |
var tmp2 = 0; | |
var sum2 = 0; | |
var kenk2 = 0; | |
var yarik2 = 0; | |
var yumik2 = 0; | |
var kik2 = 0; | |
//表示距離 | |
var mal_length = Math.floor(length*100+0.5)/100; | |
//表示URL | |
var mal_url = "http://"+location.hostname+"/land.php?x="+tocordx+"&y="+tocordy; | |
var map_url = "http://"+location.hostname+"/map.php?x="+tocordx+"&y="+tocordy; | |
//表示部分Non | |
var msg = ""; | |
if(list==undefined){ | |
// キーに対応するデータが見つからない場合。ex.NPC拠点、データがないもの | |
msg = msg + "<table class="+ "commonTables" +"><tr><td align=left>出兵元から、" + mal_length + "の距離にある 目的地<a href=" + mal_url + ">(" + tocordx +"," + tocordy + ")</a> <a href=" + map_url + ">MAP</a>について、有効なデータはありません。<br>※未知のMAPであるか、ツールがこのMAPに対応していない可能性が有ります。</td></tr>\n"; | |
msg = msg + "<tr><td align=left>" + se_rack + ver_rack + "<br>\n"; | |
msg = msg + "単一兵科以外での攻撃の場合は別のツールを使いましょ!<br>\n"; | |
msg = msg + "苦情・文句・情報提供などは→<a href="+ url_rack+" target=" + "_blank"+">こちら(配布元)</a>まで御願いします。\n"; | |
msg = msg + "</td></tr></table>\n"; | |
}else{ | |
//MAX計算用 | |
for(i=0;i<list.length;i++){ | |
//距離最大時乗数 | |
var hentai = (1+length/10)*3; | |
//最大出現数計算 | |
var kenmax = Math.floor(list[1]*hentai); | |
var tatemax = Math.floor(list[2]*hentai); | |
var yarimax = Math.floor(list[3]*hentai); | |
var yumimax = Math.floor(list[4]*hentai); | |
var kimax = Math.floor(list[5]*hentai); | |
var daimax = Math.floor(list[6]*hentai); | |
var jtmax = Math.floor(list[7]*hentai); | |
var hokomax = Math.floor(list[8]*hentai); | |
var domax = Math.floor(list[9]*hentai); | |
var konomax = Math.floor(list[10]*hentai); | |
//最大防御力集計 | |
var sum = kenmax+(tatemax+yarimax+yumimax+kimax)*2+daimax*3+(jtmax+hokomax+domax+konomax)*4; | |
var kenk = kenmax*def["ken"][0]+tatemax*def["ken"][1]+yarimax*def["ken"][2]+yumimax*def["ken"][3]+kimax*def["ken"][4]+daimax*def["ken"][5]+jtmax*def["ken"][6]+hokomax*def["ken"][7]+domax*def["ken"][8]+konomax*def["ken"][9]; | |
var yarik = kenmax*def["yari"][0]+tatemax*def["yari"][1]+yarimax*def["yari"][2]+yumimax*def["yari"][3]+kimax*def["yari"][4]+daimax*def["yari"][5]+jtmax*def["yari"][6]+hokomax*def["yari"][7]+domax*def["yari"][8]+konomax*def["yari"][9]; | |
var yumik = kenmax*def["yumi"][0]+tatemax*def["yumi"][1]+yarimax*def["yumi"][2]+yumimax*def["yumi"][3]+kimax*def["yumi"][4]+daimax*def["yumi"][5]+jtmax*def["yumi"][6]+hokomax*def["yumi"][7]+domax*def["yumi"][8]+konomax*def["yumi"][9]; | |
var kik = kenmax*def["ki"][0]+tatemax*def["ki"][1]+yarimax*def["ki"][2]+yumimax*def["ki"][3]+kimax*def["ki"][4]+daimax*def["ki"][5]+jtmax*def["ki"][6]+hokomax*def["ki"][7]+domax*def["ki"][8]+konomax*def["ki"][9]; | |
//距離最小時乗数 | |
var hentai2 = (1+length/10); | |
//最小出現数計算 | |
var kenmin = Math.floor(list[1]*hentai2); | |
var tatemin = Math.floor(list[2]*hentai2); | |
var yarimin = Math.floor(list[3]*hentai2); | |
var yumimin = Math.floor(list[4]*hentai2); | |
var kimin = Math.floor(list[5]*hentai2); | |
var daimin = Math.floor(list[6]*hentai2); | |
var jtmin = Math.floor(list[7]*hentai2); | |
var hokomin = Math.floor(list[8]*hentai2); | |
var domin = Math.floor(list[9]*hentai2); | |
var konomin = Math.floor(list[10]*hentai2); | |
//最小防御力集計 | |
var sum2 = kenmin+(tatemin+yarimin+yumimin+kimin)*2+daimin*3+(jtmin+hokomin+domin+konomin)*4; | |
var kenk2 = kenmin*def["ken"][0]+tatemin*def["ken"][1]+yarimin*def["ken"][2]+yumimin*def["ken"][3]+kimin*def["ken"][4]+daimin*def["ken"][5]+jtmin*def["ken"][6]+hokomin*def["ken"][7]+domin*def["ken"][8]+konomin*def["ken"][9]; | |
var yarik2 = kenmin*def["yari"][0]+tatemin*def["yari"][1]+yarimin*def["yari"][2]+yumimin*def["yari"][3]+kimin*def["yari"][4]+daimin*def["yari"][5]+jtmin*def["yari"][6]+hokomin*def["yari"][7]+domin*def["yari"][8]+konomin*def["yari"][9]; | |
var yumik2 = kenmin*def["yumi"][0]+tatemin*def["yumi"][1]+yarimin*def["yumi"][2]+yumimin*def["yumi"][3]+kimin*def["yumi"][4]+daimin*def["yumi"][5]+jtmin*def["yumi"][6]+hokomin*def["yumi"][7]+domin*def["yumi"][8]+konomin*def["yumi"][9]; | |
var kik2 = kenmin*def["ki"][0]+tatemin*def["ki"][1]+yarimin*def["ki"][2]+yumimin*def["ki"][3]+kimin*def["ki"][4]+daimin*def["ki"][5]+jtmin*def["ki"][6]+hokomin*def["ki"][7]+domin*def["ki"][8]+konomin*def["ki"][9]; | |
//指定乱数用-乗数 | |
var kanaeri = (1+length/10)*sifon_j; | |
//指定乱数用-出現数計算 | |
var ken_sifon = Math.floor(list[1]*kanaeri); | |
var tate_sifon = Math.floor(list[2]*kanaeri); | |
var yari_sifon = Math.floor(list[3]*kanaeri); | |
var yumi_sifon = Math.floor(list[4]*kanaeri); | |
var ki_sifon = Math.floor(list[5]*kanaeri); | |
var dai_sifon = Math.floor(list[6]*kanaeri); | |
var jt_sifon = Math.floor(list[7]*kanaeri); | |
var hoko_sifon = Math.floor(list[8]*kanaeri); | |
var do_sifon = Math.floor(list[9]*kanaeri); | |
var kono_sifon = Math.floor(list[10]*kanaeri); | |
//指定乱数用-防御力集計 | |
var sumM = ken_sifon+(tate_sifon+yari_sifon+yumi_sifon+ki_sifon)*2+dai_sifon*3+(jt_sifon+hoko_sifon+do_sifon+kono_sifon)*4; | |
var kenkM = ken_sifon*def["ken"][0]+tate_sifon*def["ken"][1]+yari_sifon*def["ken"][2]+yumi_sifon*def["ken"][3]+ki_sifon*def["ken"][4]+dai_sifon*def["ken"][5]+jt_sifon*def["ken"][6]+hoko_sifon*def["ken"][7]+do_sifon*def["ken"][8]+kono_sifon*def["ken"][9]; | |
var yarikM = ken_sifon*def["yari"][0]+tate_sifon*def["yari"][1]+yari_sifon*def["yari"][2]+yumi_sifon*def["yari"][3]+ki_sifon*def["yari"][4]+dai_sifon*def["yari"][5]+jt_sifon*def["yari"][6]+hoko_sifon*def["yari"][7]+do_sifon*def["yari"][8]+kono_sifon*def["yari"][9]; | |
var yumikM = ken_sifon*def["yumi"][0]+tate_sifon*def["yumi"][1]+yari_sifon*def["yumi"][2]+yumi_sifon*def["yumi"][3]+ki_sifon*def["yumi"][4]+dai_sifon*def["yumi"][5]+jt_sifon*def["yumi"][6]+hoko_sifon*def["yumi"][7]+do_sifon*def["yumi"][8]+kono_sifon*def["yumi"][9]; | |
var kikM = ken_sifon*def["ki"][0]+tate_sifon*def["ki"][1]+yari_sifon*def["ki"][2]+yumi_sifon*def["ki"][3]+ki_sifon*def["ki"][4]+dai_sifon*def["ki"][5]+jt_sifon*def["ki"][6]+hoko_sifon*def["ki"][7]+do_sifon*def["ki"][8]+kono_sifon*def["ki"][9]; | |
} | |
//表示部分 | |
msg = msg + "<table class="+ "commonTables" +"><tr><td align=left colspan="+3+">\n"; | |
msg = msg + com_rack + "<br>\n"; | |
msg = msg + whi_s+"¶基準経験値:MAX " + String(Math.floor(sum))+ " ~ MIN " + String(Math.floor(sum2))+ " " +sifon_txt + String(Math.floor(sumM))+ fon_f +"<br>\n"; | |
msg = msg + "出兵元:(" + bcordx +"," + bcordy + ")<br>\n"; | |
msg = msg + "◆ 距離:" + mal_length + " ◆<br>\n"; | |
msg = msg + "目的地:<a href=" + mal_url + ">(" + tocordx +"," + tocordy + ")</a> <a href=" + map_url + ">MAP</a> 地形:" + String(list[0]) + "<br>\n"; | |
msg = msg + "</td></tr>\n"; | |
msg = msg + "<tr><td align=left>\n"; | |
msg = msg + "<font color=red>\n"; | |
msg = msg + "兵種:最大兵数~最小兵数<br>\n"; | |
msg = msg + "</font>\n"; | |
msg = msg + "剣兵:"+ red_s + String(kenmax) + red_f; | |
msg = msg + "~" + gre_s + String(kenmin) + red_f + "<br>\n"; | |
msg = msg + "<u><font color=mediumvioletred>盾兵</font>:"+ red_s + String(tatemax) + red_f; | |
msg = msg + "~" + gre_s + String(tatemin) + red_f + "</u><br>\n"; | |
msg = msg + "槍兵:"+ red_s + String(yarimax) + red_f; | |
msg = msg + "~" + gre_s + String(yarimin) + red_f + "<br>\n"; | |
msg = msg + "弓兵:"+ red_s + String(yumimax) + red_f; | |
msg = msg + "~" + gre_s + String(yumimin) + red_f + "<br>\n"; | |
msg = msg + "騎兵:"+ red_s + String(kimax) + red_f; | |
msg = msg + "~" + gre_s + String(kimin) + red_f + "<br>\n"; | |
msg = msg + whi2_s+"大剣:" + String(daimax) ; | |
msg = msg + "~" + String(daimin) + fon_f +"<br>\n"; | |
msg = msg + "<u><font color=mediumvioletred>重盾</font>:"+ red_s + String(jtmax) + red_f; | |
msg = msg + "~" + gre_s + String(jtmin) + red_f + "</u><br>\n"; | |
msg = msg + "矛兵:"+ red_s + String(hokomax) + red_f; | |
msg = msg + "~" + gre_s + String(hokomin) + red_f + "<br>\n"; | |
msg = msg + "弩兵:"+ red_s + String(domax) + red_f; | |
msg = msg + "~" + gre_s + String(domin) + red_f + "<br>\n"; | |
msg = msg + "近衛:" + red_s + String(konomax) + red_f; | |
msg = msg + "~" + gre_s + String(konomin) + red_f + "<br>\n"; | |
msg = msg + "</td>\n"; | |
msg = msg + "<td align=left>\n"; | |
msg = msg + "<font color=red>\n"; | |
msg = msg + "対兵科:防御力MAX~MIN<br>\n" | |
msg = msg + "</font>\n"; | |
msg = msg + "剣兵科:"+ red_s + String(kenk) + red_f + "~"+ gre_s + String(kenk2) + red_f + whi_s + " " +sifon_txt + String(kenkM) +"</font><br>"; | |
msg = msg + "槍兵科:"+ red_s + String(yarik) + red_f + "~"+ gre_s + String(yarik2) + red_f + whi_s + " " +sifon_txt + String(yarikM) +"</font><br>"; | |
msg = msg + "弓兵科:"+ red_s + String(yumik) + red_f + "~"+ gre_s + String(yumik2) + red_f + whi_s + " " +sifon_txt + String(yumikM) +"</font><br>"; | |
msg = msg + "騎兵科:"+ red_s + String(kik) + red_f + "~"+ gre_s + String(kik2) + red_f+ whi_s + " " +sifon_txt + String(kikM) +"</font><br><br>"; | |
msg = msg + whi2_s+ "The無強化兵士に単純換算<br>\n"; | |
msg = msg + "剣:"+Math.ceil(kenk/atk["ken"]) + "~" + Math.ceil(kenk2/atk["ken"])+"(大剣"+Math.ceil(kenk/atk["dai"]) + "~" + Math.ceil(kenk2/atk["dai"])+")<br>\n"; | |
msg = msg + "槍:"+Math.ceil(yarik/atk["yari"]) + "~" + Math.ceil(yarik2/atk["yari"])+"(矛兵"+Math.ceil(yarik/atk["hoko"]) + "~" + Math.ceil(yarik2/atk["hoko"])+")<br>\n"; | |
msg = msg + "弓:"+Math.ceil(yumik/atk["yumi"]) + "~" + Math.ceil(yumik2/atk["yumi"])+"(弩兵"+Math.ceil(yumik/atk["do"]) + "~" + Math.ceil(yumik2/atk["do"])+")<br>\n"; | |
msg = msg + "騎:"+Math.ceil(kik/atk["ki"]) + "~" + Math.ceil(kik2/atk["ki"])+"(近衛"+Math.ceil(kik/atk["kono"]) + "~" + Math.ceil(kik2/atk["kono"])+ ")</font><br>\n"; | |
msg = msg + "</td></tr>\n"; | |
msg = msg + "<tr><td align=left colspan="+3+">\n"; | |
msg = msg + se_rack + ver_rack + "<br>\n"; | |
msg = msg + "単一兵科以外での攻撃の場合は別のツールを使いましょ!<br>\n"; | |
msg = msg + "苦情・文句・情報提供などは→<a href="+ url_rack+" target=" + "_blank"+">こちら(配布元)</a>まで御願いします。<br><img src="+ img_URL +" alt="+ img_alt +">"+ img_txt +"\n"; | |
msg = msg + "</td></tr></table>\n"; | |
} | |
var insertHtml = "<center><table><tr><td>" + msg + "</td></tr></table></center>"; | |
var insertElem = document.createElement('div'); | |
insertElem.innerHTML = insertHtml; | |
insertElem = insertElem.firstChild; | |
var containerElem = document.evaluate('//*[@class=\"controlArea\"]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
containerElem.snapshotItem(0).appendChild(insertElem); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment