From bab6e6845e8f8046be525ab1a4cd1e25a1f52a4d Mon Sep 17 00:00:00 2001 From: Melledy <52122272+Melledy@users.noreply.github.com> Date: Wed, 31 Aug 2022 03:39:41 -0700 Subject: [PATCH] Clean up adding extra embryo logic in Avatar::recalcStats --- src/main/java/emu/grasscutter/game/avatar/Avatar.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/avatar/Avatar.java b/src/main/java/emu/grasscutter/game/avatar/Avatar.java index 862f73f2e..776d01815 100644 --- a/src/main/java/emu/grasscutter/game/avatar/Avatar.java +++ b/src/main/java/emu/grasscutter/game/avatar/Avatar.java @@ -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) {