-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathLearnlist-entry2.lua
More file actions
206 lines (170 loc) · 5.06 KB
/
Learnlist-entry2.lua
File metadata and controls
206 lines (170 loc) · 5.06 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
-- Gli entries dei learnlist di seconda generazione
local z = {}
-- stylua: ignore start
local mw = require('mw')
local txt = require('Wikilib-strings')
local lib = require('Wikilib-learnlists')
local abbrLib = require('Wikilib-sigle')
local s = require("Sup-data")
-- stylua: ignore end
--Entry per le mosse apprese aumentando di livello
z.level = function(frame)
local p = lib.sanitize(mw.clone(frame.args))
return txt.interp(
table.concat({
[=[|-
| style="padding: 0.1em 0.3em;" | ${p1}${games}]=],
lib.basicentry(
p[8] or "",
p[2] or "Iper Raggio",
lib.makeNotes(p[7] or ""),
p[3] or "Sconosciuto",
p[4] or "0",
p[5] or "0",
p[6] or "0"
),
}),
{
p1 = p[1] or "Inizio",
games = abbrLib.concatAbbrs(p[9] or "", s),
}
)
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} Sprite Zaino.png]]</span>[[${p1}|<span style="color:#000;">${p1}</span>]]${games}]=],
lib.basicentry(
p[8] or "",
p[2] or "Azione",
lib.makeNotes(p[7] or ""),
p[3] or "Sconosciuto",
p[4] or "0",
p[5] or "0",
p[6] or "0"
),
}),
{
img = string.match(p[1] or "MT55", "^(M[TN])%d"),
p1 = p[1] or "MT55",
tipo = p[3] or "Sconosciuto",
games = abbrLib.concatAbbrs(p[9] or "", s),
}
)
end
z.Tm = 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;" | ${fathers}]=],
lib.basicentry(
p[8] or "",
p[2] or "Schianto",
lib.makeNotes(p[7] or "", abbrLib.concatAbbrs(p[9] or "", s)),
p[3] or "Sconosciuto",
p[4] or "0",
p[5] or "0",
p[6] or "0"
),
}),
{
-- We use gen 3 MS because gen 1/2 are indistinguishable
fathers = lib.mslistToModal(p[1] or "", "3", 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({ { "C", "Yes" } }),
" ",
lib.basicentry(
p[7] or "",
p[1] or "Schianto",
lib.makeNotes(p[6] or ""),
p[2] or "Sconosciuto",
p[3] or "0",
p[4] or "0",
p[5] or "0"
),
})
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))
-- We use gen 3 MS because gen 1/2 are indistinguishable
return table.concat({
lib.preevodata(p, "3"),
" ",
lib.basicentry(
p[12] or "",
p[7] or "Scontro",
lib.makeNotes(p[13] or ""),
p[8] or "Sconosciuto",
p[9] or "0",
p[10] or "0",
p[11] or "0"
),
})
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}${p9}]],
lib.basicentry(
p[8] or "",
p[2] or "Abisso",
lib.makeNotes(p[7] or ""),
p[3] or "Sconosciuto",
p[4] or "0",
p[5] or "0",
p[6] or "0"
),
}),
{
p1 = p[1] or "Evento",
p9 = lib.makeLevel(p[9]),
}
)
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", "6")
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", "7")
end
z.Tmnull = z.tmnull
-- Entry per i Pokémon che non imparano mosse tramite accoppiamento
z.breednull = function(frame)
return lib.entrynull("breed", "6")
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", "6")
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", "6")
end
z.Preevonull, z.prevonull, z.Prevonull =
z.preevonull, z.preevonull, z.preevonull
return z