Clean up adding extra embryo logic in Avatar::recalcStats

This commit is contained in:
Melledy 2022-08-31 03:39:41 -07:00
parent 45c08c5826
commit bab6e6845e
No known key found for this signature in database
GPG Key ID: 2A8E7A1D64737CCB

View File

@ -556,8 +556,8 @@ public class Avatar {
this.addFightProperty(prop.getProp(), prop.getValue());
}
// Add any skill strings from this proud skill
this.addToExtraAbilityEmbryos(proudSkillData.getOpenConfig(), true);
// Add any embryos from this proud skill
this.addToExtraAbilityEmbryos(proudSkillData.getOpenConfig());
}
// Constellations
@ -566,7 +566,7 @@ public class Avatar {
.filter(Objects::nonNull)
.map(AvatarTalentData::getOpenConfig)
.filter(Objects::nonNull)
.forEach(openConfig -> this.addToExtraAbilityEmbryos(openConfig, false));
.forEach(this::addToExtraAbilityEmbryos);
// Add any skill strings from this constellation
// Set % stats
@ -600,6 +600,10 @@ public class Avatar {
}
}
}
public void addToExtraAbilityEmbryos(String openConfig) {
this.addToExtraAbilityEmbryos(openConfig, false);
}
public void addToExtraAbilityEmbryos(String openConfig, boolean forceAdd) {
if (openConfig == null || openConfig.length() == 0) {