|
|
|
@ -2,10 +2,13 @@ package engine.gameManager;
@@ -2,10 +2,13 @@ package engine.gameManager;
|
|
|
|
|
|
|
|
|
|
import engine.mbEnums; |
|
|
|
|
import engine.objects.*; |
|
|
|
|
import engine.powers.EffectsBase; |
|
|
|
|
import engine.powers.poweractions.AbstractPowerAction; |
|
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
|
import java.util.EnumSet; |
|
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger; |
|
|
|
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
|
|
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
|
|
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
|
|
@ -17,6 +20,8 @@ import java.util.concurrent.ConcurrentHashMap;
@@ -17,6 +20,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
public enum ItemManager { |
|
|
|
|
ITEMMANAGER; |
|
|
|
|
|
|
|
|
|
public static final AtomicInteger lastNegativeID = new AtomicInteger(0); |
|
|
|
|
|
|
|
|
|
public static Boolean ValidRace(Item item, mbEnums.MonsterType race) { |
|
|
|
|
|
|
|
|
|
if (item.template.item_race_req.isEmpty() && item.template.item_race_res.isEmpty()) |
|
|
|
@ -220,4 +225,16 @@ public enum ItemManager {
@@ -220,4 +225,16 @@ public enum ItemManager {
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void addPrefixOrSuffix(Item item, int token) { |
|
|
|
|
|
|
|
|
|
EffectsBase effectsBase = PowersManager.getEffectByToken(token); |
|
|
|
|
AbstractPowerAction apa = PowersManager.getPowerActionByIDString(effectsBase.getIDString()); |
|
|
|
|
|
|
|
|
|
if (apa == null) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
apa.applyEffectForItem(item, 0); |
|
|
|
|
item.getEffectNames().add(effectsBase.getIDString()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|