From 95e470238ed51d129e54844ebbbe326365fbb377 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Tue, 6 Mar 2012 10:47:26 +0000 Subject: [PATCH] - [+] fire skeleton shouldn't be immune to cold - [+] if monster dodges your first atatack, cancel the second! - [+] make god anger/happiness fade over time, unless they are enraged (1 per turn ?) - [+] chance of fading is 1 in (abs(piety)/100) - [+] don't include " [tried] when dumping bones! - [+] "repair all"! - [+] implement repairall - [+] make repairall like eating (auto action) - [+] time taken when you fall down should be longer - [+] F_STAYINROOM monsters will go back to their lair if they ahve no target. - [+] more object decay in bones files: - [+] blood splashes/pools become blood stines - [+] all objects have a 1/4 chance of vanishing (someone picked them up) - [+] resting should only please glorana if your'e actually worshipping her! - [+] exploit: stand outside jimbo's room and pelt him! fixed. - [+] random "behaviours" for more/less hp - [+] around dlev 8-9, monsters are too easy. at this point i'm dealing 10-20 damage per hit. - [+] give monsters a "Challenge Rating" seperate to their hitdice. - [+] instead of gethitdice(), use getcr() - [+] change dumpmonsters - [+] use cr() to determine what monsters will appear, not hit dice. - [+] that way i can have certain mosnters have more hp, but still appear higher in the dungeon - [+] initially, assign CRs based on hit dice - [+] when rolling hitdice for monsters, always give maximum, then go up/down by 15% - [+] monsters shoiuld always know spells from their spellbooks. --- ai.c | 41 ++- attack.c | 26 +- data.c | 569 +++++++++++++++++++++++++++++++++++++++--- data/hiscores.db | Bin 14336 -> 14336 bytes defs.h | 30 ++- doc/add_raceclass.txt | 6 +- flag.c | 9 + flag.h | 1 + god.c | 4 +- io.c | 29 +-- lf.c | 311 +++++++++++++++++------ lf.h | 6 +- map.c | 35 ++- move.c | 23 +- nexus.c | 17 +- nexus.h | 2 +- objects.c | 89 ++++--- objects.h | 4 +- save.c | 9 +- spell.c | 141 ++++++----- spell.h | 2 +- text.c | 22 +- 22 files changed, 1087 insertions(+), 289 deletions(-) diff --git a/ai.c b/ai.c index b2ae806..0a798c3 100644 --- a/ai.c +++ b/ai.c @@ -76,7 +76,7 @@ int aiattack(lifeform_t *lf, lifeform_t *victim, int timelimit) { penalty = (getcelldist(lf->cell, victim->cell)-1); if (penalty < 0) penalty = 0; penalty *= 3; - checkpassed = skillcheckvs(lf, SC_IQ, -penalty, victim, SC_WILL, 5+gethitdice(victim)); + checkpassed = skillcheckvs(lf, SC_IQ, -penalty, victim, SC_WILL, 5+gettr(victim)); } if (!checkpassed) { @@ -655,6 +655,7 @@ flag_t *aigoto(lifeform_t *lf, cell_t *c, enum MOVEREASON why, void *data, int t db = B_TRUE; } + if (lfhasflagval(lf, F_DOESNTMOVE, NA, NA, B_TRUE, NULL)) return NULL; if (lfhasflagval(lf, F_IGNORECELL, c->x, c->y, NA, NULL)) { char lfname[BUFLEN]; @@ -756,26 +757,22 @@ int ai_bored(lifeform_t *lf, lifeform_t *master, int icanattack) { } } - // shopkeepers will return to their shops - /* - if (hasjob(lf, J_SHOPKEEPER)) { - f = lfhasflag(lf, F_OWNSSHOP); - if (f) { - int myshop; - cell_t *where; - myshop = f->val[0]; - // find the closest cell of my shop - where = getclosestroomcell(lf, myshop); - // move towards my shop. note that if the player leaves then - // re-enters this map, they will find that we have instantly - // teleported there (see mapentereffects). - if (aigoto(lf, where, MR_OTHER, NULL, PERMENANT)) { - // success - return B_TRUE; - } + // monsters will return to their lairs + f = lfhasflag(lf, F_STAYINROOM); + if (f && (f->val[0] != NA)) { + int roomid; + cell_t *where; + roomid = f->val[0]; + // find the closest cell of my home room + where = getclosestroomcell(lf, roomid); + // move towards my shop. note that if the player leaves then + // re-enters this map, they will find that we have instantly + // teleported there (see mapentereffects). + if (aigoto(lf, where, MR_OTHER, NULL, PERMENANT)) { + // success + return B_TRUE; } - } - */ + } if (!lfhasflag(lf, F_STUNNED)) { lifeform_t *hateposs[MAXCANDIDATES],*poss[MAXCANDIDATES]; @@ -1296,6 +1293,8 @@ int ai_movement(lifeform_t *lf) { flag_t *f; if (lfhasflag(lf, F_DEBUG)) db = B_TRUE; + if (lfhasflagval(lf, F_DOESNTMOVE, NA, NA, B_TRUE, NULL)) return B_FALSE; + // do we have a target cell? f = hasflag(lf->flags, F_TARGETCELL); if (!f) return B_FALSE; @@ -1632,7 +1631,7 @@ int aimovetolf(lifeform_t *lf, lifeform_t *target, int wantattack) { // want to move but our race doesn't move? if (lfhasflag(lf, F_DOESNTMOVE)) { - if (db) dblog(".oO { want to move towards target but have f_doesntmove - abandonning target. }"); + if (db) dblog(".oO { want to move towards target but have f_doesntmove - abandoning target. }"); loseaitargets(lf); return B_TRUE; } diff --git a/attack.c b/attack.c index 11a8400..40b5132 100644 --- a/attack.c +++ b/attack.c @@ -306,7 +306,7 @@ int attackcell(lifeform_t *lf, cell_t *c, int force) { !lfhasflag(lf, F_RAGE)) { char obname[BUFLEN],wepname[BUFLEN],buf[BUFLEN]; char ch; - real_getobname(o, obname, o->amt, B_NOPREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, o->amt, B_NOPREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL); getobname(priwep, wepname, priwep->amt); snprintf(buf, BUFLEN, "Attacking %s might damage your %s. Proceed?", obname, noprefix(wepname)); ch = askchar(buf, "yn","n", B_TRUE, B_FALSE); @@ -489,7 +489,7 @@ int attackcell(lifeform_t *lf, cell_t *c, int force) { if (attacklf(lf, victim, wep[i], damflag[i])) { - // failed + // failed, or victim died/dodged attacksdone = maxattacks; break; } @@ -777,7 +777,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) armour = getequippedob(victim->pack, critpos); if (armour) { char armname[BUFLEN]; - real_getobname(armour, armname, 1, B_NOPREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOSHOWALL); + real_getobname(armour, armname, 1, B_NOPREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL); sprintf(noun, "%s", noprefix(armname)); } else { sprintf(noun, "%s", getbodypartname(victim, critpos)); @@ -895,7 +895,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) // backstab? if (willbackstab(lf, victim, wep)) { - addflag(victim->flags, F_STABBEDBY, lf->id, NA, NA, NULL); + //addflag(victim->flags, F_STABBEDBY, lf->id, NA, NA, NULL); dam[0] *= (getskill(lf, SK_BACKSTAB)); firstisbackstab = B_TRUE; } @@ -977,9 +977,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) damtype[i] = DT_HOLY; } sprintf(attackname, "%s%s attack", attackername, getpossessive(attackername)); - //difficulty = 20 + ((gethitdice(lf) - gethitdice(victim)) ); - //difficulty = 20 + gethitdice(lf); - difficulty = 24 + gethitdice(victim) - gethitdice(lf); + difficulty = 24 + gettr(victim) - gettr(lf); if (check_for_block(lf, victim, dam[i], damtype[i], difficulty, attackname)) { blocked = B_TRUE; break; // stop processing damage now. @@ -1146,7 +1144,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) // get name of weapon/attacker, for "killedby" text if (wep && !isunarmed) { char wepname[BUFLEN]; - real_getobname(wep, wepname, 1, B_PREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + real_getobname(wep, wepname, 1, B_PREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); /* snprintf(buf, BUFLEN, "%s^%s %s",attackername2, (lf == victim) ? "using" : "weilding", @@ -1188,6 +1186,9 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) if (strstr(buf, "behead")) { // we'll need to place the severed head object addflag(victim->flags, F_BEHEADED, B_TRUE, NA, NA, NULL); + addflag(victim->flags, F_MUTILATED, B_TRUE, NA, NA, NULL); + } else if (strstr(buf, "bisect")) { + addflag(victim->flags, F_MUTILATED, B_TRUE, NA, NA, NULL); } if ((isplayer(lf) || cansee(player, victim)) && !hasflag(victim->flags, F_NODEATHANNOUNCE)) { if (!hasflag(victim->flags, F_PHANTASM)) { @@ -1243,7 +1244,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) // now handle the extra hp loss effects which we postponed above. losehpeffects(victim, dam[i], damtype[i], lf, wep, B_NORETALIATE, waskod, &waskod, prebleed); - if (fatal || waskod) break; // stop now! + if (fatal || waskod || dodged) break; // stop now, don't process further damtypes! } // end foreach damtype if (waskod) { @@ -1432,6 +1433,11 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) } } + if (fatal || waskod || dodged) { + // don't keep attacking if the victim is dead, or moved! + return B_TRUE; + } + if (aidb) dblog(".oO { doattack about to return B_FALSE }"); return B_FALSE; } @@ -1767,7 +1773,7 @@ int check_for_block(lifeform_t *lf, lifeform_t *victim, int dam, enum DAMTYPE da char victimname[BUFLEN]; getlfname(victim, victimname); // announce - real_getobname(shield[i], shname, 1, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOSHOWALL); + real_getobname(shield[i], shname, 1, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL); if (isplayer(lf)) { // player is atatcking msg("%s blocks %s with %s.", victimname, attackname, shname); } else if (cansee(player, lf) || cansee(player, victim)) { // monster is attacking diff --git a/data.c b/data.c index d30eed0..4581f3d 100644 --- a/data.c +++ b/data.c @@ -4920,6 +4920,18 @@ void initobjects(void) { addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); + addot(OT_POWERCORE, "unstable power core", "An energy-generation device which is now dangerously unstable...", MT_METAL, 0.5, OC_TECH, SZ_SMALL); + addflag(lastot->flags, F_VALUE, 0, NA, NA, NULL); + addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); + addflag(lastot->flags, F_TECHLEVEL, PR_BEGINNER, NA, NA, NULL); + addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); + addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); + addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL); + addflag(lastot->flags, F_NOOBDIETEXT, B_TRUE, NA, NA, NULL); + addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL); + addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL); + addflag(lastot->flags, F_EXPLODEONDEATH, NA, 2, NA, "10d2"); + addflag(lastot->flags, F_MAKESNOISE, 33, SV_TALK, NA, "something sparking."); // tech - l3 addot(OT_INFOVISOR, "infovisor", "Sleek looking metal visor which displays info directly into the retina.", MT_METAL, 0.2, OC_TECH, SZ_SMALL); @@ -7597,6 +7609,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+20"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); //addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); //addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 4, NA, NULL); @@ -7606,7 +7619,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LTAVERAGE, NA, NULL); - addflag(lastrace->flags, F_STAYINROOM, NA, NA, NA, NULL); // stay in our maze + addflag(lastrace->flags, F_STAYINROOM, NA, B_TRUE, NA, NULL); // stay in our room, but we can chase targets out. addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "50-100 gold coins"); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "+2 halberd"); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "great armour"); @@ -7641,6 +7654,7 @@ void initrace(void) { addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d3+4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); @@ -7679,6 +7693,7 @@ 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_TR, 2, NA, NA, NULL); 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); @@ -7692,7 +7707,7 @@ void initrace(void) { addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne"); - 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)."); + 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 partially 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"); @@ -7715,7 +7730,6 @@ void initrace(void) { addflag(lastrace->flags, F_EXTRAINFO, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_TECHUSAGE, PR_ADEPT, NA, NULL); // penalties - addbonustext(lastrace->flags, F_PENDESC, "Cannot use magic."); addflag(lastrace->flags, F_DTVULN, DT_COLD, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_WATER, NA, NA, "2d6"); addflag(lastrace->flags, F_DTVULN, DT_ELECTRIC, NA, NA, NULL); @@ -7740,6 +7754,7 @@ void initrace(void) { addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+3"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 4, NA, NULL); @@ -7764,6 +7779,7 @@ void initrace(void) { addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d3+2"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_STARTJOB, 75, J_RANDOM, NA, NULL); @@ -7812,6 +7828,7 @@ void initrace(void) { addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d3+4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); @@ -7848,6 +7865,7 @@ void initrace(void) { addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d2+4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); @@ -7890,6 +7908,7 @@ void initrace(void) { addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d3+4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 4, NA, NULL); @@ -7916,6 +7935,103 @@ void initrace(void) { addflag(lastrace->flags, F_TAMABLE, 25, NA, NA, NULL); addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne"); + // robots + addrace(R_ANDROID, "android", 150, 'R', C_GREEN, MT_METAL, RC_ROBOT, "Androids are robots contructed in the likeness of a human. Unlike cyborgs they contain no living tissue at all outside the brain."); + 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"); + addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_CON, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_WIS, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL); + addflag(lastrace->flags, F_EXTRAINFO, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_TECHUSAGE, PR_MASTER, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 4, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 4, NA, NULL); + addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "bleeps^a bleep"); + addflag(lastrace->flags, F_STARTOBCLASS, 50, OC_TECH, NA, NULL); + addflag(lastrace->flags, F_STARTOBCLASS, 50, OC_TECH, NA, NULL); + addflag(lastrace->flags, F_STARTOBCLASS, 50, OC_TECH, NA, NULL); + addflag(lastrace->flags, F_STARTOBCLASS, 50, OC_TECH, NA, NULL); + addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); + + addrace(R_BOTRIOT, "riot bot", 90, 'R', C_BOLDBLUE, MT_METAL, RC_ROBOT, "Riot bots were created as unmanned crowd-control devices. They use water cannons, gas and electricity to repel violent protestors, and can protect themselves."); + addbodypart(lastrace, BP_BODY, "central core"); + addbodypart(lastrace, BP_FEET, "wheels"); + addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_VERYRARE, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); + addflag(lastrace->flags, F_HEAVENARM, 25, NA, NA, "force field"); + addflag(lastrace->flags, F_CANWILL, OT_S_WATERJET, 3, 3, "pw:6;"); + addflag(lastrace->flags, F_CANWILL, OT_S_CLOUDKILL, 5, 5, "pw:1;"); + addflag(lastrace->flags, F_CANWILL, OT_S_FORCESPHERE, 8, 8, "pw:6;"); + addflag(lastrace->flags, F_CASTCHANCE, 80, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "aims its turret"); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, 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_HASATTACK, OT_ZAPPER, 6, NA, NULL); + + addrace(R_BOTSECURITY, "security bot", 90, 'R', C_BROWN, MT_METAL, RC_ROBOT, "Security bots are basic robotic constructs that generate short (but powerful) electrical charges to deter trespassers."); + addbodypart(lastrace, BP_BODY, "central core"); + addbodypart(lastrace, BP_FEET, "wheels"); + addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_CAVE, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); + addflag(lastrace->flags, F_HEAVENARM, 6, NA, NA, "force field"); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, 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_HASATTACK, OT_ZAPPER, 3, NA, NULL); + addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "swivels its sensors"); + + addrace(R_FLAMETURRET, "flame turret", 100, 'R', C_RED, MT_METAL, RC_ROBOT, "A motorised flamethrower mounted on an automated turntable."); + addbodypart(lastrace, BP_BODY, "central core"); + addbodypart(lastrace, BP_FEET, "turntable"); + addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); + addflag(lastrace->flags, F_DOESNTMOVE, B_TRUE, NA, B_TRUE, NULL); + addflag(lastrace->flags, F_NOPRINTS, B_TRUE, 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_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); + addflag(lastrace->flags, F_CANWILL, OT_S_BURNINGWAVE, NA, NA, "pw:10;"); + addflag(lastrace->flags, F_CASTCHANCE, 100, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, NULL); + addflag(lastrace->flags, F_AUTOROTATE, 1, NA, NA, NULL); + + // 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."); lastrace->baseid = R_BANDIT; @@ -7927,6 +8043,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+2"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); @@ -7953,6 +8070,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); @@ -7978,6 +8096,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+2"); + addflag(lastrace->flags, F_TR, 0, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-2 gold coins"); @@ -7994,6 +8113,7 @@ void initrace(void) { addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+2"); + addflag(lastrace->flags, F_TR, 0, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); addflag(lastrace->flags, F_STARTOB, 80, NA, NA, "1-50 gold coins"); addflag(lastrace->flags, F_STARTOB, 100, OC_POTION, NA, "1-5 potions of rum"); @@ -8016,6 +8136,7 @@ void initrace(void) { addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 0, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-2 stones"); addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL); @@ -8039,6 +8160,7 @@ void initrace(void) { addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); @@ -8069,6 +8191,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "50d4"); + addflag(lastrace->flags, F_TR, 50, NA, NA, NULL); addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed +3 flaming longsword"); @@ -8120,6 +8243,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "50d4"); + addflag(lastrace->flags, F_TR, 50, NA, NA, NULL); addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 8, NA, NULL); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed +5 helmet"); @@ -8173,6 +8297,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "50d4"); + addflag(lastrace->flags, F_TR, 50, NA, NA, NULL); addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 6, NA, NULL); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed +5 pitchfork of dragonslaying"); @@ -8227,6 +8352,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "30d4"); + addflag(lastrace->flags, F_TR, 50, NA, NA, NULL); addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "+5 dagger of sharpness"); @@ -8276,6 +8402,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "50d4"); + addflag(lastrace->flags, F_TR, 50, NA, NA, NULL); addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TOUCHHOLY, 10, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_CARTOGRAPHY, PR_MASTER, NA, NULL); @@ -8321,6 +8448,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "30d4"); + addflag(lastrace->flags, F_TR, 50, NA, NA, NULL); addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 12, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TOUCHPARALYZE2, 6, NA, NULL); @@ -8369,6 +8497,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "50d4"); + addflag(lastrace->flags, F_TR, 50, NA, NA, NULL); addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TOUCHBURN, 16, NA, NULL); @@ -8408,6 +8537,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "25d4"); + addflag(lastrace->flags, F_TR, 50, NA, NA, NULL); addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 4, NA, NULL); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "+5 wizard hat of knowledge"); @@ -8453,6 +8583,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTASLEEPPCT, 0, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "50d4"); + addflag(lastrace->flags, F_TR, 50, NA, NA, NULL); addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "cotton shirt of health"); @@ -8496,7 +8627,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "12d4+4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "8d4"); + addflag(lastrace->flags, F_TR, 9, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL); addflag(lastrace->flags, F_LEVITATING, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); @@ -8528,7 +8660,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+5"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+12"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -8561,6 +8694,7 @@ void initrace(void) { addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "splash of cockatrice blood"); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^clucking"); @@ -8583,6 +8717,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4"); + addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); @@ -8608,6 +8743,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); @@ -8641,6 +8777,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+3"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); @@ -8667,7 +8804,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, 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_HITDICE, NA, NA, NA, "6d4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+5"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -20, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_SLOW, NA, NA, NULL); @@ -8696,7 +8834,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, 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_HITDICE, NA, NA, NA, "19d4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "13d4"); + addflag(lastrace->flags, F_TR, 11, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -20, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -8731,7 +8870,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, 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_HITDICE, NA, NA, NA, "21d4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "15d4"); + addflag(lastrace->flags, F_TR, 12, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 13, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -20, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -8770,7 +8910,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, 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_HITDICE, NA, NA, NA, "17d4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "15d4"); + addflag(lastrace->flags, F_TR, 13, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -20, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -8806,7 +8947,8 @@ void initrace(void) { 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_ENORMOUS, NA, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "24d4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "17d4"); + addflag(lastrace->flags, F_TR, 14, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 20, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -30, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -8855,6 +8997,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 9, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -8891,6 +9034,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, 87, RR_COMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+3"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -8926,6 +9070,7 @@ void initrace(void) { addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -8964,6 +9109,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, 80, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+3"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -9005,7 +9151,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, 75, NA, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, 75, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+5"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+5"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -9038,6 +9185,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, 70, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+7"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -9072,6 +9220,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, 63, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+6"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -9105,6 +9254,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, 50, RR_VERYRARE, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+10"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -9135,6 +9285,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_BREATHWATER, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); @@ -9165,6 +9316,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, 73, RR_COMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+3"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9203,6 +9355,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, 60, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4+3"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9229,9 +9382,6 @@ void initrace(void) { addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 7, NA, NA, NULL); - // TODO: hobgoblin archer - // 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"); @@ -9244,6 +9394,7 @@ void initrace(void) { addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, ""); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4"); + addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -9278,6 +9429,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, 78, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9306,6 +9458,7 @@ void initrace(void) { 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_HITDICE, NA, NA, NA, "4d4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL); @@ -9336,6 +9489,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, 72, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LTAVERAGE, NA, NULL); @@ -9360,6 +9514,37 @@ void initrace(void) { addflag(lastrace->flags, F_STARTJOB, 15, J_WARRIOR, NA, NULL); addflag(lastrace->flags, F_STARTJOB, 15, J_DRUID, NA, NULL); + addrace(R_MALIK, "malik", 5, 'n', C_BLUE, MT_FLESH, RC_MAGIC, "An evil fairy who thrives on murder. They delight in teleporting behind their victims for a quick backstab."); + setbodytype(lastrace, BT_HUMANOID); + addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); + addflag(lastrace->flags, F_NOCORPSE, NA, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL); + addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL); + addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); + addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL); + addflag(lastrace->flags, F_NATURALFLIGHT, 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_CANCAST, OT_S_BLINKASS, 3, 3, "pw:1;"); + 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_STARTOB, 100, NA, NA, "bloodstained dagger"); + addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_BACKSTAB, PR_BEGINNER, NA, NULL); + addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); + addflag(lastrace->flags, F_CASTCHANCE, 70, NA, NA, NULL); + addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SEEINDARK, UNLIMITED, 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); @@ -9370,7 +9555,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_HATESRACE, R_GNOLL, NA, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+3"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+6"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_STAYINROOM, NA, NA, NA, NULL); // stay in our maze @@ -9403,7 +9589,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, 60, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 66, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, 66, RR_UNCOMMON, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+0"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+0"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 11, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9428,6 +9615,40 @@ void initrace(void) { addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTJOB, 20, J_WIZARD, SJ_RANDOM, NULL); + addrace(R_OGRA, "ogra", 160, 'O', C_BROWN, MT_FLESH, RC_HUMANOID, "Female ogres (known as 'ogras' are no less angry of hungry than the males of the species. They are however slightly faster and weaker."); + 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); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, 60, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_CAVE, 60, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, 66, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 66, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+0"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); + addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); + addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 6, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 6, NA, NULL); + addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, AT_VLOW, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_WANTS, OT_GOLD, B_COVETS, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL); + f = addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "morningstar"); + addcondition(f, FC_NOCONDITION, 80); + addaltval(f, F_STARTOB, 100, NA, NA, "club"); + addflag(lastrace->flags, F_STARTOB, 70, NA, NA, "leather armour"); + addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-70 gold coins"); + addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_MORALE, 17, NA, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTJOB, 20, J_WIZARD, SJ_RANDOM, 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; @@ -9439,6 +9660,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, 50, NA, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, 50, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "12d4+0"); + addflag(lastrace->flags, F_TR, 10, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 11, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -9473,6 +9695,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, 80, NA, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, 80, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9510,6 +9733,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, 80, RR_RARE, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, 80, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+3"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9544,6 +9768,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, 100, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, 80, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+3"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9568,6 +9793,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, 81, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 81, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+3"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL); @@ -9598,6 +9824,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_ALL, 80, RR_RARE, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+3"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9622,6 +9849,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_ALL, 80, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4+3"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9648,6 +9876,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_LEVITATING, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_CANCAST, OT_S_LEVITATION, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_LEVITATION, NA, NA, NULL); @@ -9686,6 +9915,7 @@ void initrace(void) { 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_TR, 6, NA, NA, NULL); 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); @@ -9708,6 +9938,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); @@ -9738,6 +9969,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_COLD, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_WATER, NA, NA, NULL); @@ -9767,6 +9999,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_COLD, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_WATER, NA, NA, NULL); @@ -9797,6 +10030,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4"); + addflag(lastrace->flags, F_TR, 10, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 14, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -50, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); @@ -9822,6 +10056,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -50, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); @@ -9845,6 +10080,7 @@ void initrace(void) { 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_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL); @@ -9865,6 +10101,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, 75, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, 72, RR_RARE, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_HIGH, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_BUTT, 8, NA, NULL); @@ -9899,6 +10136,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, 65, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 40, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); @@ -9924,6 +10162,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_STABILITY, B_TRUE, NA, NA, NULL); @@ -9950,6 +10189,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+0"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); @@ -9972,6 +10212,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_PROJECTILE, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_FALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -9993,6 +10234,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); @@ -10027,6 +10269,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); @@ -10058,6 +10301,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); @@ -10093,6 +10337,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+0"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL); @@ -10100,6 +10345,7 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 12, NA, NULL); addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); + addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL); 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); @@ -10107,6 +10353,37 @@ void initrace(void) { addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_REVIVETIMER, 0, 25, R_TROLL, NULL); + addrace(R_TROLLKIN, "trollkin", 100, 't', C_GREY, MT_FLESH, RC_HUMANOID, "Trollkins are the horrific offspring of a troll and a human. While they lack the regenerative abilities of a standard troll, their human genes grant them a greater level of intelligence."); + 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); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+0"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); + addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL); + addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL); + addflag(lastrace->flags, F_STARTOBCLASS, 90, OC_WEAPON, NA, NULL); + addflag(lastrace->flags, F_STARTOBCLASS, 70, OC_ARMOUR, NA, NULL); + addflag(lastrace->flags, F_STARTOBCLASS, 60, OC_ARMOUR, NA, NULL); + addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); + addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL); + 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_NOCTURNAL, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTJOB, 25, J_WARRIOR, NA, NULL); + addrace(R_TROLLSNOW, "snow troll", 100, 't', C_WHITE, MT_FLESH, RC_HUMANOID, "A savage, hairy monster covered with white fur. Trolls are extremely muscular, move abnormally quickly and regenerate."); setbodytype(lastrace, BT_HUMANOID); setbodypartname(lastrace, BP_HANDS, "claws"); @@ -10119,6 +10396,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+0"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL); @@ -10139,6 +10417,36 @@ void initrace(void) { addflag(lastrace->flags, F_REVIVETIMER, 0, 25, R_TROLL, NULL); addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_COLD, NA, "50"); + addrace(R_TROLLSWAMP, "swamp troll", 100, 't', C_BOLDGREEN, MT_FLESH, RC_HUMANOID, "Twisted trolls who roam the swamplands, their claws infected with a lethal poison."); + 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); + 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, "5d4+0"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); + addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 12, NA, NULL); + addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 32, "5-10"); + addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 3, NA, NULL); + addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL); + addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); + addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); + addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL); + addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL); + addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_REVIVETIMER, 0, 25, R_TROLL, 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); @@ -10147,6 +10455,7 @@ void initrace(void) { 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_TR, 1, 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_STARTATT, A_IQ, AT_LOW, NA, NULL); @@ -10167,6 +10476,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 20, NA, NA, NULL); // very high armour addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_VERYSLOW, NA, NA, ""); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); @@ -10190,6 +10500,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 15, NA, NA, NULL); // high armour addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_SLOW, NA, NA, ""); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); @@ -10215,6 +10526,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4"); + addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); 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, ""); @@ -10233,6 +10545,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+2"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); 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, ""); @@ -10251,6 +10564,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+0"); + addflag(lastrace->flags, F_TR, 2, 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_TREMORSENSE, 10, NA, NA, NULL); @@ -10270,6 +10584,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+0"); + addflag(lastrace->flags, F_TR, 5, 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_TREMORSENSE, 10, NA, NA, NULL); @@ -10291,6 +10606,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOPRINTS, 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_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addrace(R_FUNGUSDREAM, "dreamfungus", 0.5, 'F', C_MAGENTA, MT_PLANT, RC_PLANT, "A huge, spotty, purple mold which releases speed-inducing spores on the slightest contact."); @@ -10308,6 +10624,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOPRINTS, 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_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_BASH, NA, NA, NULL); addrace(R_FUNGUSRAGE, "ragefungus", 0.5, 'F', C_RED, MT_PLANT, RC_PLANT, "This deep red fungus protects itself by explelling rage-inducing pheremones, causing predators to attack each other instead of it."); @@ -10325,6 +10642,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOPRINTS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_BASH, NA, NA, NULL); @@ -10341,6 +10659,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOPRINTS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "passionfruit"); addflag(lastrace->flags, F_RETALIATE, 1, 1, DT_PIERCE, "sharp spines"); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); @@ -10373,6 +10692,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOPRINTS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, 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."); @@ -10388,11 +10708,31 @@ void initrace(void) { addflag(lastrace->flags, F_NOPRINTS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 3, NA, 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_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_ELECTRIC, NA, NA, NULL); + + addrace(R_UNYON, "unyon", 0.5, 'F', C_WHITE, MT_PLANT, RC_PLANT, "This genetically engineered onion plant has developed its stinging fumes into a self-defense mechanism."); + addbodypart(lastrace, BP_BODY, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_HARMLESS, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); + addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "1-2 onions"); + addflag(lastrace->flags, F_DOESNTMOVE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_NOPRINTS, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); + addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_DTIMMUNE, DT_BASH, NA, NA, NULL); // end plants // animals @@ -10410,6 +10750,7 @@ void initrace(void) { 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_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 1, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); @@ -10434,6 +10775,7 @@ void initrace(void) { 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_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); @@ -10458,6 +10800,7 @@ void initrace(void) { 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_TR, 3, NA, NA, NULL); 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); @@ -10478,7 +10821,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_STARTASLEEPPCT, 80, NA, NA, NULL); // hibernating - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+3"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+3"); + addflag(lastrace->flags, F_TR, 5, 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_ENHANCESMELL, 5, NA, NA, NULL); @@ -10506,7 +10850,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_STARTASLEEPPCT, 80, NA, NA, NULL); // hibernating - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4+5"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4+12"); + addflag(lastrace->flags, F_TR, 7, 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_ENHANCESMELL, 5, NA, NA, NULL); @@ -10534,7 +10879,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+4"); + addflag(lastrace->flags, F_TR, 4, 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_ENHANCESMELL, 4, NA, NA, NULL); @@ -10561,7 +10907,8 @@ void initrace(void) { addflag(lastrace->flags, F_NUMAPPEAR, 3, 4, NA, ""); addflag(lastrace->flags, F_ARMOURRATING, 4, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+3"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -10583,7 +10930,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_ARMOURRATING, 9, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -10608,7 +10956,8 @@ void initrace(void) { addflag(lastrace->flags, F_ARMOURRATING, 4, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+0"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+6"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -10637,6 +10986,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TONGUE, 3, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL); @@ -10665,6 +11015,7 @@ 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_TR, 0, 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); @@ -10687,6 +11038,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 2, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -10716,6 +11068,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -10744,6 +11097,7 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, ""); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+1"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 10, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 10, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 2, 2, NA, NULL); @@ -10774,6 +11128,7 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, ""); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+2"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); 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); @@ -10803,6 +11158,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+4"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TONGUE, 6, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -10831,6 +11187,7 @@ void initrace(void) { 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_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); @@ -10862,6 +11219,7 @@ void initrace(void) { 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_TR, 4, NA, NA, NULL); 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); @@ -10891,6 +11249,7 @@ void initrace(void) { 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_TR, 5, NA, NA, NULL); 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); @@ -10915,7 +11274,8 @@ void initrace(void) { addflag(lastrace->flags, F_NATURALFLIGHT, 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_HITDICE, NA, NA, NA, "8d4"); + addflag(lastrace->flags, F_TR, 8, NA, NA, NULL); 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); @@ -10944,7 +11304,8 @@ void initrace(void) { addflag(lastrace->flags, F_NATURALFLIGHT, 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, "11d4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4"); + addflag(lastrace->flags, F_TR, 9, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 14, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); @@ -10972,6 +11333,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+1"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -10996,6 +11358,7 @@ void initrace(void) { 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_HITDICE, NA, NA, NA, "1d4+0"); + addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -11020,6 +11383,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+1"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -11040,6 +11404,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "0d4+1"); + addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); 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); @@ -11064,6 +11429,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4+1"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_ACIDATTACK, 11, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slurping"); @@ -11093,6 +11459,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+1"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); @@ -11116,6 +11483,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); 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); @@ -11142,6 +11510,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, 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_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -11164,6 +11533,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 5, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -11188,6 +11558,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -11214,6 +11585,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+2"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -11242,6 +11614,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+3"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -11271,6 +11644,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 5, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -11292,7 +11666,8 @@ void initrace(void) { addflag(lastrace->flags, F_NOSMELL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+1"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+1"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, NULL); // don't announce spellcasting addflag(lastrace->flags, F_SPIDERCLIMB, B_TRUE, NA, NA, NULL); @@ -11321,6 +11696,7 @@ void initrace(void) { addflag(lastrace->flags, F_SPIDERCLIMB, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+1"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); 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! @@ -11350,7 +11726,8 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_SPIDERCLIMB, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+1"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+1"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); 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"); @@ -11368,6 +11745,37 @@ void initrace(void) { addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_FLEEONHPPCT, 25, NA, NA, ""); addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "10"); + addrace(R_SPIDERTOMB, "tomb spider", 5, 'S', C_BLUE, MT_FLESH, RC_ANIMAL, "Tomb spiders are truly nightmarish beings. Their skin can absorb light itself, and they can boost their own life force by consuming the flesh of their victims."); + setbodytype(lastrace, BT_SPIDER); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL); + addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); + addflag(lastrace->flags, F_NOSMELL, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+2"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 7, NA, NULL); + addflag(lastrace->flags, F_VAMPIRIC, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_DARKNESS, NA, NA, "sucks in light from around it"); + addflag(lastrace->flags, F_SPIDERCLIMB, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CANCAST, OT_S_WEB, 3, 3, "pw:8;range:4;"); + addflag(lastrace->flags, F_CANCAST, OT_S_DARKNESS, 10, 10, "pw:3;"); + addflag(lastrace->flags, F_CANWILL, OT_A_CLIMB, NA, NA, "pw:10;"); + addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL); + addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, NULL); + addflag(lastrace->flags, F_SEEINDARK, UNLIMITED, NA, NA, NULL); + addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); + 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_NOCTURNAL, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_FLEEONHPPCT, 25, NA, NA, ""); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, 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); @@ -11379,6 +11787,7 @@ void initrace(void) { addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+2"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -11405,7 +11814,8 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, ""); addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+3"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 5, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 5, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); @@ -11434,6 +11844,7 @@ void initrace(void) { addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+2"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_EXTRADAM, DT_COLD, NA, NA, "1d6"); addflag(lastrace->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL); @@ -11470,7 +11881,8 @@ void initrace(void) { addflag(lastrace->flags, F_TREMORSENSE, 2, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4"); + addflag(lastrace->flags, F_TR, 9, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); //addflag(lastrace->flags, F_WANTSOBFLAG, F_RARITY, NA, NA, NULL); // ie. everything addflag(lastrace->flags, F_CANWILL, OT_A_SWALLOW, 5, 5, NULL); @@ -11495,7 +11907,8 @@ void initrace(void) { addflag(lastrace->flags, F_NATURALFLIGHT, 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_HITDICE, NA, NA, NA, "10d5"); + addflag(lastrace->flags, F_TR, 10, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); @@ -11528,6 +11941,7 @@ void initrace(void) { 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_TR, 16, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL); addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_BREATHWATER, B_TRUE, NA, NA, NULL); @@ -11578,6 +11992,7 @@ void initrace(void) { 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_TR, 10, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_BREATHWATER, B_TRUE, NA, NA, NULL); @@ -11628,6 +12043,7 @@ void initrace(void) { 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_TR, 19, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 24, NA, NA, NULL); addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_BREATHWATER, B_TRUE, NA, NA, NULL); @@ -11686,6 +12102,7 @@ void initrace(void) { 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_TR, 17, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); @@ -11736,6 +12153,7 @@ void initrace(void) { 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_TR, 10, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); @@ -11782,6 +12200,7 @@ void initrace(void) { 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_TR, 20, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 24, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); @@ -11835,6 +12254,7 @@ void initrace(void) { 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_TR, 15, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); @@ -11883,7 +12303,8 @@ void initrace(void) { addflag(lastrace->flags, F_NATURALFLIGHT, 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_HITDICE, NA, NA, NA, "10d4+5"); + addflag(lastrace->flags, F_TR, 10, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 7, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); @@ -11928,6 +12349,7 @@ void initrace(void) { 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_TR, 18, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 16, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); @@ -11979,6 +12401,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL); addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+0"); + addflag(lastrace->flags, F_TR, 4, 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_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); @@ -12003,6 +12426,7 @@ void initrace(void) { 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_TR, 0, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 60, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -12027,6 +12451,7 @@ void initrace(void) { 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_TR, 1, NA, NA, NULL); 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); @@ -12057,6 +12482,7 @@ void initrace(void) { 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_TR, 1, NA, NA, NULL); 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); @@ -12084,6 +12510,7 @@ void initrace(void) { 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_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 2, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -12114,6 +12541,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); 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); @@ -12131,6 +12559,7 @@ void initrace(void) { 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, "2d4"); + addflag(lastrace->flags, F_TR, 2, 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_DTIMMUNE, DT_FIRE, NA, NA, NULL); @@ -12156,6 +12585,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, 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_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 60, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_ZAPPER, 1, NA, NULL); addflag(lastrace->flags, F_CANCAST, OT_S_FLASH, 15, 15, "pw:4;"); @@ -12182,6 +12612,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+0"); + addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_STINGACID, NA, NA, "dam:1d1;"); @@ -12204,7 +12635,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_HEAVEN, NA, RR_COMMON, 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_HITDICE, NA, NA, NA, "2d8+4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+9"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -12232,6 +12664,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -12257,6 +12690,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -12282,6 +12716,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+0"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); 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); @@ -12301,6 +12736,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 4, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -12327,6 +12763,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 6, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -12353,6 +12790,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d8"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -12388,6 +12826,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+3"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); @@ -12430,6 +12869,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -12465,6 +12905,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -12486,7 +12927,8 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+4"); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HASATTACK, OT_TOUCHCHILL, 7, NA, NULL); @@ -12516,6 +12958,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+2"); + addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL); @@ -12544,6 +12987,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TOUCHCHILL, 4, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+2"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL); @@ -12572,6 +13016,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_STENCH, 3, 1, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+2"); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_SLOW, NA, NA, ""); @@ -12597,6 +13042,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4+3"); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_HASATTACK, OT_TOUCHNECROTIC, 12, NA, NULL); @@ -12622,7 +13068,8 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); - addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "8d4+3"); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "8d4+7"); + addflag(lastrace->flags, F_TR, 9, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "pw:8;"); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "cursed robe"); @@ -12647,6 +13094,33 @@ void initrace(void) { addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); + addrace(R_REVENANT, "revenant", 60, 'Z', C_BOLDBLUE, MT_FLESH, RC_UNDEAD, "A powerful zombie which retains full memory of its former life and abilities."); + setbodytype(lastrace, BT_HUMANOID); + addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, AT_HIGH, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL); + addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "8d4"); + addflag(lastrace->flags, F_TR, 8, NA, NA, NULL); + addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL); + addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL); + addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CASTCHANCE, 50, NA, NA, NULL); + addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTJOB, 25, J_DRUID, NA, NULL); + addflag(lastrace->flags, F_STARTJOB, 25, J_NINJA, NA, NULL); + addflag(lastrace->flags, F_STARTJOB, 25, J_WARRIOR, NA, NULL); + addflag(lastrace->flags, F_STARTJOB, 100, J_WIZARD, SJ_RANDOM, NULL); + addflag(lastrace->flags, F_REVIVETIMER, 0, 25, R_REVENANT, NULL); + 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); @@ -12670,6 +13144,7 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "8d4+3"); + addflag(lastrace->flags, F_TR, 9, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL); addflag(lastrace->flags, F_HOMEOB, NA, NA, NA, "coffin"); @@ -12703,6 +13178,7 @@ void initrace(void) { 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_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 300, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -12728,6 +13204,7 @@ void initrace(void) { addflag(lastrace->flags, F_HATESALL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4"); + addflag(lastrace->flags, F_TR, 10, NA, NA, NULL); addflag(lastrace->flags, F_DOESNTMOVE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOPRINTS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL); @@ -12747,6 +13224,7 @@ void initrace(void) { 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_TR, 8, NA, NA, NULL); 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); @@ -12764,6 +13242,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); addflag(lastrace->flags, F_LEVITATING, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4"); + addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL); addflag(lastrace->flags, F_FOLLOWRANGE, 1, 1, NA, NULL); // stay right next to master addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); @@ -12788,6 +13267,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_ENORMOUS, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4"); + addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_DOESNTMOVE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOPRINTS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 4, NA, NULL); @@ -12844,15 +13324,35 @@ void initrace(void) { addflag(r->flags, F_DISEASEIMMUNE, B_TRUE, NA, NA, NULL); addflag(r->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addflag(r->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL); - } else if (r->raceclass->id == RC_UNDEAD) { + } else if (r->raceclass->id == RC_ROBOT) { + addflag(r->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); + addflag(r->flags, F_DISEASEIMMUNE, B_TRUE, NA, NA, NULL); + addflag(r->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL); + addflag(r->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL); + addflag(r->flags, F_BREATHWATER, B_TRUE, NA, NA, NULL); + addflag(r->flags, F_DTVULN, DT_ELECTRIC, NA, NA, NULL); + addflag(r->flags, F_DTVULN, DT_WATER, NA, NA, NULL); + addflag(r->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "beeps^a beep"); + addflag(r->flags, F_CORPSETYPE, NA, NA, NA, "unstable power core"); + addflag(r->flags, F_MORALE, 40, NA, NA, NULL); + addflag(r->flags, F_SEEINDARK, B_TRUE, NA, NA, NULL); + + // will probably also be immune to fire/cold because they are metal + + } else if (r->raceclass->id == RC_UNDEAD) { addflag(r->flags, F_DISEASEIMMUNE, B_TRUE, NA, NA, NULL); addflag(r->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL); addflag(r->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL); addflag(r->flags, F_DTIMMUNE, DT_POISONGAS, NA, NA, NULL); addflag(r->flags, F_DTIMMUNE, DT_DECAY, NA, NA, NULL); addflag(r->flags, F_DTIMMUNE, DT_NECROTIC, NA, NA, NULL); + addflag(r->flags, F_BREATHWATER, B_TRUE, NA, NA, NULL); switch (r->id) { + case R_SKELETONFIRE: + f = hasflagval(r->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL); + if (f) killflag(f); + break; case R_MUMMYG: break; default: @@ -12884,6 +13384,7 @@ void initraceclasses(void) { addraceclass(RC_INSECT, "insect", "insects and animals", SK_LORE_NATURE); addraceclass(RC_MAGIC, "magical creature", "magical creatures", SK_LORE_ARCANA); addraceclass(RC_PLANT, "plant", "plants", SK_LORE_NATURE); + addraceclass(RC_ROBOT, "robot", "robots", SK_TECHUSAGE); addraceclass(RC_SLIME, "slime", "slimes", SK_NONE); addraceclass(RC_UNDEAD, "undead", "the undead", SK_LORE_UNDEAD); } diff --git a/data/hiscores.db b/data/hiscores.db index f360394d1bcfda318e4693e394368a89a75d1ba3..6d17b95714f0ce6f10c78563c206824c251053a6 100644 GIT binary patch delta 107 zcmV-x0F?iLaDZ@-8v)a?9JB}o0-^)Xk#V%MhzTA60s$a$$63WFTUBAYmY8Y+-F>Aar$da%FTUb0BwNc4Z)MW*}y1 Na+6&)9JAmxAOePiBi8@` delta 42 zcmV+_0M-A1aDZ@-8v)U=9JB}o15g9bk#V%MhzTA60szjls0wZ=v2n@)v*0x#0#=U? A%K!iX diff --git a/defs.h b/defs.h index 19b09ca..d3b0a77 100644 --- a/defs.h +++ b/defs.h @@ -161,10 +161,13 @@ #define B_NOBLINDADJUST (0) #define B_BLESSINGS (-1) #define B_NOBLESSINGS (0) +#define B_USED (-1) +#define B_NOUSED (0) #define B_SHOWALL (-1) #define B_NOSHOWALL (0) + // Limits // must be >= max # of spells/abilities AND @@ -923,6 +926,7 @@ enum RACECLASS { RC_GOD, RC_HUMANOID, RC_INSECT, + RC_ROBOT, RC_SLIME, RC_MAGIC, RC_OTHER, @@ -946,6 +950,11 @@ enum RACE { R_ELF, R_HUMAN, R_MAMMOAN, + // robots + R_ANDROID, + R_BOTRIOT, + R_BOTSECURITY, + R_FLAMETURRET, // human monsters R_BANDITLDR, R_BANDIT, @@ -989,7 +998,9 @@ enum RACE { R_KOBOLD, R_LEPRECHAUN, R_LIZARDMAN, + R_MALIK, R_MINOTAUR, + R_OGRA, R_OGRE, R_OGREWARHULK, R_OOZEGREY, @@ -1016,7 +1027,9 @@ enum RACE { R_TRICLOPS, R_TROGLODYTE, R_TROLL, + R_TROLLKIN, R_TROLLSNOW, + R_TROLLSWAMP, R_VAMPIRE, R_XAT, // fish @@ -1033,6 +1046,7 @@ enum RACE { R_FUNGUSRAGE, R_NUTTER, R_SAWGRASS, + R_UNYON, // animals R_ANT, R_ANTS, @@ -1071,6 +1085,7 @@ enum RACE { R_SPIDER, R_SPIDERFUNNELWEB, R_SPIDERREDBACK, + R_SPIDERTOMB, R_WOLFYOUNG, R_WOLF, R_WOLFWINTER, @@ -1113,6 +1128,7 @@ enum RACE { R_GHOUL, R_MUMMY, R_MUMMYG, + R_REVENANT, R_SKELETON, R_SKELETONFIRE, R_WRAITHICE, @@ -1739,6 +1755,7 @@ enum OBTYPE { OT_GRENADESMOKE, OT_MOTIONSCANNER, OT_NVGOGGLES, + OT_POWERCORE, OT_STYPTIC, OT_TENT, // tech l3 @@ -2938,7 +2955,7 @@ enum FLAG { // optional: v2 = mr_lf or mr_ob. text=lf or ob id. F_PHANTASM, // this lf is a phantasm - can deal no damage, and // uses v0 as a fake hp counter. - F_STABBEDBY, // lf has been stabbed by lfid v0. can't be stabbed + //F_STABBEDBY, // lf has been stabbed by lfid v0. can't be stabbed // by them again until they go out of sight. F_FLEEFROM, // lf will run away from this lf id F_NOFLEEFROM, // lf can not get f_fleefrom lfid v0 @@ -2966,6 +2983,9 @@ enum FLAG { F_NODEATHANNOUNCE, // don't say 'the xx dies' if this lf dies F_NODEATHSPEECH, // lf doesn't talk when dying F_BEHEADED, // use special corpse drop code + F_MUTILATED, // this corpse has had its head removed, or been split + // in half. this will stop some monsters from + // reviving. F_MOVESPEED, // override default move speed F_ACTIONSPEED, // override default action speed F_SPELLSPEED, // override default spellcast speed (ie. movespeed) @@ -2976,6 +2996,8 @@ enum FLAG { F_NUMAPPEAR, // when randomly appearing, can have > 1. val[0] = min, val[1] = max F_MINIONS, // val0 % chance of appearing with v1-v2 lf of type text F_HITDICE, // text = xdy+z to roll for maxhp per level. + // if v0 is set, this overrides text as maxhp. + F_TR, // v0 = threat rating of this race. F_MAXHPMOD, // maxhp = pctof(v0, maxhp) F_MPDICE, // val0: # d4 to roll for maxmp per level. val1: +xx F_JOB, // val0 = player's job @@ -3023,7 +3045,12 @@ enum FLAG { // when v1 drops to 0, flag vanishes. // for monsters F_MPMOD, // this race gains/loses v0 mp each level + F_AUTOROTATE, // this race will rotate by v0 each turn (positive = + // clockwise). + // also means they won't respond to noises. F_DOESNTMOVE, // this race doesn't move (but can still attack) + // if v2 is TRUE, it won't attack either, or even + // try to change its facing. F_CANTALK, // this lf can talk, even if its raceclass normally // wouldn't be able to. F_AQUATIC, // this race can attack normally in water and suffers no @@ -3239,6 +3266,7 @@ enum FLAG { F_EATING, // lf is eating obid v0 F_DIGGING, // v0/v1 = cell where lf is digging. // v2 is how much to dig per turn. + F_REPAIRING, // text = obid of held item we are repairing. F_TRAINING, // are we training? cleared on any action other than rest. // v0 = current training amount // v1 = training target. diff --git a/doc/add_raceclass.txt b/doc/add_raceclass.txt index bf1c963..0781f4c 100644 --- a/doc/add_raceclass.txt +++ b/doc/add_raceclass.txt @@ -4,8 +4,10 @@ defs.h: data.c: addraceclass(xxx) + add flags based on raceclass. + lf.c: - update cantalk(xxx) + update racecantalk(xxx) ALSO: - add matching skill! + add matching lore skill! diff --git a/flag.c b/flag.c index eb7a715..a031979 100644 --- a/flag.c +++ b/flag.c @@ -542,6 +542,15 @@ int countflags(flagpile_t *fp) { return count; } +int countflagsofid(flagpile_t *fp, enum FLAG fid) { + flag_t *f; + int count = 0; + for (f = fp->first ; f ; f = f->next) { + if (f->id == fid) count++; + } + return count; +} + // returns TRUE if knowingly gaining/losing this flag will // interrupt player actions like resting, training or eating. int flagcausesinterrupt(flag_t *f, enum GAINORLOSS gol ) { diff --git a/flag.h b/flag.h index 5cad14e..f7ce40a 100644 --- a/flag.h +++ b/flag.h @@ -17,6 +17,7 @@ void checkflagpile(flagpile_t *fp); int copyflag(flagpile_t *dst, flagpile_t *src, enum FLAG id); void copyflags(flagpile_t *dst, flagpile_t *src, int lifetime); int countflags(flagpile_t *fp); +int countflagsofid(flagpile_t *fp, enum FLAG fid ); int flagcausesinterrupt(flag_t *f, enum GAINORLOSS gol); int flagcausesloscalc(enum FLAG fid); int flagcausesredraw(lifeform_t *lf, enum FLAG fid); diff --git a/god.c b/god.c index 9ecb3ab..5987265 100644 --- a/god.c +++ b/god.c @@ -726,7 +726,7 @@ enum PIETYLEV getpietylev(enum RACE rid, enum COLOUR *col, char *happiness) { return PL_TOLERATED; } else if (piety <= 199) { // 100 - 199 if (col) *col = C_GREY; - if (happiness) strcpy(happiness, "Indifferent"); + if (happiness) strcpy(happiness, "Neutral"); return PL_INDIFFERENT; } else if (piety <= 299) { // 200 - 299 if (col) *col = C_GREEN; @@ -1988,7 +1988,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) { if (who && !areallies(lf, who)) { if (isundead(who)) { makepeaceful(who, god); - } else if (gethitdice(who) <= 4) { + } else if (gettr(who) <= 4) { // instakill who->lastdamtype = DT_NECROTIC; setlastdam(who, "Hecta's finger of death."); diff --git a/io.c b/io.c index d5801b1..8c104be 100644 --- a/io.c +++ b/io.c @@ -781,7 +781,7 @@ cell_t *askcoords(char *prompt, char *subprompt, int targettype, lifeform_t *src if (o) { char obname[BUFLEN]; char buf2[BUFLEN]; - real_getobname(o, obname, o->amt, B_NOPREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, o->amt, B_NOPREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL); if (strlen(extrainfo)) strcat(extrainfo, ", "); snprintf(buf2, BUFLEN, "stuck in %s",obname); strcat(extrainfo, buf2); @@ -1498,10 +1498,10 @@ int announceflaggain(lifeform_t *lf, flag_t *f) { break; case F_HEAVENARM: if (isplayer(lf)) { // don't know if monsters get it - msg("You are surrounded by a shell of divine armour!"); + msg("You are surrounded by a %s!", f->text); donesomething = B_TRUE; } else { - msg("%s is surrounded by a shell of divine armour!", lfname); + msg("%s is surrounded by a %s!", lfname, f->text); donesomething = B_TRUE; } break; @@ -2226,10 +2226,10 @@ int announceflagloss(lifeform_t *lf, flag_t *f) { break; case F_HEAVENARM: if (isplayer(lf)) { // don't know if monsters get it - msg("Your shell of divine armour vanishes!"); + msg("Your %s vanishes!", f->text); donesomething = B_TRUE; } else { - msg("%s%s shield of divine armour vanishes!", lfname, getpossessive(lfname)); + msg("%s%s %s vanishes!", lfname, getpossessive(lfname), f->text); donesomething = B_TRUE; } break; @@ -2590,7 +2590,7 @@ int announceobflaggain(object_t *o, flag_t *f) { wantpremods = B_FALSE; } - real_getobname(o, obname, o->amt, wantpremods, B_NOPREMODS, B_CONDITION, B_BLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, o->amt, wantpremods, B_NOPREMODS, B_CONDITION, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); if (o->pile->owner) { @@ -2643,7 +2643,7 @@ void announceobflagloss(object_t *o, flag_t *f) { if (!haslos(player, loc)) { return; } - real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); if (o->pile->owner) { if (isplayer(o->pile->owner)) { @@ -4636,7 +4636,7 @@ void docomms_areadangers(char *who, flagpile_t *fp, lifeform_t *lf) { } // veryrare monsters if (strchr(knowflag->text, 'm')) { - gethitdicerange(getmapdifficulty(player->cell->map), &min,&max, RARITYVARIANCELF, B_FALSE); + gettrrange(getmapdifficulty(player->cell->map), &min,&max, RARITYVARIANCELF, B_FALSE); ndone = 0; for (y = 0; y < player->cell->map->h ; y++) { @@ -4651,7 +4651,7 @@ void docomms_areadangers(char *who, flagpile_t *fp, lifeform_t *lf) { } else { // out of depth monsters? int hd; - hd = gethitdicerace(c->lf->race); + hd = gettrrace(c->lf->race); if (hd > max) { showit = B_TRUE; } @@ -6819,7 +6819,7 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel sprintf(bonheading, "^%dStrengths^n:\n", C_WHITE); sprintf(penheading, "^%dWeaknesses^n:\n", C_WHITE); // stats - snprintf(buf, HUGEBUFLEN, "HD: %-3d ", gethitdicerace(r)); + snprintf(buf, HUGEBUFLEN, "HD: %-3d ", gettrrace(r)); strncat(retbuf, buf, HUGEBUFLEN); for (a = 0; a < MAXATTS; a++) { char ch[BUFLENTINY]; @@ -7109,6 +7109,7 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel case F_MPMOD: if (f->val[0] < 0) sprintf(buf, "%d Mana", f->val[0]); break; case F_NEEDSWATER: if (lorelev >= PR_NOVICE) sprintf(buf, "Will suffocate without water"); break; case F_NOCTURNAL: if ((lorelev >= PR_BEGINNER) && !forplayersel) sprintf(buf, "Sleeps during the day."); break; + case F_NOSPELLS: if (lorelev >= PR_NOVICE) sprintf(buf, "Cannot use magic."); break; case F_NOPACK: sprintf(buf, "Cannot carry objects."); break; case F_SIZE: if (hasflag(r->flags, F_HUMANOID) && (f->val[0] != SZ_HUMAN)) { @@ -11075,7 +11076,7 @@ void showlfstats(lifeform_t *lf, int showall) { xpneeded = getxpforlev(lf->level + 1) - lf->xp; wprintw(mainwin, "%d (%ld XP, %ld for next)", lf->level, lf->xp, xpneeded); y++; } else { - wprintw(mainwin, "%d", gethitdice(lf)); y++; + wprintw(mainwin, "%d", gettr(lf)); y++; } } @@ -12011,11 +12012,11 @@ void showlfstats(lifeform_t *lf, int showall) { } getspellname(ot->id, lf, spellname, B_FALSE); - if (castable) setcol(mainwin, C_GREEN); + if (castable || !isplayer(lf)) setcol(mainwin, C_GREEN); else setcol(mainwin, C_RED); snprintf(buf, BUFLEN, " %-4d%-26s%-15s%-13s%s",thislev, spellname, getschoolnameshort(getspellschoolknown(lf, ot->id)), powerbuf, mpbuf); mvwprintw(mainwin, y, 0, "%s\n", buf); - if (castable) unsetcol(mainwin, C_GREEN); + if (castable || !isplayer(lf)) unsetcol(mainwin, C_GREEN); else unsetcol(mainwin, C_RED); anyfound = B_TRUE; if (downline(&y, h, "MAGIC", subheading, promptstr, cmdchars, &ch)) { @@ -12809,7 +12810,7 @@ void showlfstats(lifeform_t *lf, int showall) { } else { strcpy(hpbuf, ""); } - mvwprintw(mainwin, y, 0, "%s %s surrounded by a shell of divine armour.%s", you(lf), is(lf), hpbuf); + mvwprintw(mainwin, y, 0, "%s %s surrounded by a %s. %s", you(lf), is(lf), f->text, hpbuf); y++; } f = lfhasknownflag(lf, F_INVULNERABLE); diff --git a/lf.c b/lf.c index 0af4fc5..734c8c2 100644 --- a/lf.c +++ b/lf.c @@ -274,9 +274,8 @@ void breakaitargets(lifeform_t *lf, int onlylowerlev) { lifeform_t *l; for (l = lf->cell->map->lf ; l ; l = l->next) { flag_t *f; - //if ((l != lf) && (gethitdice(l) <= gethitdice(lf)) ) { if (l == lf) continue; - if (!onlylowerlev || (gethitdice(l) <= gethitdice(lf)) ) { + if (!onlylowerlev || (gettr(l) <= gettr(lf)) ) { f = lfhasflagval(l, F_TARGETLF, lf->id, NA, NA, NULL); if (f) killflag(f); f = lfhasflagval(l, F_TARGETCELL, lf->cell->x, lf->cell->y, NA, NULL); @@ -2309,6 +2308,61 @@ int continuedigging(lifeform_t *lf) { return B_FALSE; } +int continuerepairing(lifeform_t *lf, flag_t *repairflag) { + object_t *helpob,*o; + char helpobname[BUFLEN]; + flag_t *f; + + o = findobbyid(lf->pack, atol(repairflag->text)); + if (!o) { + killflag(repairflag); + return B_TRUE; + } + + // in case it's on fire, etc + if (touch(lf, o)) { + taketime(lf, getactspeed(lf)); + return B_FALSE; + } + + // get helper ob + helpob = getworkhelpob(lf->pack, o->material->id); + if (helpob) { + real_getobname(helpob, helpobname, helpob->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); + } else { + strcpy(helpobname, ""); + } + + // fully repair it. + f = hasflag(o->flags, F_OBHP); + f->val[0] = f->val[1]; + if (isplayer(lf)) { + char obname[BUFLEN],withbuf[BUFLEN]; + real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); + if (helpob) sprintf(withbuf, " (with %s)", helpobname); + else strcpy(withbuf, ""); + + msg("You repair your %s%s.", noprefix(obname), withbuf); + } else if (cansee(player, lf)) { + char obname[BUFLEN],withbuf[BUFLEN]; + char lfname[BUFLEN]; + getlfname(lf, lfname); + real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); + if (helpob) sprintf(withbuf, " with %s", helpobname); + else strcpy(withbuf, ""); + msg("%s repairs %s%s.", lfname, obname, withbuf); + } + + practice(lf, SK_METALWORK, 1); + practice(lf, SK_SEWING, 1); + + // take some time. + taketime(lf, getactspeed(lf)); + + // finished repairing this object now. + killflag(repairflag); + return B_FALSE; +} int countinnateattacks(lifeform_t *lf) { int count = 0,i; @@ -2389,7 +2443,7 @@ int demandbribe(lifeform_t *lf) { int satisfied = B_FALSE; int i,heard; - hd = gethitdice(lf); + hd = gettr(lf); gold = hasob(player->pack, OT_GOLD); if (gold) { totmoney = countmoney(player->pack); @@ -2509,6 +2563,26 @@ void die(lifeform_t *lf) { needredraw = B_TRUE; } + + // prevent rising from dead? + switch (lf->race->id) { + case R_REVENANT: + if ((lf->lastdamtype == DT_HOLY) || lfhasflag(lf, F_MUTILATED)) { + killflagsofid(lf->flags, F_REVIVETIMER); + } + break; + case R_TROLL: + if (basedamagetype(lf->lastdamtype) == DT_FIRE) { + killflagsofid(lf->flags, F_REVIVETIMER); + } + break; + default: + break; + } + if (lf->lastdamtype == DT_HOLY) { + killflagsofid(lf->flags, F_RISEASGHOST); + } + if (lfhasflag(lf, F_RISEASGHOST)) { willbecomeghost = B_TRUE; } @@ -2622,6 +2696,7 @@ void die(lifeform_t *lf) { } } + if (!willbecomeghost) { lf->alive = B_FALSE; } @@ -2882,9 +2957,13 @@ void die(lifeform_t *lf) { colourmatchob(corpse, lf); } - // inherit lifeform knowledge in case we raise it + // inherit lifeform knowledge and abilities in case we raise it copyflag(corpse->flags, lf->flags, F_KNOWSABOUT); copyflag(corpse->flags, lf->flags, F_HOMEMAP); + copyflag(corpse->flags, lf->flags, F_CANCAST); + copyflag(corpse->flags, lf->flags, F_CANWILL); + copyflag(corpse->flags, lf->flags, F_JOB); + f = hasflag(corpse->flags, F_CORPSEOF); if (f) { @@ -2929,6 +3008,15 @@ void die(lifeform_t *lf) { if (f) { changeflagtext(f, lf->lastdam); } + + if (hasflag(corpse->flags, F_HEADLESS)) { + object_t *headob; + char headname[BUFLEN]; + // drop head too + snprintf(headname, BUFLEN, "%s head",lf->race->name); + headob = addob(corpsecell->obpile, headname); + colourmatchob(headob, lf); + } } // For bones files: @@ -2948,16 +3036,6 @@ void die(lifeform_t *lf) { } - - if (hasflag(corpse->flags, F_HEADLESS)) { - object_t *headob; - char headname[BUFLEN]; - // drop head too - snprintf(headname, BUFLEN, "%s head",lf->race->name); - headob = addob(corpsecell->obpile, headname); - colourmatchob(headob, lf); - } - if (lf->race->id == R_SPRITEFIRE) { addobfast(corpsecell->obpile, OT_FIRESMALL); } @@ -3190,12 +3268,12 @@ void dumpmonsters(void) { int count = 0,wanthd; dblog("START MONSTER DUMP:"); - for (wanthd = 0; wanthd < maxmonhitdice ; wanthd++) { - dblog("%d HIT DICE MONSTERS:",wanthd); + for (wanthd = 0; wanthd <= maxmonhitdice ; wanthd++) { + dblog("MONSTERS WITH THREAT RATING %d:",wanthd); for (r = firstrace ; r ; r = r->next) { int thishd; - thishd = gethitdicerace(r); + thishd = gettrrace(r); if (thishd == wanthd) { int ndice,nsides,bonus,min,max; f = hasflag(r->flags, F_HITDICE); @@ -3203,7 +3281,7 @@ void dumpmonsters(void) { min = ndice + bonus; max = (ndice*nsides) + bonus; - dblog("\t%s (%d avg hp)",r->name, (min+max)/2); + dblog("\t%s (%d hp)",r->name, max); count++; } } @@ -3578,12 +3656,12 @@ void dumplev(void) { // NOTE: this code copied from getrandomrace(), which is used by addmonster(). for (i = 1; i <= 25; i++) { int min,max,prevmin,prevmax; - gethitdicerange(i-1, &prevmin, &prevmax, RARITYVARIANCELF, B_FALSE); - gethitdicerange(i, &min, &max, RARITYVARIANCELF, B_FALSE); + gettrrange(i-1, &prevmin, &prevmax, RARITYVARIANCELF, B_FALSE); + gettrrange(i, &min, &max, RARITYVARIANCELF, B_FALSE); fprintf(logfile, "Dlev %d (hd %d-%d): ",i,min,max); for (r = firstrace ; r; r = r->next) { int hd = 0; - hd = gethitdicerace(r); + hd = gettrrace(r); // ok this lev? if ((hd >= min) && (hd <= max)) { char buf[BUFLEN]; @@ -4862,7 +4940,8 @@ int fall(lifeform_t *lf, lifeform_t *fromlf, int announce) { } } } - //taketime(lf, SP_NORMAL*2); + + taketime(lf, SP_NORMAL); addflag(lf->flags, F_PRONE, B_TRUE, NA, NA, NULL); loseconcentration(lf); @@ -6422,7 +6501,7 @@ int getevasion(lifeform_t *lf) { } // level based evasion - level_ev = gethitdice(lf); + level_ev = gettr(lf); ev += level_ev; // dexterity mod @@ -6780,22 +6859,15 @@ int gethearingrange(lifeform_t *lf) { return range; } -int gethitdice(lifeform_t *lf) { - if (isplayer(lf) || lfhasflag(lf, F_VARLEVEL)) { - return lf->level; - } - return (lf->maxhp / 4); -} - -int gethitdicerace(race_t *r) { +int gettrrace(race_t *r) { flag_t *f; - f = hasflag(r->flags, F_HITDICE); - if (f) { + f = hasflag(r->flags, F_TR); + /* int ndice,nsides,bonus; texttodice(f->text ? f->text : DEF_HITDICE, &ndice,&nsides,&bonus); return ((ndice*nsides)+bonus) / 4; - } - return 1; + */ + return f->val[0]; } int gethitstokill(lifeform_t *lf, lifeform_t *victim, int useevasion, int usearmour) { @@ -7781,7 +7853,7 @@ int getmr(lifeform_t *lf) { sumflags(lf->flags, F_RESISTMAG, &amt, NULL, NULL); if (hassubjob(lf, SJ_SCOURGE)) { - amt += (gethitdice(lf) * 3); + amt += (gettr(lf) * 3); } return amt; @@ -8115,7 +8187,7 @@ char *real_getlfname(lifeform_t *lf, char *buf, int usevis, int showall) { wep = getweapon(lf); if (wep) { char obname[BUFLEN]; - real_getobname(wep, obname, 1, B_PREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_NOBLESSINGS, B_NOSHOWALL); + real_getobname(wep, obname, 1, B_PREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL); snprintf(buf, BUFLEN, "%s%s%s",the,descstring,noprefix(obname)); } else { snprintf(buf, BUFLEN, "%s%s%s%s",the,descstring,lname,jobstring); @@ -8611,7 +8683,7 @@ race_t *getrandomrace(cell_t *c, int forcedepth) { depth = rnd(1,MAXDEPTH); } - gethitdicerange(depth, &hdmin, &hdmax, RARITYVARIANCELF, B_TRUE); + gettrrange(depth, &hdmin, &hdmax, RARITYVARIANCELF, B_TRUE); // pick rr... wantrr = pickrr(TT_MONSTER); @@ -8628,7 +8700,7 @@ race_t *getrandomrace(cell_t *c, int forcedepth) { enum RARITY thisrr = RR_NEVER; flag_t *rarflag = NULL; - thishd = gethitdicerace(r); + thishd = gettrrace(r); if ((thishd < hdmin) || (thishd > hdmax)) { valid = B_FALSE; } else { @@ -9057,6 +9129,18 @@ int getteachableskills(lifeform_t *teacher, lifeform_t *student, int *info, enum return *ninfo; } +// get threat rating +int gettr(lifeform_t *lf) { + flag_t *f; + if (isplayer(lf) || lfhasflag(lf, F_VARLEVEL)) { + return lf->level; + } + f = hasflag(lf->flags, F_TR); + return f->val[0]; + //return (lf->maxhp / 4); +} + + char *gettradeinfoname(int what, enum TRADEINFOTYPE tradetype, char *buf) { if (tradetype == TI_SKILL) { skill_t *sk; @@ -9525,6 +9609,8 @@ void givejob(lifeform_t *lf, enum JOB jobid) { } generatealignment(lf); + + if (hasflag(j->flags, F_STAYINROOM)) sethomeroom(lf); } void givesubjob(lifeform_t *lf, enum SUBJOB sj) { @@ -9683,14 +9769,32 @@ void givesubjob(lifeform_t *lf, enum SUBJOB sj) { } if (sb1) { - addtempflag(lf->flags, F_CANCAST, sb1->contents->first->type->id, NA, NA, NULL, FROMJOB); if (isplayer(lf)) { + addtempflag(lf->flags, F_CANCAST, sb1->contents->first->type->id, NA, NA, NULL, FROMJOB); addtempflag(lf->flags, F_SHORTCUT, getnextshortcut(lf), NA, NA, sb1->contents->first->type->name, FROMJOB); addflag(sb1->flags, F_NOPOINTS, B_TRUE, NA, NA, NULL); + identify(sb1); + } else { + object_t *o; + // monster generally know all spells from the book + for (o = sb1->contents->first ; o ; o = o->next) { + int lev; + lev = getspelllevel(o->type->id); + if (!cancast(lf, o->type->id, NULL) && (gettr(lf) >= lev)) { + int pow; + char pwbuf[BUFLEN]; + pow = MINOF((gettr(lf)/2), getspellmaxpower(o->type->id)); + sprintf(pwbuf, "pw:%d;", pow); + addflag(lf->flags, F_CANCAST, o->type->id, NA, NA, pwbuf); + } + } + // chance of spellbook vanishing + if (pctchance(66)) { + killob(sb1); + sb1 = NULL; + } } - identify(sb1); } - } @@ -12420,6 +12524,10 @@ lifeform_t *real_addlf(cell_t *cell, enum RACE rid, int level, int controller) { // a->losdirty = B_TRUE; addflag(a->flags, F_HOMEMAP, cell->map->id, NA, NA, NULL); + + // set home room. + sethomeroom(a); + return a; } @@ -13078,7 +13186,7 @@ int askforinfo(lifeform_t *lf, int diffmod) { diffmod += 15; } - difficulty = 20 + diffmod + ((gethitdice(player) - gethitdice(lf))*2); + difficulty = 20 + diffmod + ((gettr(player) - gettr(lf))*2); if (real_skillcheck(player, SC_SPEECH, difficulty, alignmod, &result)) { askingprice = 0; // passed - free! @@ -13088,7 +13196,7 @@ int askforinfo(lifeform_t *lf, int diffmod) { askingprice = -1; } else { // will help for gold - askingprice = rnd(gethitdice(lf)*5, gethitdice(lf)*15 ); + askingprice = rnd(gettr(lf)*5, gettr(lf)*15 ); limit(&askingprice, 1, NA); // just in case } } @@ -13237,7 +13345,7 @@ void autoskill(lifeform_t *lf) { slev = PR_NOVICE; } else { int max; - max = gethitdice(lf)/3; + max = gettr(lf)/3; limit(&max, PR_NOVICE, PR_MASTER); slev = rnd(PR_NOVICE, max); } @@ -13347,7 +13455,7 @@ void autospells(lifeform_t *lf, int howmany) { spellid = poss[sel]; sprintf(pwbuf, "pw:%d;",powerposs[sel]); //addflag(lf->flags, F_CANCAST, sel, NA, NA, pwbuf); - addflag(lf->flags, F_CANWILL, spellid, NA, NA, pwbuf); + addflag(lf->flags, F_CANCAST, spellid, NA, NA, pwbuf); // remove this one... for (n = sel; n < nposs-1; n++) { poss[n] = poss[n+1]; @@ -14128,12 +14236,17 @@ void losehpeffects(lifeform_t *lf, int dam, enum DAMTYPE damtype, lifeform_t *fr char buf2[BUFLEN]; sprintf(buf, "^w%s releases a cloud of purple spores!", lfname); sprintf(buf2, "^wSomething releases a cloud of purple spores!"); - spellcloud(lf->cell, 3, UNI_SHADELIGHT, C_MAGENTA, OT_S_SLEEP, 8, B_TRUE, buf, buf2); + spellcloud(lf->cell, 3, UNI_SHADELIGHT, C_MAGENTA, OT_S_SLEEP, 8, B_TRUE, buf, buf2, B_FALSE); } else if (lf->race->id == R_FUNGUSRAGE) { char buf2[BUFLEN]; sprintf(buf, "^w%s releases a cloud of red spores!", lfname); sprintf(buf2, "^wSomething releases a cloud of red spores!"); - spellcloud(lf->cell, 3, UNI_SHADELIGHT, C_RED, OT_A_RAGE, 8, B_TRUE, buf, buf2); + spellcloud(lf->cell, 3, UNI_SHADELIGHT, C_RED, OT_A_RAGE, 8, B_TRUE, buf, buf2, B_FALSE); + } else if ((lf->race->id == R_UNYON) && ((damtype == DT_SLASH) || (damtype == DT_PIERCE))) { + char buf2[BUFLEN]; + sprintf(buf, "^w%s releases a cloud of fumes!", lfname); + sprintf(buf2, "^wSomething releases a cloud of fumes!"); + spellcloud(lf->cell, 3, UNI_SHADELIGHT, C_GREY, OT_S_BLINDNESS, 8, B_TRUE, buf, buf2, B_TRUE); } @@ -14275,11 +14388,11 @@ void makefriendly(lifeform_t *who, int howlong) { int makelearnable(lifeform_t *lf, enum SKILL skid) { flag_t *f,*learnable; int changed = B_FALSE; - f = hasflagval(lf->flags, F_NOSKILL, skid[i], NA, NA, NULL); + f = hasflagval(lf->flags, F_NOSKILL, skid, NA, NA, NULL); if (f) { killflag(f); } - learnable = lfhasflagval(lf, F_CANLEARN, skid[i], NA, NA, NULL); + learnable = lfhasflagval(lf, F_CANLEARN, skid, NA, NA, NULL); if (learnable) { if (learnable->val[1] != NA) { // able to learn thievery, but limitted @@ -14288,7 +14401,7 @@ int makelearnable(lifeform_t *lf, enum SKILL skid) { } } else if (!getskill(lf, SK_THIEVERY)) { // don't have the skill, not learnable - addflag(lf->flags, F_CANLEARN, skid[i], NA, NA, NULL); + addflag(lf->flags, F_CANLEARN, skid, NA, NA, NULL); changed = B_TRUE; } if (changed) { @@ -15078,10 +15191,10 @@ int noise(cell_t *c, lifeform_t *noisemaker, enum NOISECLASS nclass, int volume, // monsters will turn to face the sound, as long as they're // not attacking something if (!isplayer(l)) { - flag_t *f; int willrespond = B_FALSE; - f = aihastarget(l); - if (f) { + + if (lfhasflag(l, F_AUTOROTATE)) { + } else if (aihastarget(l)) { // will probably ignore the sound... if ((volume >= 5) && onein(2)) { willrespond = B_TRUE; @@ -15820,7 +15933,7 @@ int recruit(lifeform_t *lf) { int minmult,maxmult; // since you have to be at least speech=4(skilled) to ask someone to // join, add +8 to difficulty (pr_skilled * 2) - difficulty = 25 + 8 + ((gethitdice(player) - gethitdice(lf))*2); + difficulty = 25 + 8 + ((gettr(player) - gettr(lf))*2); if (real_skillcheck(player, SC_SPEECH, difficulty, 0, &result)) { minmult = 10; maxmult = 20; @@ -15836,7 +15949,7 @@ int recruit(lifeform_t *lf) { maxmult = 25; } } - askingprice = rnd(gethitdice(lf)*minmult, gethitdice(lf)*maxmult ); + askingprice = rnd(gettr(lf)*minmult, gettr(lf)*maxmult ); addflag(lf->flags, F_HIREPRICE, askingprice, NA, NA, NULL); } @@ -16857,6 +16970,19 @@ void setguntarget(lifeform_t *lf, lifeform_t *targ) { } } +void sethomeroom(lifeform_t *lf) { + flag_t *retflag[MAXCANDIDATES]; + int nretflags = 0,i; + getflags(lf->flags, retflag, &nretflags, F_STAYINROOM, F_NONE); + for (i = 0; i < nretflags; i++) { + if (retflag[i]->val[1] == NA) { + if (lf->cell->room) { + retflag[i]->val[1] = getroomid(lf->cell); + } + } + } +} + void setkillverb(lifeform_t *lf, char *buf) { if (lf->killverb) { free(lf->killverb); @@ -17033,7 +17159,7 @@ void setrace(lifeform_t *lf, enum RACE rid, int frompolymorph) { if ((i == 0) || !isplayer(lf)){ wantmax = B_TRUE; } - lf->maxhp += rollhitdice(lf, B_TRUE); + lf->maxhp += rollhitdice(lf, wantmax); assert(lf->maxhp > 0); } lf->hp = lf->maxhp; @@ -17387,7 +17513,7 @@ int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *r attrib = (getattr(lf, A_IQ) / 10) + lf->level; break; case SC_MORALE: // based on morale, level/hitdice and size. - attrib = getmorale(lf) + gethitdice(lf); + attrib = getmorale(lf) + gettr(lf); attrib += getlfsize(lf); break; case SC_SLIP: @@ -17446,8 +17572,7 @@ int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *r } // level modifier - //levmod = (gethitdice(lf) / 3); - levmod = (gethitdice(lf) / 2); + levmod = (gettr(lf) / 2); // other modifiers if (ct == SC_CLIMB) { @@ -18035,11 +18160,23 @@ void startlfturn(lifeform_t *lf) { // god piety gets restored over time if (isplayer(lf)) { for (i = 0; i < ngodlfs; i++) { + int piety; if (!godlf[i]) continue; - if (getpietylev(godlf[i]->race->id, NULL, NULL) == PL_TOLERATED) { - // slowly tick upwards - if (onein(2)) modpiety(godlf[i]->race->id, 1); - } + if (!godprayedto(godlf[i]->race->id)) continue; + piety = getpiety(godlf[i]->race->id); + if ((piety < 100) || (piety > 199)) { + int dir,chance; + if (piety < 100) { + dir = 1; + } else { + dir = -1; + } + chance = abs(piety) / 100; + if (onein(chance)) { + // slowly move towards zero + modpiety(godlf[i]->race->id, (piety < 0) ? 1 : -1); + } + } } } @@ -18202,6 +18339,33 @@ void startlfturn(lifeform_t *lf) { } } + f = lfhasflag(lf, F_AUTOROTATE); + if (f && (f->val[0] != 0)) { + if (!gettargetlf(lf)) { + int n,whichway; + if (f->val[0] > 0) whichway = 1; + else whichway = -1; + + for (n = 0; n < abs(f->val[0]); n++) { + int newdir; + newdir = lf->facing + whichway; + if (newdir < DC_N) newdir = DC_NW; + if (newdir > DC_NW) newdir = DC_N; + + setfacing(lf, newdir); + } + + // announce + if (isplayer(lf)) { + msg("You turn to face %s.", getdirname(lf->facing)); + } else if (cansee(player, lf)) { + char lfname[BUFLEN]; + getlfname(lf, lfname); + msg("%s turns to face %s.", lfname, getdirname(lf->facing)); + } + } + } + f = lfhasflag(lf, F_AUTOCREATEOB); if (f) { int radius; @@ -18271,7 +18435,7 @@ void startlfturn(lifeform_t *lf) { int maxhitdice; // calming strong enough? maxhitdice = asp->val[2] + 1; - if (gethitdice(lf) <= maxhitdice) { + if (gettr(lf) <= maxhitdice) { makepeaceful(lf, l); } } @@ -18681,7 +18845,7 @@ void startlfturn(lifeform_t *lf) { // effects for/on your own flags getflags(lf->flags, retflag, &nretflags, F_ANTICIPATE, F_ATTACHEDTO, F_CANWILL, F_CHARMEDBY, F_CLIMBING, F_FEIGNFOOLEDBY,F_FLEEFROM, F_GRABBEDBY, F_GRABBING, F_HIDING, F_BOOSTSPELL, F_FEIGNINGDEATH, F_HPDRAIN, F_INJURY, - F_NOFLEEFROM, F_PETOF, F_SIZETIMER, F_SPOTTED, F_STABBEDBY, F_STRIKETOKO, F_TARGETCELL, F_TARGETLF, F_NONE); + F_NOFLEEFROM, F_PETOF, F_SIZETIMER, F_SPOTTED, F_STRIKETOKO, F_TARGETCELL, F_TARGETLF, F_NONE); for (i = 0; i < nretflags; i++) { f = retflag[i]; // remove impossible/expired flags @@ -18765,6 +18929,7 @@ void startlfturn(lifeform_t *lf) { } } + /* if (f->id == F_STABBEDBY) { lifeform_t *lf2; lf2 = findlf(NULL, f->val[0]); @@ -18774,6 +18939,7 @@ void startlfturn(lifeform_t *lf) { continue; } } + */ if (f->id == F_SPOTTED) { lifeform_t *lf2; lf2 = findlf(NULL, f->val[0]); @@ -19162,7 +19328,7 @@ lifeform_t *summonmonster(lifeform_t *caster, cell_t *c, enum RACE rid, char *ra lifeform_t *newlf = NULL; char buf[BUFLEN]; - newlf = addmonster(c, rid, racename, B_FALSE, 1, B_FALSE, NULL); + newlf = addmonster(c, rid, racename, B_TRUE, 1, B_FALSE, NULL); if (newlf) { if (haslos(player, c)) { //char *newbuf; @@ -19656,7 +19822,7 @@ int touch(lifeform_t *lf, object_t *o) { o->blessknown = B_TRUE; } // use real name here... - real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); snprintf(buf, BUFLEN, "touching %s",obname); losehp(lf, 2, DT_HOLY, NULL, buf); // drop the object if we're holding it @@ -19772,6 +19938,7 @@ int touch(lifeform_t *lf, object_t *o) { void turntoface(lifeform_t *lf, cell_t *dstcell) { if (isdead(lf)) return; + if (lfhasflag(lf, F_AUTOROTATE)) return; // not providing srclf, since this will make getdirtowards() not include // directions in which the next cell is unwalkable. in this case we're // not actually walking there, so we don't care. @@ -20359,7 +20526,7 @@ int validateraces(void) { givestartskills(lf, lf->flags); // remember max. hitdice for use in dumpmonsters() - thishd = gethitdice(lf); + thishd = gettr(lf); if (thishd > maxmonhitdice) { maxmonhitdice = thishd; } @@ -20368,6 +20535,10 @@ int validateraces(void) { if (!hasflag(r->flags, F_SIZE)) { printf("ERROR in race '%s' - missing F_SIZE.\n", r->name); goterror = B_TRUE; + } + if (!hasflag(r->flags, F_TR)) { + printf("ERROR in race '%s' - missing F_TR (threat level).\n", r->name); + goterror = B_TRUE; } for (f = r->flags->first ; f ; f = f->next) { @@ -21566,7 +21737,7 @@ int willbackstab(lifeform_t *lf, lifeform_t *victim, object_t *wep) { if (wep && (getdamtype(wep) == DT_PIERCE) && // stabbing weapon getskill(lf, SK_BACKSTAB) && // able to backstab - !lfhasflagval(victim, F_STABBEDBY, lf->id, NA, NA, NULL) && // haven't stabbed them already +// !lfhasflagval(victim, F_STABBEDBY, lf->id, NA, NA, NULL) && // haven't stabbed them already ishelplessvictim(victim, lf, NULL)) { // victim can't see us or is fleeing return B_TRUE; } diff --git a/lf.h b/lf.h index ac8126a..10ef4e0 100644 --- a/lf.h +++ b/lf.h @@ -76,6 +76,7 @@ float comparelfs(lifeform_t *lf1, lifeform_t *lf2); int confuse(lifeform_t *lf, int howlong); void copycorpseflags(flagpile_t *dst, flagpile_t *src); int continuedigging(lifeform_t *lf); +int continuerepairing(lifeform_t *lf, flag_t *repairflag); int countinnateattacks(lifeform_t *lf); int countnearbyallies(lifeform_t *lf); int countnearbyhurtallies(lifeform_t *lf); @@ -163,8 +164,7 @@ lifeform_t *getguntarget(lifeform_t *lf); int getguntargetid(lifeform_t *lf); //int gethealtime(lifeform_t *lf); int gethearingrange(lifeform_t *lf); -int gethitdice(lifeform_t *lf); -int gethitdicerace(race_t *r); +int gettrrace(race_t *r); int gethitstokill(lifeform_t *lf, lifeform_t *victim, int useevasion, int usearmour); int gethppct(lifeform_t *lf); enum COLOUR gethungercol(enum HUNGER hlev); @@ -257,6 +257,7 @@ char *getskilldesc(enum SKILL id ); char *getskillname(enum SKILL id ); char *getskilllevelname(enum SKILLLEVEL sl); int getteachableskills(lifeform_t *teacher, lifeform_t *student, int *info, enum TRADEINFOTYPE *tradetype, int *ninfo ); +int gettr(lifeform_t *lf); char *gettradeinfoname(int what, enum TRADEINFOTYPE tradetype, char *buf); int getthrowspeed(lifeform_t *lf); int getturnspeed(lifeform_t *lf); @@ -420,6 +421,7 @@ 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); +void sethomeroom(lifeform_t *lf); void setkillverb(lifeform_t *lf, char *buf); void setrace(lifeform_t *lf, enum RACE rid, int frompolymorph); void setlastdam(lifeform_t *lf, char *buf); diff --git a/map.c b/map.c index 6f3cbe6..449c404 100644 --- a/map.c +++ b/map.c @@ -2940,6 +2940,7 @@ void createfakes(map_t *map, cell_t *cell) { cell->map = map; cell->lf = NULL; cell->obpile = addobpile(NULL, NULL, NULL); + cell->room = NULL; setcelltype(cell, CT_FAKE); } @@ -5376,7 +5377,7 @@ void finalisemonster(lifeform_t *lf, lifeform_t *leader, flagpile_t *wantflags, // random monster behaviours if (canhaverandombehaviour(lf) && onein(6)) { - switch (rnd(0,6)) { + switch (rnd(0,8)) { case 0: // insane addflag(lf->flags, F_BEHAVIOUR, NA, NA, NA, "insane"); addflag(lf->flags, F_TERRITORIAL, 2, NA, NA, NULL); // attack anything within 1 cells @@ -5412,6 +5413,17 @@ void finalisemonster(lifeform_t *lf, lifeform_t *leader, flagpile_t *wantflags, addflag(lf->flags, F_BEHAVIOUR, NA, NA, NA, "lazy"); addflag(lf->flags, F_FOLLOWTIME, (DEF_AIFOLLOWTIME/4), NA, NA, NULL); break; + case 7: // extra hp + addflag(lf->flags, F_BEHAVIOUR, NA, NA, NA, "muscled"); + lf->maxhp = pctof(rnd(125,200), lf->maxhp); // 25-100% more hp + lf->hp = lf->maxhp; + break; + case 8: // less hp + addflag(lf->flags, F_BEHAVIOUR, NA, NA, NA, "scrawny"); + lf->maxhp = pctof(rnd(50,75), lf->maxhp); // 25-50% less hp + limit(&(lf->maxhp), 1, NA); + lf->hp = lf->maxhp; + break; } } @@ -7169,21 +7181,24 @@ void mapentereffects(map_t *m) { vault_t *v; c = m->cell[i]; v = getcellvault(c); - /* - // teleport shopkeepers back to their shops - if (c->lf && hasjob(c->lf, J_SHOPKEEPER) && !isplayer(c->lf)) { - f = lfhasflag(c->lf, F_OWNSSHOP); - if (f) { + + // teleport monsters back to their lairs + if (c->lf && !isplayer(c->lf)) { + flag_t *f; + f = lfhasflag(c->lf, F_STAYINROOM); + if (f && (f->val[0] != NA)) { cell_t *where; - int myshop; - myshop = f->val[0]; - // find the closest cell of my shop - where = getclosestroomcell(c->lf, myshop); + int roomid; + roomid = f->val[0]; + // find the closest cell of my lair + where = getclosestroomcell(c->lf, roomid); if (where) { movelf(c->lf, where); } } } + + /* // replace people in the Inn if (v && streq(v->id, "inn") && c->lf && (c->lf->race->id == R_HUMAN)) { lifeform_t *lf; diff --git a/move.c b/move.c index b1640ba..d3f42c8 100644 --- a/move.c +++ b/move.c @@ -533,6 +533,11 @@ int dorandommove(lifeform_t *lf, int badmovesok, int restonfail, int strafe) { int moveok,rv; enum ERROR why; + if (lfhasflag(lf, F_DOESNTMOVE)) { + rest(lf, B_TRUE); + return B_TRUE; + } + // find a valid direction dir = getrandomdir(DT_COMPASS); @@ -902,7 +907,7 @@ int knockback(lifeform_t *lf, int dir, int howfar, lifeform_t *pusher, int fallc } else { // ie door or object getobname(rdata, thing, 1); } - if (seen) msg("%s slam%s into %s!",lfname,isplayer(lf) ? "" : "s", thing); + if (seen) msg("^%c%s slam%s into %s!^n",getlfcol(lf, CC_BAD), lfname,isplayer(lf) ? "" : "s", thing); snprintf(buf, BUFLEN, "slamming into %s", thing); dam = roll("1d6"); losehp(lf, dam, DT_BASH, pusher, buf); @@ -2396,7 +2401,7 @@ int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg) { } getlfname(lf,lfname); - real_getobname(o, buf, o->amt, B_FALSE, B_FALSE, B_TRUE, B_FALSE, B_FALSE); + real_getobname(o, buf, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL); if (skillcheck(lf, SC_STR, diff, checkmod)) { if (isplayer(lf)) { @@ -3381,7 +3386,7 @@ int willmove(lifeform_t *lf, int dir, enum ERROR *error) { *bp = '\0'; power = atoi(buf); limit(&power, 1, NA); - if ( gethitdice(lf) <= power) { + if ( gettr(lf) <= power) { if (error) *error = E_WONT; return B_FALSE; } @@ -3393,17 +3398,7 @@ int willmove(lifeform_t *lf, int dir, enum ERROR *error) { if (f) { int roomid; roomid = f->val[0]; - if (roomid == NA) { - // don't move out of ANY room. - if ((getroomid(lf->cell) != getroomid(cell))) { - if ((f->val[1] != NA) && aihastarget(lf)) { - // exception! - } else { - if (error) *error = E_WONT; - return B_FALSE; - } - } - } else { + if (roomid != NA) { // don't move out of the given room. if ((getroomid(lf->cell) == roomid) && (getroomid(lf->cell) != getroomid(cell))) { if ((f->val[1] != NA) && aihastarget(lf)) { diff --git a/nexus.c b/nexus.c index 017cc71..7acad4b 100644 --- a/nexus.c +++ b/nexus.c @@ -814,6 +814,21 @@ void donextturn(map_t *map) { } } + // repairing? + if (donormalmove) { + f = lfhasflag(who, F_REPAIRING); + if (f) { + // this flag might appear more than once. that's okay, we'll handle a new + // one each time. + if (isplayer(who) && checkforkey()) { + msg("Stopped repairing items."); + killflag(f); + } else { + if (!continuerepairing(who, f)) donormalmove = B_FALSE; + } + } + } + // eating? if (donormalmove) { f = lfhasflag(who, F_EATING); @@ -966,7 +981,7 @@ warning_t *findwarning(char *text) { return NULL; } -void gethitdicerange(int depth, int *min, int *max, int range, int oodok) { +void gettrrange(int depth, int *min, int *max, int range, int oodok) { int mid; // adjust depth for out-of-depth monsters diff --git a/nexus.h b/nexus.h index 19e79a0..982408f 100644 --- a/nexus.h +++ b/nexus.h @@ -12,7 +12,7 @@ void dobresnham(int d, int xinc1, int yinc1, int dinc1, int xinc2, int yinc2, in void donextturn(map_t *map); command_t *findcommand(enum COMMAND id); warning_t *findwarning(char *text); -void gethitdicerange(int depth, int *min, int *max, int range, int oodok); +void gettrrange(int depth, int *min, int *max, int range, int oodok); int getoption(enum OPTION id); enum COLOUR getpctcol(float num, float max); char getpctletter(float num, float max); diff --git a/objects.c b/objects.c index 09a3106..683c2f2 100644 --- a/objects.c +++ b/objects.c @@ -461,8 +461,11 @@ object_t *addobfast(obpile_t *where, enum OBTYPE oid) { // to join similar objects together into a single // object with o->amt set, instead of // creating new obejct entries. + +// 'dolinks' determines whether or not to do things like liking holes, assigning destinations to maps, etc. +// basically, set this to false if we are generating temporary/test objects. // NOTE: This function MUST return number of obs created via global "nretobs" -object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes, enum OBTYPE forceoid) { +object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum OBTYPE forceoid) { objecttype_t *ot; object_t *o = NULL; char *p,*nsp; @@ -1570,7 +1573,7 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes // create linked holes in adjacent maps - if (wantlinkholes && o && hasflag(o->flags, F_PIT)) { + if (dolinks && o && hasflag(o->flags, F_PIT)) { cell_t *c; map_t *adjmap = NULL; @@ -1646,19 +1649,21 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes wantregionthing = poss[rnd(0,nposs-1)]; } } - assert(wantregionthing); - // we now have the destination regionlink thing which the - // map will lead to. + if (dolinks) { + assert(wantregionthing); + // we now have the destination regionlink thing which the + // map will lead to. - // just using this to fill in srcregion - findregionthing(wantregionthing->id, &srcregion); - srcdepth = wantregionthing->depth; - dstrt = findregiontype(wantregionthing->value); + // just using this to fill in srcregion + findregionthing(wantregionthing->id, &srcregion); + srcdepth = wantregionthing->depth; + dstrt = findregiontype(wantregionthing->value); - strcpy(buf, dstrt->name); - makelowercase(buf); + strcpy(buf, dstrt->name); + makelowercase(buf); - addflag(o->flags, F_MAPTO, srcregion->id, srcdepth, wantregionthing->id, buf); + addflag(o->flags, F_MAPTO, srcregion->id, srcdepth, wantregionthing->id, buf); + } } else if (o->type->id == OT_STATUE) { flag_t *f, *rf; float ratio; @@ -3158,7 +3163,7 @@ int doobdieconvert(object_t *o, int wantannounce) { if (wantannounce && !hasflag(o->flags, F_NODIECONVERTTEXT)) { char obname[BUFLEN]; // announce the change - real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); strcpy(desc, ""); @@ -3292,14 +3297,14 @@ void explodeob(object_t *o, flag_t *f, int bigness) { // announce if (o->pile->owner) { if (isplayer(o->pile->owner)) { - msg("Your %s explode%s!", noprefix(obname),OBS1(o)); + msg("^BYour %s explode%s!^n", noprefix(obname),OBS1(o)); } else if (cansee(player, o->pile->owner)) { char lfname[BUFLEN]; getlfname(o->pile->owner, lfname); - msg("%s%s %s explode%s!", lfname, getpossessive(lfname), noprefix(obname),OBS1(o)); + msg("^B%s%s %s explode%s!^n", lfname, getpossessive(lfname), noprefix(obname),OBS1(o)); } } else if (haslos(player, c)) { - msg("%s explode%s!", obname,OBS1(o)); + msg("^B%s explode%s!^n", obname,OBS1(o)); } explodecells(c, dam * o->amt, bigness ? B_TRUE : B_FALSE, o, bigness , DT_ORTH, B_FALSE); @@ -4842,19 +4847,19 @@ char *getshopobname(object_t *o, char *buf, int count) { } char *getobname(object_t *o, char *buf, int count) { - return real_getobname(o, buf, count, B_PREMODS, B_CONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + return real_getobname(o, buf, count, B_PREMODS, B_CONDITION, B_BLINDADJUST, B_BLESSINGS, B_USED, B_NOSHOWALL); } char *getobnametrue(object_t *o, char *buf, int count) { - return real_getobname(o, buf, count, B_PREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_SHOWALL); + return real_getobname(o, buf, count, B_PREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOUSED, B_SHOWALL); } char *getobnametruebase(object_t *o, char *buf, int count) { - return real_getobname(o, buf, count, B_NOPREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_NOBLESSINGS, B_SHOWALL); + return real_getobname(o, buf, count, B_NOPREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_SHOWALL); } // buf must already be allocated -char *real_getobname(object_t *o, char *buf, int count, int wantpremods, int wantcondition, int adjustforblind, int wantblesscurse, int showall) { +char *real_getobname(object_t *o, char *buf, int count, int wantpremods, int wantcondition, int adjustforblind, int wantblesscurse, int wanttried, int showall) { char *pluralname; char prefix[BUFLEN]; char basename[BUFLEN]; @@ -5441,7 +5446,7 @@ char *real_getobname(object_t *o, char *buf, int count, int wantpremods, int wan // show if we've tried this //if (!shopitem && (gamemode == GM_GAMESTARTED)) { - if (gamemode == GM_GAMESTARTED) { + if ((gamemode == GM_GAMESTARTED) && wanttried) { knowledge_t *k; strcpy(triedbuf, ""); @@ -5747,7 +5752,7 @@ objecttype_t *getoppositestairs(objecttype_t *ot) { // varargs are: // OC_CLASS1, OC_CLAS2, OC_NONE, ..., DT_DAMTYPE1, DT_DAMTYPE2, .., DT_NONE // -// no objectclass given then it will be picked randomly, or (if wepsk isn't sk_none) set to oc_weapon. +// if no objectclass given then it will be picked randomly, or (if wepsk isn't sk_none) set to oc_weapon. char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat, enum LFSIZE maxsize, enum SKILL wepsk, int forpickup, ... ) { va_list args; objecttype_t *ot; @@ -8234,7 +8239,7 @@ void obdie(object_t *o) { if (!doobdieconvert(o, B_TRUE)) { char desc[BUFLEN]; - real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); if (!hasflag(o->flags, F_NOOBDIETEXT)) { // announce the death strcpy(desc, ""); @@ -9074,7 +9079,7 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) { // tell player makeknown(o->type->id); if (isplayer(lf)) { - real_getobname(o, obname, 1, B_NOPREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, 1, B_NOPREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); msg("This is %s!",obname); } } @@ -10054,7 +10059,7 @@ void quaff(lifeform_t *lf, object_t *o) { drawmsg(); } } else if (!isknown(o)) { - real_getobname(o, obname, 1, B_NOPREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOSHOWALL); // don't adjust for blindness + real_getobname(o, obname, 1, B_NOPREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); // don't adjust for blindness if (isplayer(lf)) { // tell the player msg("This is %s!",obname); @@ -10697,7 +10702,7 @@ int readsomething(lifeform_t *lf, object_t *o) { makeknown(o->type->id); } o->blessknown = B_TRUE; - real_getobname(o, obname, 1, B_NOPREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, 1, B_NOPREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); if (isplayer(lf)) { // tell the player msg("This is %s!",obname); @@ -10772,7 +10777,7 @@ int readsomething(lifeform_t *lf, object_t *o) { if (isplayer(lf)) { // this will be used by maketried() later real_getobname(targob, triedonbuf, 1, B_NOPREMODS, B_NOCONDITION, - B_BLINDADJUST, B_NOBLESSINGS, B_NOSHOWALL); + B_BLINDADJUST, B_NOBLESSINGS, B_USED, B_NOSHOWALL); } } else { noeffect = B_TRUE; @@ -11077,7 +11082,7 @@ int readsomething(lifeform_t *lf, object_t *o) { if (isplayer(lf) && !isknown(o)) { identify(o); o->blessknown = B_TRUE; - real_getobname(o, obname, 1, B_NOPREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, 1, B_NOPREMODS, B_CONDITION, B_NOBLINDADJUST, B_BLESSINGS, B_NOUSED, B_NOSHOWALL); // tell the player msg("This is %s!",obname); more(); @@ -11834,7 +11839,7 @@ int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce) { } // now use the REAL name - real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_NOBLESSINGS, B_SHOWALL); + real_getobname(o, obname, o->amt, B_PREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_SHOWALL); losehp_real(owner, howmuch , damtype, NULL, obname, B_DAMADJUST, o, B_NORETALIATE, NULL, B_DAMEFFECTS); if (isdead(owner)) { return howmuch; @@ -11847,7 +11852,7 @@ int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce) { if (o->material->id == MT_GLASS) { char buf[BUFLEN]; char buf2[BUFLEN]; - real_getobname(o, buf2, 1, B_NOPREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_NOBLESSINGS, B_NOSHOWALL); + real_getobname(o, buf2, 1, B_NOPREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL); snprintf(buf, BUFLEN, "a shattering %s", noprefix(buf2)); shatter(o, B_TRUE, buf, B_FALSE); return howmuch; @@ -11965,7 +11970,7 @@ int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce) { addflag(o->flags, F_LASTDAMTYPE, damtype, NA, NA, NULL); } - real_getobname(o, obname, o->amt, B_NOPREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOSHOWALL); + real_getobname(o, obname, o->amt, B_NOPREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL); getobconditionname(o, predamname); hpflag = hasflag(o->flags, F_OBHP); if (hpflag) { @@ -12322,7 +12327,7 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp radius = o->amt * 2; if (radius > 10) radius = 10; - spellcloud(srcloc, radius, UNI_SHADELIGHT, C_RANDOM, OT_S_INVISIBILITY, radius, B_TRUE, buf, "A cloud of twinkling lights appear!"); + spellcloud(srcloc, radius, UNI_SHADELIGHT, C_RANDOM, OT_S_INVISIBILITY, radius, B_TRUE, buf, "A cloud of twinkling lights appear!", B_FALSE); } else if (o->type->id == OT_ASHSLEEP) { int radius; char buf[BUFLEN]; @@ -12335,7 +12340,7 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp radius = o->amt * 2; if (radius > 10) radius = 10; - spellcloud(srcloc, radius, UNI_SHADELIGHT, C_MAGENTA, OT_S_SLEEP, radius, B_TRUE, buf, "A wispy mist appears!"); + spellcloud(srcloc, radius, UNI_SHADELIGHT, C_MAGENTA, OT_S_SLEEP, radius, B_TRUE, buf, "A wispy mist appears!", B_FALSE); } else if (o->type->id == OT_SALT) { int dist; dist = getcelldist(srcloc, where); @@ -13094,7 +13099,7 @@ void timeeffectsob(object_t *o) { // check each flag for this object... - getflags(o->flags, retflag, &nretflags, F_ACTIVATED, F_EDIBLE, F_MATCONVERT, F_HOT, F_OBHPDRAIN, F_ONFIRE, + getflags(o->flags, retflag, &nretflags, F_ACTIVATED, F_EDIBLE, F_EXPLODEONDEATH, F_MATCONVERT, F_HOT, F_OBHPDRAIN, F_ONFIRE, F_RECHARGE, F_REVIVETIMER, F_WALKDAM, F_WET, F_NONE); for (i = 0; i < nretflags; i++) { object_t *oo,*nextoo; @@ -13190,6 +13195,15 @@ void timeeffectsob(object_t *o) { } } + if (f->id == F_EXPLODEONDEATH) { + if (o->pile->where && haslos(player, o->pile->where)) { + // pass a perception check to see it sparking... + if (skillcheck(player, SC_SEARCH, 15, 0)) { + msg("^w%s sparks.^n", obname); + } + } + } + if (f->id == F_OBHPDRAIN) { enum DAMTYPE damtype; int doit = B_TRUE; @@ -13253,6 +13267,7 @@ void timeeffectsob(object_t *o) { } } } + // regenerates into a lf? if (f->id == F_REVIVETIMER) { cell_t *obloc = NULL; @@ -13273,11 +13288,15 @@ void timeeffectsob(object_t *o) { if (lfloc) { // revive! lf = addmonster(lfloc, f->val[2], NULL, B_FALSE, 1, B_FALSE, NULL); + // gain flags form corpse + copyflag(lf->flags, o->flags, F_CANWILL); + copyflag(lf->flags, o->flags, F_CANCAST); + copyflag(lf->flags, o->flags, F_JOB); // corpse vanishes removeob(o, o->amt); // announce if (haslos(player, lfloc) || haslos(player, obloc)) { - msg("%s comes to life!", obname); + msg("^W%s comes to life!^n", obname); interrupt(player); } return; diff --git a/objects.h b/objects.h index 66ce3c8..dbb6f41 100644 --- a/objects.h +++ b/objects.h @@ -11,7 +11,7 @@ objectclass_t *addoc(enum OBCLASS id, char *name, char *desc, char glyph, int gl void addocnoun(objectclass_t *oc, char *text); object_t *addob(obpile_t *where, char *name); object_t *addobfast(obpile_t *where, enum OBTYPE oid); -object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes, enum OBTYPE forceoid); +object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum OBTYPE forceoid); int addobburst(cell_t *where, int range, int dirtype, char *name, lifeform_t *fromlf, enum LOFTYPE needlof); obmod_t *addobmod(enum OBMOD id, char *prefix); obpile_t *addobpile(lifeform_t *owner, cell_t *where, object_t *parentob); @@ -130,7 +130,7 @@ char *getshardobname(enum MATERIAL mid, char *buf); char *getshopobname(object_t *o, char *buf, int count); char *getobnametrue(object_t *o, char *buf, int count); char *getobnametruebase(object_t *o, char *buf, int count); -char *real_getobname(object_t *o, char *buf, int count, int wantpremods, int wantcondition, int adjustforblind, int wantblesscurse, int showall); +char *real_getobname(object_t *o, char *buf, int count, int wantpremods, int wantcondition, int adjustforblind, int wantblesscurse, int wanttried, int showall); float getobpileweight(obpile_t *op); char *getobconditionname(object_t *o, char *buf); char *getobhurtname(object_t *o, enum DAMTYPE damtype); diff --git a/save.c b/save.c index 5a75e32..887cb08 100644 --- a/save.c +++ b/save.c @@ -1158,6 +1158,9 @@ int saveobtobones(object_t *o, FILE *f, int x, int y) { char obname[BUFLEN]; if (!obgoesinbones(o)) return B_TRUE; + // chance that someone picked up the object + if (onein(4)) return B_TRUE; + // modify the object? if (hasflagval(o->flags, F_OBHPDRAIN, NA, DT_DECAY, NA, NULL)) { // food will decay by the time someone else finds it. @@ -1178,7 +1181,11 @@ int saveobtobones(object_t *o, FILE *f, int x, int y) { } } - getobnametrue(o, obname, o->amt); + if (o->material->id == MT_BLOOD) { + sprintf(obname, "a blood stain"); + } else { + getobnametrue(o, obname, o->amt); + } fprintf(f, "at(%d,%d) ob:%s\n", x,y, obname); return B_FALSE; } diff --git a/spell.c b/spell.c index c5d7e64..af237fb 100644 --- a/spell.c +++ b/spell.c @@ -941,6 +941,8 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef if (cansee(player, user)) { msg("^w%s disarm%s %s!",username, isplayer(user) ? "" : "s", targetname); } + // calling drop() will cause the target to take some time - this will normally give + // free hit in before they can pick it back up. drop(targetwep, ALL); } else { if (isplayer(user)) { @@ -1418,12 +1420,11 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef howlong = DEF_RAGETIME; addtempflag(user->flags, F_RAGE, B_TRUE, NA, NA, NULL, howlong); } else if (abilid == OT_A_REPAIR) { - object_t *o,*helpob = NULL; + object_t *o; enum MATERIAL repairablemats[MAXCANDIDATES]; int cutoffpct[MAXCANDIDATES]; int nmats = 0; int i; - char helpobname[BUFLEN]; // get list of repairable materials getworkablematerials(user, SK_METALWORK, repairablemats, cutoffpct, &nmats); @@ -1432,6 +1433,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef // sk_armour lets you repair armour up to xx% (depends on skill) initprompt(&prompt, "Repair which object?"); addchoice(&prompt, '-', "Cancel", "Cancel", NULL, NULL); + addchoice(&prompt, ',', "All", "All", NULL, NULL); for (o = user->pack->first ; o ; o = o->next) { int ok = B_FALSE; int cutoff = 0; @@ -1456,7 +1458,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef } } - if (prompt.nchoices <= 1) { + if (prompt.nchoices <= 2) { if (isplayer(user)) { msg("You don't have anything which you are able to repair."); } @@ -1465,51 +1467,54 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef // 2. ask which ones to repair (or ALL) if (isplayer(user)) { - getchoice(&prompt); - o = (object_t *) prompt.result; + char ch; + ch = getchoice(&prompt); + if (ch == ',') { // all + int n; + for (n = 0 ; n < prompt.nchoices; n++) { + o = (object_t *)prompt.choice[n].data; + if (o) { + char buf[BUFLEN]; + sprintf(buf, "%ld", o->id); + addflag(user->flags, F_REPAIRING, NA, NA, NA, buf); + } + } + o = NULL; + } else { + o = (object_t *) prompt.result; + if (!o) { + if (isplayer(user)) msg("Cancelled."); + return B_TRUE; + } + } } else { - // pick a random one - o = (object_t *) prompt.choice[rnd(0,prompt.nchoices-1)].data; + // pick a random one (not 'cancel' or 'all') + o = (object_t *) prompt.choice[rnd(2,prompt.nchoices-1)].data; + if (!o) return B_TRUE; } - - - // in case it's on fire, etc - if (touch(user, o)) { - taketime(user, getactspeed(user)); - return B_FALSE; - } - - // get helper ob - helpob = getworkhelpob(user->pack, o->material->id); - if (helpob) { - real_getobname(helpob, helpobname, helpob->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOSHOWALL); + + if (o) { + char buf[BUFLEN]; + sprintf(buf, "%ld", o->id); + addflag(user->flags, F_REPAIRING, NA, NA, NA, buf); + getobname(o, buf, o->amt); + if (isplayer(user)) { + msg("You start repairing %s...", buf); + } else if (cansee(player, user)) { + char lfname[BUFLEN]; + getlfname(user, lfname); + msg("%s starts repairing %s...", lfname, buf); + } } else { - strcpy(helpobname, ""); + // repairing all... + if (isplayer(user)) { + msg("You start repairing your equipment..."); + } else if (cansee(player, user)) { + char lfname[BUFLEN]; + getlfname(user, lfname); + msg("%s starts repairing its equipment...", lfname); + } } - - // fully repair it. - f = hasflag(o->flags, F_OBHP); - f->val[0] = f->val[1]; - if (isplayer(user)) { - char buf[BUFLEN],withbuf[BUFLEN]; - real_getobname(o, buf, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOSHOWALL); - if (helpob) sprintf(withbuf, " (with %s)", helpobname); - else strcpy(withbuf, ""); - - msg("You repair your %s%s.", noprefix(buf), withbuf); - } else { - char buf[BUFLEN],withbuf[BUFLEN]; - real_getobname(o, buf, o->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_BLESSINGS, B_NOSHOWALL); - if (helpob) sprintf(withbuf, " with %s", helpobname); - else strcpy(withbuf, ""); - - msg("%s repairs %s%s.", username, buf, withbuf); - } - - practice(user, SK_METALWORK, 1); - practice(user, SK_SEWING, 1); - // TODO: make this like eating/resting/etc ? - taketime(user, getactspeed(user)); } else if (abilid == OT_A_RESIZE) { object_t *o; enum MATERIAL repairablemats[MAXCANDIDATES]; @@ -4343,8 +4348,8 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ for (i = 0; i < caster->nlos; i++) { c = caster->los[i]; if (c->lf && (c->lf != caster) && (c->lf->race->raceclass->id == RC_ANIMAL) && lfhasflag(c->lf, F_HOSTILE)) { - if (gethitdice(c->lf) <= powerleft) { - powerleft -= gethitdice(c->lf); + if (gettr(c->lf) <= powerleft) { + powerleft -= gettr(c->lf); makepeaceful(c->lf, caster); ncalmed++; @@ -4626,7 +4631,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ // no saving throw, just depends on hit dice. // too powerful? - if (gethitdice(target) <= power) { + if (gettr(target) <= power) { int howlong; if (isplayer(caster) || cansee(player, target)) { if (seenbyplayer) *seenbyplayer = B_TRUE; @@ -6847,7 +6852,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ fizzle(target); return B_TRUE; } - f = addtempflag(target->flags, F_HEAVENARM, power*10, NA, NA, "divine armour", FROMSPELL); + f = addtempflag(target->flags, F_HEAVENARM, power*10, NA, NA, "shell of divine armour", FROMSPELL); f->obfrom = spellid; } else if (spellid == OT_S_HOLDPORTAL) { object_t *o,*oo; @@ -7405,7 +7410,11 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ ndone++; } - // now stop active spells + if (killflagsofid(target->flags, F_REVIVETIMER)) { + ndone++; + } + + // now stop active spells or abilities while (ndone < power) { nposs = 0; getflags(target->flags, retflag, &nretflags, F_BOOSTSPELL, F_NONE); @@ -8462,7 +8471,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ for (o = c->obpile->first ; o ; o = o->next) { char obname[BUFLEN]; real_getobname(o, obname, o->amt, B_PREMODS, B_CONDITION, B_NOBLINDADJUST, - B_NOBLESSINGS, B_NOSHOWALL); + B_NOBLESSINGS, B_USED, B_NOSHOWALL); if (strcasestr(obname, wantname)) { char ptext[BUFLEN]; char distbuf[BUFLEN],dirbuf[BUFLEN]; @@ -8477,7 +8486,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ for (o = c->lf->pack->first ; o ; o = o->next) { char obname[BUFLEN]; real_getobname(o, obname, o->amt, B_PREMODS, B_CONDITION, - B_NOBLINDADJUST, B_NOBLESSINGS, B_NOSHOWALL); + B_NOBLINDADJUST, B_NOBLESSINGS, B_USED, B_NOSHOWALL); if (strcasestr(obname, wantname)) { char ptext[BUFLEN]; char distbuf[BUFLEN],dirbuf[BUFLEN]; @@ -8924,7 +8933,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ // same race? if (potrace == target->race) continue; // too powerful? - if (gethitdicerace(potrace) > power) { + if (gettrrace(potrace) > power) { continue; } // already in the list? @@ -11928,7 +11937,7 @@ int getspellpower(lifeform_t *lf, enum OBTYPE spellid) { if (isplayer(lf)) { power = 1; // plus your hitdice/3 - power += (gethitdice(lf)/3); + power += (gettr(lf)/3); // plus stat modifier power += getspellpowerstatmod(lf, school, NULL); @@ -11940,7 +11949,7 @@ int getspellpower(lifeform_t *lf, enum OBTYPE spellid) { power += (schoolskill - spelllev); } else { // for monsters, just based on hitdice: - power = gethitdice(lf)/2; + power = gettr(lf)/2; limit(&power, 1, NA); } @@ -12263,7 +12272,9 @@ int getworkablematerials(lifeform_t *lf, enum SKILL skid , enum MATERIAL *repair } if (helpob) cutoff -= 15; - if (cutoff) { + limit(&cutoff, 0, NA); + + if (cutoff != 100) { if (skid == SK_METALWORK) { repairablemats[*nmats] = MT_METAL; cutoffpct[*nmats] = cutoff; @@ -12409,7 +12420,7 @@ int schoolappearsinbooks(enum SPELLSCHOOL ss) { return B_TRUE; } -void spellcloud(cell_t *srcloc, int radius, int ch, enum COLOUR col, enum OBTYPE sid, int power, int frompot, char *seetext, char *noseetext) { +void spellcloud(cell_t *srcloc, int radius, int ch, enum COLOUR col, enum OBTYPE sid, int power, int frompot, char *seetext, char *noseetext, int aimedateyes) { int x,y; objecttype_t *ot; ot = findot(sid); @@ -12424,12 +12435,18 @@ void spellcloud(cell_t *srcloc, int radius, int ch, enum COLOUR col, enum OBTYPE c = getcellat(srcloc->map, x, y); if (c && c->lf && (c != srcloc) && !c->type->solid && haslof(srcloc, c, LOF_WALLSTOP, NULL)) { - if (getcelldistorth(srcloc, c) <= radius) { - // cast the spell - if (ot->obclass->id == OC_SPELL) { - dospelleffects(NULL, ot->id, power, c->lf, NULL, c, B_UNCURSED, NULL, frompot); - } else if (ot->obclass->id == OC_ABILITY) { - abilityeffects(c->lf, ot->id, c, c->lf, NULL); + int safe = B_FALSE; + if (aimedateyes && (!hasbp(c->lf, BP_EYES) || getarmour(c->lf, BP_EYES))) { + safe = B_TRUE; + } + if (!safe) { + if (getcelldistorth(srcloc, c) <= radius) { + // cast the spell + if (ot->obclass->id == OC_SPELL) { + dospelleffects(NULL, ot->id, power, c->lf, NULL, c, B_UNCURSED, NULL, frompot); + } else if (ot->obclass->id == OC_ABILITY) { + abilityeffects(c->lf, ot->id, c, c->lf, NULL); + } } } } diff --git a/spell.h b/spell.h index de8f519..552b618 100644 --- a/spell.h +++ b/spell.h @@ -35,7 +35,7 @@ int getworkablematerials(lifeform_t *lf, enum SKILL skid , enum MATERIAL *repair object_t *getworkhelpob(obpile_t *op, enum MATERIAL mat); void pullobto(object_t *o, lifeform_t *lf); int schoolappearsinbooks(enum SPELLSCHOOL ss); -void spellcloud(cell_t *srcloc, int radius, int ch, enum COLOUR col, enum OBTYPE sid, int power, int frompot, char *seetext, char *noseetext); +void spellcloud(cell_t *srcloc, int radius, int ch, enum COLOUR col, enum OBTYPE sid, int power, int frompot, char *seetext, char *noseetext, int aimedateyes); int spellisfromschool(int spellid, enum SPELLSCHOOL school); int spellokformonsters(int spellid); int spellresisted(lifeform_t *target, lifeform_t *caster, int spellid, int power, int *seenbyplayer, int announce); diff --git a/text.c b/text.c index cf6139b..e6c2d1e 100644 --- a/text.c +++ b/text.c @@ -190,8 +190,9 @@ char *construct_hit_string(lifeform_t *lf, lifeform_t *victim, char *attackernam } } else { // ie. the attacker is a monster if (cansee(player, lf) || (victim && isplayer(victim))) { + int needfree = B_FALSE; + char *verb; char withwep[BUFLEN]; - char attackverb[BUFLEN]; char nodamstr[BUFLEN]; int nodam = B_FALSE; int col; @@ -206,7 +207,7 @@ char *construct_hit_string(lifeform_t *lf, lifeform_t *victim, char *attackernam strcpy(withwep, ""); } - strcpy(attackverb, getattackverb(lf, wep, damtype,dam,maxhp)); + verb = getattackverb(lf, wep, damtype,dam,maxhp); strcpy(nodamstr, ""); if ((dam == 0) && (damtype != DT_TOUCH) && !lfhasflag(lf, F_PHANTASM)) { @@ -214,15 +215,24 @@ char *construct_hit_string(lifeform_t *lf, lifeform_t *victim, char *attackernam strcpy(nodamstr, " ineffectually"); } + if (backstab && (idx == 0)) { + verb = strdup("backstab"); + needfree = B_TRUE; + } + if (victim && isplayer(victim) && !nodam) { col = C_YELLOW; } else { col = C_GREY; } - snprintf(retbuf, BUFLEN, "^%d%s %s%s%s %s%s%s.", col, buf, - usecrittext ? "critically " : "", attackverb, - needses(attackverb) ? "es" : "s", - usecrittext ? victimbpname : locvictimname,withwep, nodamstr); + snprintf(retbuf, BUFLEN, "^%d%s %s%s%s %s%s%s%c", col, buf, + usecrittext ? "critically " : "", verb, + needses(verb) ? "es" : "s", + usecrittext ? victimbpname : locvictimname,withwep, nodamstr, + backstab ? '!' : '.'); + if (needfree) { + free(verb); + } } } } else { // follow-up weapon damage (ie from a flaming sword etc)