unite-lib 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -152,10 +152,12 @@ declare function getPokemonByName(name: string): Pokemon | undefined;
152
152
  declare function getPokemonByDex(dex: number): Pokemon | undefined;
153
153
  /**
154
154
  * Slug from roster image: "pokemons/roster-venusaur.png" -> "venusaur"
155
+ * Use this slug with getPokemonName(id, locale) for i18n.
155
156
  */
157
+ declare function getPokemonSlug(pokemon: Pokemon): string;
156
158
  declare function getPokemonBySlug(slug: string): Pokemon | undefined;
157
159
  declare function getPokemonsByBattleType(battleType: BattleType): Pokemon[];
158
160
  declare function getPokemonsByTag(tag: Tag): Pokemon[];
159
161
  declare function getActivePokemons(): Pokemon[];
160
162
 
161
- export { BattleType, type GetImageUrlOptions, type Map, type MapResolution, type MapSpawn, type Move, type MoveSlotId, type Neutral, type Pokemon, type PokemonImages, type PokemonStats, Tag, getActivePokemons, getImageUrl, getMapImageUrl, getNeutralById, getNeutralImageUrl, getPokemonByDex, getPokemonByName, getPokemonBySlug, getPokemonsByBattleType, getPokemonsByTag, getSpawnsByMap, maps, moves, neutrals, pokemons, spawns };
163
+ export { BattleType, type GetImageUrlOptions, type Map, type MapResolution, type MapSpawn, type Move, type MoveSlotId, type Neutral, type Pokemon, type PokemonImages, type PokemonStats, Tag, getActivePokemons, getImageUrl, getMapImageUrl, getNeutralById, getNeutralImageUrl, getPokemonByDex, getPokemonByName, getPokemonBySlug, getPokemonSlug, getPokemonsByBattleType, getPokemonsByTag, getSpawnsByMap, maps, moves, neutrals, pokemons, spawns };
package/dist/index.d.ts CHANGED
@@ -152,10 +152,12 @@ declare function getPokemonByName(name: string): Pokemon | undefined;
152
152
  declare function getPokemonByDex(dex: number): Pokemon | undefined;
153
153
  /**
154
154
  * Slug from roster image: "pokemons/roster-venusaur.png" -> "venusaur"
155
+ * Use this slug with getPokemonName(id, locale) for i18n.
155
156
  */
157
+ declare function getPokemonSlug(pokemon: Pokemon): string;
156
158
  declare function getPokemonBySlug(slug: string): Pokemon | undefined;
157
159
  declare function getPokemonsByBattleType(battleType: BattleType): Pokemon[];
158
160
  declare function getPokemonsByTag(tag: Tag): Pokemon[];
159
161
  declare function getActivePokemons(): Pokemon[];
160
162
 
