Skip to content

Instantly share code, notes, and snippets.

@jmclemo6
Created April 22, 2019 03:30
Show Gist options
  • Save jmclemo6/9e2c98ad8f74748944bef57c41cccc64 to your computer and use it in GitHub Desktop.
Save jmclemo6/9e2c98ad8f74748944bef57c41cccc64 to your computer and use it in GitHub Desktop.
Subject: [PATCH] Gen 4: Fix targeting of encored moves in doubles
---
data/mods/gen4/moves.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/data/mods/gen4/moves.js b/data/mods/gen4/moves.js
index 308a58c6f..be46a2a5b 100644
--- a/data/mods/gen4/moves.js
+++ b/data/mods/gen4/moves.js
@@ -559,6 +559,11 @@ let BattleMovedex = {
}
}
},
+ onRedirectTarget(target, source, source2, move) {
+ if (this.gameType === 'doubles') {
+ return target.side.active[this.random(0, target.side.active.length)];
+ }
+ },
},
},
endeavor: {
--
2.21.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment