mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-04-07 09:00:43 +01:00
Bugfix: ETRAIT macros should check for weapon type
Instead of assuming it matches what's in oc_skill (some weapons have multiple skills)
This commit is contained in:
parent
e699ba6bbf
commit
fc5b2e3507
1 changed files with 3 additions and 3 deletions
|
@ -237,9 +237,9 @@ struct objclass {
|
|||
|| (trait == ETRAIT_QUICK && (mon) == &youmonst && obj->otyp == LONG_SWORD && activeFightingForm(FFORM_HALF_SWORD))\
|
||||
|| (trait == ETRAIT_PENETRATE_ARMOR && (mon) == &youmonst && obj->otyp == LONG_SWORD && activeFightingForm(FFORM_POMMEL))\
|
||||
) && \
|
||||
((mon) == &youmonst ? (P_SKILL(objects[(obj)->otyp].oc_skill) > P_BASIC ) : (((mon)->data->mflagsf&MF_MARTIAL_E) || ((mon)->data->mflagsf&MF_MARTIAL_S))))
|
||||
#define ROLL_ETRAIT(obj, mon, echance, schance) (((mon) == &youmonst ? (P_SKILL(objects[(obj)->otyp].oc_skill) > P_SKILLED) : ((mon)->data->mflagsf&MF_MARTIAL_E)) ? echance : schance)
|
||||
#define FFORM_ETRAIT(obj, mon) (objects[(obj)->otyp].expert_traits&FFORM_ETRAITS && ((mon) == &youmonst ? (P_SKILL(objects[(obj)->otyp].oc_skill) > P_BASIC ) : (((mon)->data->mflagsf&MF_MARTIAL_E) || ((mon)->data->mflagsf&MF_MARTIAL_S))))
|
||||
((mon) == &youmonst ? (P_SKILL(weapon_type(obj)) > P_BASIC ) : (((mon)->data->mflagsf&MF_MARTIAL_E) || ((mon)->data->mflagsf&MF_MARTIAL_S))))
|
||||
#define ROLL_ETRAIT(obj, mon, echance, schance) (((mon) == &youmonst ? (P_SKILL(weapon_type(obj)) > P_SKILLED) : ((mon)->data->mflagsf&MF_MARTIAL_E)) ? echance : schance)
|
||||
#define FFORM_ETRAIT(obj, mon) (objects[(obj)->otyp].expert_traits&FFORM_ETRAITS && ((mon) == &youmonst ? (P_SKILL(weapon_type(obj)) > P_BASIC ) : (((mon)->data->mflagsf&MF_MARTIAL_E) || ((mon)->data->mflagsf&MF_MARTIAL_S))))
|
||||
|
||||
struct objdescr {
|
||||
const char *oc_name; /* actual name */
|
||||
|
|
Loading…
Add table
Reference in a new issue