Skip to content

Commit fd09b7b

Browse files
committed
fix(flavors): parse out wrong content
1 parent b7dfcf1 commit fd09b7b

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

scripts/data-gen-scripts/scripted-updaters/flavor-text-updater/get-text-content.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ export function getTextContent(bit1: string) {
1919
.replace(/{{pkmn2\|([a-zA-Z]+)}}/g, '$1')
2020
.replace(/{{wp\|([a-zA-Z ]+)}}/g, '$1')
2121
.replace(/{{wp\|[a-zA-Z ()]+\|([a-zA-Z. ]+)}}/g, '$1')
22+
.replace(/'''Version 1\.0:''' .+1.2:''' (.+)/, '$1')
23+
.replace(/'''Version 1\.0:''' .+1\.1:''' (.+)/, '$1')
24+
.replace(/'''Version 1\.0:''' .+1\.2:''' (.+)/, '$1')
2225
.replaceAll('{{tt|*|Pokédex entry only found in Pokémon HOME.}}', '')
2326
.replaceAll('{{tt|*|Pokédex entry only found in Pokémon HOME}}', '')
2427
.replaceAll('{{tt|*|In Ver 1.0, Tyranitar uses its entry from LeafGreen}}', '')
28+
.replaceAll('{{tt|*|Used for both genders in-game}}', '')
29+
.replaceAll('}}\t', '')
2530
.replaceAll('’', "'")
2631
.replaceAll('−', '-')
2732
.replaceAll('“', '"')
@@ -64,5 +69,8 @@ export function getTextContent(bit1: string) {
6469
.replaceAll('[[Mega Evolution|a phenomenon that occurs in a certain region]]', 'a phenomenon that occurs in a certain region')
6570
.replaceAll('[[Violet Book|certain expedition journal.]]', 'certain expedition journal.')
6671
.replaceAll('[[Scarlet Book|old expedition journal]]', 'old expedition journal.')
67-
.replaceAll('[[Violet Book|old book]]', 'old book.');
72+
.replaceAll('[[Violet Book|old book]]', 'old book')
73+
.replaceAll('[[Professor Laventon|my]]', 'my')
74+
.replaceAll('[[Galar|homeland]]', 'homeland')
75+
.replaceAll('[[Hisui|much harsher environments]]', 'much harsher environments');
6876
}

src/lib/assets/flavorText.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3550,7 +3550,7 @@
35503550
},
35513551
{
35523552
"version_id": "Legends: Arceus",
3553-
"flavor_text": "It can discharge bursts of electricity exceeding 100,000 volts—a single strike with that amount of power would incapacitate one of the Copperajah of [[Professor Laventon|my]] [[Galar|homeland]]."
3553+
"flavor_text": "It can discharge bursts of electricity exceeding 100,000 volts—a single strike with that amount of power would incapacitate one of the Copperajah of my homeland."
35543554
},
35553555
{
35563556
"version_id": "Scarlet",
@@ -6338,11 +6338,11 @@
63386338
},
63396339
{
63406340
"version_id": "Ruby",
6341-
"flavor_text": "'''Version 1.0:''' Paras has parasitic mushrooms growing on its back called tochukaso. They grow large by drawing nutrients from the{{sup/3|R}}/this{{sup/3|S}} Bug Pokémon host. They are highly valued as a medicine for extending life.<br>'''Versions 1.1 and 1.2:''' Paras has parasitic mushrooms growing on its back called tochukaso. They grow large by drawing nutrients from this Bug/Grass Pokémon host. They are highly valued as a medicine for extending life."
6341+
"flavor_text": "Paras has parasitic mushrooms growing on its back called tochukaso. They grow large by drawing nutrients from this Bug/Grass Pokémon host. They are highly valued as a medicine for extending life."
63426342
},
63436343
{
63446344
"version_id": "Sapphire",
6345-
"flavor_text": "'''Version 1.0:''' Paras has parasitic mushrooms growing on its back called tochukaso. They grow large by drawing nutrients from the{{sup/3|R}}/this{{sup/3|S}} Bug Pokémon host. They are highly valued as a medicine for extending life.<br>'''Versions 1.1 and 1.2:''' Paras has parasitic mushrooms growing on its back called tochukaso. They grow large by drawing nutrients from this Bug/Grass Pokémon host. They are highly valued as a medicine for extending life."
6345+
"flavor_text": "Paras has parasitic mushrooms growing on its back called tochukaso. They grow large by drawing nutrients from this Bug/Grass Pokémon host. They are highly valued as a medicine for extending life."
63466346
},
63476347
{
63486348
"version_id": "Emerald",
@@ -17206,7 +17206,7 @@
1720617206
},
1720717207
{
1720817208
"version_id": "Ultra Sun",
17209-
"flavor_text": "In many places, there are folktales of stardust falling into the ocean and becoming Staryu.}}\t"
17209+
"flavor_text": "In many places, there are folktales of stardust falling into the ocean and becoming Staryu."
1721017210
},
1721117211
{
1721217212
"version_id": "Ultra Moon",
@@ -21874,7 +21874,7 @@
2187421874
},
2187521875
{
2187621876
"version_id": "FireRed",
21877-
"flavor_text": "'''Version 1.0:''' Its pleasantly aromatic leaves have the ability to check the humidity and temperature.<br>'''Version 1.1:''' Its pleasantly aromatic leaf has the ability to check the humidity and temperature."
21877+
"flavor_text": "Its pleasantly aromatic leaf has the ability to check the humidity and temperature."
2187821878
},
2187921879
{
2188021880
"version_id": "LeafGreen",
@@ -31534,7 +31534,7 @@
3153431534
},
3153531535
{
3153631536
"version_id": "Scarlet",
31537-
"flavor_text": "This Pokémon apparently used to live in [[Hisui|much harsher environments]], and thus it once had stronger psychic powers than it does now."
31537+
"flavor_text": "This Pokémon apparently used to live in much harsher environments, and thus it once had stronger psychic powers than it does now."
3153831538
},
3153931539
{
3154031540
"version_id": "Violet",
@@ -33098,7 +33098,7 @@
3309833098
},
3309933099
{
3310033100
"version_id": "FireRed",
33101-
"flavor_text": "'''Version 1.0:''' Its body can't be harmed by any sort of attack, so it is very eager to make challenges against enemies.<br>'''Version 1.1:''' It has an impudent nature. Having great strength, it can even change surrounding landforms."
33101+
"flavor_text": "It has an impudent nature. Having great strength, it can even change surrounding landforms."
3310233102
},
3310333103
{
3310433104
"version_id": "LeafGreen",
@@ -38280,7 +38280,7 @@
3828038280
"303": [
3828138281
{
3828238282
"version_id": "Ruby",
38283-
"flavor_text": "'''Version 1.0:''' Mawhile's huge jaws are actually steel horns that have been transformed. Its docile-looking face serves to lull its foe into letting down its guard. When the foe least expects it, Mawhile chomps it with its gaping jaws.<br>'''Versions 1.1 and 1.2:''' Mawile's huge jaws are actually steel horns that have been transformed. Its docile-looking face serves to lull its foe into letting down its guard. When the foe least expects it, Mawile chomps it with its gaping jaws."
38283+
"flavor_text": "Mawile's huge jaws are actually steel horns that have been transformed. Its docile-looking face serves to lull its foe into letting down its guard. When the foe least expects it, Mawile chomps it with its gaping jaws."
3828438284
},
3828538285
{
3828638286
"version_id": "Sapphire",
@@ -59866,7 +59866,7 @@
5986659866
},
5986759867
{
5986859868
"version_id": "Shield",
59869-
"flavor_text": "Legend has it that the residents of a sunken ancient city changed into these Pokémon.{{tt|*|Used for both genders in-game}}"
59869+
"flavor_text": "Legend has it that the residents of a sunken ancient city changed into these Pokémon."
5987059870
}
5987159871
],
5987259872
"593": [
@@ -59912,11 +59912,11 @@
5991259912
},
5991359913
{
5991459914
"version_id": "Sword",
59915-
"flavor_text": "Most of this Pokémon's body composition is identical to sea water. It makes sunken ships its lair.{{tt|*|Used for both genders in-game}}"
59915+
"flavor_text": "Most of this Pokémon's body composition is identical to sea water. It makes sunken ships its lair."
5991659916
},
5991759917
{
5991859918
"version_id": "Shield",
59919-
"flavor_text": "Whenever a full moon hangs in the night sky, schools of Jellicent gather near the surface of the sea, waiting for their prey to appear.{{tt|*|Used for both genders in-game}}"
59919+
"flavor_text": "Whenever a full moon hangs in the night sky, schools of Jellicent gather near the surface of the sea, waiting for their prey to appear."
5992059920
}
5992159921
],
5992259922
"594": [
@@ -69886,7 +69886,7 @@
6988669886
},
6988769887
{
6988869888
"version_id": "Violet",
69889-
"flavor_text": "This seems to be the Iron Serpent mentioned in an old book.. The Iron Serpent is said to have turned the land to ash with its lightning."
69889+
"flavor_text": "This seems to be the Iron Serpent mentioned in an old book. The Iron Serpent is said to have turned the land to ash with its lightning."
6989069890
}
6989169891
],
6989269892
"1009": [

0 commit comments

Comments
 (0)