fork download
  1. <html>
  2. <head>
  3. <title>練成ベース皮算用</title>
  4. </head>
  5. <body onload="Load();">
  6. <script type="text/javascript">
  7. <!--
  8. var Base =new Item(0,0,0,0,0,"Base");
  9. var HQ = new Item(0,0,0,0,0,"HQ");
  10. var Mat = new Item(0,0,0,0,0,"Mat");
  11. var Imbue = new Item(0,0,0,0,0,"Imbue")
  12.  
  13. var BaseList = new Array();
  14. var MatList = new Array();
  15. function Load(){
  16. MakeBaseList();
  17. MakeMatList();
  18. Base.ToZero();
  19. HQ.ToZero();
  20. Mat.ToZero();
  21. Imbue.ToZero();
  22. }
  23.  
  24. function Item(Ph,Fi,Co,Po,En,Info){
  25. this.Ph = Ph;
  26. this.Fi = Fi;
  27. this.Co = Co;
  28. this.Po = Po;
  29. this.En = En;
  30. this.Info =Info;
  31.  
  32. this.ToZero= function(){
  33. this.Ph = 0;
  34. this.Fi = 0;
  35. this.Co = 0;
  36. this.Po = 0;
  37. this.En = 0
  38. this.Info = "";
  39. }
  40.  
  41. this.Clone = function(){
  42. return new Item(this.Ph, this.Fi, this.Co, this.Po, this.En, this.Info);
  43. }
  44. }
  45.  
  46.  
  47. function MakeBaseList(){
  48. //alert("BaseList!");
  49. BaseList = new Array();
  50. BaseList["None"] = new Item(0,0,0,0,0, "None");
  51. BaseList["Plate"] = new Item(5,3,2,3,2, "Plate");
  52. BaseList["Chain"] = new Item(4,4,4,1,2, "Chain");
  53. BaseList["Ring"] = new Item(3,3,1,5,3, "Ring");
  54. BaseList["Leather"] = new Item(2,4,3,3,3, "Leather");
  55. BaseList["Stud"] = new Item(2,4,3,3,4, "Stud");
  56. BaseList["Bone"] = new Item(3,3,4,2,4, "Bone");
  57. BaseList["Leaf"] = new Item(2,3,2,4,4, "Leaf");
  58. BaseList["Hide"] = new Item(3,3,4,3,2, "Hide");
  59. BaseList["Wood"] = new Item(5,3,2,3,2, "Wood");
  60. BaseList["Scale"] = new Item(3,3,3,3,3, "Scale");
  61. BaseList["GargPlate"] = new Item(8,6,5,6,5, "GargishPlate\nガーゴイル専用");
  62. BaseList["GargLeather"] = new Item(5,6,7,6,6, "GargishLeather\nガーゴイル専用");
  63. BaseList["GargStone"] = new Item(6,6,4,8,6, "GargishStone\nガーゴイル専用");
  64. }
  65.  
  66.  
  67.  
  68.  
  69. function MakeMatList(){
  70. //alert("MatList!");
  71. MatList = new Array();
  72. MatList["None"] = new Item(0,0,0,0,0, "None");
  73. MatList["Iron"] = new Item(0,0,0,0,0, "Iron");
  74. MatList["Dull"] = new Item(6,0,0,0,0, "Dull Copper\n装備条件-20%\n耐久値+50%");
  75. MatList["Shadow"] = new Item(2,1,0,0,5, "Shadow\n耐久+100%");
  76. MatList["Copper"] = new Item(1,1,0,5,2, "Copper");
  77. MatList["Bronze"] = new Item(3,0,5,1,1, "Bronze");
  78. MatList["Gold"] = new Item(1,1,2,0,2, "Gold\n幸運+40\n装備条件-30");
  79. MatList["Agapite"] = new Item(2,3,2,2,2, "Agapite");
  80. MatList["Verite"] = new Item(3,3,2,3,1, "Verite");
  81. MatList["Valorite"] = new Item(4,0,3,3,3, "Valorite\n耐久+50%");
  82.  
  83. MatList["RedScale"] = new Item( 0,10,-3, 0, 0, "RedScale");
  84. MatList["YellowScale"] = new Item(-3, 0, 0, 0, 0, "YellowScale\n幸運+20");
  85. MatList["GreenScale"] = new Item( 0,-3, 0,10, 0, "GreenScale");
  86. MatList["BlueScale"] = new Item( 0, 0, 0,-3,10, "BlueScale");
  87. MatList["WhiteScale"] = new Item(-3, 0,10, 0, 0, "WhiteScale");
  88. MatList["BlackScale"] = new Item(10, 0, 0, 0,-3, "BlackScale");
  89.  
  90. MatList["Leather"] = new Item(0,0,0,0,0, "Leather");
  91. MatList["Spined"] = new Item(5,0,0,0,0, "Spined");
  92. MatList["Honed"] = new Item(2,3,2,2,2, "Honed");
  93. MatList["Barbed"] = new Item(2,1,2,3,4, "Barbed");
  94.  
  95. MatList["Wood"] = new Item(0,0,0,0,0, "Wood");
  96. MatList["Oak"] = new Item(3,3,0,2,3, "Ork\n耐久+50\n幸運+40");
  97. MatList["Ash"] = new Item(2,0,4,1,6, "Ash\n重量-25");
  98. MatList["Yew"] = new Item(6,3,3,0,3, "Yew\nHP回復+1");
  99. MatList["Heart"] = new Item(2,3,2,7,2, "HeartWood\n幸運40 or 耐久+50% or 装備条件-20% or 重量-50% or 命中+5% or 武器ダメージ+10% or 瞑想可");
  100. MatList["Blood"] = new Item(3,8,1,3,3, "BloodWood\nHP回復+2");
  101. MatList["Frost"] = new Item(2,1,8,3,4, "FrostWood");
  102. }
  103.  
  104. function CalcHQBouns(){
  105.  
  106. HQ.Ph = parseInt(HQPh.value);
  107. HQ.Fi = parseInt(HQFi.value);
  108. HQ.Co = parseInt(HQCo.value);
  109. HQ.Po = parseInt(HQPo.value);
  110. HQ.En = parseInt(HQEn.value);
  111.  
  112. var N =HQ.Ph + HQ.Fi + HQ.Co + HQ.Po + HQ.En;
  113. var HQR = parseInt(HQRes.value);
  114. var str ="" + (HQR - N);
  115. if(HQR-N <0) str = "<font color=red>" + (HQR-N) + "</font>"
  116.  
  117. HQBouns.innerHTML = str;
  118. HQ.Info = "HQBounus is " + N + " Point used!"
  119. if(HQR-N<0) HQ.Info += "it is Over the " + Math.abs(HQR-N) + " Point";
  120.  
  121. WriteResult(Base,HQ,Mat,Imbue);
  122. }
  123. function SetBaseItems(Obj){
  124. BPh.value = Obj.Ph;
  125. BFi.value = Obj.Fi;
  126. BCo.value = Obj.Co;
  127. BPo.value = Obj.Po;
  128. BEn.value = Obj.En;
  129.  
  130. WriteResult(Base,HQ,Mat,Imbue);
  131. }
  132. function SetMatItems(Obj){
  133. MTPh.value = Obj.Ph;
  134. MTFi.value = Obj.Fi;
  135. MTCo.value = Obj.Co;
  136. MTPo.value = Obj.Po;
  137. MTEn.value = Obj.En;
  138.  
  139. WriteResult(Base,HQ,Mat,Imbue);
  140. }
  141. function ImbueProc(){//いい名前がおもいつかない・・・。
  142. Imbue.Ph = parseInt(IMPh.value);
  143. Imbue.Fi = parseInt(IMFi.value);
  144. Imbue.Co = parseInt(IMCo.value);
  145. Imbue.Po = parseInt(IMPo.value);
  146. Imbue.En = parseInt(IMEn.value);
  147.  
  148. Imbue.Info ="";
  149.  
  150. if(Imbue.Ph != 0) Imbue.Info += "Imbuing Phisical: " + Imbue.Ph +" as "+ parseInt((Imbue.Ph/15)*100) +"%\n";
  151. if(Imbue.Fi != 0) Imbue.Info += "Imbuing Fire: " + Imbue.Fi +" as "+ parseInt((Imbue.Fi/15)*100) +"%\n";
  152. if(Imbue.Co != 0) Imbue.Info += "Imbuing Cold: " + Imbue.Co +" as "+ parseInt((Imbue.Co/15)*100) +"%\n";
  153. if(Imbue.Po != 0) Imbue.Info += "Imbuing Poison: " + Imbue.Po +" as "+ parseInt((Imbue.Po/15)*100) +"%\n";
  154. if(Imbue.En != 0) Imbue.Info += "Imbuing Energy: " + Imbue.En +" as "+ parseInt((Imbue.En/15)*100) +"%\n";
  155.  
  156. WriteResult(Base,HQ,Mat,Imbue);
  157.  
  158. }
  159.  
  160. function SetHQItems(Obj){
  161. HQPh.value = Obj.Ph;
  162. HQFi.value = Obj.Fi;
  163. HQCo.value = Obj.Co;
  164. HQPo.value = Obj.Po;
  165. HQEn.value = Obj.En;
  166.  
  167. }
  168.  
  169. function AddItems(A,B){
  170. var C = new Item(0,0,0,0,0,"");
  171.  
  172. C.Ph = A.Ph + B.Ph;
  173. C.Fi = A.Fi + B.Fi;
  174. C.Co = A.Co + B.Co;
  175. C.Po = A.Po + B.Po;
  176. C.En = A.En + B.En;
  177.  
  178. return C;
  179. }
  180. function SubItems(A,B){
  181. var C = new Item(0,0,0,0,0,"");
  182.  
  183. C.Ph = A.Ph - B.Ph;
  184. C.Fi = A.Fi - B.Fi;
  185. C.Co = A.Co - B.Co;
  186. C.Po = A.Po - B.Po;
  187. C.En = A.En - B.En;
  188.  
  189. return C;
  190. }
  191. function WriteResult(Base,HQ,Mat,Imbue){
  192. var Result = new Item(0,0,0,0,0,"");
  193. Result = AddItems(Base,HQ);
  194. Result = AddItems(Result,Mat);
  195. Result = AddItems(Result,Imbue);
  196.  
  197. if(IsAfterStronger.checked !=true){
  198. if(Imbue.Ph != 0) Result.Ph = Base.Ph + Imbue.Ph;
  199. if(Imbue.Fi != 0) Result.Fi = Base.Fi + Imbue.Fi;
  200. if(Imbue.Co != 0) Result.Co = Base.Co + Imbue.Co;
  201. if(Imbue.Po != 0) Result.Po = Base.Po + Imbue.Po;
  202. if(Imbue.En != 0) Result.En = Base.En + Imbue.En;
  203. }
  204.  
  205. var Need = new Item(parseInt(NPh.value),parseInt(NFi.value),parseInt(NCo.value),parseInt(NPo.value),parseInt(NEn.value),"");
  206.  
  207. RPh.value = ((Result.Ph - Need.Ph)== 0) ? Result.Ph : Result.Ph +" (" + (Result.Ph - Need.Ph) +")";
  208. RFi.value = ((Result.Fi - Need.Fi)== 0) ? Result.Fi : Result.Fi +" (" + (Result.Fi - Need.Fi) +")";
  209. RCo.value = ((Result.Co - Need.Co)== 0) ? Result.Co : Result.Co +" (" + (Result.Co - Need.Co) +")";
  210. RPo.value = ((Result.Po - Need.Po)== 0) ? Result.Po : Result.Po +" (" + (Result.Po - Need.Po) +")";
  211. REn.value = ((Result.En - Need.En)== 0) ? Result.En : Result.En +" (" + (Result.En - Need.En) +")";
  212.  
  213. TotalPoint.value = Result.Ph + Result.Fi + Result.Co+ Result.Po + Result.En;
  214.  
  215. info.value = Base.Info+"\n"+Mat.Info+"\n"+HQ.Info+"\n"+Imbue.Info+"\n" ;
  216.  
  217. }
  218.  
  219. function InvarseCalc(){
  220. var Result = AddItems(Base,Imbue);
  221.  
  222. if(IsAfterStronger.checked !=true){
  223. if(Imbue.Ph == 0) Result.Ph+= Mat.Ph;
  224. if(Imbue.Fi == 0) Result.Fi+= Mat.Fi;
  225. if(Imbue.Co == 0) Result.Co+= Mat.Co;
  226. if(Imbue.Po == 0) Result.Po+= Mat.Po;
  227. if(Imbue.En == 0) Result.En+= Mat.En;
  228. }else{
  229. Result = AddItems(Result,Mat);
  230. }
  231.  
  232. var Need = new Item(parseInt(NPh.value),parseInt(NFi.value),parseInt(NCo.value),parseInt(NPo.value),parseInt(NEn.value),"");
  233.  
  234. var Res2 = SubItems(Need,Result);
  235.  
  236. HQPh.value = (Res2.Ph < 0 || (Imbue.Ph != 0 && IsAfterStronger.checked !=true)) ? 0 : Res2.Ph;
  237. HQFi.value = (Res2.Fi < 0 || (Imbue.Fi != 0 && IsAfterStronger.checked !=true)) ? 0 : Res2.Fi;
  238. HQCo.value = (Res2.Co < 0 || (Imbue.Co != 0 && IsAfterStronger.checked !=true)) ? 0 : Res2.Co;
  239. HQPo.value = (Res2.Po < 0 || (Imbue.Po != 0 && IsAfterStronger.checked !=true)) ? 0 : Res2.Po;
  240. HQEn.value = (Res2.En < 0 || (Imbue.En != 0 && IsAfterStronger.checked !=true)) ? 0 : Res2.En;
  241.  
  242. CalcHQBouns();
  243.  
  244. }
  245.  
  246. // -->
  247. </script>
  248. <center>
  249. <h1>練成ベース皮算用</h1>
  250. <hr>
  251. <table border="1">
  252. <tr><td>目標</td><td>抵抗</td><td>ベース</td><td>素材</td><td>HQボーナス</td><td>練成</td><td></td><td>結果</td></tr>
  253.  
  254. <tr> <td></td>
  255. <td></td>
  256. <td>
  257. <select name="BaseArmor" onchange="SetBaseItems((Base = BaseList[BaseArmor.value]));">
  258. <option value=None>-Select-
  259. <option value=Plate>Platemail
  260. <option value=Chain>Chainmail
  261. <option value=Ring>Ringmail
  262. <option value=Scale>Scale
  263. <option value=Leather>Leather
  264. <option value=Stud>Stud
  265. <option value=Bone>Bone
  266. <option value=Leaf>Leaf
  267. <option value=Hide>Hide
  268. <option value=Wood>Wood
  269. <option value=GargPlate>Plate(Gargoyle)
  270. <option value=GargLeather>Learther(Gargoyle)
  271. <option value=GargStone>Stone(Gargoyle)
  272.  
  273. </select>
  274. </td>
  275. <td>
  276. <select name="Material" onchange="SetMatItems(Mat = MatList[Material.value]);">
  277. <option value="None">-Select-
  278. <option value="Iron">Iron
  279. <option value="Dull">Dull Copper
  280. <option value="Shadow">Shadow
  281. <option value="Copper">Copper
  282. <option value="Bronze">Bronze
  283. <option value="Gold">Gold
  284. <option value="Agapite">Agapite
  285. <option value="Verite">Verite
  286. <option value="Valorite">Valorite
  287. <option value="RedScale">RedScale
  288. <option value="YellowScale">YellowScale
  289. <option value="GreenScale">GreenScale
  290. <option value="BlueScale">BlueScale
  291. <option value="WhiteScale">WhiteScale
  292. <option value="BlackScale">BlackScale
  293. <option value="Leather">Leather
  294. <option value="Spined">Spined
  295. <option value="Honed">Honed
  296. <option value="Barbed">Baebed
  297. <option value="Wood">Wood
  298. <option value="Oak">Oak
  299. <option value="Ash">Ash
  300. <option value="Yew">Yew
  301. <option value="Heart">HeartWood
  302. <option value="Blood">BloodWood
  303. <option value="Frost">FrostWood
  304. </select>
  305. </td>
  306.  
  307. <td> <input type=text value=15 name=HQRes size=3 onchange="CalcHQBouns();"></input>
  308. <select name="ArmsLore" onchange="HQRes.value = ArmsLore.value; CalcHQBouns(); ">
  309. <option value=0>-Select-
  310. <option value=15>Non Armslore
  311. <option value=20>GM Armslore
  312. </select>
  313. </td>
  314. <td><input type=checkbox name=IsAfterStronger onclick="ImbueProc();"></input>後強化</td>
  315. <td></td>
  316.  
  317. <td></td>
  318. </tr>
  319. <tr>
  320. <td>
  321. <input type=text value=0 name=NPh></input><br>
  322. <input type=text value=0 name=NFi></input><br>
  323. <input type=text value=0 name=NCo></input><br>
  324. <input type=text value=0 name=NPo></input><br>
  325. <input type=text value=0 name=NEn></input><br>
  326. </td>
  327.  
  328. <td>
  329. <center>
  330. 物理<br>
  331. 炎<br>
  332. 冷気<br>
  333. 毒<br>
  334. エネ<br>
  335. </center>
  336. </td>
  337. <td>
  338. <input type=text value=0 name=BPh></input><br>
  339. <input type=text value=0 name=BFi></input><br>
  340. <input type=text value=0 name=BCo></input><br>
  341. <input type=text value=0 name=BPo></input><br>
  342. <input type=text value=0 name=BEn></input><br>
  343. </td>
  344. <td>
  345. <input type=text value=0 name=MTPh></input><br>
  346. <input type=text value=0 name=MTFi></input><br>
  347. <input type=text value=0 name=MTCo></input><br>
  348. <input type=text value=0 name=MTPo></input><br>
  349. <input type=text value=0 name=MTEn></input><br>
  350. </td>
  351. <td>
  352. <input type=text value=0 name=HQPh onchange="CalcHQBouns();"></input><br>
  353. <input type=text value=0 name=HQFi onchange="CalcHQBouns();"></input><br>
  354. <input type=text value=0 name=HQCo onchange="CalcHQBouns();"></input><br>
  355. <input type=text value=0 name=HQPo onchange="CalcHQBouns();"></input><br>
  356. <input type=text value=0 name=HQEn onchange="CalcHQBouns();"></input><br>
  357. </td>
  358. <td>
  359. <input type=text value=0 name=IMPh onchange="ImbueProc();"></input><br>
  360. <input type=text value=0 name=IMFi onchange="ImbueProc();"></input><br>
  361. <input type=text value=0 name=IMCo onchange="ImbueProc();"></input><br>
  362. <input type=text value=0 name=IMPo onchange="ImbueProc();"></input><br>
  363. <input type=text value=0 name=IMEn onchange="ImbueProc();"></input><br>
  364. </td>
  365. <td>
  366. </td>
  367. <td> <input type=text value=0 name=RPh></input><br>
  368. <input type=text value=0 name=RFi></input><br>
  369. <input type=text value=0 name=RCo></input><br>
  370. <input type=text value=0 name=RPo></input><br>
  371. <input type=text value=0 name=REn></input><br>
  372. </td>
  373. </tr>
  374. <tr> <td></td>
  375. <td></td>
  376. <td></td>
  377. <td></td>
  378.  
  379. <td>
  380. <div id=HQBouns></div><br>
  381. <input type=button value=簡易計算 onclick="InvarseCalc();"></input>
  382. </td>
  383. <td></td>
  384. <td></td>
  385. <td><input type=text value=0 name=TotalPoint></input></td>
  386. </table>
  387. <b>Info</b><br>
  388. <textarea cols=72 rows=8 name=info></textarea>
  389. </center>
  390. <hr>
  391. <p align="right">
  392. <b>Copyright 2012 by Yakitori</b><br>
  393. <b>Win7 HomeP 64bit + IE9 64bit</b><br>
  394. <b>2012/02/24</b><br>
  395. </p>
  396. </body>
  397. </html>
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty