diff --git a/god.c b/god.c index d155f29..864134e 100755 --- a/god.c +++ b/god.c @@ -1593,7 +1593,6 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) { f->obfrom = god->race->id; } break; - } } } @@ -1672,6 +1671,12 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) { } else { msg("You hear something hitting the ground."); } + + + // fire god's gifts are always fireproof + if (rid == R_GODFIRE) { + makefireproof(o); + } } } diff --git a/io.c b/io.c index 3ba3c52..dc2f325 100755 --- a/io.c +++ b/io.c @@ -8547,7 +8547,7 @@ char *makedesc_spell(objecttype_t *ot, char *retbuf) { return retbuf; } -// if wantunknown is set, lsit spells we DONT know. +// if wantunknown is set, list spells we DONT know. // otherwise list spells we DO know. // only include spells which cost <= mpcutoff void makespellchoicelist(prompt_t *pr, lifeform_t *lf, char *ques, char *ques2, enum SPELLSCHOOL wantschool, int wantunknown, int wantlowmp, int wanttoohard, int mpcutoff) { diff --git a/objects.c b/objects.c index db38bc2..ce454b0 100755 --- a/objects.c +++ b/objects.c @@ -2273,9 +2273,7 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum switch (wantom[n]->id) { case OM_FLAMING: // flaming weapons are immune to fire if (o->type->obclass->id == OC_WEAPON) { - if (!isimmuneto(o->flags, DT_FIRE, B_FALSE)) { - addflag(o->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL); - } + makefireproof(o); } break; case OM_FROZEN: @@ -9270,6 +9268,13 @@ int makedullermaybe(object_t *o, int howmuch) { return B_FALSE; } +flag_t *makefireproof(object_t *o) { + if (!o) return NULL; + + if (isimmuneto(o->flags, DT_FIRE, B_FALSE)) return NULL; + return addflag(o->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL); +} + void makeunequipped(lifeform_t *lf, object_t *o) { // remove the equipped flag killflagsofid(o->flags, F_EQUIPPED); diff --git a/objects.h b/objects.h index ce5b019..0617a75 100755 --- a/objects.h +++ b/objects.h @@ -265,6 +265,7 @@ lifeform_t *makeanimated(lifeform_t *lf, object_t *o, int level); void makecool(object_t *o, int howmuch, int howlong); int makeduller(object_t *o, int howmuch); int makedullermaybe(object_t *o, int howmuch); +flag_t *makefireproof(object_t *o); void makeunequipped(lifeform_t *lf, object_t *o); void makehot(object_t *o, int howmuch, int howlong); void makeknown(enum OBTYPE otid);