Fix transform and imposter not copying ability
This commit is contained in:
parent
705ba0659e
commit
75ce0e8f73
|
@ -1111,6 +1111,7 @@ export class PostSummonTransformAbAttr extends PostSummonAbAttr {
|
|||
|
||||
pokemon.summonData.speciesForm = target.getSpeciesForm();
|
||||
pokemon.summonData.fusionSpeciesForm = target.getFusionSpeciesForm();
|
||||
pokemon.summonData.ability = target.getAbility().id;
|
||||
pokemon.summonData.gender = target.getGender();
|
||||
pokemon.summonData.fusionGender = target.getFusionGender();
|
||||
pokemon.summonData.stats = [ pokemon.stats[Stat.HP] ].concat(target.stats.slice(1));
|
||||
|
|
|
@ -3028,6 +3028,7 @@ export class TransformAttr extends MoveEffectAttr {
|
|||
|
||||
user.summonData.speciesForm = target.getSpeciesForm();
|
||||
user.summonData.fusionSpeciesForm = target.getFusionSpeciesForm();
|
||||
user.summonData.ability = target.getAbility().id;
|
||||
user.summonData.gender = target.getGender();
|
||||
user.summonData.fusionGender = target.getFusionGender();
|
||||
user.summonData.stats = [ user.stats[Stat.HP] ].concat(target.stats.slice(1));
|
||||
|
|
|
@ -716,8 +716,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
if (OPP_ABILITY_OVERRIDE && !this.isPlayer())
|
||||
return allAbilities[OPP_ABILITY_OVERRIDE];
|
||||
if (this.isFusion())
|
||||
return allAbilities[this.getFusionSpeciesForm().getAbility(this.fusionAbilityIndex)];
|
||||
let abilityId = this.getSpeciesForm().getAbility(this.abilityIndex);
|
||||
return allAbilities[this.getFusionSpeciesForm(ignoreOverride).getAbility(this.fusionAbilityIndex)];
|
||||
let abilityId = this.getSpeciesForm(ignoreOverride).getAbility(this.abilityIndex);
|
||||
if (abilityId === Abilities.NONE)
|
||||
abilityId = this.species.ability1;
|
||||
return allAbilities[abilityId];
|
||||
|
|
Loading…
Reference in New Issue