breaking crystal armor
Instead of a 5% chance for crystal plate mail or crystal helmet to break each time it's subjected to breakage, switch to a 10% chance but the damage is treated as erosion rather than break/don't-break. 'crystal foo' will need to go through four stages of damage before breaking: cracked crystal foo, very cracked crystal foo, thoroughly cracked crystal foo, then gone. Crackproof handling is included, described as tempered crystal foo. It mostly still applies to throwing and kicking the item. Having some hits trigger damage might be worthwhile but isn't implemented. Object creation within lua code probably needs to be updated, and when the Mitre of Holiness is created in the priest/priestess quest it should start out as tempered (erodeproof). Perhaps it ought to be erodeproof regardless of where/how it's created.
This commit is contained in:
@@ -658,7 +658,7 @@ extern int thitmonst(struct monst *, struct obj *);
|
||||
extern int hero_breaks(struct obj *, coordxy, coordxy, unsigned);
|
||||
extern int breaks(struct obj *, coordxy, coordxy);
|
||||
extern void release_camera_demon(struct obj *, coordxy, coordxy);
|
||||
extern void breakobj(struct obj *, coordxy, coordxy, boolean, boolean);
|
||||
extern int breakobj(struct obj *, coordxy, coordxy, boolean, boolean);
|
||||
extern boolean breaktest(struct obj *);
|
||||
extern boolean walk_path(coord *, coord *,
|
||||
boolean(*)(void *, coordxy, coordxy), genericptr_t);
|
||||
|
||||
@@ -303,7 +303,8 @@ enum cost_alteration_types {
|
||||
COST_BRKLCK = 15, /* break box/chest's lock */
|
||||
COST_RUST = 16, /* rust damage */
|
||||
COST_ROT = 17, /* rotting attack */
|
||||
COST_CORRODE = 18 /* acid damage */
|
||||
COST_CORRODE = 18, /* acid damage */
|
||||
COST_CRACK = 19, /* damage to crystal armor */
|
||||
};
|
||||
|
||||
/* read.c, create_particular() & create_particular_parse() */
|
||||
|
||||
@@ -436,6 +436,7 @@ struct obj {
|
||||
#define ERODE_RUST 1
|
||||
#define ERODE_ROT 2
|
||||
#define ERODE_CORRODE 3
|
||||
#define ERODE_CRACK 4 /* crystal armor */
|
||||
|
||||
/* erosion flags for erode_obj() */
|
||||
#define EF_NONE 0
|
||||
|
||||
@@ -192,6 +192,9 @@ extern NEARDATA struct objdescr obj_descr[NUM_OBJECTS + 1];
|
||||
/* primary damage: fire/rust/--- */
|
||||
/* is_flammable(otmp), is_rottable(otmp) in mkobj.c */
|
||||
#define is_rustprone(otmp) (objects[otmp->otyp].oc_material == IRON)
|
||||
#define is_crackable(otmp) \
|
||||
(objects[(otmp)->otyp].oc_material == GLASS \
|
||||
&& (otmp)->oclass == ARMOR_CLASS) /* erosion_matters() */
|
||||
/* secondary damage: rot/acid/acid */
|
||||
#define is_corrodeable(otmp) \
|
||||
(objects[otmp->otyp].oc_material == COPPER \
|
||||
@@ -199,6 +202,7 @@ extern NEARDATA struct objdescr obj_descr[NUM_OBJECTS + 1];
|
||||
/* subject to any damage */
|
||||
#define is_damageable(otmp) \
|
||||
(is_rustprone(otmp) || is_flammable(otmp) \
|
||||
|| is_rottable(otmp) || is_corrodeable(otmp))
|
||||
|| is_rottable(otmp) || is_corrodeable(otmp) \
|
||||
|| is_crackable(otmp))
|
||||
|
||||
#endif /* OBJCLASS_H */
|
||||
|
||||
Reference in New Issue
Block a user