buglist entry: hobbits and elven mithril armour
<Someone> wrote: "Also, hobbits can't wear armour, at least, you can't wear armour when polymorphed into a hobbit, even though hobbits do tend to be carrying elven mithril-coats. It's tempting to suggest adding an explicit exception in sliparm() for elven mithril just to keep the Tolkienness." - added a general routine for adding race-based /object combination exceptions. - hobbits can wear elven mithril-coats
This commit is contained in:
@@ -180,7 +180,24 @@ struct obj {
|
||||
objects[otmp->otyp].oc_armcat == ARM_SHIRT)
|
||||
#define is_suit(otmp) (otmp->oclass == ARMOR_CLASS && \
|
||||
objects[otmp->otyp].oc_armcat == ARM_SUIT)
|
||||
#define is_elven_armor(otmp) ((otmp)->otyp == ELVEN_LEATHER_HELM\
|
||||
|| (otmp)->otyp == ELVEN_MITHRIL_COAT\
|
||||
|| (otmp)->otyp == ELVEN_CLOAK\
|
||||
|| (otmp)->otyp == ELVEN_SHIELD\
|
||||
|| (otmp)->otyp == ELVEN_BOOTS)
|
||||
#define is_orcish_armor(otmp) ((otmp)->otyp == ORCISH_HELM\
|
||||
|| (otmp)->otyp == ORCISH_CHAIN_MAIL\
|
||||
|| (otmp)->otyp == ORCISH_RING_MAIL\
|
||||
|| (otmp)->otyp == ORCISH_CLOAK\
|
||||
|| (otmp)->otyp == URUK_HAI_SHIELD\
|
||||
|| (otmp)->otyp == ORCISH_SHIELD)
|
||||
#define is_dwarvish_armor(otmp) ((otmp)->otyp == DWARVISH_IRON_HELM\
|
||||
|| (otmp)->otyp == DWARVISH_MITHRIL_COAT\
|
||||
|| (otmp)->otyp == DWARVISH_CLOAK\
|
||||
|| (otmp)->otyp == DWARVISH_ROUNDSHIELD)
|
||||
#define is_gnomish_armor(otmp) (FALSE)
|
||||
|
||||
|
||||
/* Eggs and other food */
|
||||
#define MAX_EGG_HATCH_TIME 200 /* longest an egg can remain unhatched */
|
||||
#define stale_egg(egg) ((monstermoves - (egg)->age) > (2*MAX_EGG_HATCH_TIME))
|
||||
@@ -212,6 +229,32 @@ struct obj {
|
||||
- GRAY_DRAGON_SCALE_MAIL]
|
||||
#define Dragon_to_scales(pm) (GRAY_DRAGON_SCALES + (pm - mons))
|
||||
|
||||
/* Elven gear */
|
||||
#define is_elven_obj(otmp) (is_elven_armor(otmp)\
|
||||
|| (otmp)->otyp == ELVEN_ARROW\
|
||||
|| (otmp)->otyp == ELVEN_SPEAR\
|
||||
|| (otmp)->otyp == ELVEN_DAGGER\
|
||||
|| (otmp)->otyp == ELVEN_SHORT_SWORD\
|
||||
|| (otmp)->otyp == ELVEN_BROADSWORD\
|
||||
|| (otmp)->otyp == ELVEN_BOW)
|
||||
|
||||
/* Orcish gear */
|
||||
#define is_orcish_obj(otmp) (is_orcish_armor(otmp)\
|
||||
|| (otmp)->otyp == ORCISH_ARROW\
|
||||
|| (otmp)->otyp == ORCISH_SPEAR\
|
||||
|| (otmp)->otyp == ORCISH_DAGGER\
|
||||
|| (otmp)->otyp == ORCISH_SHORT_SWORD\
|
||||
|| (otmp)->otyp == ORCISH_BOW)
|
||||
|
||||
/* Dwarvish gear */
|
||||
#define is_dwarvish_obj(otmp) (is_dwarvish_armor(otmp)\
|
||||
|| (otmp)->otyp == DWARVISH_SPEAR\
|
||||
|| (otmp)->otyp == DWARVISH_SHORT_SWORD\
|
||||
|| (otmp)->otyp == DWARVISH_MATTOCK)
|
||||
|
||||
/* Gnomish gear */
|
||||
#define is_gnomish_obj(otmp) (is_gnomish_armor(otmp))
|
||||
|
||||
/* Light sources */
|
||||
#define Is_candle(otmp) (otmp->otyp == TALLOW_CANDLE || \
|
||||
otmp->otyp == WAX_CANDLE)
|
||||
|
||||
Reference in New Issue
Block a user