polywarn (trunk only)
This patch increments editlevel making existing save and bones files useless. Add polywarn() code to grant the ability to detect certain monster types while polymorphed into other specific monster types. If you polymorph into a vampire or vampire lord, you are able to sense humans. And just for fun, if you polymorph into a purple worm, you are able to sense shriekers :-)
This commit is contained in:
22
src/cmd.c
22
src/cmd.c
@@ -975,13 +975,29 @@ int final; /* 0 => still in progress; 1 => over, survived; 2 => dead */
|
||||
from_what(SEE_INVIS));
|
||||
if (Blind_telepat) you_are("telepathic",from_what(TELEPAT));
|
||||
if (Warning) you_are("warned", from_what(WARNING));
|
||||
if (Warn_of_mon && context.warntype) {
|
||||
if (Warn_of_mon && context.warntype.obj) {
|
||||
Sprintf(buf, "aware of the presence of %s",
|
||||
(context.warntype & M2_ORC) ? "orcs" :
|
||||
(context.warntype & M2_DEMON) ? "demons" :
|
||||
(context.warntype.obj & M2_ORC) ? "orcs" :
|
||||
(context.warntype.obj & M2_DEMON) ? "demons" :
|
||||
something);
|
||||
you_are(buf,from_what(WARN_OF_MON));
|
||||
}
|
||||
if (Warn_of_mon && context.warntype.polyd) {
|
||||
Sprintf(buf, "aware of the presence of %s",
|
||||
((context.warntype.polyd &
|
||||
(M2_HUMAN|M2_ELF))==(M2_HUMAN|M2_ELF)) ? "humans and elves" :
|
||||
(context.warntype.polyd & M2_HUMAN) ? "humans" :
|
||||
(context.warntype.polyd & M2_ELF) ? "elves" :
|
||||
(context.warntype.polyd & M2_ORC) ? "orcs" :
|
||||
(context.warntype.polyd & M2_DEMON) ? "demons" :
|
||||
"certain monsters");
|
||||
you_are(buf,from_what(WARN_OF_MON));
|
||||
}
|
||||
if (Warn_of_mon && context.warntype.speciesidx) {
|
||||
Sprintf(buf, "aware of the presence of %s",
|
||||
makeplural(mons[context.warntype.speciesidx].mname));
|
||||
you_are(buf,from_what(WARN_OF_MON));
|
||||
}
|
||||
if (Undead_warning) you_are("warned of undead",from_what(WARN_UNDEAD));
|
||||
if (Searching) you_have("automatic searching",from_what(SEARCHING));
|
||||
if (Clairvoyant) you_are("clairvoyant",from_what(CLAIRVOYANT));
|
||||
|
||||
Reference in New Issue
Block a user