pvpokemon/src/ts/app/models/League.ts
2019-02-18 16:06:20 -05:00

61 lines
1.4 KiB
TypeScript

import { IPokemon, IStats } from './Pokemon';
export enum League {
GREAT = 0,
ULTRA = 1,
MASTER = 2,
CUSTOM = 3,
}
export const LeagueLabels : Array<{ id : League, label : string }> = [{
id: League.GREAT,
label: 'Great'
}, {
id: League.ULTRA,
label: 'Ultra'
}, {
id: League.MASTER,
label: 'Master'
}, {
id: League.CUSTOM,
label: 'Custom'
}];
export interface IMaxCpByLeague {
[ League.GREAT ] : number;
[ League.ULTRA ] : number;
[ League.MASTER ] : number;
[ League.CUSTOM ] : number;
}
export const MaxCpByLeague : IMaxCpByLeague = {
[ League.GREAT ]: 1500,
[ League.ULTRA ]: 2500,
[ League.MASTER ]: Infinity,
[ League.CUSTOM ]: Infinity,
};
interface IBestWorstStatSpread {
best : number;
worst : number;
}
export interface IBestWorstStats {
stamina : IBestWorstStatSpread;
attack : IBestWorstStatSpread;
defense : IBestWorstStatSpread;
}
export interface ILeaguePokemon extends IPokemon {
statMax : {
[ League.GREAT ] : IBestWorstStats;
[ League.ULTRA ] : IBestWorstStats;
[ League.MASTER ] : IBestWorstStats;
[ League.CUSTOM ] : IBestWorstStats;
};
pvp : {
[ League.GREAT ] : Array<IStats>;
[ League.ULTRA ] : Array<IStats>;
[ League.MASTER ] : Array<IStats>;
[ League.CUSTOM ] : Array<IStats>;
};
}