From bfa7ff2d311d6d7ddbae334e9b81d3c116824287 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Thu, 20 Feb 2020 02:27:21 -0800 Subject: [PATCH] Update Max Guard Max Guard doesn't block literally everything, just most things. --- data/moves.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/data/moves.js b/data/moves.js index 321a32f350..d43a7df091 100644 --- a/data/moves.js +++ b/data/moves.js @@ -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) {