@pkmn/client
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -33,3 +33,3 @@ import { Dex, ID, SideID, GenerationNum, GameType } from '@pkmn/dex-types'; | ||
slot: number; | ||
pokemonid: "p1" | "p2" | "p3" | "p4" | Protocol.PokemonIdent; | ||
pokemonid: Protocol.PokemonIdent | "p2" | "p1" | "p3" | "p4"; | ||
}; | ||
@@ -44,3 +44,3 @@ getSwitchedPokemon(pokemonid: PokemonIdent | SideID, details: PokemonDetails): Pokemon; | ||
getSide(sidename: string): Side; | ||
getPokemon(pokemonid?: PokemonIdent | SideID): Pokemon | null; | ||
getPokemon(pokemonid?: '' | 'null' | PokemonIdent | SideID): Pokemon | null; | ||
checkActive(poke: Pokemon): boolean; | ||
@@ -50,3 +50,3 @@ pokemonAt(side: SideID, slot: number): Protocol.PokemonIdent | undefined; | ||
getPokemonTypeList(ident: PokemonIdent): readonly import("@pkmn/dex-types").TypeName[]; | ||
getPokemonSpeciesForme(ident: PokemonIdent): Protocol.SpeciesName; | ||
getPokemonSpeciesForme(ident: PokemonIdent): import("@pkmn/dex-types").SpeciesName; | ||
currentWeather(): ID; | ||
@@ -53,0 +53,0 @@ reset(): void; |
@@ -118,3 +118,4 @@ "use strict"; | ||
const slot = poke.slot; | ||
poke.healthParse(args[3]); | ||
if (args[3]) | ||
poke.healthParse(args[3]); | ||
poke.removeVolatile('itemremoved'); | ||
@@ -121,0 +122,0 @@ if (args[0] === 'switch') { |
import { StatusName, GenderName, HPColor, BoostsTable, TypeName, ID, Move, Effect } from '@pkmn/dex-types'; | ||
import { DetailedPokemon, EffectName, PokemonDetails, PokemonHealth, PokemonIdent, PokemonSearchID, Protocol, Request } from '@pkmn/protocol'; | ||
import { DetailedPokemon, EffectName, MoveName, PokemonDetails, PokemonHealth, PokemonIdent, PokemonSearchID, Protocol, Request } from '@pkmn/protocol'; | ||
import { Side } from './side'; | ||
@@ -69,3 +69,3 @@ declare type EffectState = any[] & { | ||
rememberMove(moveName: string, pp?: number, recursionSource?: PokemonIdent): void; | ||
useMove(move: Move, target: Pokemon | null, from?: EffectName): void; | ||
useMove(move: Move, target: Pokemon | null, from?: EffectName | MoveName): void; | ||
cantUseMove(effect: Effect, move: Move): void; | ||
@@ -72,0 +72,0 @@ activateAbility(effectOrName: Effect | string, isNotBase?: boolean): void; |
{ | ||
"name": "@pkmn/client", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "build/index.js", | ||
@@ -13,3 +13,3 @@ "types": "build/index.d.ts", | ||
"dependencies": { | ||
"@pkmn/protocol": "^0.0.1", | ||
"@pkmn/protocol": "^0.1.0", | ||
"@pkmn/dex-types": "^0.2.3" | ||
@@ -16,0 +16,0 @@ }, |
@@ -255,3 +255,3 @@ import {Dex, ID, SideID, GenerationNum, GameType, HPColor} from '@pkmn/dex-types'; | ||
getPokemon(pokemonid?: PokemonIdent | SideID) { | ||
getPokemon(pokemonid?: '' | 'null' | PokemonIdent | SideID) { | ||
if (!pokemonid || pokemonid === '??' || pokemonid === 'null' || pokemonid === 'false') { | ||
@@ -258,0 +258,0 @@ return null; |
@@ -134,3 +134,3 @@ import {Protocol, Args, KWArgs, PokemonSearchID} from '@pkmn/protocol'; | ||
const slot = poke.slot; | ||
poke.healthParse(args[3]); | ||
if (args[3]) poke.healthParse(args[3]); | ||
poke.removeVolatile('itemremoved' as ID); | ||
@@ -137,0 +137,0 @@ if (args[0] === 'switch') { |
@@ -385,3 +385,3 @@ import { | ||
useMove(move: Move, target: Pokemon | null, from?: EffectName) { | ||
useMove(move: Move, target: Pokemon | null, from?: EffectName | MoveName) { | ||
const dex = this.side.battle.dex; | ||
@@ -388,0 +388,0 @@ const fromeffect = dex.getEffect(from); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5253
398773
+ Added@pkmn/protocol@0.1.3(transitive)
- Removed@pkmn/protocol@0.0.1(transitive)
- Removed@pkmn/types@0.1.2(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-support@0.5.21(transitive)
Updated@pkmn/protocol@^0.1.0