mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-24 23:09:10 -05:00
Allow CAP to have HMs
This commit is contained in:
parent
072bd260e4
commit
08bca77cf4
8
tools.js
8
tools.js
|
|
@ -495,9 +495,11 @@ module.exports = (function () {
|
|||
var learned = lset[i];
|
||||
if (noPastGen && learned.charAt(0) !== '6') continue;
|
||||
if (parseInt(learned.charAt(0),10) > this.gen) continue;
|
||||
// HMs can't be transferred
|
||||
if (this.gen >= 4 && learned.charAt(0) <= 3 && move in {'cut':1, 'fly':1, 'surf':1, 'strength':1, 'flash':1, 'rocksmash':1, 'waterfall':1, 'dive':1}) continue;
|
||||
if (this.gen >= 5 && learned.charAt(0) <= 4 && move in {'cut':1, 'fly':1, 'surf':1, 'strength':1, 'rocksmash':1, 'waterfall':1, 'rockclimb':1}) continue;
|
||||
if (!template.isNonstandard) {
|
||||
// HMs can't be transferred
|
||||
if (this.gen >= 4 && learned.charAt(0) <= 3 && move in {'cut':1, 'fly':1, 'surf':1, 'strength':1, 'flash':1, 'rocksmash':1, 'waterfall':1, 'dive':1}) continue;
|
||||
if (this.gen >= 5 && learned.charAt(0) <= 4 && move in {'cut':1, 'fly':1, 'surf':1, 'strength':1, 'rocksmash':1, 'waterfall':1, 'rockclimb':1}) continue;
|
||||
}
|
||||
if (learned.substr(0,2) in {'4L':1,'5L':1,'6L':1}) {
|
||||
// gen 4-6 level-up moves
|
||||
if (level >= parseInt(learned.substr(2),10)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user