Keep action line IDs apart from effect IDs

ActionsBase IDs (IgnoreStack effect keys) and EffectsBase IDs are both
written as Integer.toString keys into the same effects map, and their
ranges overlapped. Action lines now start at 10001. Also drops the
unused EffectsBase copy constructor and its NewID counter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-26 04:35:33 -04:00
1 parent 073417567f
commit f8d764b5f5
2 files changed
+4 -51

No files matched your search

-50
View File
@@ -52,7 +52,6 @@ public class EffectsBase {
public static HashMap<Integer, HashSet<mbEnums.DamageType>> EffectDamageTypes = new HashMap<>();
public static HashSet<AbstractEffectModifier> DefaultModifiers = new HashSet<>();
private static ConcurrentHashMap<String, String> itemEffectsByName = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
private static int NewID = 3000;
private int UUID;
private String IDString;
// private String name;
@@ -91,55 +90,6 @@ public class EffectsBase {
}
public EffectsBase(EffectsBase copyEffect, int newToken, String IDString) {
UUID = NewID++;
this.IDString = IDString;
this.token = newToken;
//filll
if (copyEffect == null) {
int flags = 0;
this.isItemEffect = ((flags & 1) != 0) ? true : false;
this.isSpireEffect = ((flags & 2) != 0) ? true : false;
this.ignoreMod = ((flags & 4) != 0) ? true : false;
this.dontSave = ((flags & 8) != 0) ? true : false;
if (this.IDString.startsWith("PRE-"))
this.isPrefix = true;
else if (this.IDString.startsWith("SUF-"))
this.isSuffix = true;
}
this.amount = copyEffect.amount;
this.amountRamp = copyEffect.amountRamp;
this.isItemEffect = copyEffect.isItemEffect;
this.isSpireEffect = copyEffect.isSpireEffect;
this.ignoreMod = copyEffect.ignoreMod;
this.dontSave = copyEffect.dontSave;
this.cancelOnAttack = copyEffect.cancelOnAttack;
this.cancelOnAttackSwing = copyEffect.cancelOnAttackSwing;
this.cancelOnCast = copyEffect.cancelOnCast;
this.cancelOnCastSpell = copyEffect.cancelOnCastSpell;
this.cancelOnEquipChange = copyEffect.cancelOnEquipChange;
this.cancelOnLogout = copyEffect.cancelOnLogout;
this.cancelOnMove = copyEffect.cancelOnMove;
this.cancelOnNewCharm = copyEffect.cancelOnNewCharm;
this.cancelOnSit = copyEffect.cancelOnSit;
this.cancelOnTakeDamage = copyEffect.cancelOnTakeDamage;
this.cancelOnTerritoryClaim = copyEffect.cancelOnTerritoryClaim;
this.cancelOnUnEquip = copyEffect.cancelOnUnEquip;
this.useRampAdd = copyEffect.useRampAdd;
this.isPrefix = copyEffect.isPrefix;
this.isSuffix = copyEffect.isSuffix;
this.name = copyEffect.name;
this.value = copyEffect.value;
this.resourceCosts = copyEffect.resourceCosts;
}
/**
* ResultSet Constructor
*/