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:
@@ -1819,7 +1819,8 @@ struct obj *otmp;
|
||||
/* not cannibalism, but we use similar criteria
|
||||
for deciding whether to be sickened by this meal */
|
||||
if (rn2(2) && !CANNIBAL_ALLOWED())
|
||||
make_vomiting((long) rn1(g.context.victual.reqtime, 14), FALSE);
|
||||
make_vomiting((long) rn1(g.context.victual.reqtime, 14),
|
||||
FALSE);
|
||||
}
|
||||
break;
|
||||
case LEMBAS_WAFER:
|
||||
@@ -2031,10 +2032,13 @@ struct obj *otmp;
|
||||
RIN_INCREASE_DAMAGE);
|
||||
break;
|
||||
case RIN_PROTECTION:
|
||||
case AMULET_OF_GUARDING:
|
||||
accessory_has_effect(otmp);
|
||||
HProtection |= FROMOUTSIDE;
|
||||
u.ublessed = bounded_increase(u.ublessed, otmp->spe,
|
||||
RIN_PROTECTION);
|
||||
u.ublessed = bounded_increase(u.ublessed,
|
||||
(typ == RIN_PROTECTION) ? otmp->spe
|
||||
: 2, /* fixed amount for amulet */
|
||||
typ);
|
||||
g.context.botl = 1;
|
||||
break;
|
||||
case RIN_FREE_ACTION:
|
||||
@@ -2078,6 +2082,7 @@ struct obj *otmp;
|
||||
}
|
||||
case RIN_SUSTAIN_ABILITY:
|
||||
case AMULET_OF_LIFE_SAVING:
|
||||
case AMULET_OF_FLYING:
|
||||
case AMULET_OF_REFLECTION: /* nice try */
|
||||
/* can't eat Amulet of Yendor or fakes,
|
||||
* and no oc_prop even if you could -3.
|
||||
@@ -2839,7 +2844,9 @@ gethungry()
|
||||
need to check whether both rings are +0 protection or
|
||||
they'd both slip by the "is there another source?" test,
|
||||
but don't do that for both rings or they will both be
|
||||
treated as supplying "MC" when only one matters */
|
||||
treated as supplying "MC" when only one matters;
|
||||
note: amulet of guarding overrides both +0 rings and
|
||||
is caught by the (EProtection & ~W_RINGx) == 0L tests */
|
||||
&& (uleft->spe
|
||||
|| !objects[uleft->otyp].oc_charged
|
||||
|| (uleft->otyp == RIN_PROTECTION
|
||||
|
||||
Reference in New Issue
Block a user