Skip to content

Commit

Permalink
Merge pull request #83 from WatWowMap/updates
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
TurtIeSocks committed Jul 6, 2023
2 parents bcfa947 + 7f1bc6b commit c98765c
Show file tree
Hide file tree
Showing 15 changed files with 320 additions and 326 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pogo-data-generator",
"version": "1.12.0",
"version": "1.13.0",
"description": "Pokemon GO project data generator",
"author": "TurtIeSocks",
"license": "Apache-2.0",
Expand Down Expand Up @@ -36,8 +36,8 @@
"url": "https://github.com/WatWowMap/Pogo-Data-Generator/issues"
},
"dependencies": {
"node-fetch": "2.6.7",
"pogo-protos": "npm:@na-ji/pogo-protos@<3.0.0"
"@na-ji/pogo-protos": "<3.0.0",
"node-fetch": "2.6.7"
},
"engines": {
"node": ">=16.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Invasion.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Rpc } from 'pogo-protos'
import { Rpc } from '@na-ji/pogo-protos'

import { AllInvasions } from '../typings/dataTypes'
import { Options } from '../typings/inputs'
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Item.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Rpc } from 'pogo-protos'
import { Rpc } from '@na-ji/pogo-protos'

import Masterfile from './Masterfile'
import { AllItems } from '../typings/dataTypes'
Expand Down
18 changes: 10 additions & 8 deletions src/classes/Move.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Rpc } from 'pogo-protos'
import { Rpc } from '@na-ji/pogo-protos'

import { NiaMfObj } from '../typings/general'
import { AllMoves } from '../typings/dataTypes'
Expand All @@ -16,7 +16,7 @@ export default class Moves extends Masterfile {
protoMoves() {
Object.entries(Rpc.HoloPokemonMove).forEach((proto) => {
const [name, id] = proto
if (!this.parsedMoves[id]) {
if (!this.parsedMoves[id] && (id || id === 0)) {
this.parsedMoves[id] = {
moveId: +id,
moveName: this.capitalize(name.replace('_FAST', '')),
Expand All @@ -35,12 +35,14 @@ export default class Moves extends Masterfile {
try {
const id: number =
Rpc.HoloPokemonMove[templateId.substring(18) as MoveProto]
this.parsedMoves[id] = {
moveId: id,
moveName: this.capitalize(combatMove.uniqueId.replace('_FAST', '')),
proto: templateId.substring(18),
type: Rpc.HoloPokemonType[combatMove.type as TypeProto],
power: combatMove.power,
if (id || id === 0) {
this.parsedMoves[id] = {
moveId: id,
moveName: this.capitalize(combatMove.uniqueId.replace('_FAST', '')),
proto: templateId.substring(18),
type: Rpc.HoloPokemonType[combatMove.type as TypeProto],
power: combatMove.power,
}
}
} catch (e) {
console.warn(e, '\n', object)
Expand Down
6 changes: 3 additions & 3 deletions src/classes/PokeApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Rpc } from 'pogo-protos'
import { Rpc } from '@na-ji/pogo-protos'
import Masterfile from './Masterfile'
import {
AllMoves,
Expand Down Expand Up @@ -254,7 +254,7 @@ export default class PokeApi extends Masterfile {
.replace(/-/g, '_')}_FAST` as MoveProto
],
)
.filter((move) => this.moveReference[move]?.power)
.filter((move) => move && this.moveReference[move]?.power)
.sort((a, b) => a - b),
chargedMoves: statsData.moves
.map(
Expand All @@ -263,7 +263,7 @@ export default class PokeApi extends Masterfile {
move.move.name.toUpperCase().replace(/-/g, '_') as MoveProto
],
)
.filter((move) => this.moveReference[move]?.power)
.filter((move) => move && this.moveReference[move]?.power)
.sort((a, b) => a - b),
attack: this.inconsistentStats[id]
? this.inconsistentStats[id].attack || nerfCheck.attack
Expand Down
Loading

0 comments on commit c98765c

Please sign in to comment.