Fix status effects from moves always overriding
parent
79d0862d3f
commit
d6617957be
|
@ -1188,8 +1188,12 @@ export class StatusEffectAttr extends MoveEffectAttr {
|
||||||
const statusCheck = move.chance < 0 || move.chance === 100 || Utils.randInt(100) < move.chance;
|
const statusCheck = move.chance < 0 || move.chance === 100 || Utils.randInt(100) < move.chance;
|
||||||
if (statusCheck) {
|
if (statusCheck) {
|
||||||
const pokemon = this.selfTarget ? user : target;
|
const pokemon = this.selfTarget ? user : target;
|
||||||
if (pokemon.status)
|
if (pokemon.status) {
|
||||||
pokemon.resetStatus();
|
if (this.overrideStatus)
|
||||||
|
pokemon.resetStatus();
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!pokemon.status || (pokemon.status.effect === this.effect && move.chance < 0)) {
|
if (!pokemon.status || (pokemon.status.effect === this.effect && move.chance < 0)) {
|
||||||
user.scene.unshiftPhase(new ObtainStatusEffectPhase(user.scene, pokemon.getBattlerIndex(), this.effect, this.cureTurn));
|
user.scene.unshiftPhase(new ObtainStatusEffectPhase(user.scene, pokemon.getBattlerIndex(), this.effect, this.cureTurn));
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue