blob: a24e09421071cdbafbb7232f1d99249061531429 (
plain)
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
|
class Technique {
#accuracy = 0;
#potency = 0;
#power = 0;
constructor (slug) {
this.slug = slug;
this.resetStats();
}
get name () {
return slugToName(this.slug);
}
get types () {
return DB.techniques[this.slug].types;
}
get range () {
return DB.techniques[this.slug].range;
}
get animation () {
return DB.techniques[this.slug].animation;
}
get sfx () {
return DB.techniques[this.slug].sfx;
}
/**
* @returns {string[]}
*/
get effects () {
return DB.techniques[this.slug].effects;
}
get accuracy () {
return this.#accuracy;
}
set accuracy (accuracy) {
this.#accuracy = accuracy;
}
get potency () {
return this.#potency;
}
set potency (potency) {
this.#potency = potency;
}
get power () {
return this.#power;
}
set power (power) {
this.#power = power;
}
get stats () {
const accuracy = DB.techniques[this.slug].accuracy;
const potency = DB.techniques[this.slug].potency;
const power = DB.techniques[this.slug].power;
return {
accuracy,
potency,
power,
};
}
resetStats () {
this.accuracy = this.stats.accuracy;
this.potency = this.stats.potency;
this.power = this.stats.power;
}
}
|