Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sashclause: {
- effectType: 'Rule',
- onStart: function() {
- this.add('rule', 'Sash Clause: Limit one '+"+this.getItem(focussash).name);
- },
- validateTeam: function(team, format) {
- var hasFocusSash = 0;
- for (var i=0; i<team.length; i++) { // Check each pokemon
- var item = toId(team[i].item); // Get it's item
- if (item === 'focussash') hasFocusSash++; // If it's an item add 1 to the counter
- if (hasFocusSash > 1) { // If the counter is more than 1 return the error
- return ["You are limited to only one "+this.getItem(focussash).name+" by Sash Clause.","(You have more than one Pokemon with "+this.getItem(focussash).name+")"];
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment