adding all moves to smeargle (broken)
This commit is contained in:
parent
c923b21a78
commit
c9cbcbf11d
2
dist/app.css
vendored
2
dist/app.css
vendored
File diff suppressed because one or more lines are too long
2
dist/db/order.json
vendored
2
dist/db/order.json
vendored
File diff suppressed because one or more lines are too long
2
dist/db/pokemon/SMEARGLE.json
vendored
2
dist/db/pokemon/SMEARGLE.json
vendored
File diff suppressed because one or more lines are too long
2
dist/main-bundle.js
vendored
2
dist/main-bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -10,6 +10,7 @@ import { ILeaguePokemon, League, MaxCpByLeague } from 'app/models/League';
|
|||||||
import { Grade, IMaxStats, IStats } from 'app/models/Pokemon';
|
import { Grade, IMaxStats, IStats } from 'app/models/Pokemon';
|
||||||
|
|
||||||
import * as PVPogoProtos from 'common/models/PVPogoProtos';
|
import * as PVPogoProtos from 'common/models/PVPogoProtos';
|
||||||
|
import { POGOProtos } from 'externals/generated/PVPogoProtos';
|
||||||
|
|
||||||
type ICpAndTotalFound = Record<number, Array<IStats>>;
|
type ICpAndTotalFound = Record<number, Array<IStats>>;
|
||||||
interface IStatsDistribution {
|
interface IStatsDistribution {
|
||||||
@ -36,6 +37,8 @@ fs.mkdirSync(outPokemonPath, { recursive: true });
|
|||||||
const Pokemon = result.flatOrderedPokemon;
|
const Pokemon = result.flatOrderedPokemon;
|
||||||
const attackTypeEffectiveness = result.pokemonTypeEffectiveness;
|
const attackTypeEffectiveness = result.pokemonTypeEffectiveness;
|
||||||
const combatMoves = result.combatMoves;
|
const combatMoves = result.combatMoves;
|
||||||
|
const quickMoveIds = result.quickMoveIds;
|
||||||
|
const chargeMoveIds = result.quickMoveIds;
|
||||||
|
|
||||||
Pokemon.forEach((mon) => {
|
Pokemon.forEach((mon) => {
|
||||||
const baseHp = mon.stats.baseStamina;
|
const baseHp = mon.stats.baseStamina;
|
||||||
@ -109,6 +112,12 @@ fs.mkdirSync(outPokemonPath, { recursive: true });
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// SMEARGLE is a special case and gets all the moves (set on the server, not the client)
|
||||||
|
if (mon.id === POGOProtos.Enums.PokemonId.SMEARGLE) {
|
||||||
|
mon.moves.quick = Array.from(quickMoveIds).map((id) => ({ id, isLegacy: false }));
|
||||||
|
mon.moves.cinematic = Array.from(chargeMoveIds).map((id) => ({ id, isLegacy: false }));
|
||||||
|
}
|
||||||
|
|
||||||
maxPossibleStats.baseStamina = Math.max(baseHp, maxPossibleStats.baseStamina);
|
maxPossibleStats.baseStamina = Math.max(baseHp, maxPossibleStats.baseStamina);
|
||||||
maxPossibleStats.baseAttack = Math.max(baseAtk, maxPossibleStats.baseAttack);
|
maxPossibleStats.baseAttack = Math.max(baseAtk, maxPossibleStats.baseAttack);
|
||||||
maxPossibleStats.baseDefense = Math.max(baseDef, maxPossibleStats.baseDefense);
|
maxPossibleStats.baseDefense = Math.max(baseDef, maxPossibleStats.baseDefense);
|
||||||
|
|||||||
@ -23,6 +23,8 @@ export const parseGameMaster = async () => {
|
|||||||
const pokemonTypeWeaknesses : Map<PVPogoProtos.PokemonType, Map<PVPogoProtos.PokemonType, TypeEffectiveness>> = new Map();
|
const pokemonTypeWeaknesses : Map<PVPogoProtos.PokemonType, Map<PVPogoProtos.PokemonType, TypeEffectiveness>> = new Map();
|
||||||
const pokemonTypes : Map<PVPogoProtos.PokemonType, Array<number>> = new Map();
|
const pokemonTypes : Map<PVPogoProtos.PokemonType, Array<number>> = new Map();
|
||||||
const combatMoves : CombatMoveStats = new Map();
|
const combatMoves : CombatMoveStats = new Map();
|
||||||
|
const quickMoveIds : Set<POGOProtos.Enums.PokemonMove> = new Set();
|
||||||
|
const chargeMoveIds : Set<POGOProtos.Enums.PokemonMove> = new Set();
|
||||||
|
|
||||||
const pokemonBaseStamina : Array<ICalculateRelativeStats> = [];
|
const pokemonBaseStamina : Array<ICalculateRelativeStats> = [];
|
||||||
const pokemonBaseAttack : Array<ICalculateRelativeStats> = [];
|
const pokemonBaseAttack : Array<ICalculateRelativeStats> = [];
|
||||||
@ -146,6 +148,11 @@ export const parseGameMaster = async () => {
|
|||||||
// COMBAT MOVES
|
// COMBAT MOVES
|
||||||
} else if (entry.template_id.indexOf('COMBAT_V') === 0 && entry.combat_move && entry.combat_move.unique_id) {
|
} else if (entry.template_id.indexOf('COMBAT_V') === 0 && entry.combat_move && entry.combat_move.unique_id) {
|
||||||
const combatMoveId = entry.combat_move.unique_id || PVPogoProtos.PokemonMove.MOVE_UNSET;
|
const combatMoveId = entry.combat_move.unique_id || PVPogoProtos.PokemonMove.MOVE_UNSET;
|
||||||
|
const isFastMove = (moveId : string) => {
|
||||||
|
const fastMove = '_FAST';
|
||||||
|
const fastMoveIndex = moveId.lastIndexOf(fastMove);
|
||||||
|
return fastMoveIndex > -1 && fastMoveIndex + fastMove.length === moveId.length;
|
||||||
|
}
|
||||||
const formatMoveName = (moveId : string) => {
|
const formatMoveName = (moveId : string) => {
|
||||||
let moveName = moveId;
|
let moveName = moveId;
|
||||||
|
|
||||||
@ -157,9 +164,9 @@ export const parseGameMaster = async () => {
|
|||||||
moveName = moveName.substr(0, blastoiseMoveIndex);
|
moveName = moveName.substr(0, blastoiseMoveIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
const fastMove = '_FAST';
|
if (isFastMove(moveName)) {
|
||||||
const fastMoveIndex = moveName.lastIndexOf(fastMove);
|
const fastMove = '_FAST';
|
||||||
if (fastMoveIndex > -1 && fastMoveIndex + fastMove.length === moveName.length) {
|
const fastMoveIndex = moveName.lastIndexOf(fastMove);
|
||||||
moveName = moveName.substr(0, fastMoveIndex);
|
moveName = moveName.substr(0, fastMoveIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +178,17 @@ export const parseGameMaster = async () => {
|
|||||||
type: entry.combat_move.type || PVPogoProtos.PokemonType.POKEMON_TYPE_NONE,
|
type: entry.combat_move.type || PVPogoProtos.PokemonType.POKEMON_TYPE_NONE,
|
||||||
power: entry.combat_move.power || 0,
|
power: entry.combat_move.power || 0,
|
||||||
energyDelta: entry.combat_move.energy_delta || 0,
|
energyDelta: entry.combat_move.energy_delta || 0,
|
||||||
|
// TODO: features like those of ominous wind...
|
||||||
|
// "accuracy_chance": 1,
|
||||||
|
// "critical_chance": 0.05000000074505806,
|
||||||
|
// "stamina_loss_scalar": 0.05999999865889549,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (isFastMove(PVPogoProtos.PokemonMove[combatMoveId])) {
|
||||||
|
quickMoveIds.add(combatMoveId);
|
||||||
|
} else {
|
||||||
|
chargeMoveIds.add(combatMoveId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,5 +327,7 @@ export const parseGameMaster = async () => {
|
|||||||
flatOrderedPokemon,
|
flatOrderedPokemon,
|
||||||
pokemonTypeEffectiveness,
|
pokemonTypeEffectiveness,
|
||||||
combatMoves,
|
combatMoves,
|
||||||
|
quickMoveIds,
|
||||||
|
chargeMoveIds,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -41,6 +41,8 @@ interface IRowFactory {
|
|||||||
style : React.CSSProperties;
|
style : React.CSSProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const MAXIMUM_TABLE_HEIGHT = 350;
|
||||||
|
|
||||||
export class MovesDropdown extends React.Component<IMovesDropdownProps, IState> {
|
export class MovesDropdown extends React.Component<IMovesDropdownProps, IState> {
|
||||||
|
|
||||||
public static getDerivedStateFromProps(nextProps : IMovesDropdownProps, previousState : IState) {
|
public static getDerivedStateFromProps(nextProps : IMovesDropdownProps, previousState : IState) {
|
||||||
@ -99,7 +101,7 @@ export class MovesDropdown extends React.Component<IMovesDropdownProps, IState>
|
|||||||
this.setState({
|
this.setState({
|
||||||
dimensions: {
|
dimensions: {
|
||||||
...contentRect.bounds,
|
...contentRect.bounds,
|
||||||
height: Math.min(450, contentRect.bounds.height),
|
height: Math.min(MAXIMUM_TABLE_HEIGHT, contentRect.bounds.height),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
width: map-get($container-width, 'desktop');
|
width: map-get($container-width, 'desktop');
|
||||||
max-height: 450px + 8px; // +4 for top/bottom border offset causing issue with .nes-container
|
max-height: 350px + 8px; // +4 for top/bottom border offset causing issue with .nes-container
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
top: 25%;
|
top: 25%;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user