From 3071cb5847a4855eef06703f610dcafb59526022 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 19 Apr 2024 10:40:03 -0400 Subject: [PATCH] Apply effects to item --- src/engine/gameManager/ForgeManager.java | 8 ++++++++ src/engine/gameManager/ItemManager.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index dc74b877..797866fd 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -313,6 +313,14 @@ public enum ForgeManager implements Runnable { else forgedItem.suffixToken = workOrder.suffixToken; + // Apple effects + + if (forgedItem.prefixToken != 0) + ItemManager.applyPrefixOrSuffix(forgedItem, forgedItem.prefixToken); + + if (forgedItem.suffixToken != 0) + ItemManager.applyPrefixOrSuffix(forgedItem, forgedItem.prefixToken); + // Forged random rolled items are unidentified until completed if (workOrder.prefixToken == 0 && workOrder.suffixToken == 0) diff --git a/src/engine/gameManager/ItemManager.java b/src/engine/gameManager/ItemManager.java index 1e1d23f7..6c8aeebb 100644 --- a/src/engine/gameManager/ItemManager.java +++ b/src/engine/gameManager/ItemManager.java @@ -226,7 +226,7 @@ public enum ItemManager { return true; } - public static void addPrefixOrSuffix(Item item, int token) { + public static void applyPrefixOrSuffix(Item item, int token) { EffectsBase effectsBase = PowersManager.getEffectByToken(token); AbstractPowerAction apa = PowersManager.getPowerActionByIDString(effectsBase.getIDString());