Skip to content

Commit

Permalink
Fixed different forms breeding.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasQTruong committed Jun 17, 2023
1 parent 5cf7c19 commit 4b1dd92
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Random;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledThreadPoolExecutor;
Expand Down Expand Up @@ -289,8 +289,8 @@ public boolean checkBreed() {
String pokemon2Gender = String.valueOf(breederPokemon2.getGender());
String pokemon1Species = String.valueOf(breederPokemon1.getSpecies());
String pokemon2Species = String.valueOf(breederPokemon2.getSpecies());
HashSet<EggGroup> pokemon1EggGroup = breederPokemon1.getSpecies().getEggGroups();
HashSet<EggGroup> pokemon2EggGroup = breederPokemon2.getSpecies().getEggGroups();
Set<EggGroup> pokemon1EggGroup = breederPokemon1.getForm().getEggGroups();
Set<EggGroup> pokemon2EggGroup = breederPokemon2.getForm().getEggGroups();

// Cannot breed same genders (unless genderless + ditto).
if (pokemon1Gender.equals(pokemon2Gender) && !pokemon1Gender.equals("GENDERLESS")) {
Expand Down

0 comments on commit 4b1dd92

Please sign in to comment.