mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Fix effect spore, tera blast distribution, and IVs shown on catch
This commit is contained in:
parent
10169382d9
commit
53cae9e135
@ -679,6 +679,19 @@ export class PostDefendContactApplyStatusEffectAbAttr extends PostDefendAbAttr {
|
||||
}
|
||||
}
|
||||
|
||||
export class EffectSporeAbAttr extends PostDefendContactApplyStatusEffectAbAttr {
|
||||
constructor() {
|
||||
super(10, StatusEffect.POISON, StatusEffect.PARALYSIS, StatusEffect.SLEEP);
|
||||
}
|
||||
|
||||
applyPostDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
|
||||
if (attacker.hasAbility(Abilities.OVERCOAT) || attacker.isOfType(Type.GRASS)) {
|
||||
return false;
|
||||
}
|
||||
return super.applyPostDefend(pokemon, passive, attacker, move, hitResult, args);
|
||||
}
|
||||
}
|
||||
|
||||
export class PostDefendContactApplyTagChanceAbAttr extends PostDefendAbAttr {
|
||||
private chance: integer;
|
||||
private tagType: BattlerTagType;
|
||||
@ -2572,7 +2585,7 @@ export function initAbilities() {
|
||||
.attr(TypeImmunityAbAttr, Type.GROUND, (pokemon: Pokemon) => !pokemon.getTag(BattlerTagType.IGNORE_FLYING) && !pokemon.scene.arena.getTag(ArenaTagType.GRAVITY) && !pokemon.getTag(BattlerTagType.GROUNDED))
|
||||
.ignorable(),
|
||||
new Ability(Abilities.EFFECT_SPORE, 3)
|
||||
.attr(PostDefendContactApplyStatusEffectAbAttr, 10, StatusEffect.POISON, StatusEffect.PARALYSIS, StatusEffect.SLEEP),
|
||||
.attr(EffectSporeAbAttr),
|
||||
new Ability(Abilities.SYNCHRONIZE, 3)
|
||||
.attr(SyncEncounterNatureAbAttr)
|
||||
.unimplemented(),
|
||||
|
@ -4095,7 +4095,7 @@ export class AttemptCapturePhase extends PokemonPhase {
|
||||
|
||||
this.scene.pokemonInfoContainer.show(pokemon, true);
|
||||
|
||||
this.scene.gameData.updateSpeciesDexIvs(pokemon.species.speciesId, pokemon.ivs);
|
||||
this.scene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs);
|
||||
|
||||
this.scene.ui.showText(i18next.t('menu:pokemonCaught', { pokemonName: pokemon.name }), null, () => {
|
||||
const end = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user