Work on adding modifiers
This commit is contained in:
@@ -2,7 +2,6 @@ package engine.gameManager;
|
||||
|
||||
import engine.mbEnums;
|
||||
import engine.objects.*;
|
||||
import engine.powers.EffectsBase;
|
||||
import engine.powers.poweractions.AbstractPowerAction;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
@@ -226,15 +225,14 @@ public enum ItemManager {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void applyPrefixOrSuffix(Item item, int token) {
|
||||
public static void applyPrefixOrSuffix(Item item, String powerAction) {
|
||||
|
||||
EffectsBase effectsBase = PowersManager.getEffectByToken(token);
|
||||
AbstractPowerAction apa = PowersManager.getPowerActionByIDString(effectsBase.getIDString());
|
||||
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(powerAction);
|
||||
|
||||
if (apa == null)
|
||||
if (abstractPowerAction == null)
|
||||
return;
|
||||
|
||||
apa.applyEffectForItem(item, 0);
|
||||
item.getEffectNames().add(effectsBase.getIDString());
|
||||
abstractPowerAction.applyEffectForItem(item, 0);
|
||||
item.getEffectNames().add(powerAction);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user