Skip to content

Commit

Permalink
Formes and items in hackmons
Browse files Browse the repository at this point in the history
  • Loading branch information
CrystalMoogle committed May 17, 2015
1 parent 91633a7 commit 9843b7b
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions src/Teambuilder/Teambuilder/pokeedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,24 +469,26 @@ void PokeEdit::changeItem(const QString &itemName)
{
int itemNum = ItemInfo::Number(itemName);
poke().item() = itemNum;
if (poke().num() == Pokemon::Giratina && itemNum == Item::GriseousOrb && PokemonInfo::Released(Pokemon::Giratina_O, poke().gen())) {
setNum(Pokemon::Giratina_O);
} else if (poke().num() == Pokemon::Giratina_O && itemNum != Item::GriseousOrb) {
setNum(Pokemon::Giratina);
} else if (itemNum == Item::GriseousOrb && poke().gen() <= 4 && poke().num().pokenum != Pokemon::Giratina) {
poke().item() = 0;
}
if (poke().num().pokenum == Pokemon::Arceus) {
int subnum = ItemInfo::isPlate(itemNum) ? ItemInfo::PlateType(itemNum) : 0;
setNum(Pokemon::uniqueId(poke().num().pokenum, subnum));
}
if (poke().num().pokenum == Pokemon::Genesect) {
int subnum = ItemInfo::isDrive(itemNum) ? ItemInfo::DriveForme(itemNum) : 0;
setNum(Pokemon::uniqueId(poke().num().pokenum, subnum));
}
if (itemNum != ItemInfo::StoneForForme(poke().num())) {
if (PokemonInfo::IsMegaEvo(poke().num()) && !PokeEdit::hackMons) {
setNum(Pokemon::uniqueId(poke().num().pokenum,0));
if (!PokeEdit::hackMons) {
if (poke().num() == Pokemon::Giratina && itemNum == Item::GriseousOrb && PokemonInfo::Released(Pokemon::Giratina_O, poke().gen())) {
setNum(Pokemon::Giratina_O);
} else if (poke().num() == Pokemon::Giratina_O && itemNum != Item::GriseousOrb) {
setNum(Pokemon::Giratina);
} else if (itemNum == Item::GriseousOrb && poke().gen() <= 4 && poke().num().pokenum != Pokemon::Giratina) {
poke().item() = 0;
}
if (poke().num().pokenum == Pokemon::Arceus) {
int subnum = ItemInfo::isPlate(itemNum) ? ItemInfo::PlateType(itemNum) : 0;
setNum(Pokemon::uniqueId(poke().num().pokenum, subnum));
}
if (poke().num().pokenum == Pokemon::Genesect) {
int subnum = ItemInfo::isDrive(itemNum) ? ItemInfo::DriveForme(itemNum) : 0;
setNum(Pokemon::uniqueId(poke().num().pokenum, subnum));
}
if (itemNum != ItemInfo::StoneForForme(poke().num())) {
if (PokemonInfo::IsMegaEvo(poke().num()) && !PokeEdit::hackMons) {
setNum(Pokemon::uniqueId(poke().num().pokenum,0));
}
}
}
updateItemSprite(poke().item());
Expand Down

0 comments on commit 9843b7b

Please sign in to comment.