Merge pull request #306 from shayebeadling/psycho-shift-warning-fix

Psycho Shift Unreachable Code Warning Fix
This commit is contained in:
Madmadness65 2024-04-26 11:25:12 -05:00 committed by GitHub
commit 2f10f6789c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1020,7 +1020,7 @@ export class PsychoShiftEffectAttr extends MoveEffectAttr {
if (target.status) { if (target.status) {
return false; return false;
} }
if (!target.status || (target.status.effect === statusToApply && move.chance < 0)) if (!target.status || (target.status.effect === statusToApply && move.chance < 0)) {
var statusAfflictResult = target.trySetStatus(statusToApply, true); var statusAfflictResult = target.trySetStatus(statusToApply, true);
if (statusAfflictResult) { if (statusAfflictResult) {
user.scene.queueMessage(getPokemonMessage(user, getStatusEffectHealText(user.status.effect))); user.scene.queueMessage(getPokemonMessage(user, getStatusEffectHealText(user.status.effect)));
@ -1028,6 +1028,7 @@ export class PsychoShiftEffectAttr extends MoveEffectAttr {
user.updateInfo(); user.updateInfo();
} }
return statusAfflictResult; return statusAfflictResult;
}
return false; return false;
} }