dipping into burning potions
- candles, et al, light via catch_lit - non-weapons can be damaged - only flammable items can be damaged, previously SILVER objects, for example, would get a message, but add_erosion_words wouldn't display a damage word - can't track burnt food, put this in the "seems" case too - PLASTIC items are is_flammable, which is appropriate for all current uses - paper gets destroyed (special artifacts excepted by earlier check) - a cursed potion now spills even if not dipping weapons - charge for damaging unpaid objects this way - still very hard to destroy PYEC this way
This commit is contained in:
@@ -455,6 +455,8 @@ don't slap against the floor while riding and eating bad food
|
|||||||
got rid of "nori" (since it doesn't really translate "kelp frond" accurately)
|
got rid of "nori" (since it doesn't really translate "kelp frond" accurately)
|
||||||
engraving in fog-covered location on in the Wizard quest said you
|
engraving in fog-covered location on in the Wizard quest said you
|
||||||
engraved in air, not dust
|
engraved in air, not dust
|
||||||
|
dipping non-weapons into burning potions of oil had no effect
|
||||||
|
dipping arrows into burning potions resulted in rust damage
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
@@ -576,6 +578,7 @@ USER_SOUNDS compilation option to enable use of SOUND and SOUNDDIR variables
|
|||||||
resistance does not protect inventory from artifacts (cold vs Frost Brand,&c)
|
resistance does not protect inventory from artifacts (cold vs Frost Brand,&c)
|
||||||
phrase the prompts for P and R commands using "put on" and "remove" as the
|
phrase the prompts for P and R commands using "put on" and "remove" as the
|
||||||
actions rather than repeating W and T commands' "wear" and "take off"
|
actions rather than repeating W and T commands' "wear" and "take off"
|
||||||
|
dipping candles, et al, into burning potions lights them
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific New Features
|
Platform- and/or Interface-Specific New Features
|
||||||
|
|||||||
+2
-2
@@ -1045,12 +1045,12 @@ is_flammable(otmp)
|
|||||||
register struct obj *otmp;
|
register struct obj *otmp;
|
||||||
{
|
{
|
||||||
int otyp = otmp->otyp;
|
int otyp = otmp->otyp;
|
||||||
|
int omat = objects[otyp].oc_material;
|
||||||
|
|
||||||
if (objects[otyp].oc_oprop == FIRE_RES || otyp == WAN_FIRE)
|
if (objects[otyp].oc_oprop == FIRE_RES || otyp == WAN_FIRE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return((boolean)(objects[otyp].oc_material <= WOOD &&
|
return((boolean)((omat <= WOOD && omat != LIQUID) || omat == PLASTIC));
|
||||||
objects[otyp].oc_material != LIQUID));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
|
|||||||
+18
-8
@@ -1733,18 +1733,20 @@ dodip()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (potion->otyp == POT_OIL &&
|
if (potion->otyp == POT_OIL) {
|
||||||
(obj->oclass == WEAPON_CLASS || is_weptool(obj))) {
|
|
||||||
boolean wisx = FALSE;
|
boolean wisx = FALSE;
|
||||||
if (potion->lamplit) { /* burning */
|
if (potion->lamplit) { /* burning */
|
||||||
int omat = objects[obj->otyp].oc_material;
|
int omat = objects[obj->otyp].oc_material;
|
||||||
if (obj->oerodeproof || obj_resists(obj, 5, 95) ||
|
/* the code here should be merged with fire_damage */
|
||||||
/* `METAL' should not be confused with is_metallic() */
|
if (catch_lit(obj)) {
|
||||||
omat == METAL || omat == MITHRIL || omat == BONE) {
|
/* catch_lit does all the work if true */
|
||||||
|
} else if (obj->oerodeproof || obj_resists(obj, 5, 95) ||
|
||||||
|
!is_flammable(obj) || obj->oclass == FOOD_CLASS) {
|
||||||
pline("%s %s to burn for a moment.",
|
pline("%s %s to burn for a moment.",
|
||||||
Yname2(obj), otense(obj, "seem"));
|
Yname2(obj), otense(obj, "seem"));
|
||||||
} else {
|
} else {
|
||||||
if (omat == PLASTIC) obj->oeroded = MAX_ERODE;
|
if ((omat == PLASTIC || omat == PAPER) && !obj->oartifact)
|
||||||
|
obj->oeroded = MAX_ERODE;
|
||||||
pline_The("burning oil %s %s.",
|
pline_The("burning oil %s %s.",
|
||||||
obj->oeroded == MAX_ERODE ? "destroys" : "damages",
|
obj->oeroded == MAX_ERODE ? "destroys" : "damages",
|
||||||
yname(obj));
|
yname(obj));
|
||||||
@@ -1753,8 +1755,12 @@ dodip()
|
|||||||
obfree(obj, (struct obj *)0);
|
obfree(obj, (struct obj *)0);
|
||||||
obj = (struct obj *) 0;
|
obj = (struct obj *) 0;
|
||||||
} else {
|
} else {
|
||||||
/* should check for and do something about
|
/* we know it's carried */
|
||||||
damaging unpaid shop goods here */
|
if (obj->unpaid) {
|
||||||
|
/* create a dummy duplicate to put on bill */
|
||||||
|
verbalize("You burnt it, you bought it!");
|
||||||
|
bill_dummy_object(obj);
|
||||||
|
}
|
||||||
obj->oeroded++;
|
obj->oeroded++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1762,6 +1768,9 @@ dodip()
|
|||||||
pline_The("potion spills and covers your %s with oil.",
|
pline_The("potion spills and covers your %s with oil.",
|
||||||
makeplural(body_part(FINGER)));
|
makeplural(body_part(FINGER)));
|
||||||
incr_itimeout(&Glib, d(2,10));
|
incr_itimeout(&Glib, d(2,10));
|
||||||
|
} else if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) {
|
||||||
|
/* the following cases apply only to weapons */
|
||||||
|
goto more_dips;
|
||||||
/* Oil removes rust and corrosion, but doesn't unburn.
|
/* Oil removes rust and corrosion, but doesn't unburn.
|
||||||
* Arrows, etc are classed as metallic due to arrowhead
|
* Arrows, etc are classed as metallic due to arrowhead
|
||||||
* material, but dipping in oil shouldn't repair them.
|
* material, but dipping in oil shouldn't repair them.
|
||||||
@@ -1785,6 +1794,7 @@ dodip()
|
|||||||
useup(potion);
|
useup(potion);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
more_dips:
|
||||||
|
|
||||||
/* Allow filling of MAGIC_LAMPs to prevent identification by player */
|
/* Allow filling of MAGIC_LAMPs to prevent identification by player */
|
||||||
if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP) &&
|
if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user