Rename rust_dmg() to erode_obj().
This commit is contained in:
@@ -2203,7 +2203,7 @@ E coord *FDECL(gettrack, (int,int));
|
||||
/* ### trap.c ### */
|
||||
|
||||
E boolean FDECL(burnarmor,(struct monst *));
|
||||
E boolean FDECL(rust_dmg, (struct obj *,const char *,int,BOOLEAN_P,BOOLEAN_P));
|
||||
E boolean FDECL(erode_obj, (struct obj *,const char *,int,BOOLEAN_P,BOOLEAN_P));
|
||||
E boolean FDECL(grease_protect, (struct obj *,const char *,struct monst *));
|
||||
E struct trap *FDECL(maketrap, (int,int,int));
|
||||
E void FDECL(fall_through, (BOOLEAN_P));
|
||||
|
||||
@@ -1303,7 +1303,7 @@ register struct obj *obj;
|
||||
dmgtyp = ERODE_BURN;
|
||||
else
|
||||
return;
|
||||
(void) rust_dmg(obj, 0, dmgtyp, TRUE, TRUE);
|
||||
(void) erode_obj(obj, 0, dmgtyp, TRUE, TRUE);
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
|
||||
@@ -1931,7 +1931,7 @@ dodip()
|
||||
}
|
||||
|
||||
if (potion->otyp == POT_ACID) {
|
||||
if (rust_dmg(obj, 0, ERODE_CORRODE, TRUE, FALSE))
|
||||
if (erode_obj(obj, 0, ERODE_CORRODE, TRUE, FALSE))
|
||||
goto poof;
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ cursed_book(bp)
|
||||
case 5:
|
||||
pline_The("book was coated with contact poison!");
|
||||
if (uarmg) {
|
||||
rust_dmg(uarmg, "gloves", ERODE_CORRODE, TRUE, TRUE);
|
||||
erode_obj(uarmg, "gloves", ERODE_CORRODE, TRUE, TRUE);
|
||||
break;
|
||||
}
|
||||
/* temp disable in_use; death should not destroy the book */
|
||||
|
||||
10
src/trap.c
10
src/trap.c
@@ -55,7 +55,7 @@ struct monst *victim;
|
||||
int mat_idx;
|
||||
|
||||
if (!victim) return 0;
|
||||
#define burn_dmg(obj,descr) rust_dmg(obj, descr, ERODE_BURN, TRUE, FALSE)
|
||||
#define burn_dmg(obj,descr) erode_obj(obj, descr, ERODE_BURN, TRUE, FALSE)
|
||||
while (1) {
|
||||
switch (rn2(5)) {
|
||||
case 0:
|
||||
@@ -109,7 +109,7 @@ struct monst *victim;
|
||||
* "print", if set, means to print a message even if no change occurs.
|
||||
*/
|
||||
boolean
|
||||
rust_dmg(otmp, ostr, type, check_grease, print)
|
||||
erode_obj(otmp, ostr, type, check_grease, print)
|
||||
register struct obj *otmp;
|
||||
register const char *ostr;
|
||||
int type;
|
||||
@@ -151,7 +151,7 @@ boolean print;
|
||||
is_primary = FALSE;
|
||||
break;
|
||||
default:
|
||||
impossible("Invalid erosion type in rust_dmg");
|
||||
impossible("Invalid erosion type in erode_obj");
|
||||
return FALSE;
|
||||
}
|
||||
erosion = is_primary ? otmp->oeroded : otmp->oeroded2;
|
||||
@@ -3101,7 +3101,7 @@ struct obj *obj;
|
||||
obj->spe = 0;
|
||||
obj->dknown = 0;
|
||||
} else
|
||||
rust_dmg(obj, NULL, ERODE_CORRODE, TRUE, TRUE);
|
||||
erode_obj(obj, NULL, ERODE_CORRODE, TRUE, TRUE);
|
||||
}
|
||||
|
||||
/* returns:
|
||||
@@ -3195,7 +3195,7 @@ boolean force;
|
||||
return 2;
|
||||
}
|
||||
} else {
|
||||
return rust_dmg(obj, ostr, ERODE_RUST, FALSE, FALSE) ? 2 : 0;
|
||||
return erode_obj(obj, ostr, ERODE_RUST, FALSE, FALSE) ? 2 : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
30
src/uhitm.c
30
src/uhitm.c
@@ -47,34 +47,34 @@ int hurt;
|
||||
switch(rn2(5)) {
|
||||
case 0:
|
||||
target = which_armor(mdef, W_ARMH);
|
||||
if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE))
|
||||
if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE))
|
||||
continue;
|
||||
break;
|
||||
case 1:
|
||||
target = which_armor(mdef, W_ARMC);
|
||||
if (target) {
|
||||
(void)rust_dmg(target, xname(target), hurt, TRUE, TRUE);
|
||||
(void)erode_obj(target, xname(target), hurt, TRUE, TRUE);
|
||||
break;
|
||||
}
|
||||
if ((target = which_armor(mdef, W_ARM)) != (struct obj *)0) {
|
||||
(void)rust_dmg(target, xname(target), hurt, TRUE, TRUE);
|
||||
(void)erode_obj(target, xname(target), hurt, TRUE, TRUE);
|
||||
} else if ((target = which_armor(mdef, W_ARMU)) != (struct obj *)0) {
|
||||
(void)rust_dmg(target, xname(target), hurt, TRUE, TRUE);
|
||||
(void)erode_obj(target, xname(target), hurt, TRUE, TRUE);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
target = which_armor(mdef, W_ARMS);
|
||||
if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE))
|
||||
if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE))
|
||||
continue;
|
||||
break;
|
||||
case 3:
|
||||
target = which_armor(mdef, W_ARMG);
|
||||
if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE))
|
||||
if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE))
|
||||
continue;
|
||||
break;
|
||||
case 4:
|
||||
target = which_armor(mdef, W_ARMF);
|
||||
if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE))
|
||||
if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
@@ -2222,7 +2222,7 @@ boolean wep_was_destroyed;
|
||||
if(mhit && !mon->mcan) {
|
||||
if (aatyp == AT_KICK) {
|
||||
if (uarmf && !rn2(6))
|
||||
(void)rust_dmg(uarmf, xname(uarmf), ERODE_BURN, TRUE, TRUE);
|
||||
(void)erode_obj(uarmf, xname(uarmf), ERODE_BURN, TRUE, TRUE);
|
||||
} else if (aatyp == AT_WEAP || aatyp == AT_CLAW ||
|
||||
aatyp == AT_MAGC || aatyp == AT_TUCH)
|
||||
passive_obj(mon, (struct obj*)0, &(ptr->mattk[i]));
|
||||
@@ -2242,7 +2242,7 @@ boolean wep_was_destroyed;
|
||||
if (mhit) {
|
||||
if (aatyp == AT_KICK) {
|
||||
if (uarmf && !rn2(6))
|
||||
(void)rust_dmg(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE);
|
||||
(void)erode_obj(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE);
|
||||
} else if (aatyp == AT_WEAP || aatyp == AT_CLAW ||
|
||||
aatyp == AT_MAGC || aatyp == AT_TUCH)
|
||||
passive_obj(mon, (struct obj*)0, &(ptr->mattk[i]));
|
||||
@@ -2275,7 +2275,7 @@ boolean wep_was_destroyed;
|
||||
if(mhit && !mon->mcan) {
|
||||
if (aatyp == AT_KICK) {
|
||||
if (uarmf)
|
||||
(void)rust_dmg(uarmf, xname(uarmf), ERODE_RUST, TRUE, TRUE);
|
||||
(void)erode_obj(uarmf, xname(uarmf), ERODE_RUST, TRUE, TRUE);
|
||||
} else if (aatyp == AT_WEAP || aatyp == AT_CLAW ||
|
||||
aatyp == AT_MAGC || aatyp == AT_TUCH)
|
||||
passive_obj(mon, (struct obj*)0, &(ptr->mattk[i]));
|
||||
@@ -2285,7 +2285,7 @@ boolean wep_was_destroyed;
|
||||
if(mhit && !mon->mcan) {
|
||||
if (aatyp == AT_KICK) {
|
||||
if (uarmf)
|
||||
(void)rust_dmg(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE);
|
||||
(void)erode_obj(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE);
|
||||
} else if (aatyp == AT_WEAP || aatyp == AT_CLAW ||
|
||||
aatyp == AT_MAGC || aatyp == AT_TUCH)
|
||||
passive_obj(mon, (struct obj*)0, &(ptr->mattk[i]));
|
||||
@@ -2446,22 +2446,22 @@ struct attack *mattk; /* null means we find one internally */
|
||||
|
||||
case AD_FIRE:
|
||||
if(!rn2(6) && !mon->mcan) {
|
||||
(void) rust_dmg(obj, 0, ERODE_BURN, FALSE, FALSE);
|
||||
(void) erode_obj(obj, 0, ERODE_BURN, FALSE, FALSE);
|
||||
}
|
||||
break;
|
||||
case AD_ACID:
|
||||
if(!rn2(6)) {
|
||||
(void) rust_dmg(obj, 0, ERODE_CORRODE, FALSE, FALSE);
|
||||
(void) erode_obj(obj, 0, ERODE_CORRODE, FALSE, FALSE);
|
||||
}
|
||||
break;
|
||||
case AD_RUST:
|
||||
if(!mon->mcan) {
|
||||
(void) rust_dmg(obj, 0, ERODE_RUST, FALSE, FALSE);
|
||||
(void) erode_obj(obj, 0, ERODE_RUST, FALSE, FALSE);
|
||||
}
|
||||
break;
|
||||
case AD_CORR:
|
||||
if(!mon->mcan) {
|
||||
(void) rust_dmg(obj, 0, ERODE_CORRODE, FALSE, FALSE);
|
||||
(void) erode_obj(obj, 0, ERODE_CORRODE, FALSE, FALSE);
|
||||
}
|
||||
break;
|
||||
case AD_ENCH:
|
||||
|
||||
Reference in New Issue
Block a user