161
- export { BattleType, type GetImageUrlOptions, type Map, type MapResolution, type MapSpawn, type Move, type MoveSlotId, type Neutral, type Pokemon, type PokemonImages, type PokemonStats, Tag, getActivePokemons, getImageUrl, getMapImageUrl, getNeutralById, getNeutralImageUrl, getPokemonByDex, getPokemonByName, getPokemonBySlug, getPokemonsByBattleType, getPokemonsByTag, getSpawnsByMap, maps, moves, neutrals, pokemons, spawns };
163
+ export { BattleType, type GetImageUrlOptions, type Map, type MapResolution, type MapSpawn, type Move, type MoveSlotId, type Neutral, type Pokemon, type PokemonImages, type PokemonStats, Tag, getActivePokemons, getImageUrl, getMapImageUrl, getNeutralById, getNeutralImageUrl, getPokemonByDex, getPokemonByName, getPokemonBySlug, getPokemonSlug, getPokemonsByBattleType, getPokemonsByTag, getSpawnsByMap, maps, moves, neutrals, pokemons, spawns };
@@ -35,6 +35,7 @@ var UniteLib = (() => {
35
35
  getPokemonByName: () => getPokemonByName,
36
36
  getPokemonBySlug: () => getPokemonBySlug,
37
37
  getPokemonName: () => getPokemonName,
38
+ getPokemonSlug: () => getPokemonSlug,
38
39
  getPokemonsByBattleType: () => getPokemonsByBattleType,
39
40
  getPokemonsByTag: () => getPokemonsByTag,
40
41
  getSpawnInfo: () => getSpawnInfo,
@@ -4909,11 +4910,11 @@ var UniteLib = (() => {
4909
4910
  function getPokemonByDex(dex) {
4910
4911
  return pokemons_default.find((p) => p.dex === dex);
4911
4912
  }
4913
+ function getPokemonSlug(pokemon) {
4914
+ return pokemon.images.main.replace(/^pokemons\/roster-/, "").replace(/\.png$/, "");
4915
+ }
4912
4916
  function getPokemonBySlug(slug) {
4913
- return pokemons_default.find((p) => {
4914
- const s = p.images.main.replace(/^pokemons\/roster-/, "").replace(/\.png$/, "");
4915
- return s === slug;
4916
- });
4917
+ return pokemons_default.find((p) => getPokemonSlug(p) === slug);
4917
4918
  }
4918
4919
  function getPokemonsByBattleType(battleType) {
4919
4920
  return pokemons_default.filter((p) => p.battleType === battleType);
@@ -4940,6 +4941,8 @@ var UniteLib = (() => {
4940
4941
  for (const n of neutrals_default) {
4941
4942
  names[n.id] = n.name;
4942
4943
  }
4944
+ names["mega-mewtwo-x"] = "Mega Mewtwo X";
4945
+ names["mega-mewtwo-y"] = "Mega Mewtwo Y";
4943
4946
  Object.assign(names, {
4944
4947
  "spawn.info.groudon.boss": "<p>When defeated, all team members alive receive a <strong>buff</strong> and <strong>15 aeos points</strong>.<br>This buff is <strong>permanent until the holder is KO'd</strong>. When the holder is <strong>KO'd</strong>, the buff <strong>transfers to the killer</strong>.<br>It provides a <strong>goal-scoring speed boost</strong>, a <strong>huge damage boost</strong>, and a <strong>small shield</strong>.<br>Always spawn at 2:00.</p>",
4945
4948
  "spawn.info.bunnelby.initial": "<p>They <strong>spawn at the beginning of the game</strong> and <strong>never respawn</strong> once killed.</p><p>Give 2 points.</p>",
@@ -5074,9 +5077,12 @@ var UniteLib = (() => {
5074
5077
  vaporeon: "\u30B7\u30E3\u30EF\u30FC\u30BA",
5075
5078
  snorlax: "\u30AB\u30D3\u30B4\u30F3",
5076
5079
  zapdos: "\u30B5\u30F3\u30C0\u30FC",
5080
+ moltres: "\u30D5\u30A1\u30A4\u30E4\u30FC",
5077
5081
  dragonite: "\u30AB\u30A4\u30EA\u30E5\u30FC",
5078
5082
  mewtwox: "\u30E1\u30AC\u30DF\u30E5\u30A6\u30C4\u30FCX",
5079
5083
  mewtwoy: "\u30E1\u30AC\u30DF\u30E5\u30A6\u30C4\u30FCY",
5084
+ "mega-mewtwo-x": "\u30E1\u30AC\u30DF\u30E5\u30A6\u30C4\u30FCX",
5085
+ "mega-mewtwo-y": "\u30E1\u30AC\u30DF\u30E5\u30A6\u30C4\u30FCY",
5080
5086
  mew: "\u30DF\u30E5\u30A6",
5081
5087
  azumarill: "\u30DE\u30EA\u30EB\u30EA",
5082
5088
  espeon: "\u30A8\u30FC\u30D5\u30A3",
@@ -5237,9 +5243,12 @@ var UniteLib = (() => {
5237
5243
  vaporeon: "Aquali",
5238
5244
  snorlax: "Ronflex",
5239
5245
  zapdos: "\xC9lecthor",
5246
+ moltres: "Sulfura",
5240
5247
  dragonite: "Dracolosse",
5241
5248
  mewtwox: "M\xE9ga-Mewtwo X",
5242
5249
  mewtwoy: "M\xE9ga-Mewtwo Y",
5250
+ "mega-mewtwo-x": "M\xE9ga-Mewtwo X",
5251
+ "mega-mewtwo-y": "M\xE9ga-Mewtwo Y",
5243
5252
  mew: "Mew",
5244
5253
  azumarill: "Azumarill",
5245
5254
  espeon: "Mentali",
@@ -5400,9 +5409,12 @@ var UniteLib = (() => {
5400
5409
  vaporeon: "Vaporeon",
5401
5410
  snorlax: "Snorlax",
5402
5411
  zapdos: "Zapdos",
5412
+ moltres: "Moltres",
5403
5413
  dragonite: "Dragonite",
5404
5414
  mewtwox: "Mega-Mewtwo X",
5405
5415
  mewtwoy: "Mega-Mewtwo Y",
5416
+ "mega-mewtwo-x": "Mega-Mewtwo X",
5417
+ "mega-mewtwo-y": "Mega-Mewtwo Y",
5406
5418
  mew: "Mew",
5407
5419
  azumarill: "Azumarill",
5408
5420
  espeon: "Espeon",