mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-25 01:14:02 -05:00
Update Max Guard
Max Guard doesn't block literally everything, just most things.
This commit is contained in:
parent
14a252c208
commit
bfa7ff2d31
|
|
@ -11335,7 +11335,7 @@ let BattleMovedex = {
|
|||
accuracy: true,
|
||||
basePower: 0,
|
||||
category: "Status",
|
||||
desc: "The user is protected from all attacks made by other Pokemon during this turn. This move has a 1/X chance of being successful, where X starts at 1 and triples each time this move is successfully used. X resets to 1 if this move fails, if the user's last move used is not Baneful Bunker, Detect, Endure, King's Shield, Obstruct, Protect, Quick Guard, Spiky Shield, or Wide Guard, or if it was one of those moves and the user's protection was broken. Fails if the user moves last this turn.",
|
||||
desc: "The user is protected from nearly all attacks made by other Pokemon during this turn. This move has a 1/X chance of being successful, where X starts at 1 and triples each time this move is successfully used. X resets to 1 if this move fails, if the user's last move used is not Baneful Bunker, Detect, Endure, King's Shield, Obstruct, Protect, Quick Guard, Spiky Shield, or Wide Guard, or if it was one of those moves and the user's protection was broken. Fails if the user moves last this turn.",
|
||||
shortDesc: "Prevents all moves from affecting the user this turn.",
|
||||
id: "maxguard",
|
||||
isViable: true,
|
||||
|
|
@ -11359,6 +11359,14 @@ let BattleMovedex = {
|
|||
},
|
||||
onTryHitPriority: 3,
|
||||
onTryHit(target, source, move) {
|
||||
/** moves blocked by Max Guard but not Protect */
|
||||
const overrideBypassProtect = [
|
||||
'block', 'flowershield', 'gearup', 'magneticflux', 'phantomforce', 'psychup', 'teatime', 'transform',
|
||||
];
|
||||
const blockedByMaxGuard = move.flags['protect'] || move.isZ || move.isMax || overrideBypassProtect.includes(move.id);
|
||||
if (!blockedByMaxGuard) {
|
||||
return;
|
||||
}
|
||||
this.add('-activate', target, 'move: Max Guard');
|
||||
let lockedmove = source.getVolatile('lockedmove');
|
||||
if (lockedmove) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user