Skip to content

Commit

Permalink
Merge pull request #1417 from turbedi/FixKeldeoStuff
Browse files Browse the repository at this point in the history
Fix Keldeo in Teambuilder/Battle
  • Loading branch information
Fuzzysqurl committed Dec 1, 2015
2 parents 59adeb8 + 4130b36 commit f1f7c8d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
3 changes: 1 addition & 2 deletions src/Teambuilder/Teambuilder/pokeedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,7 @@ void PokeEdit::setNum(Pokemon::uniqueId num)
poke().setMove(Move::SecretSword, 0, false);
}
} else if (PokemonInfo::Released(Pokemon::Keldeo_R, poke().gen())) {
if (poke().gen() < 6)
poke().removeMove(Move::SecretSword);
poke().removeMove(Move::SecretSword);
}
} else if (num.pokenum == Pokemon::Giratina) {
if (num == Pokemon::Giratina_O && poke().item() != Item::GriseousOrb) {
Expand Down
3 changes: 1 addition & 2 deletions src/libraries/PokemonInfo/battlestructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ void PokeBattle::init(PokePersonal &poke)
}

if (num() == Pokemon::Keldeo_R && !poke.hasMove(Move::SecretSword)) {
if (p.gen() < 6)
num() = Pokemon::Keldeo;
num() = Pokemon::Keldeo;
}

Pokemon::uniqueId ori = PokemonInfo::OriginalForme(num());
Expand Down
10 changes: 0 additions & 10 deletions src/libraries/PokemonInfo/pokemonstructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,16 +315,6 @@ void PokePersonal::runCheck(bool hack)

MoveSetChecker::isValid(num(), gen(), move(0), move(1), move(2), move(3), ability(), gender(), level(), false, &invalidMoves);
}

if (num().pokenum == Pokemon::Keldeo) {
if (gen() < 6) {
if (move(0) == Move::SecretSword || move(1) == Move::SecretSword || move(2) == Move::SecretSword || move(3) == Move::SecretSword) {
num() = Pokemon::Keldeo_R;
} else {
num() = num().original();
}
}
}
}

int PokePersonal::addMove(int moveNum, bool check) throw(QString)
Expand Down

0 comments on commit f1f7c8d

Please sign in to comment.