Fix some minor bugs
This commit is contained in:
1 parent
2c4a90bf1c
commit
5c7b2ccecc
2 files changed
+8
-5
No files matched your search
@@ -255,7 +255,7 @@ export class MapModifier extends PersistentModifier {
|
||||
return true;
|
||||
}
|
||||
|
||||
getmaxStackCount(): integer {
|
||||
getMaxStackCount(): integer {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -426,7 +426,7 @@ export class SurviveDamageModifier extends PokemonHeldItemModifier {
|
||||
return true;
|
||||
}
|
||||
|
||||
getmaxStackCount(): integer {
|
||||
getMaxStackCount(): integer {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
@@ -1003,10 +1003,13 @@ export abstract class HeldItemTransferModifier extends PokemonHeldItemModifier {
|
||||
|
||||
apply(args: any[]): boolean {
|
||||
const pokemon = args[0] as Pokemon;
|
||||
const targetPokemon = pokemon.getOpponent(args.length > 1 ? args[1] as integer : !pokemon.scene.currentBattle.double ? 0 : Utils.randInt(2));
|
||||
if (!targetPokemon)
|
||||
const opponents = pokemon.getOpponents();
|
||||
|
||||
if (!opponents.length)
|
||||
return false;
|
||||
|
||||
const targetPokemon = opponents[Utils.randInt(opponents.length)];
|
||||
|
||||
const transferredItemCount = this.getTransferredItemCount();
|
||||
if (!transferredItemCount)
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user