File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change
1
+ -
2
+ Fixed issue where unidentified rings could have higher bonuses than they would have once identified
3
+ -
4
+ Fixed issue where unidentified positive rings give bonuses of ` 1 + timesEnchanted - 1 ` prior to identification, not ` 1 + timesEnchanted ` as intended
Original file line number Diff line number Diff line change @@ -1780,12 +1780,11 @@ short effectiveRingEnchant(item *theItem) {
1780
1780
if (theItem -> category != RING ) {
1781
1781
return 0 ;
1782
1782
}
1783
- if (!( theItem -> flags & ITEM_IDENTIFIED )
1784
- && theItem -> enchant1 > 0 ) {
1785
-
1786
- return theItem -> timesEnchanted + 1 ; // Unidentified positive rings act as +1 until identified.
1783
+ if (theItem -> flags & ITEM_IDENTIFIED ) {
1784
+ return theItem -> enchant1 ;
1785
+ } else {
1786
+ return min ( theItem -> enchant1 , theItem -> timesEnchanted + 1 );
1787
1787
}
1788
- return theItem -> enchant1 ;
1789
1788
}
1790
1789
1791
1790
short apparentRingBonus (const enum ringKind kind ) {
@@ -6914,6 +6913,8 @@ void readScroll(item *theItem) {
6914
6913
} while (theItem == NULL || !(theItem -> category & (WEAPON | ARMOR | RING | STAFF | WAND | CHARM )));
6915
6914
recordKeystroke (theItem -> inventoryLetter , false, false);
6916
6915
confirmMessages ();
6916
+
6917
+ theItem -> timesEnchanted += enchantMagnitude ();
6917
6918
switch (theItem -> category ) {
6918
6919
case WEAPON :
6919
6920
theItem -> strengthRequired = max (0 , theItem -> strengthRequired - enchantMagnitude ());
@@ -6953,7 +6954,6 @@ void readScroll(item *theItem) {
6953
6954
default :
6954
6955
break ;
6955
6956
}
6956
- theItem -> timesEnchanted += enchantMagnitude ();
6957
6957
if ((theItem -> category & (WEAPON | ARMOR | STAFF | RING | CHARM ))
6958
6958
&& theItem -> enchant1 >= 16 ) {
6959
6959
You can’t perform that action at this time.
0 commit comments