Skip to content

Commit 36bcf81

Browse files
committed
IV: Fix Ninetales (Alola) evolution property in pokemon.json
Also fixed PokemonTextField.tsx
1 parent 125077c commit 36bcf81

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

scripts/sync.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,12 @@ async function syncPokemon() {
197197
const en2ja = jaJson.translation.pokemons;
198198
const enNames = Object.keys(jaJson.translation.pokemons);
199199
for (const enname of Object.keys(jaJson.translation.pokemons)) {
200-
ja2en[jaJson.translation.pokemons[enname]] = enname;
200+
const nameJa = jaJson.translation.pokemons[enname];
201+
const nameJa2 = nameJa
202+
.replace(" ", "")
203+
.replace("(アローラ)", "(アローラのすがた)");
204+
ja2en[nameJa] = enname;
205+
ja2en[nameJa2] = enname;
201206
}
202207

203208
// Update each Pokemon

src/data/pokemon.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,9 @@
748748
"frequency": 5600,
749749
"ingRatio": 23,
750750
"skillRatio": 2.8,
751-
"evolutionCount": -1,
752-
"evolutionLeft": 2,
751+
"ancestor": 37,
752+
"evolutionCount": 0,
753+
"evolutionLeft": 1,
753754
"isFullyEvolved": false,
754755
"carryLimit": 10,
755756
"ing1": {
@@ -813,9 +814,10 @@
813814
"frequency": 2900,
814815
"ingRatio": 23.1,
815816
"skillRatio": 2.8,
816-
"evolutionCount": -1,
817-
"evolutionLeft": 2,
818-
"isFullyEvolved": false,
817+
"ancestor": 37,
818+
"evolutionCount": 1,
819+
"evolutionLeft": 0,
820+
"isFullyEvolved": true,
819821
"carryLimit": 20,
820822
"ing1": {
821823
"name": "soy",

src/ui/IvCalc/PokemonTextField.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { MainSkillName } from '../../util/MainSkill';
1616
export interface PokemonOption {
1717
id: number;
1818
idForm: number;
19+
form?: string;
1920
name: string;
2021
localName: string;
2122
sleepType: SleepType;
@@ -42,6 +43,7 @@ const PokemonTextField = React.memo(({value, fixMode, onChange}: {
4243
.map((pokemon) => ({
4344
id: pokemon.id,
4445
idForm: new PokemonIv(pokemon.name).idForm,
46+
form: pokemon.form,
4547
name: pokemon.name,
4648
localName: t(`pokemons.${pokemon.name}`),
4749
sleepType: pokemon.sleepType,
@@ -76,7 +78,7 @@ const PokemonTextField = React.memo(({value, fixMode, onChange}: {
7678

7779
return (<div>
7880
{fixMode ? <>{selectedOption.localName}</> :
79-
<TextLikeButton onClick={onInputClick} style={{width: '8rem', fontSize: '0.9rem'}}
81+
<TextLikeButton onClick={onInputClick} style={{width: '10.2rem', fontSize: '0.9rem'}}
8082
className={open ? 'focused' : ''}>
8183
{selectedOption.localName}
8284
</TextLikeButton>}
@@ -116,7 +118,9 @@ const EvolveButton = React.memo(({selectedOption, onChange}: {
116118
// setup menu item
117119
const evolveMenuItems = [];
118120
const pokemonsInEvoLine = pokemons
119-
.filter(x => x.ancestor === selectedOption.ancestor)
121+
.filter(x => x.ancestor === selectedOption.ancestor &&
122+
x.form === selectedOption.form
123+
)
120124
.sort((a, b) => a.id === selectedOption.ancestor ? -1 : a.id - b.id);
121125
for (const p of pokemonsInEvoLine) {
122126
evolveMenuItems.push(<MenuItem key={p.id} value={p.name}

0 commit comments

Comments
 (0)