diff --git a/changes/issue-602.md b/changes/issue-602.md new file mode 100644 index 00000000..025de389 --- /dev/null +++ b/changes/issue-602.md @@ -0,0 +1,4 @@ +- + Fixed issue where unidentified rings could have higher bonuses than they would have once identified +- + Fixed issue where unidentified positive rings give bonuses of `1 + timesEnchanted - 1` prior to identification, not `1 + timesEnchanted` as intended \ No newline at end of file diff --git a/src/brogue/Items.c b/src/brogue/Items.c index 07fc63a1..bc8c6f96 100644 --- a/src/brogue/Items.c +++ b/src/brogue/Items.c @@ -1780,12 +1780,11 @@ short effectiveRingEnchant(item *theItem) { if (theItem->category != RING) { return 0; } - if (!(theItem->flags & ITEM_IDENTIFIED) - && theItem->enchant1 > 0) { - - return theItem->timesEnchanted + 1; // Unidentified positive rings act as +1 until identified. + if (theItem->flags & ITEM_IDENTIFIED) { + return theItem->enchant1; + } else { + return min(theItem->enchant1, theItem->timesEnchanted + 1); } - return theItem->enchant1; } short apparentRingBonus(const enum ringKind kind) { @@ -6914,6 +6913,8 @@ void readScroll(item *theItem) { } while (theItem == NULL || !(theItem->category & (WEAPON | ARMOR | RING | STAFF | WAND | CHARM))); recordKeystroke(theItem->inventoryLetter, false, false); confirmMessages(); + + theItem->timesEnchanted += enchantMagnitude(); switch (theItem->category) { case WEAPON: theItem->strengthRequired = max(0, theItem->strengthRequired - enchantMagnitude()); @@ -6953,7 +6954,6 @@ void readScroll(item *theItem) { default: break; } - theItem->timesEnchanted += enchantMagnitude(); if ((theItem->category & (WEAPON | ARMOR | STAFF | RING | CHARM)) && theItem->enchant1 >= 16) {