- [+] clouds of smoke (or anything gaseous) shouldn't be able to fall!

- [+] BUG: after giant ant digs a hole:
    - [+] ERROR - unlinked stairs! should have been linked during map
          creation.
          ERROR - can't find opposite end of stairs/portal!
    - [+] upstaircase on the new level is being linked to a hole.
    - [+] fixed?
    - [+] test again... (dig down, check log.txt for linking to wrong
          type)
- [+] giant ant should be able to dig dirt at will(to escape)
- [+] mimic ??
    - [+] pretends to be an ornate chest.
- [+] new monsters
    - [+] gluon should be an ooze.
    - [+] hag
    - [+] phase spider (wlak through walls!)
    - [+] basilisk
- [+] better description for rusted armour.
- [+] fix crash when creating up holes.
This commit is contained in:
Rob Pearce 2012-12-19 10:42:22 +00:00
parent c1cb8ea62e
commit 67d6d4b30b
14 changed files with 502 additions and 241 deletions

5
ai.c
View File

@ -3131,6 +3131,11 @@ int aispellok(lifeform_t *lf, enum OBTYPE spellid, lifeform_t *victim, enum FLAG
if ((ot->id == OT_S_PAIN) && lfhasflag(victim, F_PAIN)) {
specificcheckok = B_FALSE;
}
if (ot->id == OT_S_PETRIFY) {
if (lfhasflag(victim, F_BEINGSTONED) || (victim->material->id == MT_STONE) ) {
specificcheckok = B_FALSE;
}
}
if ((ot->id == OT_S_HEALING) && (lf->hp >= lf->maxhp)) {
specificcheckok = B_FALSE;
}

527
data.c
View File

@ -2842,6 +2842,12 @@ void initobjects(void) {
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ISMONSTER, R_GARGOYLE, OT_STATUE, 140, "3,1"); // reveal if within 3 cells
addflag(lastot->flags, F_NOOBDIETEXT, B_TRUE, NA, NA, NULL);
addot(OT_MIMIC, "mimic", "A chest which is actually a mimic!", MT_GOLD, 80, OC_TRAP, SZ_MEDIUM);
addflag(lastot->flags, F_GLYPH, C_LIGHTYELLOW, '(', NA, NULL);
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ISMONSTER, R_MIMIC, OT_CHESTORNATE, 150, "1,1"); // reveal if within 1 cells
addflag(lastot->flags, F_NOOBDIETEXT, B_TRUE, NA, NA, NULL);
// traps - object only
addot(OT_TRAPNEEDLEP, "poison needle trap", "A springed needle coated with poison.", MT_NOTHING, 0, OC_TRAP, SZ_SMALL);
@ -5657,6 +5663,7 @@ void initobjects(void) {
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
addflag(lastot->flags, F_VARPOWER, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_DONTNEED, NA, NULL);
addflag(lastot->flags, F_AICASTTOATTACK, ST_ANYWHERE, NA, NA, NULL);
addot(OT_S_DARKNESS, "darkness", "Permenantly darkens the area around the caster.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power III, you can control where the darkness appears.");
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At Power V, the entire map becomes darker.");
@ -7968,7 +7975,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
addflag(lastot->flags, F_DTRESIST, DT_FIRE, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_DTRESIST, DT_FIRE, NA, NULL);
@ -7983,7 +7989,6 @@ void initobjects(void) {
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL);
addflag(lastot->flags, F_UNDERCLOTHING, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
addflag(lastot->flags, F_ATTREQ, A_AGI, 15, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 33, NA, NA, NULL);
@ -8096,7 +8101,6 @@ void initobjects(void) {
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL);
addflag(lastot->flags, F_UNDERCLOTHING, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 10, 10, NA, NULL);
addflag(lastot->flags, F_ATTREQ, A_AGI, 15, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 50, NA, NA, NULL);
@ -8166,7 +8170,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_GOESON, BP_LEGS, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 15, 15, NA, NULL);
addflag(lastot->flags, F_ATTREQ, A_AGI, 15, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 60, NA, NA, NULL);
@ -8205,7 +8208,6 @@ void initobjects(void) {
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_GOESON, BP_FEET, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 10, 10, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 30, NA, NA, NULL);
addflag(lastot->flags, F_STARTSPLAIN, B_TRUE, NA, NA, NULL);
@ -8214,7 +8216,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_FEET, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 15, 15, NA, NULL);
addflag(lastot->flags, F_ATTREQ, A_AGI, 35, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 85, NA, NA, NULL);
@ -8222,7 +8223,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_FEET, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_ARMOURPENALTY, 0, 5, NULL);
addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_DTRESIST, DT_ELECTRIC, NA, NULL);
@ -8261,7 +8261,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_HANDS, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
addflag(lastot->flags, F_ATTREQ, A_AGI, 15, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 70, NA, NA, NULL);
@ -8288,14 +8287,12 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 10, 10, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_STARTSPLAIN, B_TRUE, NA, NA, NULL);
addot(OT_PIRATEHAT, "tricorne", "A three cornered hat with a skull and crossbones emblem.", MT_CLOTH, 1, OC_ARMOUR, SZ_SMALL);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 10, 10, NA, NULL);
addflag(lastot->flags, F_SCARY, 10, NA, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
@ -8304,7 +8301,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ICECAVE, NA, RR_COMMON, NULL);
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 10, 10, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_ANONYMOUS, NA, NA, NULL);
@ -8315,7 +8311,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_STARTSPLAIN, B_TRUE, NA, NA, NULL);
@ -8323,7 +8318,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_STARTSPLAIN, B_TRUE, NA, NA, NULL);
@ -8335,6 +8329,7 @@ void initobjects(void) {
addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_DTIMMUNE, DT_POISONGAS, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_VISRANGEMOD, -4, NA, NULL);
addflag(lastot->flags, F_TINTED, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 65, NA, NA, NULL);
addflag(lastot->flags, F_STARTSPLAIN, B_TRUE, NA, NA, NULL);
@ -8396,7 +8391,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL);
@ -8406,7 +8400,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 15, 15, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_VISRANGEMOD, 1, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
@ -8416,7 +8409,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 15, 15, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_VISRANGEMOD, -1, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_NIGHTVISRANGEMOD, -1, NA, NULL);
@ -8826,9 +8818,10 @@ void initobjects(void) {
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ATTACKVERB, NA, 2, NA, "scratch");
addflag(lastot->flags, F_ATTACKVERB, 3, 6, NA, "claw");
addflag(lastot->flags, F_ATTACKVERB, 7, 12, NA, "tear");
addflag(lastot->flags, F_ATTACKVERB, 13, 18, NA, "rake");
addflag(lastot->flags, F_ATTACKVERB, 19, 24, NA, "gouge");
addflag(lastot->flags, F_ATTACKVERB, 7, 10, NA, "tear");
addflag(lastot->flags, F_ATTACKVERB, 11, 14, NA, "rake");
addflag(lastot->flags, F_ATTACKVERB, 15, 18, NA, "gouge");
addflag(lastot->flags, F_ATTACKVERB, 19, 24, NA, "rend");
addflag(lastot->flags, F_ATTACKVERB, 25, NA, NA, "shred");
addflag(lastot->flags, F_KILLVERB, 70, NA, NA, "disembowel");
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
@ -11737,7 +11730,7 @@ void initrace(void) {
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "sating hunger");
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "healing you");
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "restoring your mana");
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "creating holy water");
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "blessing water");
// god bonuses
addflag(lastrace->flags, F_GODBONUS, PL_PLEASED, GB_FLAG, F_STAMBOOST, "3");
addflag(lastrace->flags, F_GODBONUS, PL_DELIGHTED, GB_FLAG, F_HOLYTOUCH, "1");
@ -12007,6 +12000,44 @@ void initrace(void) {
addflag(lastrace->flags, F_GODDECLINE, NA, NA, NA, "I understand.");
// monsters
addrace(R_BASILISK, "basilisk", 150, ':', C_RED, MT_FLESH, RC_DRAGON, "An eight-legged reptile with a yellow-ish belly. Beware its gaze!");
setbodytype(lastrace, BT_QUADRAPED);
addbodypart(lastrace, BP_TAIL, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_EXLOW, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_VERYRARE, NULL);
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
//addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "splash of cockatrice blood");
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^hissing");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, SV_CAR, NA, "hisses^a loud hissing");
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 3, NA, "roars in pain^roars of pain");
addflag(lastrace->flags, F_FOLLOWTIME, 5, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_S_PETRIFY, NA, NA, "range:3;pw:5;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gazes");
addflag(lastrace->flags, F_CASTTYPE, OT_S_PETRIFY, CT_GAZE, NA, NULL);
addflag(lastrace->flags, F_CASTCHANCE, 75, NA, NA, NULL);
addflag(lastrace->flags, F_CASTWITHOUTIQ, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_DTIMMUNE, DT_PETRIFY, B_TRUE, NA, NULL);
addflag(lastrace->flags, F_MORALE, 20, NA, NA, NULL);
addflag(lastrace->flags, F_EATMUTATE, F_DTIMMUNE, DT_PETRIFY, NA, "90");
addflag(lastrace->flags, F_FILLPOT, OT_POT_BLOODC, BLOODFORPOT, NA, NULL);
addrace(R_BEHOLDER, "beholder", 5, 'e', C_MAGENTA, MT_FLESH, RC_MAGIC, "A floating orb of flesh with a large mouth, single central eye, and numerous smaller eyestalks.");
addbodypart(lastrace, BP_BODY, NULL);
addbodypart(lastrace, BP_EYES, "eyestalks");
@ -12220,8 +12251,8 @@ void initrace(void) {
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
//addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "splash of cockatrice blood");
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^clucking");
@ -12233,6 +12264,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL);
addflag(lastrace->flags, F_MORALE, 20, NA, NA, NULL);
addflag(lastrace->flags, F_EATMUTATE, F_DTIMMUNE, DT_PETRIFY, NA, "50");
addflag(lastrace->flags, F_FILLPOT, OT_POT_BLOODC, BLOODFORPOT, NA, NULL);
// special attack handled in attack.c
addrace(R_CREEPINGCLAW, "creeping claw", 3, 'x', C_FLESH, MT_FLESH, RC_MAGIC, "A disembodied hand, animated by magic. Its favourite pastime is to leap onto unsuspecting victims and crush the life out of them.");
@ -12291,7 +12323,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_S_CLOUDKILL, NA, NA, "pw:1;range:1;");
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL);
addflag(lastrace->flags, F_PRETENDSTOBE, OT_GOLD, NA, NA, NULL);
addflag(lastrace->flags, F_PRETENDSTOBE, OT_COINSHIDING, NA, NA, NULL);
addrace(R_DARKMANTLE, "darklurk", 70, 'U', C_DARKBLUE, MT_FLESH, RC_MAGIC, "A floating squid-like creature, rarely seen due to its ability to cloak itself in a magical darkness. They use their huge tentacles to grab then crush their unsuspecting prey.");
addbodypart(lastrace, BP_BODY, NULL);
@ -13242,6 +13274,40 @@ void initrace(void) {
addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HATESRACEWITHFLAG, F_EQUINE, NA, NA, NULL);
addrace(R_HAG, "hag", 160, 'h', C_VDARKGREY, MT_FLESH, RC_HUMANOID, "A withered old woman whose form belies her extraordinary might.");
setbodytype(lastrace, BT_HUMANOID);
addflag(lastrace->flags, F_GENDER, G_FEMALE, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_EXHIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_VHIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "robe");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 20, NA, NA, NULL);
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_FLIP, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_MIST, NA, NA, "pw:10;");
addflag(lastrace->flags, F_CANCAST, OT_S_MIRRORIMAGE, 10, 10, "pw:3;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "grins");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "cackles");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures");
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
addrace(R_HIPPOGRIFF, "hippogriff", 500, 'u', C_YELLOW, MT_FLESH, RC_ANIMAL, "Hippogriffs are fierce hybrids of a horse and an eagle. Their head, wings and claws take the form of the latter.");
setbodytype(lastrace, BT_QUADRAPED);
addbodypart(lastrace, BP_TAIL, NULL);
@ -13386,7 +13452,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL);
addflag(lastrace->flags, F_HITCONFER, F_ASLEEP, SC_CON, 140, "10-30");
addflag(lastrace->flags, F_HITCONFER, F_ASLEEP, SC_CON, 100, "10-30");
addflag(lastrace->flags, F_HITCONFERVALS, NA, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL);
addflag(lastrace->flags, F_RESISTMAG, 50, NA, NA, NULL);
@ -13685,6 +13751,37 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL);
addrace(R_MIMIC, "mimic", 50, '(', C_LIGHTYELLOW, MT_FLESH, RC_MAGIC, "Mimics are insidious creations which were originally devised to deter thieves. Appearing to be a common chest, they will leap into battle at the slightest touch.");
addbodypart(lastrace, BP_BODY, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_GETKILLEDVERB, NA, NA, NA, "defeat");
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_EXLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_EXLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_VHIGH, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL);
addflag(lastrace->flags, F_ADHESIVE, 150, NA, NA, NULL);
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOBREATH, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOSTAM, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOTAKECRITS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NONAUSEA, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL);
addflag(lastrace->flags, F_PRETENDSTOBE, OT_MIMIC, NA, NA, NULL);
addrace(R_MINOTAUR, "minotaur", 130, 'H', C_LIGHTBROWN, MT_FLESH, RC_HUMANOID, "Legendary creatures with the head of a bull, with a strength and temperament to match.");
setbodytype(lastrace, BT_HUMANOID);
noarmouron(lastrace, BP_HEAD);
@ -14671,37 +14768,6 @@ void initrace(void) {
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATMUTATE, F_DTRESIST, DT_COLD, NA, "50");
addrace(R_OOZEGREY, "sizzling slime", 10, 'j', C_DARKGREEN, MT_SLIME, RC_SLIME, "Exactly what it sounds like - a small lump of green ooze. Green, acidic ooze.");
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "puddle of slime");
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_ACIDATTACK, 8, NA, NULL);
addflag(lastrace->flags, F_TREMORSENSE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slurping");
addflag(lastrace->flags, F_DTIMMUNE, DT_ACID, B_TRUE, NA, NULL);
addflag(lastrace->flags, F_AUTOCREATEOB, 0, NA, NA, "puddle of acid");
addflag(lastrace->flags, F_DIESPLATTER, 3, 0, NA, "splash of acid");
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
addrace(R_SINKMITE, "sinkmite", 2, 'm', C_GREY, MT_FLESH, RC_ANIMAL, "A mutated humanoid with large drills in place of hands. It gained its name from its ability to 'sink' out of range when threatened.");
setbodytype(lastrace, BT_HUMANOID);
@ -15477,29 +15543,6 @@ void initrace(void) {
addflag(lastrace->flags, F_DTRESIST, DT_BASH, NA, NA, NULL);
addflag(lastrace->flags, F_FILLPOT, OT_POT_FURY, BLOODFORPOT, NA, NULL);
addrace(R_GLUON, "gluon", 1, 'F', C_YELLOW, MT_PLANT, RC_PLANT, "A walking plant-based monster whose body is covered with a thick glue-like secretion.");
addbodypart(lastrace, BP_BODY, "stalk");
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_EXLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_EXLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_ACIDATTACK, 5, NA, NULL);
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_ADHESIVE, 100, NA, NA, NULL);
addrace(R_IVYRAPID, "rapid ivy", 1, 'F', C_CYAN, MT_PLANT, RC_PLANT, "A strain of ivy which reproduces with incredible speed. Farmers find it difficult to remove due to its sharp spines.");
addbodypart(lastrace, BP_BODY, "stalk");
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
@ -16160,6 +16203,38 @@ void initrace(void) {
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 6, NA, NA, NULL);
addrace(R_ANTW, "giant worker ant", 20, 'a', C_BROWN, MT_FLESH, RC_ANIMAL, "Giant worker ants are resonsible for the creation of giant ant nests. They can dig at amazing speeds and have been known to use this capability during battle.");
setbodytype(lastrace, BT_QUADRAPED);
lastrace->baseid = R_ANT;
addflag(lastrace->flags, F_TERRITORIAL, 3, NA , NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_FREQUENT, NULL);
addflag(lastrace->flags, F_NUMAPPEAR, 1, 2, NA, "");
addflag(lastrace->flags, F_ARMOURRATING, 6, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LTAVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, "");
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_TOOCLOSE, 2, NA, "clacks its mandibles^a loud clacking");
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^scuttling");
addflag(lastrace->flags, F_CANWILL, OT_S_DIG, NA, NA, "pw:1;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_DIG, NA, NA, "starts digging");
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 6, NA, NA, NULL);
addrace(R_ANTS, "giant soldier ant", 25, 'a', C_ORANGE, MT_FLESH, RC_ANIMAL, "The fighter of the giant ant family. Giant soldier ants are equipped with a powerful acidic stinger.");
setbodytype(lastrace, BT_QUADRAPED);
lastrace->baseid = R_ANT;
@ -16183,8 +16258,8 @@ void initrace(void) {
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, "");
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_STING, 4, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_STING, 6, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, "dam:1d6;");
addflag(lastrace->flags, F_CANWILL, OT_A_STINGACID, NA, NA, "dam:3d3;needgrab:1;");
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
@ -16848,112 +16923,6 @@ void initrace(void) {
addflag(lastrace->flags, F_DTRESIST, DT_COLD, B_TRUE, NA, NULL);
addflag(lastrace->flags, F_EATMUTATE, F_DTRESIST, DT_COLD, NA, "20");
addrace(R_LEECH, "giant leech", 10, 'j', C_MAGENTA, MT_FLESH, RC_ANIMAL, "A boneless blood-sucking creature. Quite dangerous until it eats it becomes satiated with blood, at which point it will slither off and fall asleep.");
addbodypart(lastrace, BP_BODY, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_VULNTOSALT, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:2;");
addflag(lastrace->flags, F_CANWILL, OT_A_SUCKBLOOD, NA, NA, "dam:0d1+2;");
addflag(lastrace->flags, F_WANTS, OT_BLOODSPLASH, B_COVETS, NA, NULL);
addflag(lastrace->flags, F_WANTS, OT_BLOODPOOL, B_COVETS, NA, NULL);
addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL);
addflag(lastrace->flags, F_WALKVERB, NA, NA, NA, "slither");
addrace(R_LEECHMIND, "baby mind leech", 10, 'j', C_PINK, MT_FLESH, RC_ANIMAL, "A mutated form of leech which feeds on one's intellect.");
addbodypart(lastrace, BP_BODY, NULL);
lastrace->baseid = R_LEECH;
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_VULNTOSALT, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_VERYRARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:2;");
addflag(lastrace->flags, F_CANWILL, OT_S_MINDWHIP, NA, NA, "range:1;pw:1;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_MINDWHIP, NA, NA, "sways");
addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL);
addflag(lastrace->flags, F_WALKVERB, NA, NA, NA, "slither");
addrace(R_LEECHMINDA, "mind leech", 10, 'j', C_LIGHTPINK, MT_FLESH, RC_ANIMAL, "A mutated form of leech which feeds on one's intellect.");
addbodypart(lastrace, BP_BODY, NULL);
lastrace->baseid = R_LEECH;
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_VULNTOSALT, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_VHIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_VERYRARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:2;");
addflag(lastrace->flags, F_CANWILL, OT_S_MFEEDBACK, NA, NA, "range:1;pw:1;");
addflag(lastrace->flags, F_CANWILL, OT_S_DRAINIQ, NA, NA, "range:1;pw:2;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_MFEEDBACK, NA, NA, "sways");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_DRAINIQ, NA, NA, "sways");
addflag(lastrace->flags, F_CASTCHANCE, 80, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL);
addflag(lastrace->flags, F_WALKVERB, NA, NA, NA, "slither");
addflag(lastrace->flags, F_FILLPOT, OT_POT_MAGIC, BLOODFORPOT, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_IQ, 10, "75");
addrace(R_MAMMOTH, "mammoth", 6000, 'Q', C_DARKYELLOW, MT_LEATHER, RC_ANIMAL, "A massive ancenstor of the elephant, mammoths are covered with fur, slightly larger and more dangerous.");
setbodytype(lastrace, BT_QUADRAPED);
@ -17376,6 +17345,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATMUTATE, F_DTRESIST, DT_POISON, NA, "10");
addflag(lastrace->flags, F_FOLLOWTIME, 5, NA, NA, NULL);
addrace(R_SNAKECARPET, "carpet snake", 3, 's', C_CARPET1, MT_FLESH, RC_ANIMAL, "Non-venemous (but not quite harmless) snakes.");
setbodytype(lastrace, BT_SNAKE);
@ -17407,6 +17377,7 @@ void initrace(void) {
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FOLLOWTIME, 5, NA, NA, NULL);
addrace(R_SNAKETREE, "tree snake", 3, 's', C_GREEN, MT_FLESH, RC_ANIMAL, "Non-venomous snakes which leap at their prey.");
setbodytype(lastrace, BT_SNAKE);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
@ -17439,6 +17410,7 @@ void initrace(void) {
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FOLLOWTIME, 5, NA, NA, NULL);
addrace(R_SNAKECOBRABLACK, "black cobra", 3, 's', C_BLUE, MT_FLESH, RC_ANIMAL, "Black cobras can spit globs of venom at their prey.");
setbodytype(lastrace, BT_SNAKE);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
@ -17474,6 +17446,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATMUTATE, F_DTRESIST, DT_POISON, NA, "15");
addflag(lastrace->flags, F_FOLLOWTIME, 5, NA, NA, NULL);
addrace(R_SNAKECOBRAGOLDEN, "golden cobra", 3, 's', C_YELLOW, MT_FLESH, RC_ANIMAL, "Golden cobras spit a blindness-inducing venom at their enemies.");
setbodytype(lastrace, BT_SNAKE);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
@ -17510,6 +17483,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATMUTATE, F_DTRESIST, DT_POISON, NA, "15");
addflag(lastrace->flags, F_FOLLOWTIME, 5, NA, NA, NULL);
addrace(R_SNAKECONSTRICTOR, "constrictor", 3, 's', C_MAGENTA, MT_FLESH, RC_ANIMAL, "A huge snake which coils around its victims then crushes them to death.");
setbodytype(lastrace, BT_SNAKE);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
@ -17542,6 +17516,7 @@ void initrace(void) {
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FOLLOWTIME, 5, NA, NA, NULL);
addrace(R_SNAKEWATER, "water snake", 3, 's', C_BLUE, MT_FLESH, RC_ANIMAL, "Aquatic snakes who can nevertheless exist quite happily on land. Non-venomous.");
setbodytype(lastrace, BT_SNAKE);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
@ -17579,6 +17554,7 @@ void initrace(void) {
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FOLLOWTIME, 5, NA, NA, NULL);
addrace(R_SPIDER, "giant spider", 5, 'S', C_DARKGREY, MT_FLESH, RC_ANIMAL, "An eight legged beast which features prominently in many nightmares.");
setbodytype(lastrace, BT_SPIDER);
@ -18073,6 +18049,167 @@ void initrace(void) {
// end animals
// slimes / oozes / leeches
addrace(R_GLUON, "gluon", 20, 'j', C_YELLOW, MT_SLIME, RC_SLIME, "A slow moving mass of extremely sticky gel, covered in dirt and dust which it has crawled over.");
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_EXLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_EXLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
addflag(lastrace->flags, F_SPIDERCLIMB, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_ACIDATTACK, 5, NA, NULL);
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_ADHESIVE, 100, NA, NA, NULL);
addrace(R_OOZEGREY, "sizzling slime", 10, 'j', C_DARKGREEN, MT_SLIME, RC_SLIME, "Exactly what it sounds like - a small lump of green ooze. Green, acidic ooze.");
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "puddle of slime");
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_ACIDATTACK, 8, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slurping");
addflag(lastrace->flags, F_DTIMMUNE, DT_ACID, B_TRUE, NA, NULL);
addflag(lastrace->flags, F_AUTOCREATEOB, 0, NA, NA, "puddle of acid");
addflag(lastrace->flags, F_DIESPLATTER, 3, 0, NA, "splash of acid");
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
addrace(R_LEECH, "giant leech", 10, 'j', C_MAGENTA, MT_FLESH, RC_ANIMAL, "A boneless blood-sucking creature. Quite dangerous until it eats it becomes satiated with blood, at which point it will slither off and fall asleep.");
addbodypart(lastrace, BP_BODY, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_VULNTOSALT, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:2;");
addflag(lastrace->flags, F_CANWILL, OT_A_SUCKBLOOD, NA, NA, "dam:0d1+2;");
addflag(lastrace->flags, F_WANTS, OT_BLOODSPLASH, B_COVETS, NA, NULL);
addflag(lastrace->flags, F_WANTS, OT_BLOODPOOL, B_COVETS, NA, NULL);
addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL);
addflag(lastrace->flags, F_WALKVERB, NA, NA, NA, "slither");
addrace(R_LEECHMIND, "baby mind leech", 10, 'j', C_PINK, MT_FLESH, RC_ANIMAL, "A mutated form of leech which feeds on one's intellect.");
addbodypart(lastrace, BP_BODY, NULL);
lastrace->baseid = R_LEECH;
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_VULNTOSALT, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_VERYRARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:2;");
addflag(lastrace->flags, F_CANWILL, OT_S_MINDWHIP, NA, NA, "range:1;pw:1;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_MINDWHIP, NA, NA, "sways");
addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL);
addflag(lastrace->flags, F_WALKVERB, NA, NA, NA, "slither");
addrace(R_LEECHMINDA, "mind leech", 10, 'j', C_LIGHTPINK, MT_FLESH, RC_ANIMAL, "A mutated form of leech which feeds on one's intellect.");
addbodypart(lastrace, BP_BODY, NULL);
lastrace->baseid = R_LEECH;
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_VULNTOSALT, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_VLOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_VHIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_VERYRARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:2;");
addflag(lastrace->flags, F_CANWILL, OT_S_MFEEDBACK, NA, NA, "range:1;pw:1;");
addflag(lastrace->flags, F_CANWILL, OT_S_DRAINIQ, NA, NA, "range:1;pw:2;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_MFEEDBACK, NA, NA, "sways");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_DRAINIQ, NA, NA, "sways");
addflag(lastrace->flags, F_CASTCHANCE, 80, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL);
addflag(lastrace->flags, F_WALKVERB, NA, NA, NA, "slither");
addflag(lastrace->flags, F_FILLPOT, OT_POT_MAGIC, BLOODFORPOT, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_IQ, 10, "75");
// dragons / wyrms
addrace(R_WORMGLUT, "glutwyrm", 2500, 'W', C_LIGHTMAGENTA, MT_FLESH, RC_DRAGON, "Gigantic wyrms who have become so obese over the centuries that they have evolved to be wingless. They swallow their prey whole, slowly digesting their still living bodies.");
addbodypart(lastrace, BP_HEAD, NULL);
@ -19038,7 +19175,7 @@ void initrace(void) {
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATMUTATE, F_DTRESIST, DT_ELECTRIC, NA, "5");
addrace(R_MOTHTEMP, "tempest moth", 10, 'i', C_PINK, MT_FLESH, RC_INSECT, "This pink-ish moth is almsot as large as an adult human. Arcs of electricity run up and down its wings, and a sheen of moisture covers its body.");
addrace(R_MOTHTEMP, "tempest moth", 10, 'i', C_BLUE, MT_FLESH, RC_INSECT, "This pink-ish moth is almsot as large as an adult human. Arcs of electricity run up and down its wings, and a sheen of moisture covers its body.");
setbodytype(lastrace, BT_FLYINGINSECT);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL);
@ -20532,6 +20669,8 @@ void initrace(void) {
addflag(r->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL);
addflag(r->flags, F_NOSTAM, B_TRUE, NA, NA, NULL);
addflag(r->flags, F_NONAUSEA, B_TRUE, NA, NA, NULL);
addflag(r->flags, F_NOTAKECRITS, B_TRUE, NA, NA, NULL);
addflag(r->flags, F_TREMORSENSE, 5, NA, NA, NULL);
} else if (r->raceclass->id == RC_ROBOT) {
addflag(r->flags, F_NOKO, B_TRUE, NA, NA, NULL);
addflag(r->flags, F_GETKILLEDVERB, NA, NA, NA, "destroy");
@ -20718,13 +20857,13 @@ void initskills(void) {
addskilldesc(SK_FIRSTAID, PR_EXPERT, "+10 hit points per level.", B_FALSE);
addskilldesc(SK_FIRSTAID, PR_MASTER, "+12 hit points per level.", B_FALSE);
addskill(SK_FLIGHT, "Flight", "Determines your natural ability to fly (normally via wings).", 0); // untrainable
addskilldesc(SK_FIRSTAID, PR_INEPT, "- Each rank grants +5 evasion versus non-flying opponents.", B_FALSE);
addskilldesc(SK_FIRSTAID, PR_NOVICE, "You can hover low over the ground.", B_FALSE);
addskilldesc(SK_FIRSTAID, PR_BEGINNER, "You can fly a metre above the ground.", B_FALSE);
addskilldesc(SK_FIRSTAID, PR_ADEPT, "You can fly two metres above the ground.", B_FALSE);
addskilldesc(SK_FIRSTAID, PR_SKILLED, "You can fly three metres above the ground.", B_FALSE);
addskilldesc(SK_FIRSTAID, PR_EXPERT, "You can fly four metres above the ground.", B_FALSE);
addskilldesc(SK_FIRSTAID, PR_MASTER, "You can fly five metres above the ground.", B_FALSE);
addskilldesc(SK_FLIGHT, PR_INEPT, "- Each rank grants +5 evasion versus non-flying opponents.", B_FALSE);
addskilldesc(SK_FLIGHT, PR_NOVICE, "You can hover low over the ground.", B_FALSE);
addskilldesc(SK_FLIGHT, PR_BEGINNER, "You can fly a metre above the ground.", B_FALSE);
addskilldesc(SK_FLIGHT, PR_ADEPT, "You can fly two metres above the ground.", B_FALSE);
addskilldesc(SK_FLIGHT, PR_SKILLED, "You can fly three metres above the ground.", B_FALSE);
addskilldesc(SK_FLIGHT, PR_EXPERT, "You can fly four metres above the ground.", B_FALSE);
addskilldesc(SK_FLIGHT, PR_MASTER, "You can fly five metres above the ground.", B_FALSE);
addskill(SK_LISTEN, "Listen", "How good you are at hearing and interpreting sounds.", 200);
addskilldesc(SK_LISTEN, PR_NOVICE, "^gYou now gauge the distance of sounds.^n", B_TRUE);
addskilldesc(SK_LISTEN, PR_BEGINNER, "^gYou can now determine the direction sounds are coming from.^n", B_TRUE);

Binary file not shown.

16
defs.h
View File

@ -1293,6 +1293,7 @@ enum RACE {
R_GODBATTLE, // bjorn
R_GODMAGIC, // lumara
// monsters
R_BASILISK,
R_BEHOLDER,
R_BOGGART,
R_BUGBEAR,
@ -1321,6 +1322,7 @@ enum RACE {
R_GOBLINSHOOTER,
R_GREMLIN,
R_GRIFFON,
R_HAG,
R_HIPPOGRIFF,
R_HOBGOBLIN,
R_HOBGOBLINWAR,
@ -1333,13 +1335,13 @@ enum RACE {
R_LIZARDMAN,
R_MALIK,
R_MANTICORE,
R_MIMIC,
R_MINOTAUR,
R_NAIAD,
R_NIXIE,
R_OGRA,
R_OGRE,
R_OGREWARHULK,
R_OOZEGREY,
R_ORCB,
R_ORC,
R_ORCGREY,
@ -1395,7 +1397,6 @@ enum RACE {
R_BINGEBARK,
R_BRIARTHRASH,
R_CACTUS,
R_GLUON,
R_IVYRAPID,
R_FUNGUSDREAM,
R_FUNGUSPETRIFY,
@ -1408,6 +1409,7 @@ enum RACE {
R_ANT,
R_ANTQUEEN,
R_ANTS,
R_ANTW,
R_ANTLION,
R_BAT,
R_BATBRAIN,
@ -1441,9 +1443,6 @@ enum RACE {
R_HAWKFROST,
R_HORSE,
R_FROG,
R_LEECH,
R_LEECHMIND,
R_LEECHMINDA,
R_MAMMOTH,
R_NEWT,
R_PORCUPINE,
@ -1477,6 +1476,12 @@ enum RACE {
R_WOLFDIRE,
R_WOLFWINTER,
R_WORMGLUT,
// slimes / leeches
R_GLUON,
R_LEECH,
R_LEECHMIND,
R_LEECHMINDA,
R_OOZEGREY,
// dragons
R_DRAGONBLUE,
R_DRAGONBLUEY,
@ -1743,6 +1748,7 @@ enum OBTYPE {
// traps - hiding monsters
OT_COINSHIDING,
OT_GARGOYLE,
OT_MIMIC,
// rocks
OT_ASH,
OT_ASHLARGE,

23
flag.c
View File

@ -1026,9 +1026,12 @@ int istransitoryflag(flag_t *f) {
return B_TRUE;
}
int killflagsofid(flagpile_t *fp, enum FLAG fid) {
return real_killflagsofid(fp, fid, B_TRUE);
}
// returns # flags killed
int killflagsofid(flagpile_t *fp, enum FLAG fid) {
int real_killflagsofid(flagpile_t *fp, enum FLAG fid, int wantannounce) {
flag_t *f;
//,*nextf;
int ndone = 0;
@ -1047,7 +1050,7 @@ int killflagsofid(flagpile_t *fp, enum FLAG fid) {
*/
f = hasflag(fp, fid);
while (f) {
killflag(f);
real_killflag(f, wantannounce);
ndone++;
f = hasflag(fp, fid);
}
@ -1082,6 +1085,10 @@ int killflagsofval(int count, flagpile_t *fp, enum FLAG fid, int v0, int v1, int
}
void killflag(flag_t *f) {
real_killflag(f, B_TRUE);
}
void real_killflag(flag_t *f, int wantannounce) {
flag_t *nextone, *lastone;
flagpile_t *pile;
lifeform_t *lf;
@ -1176,7 +1183,7 @@ void killflag(flag_t *f) {
}
// announce
if (announceflagloss(lf, f)) {
if (wantannounce && announceflagloss(lf, f)) {
if (flagcausesinterrupt(f, GL_LOSS) && !hasflag(lf->flags, F_INTERRUPTED)) {
if (!newflags) newflags = addflagpile(NULL, NULL);
addflag(newflags, F_INTERRUPTED, B_TRUE, NA, NA, NULL);
@ -1525,6 +1532,16 @@ void timeeffectsflag(flag_t *f, int howlong) {
} else {
return;
}
} else {
// announce
if (isplayer(f->pile->owner)) {
if (f->val[0] == 1) {
msg("^%cYou have almost completely turned to stone!",getlfcol(f->pile->owner, CC_VBAD));
} else {
msg("^%cYou continue turning to stone...",getlfcol(f->pile->owner, CC_VBAD));
}
more();
}
}
}
}

2
flag.h
View File

@ -40,8 +40,10 @@ flag_t *hasflagval_real(flagpile_t *fp, int id, int val1, int val2, int val3, /*
flag_t *incflag(flagpile_t *fp, enum FLAG fid, int val1, int val2, int val3);
int istransitoryflag(flag_t *f);
int killflagsofid(flagpile_t *fp, enum FLAG fid);
int real_killflagsofid(flagpile_t *fp, enum FLAG fid, int wantannounce);
int killflagsofval(int count, flagpile_t *fp, enum FLAG fid, int v0, int v1, int v2, int lifetime, long obfrom);
void killflag(flag_t *f);
void real_killflag(flag_t *f, int wantannounce);
void killflagpile(flagpile_t *fp);
int killtransitoryflags(flagpile_t *fp, enum FLAG fid);
int killtransitoryflagvals(flagpile_t *fp, enum FLAG fid, int val1, int val2, int val3, /*@null@*/ char *text);

9
io.c
View File

@ -6662,6 +6662,9 @@ char *makedesc_ob(object_t *o, char *retbuf) {
if (isdamaged(o)) {
snprintf(buf, BUFLEN, "It has been damaged.");
} else if (hasflag(o->flags, F_RUSTED)) {
// technically not 'perfect'
snprintf(buf, BUFLEN, "It is undamaged.");
} else {
snprintf(buf, BUFLEN, "It is in perfect condition.");
}
@ -6919,7 +6922,11 @@ char *makedesc_ob(object_t *o, char *retbuf) {
default:
strcpy(rustbuf, "rusty"); break;
}
sprintf(buf, "It is %s (-%d%% damage).\n", rustbuf, 100 - getrustdampct(o));
if (isweapon(o)) {
sprintf(buf, "It is %s (-%d%% damage).\n", rustbuf, 100 - getrustdampct(o));
} else {
sprintf(buf, "It is %s (no damage resistance).\n", rustbuf);
}
strncat(retbuf, buf, HUGEBUFLEN);
}
f = hasflag(o->flags, F_WATERPROOF);

25
lf.c
View File

@ -270,7 +270,7 @@ int bpcantakearmour(lifeform_t *lf, enum BODYPART bp) {
return B_TRUE;
}
void breakgrabs(lifeform_t *lf, int fromme, int tome) {
void breakgrabs(lifeform_t *lf, int fromme, int tome, int wantannounce) {
flag_t *f;
lifeform_t *alf;
if (fromme) {
@ -279,10 +279,10 @@ void breakgrabs(lifeform_t *lf, int fromme, int tome) {
lifeform_t *grabee;
grabee = findlf(NULL, f->val[0]);
assert(grabee);
killflagsofid(grabee->flags, F_GRABBEDBY);
killflagsofid(lf->flags, F_GRABBING);
real_killflagsofid(grabee->flags, F_GRABBEDBY, wantannounce);
real_killflagsofid(lf->flags, F_GRABBING, wantannounce);
}
killflagsofid(lf->flags, F_ATTACHEDTO);
real_killflagsofid(lf->flags, F_ATTACHEDTO, wantannounce);
}
if (tome) {
f = lfhasflag(lf, F_GRABBEDBY);
@ -290,14 +290,14 @@ void breakgrabs(lifeform_t *lf, int fromme, int tome) {
lifeform_t *graber;
graber = findlf(NULL, f->val[0]);
assert(graber);
killflagsofid(graber->flags, F_GRABBING);
killflagsofid(lf->flags, F_GRABBEDBY);
real_killflagsofid(graber->flags, F_GRABBING, wantannounce);
real_killflagsofid(lf->flags, F_GRABBEDBY, wantannounce);
}
for (alf = lf->cell->map->lf ; alf ; alf = alf->next) {
f = lfhasflagval(alf, F_ATTACHEDTO, lf->id, NA, NA, NULL);
if (f) {
killflag(f);
real_killflag(f, wantannounce);
}
}
}
@ -6184,7 +6184,7 @@ int fall(lifeform_t *lf, lifeform_t *fromlf, int announce) {
addflag(lf->flags, F_PRONE, B_TRUE, NA, NA, NULL);
loseconcentration(lf);
interrupt(lf);
breakgrabs(lf, B_TRUE, B_TRUE);
breakgrabs(lf, B_TRUE, B_TRUE, B_TRUE);
if (isvulnto(lf->flags, DT_FALL, B_FALSE)) {
// 0 will be repplaced with the dtvuln flag
losehp(lf, 0, DT_FALL, fromlf, "a bad fall");
@ -6218,7 +6218,7 @@ int fallasleep(lifeform_t *lf, enum SLEEPTYPE how, int howlong) {
}
loseconcentration(lf);
interrupt(lf);
breakgrabs(lf, B_TRUE, B_FALSE);
breakgrabs(lf, B_TRUE, B_FALSE, B_TRUE);
// falling asleep while flying = fall!
fall_from_air(lf);
@ -6712,7 +6712,7 @@ int flee(lifeform_t *lf) {
// lower our shield
killflagsofid(lf->flags, F_FULLSHIELD);
breakgrabs(lf, B_TRUE, B_FALSE); // stop grabbing anyone
breakgrabs(lf, B_TRUE, B_FALSE, B_TRUE); // stop grabbing anyone
// ways of fleeing other than movement?
if (!isplayer(lf)) {
@ -19996,6 +19996,7 @@ void setskillused(lifeform_t *lf, enum SKILL skid) {
void spot_hiding_lf(lifeform_t *lf, lifeform_t *hider) {
addflag(lf->flags, F_SPOTTED, hider->id, NA, NA, NULL);
setlosdirty(lf);
// announce
if (isplayer(lf)) {
char hidername[BUFLEN];
@ -22460,7 +22461,7 @@ int slipon(lifeform_t *lf, object_t *o) {
fall(lf, NULL, B_FALSE);
if (isplayer(lf)) {
real_warnabout("(use 's' to walk carefully)", PERMENANT, B_FALSE);
real_warnabout("(use 'm-tiptoe' to walk carefully)", PERMENANT, B_FALSE);
}
if (o) {
@ -23679,6 +23680,8 @@ void startlfturn(lifeform_t *lf) {
lf->born = B_FALSE; // supress a second announcement of waking up
killflagsofid(lf->flags, F_ASLEEP);
lf->born = origborn;
// force LOS recalc since we are now awake.
setlosdirty(lf);
} else {
taketime(lf, getactspeed(lf));
}

2
lf.h
View File

@ -39,7 +39,7 @@ void awardxpfor(lifeform_t *killed, float pct);
void bleed(lifeform_t *lf, int splatter);
int bleedfrom(lifeform_t *lf, enum BODYPART bp, int splatter);
int bpcantakearmour(lifeform_t *lf, enum BODYPART bp);
void breakgrabs(lifeform_t *lf, int fromme, int tome);
void breakgrabs(lifeform_t *lf, int fromme, int tome, int wantannounce);
void breakaitargets(lifeform_t *lf, int onlylowerlev);
long calcscore(lifeform_t *lf);
int calcxp(lifeform_t *lf);

83
map.c
View File

@ -4638,7 +4638,7 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex
getregionname(buf, map, NULL, RF_SHORT);
if (db) {
dblog("Creating new map of region '%s'",buf);
dblog("createmap() - Creating new map of region '%s', depth %d",buf, depth);
}
map->habitat = findhabitat(habitat);
@ -5224,7 +5224,6 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex
i = linkholes(map);
if (db) {
dblog(" autolinked to %d holes in adjacent maps.",i);
dblog(" autolinked to %d holes in adjacent maps.",i);
}
//if (gamemode == GM_GAMESTARTED) checkallflags(player->cell->map); // debugging
@ -5232,8 +5231,7 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex
//if (gamemode == GM_GAMESTARTED) checkallflags(player->cell->map); // debugging
// try to join up any unlinked staircases in this map.
if (db) {
dblog(" joining unlinked stairs...");
dblog(" joining unlinked stairs...");
dblog(" joining unlinked stairs on this level...");
}
nstairslinked = 0;
for (y = 0; y < map->h; y++) {
@ -5243,28 +5241,25 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex
c = getcellat(map, x, y);
o = hasobwithflag(c->obpile, F_CLIMBABLE);
if (o && !hasflag(o->flags, F_PORTAL) && !getstairdestination(o, NULL) && !hasflag(o->flags, F_MAPLINK)) {
dblog(" Trying to link '%s'",o->type->name);
// this will join these stairs to existing ones on
// existing adjacent maps
if (!linkstairs(o, NULL)) {
if (db) {
cell_t *dst;
dst = getstairdestination(o, NULL);
dblog(" linked '%s' to map %s",o->type->name, dst->map->name);
dblog(" linked '%s' to map %s",o->type->name, dst->map->name);
}
nstairslinked++;
} else {
if (db) {
dblog(" couldn't link stairs: '%s' (probably no lower level yet)",o->type->name);
dblog(" couldn't link stairs: '%s' (probably no lower level yet)",o->type->name);
}
}
}
}
}
if (db) {
dblog(" linked %d stairs.", nstairslinked);
dblog(" linked %d stairs.", nstairslinked);
}
if (db) dblog(" linked %d stairs.", nstairslinked);
//if (gamemode == GM_GAMESTARTED) checkallflags(player->cell->map); // debugging
@ -7316,15 +7311,21 @@ int finalisemap(map_t *map, object_t *entryob, int exitdir) {
enum OBTYPE upstairtype, downstairtype;
int i,d,x,y;
int linkedentry = B_FALSE;
objecttype_t *entryoppositetype = NULL;
//char roomlightob[BUFLEN],corridorlightob[BUFLEN];
//int roomlightchance = 0;
//int corridorlightfreq = 0;
int nupstairsreq = 0,ndownstairsreq = 0;
int db = B_TRUE;
int nupstairsneeded = 0,ndownstairsneeded = 0;
cell_t *c;
object_t *o,*nexto;
condset_t okforstairs;
if (entryob) {
entryoppositetype = getoppositestairs(entryob->type);
}
initcondv(&okforstairs, CC_EMPTY, B_TRUE, NA,
CC_OKFORSTAIRS, B_TRUE, NA,
CC_NONE);
@ -7391,6 +7392,7 @@ int finalisemap(map_t *map, object_t *entryob, int exitdir) {
}
}
} else {
if (db) dblog("Need to create %d up stairs.", nupstairsneeded);
// up stairs on all other levels
for (i = 0; i < nupstairsneeded; i++) {
c = NULL;
@ -7420,7 +7422,9 @@ int finalisemap(map_t *map, object_t *entryob, int exitdir) {
}
o = addobfast(c->obpile, upstairtype);
assert(o);
if (entryob && (exitdir == D_DOWN) && !linkedentry) {
if (db) dblog("Created upstairs '%s'", o->type->name);
if (entryob && (exitdir == D_DOWN) && !linkedentry &&
entryoppositetype && (entryoppositetype->id == o->type->id)) {
linkstairs(o, entryob);
linkedentry = B_TRUE;
} else {
@ -7437,6 +7441,7 @@ int finalisemap(map_t *map, object_t *entryob, int exitdir) {
// DOWN STAIRS
if ((downstairtype != OT_NONE) && (map->depth < map->region->rtype->maxdepth)) {
if (db) dblog("Need to create %d down stairs.", ndownstairsneeded);
for (i = 0; i < ndownstairsneeded; i++) {
c = NULL;
if (!c || countobs(c->obpile, B_TRUE)) {
@ -7452,7 +7457,9 @@ int finalisemap(map_t *map, object_t *entryob, int exitdir) {
}
o = addobfast(c->obpile, downstairtype);
assert(o);
if (entryob && (exitdir == D_UP) && !linkedentry) {
if (db) dblog("Created downstairs '%s'", o->type->name);
if (entryob && (exitdir == D_UP) && !linkedentry &&
entryoppositetype && (entryoppositetype->id == o->type->id)) {
linkstairs(o, entryob);
linkedentry = B_TRUE;
} else {
@ -7473,17 +7480,49 @@ int finalisemap(map_t *map, object_t *entryob, int exitdir) {
ot = getoppositestairs(entryob->type);
wantoid = ot->id;
}
if (db) dblog("Still haven't linked to map entry object (%s)",entryob->type->name);
for (y = 0; (y < map->h) && !linkedentry; y++) {
for (x = 0; (x < map->w) && !linkedentry; x++) {
c = getcellat(map, x, y);
o = hasob(c->obpile, wantoid);
if (o && !hasflag(o->flags, F_MAPLINK)) {
if (o && !hasflag(o->flags, F_MAPLINK) && entryoppositetype &&
(entryoppositetype->id == o->type->id)) {
if (db) dblog("Found candidate: %s",o->type->name);
linkstairs(o, entryob);
linkedentry = B_TRUE;
break;
}
}
}
if (!linkedentry) {
// no objects of the correct type were found.
if (db) dblog("No candidates found. Creating object to link back to entry ob.");
// create one.
initcondv(&okforstairs, CC_EMPTY, B_TRUE, NA,
CC_OKFORSTAIRS, B_TRUE, NA,
CC_HASOBTYPE, B_FALSE, entryoppositetype->id,
CC_NONE);
c = getcell_cond(map, &okforstairs);
if (!c) {
// relax the conditions
initcondv(&okforstairs, CC_OKFORSTAIRS, B_TRUE, NA,
CC_NONE);
c = getcell_cond(map, &okforstairs);
}
if (c) {
o = addobfast(c->obpile, entryoppositetype->id);
// DONT let addobject create maplinks, because we want to force it to
// link to entry object.
o = addobject(c->obpile, entryoppositetype->name, B_FALSE, B_FALSE, entryoppositetype->id);
assert(o);
if (db) dblog("Created '%s'. About to link it.",o->type->name);
killflagsofid(o->flags, F_MAPLINK);
linkstairs(o, entryob);
linkedentry = B_TRUE;
}
}
if (!linkedentry) {
dblog("ERROR - couldn't link stairs back to map entry object.");
msg("ERROR - couldn't link stairs back to map entry object."); more();
@ -9511,6 +9550,7 @@ object_t *linkportaltodepth(object_t *srcportal, int wantdepth) {
// something to link to ourself.
// returns TRUE if it failed because othermap doesn't exist.
int linkstairs(object_t *o, object_t *o2) {
int db = B_TRUE;
map_t *othermap;
map_t *stairmap;
cell_t *staircell;
@ -9526,13 +9566,21 @@ int linkstairs(object_t *o, object_t *o2) {
if (o2) {
cell_t *othercell;
objecttype_t *ot;
othercell = getoblocation(o2);
othermap = othercell->map;
if (!db) dblog("linkstairs(): was given specific link partner for '%s' (partner = %s)", o->type->name,o2->type->name);
ot = getoppositestairs(o->type);
if (ot && (ot->id != o2->type->id)) {
msg("Hmmm... %s <-> %s = invalid stair link?",o->type->name,o2->type->name);
more();
}
} else {
objecttype_t *otherstairtype;
cell_t *c2;
int n, dir;
object_t *oo;
object_t *oo = NULL;
if (!db) dblog("linkstairs(): trying to find potential link partner for '%s'", o->type->name);
// find a valid other end
otherstairtype = getoppositestairs(o->type);
@ -9565,10 +9613,12 @@ int linkstairs(object_t *o, object_t *o2) {
c2 = othermap->cell[n];
oo = hasob(c2->obpile, otherstairtype->id);
if (oo) {
if (!db) dblog("linkstairs(): possibility: '%s'", oo->type->name);
// remember all stairs of correct type, for debugging.
poss[nposs++] = oo;
// does it go nowhere?
if (!hasflag(oo->flags, F_MAPLINK)) {
if (!db) dblog("linkstairs(): this possibility not linked. using it.");
o2 = oo;
found = B_TRUE;
break;
@ -9600,6 +9650,9 @@ int linkstairs(object_t *o, object_t *o2) {
if (f) {
f->val[1] = NA;
}
if (db) {
dblog("linkstairs() - linked '%s' to '%s'.", o->type->name, o2->type->name);
}
} else {
return B_TRUE;
}

2
move.c
View File

@ -933,7 +933,7 @@ int knockback(lifeform_t *lf, int dir, int howfar, lifeform_t *pusher, int fallc
return B_TRUE;
}
breakgrabs(lf, B_TRUE, B_TRUE);
breakgrabs(lf, B_TRUE, B_TRUE, B_TRUE);
for (i = 0; i < howfar; i++) {
if (moveclear(lf, dir, &reason)) {

View File

@ -10179,6 +10179,8 @@ int obsfallthrough(cell_t *c, object_t *pit) {
if (hasflag(pit->flags, F_PIT)) {
//nopickup objects don't fall down pits.
if (hasflag(oo->flags, F_NOPICKUP)) continue;
//neither do gasses
if (getmaterialstate(oo->material->id) == MS_GAS) continue;
strcpy(verb, "fall");
} else if (pit->type->id == OT_GRATINGFLOOR) {
// only liquid falls through gratings

32
spell.c
View File

@ -1418,8 +1418,9 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
return B_FALSE;
}
// victim gets a skilcheck to avoid being grabbed - hard.
if (skillcheck(target, SC_DODGE, getattr(user, A_AGI)+50, 0)) {
// if not already held, victim gets a skillcheck to avoid being grabbed - hard.
if (!lfhasflagval(user, F_GRABBING, target->id, NA, NA, NULL) &&
skillcheck(target, SC_DODGE, getattr(user, A_AGI)+50, 0)) {
if (cansee(player, user)) {
msg("%s evade%s %s%s grasp.", targetname, isplayer(target) ? "" : "s",
username, getpossessive(username));
@ -1433,14 +1434,25 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
if (c && cellwalkable(target, c, NULL)) {
int dist;
// break grabs, but don't annouce "you break free"
breakgrabs(target, B_TRUE, B_TRUE, B_FALSE);
// throw!
// - announce BEFORE moving the target.
if (isplayer(user)) {
msg("^%cYou flip %s over your head!", getlfcol(target, CC_BAD), targetname);
} else if (cansee(player, user)) {
if (hasbp(user, BP_HEAD)) {
char yr[BUFLEN];
strcpy(yr, your(user));
yr[0] = tolower(yr[0]);
msg("^%c%s flips %s over %s %s!", getlfcol(target, CC_BAD), username, targetname, yr, getbodypartname(user, BP_HEAD));
} else {
msg("^%c%s flips %s!", getlfcol(target, CC_BAD), username, targetname);
}
}
setfacing(user, dir); // turn player to face them
movelf(target, c, B_FALSE); // move target behind player
// throw!
if (isplayer(user)) {
msg("You flip %s over your head!", targetname);
} else if (cansee(player, user)) {
msg("%s flips %s!", username, targetname);
}
dist = 2 + (getskill(user, SK_ATHLETICS)/3);
setfacing(target, getrandomdir(DT_COMPASS));
knockback(target, dir, dist, user, 125, B_NOANNOUNCE, B_DODAM);
@ -10827,7 +10839,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
f = addtempflag(target->flags, F_NONCORPOREAL, B_TRUE, NA, NA, NULL, howlong);
f->obfrom = OT_S_PASSWALL;
breakgrabs(target, B_TRUE, B_TRUE);
breakgrabs(target, B_TRUE, B_TRUE, B_TRUE);
} else if ((spellid == OT_S_POLYMORPH) || (spellid == OT_S_SHAPESHIFT)) {
race_t *r = NULL;
@ -11020,7 +11032,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
if (haslos(player, target->cell)) {
if (seenbyplayer) *seenbyplayer = B_TRUE;
}
breakgrabs(target, B_TRUE, B_TRUE);
breakgrabs(target, B_TRUE, B_TRUE, B_TRUE);
} else {
fizzle(caster);
return B_TRUE;

15
text.c
View File

@ -3238,6 +3238,11 @@ char *you(lifeform_t *lf) {
if (isplayer(lf)) {
return "You";
}
switch (getgender(lf)) {
case G_MALE: return "Him";
case G_FEMALE: return "Her";
default: break;
}
return "It";
}
@ -3245,6 +3250,11 @@ char *you_l(lifeform_t *lf) {
if (isplayer(lf)) {
return "you";
}
switch (getgender(lf)) {
case G_MALE: return "Him";
case G_FEMALE: return "Her";
default: break;
}
return "it";
}
@ -3252,6 +3262,11 @@ char *your(lifeform_t *lf) {
if (isplayer(lf)) {
return "Your";
}
switch (getgender(lf)) {
case G_MALE: return "His";
case G_FEMALE: return "Her";
default: break;
}
return "Its";
}