Browse files

Learnset-check base formes like prevos

  • Loading branch information...
1 parent 7e01b7a commit d832fa233f8861c4994fe843d13decf03103ebcc @Zarel committed May 14, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 tools.js
View
9 tools.js
@@ -209,7 +209,8 @@ function BattleTools() {
};
- this.checkLearnset = function(move, template) {
+ this.checkLearnset = function(move, template, lsetData) {
+ lsetData = lsetData || {};
if (move.id) move = move.id;
do {
if (!template.learnset || template.learnset[move]) {
@@ -221,10 +222,8 @@ function BattleTools() {
for (var i=0; i<lset.length; i++) if (lset[i].substr(1) !== 'E') return true;
return 1;
}
- if (template.species === 'Deoxys-Speed' || template.species === 'Deoxys-Attack' || template.species === 'Deoxys-Defense') {
- template = selfT.getTemplate('Deoxys');
- } else if (template.species.substr(0,7) === 'Arceus-') {
- template = selfT.getTemplate('Arceus');
+ if (template.basespecies !== template.species) {
+ template = selfT.getTemplate(template.basespecies);
} else {
template = selfT.getTemplate(template.prevo);
}

0 comments on commit d832fa2

Please sign in to comment.