|
|
@ -8,6 +8,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
package engine.gameManager; |
|
|
|
package engine.gameManager; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import engine.loot.ModTableEntry; |
|
|
|
import engine.loot.ModTypeTableEntry; |
|
|
|
import engine.loot.ModTypeTableEntry; |
|
|
|
import engine.loot.WorkOrder; |
|
|
|
import engine.loot.WorkOrder; |
|
|
|
import engine.mbEnums; |
|
|
|
import engine.mbEnums; |
|
|
@ -290,16 +291,18 @@ public enum ForgeManager implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
private static void applyItemEffects(Item forgedItem) { |
|
|
|
private static void applyItemEffects(Item forgedItem) { |
|
|
|
|
|
|
|
|
|
|
|
EffectsBase prefix = PowersManager.getEffectByToken(forgedItem.prefixToken); |
|
|
|
ModTableEntry prefixEntry = ModTableEntry.rollTable(forgedItem.template.modTable, forgedItem.prefixToken); |
|
|
|
EffectsBase suffix = PowersManager.getEffectByToken(forgedItem.suffixToken); |
|
|
|
ModTableEntry suffixEntry = ModTableEntry.rollTable(forgedItem.template.modTable, forgedItem.suffixToken); |
|
|
|
|
|
|
|
|
|
|
|
if (forgedItem.prefixToken != 0) { |
|
|
|
if (forgedItem.prefixToken != 0) { |
|
|
|
|
|
|
|
EffectsBase prefix = PowersManager.getEffectByIDString(prefixEntry.action); |
|
|
|
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(prefix.getIDString()); |
|
|
|
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(prefix.getIDString()); |
|
|
|
abstractPowerAction.applyEffectForItem(forgedItem, 0); |
|
|
|
abstractPowerAction.applyEffectForItem(forgedItem, 0); |
|
|
|
forgedItem.getEffectNames().add(prefix.getName()); |
|
|
|
forgedItem.getEffectNames().add(prefix.getName()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (forgedItem.suffixToken != 0) { |
|
|
|
if (forgedItem.prefixToken != 0) { |
|
|
|
|
|
|
|
EffectsBase suffix = PowersManager.getEffectByIDString(suffixEntry.action); |
|
|
|
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(suffix.getIDString()); |
|
|
|
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(suffix.getIDString()); |
|
|
|
abstractPowerAction.applyEffectForItem(forgedItem, 0); |
|
|
|
abstractPowerAction.applyEffectForItem(forgedItem, 0); |
|
|
|
forgedItem.getEffectNames().add(suffix.getName()); |
|
|
|
forgedItem.getEffectNames().add(suffix.getName()); |
|
|
|