-
Notifications
You must be signed in to change notification settings - Fork 0
/
Critical_Damage_Calculator_ICS_magic.html
265 lines (251 loc) · 8.93 KB
/
Critical_Damage_Calculator_ICS_magic.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>トーラムオンライン 必要STR値逆算計算ツール</title>
<script type="text/javascript" src="brython/www/src/brython.js">
</script>
<script type="text/javascript" src="brython/www/src/brython_stdlib.js">
</script>
<style type="text/css">
body{
background-color: #2b2b2b;
color: #e4cfcf;
font-size: 23px;
}
input{
font: sans-serif;
font-size: 25px;
width: 60px;
height: 40px;
padding: 0.3em;
transition: 0.3s;
color: #d3d3d3;
border: none;
border-bottom: 2px solid #1b2538;
background-color: #463939;
outline-color: #343434;
outline-style: groove;
outline-width: 4.1px;
}
div{
font-size: 25px;
}
i{
display:inline;
font-size: 25px;
}
button{
background-color: #4f4f4f;
color: #e4cfcf;
font-size: 35px;
width: 280px;
height: 60px;
outline: 0;
}
div#RESULTs{
border: 2px groove;
color: #4f4f4f;
width: 630px;
height: 60px;
}
h2#RESULT{
font-size: 30px;
display:inline;
width: 550px;
height: 80px;
color: red;
line-height: 2;
padding-left: 20px;
}
div#SubTotals{
border: 2px groove;
color: #4f4f4f;
width: 460px;
height: 50px;
}
h3#SubTotal{
font-size: 23px;
display:inline;
width: 420px;
height: 50px;
color: red;
line-height: 2;
padding-left: 20px;
}
a:link { color: #e4d7a6; }
a:visited { color: #e4d7a6; }
a:hover { color: #e4d7a6; }
a:active { color: #e4d7a6; }
a{
font-family: sans-serif;
font-size: 23px;
}
i#text_field{
font-size: 35px;
}
</style>
</head>
<body onload="brython()">
<script type="text/python">
from browser import document, html, bind
document["TITLE"] <= "必要STR値逆算ツール"
TEXT_Feild = document["text_field"]
def back_cd():
W_cd_MSG = html.I("武器のクリティカルダメージ")
W_cd = html.INPUT()
Wcd_P_MSG = html.I("武器のクリティカルダメージ(%)")
Wcd_P = html.INPUT()
SubW_cd_MSG = html.I("サブ武器のクリティカルダメージ")
SubW_cd = html.INPUT()
SubW_cdP_MSG = html.I("サブ武器のクリティカルダメージ(%)")
SubW_cdP = html.INPUT()
B_cd_MSG = html.I("体装備のクリティカルダメージ")
B_cd = html.INPUT()
B_cdP_MSG = html.I("体装備のクリティカルダメージ(%)")
B_cdP = html.INPUT()
Addis_cd_MSG = html.I("追加装備のクリティカルダメージ")
Addis_cd = html.INPUT()
Addis_cdP_MSG = html.I("追加装備のクリティカルダメージ(%)")
Addis_cdP = html.INPUT()
SPcd_MSG = html.I("特殊装備のクリティカルダメージ")
SPcd = html.INPUT()
SPcdP_MSG = html.I("特殊装備のクリティカルダメージ(%)")
SPcdP = html.INPUT()
Enh_MSG = html.I("オシャレ装備のクリティカルダメージ")
Enh = html.INPUT()
EnhP_MSG = html.I("オシャレ装備のクリティカルダメージ(%)")
EnhP = html.INPUT()
ALCrs_MSG = html.I("クリスタの合計クリティカルダメージ")
ALCrs = html.INPUT()
ALCrsP_MSG = html.I("クリスタの合計クリティカルダメージ(%)")
ALCrsP = html.INPUT()
SkillCRTD_MSG = html.I("クリティカルアップのレベル")
SkillCRTD = html.INPUT()
CK_STR_MSG = html.I("STR料理の値")
CK_STR = html.INPUT()
FK_STR_MSG = html.I("STR固定値")
FK_STR = html.INPUT()
FK_STR_Percent_MSG = html.I("STR(%)")
FK_STR_Percent = html.INPUT()
Submit_BTNs = html.BUTTON("計算する")
TEXT_Feild <= W_cd + html.I(" : ") + W_cd_MSG + html.BR() + Wcd_P + html.I(" : ") + Wcd_P_MSG + html.BR()+ SubW_cd + html.I(" : ") + SubW_cd_MSG + html.BR() + SubW_cdP + html.I(" : ") + SubW_cdP_MSG + html.BR() + B_cd + html.I(" : ") + B_cd_MSG + html.BR() + B_cdP + html.I(" : ") + B_cdP_MSG + html.BR() + Addis_cd + html.I(" : ") + Addis_cd_MSG + html.BR() + Addis_cdP + html.I(" : ") + Addis_cdP_MSG + html.BR() + SPcd + html.I(" : ") + SPcd_MSG + html.BR() + SPcdP + html.I(" : ") + SPcdP_MSG + html.BR() + Enh + html.I(" : ") + Enh_MSG + html.BR() + EnhP + html.I(" : ") + EnhP_MSG + html.BR() + ALCrs + html.I(" : ") + ALCrs_MSG + html.BR() + ALCrsP + html.I(" : ") + ALCrsP_MSG + html.BR() + SkillCRTD + html.I(" : ") + SkillCRTD_MSG + html.BR() + CK_STR + html.I(" : ") + CK_STR_MSG + html.BR() + FK_STR + html.I(" : ") + FK_STR_MSG + html.BR() + FK_STR_Percent + html.I(" : ") + FK_STR_Percent_MSG + html.BR() + html.BR() + html.BR() + Submit_BTNs
W_cd.focus()
Wcd_P.focus()
SubW_cd.focus()
SubW_cdP.focus()
B_cd.focus()
B_cdP.focus()
Addis_cd.focus()
Addis_cdP.focus()
SPcd.focus()
SPcdP.focus()
Enh.focus()
EnhP.focus()
ALCrs.focus()
ALCrsP.focus()
SkillCRTD.focus()
CK_STR.focus()
FK_STR.focus()
FK_STR_Percent.focus()
return W_cd, Wcd_P, SubW_cd, SubW_cdP, B_cd, B_cdP, Addis_cd, Addis_cdP, SPcd, SPcdP, Enh, EnhP, ALCrs, ALCrsP, SkillCRTD, CK_STR, FK_STR, FK_STR_Percent, Submit_BTNs
def sclear():
document["RESULT"].clear()
def SubTClear():
document["SubTotal"].clear()
def main():
WeaponCD, WeaponCD_Percent, SubWeaponCD, SubWeaponCD_Percent, BodyEQuipmentCD, BodyEQuipmentCD_Percent, AdditionalEquipmentCD, AdditionalEquipmentCD_Percent, SPecialEquipmentCD, SPecialEquipmentCD_Percent, EnchCD, EnchCDP, AllCristalCD, AllCristalCD_Percent, SkillCD, Cook_STR, FixedSTR, FixedSTR_Percent, Smit_BTN = back_cd()
@bind(Smit_BTN,"click")
def click(cl):
sclear()
SubTClear()
try:
skillLevel = int(SkillCD.value)
except ValueError:
skillLevel = 1
if skillLevel == 1:
SkillCrtDamage = 0
elif skillLevel == 2:
SkillCrtDamage = 1
elif skillLevel == 3:
SkillCrtDamage = 1
elif skillLevel == 4:
SkillCrtDamage = 2
elif skillLevel == 5:
SkillCrtDamage = 2
elif skillLevel == 6:
SkillCrtDamage = 3
elif skillLevel == 7:
SkillCrtDamage = 3
elif skillLevel == 8:
SkillCrtDamage = 4
elif skillLevel == 9:
SkillCrtDamage = 4
elif skillLevel == 10:
SkillCrtDamage = 5
else:
document["RESULT"] <= "エラー: バトルスキルのレベルが既定値範囲外です。"
if WeaponCD.value == '':
WeaponCD.value = '0'
if WeaponCD_Percent.value == '':
WeaponCD_Percent.value = '0'
if SubWeaponCD.value == '':
SubWeaponCD.value = '0'
if SubWeaponCD_Percent.value == '':
SubWeaponCD_Percent.value = '0'
if BodyEQuipmentCD.value == '':
BodyEQuipmentCD.value = '0'
if BodyEQuipmentCD_Percent.value == '':
BodyEQuipmentCD_Percent.value = '0'
if AdditionalEquipmentCD.value == '':
AdditionalEquipmentCD.value = '0'
if AdditionalEquipmentCD_Percent.value == '':
AdditionalEquipmentCD_Percent.value = '0'
if SPecialEquipmentCD.value == '':
SPecialEquipmentCD.value = '0'
if SPecialEquipmentCD_Percent.value == '':
SPecialEquipmentCD_Percent.value = '0'
if EnchCD.value == '':
EnchCD.value = '0'
if EnchCDP.value == '':
EnchCDP.value = '0'
if AllCristalCD.value == '':
AllCristalCD.value = '0'
if AllCristalCD_Percent.value == '':
AllCristalCD_Percent.value = '0'
if Cook_STR.value == '':
Cook_STR.value = '0'
if FixedSTR.value == '':
FixedSTR.value = '0'
if FixedSTR_Percent.value == '':
FixedSTR_Percent.value = '0'
ALLCD = int(WeaponCD.value) + int(SubWeaponCD.value) + int(BodyEQuipmentCD.value) + int(AdditionalEquipmentCD.value) + int(SPecialEquipmentCD.value) + int(EnchCD.value) + int(AllCristalCD.value)
ALLCDPercent = int(WeaponCD_Percent.value) + int(SubWeaponCD_Percent.value) + int(BodyEQuipmentCD_Percent.value) + int(AdditionalEquipmentCD_Percent.value) + int(SPecialEquipmentCD_Percent.value) + int(EnchCDP.value) + int(AllCristalCD_Percent.value) + int(SkillCrtDamage)
BasicCD = (300 - ALLCD) / (1 + (ALLCDPercent / 100))
iALLSTR = (BasicCD - 150) * 5
if int(FixedSTR_Percent.value) <= 9:
FixedSTR_Percent.value = '0' + FixedSTR_Percent.value
if 2 <= len(FixedSTR_Percent.value):
FixedSTRP = (FixedSTR_Percent.value.replace('0',''))
FixedSTR_Percent.value = '0' + FixedSTRP
if FixedSTR_Percent.value == '0':
sSTR = round((iALLSTR - int(Cook_STR.value) - int(FixedSTR.value)))
else:
sSTR = round((iALLSTR - int(Cook_STR.value) - int(FixedSTR.value)) / (1 + (int(FixedSTR_Percent.value) / 100)))
else:
sSTR = round((iALLSTR - int(Cook_STR.value) - int(FixedSTR.value)) / (1 + (int(FixedSTR_Percent.value) / 100)))
document["SubTotal"] <= "合計クリティカルダメージ: {}%と{}".format(ALLCDPercent, ALLCD)
document["RESULT"] <= "今のパラメータに必要なSTRの値: {}".format(sSTR)
main()
</script>
<h4 style="display: inline;"><a href="https://crossdarkrix.github.io/ToramHTMLTools/" style="display: inline;">トップページに戻る</a></h4>
<h2 id="TITLE"></h2>
<div>
注意事項:<br>
「クリティカルアップのレベル」にはバトルスキルのクリティカルアップのレベルを入れてください(空欄でも可)<br>
「オシャレ装備のクリティカルダメージ」にはオシャレ装備のエンチャントのクリティカルダメージの値を入れてください<br><br>
</div>
<div id="text_field"></div><br>
<div id="SubTotals"><h3 id="SubTotal"></h3></div>
<div id="RESULTs"><h2 id="RESULT"></h2></div>
</body>
</html>