use of io.github.spugn.Sargo.Objects.Character in project S-argo by Expugn.
the class RecordCrystal method randGoldCharacter.
@Override
protected Character randGoldCharacter() {
int randIndex = GOLD_BANNERS.get(RNG.nextInt(GOLD_BANNERS.size()));
Banner randBanner = BANNERS.get(randIndex - 1);
List<Character> randCharacters = randBanner.getCharacters();
return randCharacters.get(RNG.nextInt(randCharacters.size()));
}
use of io.github.spugn.Sargo.Objects.Character in project S-argo by Expugn.
the class RecordCrystalv2 method randGoldCharacter.
@Override
protected Character randGoldCharacter() {
int randIndex = GOLD_BANNERS_V2.get(RNG.nextInt(GOLD_BANNERS_V2.size()));
Banner randBanner = BANNERS.get(randIndex - 1);
List<Character> randCharacters = randBanner.getCharacters();
return randCharacters.get(RNG.nextInt(randCharacters.size()));
}
use of io.github.spugn.Sargo.Objects.Character in project S-argo by Expugn.
the class SAOGameFifthAnniversaryStepUp method randGoldCharacter.
@Override
protected Character randGoldCharacter() {
int randIndex = GOLD_BANNERS.get(RNG.nextInt(GOLD_BANNERS.size()));
Banner randBanner = BANNERS.get(randIndex - 1);
List<Character> randCharacters = randBanner.getCharacters();
return randCharacters.get(RNG.nextInt(randCharacters.size()));
}
use of io.github.spugn.Sargo.Objects.Character in project S-argo by Expugn.
the class StepUpv2 method randGoldCharacter.
@Override
protected Character randGoldCharacter() {
int randIndex = GOLD_BANNERS.get(RNG.nextInt(GOLD_BANNERS.size()));
Banner randBanner = BANNERS.get(randIndex - 1);
List<Character> randCharacters = randBanner.getCharacters();
return randCharacters.get(RNG.nextInt(randCharacters.size()));
}
use of io.github.spugn.Sargo.Objects.Character in project S-argo by Expugn.
the class StepUpv3 method randGoldCharacter.
@Override
protected Character randGoldCharacter() {
/* GET A RANDOM GOLD VARIANT CHARACTER, IF THERE IS A PLATINUM
VARIANT OF THAT CHARACTER IN THE BANNER THEN GET A NEW CHARACTER. */
Character c = null;
boolean charInBanner = true;
int randIndex;
Banner randBanner;
List<Character> randCharacters;
boolean sameName;
boolean samePrefix;
while (charInBanner) {
randIndex = GOLD_BANNERS_V2.get(RNG.nextInt(GOLD_BANNERS_V2.size()));
randBanner = BANNERS.get(randIndex - 1);
randCharacters = randBanner.getCharacters();
c = randCharacters.get(RNG.nextInt(randCharacters.size()));
for (Character bc : SELECTED_BANNER.getCharacters()) {
sameName = c.getName().equalsIgnoreCase(bc.getName());
samePrefix = c.getPrefix().equalsIgnoreCase(bc.getPrefix());
if (!(sameName && samePrefix)) {
charInBanner = false;
} else {
charInBanner = true;
break;
}
}
}
return c;
}
Aggregations