add two new types of amulet: flying and guarding
We haven't added any new objects or monsters in a really long time. This adds two new useful amulets, putting more pressure on the decision over which type of amulet to wear. amulet of flying: idea from slash'em, implemented from scratch. Should be self-explanatory. Polymorphing into a form capable of eating amulets and then eating one does not confer intrinsic flight. (I've no idea how slash'em behaves is in that regard.) amulet of guarding: adds +2 AC, which is fairly negligible, also +2 MC, which is not. Initially called amulet of protection but MC of 2 is referred to as 'guarded' by enlightenment so I changed it. (By that reasoning, rings of protection ought to be called rings of warding; oh, well.) Successfully eating one confers +2 AC without any MC benefit. When wearing one of these, rings of protection only confer AC, their +1 MC gets superseded rather than combined. Monsters will wear an amulet of guarding and gain both the AC and MC benefit, but if not cursed and they acquire one of life-saving or reflection, they'll swap. They won't wear an amulet of flying. I cloned two extra copies of the tile for one of the existing amulets and ran sys/share/objects.txt through renumtiles.pl. The result appears to be ok but on X11 the tiles map ends up looking psychedelic so something beyond the tile art itself needs to be fixed here.
This commit is contained in:
+7
-3
@@ -911,6 +911,7 @@ struct monst *mon;
|
||||
long wearmask;
|
||||
int armpro, mc = 0;
|
||||
boolean is_you = (mon == &g.youmonst),
|
||||
via_amul = FALSE,
|
||||
gotprot = is_you ? (EProtection != 0L)
|
||||
/* high priests have innate protection */
|
||||
: (mon->data == &mons[PM_HIGH_PRIEST]);
|
||||
@@ -921,6 +922,8 @@ struct monst *mon;
|
||||
armpro = objects[o->otyp].a_can;
|
||||
if (armpro > mc)
|
||||
mc = armpro;
|
||||
} else if ((o->owornmask & W_AMUL) != 0L) {
|
||||
via_amul = TRUE;
|
||||
}
|
||||
/* if we've already confirmed Protection, skip additional checks */
|
||||
if (is_you || gotprot)
|
||||
@@ -935,9 +938,10 @@ struct monst *mon;
|
||||
}
|
||||
|
||||
if (gotprot) {
|
||||
/* extrinsic Protection increases mc by 1 */
|
||||
if (mc < 3)
|
||||
mc += 1;
|
||||
/* extrinsic Protection increases mc by 1; 2 for amulet */
|
||||
mc += via_amul ? 2 : 1;
|
||||
if (mc > 3)
|
||||
mc = 3;
|
||||
} else if (mc < 1) {
|
||||
/* intrinsic Protection is weaker (play balance; obtaining divine
|
||||
protection is too easy); it confers minimum mc 1 instead of 0 */
|
||||
|
||||
Reference in New Issue
Block a user