fire god gifts should be fireproof
This commit is contained in:
parent
d331bfad55
commit
47e0e1fce8
7
god.c
7
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
io.c
2
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) {
|
||||
|
|
11
objects.c
11
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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue