diff --git a/ai.c b/ai.c index 4ce3393..cd564d7 100644 --- a/ai.c +++ b/ai.c @@ -1098,9 +1098,11 @@ void aiturn(lifeform_t *lf) { // flying monsters not flying? if (!isprone(lf)) { if (hasflag(lf->race->flags, F_FLYING) && !lfhasflag(lf, F_FLYING)) { - copyflag(lf->flags, lf->race->flags, F_FLYING); - taketime(lf, getmovespeed(lf)); - return; + if (cancast(lf, OT_S_FLIGHT, NULL)) { + if (!castspell(lf, OT_S_FLIGHT, lf, NULL, lf->cell, NULL, NULL)) { + return; + } + } } if (hasflag(lf->race->flags, F_LEVITATING) && !lfhasflag(lf, F_LEVITATING)) { copyflag(lf->flags, lf->race->flags, F_LEVITATING); @@ -1321,8 +1323,9 @@ void aiturn(lifeform_t *lf) { } // do we have better armour? - for (bp = BP_RIGHTFINGER ; bp < MAXBODYPARTS; bp++) { + for (i = 0; i < lf->race->nbodyparts; i++) { object_t *curarm; + bp = lf->race->bodypart[i].id; curarm = getarmour(lf, bp); // do we have a better one? for (o = lf->pack->first ; o ; o = o->next) { diff --git a/attack.c b/attack.c index 6c95f89..c29e35e 100644 --- a/attack.c +++ b/attack.c @@ -645,20 +645,22 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) object_t *armour; char noun[BUFLEN]; critpos = getrandomcorebp(victim); - armour = getequippedob(victim->pack, critpos); - if (armour) { - char armname[BUFLEN]; - real_getobname(armour, armname, 1, B_FALSE, B_FALSE, B_TRUE, B_FALSE, B_FALSE); - sprintf(noun, "%s", noprefix(armname)); - } else { - sprintf(noun, "%s", getbodypartname(victim, critpos)); - } - // replace victicname to include body part - if ((lf == victim) && !isplayer(lf)) { - snprintf(victimbpname, BUFLEN, "its %s", noun); - } else { - getlfname(victim, buf); - snprintf(victimbpname, BUFLEN, "%s%s %s", buf, getpossessive(buf), noun); + if (critpos != BP_NONE) { + armour = getequippedob(victim->pack, critpos); + if (armour) { + char armname[BUFLEN]; + real_getobname(armour, armname, 1, B_FALSE, B_FALSE, B_TRUE, B_FALSE, B_FALSE); + sprintf(noun, "%s", noprefix(armname)); + } else { + sprintf(noun, "%s", getbodypartname(victim, critpos)); + } + // replace victicname to include body part + if ((lf == victim) && !isplayer(lf)) { + snprintf(victimbpname, BUFLEN, "its %s", noun); + } else { + getlfname(victim, buf); + snprintf(victimbpname, BUFLEN, "%s%s %s", buf, getpossessive(buf), noun); + } } } else { strcpy(victimbpname, ""); @@ -1421,6 +1423,9 @@ void criticalhit(lifeform_t *lf, lifeform_t *victim, enum BODYPART hitpos, int d object_t *o,*armour; int protected = B_FALSE; char lfname[BUFLEN],victimname[BUFLEN]; + + if (hitpos == BP_NONE) return; + // replace some dam types if (damtype == DT_UNARMED) damtype = DT_BASH; if (damtype == DT_BITE) damtype = DT_SLASH; diff --git a/data.c b/data.c index 1eaff5f..07dbf3c 100644 --- a/data.c +++ b/data.c @@ -6262,6 +6262,7 @@ void initrace(void) { // unique monsters addrace(R_JAILER, "jailer", 110, '@', C_MAGENTA, MT_FLESH, RC_HUMANOID, "Jailers are generally known for their surplus of brawn and utter lack of brains. This one is no different."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_NAME, NA, NA, NA, "Jimbo"); addflag(lastrace->flags, F_UNIQUE, NA, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, NA, NA, NA, NULL); @@ -6297,6 +6298,7 @@ void initrace(void) { // races / monsters // playable races addrace(R_HUMAN, "human", 75, '@', C_GREY, MT_FLESH, RC_HUMANOID, "Your average example of the Homo Sapiens species."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL); @@ -6320,6 +6322,11 @@ void initrace(void) { addrace(R_AVIAD, "aviad", 60, 'h', C_WHITE, MT_FLESH, RC_HUMANOID, "A bipedal bird-like race. Aviads are human-sized but have more delicate bones and are covered in feathers. They have sharp talons in place of fingernails, and large feathered wings sprouting from their backs. While capable of flight from birth, their feathers make them vulnerable to fire and lightning based attacks."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + setbodypartname(lastrace, BP_HANDS, "talons"); + setbodypartname(lastrace, BP_RIGHTFINGER, "right claw"); + setbodypartname(lastrace, BP_LEFTFINGER, "left claw"); // stats addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL); @@ -6346,9 +6353,6 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+3"); // other special stuff addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "screechs^a screech"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "talons"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right claw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left claw"); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); @@ -6362,6 +6366,15 @@ void initrace(void) { addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL); addrace(R_CYBORG, "cyborg", 150, 'R', C_GREY, MT_FLESH, RC_HUMANOID, "A cyborg is a human with cybernetic implants grafted throughout their body. In most cases their body has been completely reconstructed from metal, with a thin later of skin outside to maintain a human appearance. Cyborgs are exceptionaly good with technology due to their computer-enhanced brain, but completely unable to use magic (for much the same reason)."); + setbodytype(lastrace, BT_HUMANOID); + setbodypartname(lastrace, BP_EARS, "audio inputs"); + setbodypartname(lastrace, BP_EYES, "video inputs"); + setbodypartname(lastrace, BP_BODY, "central frame"); + setbodypartname(lastrace, BP_LEGS, "stabilisers"); + setbodypartname(lastrace, BP_HANDS, "manipulators"); + setbodypartname(lastrace, BP_FEET, "lower propulsion units"); + setbodypartname(lastrace, BP_RIGHTFINGER, "right sensor"); + setbodypartname(lastrace, BP_LEFTFINGER, "left sensor"); // stats addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); @@ -6386,20 +6399,7 @@ void initrace(void) { addflag(lastrace->flags, F_DTVULN, DT_WATER, NA, NA, "2d6"); addflag(lastrace->flags, F_DTVULN, DT_ELECTRIC, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_NOARMOURON, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOARMOURON, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOARMOURON, BP_FEET, NA, NA, NULL); - addflag(lastrace->flags, F_NOARMOURON, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOARMOURON, BP_LEFTFINGER, NA, NA, NULL); // other special stuff - addflag(lastrace->flags, F_BODYPARTNAME, BP_EARS, NA, NA, "audio inputs"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_EYES, NA, NA, "video inputs"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "central frame"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEGS, NA, NA, "stabilisers"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "manipulators"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_FEET, NA, NA, "lower propulsion units"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right sensor"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left sensor"); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); @@ -6414,6 +6414,8 @@ void initrace(void) { addrace(R_ASHKARI, "ashkari", 60, '@', C_ORANGE, MT_FLESH, RC_HUMANOID, "The egotistical cat-like Ashkari are nimble, have extraordinary balance, smell, eyesight... and ego. The latter makes them unwise and vulnerable to will-based magic attacks. They instinctually hate canines and avians."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_LTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); @@ -6468,6 +6470,7 @@ void initrace(void) { addrace(R_DWARF, "dwarf", 60, 'h', C_BROWN, MT_FLESH, RC_HUMANOID, "Dwarves are short, hardy creatures who generally spend their entire lives mining underground. As such they have great fitness and enhanced low-light vision, but generally lack great reasoning skills and magical ability."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LTAVERAGE, NA, NULL); @@ -6503,6 +6506,7 @@ void initrace(void) { addrace(R_ELF, "elf", 60, '@', C_GREEN, MT_FLESH, RC_HUMANOID, "Elves are slender, graceful beings around human-sized but far nimbler. They have high intelligence and magical affinity, but a lack of physical strength. Elves meditate instead of sleeping, thus maintaining basic awareness."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_LTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); @@ -6548,6 +6552,8 @@ void initrace(void) { addflag(lastrace->flags, F_TAMABLE, 25, NA, NA, NULL); addrace(R_MAMMOAN, "mammoan", 150, '@', C_GREY, MT_LEATHER, RC_HUMANOID, "Mammoans are huge, elephant-like humanoids. Their have great senses of hearing and smell, a photographic memory, and leather skin which greatly lessens damage. On the other hand they vision is poor, their movement slow, and their digestive system cannot cope with meat."); + setbodytype(lastrace, BT_HUMANOID); + noarmouron(lastrace, BP_EARS); addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_VLOW, NA, NULL); @@ -6587,7 +6593,6 @@ void initrace(void) { addflag(lastrace->flags, F_PENDESC, 2, NA, NA, "Vulnerable to Sonic damage."); addflag(lastrace->flags, F_PENDESC, 3, NA, NA, "Vegeterian (will not eat meat)"); addflag(lastrace->flags, F_PENDESC, 4, NA, NA, "Can never learn Athletics."); - addflag(lastrace->flags, F_NOARMOURON, BP_EARS, NA, NA, NULL); addflag(lastrace->flags, F_VISRANGEMOD, -2, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_SONIC, NA, NA, NULL); addflag(lastrace->flags, F_VEGETARIAN, B_TRUE, NA, NA, NULL); @@ -6596,6 +6601,7 @@ void initrace(void) { // human monsters... addrace(R_BANDITLDR, "bandit leader", 75, '@', C_GREY, MT_FLESH, RC_HUMANOID, "Like a regular bandit, but bigger and stronger. Enough so to bully their followers into submission anyway."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL); addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); @@ -6621,6 +6627,7 @@ void initrace(void) { addflag(lastrace->flags, F_MINIONS, 100, 1, 3, "bandit"); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL); addrace(R_BANDIT, "bandit", 75, '@', C_GREY, MT_FLESH, RC_HUMANOID, "Bandits prey on travellers, demanding cash in exchange for not beating them to a pulp."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); @@ -6647,6 +6654,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTJOB, 50, J_ROGUE, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL); addrace(R_BEGGAR, "beggar", 50, '@', C_BROWN, MT_FLESH, RC_HUMANOID, "Beggar roam the streets of towns, pleading for any spare cash."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_RARITY, H_VILLAGE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); @@ -6661,6 +6669,7 @@ void initrace(void) { addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addrace(R_DRUNK, "drunkard", 90, '@', C_GREY, MT_FLESH, RC_HUMANOID, "A humon who has become hopelessly addicated to alcohol. They exist in a permenant state of inebriation."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_RARITY, H_VILLAGE, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); @@ -6682,6 +6691,7 @@ void initrace(void) { addaltval(f, F_DRUNK, 3, NA, NA, NULL); addrace(R_PRISONER, "prisoner", 60, '@', C_GREY, MT_FLESH, RC_HUMANOID, "Somebody who has been improsioned."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_LTAVERAGE, NA, NULL); addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); @@ -6699,6 +6709,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addrace(R_TOWNGUARD, "town guard", 100, '@', C_GREY, MT_FLESH, RC_HUMANOID, "A surly guard employed to uphold the laws of a town."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, NA, NA, "12-18"); addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); @@ -6727,6 +6738,7 @@ void initrace(void) { // gods - kep sorted alphabetically addrace(R_GODPURITY, "Amberon", 90, '@', C_BOLDMAGENTA, MT_FLESH, RC_GOD, "Amberon appears as a shining statuesque humanoid with gold-hued skin. He represents Purity, Law and Justice."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, NA, NA, "20"); addflag(lastrace->flags, F_STARTATT, A_AGI, NA, NA, "10"); @@ -6746,7 +6758,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTSKILL, SK_SS_LIFE, PR_MASTER, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_FIRSTAID, PR_SKILLED, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "gestures imperiously"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures imperiously"); // god abilities addflag(lastrace->flags, F_GODOF, NA, NA, NA, "Purity"); addflag(lastrace->flags, F_FLEEONHPPCT, 10, NA, NA, NULL); @@ -6774,6 +6786,7 @@ void initrace(void) { addrace(R_GODTHIEVES, "Felix", 300, '@', C_BOLDMAGENTA, MT_FLESH, RC_GOD, "Felix is the god of Thieves, Greed and Trickery. He generally appears as an overweight glutton carrying his contraband loot around in huge sacks. Despite this, he is amazingly agile and is said to be able to steal one's soul right out of their body."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_NEUTRAL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, NA, NA, "15"); addflag(lastrace->flags, F_STARTATT, A_AGI, NA, NA, "20"); @@ -6798,7 +6811,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTSKILL, SK_THROWING, PR_MASTER, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_CLIMBING, PR_MASTER, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "waves his hand"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "waves his hand"); // god abilities addflag(lastrace->flags, F_GODOF, NA, NA, NA, "Thieves"); addflag(lastrace->flags, F_FLEEONHPPCT, 10, NA, NA, NULL); @@ -6820,6 +6833,7 @@ void initrace(void) { addrace(R_GODDEATH, "Hecta", 100, '@', C_BOLDMAGENTA, MT_BONE, RC_GOD, "The skeletal god of death is garbed in a cloak made of pure shadow. and weilds an enormous scythe."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, NA, NA, "16"); addflag(lastrace->flags, F_STARTATT, A_AGI, NA, NA, "20"); @@ -6840,7 +6854,7 @@ void initrace(void) { //addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_SS_DEATH, PR_MASTER, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "extends a skeletal finger"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "extends a skeletal finger"); // god abilities addflag(lastrace->flags, F_GODOF, NA, NA, NA, "Death"); addflag(lastrace->flags, F_FLEEONHPPCT, 10, NA, NA, NULL); @@ -6865,6 +6879,7 @@ void initrace(void) { addflag(lastrace->flags, F_SACRIFICEOB, OT_CORPSE, NA, 2, "Bony claws rise up and drag OB underground."); addrace(R_GODMERCY, "Yumi", 300, '@', C_BOLDMAGENTA, MT_FLESH, RC_GOD, "Yumi is the goddess of Mercy and Healing. She has a calm, serene face and wears simple clothing."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL); addflag(lastrace->flags, F_FLEEONHPPCT, 95, NA, NA, ""); addflag(lastrace->flags, F_STARTATT, A_STR, NA, NA, "10"); @@ -6886,7 +6901,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTSKILL, SK_FIRSTAID, PR_MASTER, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_LONGBLADES, PR_ADEPT, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "raises her palms"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "raises her palms"); // god abilities addflag(lastrace->flags, F_GODOF, B_FEMALE, NA, NA, "Mercy"); addflag(lastrace->flags, F_FLEEONHPPCT, 10, NA, NA, NULL); @@ -6911,6 +6926,8 @@ void initrace(void) { // monsters 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"); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_VHIGH, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -6929,22 +6946,20 @@ void initrace(void) { addflag(lastrace->flags, F_CANWILL, OT_S_SUCK, NA, NA, "pw:2;"); addflag(lastrace->flags, F_CANWILL, OT_S_PARALYZE, NA, NA, "pw:2;"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "gazes"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gazes"); addflag(lastrace->flags, F_CASTTYPE, CT_GAZE, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, UNLIMITED, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_EXPERT, NA, NULL); addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_EYES, NA, NA, "eyestalks"); addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL); addrace(R_BUGBEAR, "bugbear", 120, 'G', C_BROWN, MT_FLESH, RC_HUMANOID, "A huge goblinoid creature, similar to a hobgoblin but larger again, with a temperament to match."); + setbodytype(lastrace, BT_HUMANOID); + setbodypartname(lastrace, BP_HANDS, "paws"); + setbodypartname(lastrace, BP_RIGHTFINGER, "right foreclaw"); + setbodypartname(lastrace, BP_LEFTFINGER, "left foreclaw"); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); @@ -6967,12 +6982,12 @@ void initrace(void) { addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL); addflag(lastrace->flags, F_MINIONS, 50, 1, 3, "goblin"); addflag(lastrace->flags, F_MINIONS, 20, 1, 3, "goblin warrior"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "claws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addrace(R_COCKATRICE, "cockatrice", 5, 'c', C_YELLOW, MT_FLESH, RC_MAGIC, "A small two-legged dragon with a rooster's head. Its touch is said to petrify the flesh of living creatures."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_VHIGH, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); @@ -6984,9 +6999,6 @@ void initrace(void) { addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^clucking"); addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, 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_DTIMMUNE, DT_PETRIFY, B_TRUE, NA, NULL); @@ -6995,6 +7007,7 @@ void initrace(void) { // special attack handled in attack.c addrace(R_CREEPINGCLAW, "creeping claw", 3, 'x', C_YELLOW, 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."); + addbodypart(lastrace, BP_BODY, 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_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); @@ -7007,22 +7020,14 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_EYES, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HEAD, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_BODY, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_CRUSH, NA, NA, "dam:1d6;"); addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:5;"); addflag(lastrace->flags, F_CASTCHANCE, 70, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addrace(R_DARKMANTLE, "darklurk", 70, 'U', C_BLUE, 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); + addbodypart(lastrace, BP_LEGS, "tentacles"); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTHIDDENPCT, 80, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); @@ -7039,16 +7044,13 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_SPELLSPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_VERYSLOW, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_DARKNESS, 7, 7, "pw:3;"); addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_CRUSH, NA, NA, "dam:0d0+5;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "waves its tentacles"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "waves its tentacles"); addflag(lastrace->flags, F_HASATTACK, OT_TENTACLE, 12, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, "0d6+5"); @@ -7057,6 +7059,8 @@ void initrace(void) { addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addrace(R_EYEBAT, "eyebat", 5, 'e', C_BLUE, MT_FLESH, RC_MAGIC, "A smaller cousin to the beholder, an eyebat is a single oversized eyeball suspended between bat-like wings."); + addbodypart(lastrace, BP_BODY, NULL); + addbodypart(lastrace, BP_WINGS, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -7066,6 +7070,8 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+3"); addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_SPELLSPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -7073,19 +7079,15 @@ void initrace(void) { addflag(lastrace->flags, F_CANCAST, OT_S_DISPERSAL, NA, NA, NULL); addflag(lastrace->flags, F_CANCAST, OT_S_GRAVBOOST, NA, NA, NULL); addflag(lastrace->flags, F_CASTTYPE, CT_GAZE, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "gazes"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_BODY, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gazes"); + addflag(lastrace->flags, F_TREMORSENSE, 5, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, UNLIMITED, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_FLY, 1, NA, "^flapping wings"); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); addrace(R_GIANTHILL, "mountain giant", 160, 'H', C_GREY, MT_FLESH, RC_HUMANOID, "Enormous humanoids who dwell in the mountains, using their grat strength to leap between valleys and pelt their prey with enormous boulders."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL); @@ -7120,6 +7122,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addrace(R_GIANTFIRE, "flame giant", 160, 'H', C_RED, MT_FLESH, RC_HUMANOID, "Fire giants are cousins to hill giants who dwell on active vulcanoes. Their constant proximity to intense heat has led them to evolve a natural resistance to fire"); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -7154,6 +7157,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addrace(R_GIANTFIREFC, "flame giant shaman", 160, 'H', C_RED, MT_FLESH, RC_HUMANOID, "A subspecies of flame giant who have developed the ability to command the primal volcanic fires around them."); + setbodytype(lastrace, BT_HUMANOID); lastrace->baseid = R_GIANTFIRE; addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "fire giant corpse"); @@ -7190,6 +7194,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 15, NA, NA, NULL); addrace(R_GIANTFIRETITAN, "flame titan", 160, 'H', C_RED, MT_FLESH, RC_HUMANOID, "The ultimate evolutionary form of a flame giant. Flame titans tower over even the largest of regular giants and can generate massive amounts of raging flame at will."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -7224,6 +7229,10 @@ void initrace(void) { // TODO: storm titan addrace(R_GNOLL, "gnoll", 130, 'h', C_BROWN, MT_FLESH, RC_HUMANOID, "Gnolls are doglike warriors - the gladiators of the kobold race. They are highly organised and often travel in packs."); + setbodytype(lastrace, BT_HUMANOID); + setbodypartname(lastrace, BP_HANDS, "claws"); + setbodypartname(lastrace, BP_RIGHTFINGER, "right foreclaw"); + setbodypartname(lastrace, BP_LEFTFINGER, "left foreclaw"); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "gnoll corpse"); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -7251,14 +7260,15 @@ void initrace(void) { addflag(lastrace->flags, F_PACKATTACK, 3, NA, 2, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "claws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); addrace(R_GNOLLHM, "gnoll hunter", 130, 'h', C_BROWN, MT_FLESH, RC_HUMANOID, "Hunters are gnolls tasked with obtaining food, but can also turn their ranged skills to combat."); + setbodytype(lastrace, BT_HUMANOID); + setbodypartname(lastrace, BP_HANDS, "claws"); + setbodypartname(lastrace, BP_RIGHTFINGER, "right foreclaw"); + setbodypartname(lastrace, BP_LEFTFINGER, "left foreclaw"); lastrace->baseid = R_GNOLL; addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "gnoll corpse"); @@ -7288,14 +7298,12 @@ void initrace(void) { addflag(lastrace->flags, F_MINIONS, 75, 1, 2, "gnoll"); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "claws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 12, NA, NA, NULL); addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); addrace(R_GOBLIN, "goblin", 25, 'g', C_BROWN, MT_FLESH, RC_HUMANOID, "Small humanoids with flat faces, broad noses, pointed ears, and small, sharp fangs."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_FEIGNDEATH, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -7328,6 +7336,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL); addrace(R_GOBLINWAR, "goblin warrior", 30, 'g', C_BROWN, MT_FLESH, RC_HUMANOID, "Goblin Warriors are uncommon goblins with sufficient mental control to ungergo formal combat training (rather than just hack away mindlessly at their foes)."); + setbodytype(lastrace, BT_HUMANOID); lastrace->baseid = R_GOBLIN; addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "goblin corpse"); @@ -7359,6 +7368,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addrace(R_GOBLINSHOOTER, "goblin archer", 20, 'g', C_BROWN, MT_FLESH, RC_HUMANOID, "Deformed goblins born without claws become archers for their communities, pelting their enemies from afar with barrages of arrows."); + setbodytype(lastrace, BT_HUMANOID); lastrace->baseid = R_GOBLIN; addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "goblin corpse"); @@ -7393,6 +7403,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 2, NA, NA, NULL); addrace(R_GOBLINHEXER, "goblin shaman", 20, 'g', C_BROWN, MT_FLESH, RC_HUMANOID, "When a goblin develops an affinity for magic, they become known as shamans. Shamans aim to weaken their foes with hexs, providing easy kills for their comrades."); + setbodytype(lastrace, BT_HUMANOID); lastrace->baseid = R_GOBLIN; addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "goblin corpse"); @@ -7425,6 +7436,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL); addrace(R_HOBGOBLIN, "hobgoblin", 90, 'g', C_GREEN, MT_FLESH, RC_HUMANOID, "A larger, stronger, smarter and more menacing form of a goblin."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 73, NA, NULL); @@ -7459,6 +7471,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addrace(R_HOBGOBLINWAR, "hobgoblin elite", 90, 'g', C_GREEN, MT_FLESH, RC_HUMANOID, "An exceptional hobgoblin commander who has achieved command of its own unit."); + setbodytype(lastrace, BT_HUMANOID); lastrace->baseid = R_HOBGOBLIN; addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -7498,6 +7511,8 @@ void initrace(void) { // TODO: hobgoblin warcaster addrace(R_KOBOLD, "kobold", 18, 'k', C_BROWN, MT_FLESH, RC_HUMANOID, "An evil humanoid race with doglike features, kobolds are known for their cowardace and prefer to attack from a distance if at all possible."); + setbodytype(lastrace, BT_HUMANOID); + setbodypartname(lastrace, BP_HANDS, "paws"); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 95, RR_COMMON, NULL); @@ -7529,6 +7544,7 @@ void initrace(void) { addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); addrace(R_TROGLODYTE, "troglodyte", 20, 'z', C_GREY, MT_FLESH, RC_HUMANOID, "Troglodytes are smaller, stunted lizardmen who at outcast at birth. They linger on the outskirts of society, scavenging garbage and living in their own filth."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_POISONCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -7557,6 +7573,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 2, NA, NA, NULL); addrace(R_LEPRECHAUN, "leprechaun", 35, 'n', C_GREEN, MT_FLESH, RC_HUMANOID, "Leprechauns are tiny Irish humans, with a love for gold and practical jokes. Known for their supernatural luck."); + setbodytype(lastrace, BT_HUMANOID); 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, NA, RR_RARE, NULL); @@ -7580,6 +7597,8 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL); addrace(R_LIZARDMAN, "lizardman", 100, 'z', C_GREEN, MT_LEATHER, RC_HUMANOID, "Lizardmen are as they sound - a cross between a human and a lizard. Their leathery skin helps protect them from pummeling blows, and their tails give them enhanced stability."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); @@ -7600,7 +7619,7 @@ void initrace(void) { addflag(lastrace->flags, F_DTRESIST, DT_FIRE, B_TRUE, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "spits"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "spits"); addflag(lastrace->flags, F_CANWILL, OT_S_POISONBOLT, 5, 5, "pw:5;"); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); @@ -7609,6 +7628,8 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addrace(R_MINOTAUR, "minotaur", 130, 'H', C_BROWN, 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); 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_LARGE, NA, NA, NULL); @@ -7636,10 +7657,10 @@ void initrace(void) { addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 20, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_NOARMOURON, BP_HEAD, NA, NA, NULL); addrace(R_OGRE, "ogre", 160, 'O', C_BROWN, MT_FLESH, RC_HUMANOID, "Large, cruel, monstrous and hideous humanoid monsters. Ogres have a raging temper and hunger for flesh."); + setbodytype(lastrace, BT_HUMANOID); 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_LARGE, NA, NA, NULL); @@ -7671,6 +7692,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL); addrace(R_OGREWARHULK, "warhulk", 160, 'O', C_BROWN, MT_FLESH, RC_HUMANOID, "Warhulks are huge ogres, even angrier than their comrades."); + setbodytype(lastrace, BT_HUMANOID); lastrace->baseid = R_OGRE; addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -7703,6 +7725,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL); addrace(R_ORC, "orc", 90, 'o', C_BROWN, MT_FLESH, RC_HUMANOID, "Orcs are fierce humanoid monsters with green skin and grotesque features."); + setbodytype(lastrace, BT_HUMANOID); 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); @@ -7737,6 +7760,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTJOB, 25, J_WARRIOR, NA, NULL); addrace(R_ORK, "ork", 90, 'o', C_BROWN, MT_FLESH, RC_HUMANOID, "Orcs who have become fascinated with technology tend to become shunned by their peers, and have taken the name 'Orks' for themselves."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "orc corpse"); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); @@ -7767,6 +7791,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addrace(R_PEGASUS, "pegasus", 130, 'Q', C_GREY, MT_FLESH, RC_MAGIC, "A legendary white, winged horse."); + setbodytype(lastrace, BT_QUADRAPED); addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 57, NA, ""); addflag(lastrace->flags, F_RARITY, H_FOREST, 57, NA, NULL); @@ -7778,15 +7803,13 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4"); addflag(lastrace->flags, F_HASATTACK, OT_HOOF, 8, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_HOOF, 8, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 3, 3, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL); addflag(lastrace->flags, F_SWOOPRANGE, 4, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 4, NA, "screams in pain^screams of pain"); @@ -7796,6 +7819,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL); addrace(R_POLTERGEIST, "poltergeist", 50, 'p', C_GREEN, MT_FLESH, RC_UNDEAD, "An evil ghostly spirit who telekinetically throws objects at its enemies."); // sPirit + addbodypart(lastrace, BP_BODY, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_HIGH, NA, NULL); @@ -7805,16 +7829,13 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_SPELLSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_CANWILL, OT_S_TELEKINESIS, NA, NA, "pw:5;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "gestures"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures"); addflag(lastrace->flags, F_SEEINDARK, UNLIMITED, NA, NA, NULL); addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_SS_MENTAL, PR_EXPERT, NA, NULL); @@ -7824,6 +7845,7 @@ void initrace(void) { addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL); addrace(R_SATYR, "satyr", 80, 'h', C_GREEN, MT_FLESH, RC_HUMANOID, "A goat-like humanoid equipped with a set of magical panpipes."); + setbodytype(lastrace, BT_HUMANOID); 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); @@ -7841,7 +7863,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-30 gold coins"); addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "plays its pipes"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "plays its pipes"); addflag(lastrace->flags, F_RESISTMAG, 10, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NEEDOBFORSPELLS, OT_PANPIPES, NA, NA, NULL); @@ -7857,6 +7879,8 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 20, NA, NA, NULL); addrace(R_SHADOWCAT, "shadowcat", 5, 'f', C_BLUE, MT_FLESH, RC_MAGIC, "A huge, feral black cat, surrounded by clouds of black smoke."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, 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_MEDIUM, NA, NA, NULL); @@ -7873,9 +7897,6 @@ void initrace(void) { addflag(lastrace->flags, F_AUTOCREATEOB, 1, NA, NA, "puff of smoke"); addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "puff of smoke"); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addrace(R_OOZEGREY, "grey ooze", 10, 'j', C_GREY, MT_SLIME, RC_SLIME, "Exactly what it sounds like - a small lump of grey ooze. Grey, acidic ooze."); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "pool of slime"); @@ -7888,16 +7909,6 @@ void initrace(void) { addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HEAD, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_EYES, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_ACIDATTACK, 11, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 5, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slurping"); @@ -7909,6 +7920,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOFLEE, 5, NA, NA, NULL); addrace(R_SPRITEFIRE, "fire sprite", 5, 'n', C_RED, MT_FIRE, RC_MAGIC, "A small magical creature surrounded by crackling flames."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "small fire"); addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL); @@ -7918,11 +7930,13 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, 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_SPELLSPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FIREDART, NA, NA, "pw:1;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "gestures"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures"); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_PRODUCESLIGHT, 2, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL); @@ -7934,6 +7948,7 @@ void initrace(void) { addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL); addrace(R_SPRITEICE, "ice sprite", 5, 'n', C_WHITE, MT_ICE, RC_MAGIC, "A small magical creature surrounded by freezing ice."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "sheet of ice"); addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL); @@ -7943,13 +7958,15 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, 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_SPELLSPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FROSTBITE, NA, NA, "pw:1;"); addflag(lastrace->flags, F_CANWILL, OT_S_FREEZEOB, NA, NA, "pw:1;"); addflag(lastrace->flags, F_CANWILL, OT_S_ICICLE, NA, NA, "pw:1;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "gestures"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures"); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_SS_COLD, PR_ADEPT, NA, NULL); @@ -7959,6 +7976,10 @@ void initrace(void) { addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL); addrace(R_TROLL, "troll", 100, 't', C_GREEN, MT_FLESH, RC_HUMANOID, "A savage, hairy green monster. Trolls are extremely muscular, move abnormally quickly and regenerate."); + setbodytype(lastrace, BT_HUMANOID); + setbodypartname(lastrace, BP_HANDS, "claws"); + setbodypartname(lastrace, BP_RIGHTFINGER, "right foreclaw"); + setbodypartname(lastrace, BP_LEFTFINGER, "left foreclaw"); 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_LARGE, NA, NA, NULL); @@ -7975,12 +7996,11 @@ void initrace(void) { addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "claws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addrace(R_XAT, "xat", 2, 'x', C_BROWN, MT_FLESH, RC_ANIMAL, "Xats are wild pigs with the claws of a dog."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, 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, NA, RR_COMMON, NULL); @@ -7991,18 +8011,14 @@ void initrace(void) { addflag(lastrace->flags, F_ENHANCESMELL, 3, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_LTAVERAGE, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "claws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "snorts^a snort"); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); // fish addrace(R_CRAB, "giant crab", 150, ';', C_ORANGE, MT_FLESH, RC_AQUATIC, "A massive orange crab with sharp pincers."); + setbodytype(lastrace, BT_QUADRAPED); + setbodypartname(lastrace, BP_HANDS, "pincers"); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); @@ -8014,17 +8030,15 @@ void initrace(void) { addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "pincers"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addrace(R_MERLOCH, "merloch", 250, 'm', C_ORANGE, MT_FLESH, RC_AQUATIC, "Merlochs are bipedal, fishlike beings. Equally at home in the water or on land, they use their sonic scream to disable foes."); + setbodytype(lastrace, BT_HUMANOID); + noarmouron(lastrace, BP_RIGHTFINGER); + noarmouron(lastrace, BP_LEFTFINGER); + noarmouron(lastrace, BP_HANDS); + noarmouron(lastrace, BP_FEET); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); @@ -8038,24 +8052,15 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SONICBOLT, 4, 4, "pw:5;dam:2d6;"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "pincers"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^gurgling"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 4, NA, "gurgles loudly^a loud gurgle"); - addflag(lastrace->flags, F_NOARMOURON, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOARMOURON, BP_LEFTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOARMOURON, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOARMOURON, BP_FEET, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); + addrace(R_PIRANHA, "piranha", 0.5, ';', C_GREEN, MT_FLESH, RC_AQUATIC, "A vicious, flesh-eating fish"); + setbodytype(lastrace, BT_FISH); addflag(lastrace->flags, F_NEEDSWATER, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8066,18 +8071,11 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, ""); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL); addflag(lastrace->flags, F_MORALE, 2, NA, NA, NULL); addrace(R_PIRANHAKING, "king piranha", 1, ';', C_GREEN, MT_FLESH, RC_AQUATIC, "A larger version of a standard piranha. King piranhas can leap through the air."); + setbodytype(lastrace, BT_FISH); addflag(lastrace->flags, F_NEEDSWATER, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8088,19 +8086,12 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, ""); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:5;"); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addrace(R_EELELEC, "electric eel", 120, ';', C_CYAN, MT_FLESH, RC_AQUATIC, "A sliippery eel charged with electricity."); + setbodytype(lastrace, BT_FISH); addflag(lastrace->flags, F_NEEDSWATER, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8111,18 +8102,11 @@ 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_TREMORSENSE, 10, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_ZAPPER, 6, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_ELECTRIC, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 3, NA, NA, NULL); addrace(R_EELGIANT, "giant eel", 150, ';', C_BLUE, MT_FLESH, RC_AQUATIC, "A very long, slippery eel. They tend to catch and crush their prey."); + setbodytype(lastrace, BT_FISH); addflag(lastrace->flags, F_NEEDSWATER, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8133,19 +8117,12 @@ 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_TREMORSENSE, 10, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_CRUSH, NA, NA, "dam:2d6;"); addflag(lastrace->flags, F_MORALE, 3, NA, NA, NULL); // plants addrace(R_CACTUS, "cactus", 30, 'F', C_YELLOW, MT_PLANT, RC_PLANT, "A wide upright plant coated with sharp spines. Said to sprout delicious fruit."); + addbodypart(lastrace, BP_BODY, "stalk"); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HARMLESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8156,20 +8133,9 @@ void initrace(void) { addflag(lastrace->flags, F_DOESNTMOVE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_EYES, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HEAD, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addrace(R_DREAMFUNGUS, "dreamfungus", 0.5, 'F', C_MAGENTA, MT_PLANT, RC_PLANT, "A huge, spotty, purple mold which releases speed-inducing spores on the slightest contact."); + addbodypart(lastrace, BP_BODY, NULL); 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_RARITY, H_SWAMP, NA, RR_COMMON, NULL); @@ -8181,20 +8147,9 @@ void initrace(void) { addflag(lastrace->flags, F_DOESNTMOVE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_EYES, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HEAD, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addrace(R_SAWGRASS, "sawgrass", 1, 'F', C_GREY, MT_METAL, RC_PLANT, "Razor sharp metallic grass with serrated edges. This plant senses vibrations in the air around it and lashes out with its sharp fronds."); + addbodypart(lastrace, BP_BODY, "stalk"); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8206,24 +8161,13 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_EYES, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HEAD, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WAIST, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); // end plants // animals addrace(R_BAT, "giant bat", 3, 'B', C_BROWN, MT_FLESH, RC_ANIMAL, "A larger (and more savage) version of your average household bat."); + setbodytype(lastrace, BT_BIRD); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); @@ -8232,22 +8176,20 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "0d4+2"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, 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_NOISETEXT, N_FLY, 1, NA, "^flapping wings"); addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 2, NA, NA, NULL); addrace(R_BATMUTATED, "mutated bat", 3, 'B', C_MAGENTA, MT_FLESH, RC_ANIMAL, "Bats exposed to toxic radiation become mutated, and their sonic navigation skills turn deadly."); + setbodytype(lastrace, BT_BIRD); 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_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); @@ -8256,6 +8198,8 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+2"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL); @@ -8263,16 +8207,12 @@ void initrace(void) { addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SONICBOLT, 3, 3, "pw:5;dam:1d4;"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, 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_NOISETEXT, N_FLY, 1, NA, "^flapping wings"); addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addrace(R_BATVAMPIRE, "vampire bat", 6, 'B', C_BLUE, MT_FLESH, RC_ANIMAL, "Bats which suck the blood of their victims."); + setbodytype(lastrace, BT_BIRD); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8280,17 +8220,14 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+4"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 2, 2, NA, NULL); addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL); addflag(lastrace->flags, F_VAMPIRIC, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, 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_MATVULN, MT_SILVER, 200, NA, NULL); @@ -8299,6 +8236,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addrace(R_BEAR, "black bear", 150, 'q', C_BLUE, MT_FLESH, RC_ANIMAL, "A medium sized omnivore bear."); + setbodytype(lastrace, BT_QUADRAPED); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); @@ -8321,11 +8259,9 @@ void initrace(void) { addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_CRUSH, NA, NA, "dam:2d4;"); addflag(lastrace->flags, F_MINIONS, 25, 1, 2, "bear cub"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addrace(R_BEARGRIZZLY, "grizzly bear", 200, 'q', C_YELLOW, MT_FLESH, RC_ANIMAL, "A large angry bear."); + setbodytype(lastrace, BT_QUADRAPED); lastrace->baseid = R_BEAR; addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); @@ -8350,11 +8286,9 @@ void initrace(void) { addflag(lastrace->flags, F_CRITKNOCKDOWN, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_BLEEDABIL, OT_A_RAGE, NA, NA, NULL); addflag(lastrace->flags, F_MINIONS, 25, 1, 2, "bear cub"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addrace(R_BEARCUB, "bear cub", 60, 'q', C_BROWN, MT_FLESH, RC_ANIMAL, "Cute little baby bears. Still dangerous though."); + setbodytype(lastrace, BT_QUADRAPED); lastrace->baseid = R_BEAR; addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); @@ -8374,12 +8308,10 @@ void initrace(void) { addflag(lastrace->flags, F_SEEINDARK, 4, NA, NA, NULL); addflag(lastrace->flags, F_CRITKNOCKDOWN, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, ""); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_MORALE, 3, NA, NA, NULL); addflag(lastrace->flags, F_TAMABLE, 35, NA, NA, NULL); addrace(R_ANT, "giant ant", 20, 'a', C_BROWN, MT_FLESH, RC_ANIMAL, "Giant ants are enormous (for an ant, anyway), and keen to take avenge their smaller ancestors who were crushed by small children."); + setbodytype(lastrace, BT_QUADRAPED); lastrace->baseid = R_ANT; addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); @@ -8391,9 +8323,6 @@ 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_FLEEONHPPCT, 50, NA, NA, ""); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); 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); @@ -8403,6 +8332,7 @@ void initrace(void) { addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addrace(R_ANTS, "giant soldier ant", 25, 'a', C_BROWN, 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; addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); @@ -8414,9 +8344,6 @@ 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_FLEEONHPPCT, 50, NA, NA, ""); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, "dam:1d8+3;"); @@ -8428,6 +8355,7 @@ void initrace(void) { addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 12, NA, NA, NULL); addrace(R_ANTLION, "giant antlion", 30, 'a', C_YELLOW, MT_FLESH, RC_ANIMAL, "Antlions are mammoth giant ants with the head of a lion."); + setbodytype(lastrace, BT_QUADRAPED); lastrace->baseid = R_ANT; addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); @@ -8440,9 +8368,6 @@ 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_FLEEONHPPCT, 50, NA, NA, ""); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 15, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, "dam:2d4;"); @@ -8453,6 +8378,7 @@ void initrace(void) { addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 14, NA, NA, NULL); addrace(R_CHICKEN, "chicken", 0.5, 'c', C_BROWN, MT_FLESH, RC_ANIMAL, "A common farm-yard chicken."); + setbodytype(lastrace, BT_BIRD); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); @@ -8460,10 +8386,6 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "0d4+1"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_BEAK, 2, NA, NULL); addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL); @@ -8475,6 +8397,8 @@ void initrace(void) { addflag(lastrace->flags, F_TIMID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL); addrace(R_DOG, "dog", 35, 'd', C_BROWN, MT_FLESH, RC_ANIMAL, "A medium-sized canine."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_RNDHOSTILE, 10, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); @@ -8486,9 +8410,6 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 2, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 6, NA, NA, NULL); @@ -8496,15 +8417,14 @@ void initrace(void) { addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling"); addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining"); addflag(lastrace->flags, F_FLEEONHPPCT, 60, NA, NA, ""); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 2, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL); addflag(lastrace->flags, F_TAMABLE, 30, NA, NA, NULL); addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); addrace(R_DOGBLINK, "blink dog", 35, 'd', C_YELLOW, MT_FLESH, RC_ANIMAL, "Magical canines who can teleport small distances at will."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 2, 4, NA, ""); @@ -8516,25 +8436,21 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL); addflag(lastrace->flags, F_VEGETARIAN, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 6, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, NULL); // don't announce spellcasting + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, NULL); // don't announce spellcasting addflag(lastrace->flags, F_CANWILL, OT_S_BLINK, 2, 2, "pw:1;"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "barks^barking"); addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling"); addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL); addflag(lastrace->flags, F_MORALE, 2, NA, NA, NULL); addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); addrace(R_DOGDEATH, "death hound", 40, 'd', C_MAGENTA, MT_FLESH, RC_ANIMAL, "Possessed evil canines who thrive on death and destruction."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 2, 6, NA, ""); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8549,9 +8465,6 @@ void initrace(void) { addflag(lastrace->flags, F_MAXATTACKS, 2, 2, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); @@ -8561,13 +8474,12 @@ void initrace(void) { addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 24, "10-15"); addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 1, NA, NULL); addflag(lastrace->flags, F_CRITKNOCKDOWN, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL); addflag(lastrace->flags, F_MORALE, 15, NA, NA, NULL); addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); addrace(R_DOGWAR, "war hound", 40, 'd', C_BROWN, MT_FLESH, RC_ANIMAL, "Canines bred for war."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 1, 4, NA, ""); addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL); @@ -8579,9 +8491,6 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL); @@ -8589,15 +8498,13 @@ void initrace(void) { addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "barks^barking"); addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 2, NA, "growls^growling"); addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_ADEPT, NA, NULL); addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addflag(lastrace->flags, F_TAMABLE, 40, NA, NA, NULL); addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); addrace(R_HAWKYOUNG, "young hawk", 1, 'A', C_GREY, MT_FLESH, RC_ANIMAL, "A young baby hawk."); // 'A' for Avian + setbodytype(lastrace, BT_BIRD); lastrace->baseid = R_HAWK; addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8607,15 +8514,13 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+4"); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, 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_SEEINDARK, 3, NA, NA, NULL); @@ -8629,6 +8534,7 @@ void initrace(void) { addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL); addrace(R_HAWK, "hawk", 1, 'A', C_GREY, MT_FLESH, RC_ANIMAL, "A large bird of prey."); // 'A' for Avian + setbodytype(lastrace, BT_BIRD); lastrace->baseid = R_HAWK; addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8638,15 +8544,13 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3"); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, 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_CANWILL, OT_A_SWOOP, NA, NA, NULL); @@ -8659,6 +8563,7 @@ void initrace(void) { addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL); addrace(R_HAWKBLOOD, "blood hawk", 1, 'A', C_RED, MT_FLESH, RC_ANIMAL, "A stronger version of a hawk."); // 'A' for Avian + setbodytype(lastrace, BT_BIRD); lastrace->baseid = R_HAWK; addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8668,15 +8573,13 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+3"); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 7, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, 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_CANWILL, OT_A_SWOOP, NA, NA, NULL); @@ -8686,6 +8589,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 8, NA, NA, NULL); addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL); addrace(R_HAWKFROST, "frost hawk", 1, 'A', C_CYAN, MT_FLESH, RC_ANIMAL, "A hark imbued with the power of ice. Frost hawks can release a powerufl blast of freezing air when threatened."); // 'A' for Avian + setbodytype(lastrace, BT_BIRD); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); @@ -8694,26 +8598,25 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4"); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 11, NA, NULL); addflag(lastrace->flags, F_EXTRADAM, DT_COLD, NA, NA, "1d6"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, 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_CANWILL, OT_A_SWOOP, NA, NA, NULL); addflag(lastrace->flags, F_SWOOPRANGE, 8, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_COLDBURST, 2, 2, "pw:2;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "screeches"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "screeches"); addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 3, NA, "screeches in pain^screeches of pain"); addflag(lastrace->flags, F_AVIAN, 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_AQUATIC, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); @@ -8723,23 +8626,21 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+1"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, 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:4;"); addflag(lastrace->flags, F_CANWILL, OT_A_SUCKBLOOD, NA, NA, "dam:0d1+4;"); addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 20, NA, NA, NULL); addrace(R_NEWT, "giant newt", 4, ':', C_BROWN, MT_FLESH, RC_ANIMAL, "An abnormally large example of the lizard family."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8752,15 +8653,13 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_FLEEONDAM, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DTRESIST, DT_COLD, B_TRUE, NA, NULL); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 3, NA, NA, NULL); addrace(R_PORCUPINE, "giant porcupine", 10, 'r', C_GREY, MT_FLESH, RC_ANIMAL, "A large four legged creature covered with sharp spines."); + setbodytype(lastrace, BT_QUADRAPED); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HATESRACE, R_ANT, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); @@ -8771,15 +8670,13 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+1"); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RETALIATE, 1, 4, DT_PIERCE, "sharp spines"); addflag(lastrace->flags, F_CORPSEFLAG, F_SHARP, 1, 4, NULL); addflag(lastrace->flags, F_MORALE, 8, NA, NA, NULL); addrace(R_RAT, "giant rat", 3, 'r', C_BROWN, MT_FLESH, RC_ANIMAL, "A rodent of unusual size."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, 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_ANIMAL, NA, NULL); @@ -8793,18 +8690,13 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 4, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "claws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addrace(R_SNAKE, "brown snake", 3, 's', C_BROWN, MT_FLESH, RC_ANIMAL, "Common venomous snakes."); + setbodytype(lastrace, BT_SNAKE); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8816,12 +8708,6 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 20, "5-10"); addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 1, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "torso"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, 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_COLD, NA, NA, NULL); @@ -8833,6 +8719,7 @@ void initrace(void) { addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addrace(R_SNAKECARPET, "carpet snake", 3, 's', C_GREY, MT_FLESH, RC_ANIMAL, "Non-venemous (but not quite harmless) snakes."); + setbodytype(lastrace, BT_SNAKE); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8842,12 +8729,6 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "torso"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, 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_COLD, NA, NA, NULL); @@ -8858,6 +8739,7 @@ void initrace(void) { addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, 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); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8867,12 +8749,6 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 5, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "torso"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, 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_COLD, NA, NA, NULL); @@ -8885,6 +8761,7 @@ void initrace(void) { addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, 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_COMMON, NULL); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8894,25 +8771,20 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "torso"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, 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_COLD, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slithering"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "hisses^hissing"); addflag(lastrace->flags, F_CANWILL, OT_S_POISONBOLT, 4, 4, "pw:3;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "spits"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "spits"); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, 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_UNCOMMON, NULL); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8922,18 +8794,12 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+2"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "torso"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, 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_COLD, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slithering"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "hisses^hissing"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, B_APPENDYOU, "spits"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "spits"); addflag(lastrace->flags, F_CASTTYPE, CT_EYESPIT, NA, NA, NULL); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL); @@ -8942,6 +8808,7 @@ void initrace(void) { addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, 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); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -8952,12 +8819,6 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+3"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "torso"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, 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_COLD, NA, NA, NULL); @@ -8970,6 +8831,7 @@ void initrace(void) { addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, 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); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); @@ -8982,12 +8844,6 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 5, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "torso"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, 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_COLD, NA, NA, NULL); @@ -8999,6 +8855,7 @@ void initrace(void) { addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addrace(R_SPIDER, "giant spider", 5, 'S', C_GREY, MT_FLESH, RC_ANIMAL, "An eight legged beast which features prominently in many nightmares."); + setbodytype(lastrace, BT_SPIDER); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); @@ -9007,11 +8864,7 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+1"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, NULL); // don't announce spellcasting + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, NULL); // don't announce spellcasting addflag(lastrace->flags, F_STARTSKILL, SK_CLIMBING, PR_MASTER, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_WEB, 3, 3, "pw:1;range:4;"); addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL); @@ -9022,11 +8875,10 @@ void initrace(void) { addflag(lastrace->flags, F_POISONCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOMEOB, NA, NA, NA, "web"); addflag(lastrace->flags, F_HOMELEVOB, NA, NA, NA, "1-10 webs"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HEAD, NA, NA, "cephalothorax"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "abdomen"); addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addrace(R_SPIDERFUNNELWEB, "giant funnelweb", 5, 'S', C_MAGENTA, MT_FLESH, RC_ANIMAL, "Like a giant spider... but extremely venomous."); + setbodytype(lastrace, BT_SPIDER); lastrace->baseid = R_SPIDER; addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -9039,11 +8891,7 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 26, "10-20"); addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 3, NA, NULL); // strong! - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, NULL); // don't announce spellcasting + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, NULL); // don't announce spellcasting addflag(lastrace->flags, F_CANWILL, OT_S_WEB, 3, 3, "pw:5;range:2;"); addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -9053,11 +8901,10 @@ void initrace(void) { addflag(lastrace->flags, F_POISONCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOMEOB, NA, NA, NA, "web"); addflag(lastrace->flags, F_HOMELEVOB, NA, NA, NA, "20-30 webs"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HEAD, NA, NA, "cephalothorax"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "abdomen"); addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addrace(R_SPIDERREDBACK, "giant redback", 5, 'S', C_RED, MT_FLESH, RC_ANIMAL, "A version of a giant spider with a highly painful bite."); + setbodytype(lastrace, BT_SPIDER); lastrace->baseid = R_SPIDER; addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -9070,11 +8917,7 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); addflag(lastrace->flags, F_HITCONFER, F_PAIN, SC_POISON, 26, "5-15"); addflag(lastrace->flags, F_HITCONFERVALS, DT_POISON, NA, NA, "1d2"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, NULL); // don't announce spellcasting + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, NULL); // don't announce spellcasting addflag(lastrace->flags, F_CANWILL, OT_S_WEB, 3, 3, "pw:7;range:3;"); addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -9084,11 +8927,11 @@ void initrace(void) { addflag(lastrace->flags, F_POISONCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOMEOB, NA, NA, NA, "web"); addflag(lastrace->flags, F_HOMELEVOB, NA, NA, NA, "10-20 webs"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HEAD, NA, NA, "cephalothorax"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "abdomen"); addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addrace(R_WOLFYOUNG, "young wolf", 10, 'd', C_GREY, MT_FLESH, RC_ANIMAL, "Immature wolves."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CON, AT_VHIGH, NA, NULL); @@ -9108,14 +8951,13 @@ void initrace(void) { addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining"); addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling"); addflag(lastrace->flags, F_FLEEONHPPCT, 75, NA, NA, ""); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_HASSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL); addflag(lastrace->flags, F_MORALE, 3, NA, NA, NULL); addflag(lastrace->flags, F_TAMABLE, 30, NA, NA, NULL); addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); addrace(R_WOLF, "wolf", 25, 'd', C_GREY, MT_FLESH, RC_ANIMAL, "Highly intelligent members of the canine family."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_STARTATT, A_CON, AT_VHIGH, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); @@ -9135,9 +8977,6 @@ void initrace(void) { addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining"); addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling"); addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, ""); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "paws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_HASSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL); addflag(lastrace->flags, F_MORALE, 7, NA, NA, NULL); addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); @@ -9145,11 +8984,16 @@ void initrace(void) { // dragons addrace(R_DRAGONBLUE, "blue dragon", 400, 'D', C_BLUE, MT_FLESH, RC_DRAGON, "Blue dragons are massive reptilian creatures who can (and will) consume almost any living creature."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "28d4"); addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL); addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); @@ -9179,18 +9023,23 @@ void initrace(void) { addflag(lastrace->flags, F_CANCAST, OT_S_GUSTOFWIND, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CANCAST, OT_S_LIGHTNINGBOLT, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "unleashes its lightning breath"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "unleashes its lightning breath"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_GUSTOFWIND, NA, NA, "flaps its wings"); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addrace(R_DRAGONBLUEY, "young blue dragon", 150, 'D', C_BLUE, MT_FLESH, RC_DRAGON, "Blue dragons are massive reptilian creatures who can (and will) consume almost any living creature."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "13d4"); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); @@ -9219,7 +9068,7 @@ void initrace(void) { addflag(lastrace->flags, F_CANCAST, OT_S_GUSTOFWIND, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CANCAST, OT_S_LIGHTNINGBOLT, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CANCAST, OT_S_FLOOD, NA, NA, "pw:2;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "unleashes its lightning breath"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "unleashes its lightning breath"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_GUSTOFWIND, NA, NA, "flaps its wings"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_AIRBLAST, NA, NA, "flaps its wings"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLOOD, NA, NA, "discharges electricity into the ground"); @@ -9227,11 +9076,16 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 15, NA, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addrace(R_DRAGONBLUEA, "ancient blue dragon", 600, 'D', C_BLUE, MT_FLESH, RC_DRAGON, "Blue dragons are massive reptilian creatures who can (and will) consume almost any living creature."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "40d4"); addflag(lastrace->flags, F_ARMOURRATING, 24, NA, NA, NULL); addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); @@ -9265,7 +9119,7 @@ void initrace(void) { addflag(lastrace->flags, F_CANCAST, OT_S_CHAINLIGHTNING, NA, NA, "pw:10;"); addflag(lastrace->flags, F_CANWILL, OT_S_FEAR, 30, 30, "pw:6;"); addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "unleashes its lightning breath"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "unleashes its lightning breath"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_GUSTOFWIND, NA, NA, "flaps its wings"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_AIRBLAST, NA, NA, "flaps its wings"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLOOD, NA, NA, "discharges electricity into the ground"); @@ -9276,11 +9130,16 @@ void initrace(void) { addrace(R_DRAGONRED, "red dragon", 400, 'D', C_RED, MT_FLESH, RC_DRAGON, "Red dragons are massive evil reptilians who thrive on destruction, especially by means of fire."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "30d4"); addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9310,18 +9169,23 @@ void initrace(void) { addflag(lastrace->flags, F_CANCAST, OT_S_BURNINGWAVE, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CANCAST, OT_S_HEATMETAL, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "unleashes its fiery breath"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "unleashes its fiery breath"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_HEATMETAL, NA, NA, "radiates an aura of intense heat"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_PYROMANIA, NA, NA, "flaps its wings"); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addrace(R_DRAGONREDY, "young red dragon", 150, 'D', C_RED, MT_FLESH, RC_DRAGON, "Red dragons are massive evil reptilians who thrive on destruction, especially by means of fire."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "15d4"); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9347,18 +9211,23 @@ void initrace(void) { addflag(lastrace->flags, F_CANCAST, OT_S_FIREDART, NA, NA, "pw:7;"); addflag(lastrace->flags, F_CANCAST, OT_S_PYROMANIA, NA, NA, "pw:10;"); addflag(lastrace->flags, F_CANCAST, OT_S_HEATMETAL, NA, NA, "pw:7;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "unleashes its fiery breath"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "unleashes its fiery breath"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_HEATMETAL, NA, NA, "radiates an aura of intense heat"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_PYROMANIA, NA, NA, "flaps its wings"); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 15, NA, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addrace(R_DRAGONREDA, "ancient red dragon", 600, 'D', C_RED, MT_FLESH, RC_DRAGON, "Red dragons are massive evil reptilians who thrive on destruction, especially by means of fire."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "45d4"); addflag(lastrace->flags, F_ARMOURRATING, 24, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9388,7 +9257,7 @@ void initrace(void) { addflag(lastrace->flags, F_CANCAST, OT_S_BURNINGWAVE, NA, NA, "pw:10;"); addflag(lastrace->flags, F_CANCAST, OT_S_PYROMANIA, NA, NA, "pw:10;"); addflag(lastrace->flags, F_CANWILL, OT_S_FEAR, 30, 30, "pw:6;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "unleashes its fiery breath"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "unleashes its fiery breath"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FEAR, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLAMEPILLAR, NA, NA, "breaths fire into the ground"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_PYROMANIA, NA, NA, "flaps its wings"); @@ -9398,11 +9267,16 @@ void initrace(void) { addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addrace(R_DRAGONWHITE, "white dragon", 400, 'D', C_WHITE, MT_FLESH, RC_DRAGON, "Although white dragons are smaller than other varieties, their icy breath still makes them a formidable threat."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "22d4"); addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9432,17 +9306,22 @@ void initrace(void) { addflag(lastrace->flags, F_CANCAST, OT_S_COLDBURST, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CANCAST, OT_S_WALLOFICE, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "unleashes its icy breath"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "unleashes its icy breath"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_WALLOFICE, NA, NA, "breaths a line of frost along the ground"); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addrace(R_DRAGONWHITEY, "young white dragon", 150, 'D', C_WHITE, MT_FLESH, RC_DRAGON, "Although white dragons are smaller than other varieties, their icy breath still makes them a formidable threat."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4"); addflag(lastrace->flags, F_ARMOURRATING, 7, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9467,17 +9346,22 @@ void initrace(void) { addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL); addflag(lastrace->flags, F_CANCAST, OT_S_COLDBURST, NA, NA, "pw:5;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "unleashes its icy breath"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "unleashes its icy breath"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_WALLOFICE, NA, NA, "breaths a line of frost along the ground"); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 15, NA, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addrace(R_DRAGONWHITEA, "ancient white dragon", 600, 'D', C_WHITE, MT_FLESH, RC_DRAGON, "Although white dragons are smaller than other varieties, their icy breath still makes them a formidable threat."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_WINGS, NULL); + addbodypart(lastrace, BP_TAIL, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "32d4"); addflag(lastrace->flags, F_ARMOURRATING, 16, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9509,7 +9393,7 @@ void initrace(void) { addflag(lastrace->flags, F_CANCAST, OT_S_SHARDSHOT, NA, NA, "pw:10;"); addflag(lastrace->flags, F_CANCAST, OT_S_HAILSTORM, NA, NA, "pw:10;"); addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "unleashes its icy breath"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "unleashes its icy breath"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_WALLOFICE, NA, NA, "breaths a line of frost along the ground"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_HAILSTORM, NA, NA, "breaths out a blast of hailstones"); addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL); @@ -9519,6 +9403,7 @@ void initrace(void) { // insects addrace(R_BUTTERFLY, "butterfly", 0.01, 'i', C_YELLOW, MT_FLESH, RC_ANIMAL, "A harmless, colourful butterfly."); + setbodytype(lastrace, BT_BIRD); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); @@ -9526,12 +9411,10 @@ void initrace(void) { addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "0d4+1"); addflag(lastrace->flags, F_EVASION, 60, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, 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_SILENTMOVE, B_TRUE, NA, NA, NULL); @@ -9541,6 +9424,7 @@ void initrace(void) { addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_TIMID, B_TRUE, NA, NA, NULL); addrace(R_GIANTFLY, "giant fly", 1, 'i', C_GREY, MT_FLESH, RC_INSECT, "Giant flies buzz around the places, feeding on corpses. Usually no more than a nuisance."); + setbodytype(lastrace, BT_BIRD); lastrace->baseid = R_GIANTFLY; addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -9550,16 +9434,14 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d1+0"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "buzzes angrily^an angry buzzing"); addflag(lastrace->flags, F_NOISETEXT, N_FLY, 1, NA, "^buzzing"); @@ -9570,6 +9452,7 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL); addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addrace(R_GIANTBLOWFLY, "giant blowfly", 2, 'i', C_GREY, MT_FLESH, RC_INSECT, "Large, more solid versions of giant flies. These can actually cause damage, albeit rarely."); + setbodytype(lastrace, BT_BIRD); lastrace->baseid = R_GIANTFLY; addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -9579,17 +9462,14 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, ""); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); 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_HITDICE, NA, NA, NA, "1d4+3"); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "buzzes angrily^an angry buzzing"); addflag(lastrace->flags, F_NOISETEXT, N_FLY, 1, NA, "^buzzing"); @@ -9600,22 +9480,20 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL); addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addrace(R_STIRGE, "mosquitoid", 10, 'i', C_BROWN, MT_FLESH, RC_INSECT, "Mosquitoids look like giant dog-sized mosquitoes but are equipped with human-like arms and clawed hands."); + setbodytype(lastrace, BT_BIRD); addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+1"); addflag(lastrace->flags, F_ENHANCESMELL, 2, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "buzzes angrily^an angry buzzing"); addflag(lastrace->flags, F_NOISETEXT, N_FLY, 2, NA, "^buzzing"); @@ -9623,13 +9501,15 @@ void initrace(void) { addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SUCKBLOOD, NA, NA, "dam:1d4;"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "claws"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right foreclaw"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left foreclaw"); addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addrace(R_CENTIPEDE, "giant centipede", 3, 'w', C_GREEN, MT_FLESH, RC_INSECT, "Giant centipedes are long, many-legged creatures with a poisonous bite."); + addbodypart(lastrace, BP_EYES, NULL); + addbodypart(lastrace, BP_HEAD, NULL); + addbodypart(lastrace, BP_BODY, NULL); + addbodypart(lastrace, BP_LEGS, NULL); + addbodypart(lastrace, BP_FEET, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL); @@ -9642,11 +9522,6 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL); addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 25, "10-15"); addflag(lastrace->flags, F_HITCONFERVALS, P_WEAKNESS, 3, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, 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_NOISETEXT, N_WALK, 1, NA, "^scuttling"); @@ -9654,23 +9529,22 @@ void initrace(void) { addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addrace(R_GLOWBUG, "glowbug", 1, 'i', C_WHITE, MT_FLESH, RC_INSECT, "Glowbugs are tiny flying creatures, magically producing light from their bodies."); + setbodytype(lastrace, BT_BIRD); addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, ""); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+0"); addflag(lastrace->flags, F_EVASION, 60, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_ZAPPER, 1, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLASH, 15, 15, "pw:4;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "pulses"); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "pulses"); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_PRODUCESLIGHT, 2, NA, NA, NULL); @@ -9683,6 +9557,9 @@ void initrace(void) { // demons addrace(R_DRETCH, "dretch", 30, '&', C_BROWN, MT_FLESH, RC_DEMON, "An ape-like creature with extended forearms ending in clawed hands. They stand about 4 feet tall and weigh 60 pounds."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_TAIL, NULL); + addbodypart(lastrace, BP_WINGS, 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_MEDIUM, NA, NA, NULL); @@ -9702,10 +9579,11 @@ void initrace(void) { addflag(lastrace->flags, F_CANWILL, OT_S_FEAR, 20, 20, "pw:1;"); addflag(lastrace->flags, F_CANWILL, OT_S_CLOUDKILL, 20, 20, "pw:1;"); addflag(lastrace->flags, F_CANWILL, OT_S_SUMMONDEMON, 20, 20, "pw:3;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "narrows its eyes"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "narrows its eyes"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "roars^an other-wordly roar"); addrace(R_LURKINGHORROR, "lurking horror", 100, 'U', C_MAGENTA, MT_FLESH, RC_DEMON, "A creeping, seething mass of pulsating flesh. A multitide of misshapen eyes and limbs protude from the writhing ooze in all directions. The very sight of this creature inspires a sense of cold dread."); + addbodypart(lastrace, BP_BODY, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -9715,16 +9593,6 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_EYES, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HEAD, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL); addflag(lastrace->flags, F_INDUCEFEAR, B_TRUE, NA, NA, NULL); @@ -9733,6 +9601,9 @@ void initrace(void) { addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addrace(R_QUASIT, "quasit", 4, '&', C_BROWN, MT_FLESH, RC_DEMON, "A tiny, bald humanoid with small spiked horns running down the middle of its scalp, leathery bat-like wings and of course sharp claws.."); + setbodytype(lastrace, BT_HUMANOID); + addbodypart(lastrace, BP_TAIL, NULL); + addbodypart(lastrace, BP_WINGS, 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_SMALL, NA, NA, NULL); @@ -9755,11 +9626,12 @@ void initrace(void) { addflag(lastrace->flags, F_STARTSKILL, SK_STEALTH, PR_ADEPT, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FEAR, 20, 20, "pw:1;"); addflag(lastrace->flags, F_CANWILL, OT_S_INVISIBILITY, 20, 20, "pw:1;"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "narrows its eyes"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "narrows its eyes"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "screechs^an other-wordly screech"); // undead addrace(R_ZOMBIE, "zombie", 50, 'Z', C_BLUE, MT_FLESH, RC_UNDEAD, "The re-animated corpse of a once living entity, zombies seek to consume the brains of living creatures in an attempt to regain their soul."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CON, NA, NA, "6"); @@ -9790,6 +9662,18 @@ void initrace(void) { addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); addrace(R_SKELETON, "skeleton", 20, 'Z', C_GREY, MT_BONE, RC_UNDEAD, "A walking set of bones, animated through the use of necromancy. Due to their lack of soft flesh, they have little to fear from edged weapons."); + setbodytype(lastrace, BT_HUMANOID); + setbodypartname(lastrace, BP_WEAPON, "right metacarpals"); + setbodypartname(lastrace, BP_SECWEAPON, "left metacarpals"); + setbodypartname(lastrace, BP_BODY, "ribs"); + setbodypartname(lastrace, BP_HEAD, "skull"); + setbodypartname(lastrace, BP_SHOULDERS, "scapulas"); + setbodypartname(lastrace, BP_HANDS, "carpals"); + setbodypartname(lastrace, BP_WAIST, "coccyx"); + setbodypartname(lastrace, BP_LEGS, "fibulas"); + setbodypartname(lastrace, BP_FEET, "tarsals"); + setbodypartname(lastrace, BP_RIGHTFINGER, "right phalange"); + setbodypartname(lastrace, BP_LEFTFINGER, "left phalange"); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "5-20 bones"); @@ -9811,20 +9695,10 @@ void initrace(void) { addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_EARS, NA, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_WEAPON, NA, NA, "right metacarpals"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_SECWEAPON, NA, NA, "left metacarpals"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_BODY, NA, NA, "ribs"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HEAD, NA, NA, "skull"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_SHOULDERS, NA, NA, "scapulas"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "carpals"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_WAIST, NA, NA, "coccyx"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEGS, NA, NA, "fibulas"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_FEET, NA, NA, "tarsals"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_RIGHTFINGER, NA, NA, "right phalange"); - addflag(lastrace->flags, F_BODYPARTNAME, BP_LEFTFINGER, NA, NA, "left phalange"); addrace(R_GHAST, "ghast", 50, 'Z', C_MAGENTA, MT_FLESH, RC_UNDEAD, "A more slender and ghost-like form of ghoul. Ghasts are cunning and deadly, and possess a paralyzing touch."); + setbodytype(lastrace, BT_HUMANOID); + setbodypartname(lastrace, BP_HANDS, "claws"); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL); @@ -9844,15 +9718,17 @@ void initrace(void) { addflag(lastrace->flags, F_SEEINDARK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "claws"); addrace(R_GHOST, "ghost", 50, 'p', C_BLUE, MT_MAGIC, RC_UNDEAD, "Wispy spirits formed when a soul refuses to depart the earthly realm after death, ghosts exist part way between dimensions. The sight of a ghost can cause fear in all who behold it, and their ethereal nature makes them immune to most attacks."); // p for sPirit + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL); addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_RARE, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); @@ -9872,6 +9748,8 @@ void initrace(void) { // their previous corpse. use f_mycorpse->oid for this. addrace(R_GHOUL, "ghoul", 50, 'Z', C_GREEN, MT_FLESH, RC_UNDEAD, "Ghouls are monstrous, undead humanoids who feed on flesh and reek of carrion. Their bodies are grey and hairless, their teeth fanged, and their nails sharped into deadly claws."); + setbodytype(lastrace, BT_HUMANOID); + setbodypartname(lastrace, BP_HANDS, "claws"); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL); @@ -9893,9 +9771,9 @@ void initrace(void) { addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); - addflag(lastrace->flags, F_BODYPARTNAME, BP_HANDS, NA, NA, "claws"); addrace(R_VAMPIRE, "vampire", 75, 'V', C_BLUE, MT_FLESH, RC_UNDEAD, "Blood-drinking creatures of the night, vampires have pale white skin and prominent fangs protuding from their mouthes. They are said to be near immortal, able to survive even seemingly fatal attacks by converting themselves to a gaseous form."); + setbodytype(lastrace, BT_HUMANOID); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_EXHIGH, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_VHIGH, NA, NULL); @@ -9923,6 +9801,8 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 10, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 7, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_CHARM, 3, 3, "pw:6;"); addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:3;"); addflag(lastrace->flags, F_CANWILL, OT_S_STUN, 5, 5, "pw:1;"); @@ -9930,7 +9810,7 @@ void initrace(void) { addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); addflag(lastrace->flags, F_DETECTOBS, 10, OT_COFFIN, NA, NULL); addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "pile of ash"); - addflag(lastrace->flags, F_SPELLCASTTEXT, NA, NA, NA, "gestures"); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "gestures"); addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "hisses angrily^an angry hiss"); // special: change to gas cloud with 1 hp on death, if not asleep // special: flee from garlic @@ -9946,19 +9826,11 @@ void initrace(void) { addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+1"); addflag(lastrace->flags, F_EVASION, 300, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HEAD, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_BODY, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 4, NA, NA, NULL); @@ -9971,19 +9843,12 @@ void initrace(void) { addrace(R_DANCINGWEAPON, "dancing weapon", 0, ')', C_GREY, MT_METAL, RC_OTHER, "A magically animated weapon."); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); + addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); addflag(lastrace->flags, F_EVASION, 50, NA, NA, NULL); addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL); addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HEAD, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_BODY, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NODEATHANNOUNCE, B_TRUE, NA, NA, NULL); @@ -10001,15 +9866,6 @@ void initrace(void) { addflag(lastrace->flags, F_FOLLOWRANGE, 1, 1, NA, NULL); // stay right next to master addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_INVULNERABLE, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_RIGHTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEFTFINGER, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_HEAD, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_BODY, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_SHOULDERS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); - addflag(lastrace->flags, F_NOBODYPART, BP_FEET, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NODEATHANNOUNCE, B_TRUE, NA, NA, NULL); diff --git a/defs.h b/defs.h index 9009eff..ff68721 100644 --- a/defs.h +++ b/defs.h @@ -1741,21 +1741,27 @@ enum OBTYPE { #define BP_NONE (-1) enum BODYPART { + // humanoid parts BP_WEAPON = 0, - BP_SECWEAPON, - BP_EARS, - BP_EYES, - BP_HEAD, - BP_SHOULDERS, - BP_BODY, - BP_HANDS, - BP_WAIST, - BP_LEGS, - BP_FEET, - BP_RIGHTFINGER, - BP_LEFTFINGER, + BP_SECWEAPON = 1, + BP_EARS = 2, + BP_EYES = 3, + BP_HEAD = 4, + BP_SHOULDERS = 5, + BP_BODY = 6, + BP_HANDS = 7, + BP_WAIST = 8, + BP_LEGS = 9, + BP_FEET = 10, + BP_RIGHTFINGER = 11, + BP_LEFTFINGER = 12, + // others... + BP_BACKLEGS = 13, + BP_FRONTLEGS = 14, + BP_WINGS = 15, + BP_TAIL = 16, }; -#define MAXBODYPARTS (13) +#define MAXBODYPARTS (17) // depth on a human @@ -2464,7 +2470,7 @@ enum FLAG { F_SPELLCASTTEXT, // text is announcement for spellcast // if text is empty, then don't announce // this lf's spell casting at all. - // if v0 is set, only use text for spellid v0 + // if v0 != OT_NONE, only use text for spellid v0 // if v2 is 'appendyou' " at xxx" will // be appended. F_NODEATHANNOUNCE, // don't say 'the xx dies' if this lf dies @@ -2517,16 +2523,12 @@ enum FLAG { F_DOESNTMOVE, // this race doesn't move (but can still attack) F_AQUATIC, // this race can attack normally in water and suffers no // movement penalties - F_BODYPARTNAME, // for this race, bodypart v0 is called 'text' F_AVIAN, // this race is an avian F_CANINE, // this race is a canine F_HUMANOID, // this race can wear armour / use weapons F_INSECT, // this race is classed as an insect F_UNDEAD, // this race is classed as undead F_COLDBLOOD, // this race is coldblooded - F_NOARMOURON, // this race can't wear armour on bodypart v0 - // obviously doesn't make sense to have both this - // and f_nobodypart for the same body part. F_NOBODYPART, // this race doesn't have bodypart val0 // if v0 is true or b_frominjury, you can regrow it // via a healing potion. @@ -2820,10 +2822,13 @@ enum INJURY { IJ_RIBBROKEN, // can be from explosive too IJ_RIBCRACKED, // can be from explosive too IJ_SHOULDERDISLOCATED, + IJ_TAILBRUISED, + IJ_TAILBROKEN, IJ_TORSOBRUISED, IJ_TORSOBRUISEDBAD, IJ_WINDED, IJ_WINDPIPECRUSHED, + IJ_WINGBRUISED, // slashing IJ_ARTERYPIERCE, IJ_CHESTBLEED, @@ -2834,10 +2839,15 @@ enum INJURY { IJ_FINGERMISSING, IJ_EYELIDSCRAPED, IJ_EYEDESTROYED, + IJ_TAILBLEED, + IJ_WINGBLEED, + IJ_WINGTORN, // explosive IJ_EARSRINGING, IJ_HANDMISSING, IJ_LUNGCOLLAPSED, + IJ_TAILLACERATED, + IJ_WINGDESTROYED, }; @@ -3002,6 +3012,21 @@ typedef struct coord_s { int x,y; } coord_t; +enum BODYTYPE { + BT_BIRD, + BT_FISH, + BT_HUMANOID, + BT_QUADRAPED, + BT_SNAKE, + BT_SPIDER, +}; + +typedef struct bodypart_s { + enum BODYPART id; + char *name; + int armourok; +} bodypart_t; + // command types typedef struct command_s { enum COMMAND id; @@ -3246,6 +3271,9 @@ typedef struct race_s { struct glyph_s glyph; float weight; struct flagpile_s *flags; + struct bodypart_s bodypart[MAXBODYPARTS]; + int nbodyparts; + // speed modifiers // hit dice struct race_s *next, *prev; diff --git a/io.c b/io.c index 32dda6e..98b6b38 100644 --- a/io.c +++ b/io.c @@ -31,6 +31,8 @@ WINDOW *statwin; int statdirty = B_TRUE; +int inaskcoords = B_FALSE; // are we inside this function? + int hascolour = B_TRUE; int noredraw = B_FALSE; @@ -546,6 +548,11 @@ cell_t *askcoords(char *prompt, char *subprompt, int targettype, lifeform_t *src int nretflags; flag_t *retflag[MAXCANDIDATES]; + // rememebr that we're in this function. the main use for this is to ensure + // that when adding a fake corpse for lfs who are feigning death, that we don't + // do a screen update (due to adding an object in sight of the player) + inaskcoords = B_TRUE; + iqb = getattrbracket(getattr(player, A_IQ), A_IQ, NULL); // remember previously targetted lifeforms @@ -1027,19 +1034,27 @@ cell_t *askcoords(char *prompt, char *subprompt, int targettype, lifeform_t *src startlf = c->lf->id; } restoregamewindows(); + inaskcoords = B_FALSE; return c; } else if (ch == 'v') { // view // todo: show obpile or view lf - if (c->lf && cansee(player, c->lf)) { + if (c->lf && cansee(player, c->lf) && (isplayer(c->lf) || !lfhasflag(c->lf, F_FEIGNINGDEATH))) { showlfstats(c->lf, B_FALSE); } else if (haslos(player, c)) { - object_t *o; + object_t *o,*tempob = NULL; + // lf feigning death here? put down a fake corpse. + if (c->lf && lfhasflag(c->lf, F_FEIGNINGDEATH) && !isplayer(c->lf)) { + char obname[BUFLEN]; + sprintf(obname, "%s corpse", c->lf->race->name); + tempob = addob(c->obpile, obname); + } // show objects o = doaskobject(c->obpile, "Describe which object", NULL, B_FALSE, B_FALSE, '\0', AO_NONE, F_NONE); while (o) { describeob(o); o = doaskobject(c->obpile, "Describe which object", NULL, B_FALSE, B_FALSE, '\0', AO_NONE, F_NONE); } + if (tempob) killob(tempob); } } else if (ch == 27) { // esc - cancel finished = B_TRUE; @@ -1062,6 +1077,8 @@ cell_t *askcoords(char *prompt, char *subprompt, int targettype, lifeform_t *src } } + + inaskcoords = B_FALSE; clearmsg(); restoregamewindows(); return NULL; @@ -9031,7 +9048,7 @@ void showlfarmour(lifeform_t *lf) { // default strcpy(rhs, ""); - if (!lfhasflagval(lf, F_NOBODYPART, bp, NA, NA, NULL)) { + if (hasbp(lf, bp)) { object_t *outerob; snprintf(buf, BUFLEN, "%13s:%1s",getbodypartname(lf, bp), " "); o = getequippedob(lf->pack, bp); @@ -9908,29 +9925,29 @@ void showlfstats(lifeform_t *lf, int showall) { } nmissingbp = 0; - for (bp = BP_WEAPON; bp < MAXBODYPARTS; bp++) { - if (lfhasflagval(lf, F_NOBODYPART, bp, NA, NA, NULL)) { - if (bp == BP_RIGHTFINGER) { - if (!lfhasflagval(lf, F_NOBODYPART, BP_HANDS, NA, NA, NULL)) { - missingbp[nmissingbp] = bp; - nmissingbp++; - } - } else if (bp == BP_LEFTFINGER) { - if (!lfhasflagval(lf, F_NOBODYPART, BP_HANDS, NA, NA, NULL) && - !lfhasflagval(lf, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL) - ) { - missingbp[nmissingbp] = bp; - nmissingbp++; - } - } else if (bp == BP_SECWEAPON) { - if (!lfhasflagval(lf, F_NOBODYPART, BP_HANDS, NA, NA, NULL)) { - missingbp[nmissingbp] = bp; - nmissingbp++; - } - } else { + getflags(lf->flags, retflag, &nretflags, F_NOBODYPART, F_NONE); + for (i = 0; i < nretflags; i++) { + bp = retflag[i]->val[0]; + if (bp == BP_RIGHTFINGER) { + if (!lfhasflagval(lf, F_NOBODYPART, BP_HANDS, NA, NA, NULL)) { missingbp[nmissingbp] = bp; nmissingbp++; } + } else if (bp == BP_LEFTFINGER) { + if (!lfhasflagval(lf, F_NOBODYPART, BP_HANDS, NA, NA, NULL) && + !lfhasflagval(lf, F_NOBODYPART, BP_SECWEAPON, NA, NA, NULL) + ) { + missingbp[nmissingbp] = bp; + nmissingbp++; + } + } else if (bp == BP_SECWEAPON) { + if (!lfhasflagval(lf, F_NOBODYPART, BP_HANDS, NA, NA, NULL)) { + missingbp[nmissingbp] = bp; + nmissingbp++; + } + } else { + missingbp[nmissingbp] = bp; + nmissingbp++; } } @@ -9986,7 +10003,6 @@ void showlfstats(lifeform_t *lf, int showall) { mt = findmaterial(getlfmaterial(lf)); wrapprint(mainwin, &y, &x, "%s %s made out of %s. ",you(lf), is(lf), mt->name); } - } else if (mode == 'a') { centre(mainwin, C_WHITE, 0, "ABILITIES"); y = 2; diff --git a/lf.c b/lf.c index 9c177da..4c4e1a0 100644 --- a/lf.c +++ b/lf.c @@ -217,6 +217,17 @@ int bleedfrom(lifeform_t *lf, enum BODYPART bp, int splatter) { return B_TRUE; } +int bpcantakearmour(lifeform_t *lf, enum BODYPART bp) { + int i; + // unnaturally shaped limbs? + for (i = 0; i < lf->race->nbodyparts; i++) { + if ((lf->race->bodypart[i].id == bp) && !lf->race->bodypart[i].armourok) { + return B_FALSE; + } + } + return B_TRUE; +} + void breakgrabs(lifeform_t *lf, int fromme, int tome) { flag_t *f; lifeform_t *alf; @@ -547,6 +558,17 @@ int cancast(lifeform_t *lf, enum OBTYPE oid, int *mpcost) { if (f) { int needgrab = B_FALSE; + // flying with broken/destroyed wings? + if ((oid == OT_S_FLIGHT) && (f->lifetime == FROMRACE)) { + if (lfhasflagval(lf, F_INJURY, IJ_WINGTORN, NA, NA, NULL)) { + reason = E_INJURED; + return B_FALSE; + } else if (lfhasflagval(lf, F_NOBODYPART, BP_WINGS, NA, NA, NULL)) { + reason = E_INJURED; + return B_FALSE; + } + } + // get canwill opts texttospellopts(f->text, "needgrab:", &needgrab, NULL); @@ -845,12 +867,8 @@ int canmakerecipe(lifeform_t *lf, recipe_t *rec) { int canopendoors(lifeform_t *lf) { if (lf) { - if (!lfhasflag(lf, F_HUMANOID)) { - return B_FALSE; - } - if (lfhasflagval(lf, F_NOBODYPART, BP_HANDS, NA, NA, NULL)) { - return B_FALSE; - } + if (!lfhasflag(lf, F_HUMANOID)) return B_FALSE; + if (!hasbp(lf, BP_HANDS)) return B_FALSE; } return B_TRUE; @@ -1138,7 +1156,8 @@ int canwear(lifeform_t *lf, object_t *o, enum BODYPART where) { if (!hasbp(lf, where)) { reason = E_NOBP; return B_FALSE; - } else if (lfhasflagval(lf, F_NOARMOURON, where, NA, NA, NULL)) { + } + if (!bpcantakearmour(lf, where)) { reason = E_DOESNTFIT; return B_FALSE; } @@ -1327,7 +1346,7 @@ int canweild(lifeform_t *lf, object_t *o) { } } else if (f->id == F_TWOHANDED) { // need both hands free... - if (lfhasflagval(lf, F_NOBODYPART, otherloc, NA, NA, NULL)) { + if (!hasbp(lf, otherloc)) { reason = E_NOHANDS; return B_FALSE; } @@ -1417,6 +1436,9 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar case E_NOMP: msg("You don't have enough mana to cast that."); break; + case E_INJURED: + msg("Your injury prevents you from doing that."); + break; case E_LOWIQ: msg("You are not smart enough to cast spells."); break; @@ -1563,7 +1585,7 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar // special case f = lfhasflagval(lf, F_SPELLCASTTEXT, sid, NA, NA, NULL); // specific text for this spell if (!f) { - f = lfhasflag(lf, F_SPELLCASTTEXT); // generic spellcast + f = lfhasflagval(lf, F_SPELLCASTTEXT, OT_NONE, NA, NA, NULL); // generic spellcast } if (f) { if (strlen(f->text)) { @@ -4702,8 +4724,10 @@ enum ALLEGIENCE getallegiance(lifeform_t *lf) { int getallouterarmour(lifeform_t *lf, object_t **ob, int *nobs) { object_t *o; enum BODYPART bp; + int i; *nobs = 0; - for (bp = BP_WEAPON; bp < MAXBODYPARTS; bp++) { + for (i = 0; i < lf->race->nbodyparts; i++) { + bp = lf->race->bodypart[i].id; o = getouterequippedob(lf, bp); if (o) { int n,found = B_FALSE; @@ -5297,26 +5321,40 @@ object_t *getbestweapon(lifeform_t *lf) { int getbodyparthitchance(enum BODYPART bp) { switch (bp) { + case BP_WEAPON: return 0; + case BP_SECWEAPON: return 0; case BP_EYES: return 1; case BP_HEAD: return 2; case BP_WAIST: return 3; case BP_HANDS: return 3; case BP_FEET: return 3; + case BP_TAIL: return 3; + case BP_FRONTLEGS: return 4; + case BP_BACKLEGS: return 4; case BP_LEGS: return 4; case BP_SHOULDERS: return 4; + case BP_WINGS: return 4; case BP_BODY: return 6; - default: break; + + case BP_EARS: + case BP_RIGHTFINGER: + case BP_LEFTFINGER: + break; } return 0; // ie rings, ears, weapon } char *getbodypartname(lifeform_t *lf, enum BODYPART bp) { - flag_t *f; - if (lf) { - f = lfhasflagval(lf, F_BODYPARTNAME, bp, NA, NA, NULL); - if (f) { - return f->text; + int i; + + // does this bodypart have a special name? + for (i = 0; i < lf->race->nbodyparts; i++) { + if (lf->race->bodypart[i].id == bp) { + if (strlen(lf->race->bodypart[i].name)) { + return lf->race->bodypart[i].name; + } + } } } @@ -5343,10 +5381,18 @@ char *getbodypartname(lifeform_t *lf, enum BODYPART bp) { return "shoulders"; case BP_WAIST: return "waist"; + case BP_FRONTLEGS: + return "front legs"; + case BP_BACKLEGS: + return "back legs"; case BP_LEGS: return "legs"; case BP_FEET: return "feet"; + case BP_TAIL: + return "tail"; + case BP_WINGS: + return "wings"; } return "unknown"; } @@ -5362,8 +5408,12 @@ char *getbodypartequipname(enum BODYPART bp) { case BP_HANDS: case BP_HEAD: case BP_BODY: + case BP_FRONTLEGS: + case BP_BACKLEGS: case BP_LEGS: case BP_FEET: + case BP_WINGS: + case BP_TAIL: return "on"; case BP_EYES: case BP_SHOULDERS: @@ -5708,6 +5758,7 @@ int getlfaccuracy(lifeform_t *lf, object_t *wep) { case IJ_SHOULDERDISLOCATED: acc -= 20; break; case IJ_RIBBROKEN: + case IJ_TAILBROKEN: acc -= 30; break; } } @@ -6444,8 +6495,14 @@ int getmovespeed(lifeform_t *lf) { } // flying in low gravity? - if (lfhasflag(lf, F_GRAVLESSENED) && lfhasflag(lf, F_FLYING)) { - speed -= 5; + f = lfhasflag(lf, F_FLYING); + if (f) { + if (lfhasflag(lf, F_GRAVLESSENED)) { + speed -= 5; + } + if ((f->lifetime == FROMRACE) && lfhasflagval(lf, F_INJURY, IJ_WINGBRUISED, NA, NA, NULL)) { + speed += 10; + } } switch (isburdened(lf)) { @@ -6928,8 +6985,15 @@ enum BODYPART getrandomcorebp(lifeform_t *lf) { enum BODYPART bp[4],selbp = BP_NONE; if (hasbp(lf, BP_BODY)) bp[nparts++] = BP_BODY; if (hasbp(lf, BP_HANDS)) bp[nparts++] = BP_HANDS; - if (hasbp(lf, BP_LEGS)) bp[nparts++] = BP_LEGS; if (hasbp(lf, BP_HEAD)) bp[nparts++] = BP_HEAD; + if (hasbp(lf, BP_LEGS) || hasbp(lf, BP_FRONTLEGS) || hasbp(lf, BP_BACKLEGS)) { + bp[nparts++] = BP_LEGS; + } + + if (!nparts) { + return BP_NONE; + } + for (i = 0;i < nparts; i++) { if (i == 0) { cutoff[i] = getbodyparthitchance(bp[i]); @@ -8633,8 +8697,21 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype) { object_t *wep = NULL; int howlong; + if (where == BP_NONE) return B_TRUE; - if (!hasbp(lf, where)) return B_TRUE; + + if (!hasbp(lf, where)) { + if (where == BP_LEGS) { + // adjust bp_legs into bp_frontlegs/bp_backelgs + if (hasbp(lf, BP_FRONTLEGS) || hasbp(lf, BP_BACKLEGS)) { + // ok. + } else { + return B_TRUE; + } + } else { + return B_TRUE; + } + } if (lfhasflag(lf, F_NOINJURIES)) return B_TRUE; if (lfhasflagval(lf, F_INJURY, NA, where, NA, NULL)) return B_TRUE; @@ -8702,6 +8779,21 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype) { desc = strdup("ankle is swollen^cannot wear/remove boots"); break; } } + break; + case BP_TAIL: + switch (rnd(1,2)) { + case 1: + inj = IJ_TAILBRUISED; + desc = strdup("tail is bruised^accuracy penalty"); break; + case 2: + inj = IJ_TAILBROKEN; + desc = strdup("tail is fractured^occasional random movement"); break; + } + break; + case BP_WINGS: + inj = IJ_WINGBRUISED; + desc = strdup("wings are bruised^flight speed lowered"); break; + break; default: break; } } else if (damtype == DT_SLASH) { @@ -8787,6 +8879,22 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype) { inj = IJ_HAMSTRUNG; desc = strdup("left hamstring is torn^lower move speed, chance of falling"); break; } + break; + case BP_TAIL: + inj = IJ_TAILBLEED; + desc = strdup("tail is bleeding^no additional effects"); + break; + case BP_WINGS: + switch (rnd(1,2)) { + case 1: + inj = IJ_WINGTORN; + desc = strdup("wings are torn^cannot fly"); + break; + case 2: + inj = IJ_WINGBLEED; + desc = strdup("wings are bleeding^flying causes damage"); + break; + } default: break; } } else if (damtype == DT_EXPLOSIVE) { @@ -8851,6 +8959,16 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype) { case BP_LEGS: // lose limb break; + case BP_TAIL: + inj = IJ_TAILLACERATED; + desc = strdup("tail is lacerated^chance of falling during movement"); + howlong = PERMENANT; + break; + case BP_WINGS: + inj = IJ_WINGDESTROYED; + desc = strdup("wings are destroyed^cannot fly"); + howlong = PERMENANT; + break; default: break; } @@ -8884,6 +9002,12 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype) { wep = getweapon(lf); if (wep) drop(wep, wep->amt); break; + case IJ_WINGTORN: + killflagsofid(lf->flags, F_FLYING); + break; + case IJ_WINGDESTROYED: + addflag(lf->flags, F_NOBODYPART, BP_WINGS, B_FROMINJURY, NA, NULL); + break; case IJ_WINDED: lf->stamina = 0; if (isplayer(lf)) statdirty = B_TRUE; @@ -9094,10 +9218,14 @@ void loseobflags(lifeform_t *lf, object_t *o, int kind) { } int hasbp(lifeform_t *lf, enum BODYPART bp) { + int i; if (lfhasflagval(lf, F_NOBODYPART, bp, NA, NA, NULL)) { return B_FALSE; } - return B_TRUE; + for (i = 0; i < lf->race->nbodyparts; i++) { + if (lf->race->bodypart[i].id == bp) return B_TRUE; + } + return B_FALSE; } flag_t *hasactivespell(lifeform_t *lf, enum OBTYPE sid) { @@ -9666,6 +9794,8 @@ int isfullyhealed(lifeform_t *lf) { healed = B_FALSE; } else if (getstamina(lf) < getmaxstamina(lf)) { healed = B_FALSE; + } else if (hashealableinjuries(lf)) { + healed = B_FALSE; } return healed; } @@ -9967,6 +10097,17 @@ job_t *addjob(enum JOB id, char *name, char *desc) { return a; } +void addbodypart(race_t *r, enum BODYPART bp, char *name) { + r->bodypart[r->nbodyparts].id = bp; + if (name) { + r->bodypart[r->nbodyparts].name = strdup(name); + } else { + r->bodypart[r->nbodyparts].name = strdup(""); + } + r->bodypart[r->nbodyparts].armourok = B_TRUE; + r->nbodyparts++; +} + lifeform_t *addlf(cell_t *cell, enum RACE rid, int level) { return real_addlf(cell, rid, level, C_AI); } @@ -10074,7 +10215,7 @@ lifeform_t *real_addlf(cell_t *cell, enum RACE rid, int level, int controller) { // set race - this will inherit race flags and material a->race = NULL; - + setrace(a, rid, B_FALSE); // set stamina AFTER setrace as it depends on your attribs @@ -10130,6 +10271,8 @@ race_t *addrace(enum RACE id, char *name, float weight, char glyph, int glyphcol a->glyph.ch = glyph; a->glyph.colour = glyphcolour; + a->nbodyparts = 0; + a->flags = addflagpile(NULL, NULL); return a; } @@ -10641,6 +10784,7 @@ int armourfits(lifeform_t *lf, object_t *o, enum ERROR *reason) { return B_TRUE; } + int askforpayment(lifeform_t *shk, lifeform_t *lf) { char saybuf[BUFLEN]; int totcost = 0; @@ -11939,6 +12083,16 @@ int needstorest(lifeform_t *lf, char *validchars) { return need; } +void noarmouron(race_t *r, enum BODYPART bp) { + int i; + for (i = 0; i < r->nbodyparts; i++) { + if (r->bodypart[i].id == bp) { + r->bodypart[i].armourok = B_FALSE; + break; + } + } +} + // returns TRUE if the player heard it. int noise(cell_t *c, lifeform_t *noisemaker, enum NOISECLASS nclass, int volume, char *text, char *seetext) { lifeform_t *l; @@ -13376,6 +13530,61 @@ void setattr(lifeform_t *lf, enum ATTRIB attr, int val) { } } +void setbodypartname(race_t *r, enum BODYPART bp, char *name) { + int i; + for (i = 0; i < r->nbodyparts; i++) { + if (r->bodypart[i].id == bp) { + free(r->bodypart[i].name); + r->bodypart[i].name = strdup(name); + break; + } + } +} + +void setbodytype(race_t *r, enum BODYTYPE bt) { + int i; + switch (bt) { + case BT_BIRD: + addbodypart(r, BP_EYES, NULL); + addbodypart(r, BP_HEAD, NULL); + addbodypart(r, BP_BODY, NULL); + addbodypart(r, BP_LEGS, NULL); + addbodypart(r, BP_FEET, "talons"); + addbodypart(r, BP_WINGS, NULL); + break; + case BT_HUMANOID: + for (i = BP_WEAPON; i <= BP_LEFTFINGER; i++) { + addbodypart(r, i, NULL); + } + break; + case BT_QUADRAPED: + addbodypart(r, BP_EYES, NULL); + addbodypart(r, BP_HEAD, NULL); + addbodypart(r, BP_BODY, NULL); + addbodypart(r, BP_BACKLEGS, "back legs"); + addbodypart(r, BP_FRONTLEGS, "front legs"); + addbodypart(r, BP_FEET, "paws"); + break; + case BT_FISH: + addbodypart(r, BP_EYES, NULL); + addbodypart(r, BP_HEAD, NULL); + addbodypart(r, BP_BODY, NULL); + addbodypart(r, BP_TAIL, NULL); + break; + case BT_SNAKE: + addbodypart(r, BP_EYES, NULL); + addbodypart(r, BP_HEAD, NULL); + addbodypart(r, BP_TAIL, NULL); + break; + case BT_SPIDER: + addbodypart(r, BP_EYES, NULL); + addbodypart(r, BP_HEAD, "cephalothorax"); + addbodypart(r, BP_BODY, "abdomen"); + addbodypart(r, BP_LEGS, NULL); + break; + } +} + int setfacing(lifeform_t *lf, int dir) { if (isclimbing(lf)) { // can't change dir while climbing return B_TRUE; @@ -13634,22 +13843,20 @@ void setrace(lifeform_t *lf, enum RACE rid, int frompolymorph) { } for (bp = BP_WEAPON; bp < MAXBODYPARTS; bp++) { - if (lfhasflagval(lf, F_NOBODYPART, bp, NA, NA, NULL)) { - for (o = lf->pack->first; o ; o = nexto ) { - nexto = o->next; - if (hasflagval(o->flags, F_EQUIPPED, bp, NA, NA, NULL)) { - char obname[BUFLEN]; - getobname(o, obname, o->amt); - // drop it! - if (isplayer(lf)) { - msg("Your %s drops to the ground!",noprefix(obname)); - } else if (cansee(player, lf)) { - getlfname(lf, buf); - msg("%s%s %s drop to the ground!",buf, getpossessive(buf), - noprefix(obname)); - } - moveob(o, lf->cell->obpile, o->amt); + if (!hasbp(lf, bp)) { + o = getequippedob(lf->pack, bp); + if (o) { + char obname[BUFLEN]; + getobname(o, obname, o->amt); + // drop it! + if (isplayer(lf)) { + msg("Your %s drops to the ground!",noprefix(obname)); + } else if (cansee(player, lf)) { + getlfname(lf, buf); + msg("%s%s %s drop to the ground!",buf, getpossessive(buf), + noprefix(obname)); } + moveob(o, lf->cell->obpile, o->amt); } } } diff --git a/lf.h b/lf.h index 2488e9c..39fedaf 100644 --- a/lf.h +++ b/lf.h @@ -1,5 +1,6 @@ #include "defs.h" +void addbodypart(race_t *r, enum BODYPART bp, char *name); lifeform_t *addlf(cell_t *cell, enum RACE rid, int level); lifeform_t *real_addlf(cell_t *cell, enum RACE rid, int level, int controller); job_t *addjob(enum JOB id, char *name, char *desc); @@ -25,6 +26,7 @@ int appearsrandomly(enum RACE rid); 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 breakaitargets(lifeform_t *lf, int onlylowerlev); long calcscore(lifeform_t *lf); @@ -334,6 +336,7 @@ void modmorale(lifeform_t *lf, int howmuch); void modstamina(lifeform_t *lf, float howmuch); int movecausesnoise(lifeform_t *lf); int needstorest(lifeform_t *lf, char *validchars); +void noarmouron(race_t *r, enum BODYPART bp); int noise(cell_t *c, lifeform_t *noisemaker, enum NOISECLASS nt, int volume, char *text, char *seetext); enum NOISECLASS noisetypetoclass(enum NOISETYPE nt); void outfitlf(lifeform_t *lf); @@ -362,6 +365,8 @@ int sayphrase(lifeform_t *lf, enum SAYPHRASE what, int volume, int val0, char *t int scare(lifeform_t *lf, lifeform_t *scarer, int howlong, int scarerbonus); //int setammo(lifeform_t *lf, object_t *o); void setattr(lifeform_t *lf, enum ATTRIB attr, int val); +void setbodypartname(race_t *r, enum BODYPART bp, char *name); +void setbodytype(race_t *r, enum BODYTYPE bt); int setfacing(lifeform_t *lf, int dir); void setfollowdistance(lifeform_t *lf, int min, int max); void setguntarget(lifeform_t *lf, lifeform_t *targ); diff --git a/move.c b/move.c index 587b4d5..70013d5 100644 --- a/move.c +++ b/move.c @@ -1000,6 +1000,10 @@ int moveeffects(lifeform_t *lf) { if (isplayer(lf)) didmsg = B_TRUE; } } + if (onein(10) && lfhasflagval(lf, F_INJURY, IJ_TAILLACERATED, NA, NA, NULL)) { + fall(lf, NULL, B_TRUE); + if (isplayer(lf)) didmsg = B_TRUE; + } if (isbleeding(lf)) { if (hasbleedinginjury(lf, BP_LEGS)) { @@ -1013,6 +1017,19 @@ int moveeffects(lifeform_t *lf) { } } + if (lfhasflagval(lf, F_INJURY, IJ_WINGBLEED, NA, NA, NULL)) { + flag_t *retflag[MAXCANDIDATES]; + int nretflags,i; + getflags(lf->flags, retflag, &nretflags, F_FLYING, F_NONE); + for (i = 0; i < nretflags; i++) { + if (retflag[i]->lifetime == FROMRACE) { + if (!bleedfrom(lf, BP_WINGS, B_FALSE)) { + losehp(lf, 1, DT_DIRECT, NULL, "blood loss"); + } + } + } + } + f = lfhasflag(lf, F_PAIN); if (f) { if (!lfhasflag(lf, F_DRUNK)) { @@ -1634,8 +1651,8 @@ int movetowards(lifeform_t *lf, cell_t *dst, int dirtype, int strafe) { } int move_will_hurt(lifeform_t *lf) { - flag_t *retflag[MAXCANDIDATES]; - int nretflags,i; + flag_t *retflag[MAXCANDIDATES],*retflag2[MAXCANDIDATES]; + int nretflags,nretflags2,i,n; getflags(lf->flags, retflag, &nretflags, F_INJURY, F_PAIN, F_NONE); for (i = 0; i < nretflags; i++) { @@ -1645,14 +1662,23 @@ int move_will_hurt(lifeform_t *lf) { if (f->id == F_INJURY) { switch (f->val[0]) { case IJ_LEGBLEED: - return B_TRUE; + if (!isairborne(lf)) return B_TRUE; + break; + case IJ_WINGBLEED: + getflags(lf->flags, retflag2, &nretflags2, F_FLYING, F_NONE); + for (n = 0; n < nretflags2; n++) { + if (retflag[n]->lifetime == FROMRACE) { + return B_TRUE; + } + } + break; default: break; } } } - if (hasbleedinginjury(lf, BP_LEGS)) { + if (hasbleedinginjury(lf, BP_LEGS) && !isairborne(lf)) { return B_TRUE; } return B_FALSE; @@ -1910,7 +1936,7 @@ int closedoor(lifeform_t *lf, object_t *o) { return B_TRUE; } - if (lf && lfhasflagval(lf, F_NOBODYPART, BP_HANDS, NA, NA, NULL)) { + if (lf && !canopendoors(lf)) { if (isplayer(lf)) { msg("You have no hands with which to close the door!"); } @@ -2491,10 +2517,14 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) { } } else if (iswoozy(lf)) { rndmove = B_TRUE; + } else if (lfhasflagval(lf, F_INJURY, IJ_TAILBRUISED, NA, NA, NULL) && onein(6)) { + rndmove = B_TRUE; } + if (rndmove) { dir = rnd(DC_N, DC_NW); + strafe = B_TRUE; } cell = getcellindir(lf->cell, dir); @@ -2509,7 +2539,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) { */ // warn before moving onto dangerous cells - if (onpurpose && isplayer(lf) && !lfhasflag(lf, F_SNEAK)) { + if (onpurpose && isplayer(lf) && !lfhasflag(lf, F_SNEAK) && !rndmove) { char ques[BUFLEN]; char ch; if (cell && celldangerous(lf, cell, B_TRUE, &errcode)) { diff --git a/objects.c b/objects.c index 2ec8c0d..25d03fe 100644 --- a/objects.c +++ b/objects.c @@ -28,6 +28,8 @@ extern material_t *material,*lastmaterial; extern recipe_t *firstrecipe,*lastrecipe; extern skill_t *firstskill, *lastskill; +extern int inaskcoords; + void (*precalclos)(lifeform_t *); extern object_t *retobs[MAXPILEOBS+1]; @@ -1651,8 +1653,7 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes } } - - if (gamemode == GM_GAMESTARTED) { + if ((gamemode == GM_GAMESTARTED) && !inaskcoords) { if (o && where->where && !hasflag(o->flags, F_NOGLYPH) && haslos(player, where->where) ) { needredraw = B_TRUE; } diff --git a/text.c b/text.c index e7bf570..74bed26 100644 --- a/text.c +++ b/text.c @@ -771,7 +771,7 @@ char *getkillverb(lifeform_t *victim, object_t *wep, enum DAMTYPE damtype, int d } if (damtype == DT_BITE) return "gore"; if (damtype == DT_SLASH) { - if (lfhasflagval(victim, F_NOBODYPART, BP_HEAD, NA, NA, NULL)) { + if (!hasbp(victim, BP_HEAD)) { return "bisect"; } else { if ((getlfsize(victim) >= SZ_MEDIUM) && onein(3)) {