Merge pull request #1351 from Pikachuun/master

Add -ate Clause
This commit is contained in:
Guangcong Luo 2014-12-15 15:09:44 -06:00
commit e8cf856489
2 changed files with 17 additions and 1 deletions

View File

@ -574,7 +574,7 @@ exports.Formats = [
name: "Balanced Hackmons",
section: "Other Metagames",
ruleset: ['Pokemon', 'Ability Clause', 'OHKO Clause', 'Evasion Moves Clause', 'Team Preview', 'HP Percentage Mod'],
ruleset: ['Pokemon', 'Ability Clause', '-ate Clause', 'OHKO Clause', 'Evasion Moves Clause', 'Team Preview', 'HP Percentage Mod'],
banlist: ['Arena Trap', 'Huge Power', 'Parental Bond', 'Pure Power', 'Shadow Tag', 'Wonder Guard']
},
{

View File

@ -381,6 +381,22 @@ exports.BattleFormats = {
}
}
},
ateclause: {
effectType: 'Rule',
onStart: function () {
this.add('rule', '-ate Clause: Limit one of Aerilate/Refrigerate/Pixilate');
},
validateTeam: function (team, format) {
var ateAbility = false;
for (var i = 0; i < team.length; i++) {
var ability = toId(team[i].ability);
if (ability === 'refrigerate' || ability === 'pixilate' || ability === 'aerilate') {
if (ateAbility) return ["You have more than one of Aerilate/Refrigerate/Pixilate, which is banned by -ate Clause."];
ateAbility = true;
}
}
}
},
ohkoclause: {
effectType: 'Rule',
onStart: function () {