-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathLearnlist-entry7.lua
More file actions
191 lines (153 loc) · 4.8 KB
/
Learnlist-entry7.lua
File metadata and controls
191 lines (153 loc) · 4.8 KB
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
-- Gli entry dei learnlist di settima generazione
local z = {}
-- stylua: ignore start
local mw = require('mw')
local txt = require('Wikilib-strings')
local lib = require('Wikilib-learnlists')
local multigen = require('Wikilib-multigen')
local links = require('Links')
local moves = require("Move-data")
-- stylua: ignore end
-- stab, mossa, notes, tipo, cat, pw, acc, pp, gara, exib, inib
local entry = function(stab, mossa, notes)
local data = multigen.getGen(moves[string.lower(mossa)])
return lib.categoryentry(
stab,
mossa,
notes,
txt.fu(data.type),
txt.fu(data.category),
data.power,
data.accuracy,
data.pp
)
end
--Entry per le mosse apprese aumentando di livello
z.level = function(frame)
local p = lib.sanitize(mw.clone(frame.args))
return table.concat({
"|-\n",
lib.gameslevel(
lib.makeEvoText(p[1])
or links.tt(
"—",
"Disponibile solo in Ultrasole e Ultraluna"
),
lib.makeEvoText(p[2])
or links.tt("—", "Disponibile solo in Sole e Luna")
),
entry(p[5] or "", p[3] or "Geloraggio", lib.makeNotes(p[4] or "")),
})
end
z.Level = z.level
-- It's perfect un corno, doesn't work becuase it takes one more parameter
-- Wrapper for level function, adding a "second level"
z.levelLGPE = function(frame)
table.insert(frame.args, 1, frame.args[1])
return z.level(frame)
end
-- Entry per le mosse appprese tramite MT/MN
z.tm = function(frame)
local p = lib.sanitize(mw.clone(frame.args))
return txt.interp(
table.concat({
[=[|-
| style="padding: 0.1em 0.3em;" | <span class="hidden-xs">[[File:${img} ${tipo} VI Sprite Zaino.png]]</span>[[${p1}|<span style="color:#000;">${p1}</span>]]]=],
entry(p[4] or "", p[2] or "Purogelo", lib.makeNotes(p[3] or "")),
}),
{
img = string.match(p[1] or "MT55", "^(M[TN])%d"),
p1 = p[1] or "MT55",
tipo = txt.fu(moves[string.lower(p[2] or "Purogelo")].type)
or "Sconosciuto",
}
)
end
z.Tm = z.tm
-- It's perfect, here just to make easier a future update
z.tmLGPE = z.tm
-- Entry per le mosse apprese tramite accoppiamento
z.breed = function(frame)
local p = lib.sanitize(mw.clone(frame.args))
return txt.interp(
table.concat({
[[|-
| style="padding: 0.1em 0.3em;" | ${p1}]],
entry(
p[4] or "",
p[2] or "Lanciafiamme",
lib.makeNotes(
p[3] or "",
lib.makeNotes(p[5] or "", lib.makeNotes(p[6] or ""))
)
),
}),
{
p1 = lib.mslistToModal(p[1] or "", "7", nil, 6),
}
)
end
z.Breed = z.breed
-- Entry per le mosse apprese tramite esperto mosse
z.tutor = function(frame)
local p = lib.sanitize(mw.clone(frame.args))
return table.concat({
lib.tutorgames({ { "SL", p[4] }, { "USUL", p[5] } }),
" ",
entry(p[3] or "", p[1] or "Tuono", lib.makeNotes(p[2] or "")),
})
end
z.Tutor = z.tutor
-- Entry per le mosse apprese tramite evoluzioni precedenti
z.preevo = function(frame)
local p = lib.sanitize(mw.clone(frame.args))
return table.concat({
lib.preevodata(p, "7"),
" ",
entry(p[8] or "", p[7] or "Scontro", ""),
})
end
z.Preevo, z.prevo, z.Prevo = z.preevo, z.preevo, z.preevo
-- Entry per le mosse apprese tramite eventi
z.event = function(frame)
local p = lib.sanitize(mw.clone(frame.args))
return txt.interp(
table.concat({
[[|-
| style="padding: 0.1em 0.3em;" | ${p1}${p10}]],
entry(p[4] or "", p[2] or "Bora", lib.makeNotes(p[3] or "")),
}),
{
p1 = p[1] or "Evento",
p10 = lib.makeLevel(p[5]),
}
)
end
z.Event = z.event
-- Entry per i Pokémon che non imparano mosse aumentando di livello
z.levelnull = function(frame)
return lib.entrynull("level", "11")
end
z.Levelnull = z.levenull
-- Entry per i Pokémon che non imparano mosse tramite MT/MN
z.tmnull = function(frame)
return lib.entrynull("tm", "11")
end
z.Tmnull = z.tmnull
-- Entry per i Pokémon che non imparano mosse tramite accoppiamento
z.breednull = function(frame)
return lib.entrynull("breed", "10")
end
z.Breednull = z.breednull
-- Entry per i Pokémon che non imparano mosse dall'esperto mosse
z.tutornull = function(frame)
return lib.entrynull("tutor", "13")
end
z.Tutornull = z.tutornull
-- Entry per i Pokémon che non imparano mosse tramite evoluzioni precedenti
z.preevonull = function(frame)
return lib.entrynull("preevo", "10")
end
z.Preevonull, z.prevonull, z.Prevonull =
z.preevonull, z.preevonull, z.preevonull
return z