-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcalcsets.html
132 lines (106 loc) · 2.6 KB
/
calcsets.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
<html>
<head>
<title>Calc Sets Exporter</title>
<style>
body {
background-color: #232a30;
color: #d1d6c9;
}
.wide {
height:150px;
width:700px;
}
h1 {
font-family: Jokerman;
color: Aqua;
background-color:black;
width: 40%;
border: 4px solid Aqua;
text-align: center;
font-size: 48px;
}
button {
background-color: black;
color: aqua;
border: solid 4px aqua;
font-size:28px;
}
textarea {
width: 100%;
height: 30%;
background-color: #232a30;
color: #d1d6c9;
}
</style>
</head>
<body>
You'll have to configure EVs yourself in the text that you get below<br>Also use a common prefix for a mod like FE, CS<br>Try copy pasting the example below to test
<h2>Example</h2>
<pre>Set: CS Choice Band
Metagross @ Choice Band
Ability: Iron Fist
EVs: 252 Atk / 4 SpD / 252 Spe
Adamant Nature
- Iron Head
- Hammer Arm
- Bullet Punch
- Zen Headbutt</pre>
<center>
<textarea id="moveset" onInput="exporto()"></textarea><br>
<h2>Calc Export</h2>
</center>
<textarea id="copy"></textarea>
</body>
<script>
function exporto ()
{
let set=document.getElementById("moveset").value;
set = set.replace(/Set: /g,"");
set = set.replace(/Set:/g,"");
let lines=set.split("\n");
let name = lines[0];
let line2=lines[1];
let line2details=line2.split(" @ ")
let mon = line2details[0]
let item = line2details[1]
let line3=lines[2];
let line3details=line3.split("Ability: ")
let ability = line3details[1]
let line4=lines[3];
let line4details=line4.split("EVs: ")
let evs = line4details[1]
let statevs = evs.split(" / ");
let evsfinal ="";
let line5=lines[4];
let line5details=line5.split(" Nature")
let nature = line5details[0]
let line6=lines[5];
let line6details=line6.split("- ")
let move1 = line6details[1]
let line7=lines[6];
let line7details=line7.split("- ")
let move2 = line7details[1]
let line8=lines[7];
let line8details=line8.split("- ")
let move3 = line8details[1]
let line9=lines[8];
let line9details=line9.split("- ")
let move4 = line9details[1]
document.getElementById("copy").innerHTML =`"${mon}": {\n "${name}": {"level": 100, "evs": {"hp": 0, "at": 0, "df": 0, "sa": 0, "sd": 0, "sp": 0}, "nature": "${nature}", "ability": "${ability}", "item": "${item}", "moves": ["${move1}", "${move2}", "${move3}", "${move4}"]},\n},\n`;
/*
Set: Choice Band
Metagross @ Choice Band
Ability: Iron Fist
EVs: 252 Atk / 4 SpD / 252 Spe
Adamant Nature
- Iron Head
- Hammer Arm
- Bullet Punch
- Zen Headbutt / Trick
"CS Special Wall": {"level": 100, "evs": {"hp": 248, "df": 8, "sd": 252}, "nature": "Calm", "ability": "Levitate", "item": "Black Sludge", "moves": ["Rapid Spin", "Recover", "Sludge Bomb", "Stealth Rock"]},
},
};
*/
}
</script>
</html>