Fix some minor bugs
This commit is contained in:
parent
2c4a90bf1c
commit
5c7b2ccecc
|
@ -9,7 +9,7 @@ import { BerryModifier, ContactHeldItemTransferChanceModifier, ExpBalanceModifie
|
|||
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
|
||||
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballName, getPokeballTintColor, PokeballType } from "./data/pokeball";
|
||||
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
|
||||
import { Status, StatusEffect, getStatusEffectActivationText, getStatusEffectCatchRateMultiplier, getStatusEffectHealText, getStatusEffectObtainText, getStatusEffectOverlapText } from "./data/status-effect";
|
||||
import { StatusEffect, getStatusEffectActivationText, getStatusEffectCatchRateMultiplier, getStatusEffectHealText, getStatusEffectObtainText, getStatusEffectOverlapText } from "./data/status-effect";
|
||||
import { SummaryUiMode } from "./ui/summary-ui-handler";
|
||||
import EvolutionSceneHandler from "./ui/evolution-scene-handler";
|
||||
import { EvolutionPhase } from "./evolution-phase";
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue