Skip to content

Commit bfa7ff2

Browse files
committed
Update Max Guard
Max Guard doesn't block literally everything, just most things.
1 parent 14a252c commit bfa7ff2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

data/moves.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -11335,7 +11335,7 @@ let BattleMovedex = {
1133511335
accuracy: true,
1133611336
basePower: 0,
1133711337
category: "Status",
11338-
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.",
11338+
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.",
1133911339
shortDesc: "Prevents all moves from affecting the user this turn.",
1134011340
id: "maxguard",
1134111341
isViable: true,
@@ -11359,6 +11359,14 @@ let BattleMovedex = {
1135911359
},
1136011360
onTryHitPriority: 3,
1136111361
onTryHit(target, source, move) {
11362+
/** moves blocked by Max Guard but not Protect */
11363+
const overrideBypassProtect = [
11364+
'block', 'flowershield', 'gearup', 'magneticflux', 'phantomforce', 'psychup', 'teatime', 'transform',
11365+
];
11366+
const blockedByMaxGuard = move.flags['protect'] || move.isZ || move.isMax || overrideBypassProtect.includes(move.id);
11367+
if (!blockedByMaxGuard) {
11368+
return;
11369+
}
1136211370
this.add('-activate', target, 'move: Max Guard');
1136311371
let lockedmove = source.getVolatile('lockedmove');
1136411372
if (lockedmove) {

0 commit comments

Comments
 (0)