Skip to content

Commit

Permalink
Reject illegal non-shiny sets rather than fixing
Browse files Browse the repository at this point in the history
Closes #2197
  • Loading branch information
Slayer95 committed Oct 20, 2015
1 parent f52d50b commit 7cefd67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions data/rulesets.js
Expand Up @@ -160,6 +160,10 @@ exports.BattleFormats = {
if (perfectIVs < 3) problems.push((set.name || set.species) + " has less than three perfect IVs.");
}

if (set.shiny && template.unobtainableShiny) {
problems.push((set.name || set.species) + " may not be shiny.");
}

// limit one of each move
var moves = [];
if (set.moves) {
Expand Down Expand Up @@ -258,9 +262,6 @@ exports.BattleFormats = {
set.species = 'Aegislash';
}

if (template.unobtainableShiny) {
set.shiny = false;
}
return problems;
}
},
Expand Down
4 changes: 2 additions & 2 deletions team-validator.js
Expand Up @@ -463,8 +463,8 @@ Validator = (function () {
if (eventData.nature && eventData.nature !== set.nature) {
problems.push(name + " must have a " + eventData.nature + " nature because it has a move only available from a specific event.");
}
if (eventData.shiny) {
set.shiny = true;
if (eventData.shiny && !set.shiny) {
problems.push(name + " must be shiny because it has a move only available from a specific event.");
}
if (eventData.generation < 5) eventData.isHidden = false;
if (eventData.isHidden !== undefined && eventData.isHidden !== isHidden) {
Expand Down

0 comments on commit 7cefd67

Please sign in to comment.