mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-08-25 18:44:33 -05:00
Fix crash with TRs (#6330)
This commit is contained in:
400
data/items.js
400
data/items.js
File diff suppressed because it is too large
Load Diff
@@ -411,8 +411,6 @@ export class Item extends BasicEffect implements Readonly<BasicEffect & ItemData
|
||||
readonly isGem: boolean;
|
||||
/** Is this item a Pokeball? */
|
||||
readonly isPokeball: boolean;
|
||||
/** Is this item a Technical Record? */
|
||||
readonly isTR: string;
|
||||
|
||||
constructor(data: AnyObject, ...moreData: (AnyObject | null)[]) {
|
||||
super(data, ...moreData);
|
||||
@@ -434,7 +432,6 @@ export class Item extends BasicEffect implements Readonly<BasicEffect & ItemData
|
||||
this.onPlate = data.onPlate || undefined;
|
||||
this.isGem = !!data.isGem;
|
||||
this.isPokeball = !!data.isPokeball;
|
||||
this.isTR = data.isTR || undefined;
|
||||
|
||||
if (!this.gen) {
|
||||
if (this.num >= 689) {
|
||||
@@ -457,10 +454,6 @@ export class Item extends BasicEffect implements Readonly<BasicEffect & ItemData
|
||||
if (this.onDrive) this.fling = {basePower: 70};
|
||||
if (this.megaStone) this.fling = {basePower: 80};
|
||||
if (this.onMemory) this.fling = {basePower: 50};
|
||||
if (this.isTR) {
|
||||
let move = Dex.getMove(this.isTR);
|
||||
this.fling = {basePower: move.basePower === 0 ? 10 : move.basePower};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -778,7 +778,6 @@ interface ItemData extends EffectData, ItemEventMethods, EventMethods {
|
||||
onDrive?: string
|
||||
onMemory?: string
|
||||
onPlate?: string
|
||||
isTR?: string
|
||||
spritenum?: number
|
||||
zMove?: string | true
|
||||
zMoveFrom?: string
|
||||
|
||||
Reference in New Issue
Block a user