Browse Source

Item prefix and suffix applied

combat-2
MagicBot 7 months ago
parent
commit
171c79dcf6
  1. 18
      src/engine/gameManager/ForgeManager.java

18
src/engine/gameManager/ForgeManager.java

@ -374,8 +374,8 @@ public enum ForgeManager implements Runnable {
int modifier = 0; int modifier = 0;
ModTypeTableEntry modTypeTableEntry = null; ModTypeTableEntry modTypeTableEntry = null;
ModTableEntry modRollEntry = null; ModTableEntry modTableEntry = null;
int modifierRoll; int rollForModifier;
switch (itemModType) { switch (itemModType) {
case PREFIX: case PREFIX:
@ -391,16 +391,16 @@ public enum ForgeManager implements Runnable {
if (modTypeTableEntry == null) if (modTypeTableEntry == null)
return 0; return 0;
modifierRoll = ThreadLocalRandom.current().nextInt(1, 100 + 1); rollForModifier = ThreadLocalRandom.current().nextInt(1, 100 + 1);
if (modifierRoll < 80) { if (rollForModifier < 80) {
modifierRoll = LootManager.TableRoll(vendor.getLevel(), false); rollForModifier = LootManager.TableRoll(vendor.getLevel(), false);
modRollEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, modifierRoll); modTableEntry = ModTableEntry.rollTable(modTypeTableEntry.modTableID, rollForModifier);
} }
if (modRollEntry != null) { if (modTableEntry != null) {
AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modRollEntry.action); AbstractPowerAction abstractPowerAction = PowersManager.getPowerActionByIDString(modTableEntry.action);
modifier = abstractPowerAction.getParent().token; modifier = abstractPowerAction.getEffectsBase().getToken();
} }
return modifier; return modifier;

Loading…
Cancel
Save