mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Fix doodle with a fainted ally in doubles
This commit is contained in:
parent
3233b8b7cb
commit
c05182b181
@ -2957,7 +2957,7 @@ export class AbilityCopyAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
user.scene.queueMessage(getPokemonMessage(user, ` copied the `) + getPokemonMessage(target, `'s\n${allAbilities[target.getAbility().id].name}!`));
|
user.scene.queueMessage(getPokemonMessage(user, ` copied the `) + getPokemonMessage(target, `'s\n${allAbilities[target.getAbility().id].name}!`));
|
||||||
|
|
||||||
if (this.copyToPartner && user.scene.currentBattle?.double) {
|
if (this.copyToPartner && user.scene.currentBattle?.double && user.getAlly().hp) {
|
||||||
user.getAlly().summonData.ability = target.getAbility().id;
|
user.getAlly().summonData.ability = target.getAbility().id;
|
||||||
user.getAlly().scene.queueMessage(getPokemonMessage(user.getAlly(), ` copied the `) + getPokemonMessage(target, `'s\n${allAbilities[target.getAbility().id].name}!`));
|
user.getAlly().scene.queueMessage(getPokemonMessage(user.getAlly(), ` copied the `) + getPokemonMessage(target, `'s\n${allAbilities[target.getAbility().id].name}!`));
|
||||||
}
|
}
|
||||||
@ -2969,7 +2969,7 @@ export class AbilityCopyAttr extends MoveEffectAttr {
|
|||||||
return (user, target, move) => {
|
return (user, target, move) => {
|
||||||
let ret = !target.getAbility().hasAttr(UncopiableAbilityAbAttr) && !user.getAbility().hasAttr(UnsuppressableAbilityAbAttr);
|
let ret = !target.getAbility().hasAttr(UncopiableAbilityAbAttr) && !user.getAbility().hasAttr(UnsuppressableAbilityAbAttr);
|
||||||
if (this.copyToPartner && user.scene.currentBattle?.double)
|
if (this.copyToPartner && user.scene.currentBattle?.double)
|
||||||
ret = ret && !user.getAlly().getAbility().hasAttr(UnsuppressableAbilityAbAttr);
|
ret = ret && (!user.getAlly().hp || !user.getAlly().getAbility().hasAttr(UnsuppressableAbilityAbAttr));
|
||||||
else
|
else
|
||||||
ret = ret && user.getAbility().id !== target.getAbility().id;
|
ret = ret && user.getAbility().id !== target.getAbility().id;
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user