diff --git a/Source/itemdat.cpp b/Source/itemdat.cpp index 4b800eeba..6134568b9 100644 --- a/Source/itemdat.cpp +++ b/Source/itemdat.cpp @@ -519,7 +519,7 @@ const UniqueItem UniqueItems[] = { { N_("Ring of Regha"), UITYPE_RING, 1, 6, 4175, { { IPL_MAG, 10, 10 }, { IPL_MAGICRES, 10, 10 }, { IPL_LIGHT, 1, 1 }, { IPL_STR_CURSE, 3, 3 }, { IPL_DEX_CURSE, 3, 3 }, { IPL_INVCURS, 11, 0 } } }, { N_("The Bleeder"), UITYPE_RING, 2, 4, 8500, { { IPL_MAGICRES, 20, 20 }, { IPL_MANA, 30, 30 }, { IPL_LIFE_CURSE, 10, 10 }, { IPL_INVCURS, 8, 0 }, { IPL_INVALID, 0, 0 }, { IPL_INVALID, 0, 0 } } }, { N_("Constricting Ring"), UITYPE_RING, 5, 3, 62000, { { IPL_ALLRES, 75, 75 }, { IPL_DRAINLIFE, 0, 0 }, { IPL_INVCURS, 14, 0 }, { IPL_INVALID, 0, 0 }, { IPL_INVALID, 0, 0 }, { IPL_INVALID, 0, 0 } } }, - { N_("Ring of Engagement"), UITYPE_RING, 11, 5, 12476, { { IPL_GETHIT, 1, 2 }, { IPL_THORNS, 1, 3 }, { IPL_SETAC, 5, 5 }, { IPL_TARGAC, 4, 12 }, { IPL_INVCURS, 13, 0 }, { IPL_INVALID, 0, 0 } } }, + { N_("Ring of Engagement"), UITYPE_RING, 11, 5, 12476, { { IPL_GETHIT, 1, 2 }, { IPL_THORNS, 1, 3 }, { IPL_SETAC, 5, 5 }, { IPL_TARGAC, 2, 2 }, { IPL_INVCURS, 13, 0 }, { IPL_INVALID, 0, 0 } } }, { N_("Giant's Knuckle"), UITYPE_RING, 8, 3, 8000, { { IPL_STR, 60, 60 }, { IPL_DEX_CURSE, 30, 30 }, { IPL_INVCURS, 179, 0 }, { IPL_INVALID, 0, 0 }, { IPL_INVALID, 0, 0 }, { IPL_INVALID, 0, 0 } } }, { N_("Mercurial Ring"), UITYPE_RING, 8, 3, 8000, { { IPL_DEX, 60, 60 }, { IPL_STR_CURSE, 30, 30 }, { IPL_INVCURS, 176, 0 }, { IPL_INVALID, 0, 0 }, { IPL_INVALID, 0, 0 }, { IPL_INVALID, 0, 0 } } }, { N_("Xorine's Ring"), UITYPE_RING, 8, 3, 8000, { { IPL_MAG, 60, 60 }, { IPL_STR_CURSE, 30, 30 }, { IPL_INVCURS, 168, 0 }, { IPL_INVALID, 0, 0 }, { IPL_INVALID, 0, 0 }, { IPL_INVALID, 0, 0 } } }, diff --git a/Source/items.cpp b/Source/items.cpp index cabc704da..f545f5809 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -724,8 +724,15 @@ int CalculateToHitBonus(int level) } } -int SaveItemPower(Item &item, const ItemPower &power) +int SaveItemPower(Item &item, ItemPower &power) { + if (!gbIsHellfire) { + if (power.type == IPL_TARGAC) { + power.param1 = 1 << power.param1; + power.param2 = 3 << power.param2; + } + } + int r = RndPL(power.param1, power.param2); switch (power.type) { @@ -1098,14 +1105,6 @@ int PLVal(int pv, int p1, int p2, int minv, int maxv) void SaveItemAffix(Item &item, const PLStruct &affix) { auto power = affix.power; - - if (!gbIsHellfire) { - if (power.type == IPL_TARGAC) { - power.param1 = 1 << power.param1; - power.param2 = 3 << power.param2; - } - } - int value = SaveItemPower(item, power); value = PLVal(value, power.param1, power.param2, affix.minVal, affix.maxVal); @@ -1505,7 +1504,7 @@ void GetUniqueItem(Item &item, _unique_items uid) { UniqueItemFlags[uid] = true; - for (const auto &power : UniqueItems[uid].powers) { + for (auto power : UniqueItems[uid].powers) { if (power.type == IPL_INVALID) break; SaveItemPower(item, power); @@ -3688,7 +3687,10 @@ bool DoOil(Player &player, int cii) return _(/*xgettext:no-c-format*/ "hit steals 5% life"); return ""; case IPL_TARGAC: - return _("penetrates target's armor"); + if (gbIsHellfire) + return _("penetrates target's armor"); + else + return _("penetrates target's armor") + fmt::format(" ({:d})", item._iPLEnAc); case IPL_FASTATTACK: if ((item._iFlags & ISPL_QUICKATTACK) != 0) return _("quick attack");