mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-27 01:06:09 +00:00
[Move] Psycho Shift treats Comatose as Sleep (#1780)
* comotose + psycho_shift * condensed conditional for psycho shift --------- Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
This commit is contained in:
parent
2900f22289
commit
64ca6dd827
@ -1917,7 +1917,7 @@ export class PsychoShiftEffectAttr extends MoveEffectAttr {
|
||||
}
|
||||
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
const statusToApply: StatusEffect = user.status?.effect;
|
||||
const statusToApply: StatusEffect = user.status?.effect ?? (user.hasAbility(Abilities.COMATOSE) ? StatusEffect.SLEEP : undefined);
|
||||
|
||||
if (target.status) {
|
||||
return false;
|
||||
@ -1925,7 +1925,9 @@ export class PsychoShiftEffectAttr extends MoveEffectAttr {
|
||||
if (!target.status || (target.status.effect === statusToApply && move.chance < 0)) {
|
||||
const statusAfflictResult = target.trySetStatus(statusToApply, true, user);
|
||||
if (statusAfflictResult) {
|
||||
user.scene.queueMessage(getStatusEffectHealText(user.status.effect, getPokemonNameWithAffix(user)));
|
||||
if (user.status) {
|
||||
user.scene.queueMessage(getStatusEffectHealText(user.status.effect, getPokemonNameWithAffix(user)));
|
||||
}
|
||||
user.resetStatus();
|
||||
user.updateInfo();
|
||||
}
|
||||
@ -7033,12 +7035,13 @@ export function initMoves() {
|
||||
.unimplemented(),
|
||||
new StatusMove(Moves.PSYCHO_SHIFT, Type.PSYCHIC, 100, 10, -1, 0, 4)
|
||||
.attr(PsychoShiftEffectAttr)
|
||||
.condition((user, target, move) => (user.status?.effect === StatusEffect.BURN
|
||||
|| user.status?.effect === StatusEffect.POISON
|
||||
|| user.status?.effect === StatusEffect.TOXIC
|
||||
|| user.status?.effect === StatusEffect.PARALYSIS
|
||||
|| user.status?.effect === StatusEffect.SLEEP)
|
||||
&& target.canSetStatus(user.status?.effect, false, false, user)
|
||||
.condition((user, target, move) => {
|
||||
let statusToApply = user.hasAbility(Abilities.COMATOSE) ? StatusEffect.SLEEP : undefined;
|
||||
if (user.status?.effect && isNonVolatileStatusEffect(user.status.effect)) {
|
||||
statusToApply = user.status.effect;
|
||||
}
|
||||
return statusToApply && target.canSetStatus(statusToApply, false, false, user);
|
||||
}
|
||||
),
|
||||
new AttackMove(Moves.TRUMP_CARD, Type.NORMAL, MoveCategory.SPECIAL, -1, -1, 5, -1, 0, 4)
|
||||
.makesContact()
|
||||
|
Loading…
Reference in New Issue
Block a user