Skip to content

Commit 8b2a9e0

Browse files
committed
Fix: artifact rings have a fixed material.
Because rings inherently have a random appearance/material, many times the two artifact rings in the game (the One Ring [gold] and the Ring of P'hul [gemstone]) would spawn exhibiting the material properties of its base item, but would still appear as gold or gemstone, etc. Address the confusion, and make sure the base materials for each artifact ring are made of the material they're supposed to be. This does set up a condition to where an observant player could quickly learn that if, for example, they see a gold ring, they'll know it's invisibility without having to formally ID it. To get around that is a bit more work than I'm willing to do at the moment.
1 parent 51489c0 commit 8b2a9e0

File tree

4 files changed

+76
-68
lines changed

4 files changed

+76
-68
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3369,4 +3369,5 @@ The following changes to date are:
33693369
- Fix: unique monsters are not bound by maximum hit point value in grow_up()
33703370
- Fix: Infidels couldn't drop cursed loadstones
33713371
- Fix: misbehavior by #adjust
3372+
- Fix: artifact rings have a fixed material
33723373

src/o_init.c

+5
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ int *lo_p, *hi_p; /* output: range that item belongs among */
211211
*hi_p = i - 1;
212212
break;
213213
case RING_CLASS:
214+
/* rings of free action and invisibility have
215+
the only fixed descriptions/materials */
216+
if (otyp >= RIN_ADORNMENT && otyp <= RIN_PROTECTION_FROM_SHAPE_CHAN)
217+
*lo_p = RIN_ADORNMENT, *hi_p = RIN_PROTECTION_FROM_SHAPE_CHAN;
218+
break;
214219
case WAND_CLASS:
215220
case VENOM_CLASS:
216221
/* entire class */

src/objects.c

+10-8
Original file line numberDiff line numberDiff line change
@@ -663,24 +663,26 @@ RING("cold resistance", "brass",
663663
COLD_RES, 150, 1, 0, 4, COPPER, HI_COPPER),
664664
RING("shock resistance", "copper",
665665
SHOCK_RES, 150, 1, 0, 3, COPPER, HI_COPPER),
666-
RING("free action", "twisted",
667-
FREE_ACTION, 200, 1, 0, 6, METAL, HI_METAL),
668666
RING("slow digestion", "steel",
669667
SLOW_DIGESTION, 200, 1, 0, 8, METAL, HI_METAL),
670668
RING("teleportation", "silver",
671669
TELEPORT, 200, 1, 0, 3, SILVER, HI_SILVER),
672-
RING("teleport control", "gold",
673-
TELEPORT_CONTROL, 300, 1, 0, 3, GOLD, HI_GOLD),
670+
RING("teleport control", "wire",
671+
TELEPORT_CONTROL, 300, 1, 0, 3, METAL, HI_METAL),
674672
RING("polymorph", "ivory",
675673
POLYMORPH, 300, 1, 0, 4, BONE, CLR_WHITE),
676-
RING("polymorph control", "emerald",
677-
POLYMORPH_CONTROL, 300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN),
678-
RING("invisibility", "wire",
679-
INVIS, 150, 1, 0, 5, METAL, HI_METAL),
674+
RING("polymorph control", "twisted",
675+
POLYMORPH_CONTROL, 300, 1, 0, 8, METAL, HI_METAL),
680676
RING("see invisible", "engagement",
681677
SEE_INVIS, 150, 1, 0, 5, GOLD, HI_METAL),
682678
RING("protection from shape changers", "shiny",
683679
PROT_FROM_SHAPE_CHANGERS, 100, 1, 0, 5, PLATINUM, CLR_BRIGHT_CYAN),
680+
/* free action and invisibility are removed from random material/type
681+
selection */
682+
RING("free action", "emerald",
683+
FREE_ACTION, 200, 1, 0, 6, GEMSTONE, CLR_BRIGHT_GREEN),
684+
RING("invisibility", "gold",
685+
INVIS, 150, 1, 0, 5, GOLD, HI_GOLD),
684686
#undef RING
685687

686688
/* amulets ... - THE Amulet comes last because it is special */

win/share/objects.txt

+60-60
Original file line numberDiff line numberDiff line change
@@ -3999,26 +3999,7 @@ Z = (195, 195, 195)
39993999
................
40004000
................
40014001
}
4002-
# tile 209 (twisted / free action)
4003-
{
4004-
................
4005-
................
4006-
................
4007-
................
4008-
................
4009-
................
4010-
.....APPBP......
4011-
....PPAAAAP.....
4012-
....PAA..APA....
4013-
....PA....BA....
4014-
....BPA..APA....
4015-
.....APBPPAA....
4016-
......AAAAA.....
4017-
................
4018-
................
4019-
................
4020-
}
4021-
# tile 210 (steel / slow digestion)
4002+
# tile 209 (steel / slow digestion)
40224003
{
40234004
................
40244005
................
@@ -4037,7 +4018,7 @@ Z = (195, 195, 195)
40374018
................
40384019
................
40394020
}
4040-
# tile 211 (silver / teleportation)
4021+
# tile 210 (silver / teleportation)
40414022
{
40424023
................
40434024
................
@@ -4056,26 +4037,26 @@ Z = (195, 195, 195)
40564037
................
40574038
................
40584039
}
4059-
# tile 212 (gold / teleport control)
4040+
# tile 211 (wire / teleport control)
40604041
{
40614042
................
40624043
................
40634044
................
40644045
................
40654046
................
40664047
................
4067-
.....LHHHL......
4068-
....LHAAAHL.....
4069-
....HAA..AHA....
4070-
....HA....HA....
4071-
....LHA..HLA....
4072-
.....LHHHLAA....
4073-
......AAAAA.....
4074-
................
4048+
.....PPPPP......
4049+
....PPAAAPP.....
4050+
....PAA...PA....
4051+
....PA.....PA...
4052+
....PA.....PA...
4053+
....PAAPPPPA....
4054+
.....PPPAAA.....
4055+
......AA........
40754056
................
40764057
................
40774058
}
4078-
# tile 213 (ivory / polymorph)
4059+
# tile 212 (ivory / polymorph)
40794060
{
40804061
................
40814062
................
@@ -4094,45 +4075,26 @@ Z = (195, 195, 195)
40944075
................
40954076
................
40964077
}
4097-
# tile 214 (emerald / polymorph control)
4078+
# tile 213 (twisted / polymorph control)
40984079
{
40994080
................
4100-
................
4101-
................
4102-
................
4103-
.....PGFFPA.....
4104-
.....FGFFFA.....
4105-
.....AFFFA......
4106-
.....OCECNA.....
4107-
....OOAAAONA....
4108-
....OAA...OA....
4109-
....NOA..ONA....
4110-
.....ONONOAA....
4111-
......AAAAA.....
4112-
................
4113-
................
4114-
................
4115-
}
4116-
# tile 215 (wire / invisibility)
4117-
{
41184081
................
41194082
................
41204083
................
41214084
................
41224085
................
4086+
.....APPBP......
4087+
....PPAAAAP.....
4088+
....PAA..APA....
4089+
....PA....BA....
4090+
....BPA..APA....
4091+
.....APBPPAA....
4092+
......AAAAA.....
41234093
................
4124-
.....PPPPP......
4125-
....PPAAAPP.....
4126-
....PAA...PA....
4127-
....PA.....PA...
4128-
....PA.....PA...
4129-
....PAAPPPPA....
4130-
.....PPPAAA.....
4131-
......AA........
41324094
................
41334095
................
41344096
}
4135-
# tile 216 (engagement / see invisible)
4097+
# tile 214 (engagement / see invisible)
41364098
{
41374099
................
41384100
................
@@ -4151,7 +4113,7 @@ Z = (195, 195, 195)
41514113
................
41524114
................
41534115
}
4154-
# tile 217 (shiny / protection from shape changers)
4116+
# tile 215 (shiny / protection from shape changers)
41554117
{
41564118
................
41574119
................
@@ -4170,6 +4132,44 @@ Z = (195, 195, 195)
41704132
................
41714133
................
41724134
}
4135+
# tile 216 (emerald / free action)
4136+
{
4137+
................
4138+
................
4139+
................
4140+
................
4141+
.....PGFFPA.....
4142+
.....FGFFFA.....
4143+
.....AFFFA......
4144+
.....OCECNA.....
4145+
....OOAAAONA....
4146+
....OAA...OA....
4147+
....NOA..ONA....
4148+
.....ONONOAA....
4149+
......AAAAA.....
4150+
................
4151+
................
4152+
................
4153+
}
4154+
# tile 217 (gold / invisibility)
4155+
{
4156+
................
4157+
................
4158+
................
4159+
................
4160+
................
4161+
................
4162+
.....LHHHL......
4163+
....LHAAAHL.....
4164+
....HAA..AHA....
4165+
....HA....HA....
4166+
....LHA..HLA....
4167+
.....LHHHLAA....
4168+
......AAAAA.....
4169+
................
4170+
................
4171+
................
4172+
}
41734173
# tile 218 (circular / amulet of ESP)
41744174
{
41754175
................

0 commit comments

Comments
 (0)