Addition of CraftingCritical effect handler.

This commit is contained in:
MobiusDevelopment
2022-08-09 11:41:34 +00:00
parent 5718b19e16
commit 39984548fe
90 changed files with 757 additions and 45 deletions

View File

@@ -661,7 +661,11 @@ public class RecipeManager
}
}
_target.getInventory().addItem("Manufacture", itemId, itemCount, _target, _player);
final Item item = _target.getInventory().addItem("Manufacture", itemId, itemCount, _target, _player);
if (item.isEquipable() && (itemCount == 1) && (Rnd.get(100) < _player.getStat().getValue(Stat.CRAFTING_CRITICAL)))
{
_target.getInventory().addItem("Manufacture Critical", itemId, itemCount, _target, _player);
}
// inform customer of earned item
SystemMessage sm = null;

View File

@@ -289,6 +289,7 @@ public enum Stat
// Which base stat ordinal should alter skill critical formula.
STAT_BONUS_SKILL_CRITICAL("statSkillCritical"),
STAT_BONUS_SPEED("statSpeed"),
CRAFTING_CRITICAL("craftingCritical"),
SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()),
WORLD_CHAT_POINTS("worldChatPoints"),
ATTACK_DAMAGE("attackDamage"),