Fix various bugs
This commit is contained in:
parent
9bbee12fe3
commit
5766e63272
|
@ -105,7 +105,8 @@ export function getLegendaryGachaSpeciesForTimestamp(scene: BattleScene, timesta
|
|||
}
|
||||
|
||||
export function getTypeGachaTypeForTimestamp(scene: BattleScene, timestamp: integer): Type {
|
||||
const types = Utils.getEnumValues(Type).slice(1);
|
||||
const allTypes = Utils.getEnumValues(Type);
|
||||
const types = allTypes.slice(1, allTypes.length - 1);
|
||||
let ret: Type;
|
||||
|
||||
scene.executeWithSeedOffset(() => {
|
||||
|
|
|
@ -2091,11 +2091,11 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||
Utils.executeIf(!isProtected && !chargeEffect, () => applyFilteredMoveAttrs((attr: MoveAttr) => attr instanceof MoveEffectAttr && (attr as MoveEffectAttr).trigger === MoveEffectTrigger.HIT,
|
||||
user, target, this.move.getMove()).then(() => {
|
||||
return Utils.executeIf(!target.isFainted(), () => applyPostDefendAbAttrs(PostDefendAbAttr, target, user, this.move, hitResult).then(() => {
|
||||
if (!user.isPlayer() && this.move instanceof AttackMove)
|
||||
if (!user.isPlayer() && this.move.getMove() instanceof AttackMove)
|
||||
user.scene.applyModifiers(EnemyAttackStatusEffectChanceModifier, false, target);
|
||||
})).then(() => {
|
||||
applyPostAttackAbAttrs(PostAttackAbAttr, user, target, this.move, hitResult).then(() => {
|
||||
if (this.move instanceof AttackMove)
|
||||
if (this.move.getMove() instanceof AttackMove)
|
||||
this.scene.applyModifiers(ContactHeldItemTransferChanceModifier, this.player, user, target.getFieldIndex());
|
||||
resolve();
|
||||
});
|
||||
|
|
|
@ -2038,15 +2038,11 @@ export class PlayerPokemon extends Pokemon {
|
|||
|
||||
fuse(pokemon: PlayerPokemon): Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
if (this.species.speciesId === Species.KYUREM && (pokemon.species.speciesId === Species.RESHIRAM || pokemon.species.speciesId === Species.ZEKROM))
|
||||
this.formIndex = pokemon.species.speciesId === Species.RESHIRAM ? 1 : 2;
|
||||
else {
|
||||
this.fusionSpecies = pokemon.species;
|
||||
this.fusionFormIndex = pokemon.formIndex;
|
||||
this.fusionAbilityIndex = pokemon.abilityIndex;
|
||||
this.fusionShiny = pokemon.shiny;
|
||||
this.fusionGender = pokemon.gender;
|
||||
}
|
||||
this.fusionSpecies = pokemon.species;
|
||||
this.fusionFormIndex = pokemon.formIndex;
|
||||
this.fusionAbilityIndex = pokemon.abilityIndex;
|
||||
this.fusionShiny = pokemon.shiny;
|
||||
this.fusionGender = pokemon.gender;
|
||||
|
||||
this.scene.validateAchv(achvs.SPLICE);
|
||||
this.scene.gameData.gameStats.pokemonFused++;
|
||||
|
|
|
@ -565,7 +565,7 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
|
||||
const natureStatMultiplier = getNatureStatMultiplier(this.pokemon.nature, s);
|
||||
|
||||
const statLabel = addTextObject(this.scene, 27 + 115 * colIndex, 56 + 16 * rowIndex, statName, natureStatMultiplier === 1 ? TextStyle.SUMMARY : natureStatMultiplier > 1 ? TextStyle.SUMMARY_BLUE : TextStyle.SUMMARY_PINK);
|
||||
const statLabel = addTextObject(this.scene, 27 + 115 * colIndex, 56 + 16 * rowIndex, statName, natureStatMultiplier === 1 ? TextStyle.SUMMARY : natureStatMultiplier > 1 ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY_BLUE);
|
||||
statLabel.setOrigin(0.5, 0);
|
||||
statsContainer.add(statLabel);
|
||||
|
||||
|
|
Loading…
Reference in New Issue