- [+] sauna should generate non-damaging steam.

- [+] generic object: "generator"
    - [+] specal text: generator:steam for vault defs
- [+] show flag sources in io.c
    - [+] TEST
    - [+] remove from MONSTER view.
- [+] paladin shoudl start with first aid skill
- [+] disrupt undead should do heaps more damage - because right now
      you'd just use smite evil
    - [+] increase disrupt undead from  "2-6" to more.
    - [+] reduce smite evil's maxpower 
- [+] problem: blessed buckler is essentiall the same as tower shield
      cause it doesnt get hurt!
    - [+] make bigger shields provide more protection
- [+] change F_SEEINDARK so that v1 specifies whether a bright light
      blinds you
- [+] getting WAY too many piles of ash from burnign corpses
    - [+] combine into "huge pile of ash"
- [+] change food decay
    - [+] instead of food losing hp, increase its  F_DECAY level 
    - [+] if F_DECAY too high, it's tainted. >= 50
    - [+] ie. update isrotting()
    - [+] dramatically lower food hp.
        - [+] where does corpse F_OBHP get added? from obclass.
        - [+] when we make a corpse override its obhp with the original
              mosnter's maxhp.
- [+] when i fix unreachable areas, change all the walls/floors in one
      of the unreachable areas!
    - [+] ie. change every solid non-vault cell which is adjacent to an
          unreachable one.
    - [+] test,,,
- [+] make inspection check more difficult
- [+] ohther sound types which monstesr shouldn't turn to watch:
    - [+] NC_ENVIRONMENTAL (building, stairs, etc)
- [+] create food should neve create poisonous food.
This commit is contained in:
Rob Pearce 2012-12-01 05:26:23 +00:00
parent a144e9c4a6
commit bfab1b10ed
16 changed files with 672 additions and 279 deletions

3
ai.c
View File

@ -2991,6 +2991,9 @@ int aispellok(lifeform_t *lf, enum OBTYPE spellid, lifeform_t *victim, enum FLAG
if ((ot->id == OT_S_DISPERSAL) && (lf->race->raceclass->id == RC_GOD)) { if ((ot->id == OT_S_DISPERSAL) && (lf->race->raceclass->id == RC_GOD)) {
specificcheckok = B_FALSE; specificcheckok = B_FALSE;
} }
if ((ot->id == OT_S_DISRUPTUNDEAD) && !isundead(victim)) {
specificcheckok = B_FALSE;
}
if ((ot->id == OT_S_DRAINLIFE) && isimmuneto(victim->flags, DT_NECROTIC, B_FALSE)) { if ((ot->id == OT_S_DRAINLIFE) && isimmuneto(victim->flags, DT_NECROTIC, B_FALSE)) {
specificcheckok = B_FALSE; specificcheckok = B_FALSE;
} }

View File

@ -2265,7 +2265,7 @@ int check_for_block(lifeform_t *lf, lifeform_t *victim, int dam, enum DAMTYPE da
getallshields(victim, damtype, shield, checkmod, &nshields); getallshields(victim, damtype, shield, checkmod, &nshields);
for (i = 0; i < nshields; i++) { for (i = 0; i < nshields; i++) {
int blocked = B_FALSE; int blocked = B_FALSE;
// did f_fuillblock skill work? // did f_fullblock skill work?
if (fflag && ranged && (shield[i]->id == shid)) { if (fflag && ranged && (shield[i]->id == shid)) {
int fullchance; int fullchance;
fullchance = 40 + (getobsize(shield[i])*5); fullchance = 40 + (getobsize(shield[i])*5);

174
data.c
View File

@ -311,7 +311,9 @@ void initjobs(void) {
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL); addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
// learnable skills // learnable skills
for (i = 1; i < MAXSKILLS; i++) { for (i = 1; i < MAXSKILLS; i++) {
addflag(lastjob->flags, F_CANLEARN, i, NA, NA, NULL); if (i != SK_FLIGHT) {
addflag(lastjob->flags, F_CANLEARN, i, NA, NA, NULL);
}
} }
// abilities // abilities
addflag(lastjob->flags, F_MPDICE, 1, NA, NA, NULL); addflag(lastjob->flags, F_MPDICE, 1, NA, NA, NULL);
@ -1149,6 +1151,7 @@ void initjobs(void) {
addflag(lastjob->flags, F_STARTSKILL, SK_AXES, PR_NOVICE, NA, NULL); addflag(lastjob->flags, F_STARTSKILL, SK_AXES, PR_NOVICE, NA, NULL);
addflag(lastjob->flags, F_STARTSKILL, SK_COMBAT, PR_BEGINNER, NA, NULL); addflag(lastjob->flags, F_STARTSKILL, SK_COMBAT, PR_BEGINNER, NA, NULL);
addflag(lastjob->flags, F_STARTSKILL, SK_COOKING, PR_NOVICE, NA, NULL); addflag(lastjob->flags, F_STARTSKILL, SK_COOKING, PR_NOVICE, NA, NULL);
addflag(lastjob->flags, F_STARTSKILL, SK_FIRSTAID, PR_NOVICE, NA, NULL);
addflag(lastjob->flags, F_STARTSKILL, SK_CLUBS, PR_NOVICE, NA, NULL); addflag(lastjob->flags, F_STARTSKILL, SK_CLUBS, PR_NOVICE, NA, NULL);
addflag(lastjob->flags, F_STARTSKILL, SK_SHORTBLADES, PR_NOVICE, NA, NULL); addflag(lastjob->flags, F_STARTSKILL, SK_SHORTBLADES, PR_NOVICE, NA, NULL);
addflag(lastjob->flags, F_STARTSKILL, SK_LONGBLADES, PR_NOVICE, NA, NULL); addflag(lastjob->flags, F_STARTSKILL, SK_LONGBLADES, PR_NOVICE, NA, NULL);
@ -2154,8 +2157,9 @@ void initobjects(void) {
addoc(OC_CORPSE, "Corpses", "Dead flesh which was once living.", '%', C_GREY, RR_NEVER); addoc(OC_CORPSE, "Corpses", "Dead flesh which was once living.", '%', C_GREY, RR_NEVER);
addflag(lastobjectclass->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastobjectclass->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastobjectclass->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); addflag(lastobjectclass->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastobjectclass->flags, F_OBHP, 50, 50, NA, NULL); addflag(lastobjectclass->flags, F_OBHP, 50, 50, NA, NULL); // will be overridden when making a corpse
addflag(lastobjectclass->flags, F_OBHPDRAIN, 1, DT_DECAY, NA, NULL); // ie. corpses last for 50 turns addflag(lastobjectclass->flags, F_DECAY, 0, NA, 1, NULL); // decay increases by 1 each turn.
//addflag(lastobjectclass->flags, F_OBHPDRAIN, 1, DT_DECAY, NA, NULL); // ie. corpses last for 50 turns
addoc(OC_TECH, "Technology", "A strange piece of futuristic equipment. Perhaps someone with more skill in Technology could recognise it...", '[', C_GREY, RR_RARE); addoc(OC_TECH, "Technology", "A strange piece of futuristic equipment. Perhaps someone with more skill in Technology could recognise it...", '[', C_GREY, RR_RARE);
addocnoun(lastobjectclass, "technology"); addocnoun(lastobjectclass, "technology");
addocnoun(lastobjectclass, "tech"); addocnoun(lastobjectclass, "tech");
@ -2235,6 +2239,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_GLYPH, C_BLUE, '_', NA, NULL); addflag(lastot->flags, F_GLYPH, C_BLUE, '_', NA, NULL);
//addflag(lastot->flags, F_GLYPH, C_BLUE, UNI_FOUNTAIN, NA, NULL);
addflag(lastot->flags, F_RARITY, H_VILLAGE, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_VILLAGE, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 90, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_CAVE, 90, RR_UNCOMMON, NULL);
@ -2320,7 +2325,7 @@ void initobjects(void) {
addot(OT_GRATINGFLOOR, "drainage grate", "A hatchway in the ground made of strong iron mesh.", MT_METAL, 40, OC_DFEATURE, SZ_MEDIUM); addot(OT_GRATINGFLOOR, "drainage grate", "A hatchway in the ground made of strong iron mesh.", MT_METAL, 40, OC_DFEATURE, SZ_MEDIUM);
// important: don't make these in a swamp. // important: don't make these in a swamp.
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL); addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL);
addflag(lastot->flags, F_MAKESNOISE, 33, 3, NA, "a slow drip."); addflag(lastot->flags, F_MAKESNOISE, 33, 3, NC_ENVIRONMENTAL, "a slow drip.");
addflag(lastot->flags, F_GLYPH, C_METAL, '#', NA, NULL); addflag(lastot->flags, F_GLYPH, C_METAL, '#', NA, NULL);
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "drainage grate"); addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "drainage grate");
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_GRATINGROOF, NA, NA, NULL); addflag(lastot->flags, F_OPPOSITESTAIRS, OT_GRATINGROOF, NA, NA, NULL);
@ -2379,8 +2384,8 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "rustling leaves."); addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "rustling leaves.");
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "birds chirping."); addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "birds chirping.");
addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL);
addot(OT_TREEUP, "hollow tree leading up", "A huge hollow tree containing an ascending staircase.", MT_DRAGONWOOD, 3000, OC_DFEATURE, SZ_HUGE); addot(OT_TREEUP, "hollow tree leading up", "A huge hollow tree containing an ascending staircase.", MT_DRAGONWOOD, 3000, OC_DFEATURE, SZ_HUGE);
addflag(lastot->flags, F_GLYPH, C_WOOD, '<', NA, NULL); addflag(lastot->flags, F_GLYPH, C_WOOD, '<', NA, NULL);
@ -2400,8 +2405,8 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "a strange echoing."); addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "a strange echoing.");
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "an echoing drip."); addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "an echoing drip.");
addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL);
addot(OT_TUNNELUP, "tunnel leading up", "A wide tunnel leading upwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE); addot(OT_TUNNELUP, "tunnel leading up", "A wide tunnel leading upwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
addflag(lastot->flags, F_GLYPH, C_BROWN, '<', NA, NULL); addflag(lastot->flags, F_GLYPH, C_BROWN, '<', NA, NULL);
@ -2421,8 +2426,8 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "cracking ice"); addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "cracking ice");
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "howling winds"); addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "howling winds");
addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL);
addot(OT_ICESTAIRSUP, "icy passage leading up", "A cold metal passage leading upwards, encryusted with ice.", MT_METAL, 3000, OC_DFEATURE, SZ_HUGE); addot(OT_ICESTAIRSUP, "icy passage leading up", "A cold metal passage leading upwards, encryusted with ice.", MT_METAL, 3000, OC_DFEATURE, SZ_HUGE);
addflag(lastot->flags, F_GLYPH, C_WHITE, '<', NA, NULL); addflag(lastot->flags, F_GLYPH, C_WHITE, '<', NA, NULL);
@ -2522,7 +2527,7 @@ void initobjects(void) {
addflag(lastot->flags, F_SHOPMENU, 0, MA_GOTOMENU, SM_REST, "a:rent a room"); addflag(lastot->flags, F_SHOPMENU, 0, MA_GOTOMENU, SM_REST, "a:rent a room");
addflag(lastot->flags, F_SHOPMENU, 1, MA_GOTOMENU, SM_PURCHASEITEMS, "b:buy provisions"); addflag(lastot->flags, F_SHOPMENU, 1, MA_GOTOMENU, SM_PURCHASEITEMS, "b:buy provisions");
addflag(lastot->flags, F_SHOPMENU, 3, MA_QUIT, NA, "q:leave"); addflag(lastot->flags, F_SHOPMENU, 3, MA_QUIT, NA, "q:leave");
addflag(lastot->flags, F_MAKESNOISE, 33, 3, NA, "a cash register chiming."); addflag(lastot->flags, F_MAKESNOISE, 33, 3, NC_ENVIRONMENTAL, "a cash register chiming.");
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
f = addflag(lastot->flags, F_STARTOBCLASS, 100, OC_FOOD, NA, NULL); f = addflag(lastot->flags, F_STARTOBCLASS, 100, OC_FOOD, NA, NULL);
addcondition(f, FC_NOCONDITION, 33); addcondition(f, FC_NOCONDITION, 33);
@ -2540,7 +2545,7 @@ void initobjects(void) {
addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, SM_REPAIR, "r:repair equipment"); addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, SM_REPAIR, "r:repair equipment");
addflag(lastot->flags, F_SHOPMENU, 3, MA_GOTOMENU, SM_RESIZE, "s:resize equipment"); addflag(lastot->flags, F_SHOPMENU, 3, MA_GOTOMENU, SM_RESIZE, "s:resize equipment");
addflag(lastot->flags, F_SHOPMENU, 4, MA_QUIT, NA, "q:leave"); addflag(lastot->flags, F_SHOPMENU, 4, MA_QUIT, NA, "q:leave");
addflag(lastot->flags, F_MAKESNOISE, 33, 3, NA, "a cash register chiming."); addflag(lastot->flags, F_MAKESNOISE, 33, 3, NC_ENVIRONMENTAL, "a cash register chiming.");
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
addflag(lastot->flags, F_STARTOBCLASS, 100, OC_ARMOUR, RANDOM, NULL); addflag(lastot->flags, F_STARTOBCLASS, 100, OC_ARMOUR, RANDOM, NULL);
} }
@ -2605,7 +2610,7 @@ void initobjects(void) {
addflag(lastot->flags, F_SHOPACCEPTSFLAG, F_RARITY, NA, NA, NULL); // ie. basically anything addflag(lastot->flags, F_SHOPACCEPTSFLAG, F_RARITY, NA, NA, NULL); // ie. basically anything
addflag(lastot->flags, F_SHOPMENU, 0, MA_GOTOMENU, SM_DONATE, "d:donate something"); addflag(lastot->flags, F_SHOPMENU, 0, MA_GOTOMENU, SM_DONATE, "d:donate something");
addflag(lastot->flags, F_SHOPMENU, 1, MA_QUIT, NA, "q:leave"); addflag(lastot->flags, F_SHOPMENU, 1, MA_QUIT, NA, "q:leave");
addflag(lastot->flags, F_MAKESNOISE, 33, 3, NA, "the clanking of metal."); addflag(lastot->flags, F_MAKESNOISE, 33, 3, NC_ENVIRONMENTAL, "the clanking of metal.");
addot(OT_SHOPRING, "jewellery store", "A small kiosk dealing in rings and amulets.", MT_METAL, 500, OC_BUILDING, SZ_LARGE); addot(OT_SHOPRING, "jewellery store", "A small kiosk dealing in rings and amulets.", MT_METAL, 500, OC_BUILDING, SZ_LARGE);
addflag(lastot->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, ""); addflag(lastot->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, "");
@ -2620,7 +2625,7 @@ void initobjects(void) {
addflag(lastot->flags, F_SHOPMENU, 1, MA_GOTOMENU, SM_SELLITEMS, "b:sell gems"); addflag(lastot->flags, F_SHOPMENU, 1, MA_GOTOMENU, SM_SELLITEMS, "b:sell gems");
addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, SM_ID, "i:inspect items"); addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, SM_ID, "i:inspect items");
addflag(lastot->flags, F_SHOPMENU, 3, MA_QUIT, NA, "q:leave"); addflag(lastot->flags, F_SHOPMENU, 3, MA_QUIT, NA, "q:leave");
addflag(lastot->flags, F_MAKESNOISE, 33, 3, NA, "a cash register chiming."); addflag(lastot->flags, F_MAKESNOISE, 33, 3, NC_ENVIRONMENTAL, "a cash register chiming.");
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
if (onein(3)) { if (onein(3)) {
addflag(lastot->flags, F_STARTOBCLASS, 100, OC_ROCK, RANDOM, NULL); addflag(lastot->flags, F_STARTOBCLASS, 100, OC_ROCK, RANDOM, NULL);
@ -2640,7 +2645,7 @@ void initobjects(void) {
addflag(lastot->flags, F_SHOPMENU, 1, MA_GOTOMENU, SM_DONATE, "d:donate something"); addflag(lastot->flags, F_SHOPMENU, 1, MA_GOTOMENU, SM_DONATE, "d:donate something");
addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, SM_RESIZE, "r:resize equipment"); addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, SM_RESIZE, "r:resize equipment");
addflag(lastot->flags, F_SHOPMENU, 3, MA_QUIT, NA, "q:leave"); addflag(lastot->flags, F_SHOPMENU, 3, MA_QUIT, NA, "q:leave");
addflag(lastot->flags, F_MAKESNOISE, 33, 3, NA, "a cash register chiming."); addflag(lastot->flags, F_MAKESNOISE, 33, 3, NC_ENVIRONMENTAL, "a cash register chiming.");
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
addflag(lastot->flags, F_STARTOBCLASS, 100, OC_WEAPON, RANDOM, NULL); addflag(lastot->flags, F_STARTOBCLASS, 100, OC_WEAPON, RANDOM, NULL);
} }
@ -2649,7 +2654,7 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL); addflag(lastot->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL);
addflag(lastot->flags, F_CONTAINER, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_CONTAINER, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_SHOPACCEPTSFLAG, F_NONE, NA, OC_MONEY, NULL); addflag(lastot->flags, F_SHOPACCEPTSFLAG, F_NONE, NA, OC_MONEY, NULL);
addflag(lastot->flags, F_MAKESNOISE, 33, 3, NA, "voices chanting."); addflag(lastot->flags, F_MAKESNOISE, 33, 3, NC_ENVIRONMENTAL, "voices chanting.");
addflag(lastot->flags, F_SHOPMENU, 0, MA_GOTOMENU, 1, "a:speak to a deacon (earthly concerns)"); addflag(lastot->flags, F_SHOPMENU, 0, MA_GOTOMENU, 1, "a:speak to a deacon (earthly concerns)");
addflag(lastot->flags, F_SHOPMENU, 1, MA_GOTOMENU, 2, "b:speak to a priest (minor divine administration)"); addflag(lastot->flags, F_SHOPMENU, 1, MA_GOTOMENU, 2, "b:speak to a priest (minor divine administration)");
addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, 3, "c:speak to the bishop (major divine matters)"); addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, 3, "c:speak to the bishop (major divine matters)");
@ -2702,7 +2707,7 @@ void initobjects(void) {
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_MAKESNOISE, 33, SV_TALK, NA, "a shrill humming."); addflag(lastot->flags, F_MAKESNOISE, 33, SV_TALK, NC_ENVIRONMENTAL, "a shrill humming.");
addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL);
addot(OT_STOMACHEXIT, "gaping hole", "A gaping hole in an enormous creature.", MT_MAGIC, 0, OC_DFEATURE, SZ_LARGE); addot(OT_STOMACHEXIT, "gaping hole", "A gaping hole in an enormous creature.", MT_MAGIC, 0, OC_DFEATURE, SZ_LARGE);
@ -3131,11 +3136,33 @@ void initobjects(void) {
addot(OT_ASH, "pile of ash", "A pile of ash.", MT_STONE, 0.1, OC_ROCK, SZ_TINY); addot(OT_ASH, "pile of ash", "A pile of ash.", MT_STONE, 0.1, OC_ROCK, SZ_TINY);
addflag(lastot->flags, F_GLYPH, C_DARKGREY, ',', NA, NULL); addflag(lastot->flags, F_GLYPH, C_DARKGREY, ',', NA, NULL);
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, ""); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, "");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, ""); addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, RR_COMMON, "");
addflag(lastot->flags, F_RARITY, H_CAVE, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_CAVE, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_POWDER, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_POWDER, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_FEELTEXT, NA, NA, NA, "some ash"); addflag(lastot->flags, F_FEELTEXT, NA, NA, NA, "some ash");
addflag(lastot->flags, F_NUMCONVERT, 100, OT_ASHLARGE, NA, NULL);
addflag(lastot->flags, F_GROWSTO, OT_DUSTCLOUD, VT_OB, NA, NULL);
addot(OT_ASHLARGE, "large pile of ash", "A large pile of ash.", MT_STONE, 0.1, OC_ROCK, SZ_TINY);
addflag(lastot->flags, F_GLYPH, C_DARKGREY, ',', NA, NULL);
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, "");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, RR_RARE, "");
addflag(lastot->flags, F_RARITY, H_CAVE, 100, RR_RARE, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_POWDER, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_FEELTEXT, NA, NA, NA, "some ash");
addflag(lastot->flags, F_NUMCONVERT, 100, OT_ASHHUGE, NA, NULL);
addflag(lastot->flags, F_SHRINKSTO, OT_ASH, VT_OB, NA, NULL);
addflag(lastot->flags, F_GROWSTO, OT_DUSTCLOUD, VT_OB, NA, NULL);
addot(OT_ASHHUGE, "huge pile of ash", "A huge pile of ash.", MT_STONE, 0.1, OC_ROCK, SZ_TINY);
addflag(lastot->flags, F_GLYPH, C_DARKGREY, ',', NA, NULL);
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, "");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, RR_VERYRARE, "");
addflag(lastot->flags, F_RARITY, H_CAVE, 100, RR_VERYRARE, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_POWDER, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_FEELTEXT, NA, NA, NA, "some ash");
addflag(lastot->flags, F_SHRINKSTO, OT_ASH, VT_OB, NA, NULL);
addflag(lastot->flags, F_GROWSTO, OT_DUSTCLOUD, VT_OB, NA, NULL); addflag(lastot->flags, F_GROWSTO, OT_DUSTCLOUD, VT_OB, NA, NULL);
addot(OT_ASHCONCEAL, "pile of concealing powder", "A pile of ash.", MT_STONE, 0.1, OC_ROCK, SZ_TINY); addot(OT_ASHCONCEAL, "pile of concealing powder", "A pile of ash.", MT_STONE, 0.1, OC_ROCK, SZ_TINY);
addflag(lastot->flags, F_GLYPH, NA, ',', NA, NULL); addflag(lastot->flags, F_GLYPH, NA, ',', NA, NULL);
@ -3330,6 +3357,7 @@ void initobjects(void) {
addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, NA, NULL); addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, NA, NULL);
addflag(lastot->flags, F_GROWSTO, OT_TREE, VT_OB, NA, NULL); addflag(lastot->flags, F_GROWSTO, OT_TREE, VT_OB, NA, NULL);
addot(OT_STICK, "stick", "A sturdy wooden stick. It's brown and sticky.", MT_WOOD, 0.5, OC_FLORA, SZ_SMALL); addot(OT_STICK, "stick", "A sturdy wooden stick. It's brown and sticky.", MT_WOOD, 0.5, OC_FLORA, SZ_SMALL);
addflag(lastot->flags, F_GLYPH, C_WOOD, ')', NA, NULL);
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL); addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 100, NA, NULL); addflag(lastot->flags, F_RARITY, H_CAVE, 100, NA, NULL);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, NULL);
@ -3341,10 +3369,6 @@ void initobjects(void) {
addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL);
addot(OT_STUMP, "tree stump", "A large tree stump.", MT_WOOD, 150, OC_FLORA, SZ_LARGE); addot(OT_STUMP, "tree stump", "A large tree stump.", MT_WOOD, 150, OC_FLORA, SZ_LARGE);
addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_FREQUENT, ""); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_FREQUENT, "");
addflag(lastot->flags, F_GLYPH, C_BROWN, '\'', NA, NULL); addflag(lastot->flags, F_GLYPH, C_BROWN, '\'', NA, NULL);
@ -3565,6 +3589,9 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_ANTNEST, 100, RR_RARE, NULL); addflag(lastot->flags, F_RARITY, H_ANTNEST, 100, RR_RARE, NULL);
addot(OT_ROASTMEAT, "chunk of roast meat", "A chunk of flame-roasted flesh.", MT_FLESH, 1, OC_FOOD, SZ_TINY); // weight normally comes from corpse type addot(OT_ROASTMEAT, "chunk of roast meat", "A chunk of flame-roasted flesh.", MT_FLESH, 1, OC_FOOD, SZ_TINY); // weight normally comes from corpse type
addflag(lastot->flags, F_GLYPH, C_DARKBROWN, '%', NA, NULL); addflag(lastot->flags, F_GLYPH, C_DARKBROWN, '%', NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, "");
addflag(lastot->flags, F_OBHP, 10, 10, NA, ""); // will be overridden
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, "");
addflag(lastot->flags, F_EDIBLE, B_TRUE, 100, NA, ""); addflag(lastot->flags, F_EDIBLE, B_TRUE, 100, NA, "");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_ISMEAT, B_TRUE, 80, NA, ""); addflag(lastot->flags, F_ISMEAT, B_TRUE, 80, NA, "");
@ -4040,9 +4067,9 @@ void initobjects(void) {
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL); addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL); addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
addflag(lastot->flags, F_PLEASESGOD, R_GODDEATH, 2, NA, NULL); addflag(lastot->flags, F_PLEASESGOD, R_GODDEATH, 2, NA, NULL);
addot(OT_S_SMITEGOOD, "smite good", "Instantly deals 1d4 + ^bpower^nd4 damage to good creatures.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); addot(OT_S_SMITEGOOD, "smite good", "Instantly deals (1 + ^bpower^n)d4 damage to good creatures.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_SPELLSCHOOL, SS_DEATH, NA, NA, NULL); addflag(lastot->flags, F_SPELLSCHOOL, SS_DEATH, NA, NA, NULL);
addflag(lastot->flags, F_MAXPOWER, 6, NA, NA, NULL); addflag(lastot->flags, F_MAXPOWER, 3, NA, NA, NULL);
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL); addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL); addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL); addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
@ -5017,19 +5044,22 @@ void initobjects(void) {
addflag(lastot->flags, F_SPELLSCHOOL, SS_DIVINATION, NA, NA, NULL); addflag(lastot->flags, F_SPELLSCHOOL, SS_DIVINATION, NA, NA, NULL);
addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL); addflag(lastot->flags, F_MAXPOWER, 1, NA, NA, NULL);
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL); addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
addot(OT_S_SMITEEVIL, "smite evil", "Instantly deals 1d4 _ ^bpower^nd4 damage to evil creatures.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); addot(OT_S_SMITEEVIL, "smite evil", "Instantly deals (1 + ^bpower^n)d4 damage to evil creatures.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL); addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL);
addflag(lastot->flags, F_MAXPOWER, 10, NA, NA, NULL); addflag(lastot->flags, F_MAXPOWER, 3, NA, NA, NULL);
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL); addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL); addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL); addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL); addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
addflag(lastot->flags, F_PLEASESGOD, R_GODLIFE, 2, NA, NULL); addflag(lastot->flags, F_PLEASESGOD, R_GODLIFE, 2, NA, NULL);
// l3 // l3
addot(OT_S_DISRUPTUNDEAD, "disrupt undead", "Disrupts the very essence of undead creatures, dealing 2-6 damage per spell power.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); addot(OT_S_DISRUPTUNDEAD, "disrupt undead", "Disrupts the very essence of undead creatures, dealing 3d6+^gpower^n damage.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL); addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL);
addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL); addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL);
addflag(lastot->flags, F_PLEASESGOD, R_GODLIFE, 1, NA, NULL); addflag(lastot->flags, F_PLEASESGOD, R_GODLIFE, 1, NA, NULL);
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
addot(OT_S_HEALING, "healing", "Restores 10-20 health to the caster.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); addot(OT_S_HEALING, "healing", "Restores 10-20 health to the caster.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "This spell will always heal at least 2 hp per power."); addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "This spell will always heal at least 2 hp per power.");
addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL); addflag(lastot->flags, F_SPELLSCHOOL, SS_LIFE, NA, NA, NULL);
@ -5122,6 +5152,7 @@ void initobjects(void) {
addot(OT_S_VENTRILOQUISM, "ventriloquism", "Causes your voice to originate from the target area, distracting enemies.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); addot(OT_S_VENTRILOQUISM, "ventriloquism", "Causes your voice to originate from the target area, distracting enemies.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_SPELLSCHOOL, SS_MENTAL, NA, NA, NULL); addflag(lastot->flags, F_SPELLSCHOOL, SS_MENTAL, NA, NA, NULL);
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL); addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);
addflag(lastot->flags, F_MAXPOWER, 3, NA, NA, NULL);
addflag(lastot->flags, F_TARGETTEDSPELL, TT_NONE, NA, NA, NULL); addflag(lastot->flags, F_TARGETTEDSPELL, TT_NONE, NA, NA, NULL);
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL); addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
addot(OT_S_LETHARGY, "lethargy", "Reduces the target's stamina by ^bpower^n*2.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); addot(OT_S_LETHARGY, "lethargy", "Reduces the target's stamina by ^bpower^n*2.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
@ -6614,7 +6645,7 @@ void initobjects(void) {
addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL);
addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL);
addflag(lastot->flags, F_OBHP, 2, 2, NA, NULL); addflag(lastot->flags, F_OBHP, 2, 2, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_SEEINDARK, 5, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SEEINDARK, 5, B_BLINDABLE, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addot(OT_SOLDERINGIRON, "soldering iron", "A hand tool with an electrically heated metal tip. This unit is operated by an in-built battery.", MT_METAL, 0.5, OC_TECH, SZ_TINY); addot(OT_SOLDERINGIRON, "soldering iron", "A hand tool with an electrically heated metal tip. This unit is operated by an in-built battery.", MT_METAL, 0.5, OC_TECH, SZ_TINY);
addflag(lastot->flags, F_RARITY, H_ALL, RR_UNCOMMON, NA, NULL); addflag(lastot->flags, F_RARITY, H_ALL, RR_UNCOMMON, NA, NULL);
@ -6650,7 +6681,7 @@ void initobjects(void) {
addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL); addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL);
addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL); addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL);
addflag(lastot->flags, F_EXPLODEONDEATH, NA, 1, NA, "10d2"); addflag(lastot->flags, F_EXPLODEONDEATH, NA, 1, NA, "10d2");
addflag(lastot->flags, F_MAKESNOISE, 33, SV_TALK, NA, "something sparking."); addflag(lastot->flags, F_MAKESNOISE, 33, SV_TALK, NC_DANGER, "something sparking.");
addot(OT_VIBROBLADE, "vibroblade", "A futuristic blade which vibrates at ultra-high speed, adding cutting power to attacks.", MT_METAL, 1, OC_TECH, SZ_SMALL); addot(OT_VIBROBLADE, "vibroblade", "A futuristic blade which vibrates at ultra-high speed, adding cutting power to attacks.", MT_METAL, 1, OC_TECH, SZ_SMALL);
addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL); addflag(lastot->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
@ -6838,6 +6869,7 @@ void initobjects(void) {
addflag(lastot->flags, F_ATTREQ, A_AGI, NA, 65, "10"); addflag(lastot->flags, F_ATTREQ, A_AGI, NA, 65, "10");
addflag(lastot->flags, F_USESSKILL, SK_SHORTBLADES, NA, NA, NULL); addflag(lastot->flags, F_USESSKILL, SK_SHORTBLADES, NA, NA, NULL);
addot(OT_STEAKKNIFE, "steak knife", "A common kitchen knife.", MT_METAL, 0.2, OC_MISC, SZ_SMALL); addot(OT_STEAKKNIFE, "steak knife", "A common kitchen knife.", MT_METAL, 0.2, OC_MISC, SZ_SMALL);
addflag(lastot->flags, F_GLYPH, C_METAL, ')', NA, NULL);
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL); addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, 100, NA, NULL); addflag(lastot->flags, F_RARITY, H_CAVE, 100, NA, NULL);
addflag(lastot->flags, F_OBATTACKDELAY, 50, NA, NA, NULL); addflag(lastot->flags, F_OBATTACKDELAY, 50, NA, NA, NULL);
@ -7349,12 +7381,13 @@ void initobjects(void) {
addflag(lastot->flags, F_RARITY, H_CAVE, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_CAVE, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_GLYPH, C_RED, '\\', NA, NULL); addflag(lastot->flags, F_GLYPH, C_RED, '\\', NA, NULL);
addflag(lastot->flags, F_PRODUCESLIGHT, 6, NA, IFACTIVE, NULL); addflag(lastot->flags, F_PRODUCESLIGHT, 6, NA, IFACTIVE, NULL);
addflag(lastot->flags, F_TEMPMOD, 5, NA, NA, NULL);
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ONFIRE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ONFIRE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_ONLYINROOM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ONLYINROOM, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MAX, NA, NULL); addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MAX, NA, NULL);
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "crackling flames."); addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "crackling flames.");
addflag(lastot->flags, F_GROWSTO, OT_FIRELARGE, VT_OB, NA, NULL); addflag(lastot->flags, F_GROWSTO, OT_FIRELARGE, VT_OB, NA, NULL);
addflag(lastot->flags, F_SHRINKSTO, NA, VT_OB, NA, "red-hot helmet"); addflag(lastot->flags, F_SHRINKSTO, NA, VT_OB, NA, "red-hot helmet");
@ -7518,7 +7551,7 @@ void initobjects(void) {
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_PRODUCESLIGHT, 10, NA, NA, NULL); addflag(lastot->flags, F_PRODUCESLIGHT, 10, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!"); addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
addflag(lastot->flags, F_MAKESNOISE, 33, 3, NA, "roaring flames."); addflag(lastot->flags, F_MAKESNOISE, 33, 3, NC_ENVIRONMENTAL, "roaring flames.");
addflag(lastot->flags, F_SHRINKSTO, OT_FIREMED, VT_OB, NA, NULL); addflag(lastot->flags, F_SHRINKSTO, OT_FIREMED, VT_OB, NA, NULL);
addflag(lastot->flags, F_GENERATES, 10, 0, B_INADJCELL, "cloud of smoke"); addflag(lastot->flags, F_GENERATES, 10, 0, B_INADJCELL, "cloud of smoke");
addflag(lastot->flags, F_GENERATES, 50, 0, B_INADJCELL, "puff of smoke"); addflag(lastot->flags, F_GENERATES, 50, 0, B_INADJCELL, "puff of smoke");
@ -7535,7 +7568,7 @@ void initobjects(void) {
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_PRODUCESLIGHT, 7, NA, NA, NULL); addflag(lastot->flags, F_PRODUCESLIGHT, 7, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!"); addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
addflag(lastot->flags, F_MAKESNOISE, 33, 2, NA, "roaring flames."); addflag(lastot->flags, F_MAKESNOISE, 33, 2, NC_ENVIRONMENTAL, "roaring flames.");
addflag(lastot->flags, F_GROWSTO, OT_FIRELARGE, VT_OB, NA, NULL); addflag(lastot->flags, F_GROWSTO, OT_FIRELARGE, VT_OB, NA, NULL);
addflag(lastot->flags, F_SHRINKSTO, OT_FIRESMALL, VT_OB, NA, NULL); addflag(lastot->flags, F_SHRINKSTO, OT_FIRESMALL, VT_OB, NA, NULL);
addflag(lastot->flags, F_GENERATES, 50, 0, B_INADJCELL, "puff of smoke"); addflag(lastot->flags, F_GENERATES, 50, 0, B_INADJCELL, "puff of smoke");
@ -7551,7 +7584,7 @@ void initobjects(void) {
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_PRODUCESLIGHT, 5, NA, NA, NULL); addflag(lastot->flags, F_PRODUCESLIGHT, 5, NA, NA, NULL);
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!"); addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "crackling flames."); addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "crackling flames.");
addflag(lastot->flags, F_GROWSTO, OT_FIREMED, VT_OB, NA, NULL); addflag(lastot->flags, F_GROWSTO, OT_FIREMED, VT_OB, NA, NULL);
addflag(lastot->flags, F_GENERATES, 50, 0, B_INADJCELL, "puff of smoke"); addflag(lastot->flags, F_GENERATES, 50, 0, B_INADJCELL, "puff of smoke");
@ -7579,7 +7612,7 @@ void initobjects(void) {
addflag(lastot->flags, F_WALKDAM, DT_HEAT, NA, NA, "1d4"); addflag(lastot->flags, F_WALKDAM, DT_HEAT, NA, NA, "1d4");
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!"); addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
addot(OT_STEAMPUFF, "puff of steam", "A small puff of scalding steam.", MT_GAS, 0, OC_EFFECT, SZ_MEDIUM); addot(OT_STEAMPUFF, "puff of steam", "A small puff of hot steam.", MT_GAS, 0, OC_EFFECT, SZ_MEDIUM);
addflag(lastot->flags, F_GLYPH, C_FOG, UNI_SHADELIGHT, NA, NULL); addflag(lastot->flags, F_GLYPH, C_FOG, UNI_SHADELIGHT, NA, NULL);
addflag(lastot->flags, F_OBDIETEXT, B_TRUE, NA, NA, "disperses"); addflag(lastot->flags, F_OBDIETEXT, B_TRUE, NA, NA, "disperses");
addflag(lastot->flags, F_TEMPMOD, 5, NA, NA, NULL); addflag(lastot->flags, F_TEMPMOD, 5, NA, NA, NULL);
@ -7587,8 +7620,9 @@ void initobjects(void) {
addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL); addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL);
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_TEMPMOD, 5, NA, NA, NULL);
addflag(lastot->flags, F_BLOCKSVIEW, 1, NA, NA, NULL); addflag(lastot->flags, F_BLOCKSVIEW, 1, NA, NA, NULL);
addflag(lastot->flags, F_WALKDAM, DT_HEAT, NA, NA, "1d4"); //addflag(lastot->flags, F_WALKDAM, DT_HEAT, NA, NA, "1d4");
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!"); addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!");
addot(OT_SLEETSTORM, "storm of sleet", "An intense storm of sleet. Hampers movement and deals minor cold damage.", MT_GAS, 0, OC_EFFECT, SZ_LARGE); addot(OT_SLEETSTORM, "storm of sleet", "An intense storm of sleet. Hampers movement and deals minor cold damage.", MT_GAS, 0, OC_EFFECT, SZ_LARGE);
@ -8281,7 +8315,7 @@ void initobjects(void) {
// armour - shields // armour - shields
addot(OT_BUCKLER, "buckler", "A small, unobtrusive wooden shield.", MT_WOOD, 3.00, OC_ARMOUR, SZ_SMALL); addot(OT_BUCKLER, "buckler", "A small, unobtrusive wooden shield.", MT_WOOD, 3.00, OC_ARMOUR, SZ_SMALL);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_SHIELD, 5, NA, NA, NULL);
addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL); addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 5, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 5, NA, NULL);
@ -8291,7 +8325,7 @@ void initobjects(void) {
// similar to a buckler, but repairable, lighter, and less durable // similar to a buckler, but repairable, lighter, and less durable
addot(OT_SHIELDHIDE, "hide shield", "A small shield constructed out of animal skin.", MT_LEATHER, 2.00, OC_ARMOUR, SZ_SMALL); addot(OT_SHIELDHIDE, "hide shield", "A small shield constructed out of animal skin.", MT_LEATHER, 2.00, OC_ARMOUR, SZ_SMALL);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_SHIELD, 5, NA, NA, NULL);
addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL); addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 5, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 5, NA, NULL);
@ -8301,17 +8335,16 @@ void initobjects(void) {
// //
addot(OT_APSIS, "apsis", "A sturdy, bowl-shaped leather shield. Slightly more durable than a buckler.", MT_LEATHER, 4.00, OC_ARMOUR, SZ_SMALL); addot(OT_APSIS, "apsis", "A sturdy, bowl-shaped leather shield. Slightly more durable than a buckler.", MT_LEATHER, 4.00, OC_ARMOUR, SZ_SMALL);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_SHIELD, 8, NA, NA, NULL);
addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL); addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 10, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 10, NA, NULL);
addflag(lastot->flags, F_OBHP, 25, 25, NA, NULL); addflag(lastot->flags, F_OBHP, 25, 25, NA, NULL);
addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL);
addflag(lastot->flags, F_GROWSTO, OT_ARMOURLEATHER, VT_OB, NA, NULL); addflag(lastot->flags, F_GROWSTO, OT_ARMOURLEATHER, VT_OB, NA, NULL);
addot(OT_SHIELD, "shield", "A medium-sized metal shield.", MT_METAL, 4.00, OC_ARMOUR, SZ_MEDIUM); addot(OT_SHIELD, "shield", "A medium-sized metal shield.", MT_METAL, 4.00, OC_ARMOUR, SZ_MEDIUM);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_SHIELD, 10, NA, NA, NULL);
addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL); addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 15, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 15, NA, NULL);
@ -8320,7 +8353,7 @@ void initobjects(void) {
addflag(lastot->flags, F_GROWSTO, OT_SHIELDLARGE, VT_OB, NA, NULL); addflag(lastot->flags, F_GROWSTO, OT_SHIELDLARGE, VT_OB, NA, NULL);
addot(OT_SHIELDLARGE, "large shield", "A large (if somewhat cumbersome) shield.", MT_METAL, 6.00, OC_ARMOUR, SZ_MEDIUM); addot(OT_SHIELDLARGE, "large shield", "A large (if somewhat cumbersome) shield.", MT_METAL, 6.00, OC_ARMOUR, SZ_MEDIUM);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_SHIELD, 15, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 20, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 20, NA, NULL);
addflag(lastot->flags, F_OBHP, 40, 40, NA, NULL); addflag(lastot->flags, F_OBHP, 40, 40, NA, NULL);
@ -8329,7 +8362,7 @@ void initobjects(void) {
addflag(lastot->flags, F_SHRINKSTO, OT_SHIELD, VT_OB, NA, NULL); addflag(lastot->flags, F_SHRINKSTO, OT_SHIELD, VT_OB, NA, NULL);
addot(OT_SHIELDTOWER, "tower shield", "An enormous but very cumbersome shield.", MT_METAL, 11.00, OC_ARMOUR, SZ_HUMAN); addot(OT_SHIELDTOWER, "tower shield", "An enormous but very cumbersome shield.", MT_METAL, 11.00, OC_ARMOUR, SZ_HUMAN);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL); addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL);
addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_SHIELD, 20, NA, NA, NULL);
addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL); addflag(lastot->flags, F_CANBLOCK, DT_ALL, NA, NA, NULL);
addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL);
addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 30, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 30, NA, NULL);
@ -9080,7 +9113,7 @@ void initobjects(void) {
addot(OT_FLAIL, "flail", "A flexible chain attached to a heavy weight.", MT_METAL, 9, OC_WEAPON, SZ_MEDIUM); addot(OT_FLAIL, "flail", "A flexible chain attached to a heavy weight.", MT_METAL, 9, OC_WEAPON, SZ_MEDIUM);
addflag(lastot->flags, F_RARITY, H_DUNGEON, NA, NA, NULL); addflag(lastot->flags, F_RARITY, H_DUNGEON, NA, NA, NULL);
addflag(lastot->flags, F_RARITY, H_CAVE, NA, NA, NULL); addflag(lastot->flags, F_RARITY, H_CAVE, NA, NA, NULL);
addflag(lastot->flags, F_DAM, DT_BASH, 7, NA, NULL); addflag(lastot->flags, F_DAM, DT_BASH, 6, NA, NULL);
addflag(lastot->flags, F_EXTRADAM, DT_SLASH, B_TRUE, NA, "1d2"); addflag(lastot->flags, F_EXTRADAM, DT_SLASH, B_TRUE, NA, "1d2");
addflag(lastot->flags, F_ACCURACY, 85, NA, NA, NULL); addflag(lastot->flags, F_ACCURACY, 85, NA, NA, NULL);
addflag(lastot->flags, F_USESSKILL, SK_WHIPS, NA, NA, NULL); addflag(lastot->flags, F_USESSKILL, SK_WHIPS, NA, NA, NULL);
@ -9965,6 +9998,19 @@ void initobjects(void) {
addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL); // will be replaced when summoned addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL); // will be replaced when summoned
// special obs // special obs
// note: when creating this, ask for:
// generator "xxx,y,pct"
// where:
// xxx is what you want it to generate
// y is radius to generate in (0 = only its own cell)
// pct is the chance each turn of creating it.
addot(OT_GENERATOR, "generator", "A special virtual object which generates other ones.", MT_NOTHING, 0, OC_MISC, SZ_MINI);
addflag(lastot->flags, F_INVISOB, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOGLYPH, NA, NA, NA, NULL);
addflag(lastot->flags, F_NOFEEL, NA, NA, NA, NULL);
addot(OT_PLAYERSTART, "playerstart", "starting pos for player", MT_NOTHING, 0, OC_MISC, SZ_MINI); addot(OT_PLAYERSTART, "playerstart", "starting pos for player", MT_NOTHING, 0, OC_MISC, SZ_MINI);
addot(OT_PUSHN, "pushn", "pusher north", MT_NOTHING, 0, OC_MISC, SZ_MINI); addot(OT_PUSHN, "pushn", "pusher north", MT_NOTHING, 0, OC_MISC, SZ_MINI);
addflag(lastot->flags, F_INVISOB, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_INVISOB, B_TRUE, NA, NA, NULL);
@ -10560,7 +10606,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL); addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL);
// bonuses // bonuses
addflag(lastrace->flags, F_SEEINDARK, 7, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 7, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_CARTOGRAPHY, PR_NOVICE, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_CARTOGRAPHY, PR_NOVICE, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_METALWORK, PR_NOVICE, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_METALWORK, PR_NOVICE, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_ENGINEERING, PR_BEGINNER, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_ENGINEERING, PR_BEGINNER, NA, NULL);
@ -10721,7 +10767,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL); addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL);
// bonuses // bonuses
addflag(lastrace->flags, F_SEEINDARK, 6, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 6, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_MEDITATES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MEDITATES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MPMOD, 3, NA, NA, NULL); addflag(lastrace->flags, F_MPMOD, 3, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_SS_DEATH, PR_NOVICE, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_SS_DEATH, PR_NOVICE, NA, NULL);
@ -12660,7 +12706,7 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, B_COVETS, NA, NULL); addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, B_COVETS, NA, NULL);
addflag(lastrace->flags, F_WANTS, OT_GOLD, B_COVETS, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_GOLD, B_COVETS, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 3, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
@ -12789,7 +12835,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "leather armour"); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "leather armour");
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-50 gold dollars"); addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-50 gold dollars");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 3, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MINIONS, 90, 1, 2, "goblin"); addflag(lastrace->flags, F_MINIONS, 90, 1, 2, "goblin");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
@ -12826,7 +12872,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "leather armour"); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "leather armour");
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-25 gold dollars"); addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-25 gold dollars");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 5, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MINIONS, 70, 1, 2, "goblin"); addflag(lastrace->flags, F_MINIONS, 70, 1, 2, "goblin");
addflag(lastrace->flags, F_CANWILL, OT_A_HIDE, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_HIDE, NA, NA, NULL);
@ -12862,7 +12908,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_CLUBS, NA, "common"); addflag(lastrace->flags, F_STARTOBWEPSK, 50, SK_CLUBS, NA, "common");
addflag(lastrace->flags, F_STARTOB, 80, NA, NA, "leather armour"); addflag(lastrace->flags, F_STARTOB, 80, NA, NA, "leather armour");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 5, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
//addflag(lastrace->flags, F_CANCAST, OT_S_BLINDNESS, NA, NA, NULL); //addflag(lastrace->flags, F_CANCAST, OT_S_BLINDNESS, NA, NA, NULL);
//addflag(lastrace->flags, F_CANCAST, OT_S_PAIN, NA, NA, NULL); //addflag(lastrace->flags, F_CANCAST, OT_S_PAIN, NA, NA, NULL);
@ -12905,7 +12951,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "great random armour"); addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "great random armour");
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "100-300 gold dollars"); addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "100-300 gold dollars");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
addflag(lastrace->flags, F_SEEINDARK, 4, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 4, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MINIONS, 90, 4, 6, "goblin"); addflag(lastrace->flags, F_MINIONS, 90, 4, 6, "goblin");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
@ -13058,7 +13104,7 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
addflag(lastrace->flags, F_SEEINDARK, 10, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 10, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_PHALANX, 5, NA, 1, "hobgoblin"); addflag(lastrace->flags, F_PHALANX, 5, NA, 1, "hobgoblin");
addflag(lastrace->flags, F_MINIONS, 50, 1, 2, "goblin"); addflag(lastrace->flags, F_MINIONS, 50, 1, 2, "goblin");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
@ -13186,7 +13232,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-10 gold dollars"); addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "1-10 gold dollars");
addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
addflag(lastrace->flags, F_SEEINDARK, 2, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 2, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FLEEONHPPCT, 30, NA, NA, ""); addflag(lastrace->flags, F_FLEEONHPPCT, 30, NA, NA, "");
addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL);
@ -13711,7 +13757,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LTAVERAGE, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
addflag(lastrace->flags, F_SEEINDARK, UNLIMITED, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, UNLIMITED, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_SMITEGOOD, NA, NA, NULL); addflag(lastrace->flags, F_CANCAST, OT_S_SMITEGOOD, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_DARKNESS, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CANCAST, OT_S_DARKNESS, NA, NA, "pw:8;");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
@ -14582,7 +14628,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL);
addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL); addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 5, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_FIRE, 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_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL);
@ -14704,7 +14750,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 110, "10-30"); addflag(lastrace->flags, F_HITCONFER, F_POISONED, SC_POISON, 110, "10-30");
addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 3, NA, NULL); addflag(lastrace->flags, F_HITCONFERVALS, P_VENOM, 3, NA, NULL);
addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL); addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 5, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL);
@ -15553,7 +15599,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_TOOCLOSE, 2, NA, "growls threateningly^a threatening growl"); addflag(lastrace->flags, F_NOISETEXT, N_TOOCLOSE, 2, NA, "growls threateningly^a threatening growl");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "hisses^a hiss"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "hisses^a hiss");
addflag(lastrace->flags, F_SEEINDARK, 8, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 8, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_CANSEETHROUGHMAT, MT_GAS, NA, NA, NULL); addflag(lastrace->flags, F_CANSEETHROUGHMAT, MT_GAS, NA, NA, NULL);
addflag(lastrace->flags, F_AUTOCREATEOB, 1, NA, NA, "puff of smoke"); addflag(lastrace->flags, F_AUTOCREATEOB, 1, NA, NA, "puff of smoke");
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
@ -15941,7 +15987,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MAXATTACKS, 1, 2, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 2, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL); addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 6, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 6, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "barks^barking"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "barks^barking");
addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling"); addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling");
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining"); addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining");
@ -16013,7 +16059,7 @@ void initrace(void) {
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 5, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining"); addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "howls^a howl"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "howls^a howl");
addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling"); addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling");
@ -16047,7 +16093,7 @@ void initrace(void) {
addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL); addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 5, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "barks^barking"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "barks^barking");
addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 2, NA, "growls^growling"); addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 2, NA, "growls^growling");
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining"); addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining");
@ -18116,7 +18162,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "buzzes angrily^an angry buzzing"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "buzzes angrily^an angry buzzing");
addflag(lastrace->flags, F_NOISETEXT, N_FLY, SV_TALK, NA, "^buzzing wings"); addflag(lastrace->flags, F_NOISETEXT, N_FLY, SV_TALK, NA, "^buzzing wings");
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 3, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_SUCKBLOOD, NA, NA, "dam:1d1;"); addflag(lastrace->flags, F_CANWILL, OT_A_SUCKBLOOD, NA, NA, "dam:1d1;");
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
@ -19175,7 +19221,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, "3d6"); addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, "3d6");
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, 6, NULL); addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, 6, NULL);
addflag(lastrace->flags, F_SEEINVIS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SEEINVIS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_SEEINDARK, 8, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 8, B_BLINDABLE, NA, NULL);
addflag(lastrace->flags, F_AVOIDOBTYPE, OT_GARLIC, B_TRUE, NA, NULL); addflag(lastrace->flags, F_AVOIDOBTYPE, OT_GARLIC, B_TRUE, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
@ -19932,7 +19978,7 @@ void initskills(void) {
addskill(SK_TWOWEAPON, "Dual Weilding", "Allows you to weild two melee weapons at once.", 50); addskill(SK_TWOWEAPON, "Dual Weilding", "Allows you to weild two melee weapons at once.", 50);
addskilldesc(SK_TWOWEAPON, PR_NOVICE, "^gYou can now weild two weapons at once, with -4 accuracy.^n", B_TRUE); addskilldesc(SK_TWOWEAPON, PR_NOVICE, "^gYou can now weild two weapons at once, with -4 accuracy.^n", B_TRUE);
addskilldesc(SK_TWOWEAPON, PR_BEGINNER, "^gDual-weapon accuracy penalty reduced to -2.^n", B_FALSE); addskilldesc(SK_TWOWEAPON, PR_BEGINNER, "^gDual-weapon accuracy penalty reduced to -2.^n", B_FALSE);
addskilldesc(SK_TWOWEAPON, PR_ADEPT, "^gYou no longer suffer an accuracy penalty when weilding two weapons.^n", B_TRUE); addskilldesc(SK_TWOWEAPON, PR_ADEPT, "^gEliminates accuracy penalty when weilding two weapons.^n", B_TRUE);
addskilldesc(SK_TWOWEAPON, PR_SKILLED, "^gFollow-up attacks with your second weapon are now more accurate.^n", B_TRUE); addskilldesc(SK_TWOWEAPON, PR_SKILLED, "^gFollow-up attacks with your second weapon are now more accurate.^n", B_TRUE);
addskillabil(SK_TWOWEAPON, PR_EXPERT, OT_A_FLURRY, NA, "pw:1;", B_TRUE); addskillabil(SK_TWOWEAPON, PR_EXPERT, OT_A_FLURRY, NA, "pw:1;", B_TRUE);
addskilldesc(SK_TWOWEAPON, PR_MASTER, "^gYou can now deflect attacks with your second weapon.^n", B_TRUE); addskilldesc(SK_TWOWEAPON, PR_MASTER, "^gYou can now deflect attacks with your second weapon.^n", B_TRUE);
@ -20131,7 +20177,7 @@ void initskills(void) {
addskilldesc(sk->id, PR_INEPT, "This skill increases your accuracy and damage when using matching weapons.", B_FALSE); addskilldesc(sk->id, PR_INEPT, "This skill increases your accuracy and damage when using matching weapons.", B_FALSE);
if (sk->id == SK_CLUBS) addskilldesc(sk->id, PR_NOVICE, "^gYou gain the 'merciful fighting' ability.^n", B_FALSE); if (sk->id == SK_CLUBS) addskilldesc(sk->id, PR_NOVICE, "^gYou gain the 'merciful fighting' ability.^n", B_FALSE);
addskilldesc(sk->id, PR_NOVICE, "^gYou can now recognise the quality of matching weapons.^n", B_FALSE); addskilldesc(sk->id, PR_NOVICE, "^gYou can now recognise the quality of matching weapons.^n", B_FALSE);
addskilldesc(sk->id, PR_NOVICE, "^gYou no longer suffer accuracy penalties with matching weapons.^n", B_FALSE); addskilldesc(sk->id, PR_NOVICE, "^gEliminates accuracy penalties with matching weapons.^n", B_FALSE);
addskilldesc(sk->id, PR_BEGINNER, "^g+1 accuracy.^n", B_FALSE); addskilldesc(sk->id, PR_BEGINNER, "^g+1 accuracy.^n", B_FALSE);
addskilldesc(sk->id, PR_BEGINNER, "^gYou gain the 'wild strike' ability.^n", B_FALSE); addskilldesc(sk->id, PR_BEGINNER, "^gYou gain the 'wild strike' ability.^n", B_FALSE);
addskilldesc(sk->id, PR_ADEPT, "^g+10% damage bonus.^n", B_FALSE); addskilldesc(sk->id, PR_ADEPT, "^g+10% damage bonus.^n", B_FALSE);
@ -20288,7 +20334,7 @@ void make_basic_shop(flagpile_t *fp, int includeid, int includedonate) {
addflag(fp, F_SHOPMENU, idx++, MA_GOTOMENU, SM_ID, "i:inspect items"); addflag(fp, F_SHOPMENU, idx++, MA_GOTOMENU, SM_ID, "i:inspect items");
} }
addflag(fp, F_SHOPMENU, idx++, MA_QUIT, NA, "q:leave"); addflag(fp, F_SHOPMENU, idx++, MA_QUIT, NA, "q:leave");
addflag(fp, F_MAKESNOISE, 33, 3, NA, "a cash register chiming."); addflag(fp, F_MAKESNOISE, 33, 3, NC_ENVIRONMENTAL, "a cash register chiming.");
} }
void sortcommands(void) { void sortcommands(void) {

Binary file not shown.

20
defs.h
View File

@ -71,6 +71,7 @@
// unicode chars // unicode chars
#define UNI_DYNAMIC 0x2500 // use surrounding cells and box chars #define UNI_DYNAMIC 0x2500 // use surrounding cells and box chars
#define UNI_FOUNTAIN 0x26F2
#define UNI_SOLID 0x2588 #define UNI_SOLID 0x2588
#define UNI_SHADELIGHT 0x2591 #define UNI_SHADELIGHT 0x2591
#define UNI_SHADEMED 0x2592 #define UNI_SHADEMED 0x2592
@ -103,6 +104,8 @@
#define B_MAYBE (-2) #define B_MAYBE (-2)
#define B_ONEOF (-3) #define B_ONEOF (-3)
#define B_BLINDABLE (-1)
#define B_ADD 1 #define B_ADD 1
#define B_REMOVE -1 #define B_REMOVE -1
@ -651,6 +654,7 @@ enum SHOPACTION {
#define FROMSKILL (-7863) #define FROMSKILL (-7863)
#define FROMGODGIFT (-7862) #define FROMGODGIFT (-7862)
#define FROMGODPIETY (-7861) #define FROMGODPIETY (-7861)
#define FROMINJURY (-7860)
#define FROMEXTERNAL_LOW (-7999) #define FROMEXTERNAL_LOW (-7999)
#define LEVABILITYDONE (-8000) #define LEVABILITYDONE (-8000)
@ -772,7 +776,9 @@ enum NOISECLASS {
NC_SPEECH = 2, NC_SPEECH = 2,
NC_FIGHTING = 3, NC_FIGHTING = 3,
NC_SPELLEFFECT = 4, NC_SPELLEFFECT = 4,
NC_OTHER = 5, NC_ENVIRONMENTAL = 6,
NC_DANGER = 7,
NC_OTHER = 99,
}; };
enum QUADRANT { enum QUADRANT {
@ -1697,6 +1703,8 @@ enum OBTYPE {
OT_TRAPWIND, OT_TRAPWIND,
// rocks // rocks
OT_ASH, OT_ASH,
OT_ASHLARGE,
OT_ASHHUGE,
OT_ASHEXPLODE, OT_ASHEXPLODE,
OT_ASHCONCEAL, OT_ASHCONCEAL,
OT_ASHINVIS, OT_ASHINVIS,
@ -2608,6 +2616,7 @@ enum OBTYPE {
OT_ICEHELMET, OT_ICEHELMET,
OT_ICESHIELD, OT_ICESHIELD,
// special obs // special obs
OT_GENERATOR,
OT_PLAYERSTART, OT_PLAYERSTART,
OT_PUSHN, OT_PUSHN,
OT_PUSHE, OT_PUSHE,
@ -3109,6 +3118,7 @@ enum FLAG {
F_MAKESNOISE, // object periodically makes noise. F_MAKESNOISE, // object periodically makes noise.
// v0 = % chance of noise. // v0 = % chance of noise.
// v1 = volume. // v1 = volume.
// v2 = enum noiseclass
// f->text is the sound made. ie. "a splash." // f->text is the sound made. ie. "a splash."
// shops // shops
F_BANNEDLF, // lfid v0 is not allowed to enter this shop F_BANNEDLF, // lfid v0 is not allowed to enter this shop
@ -3192,6 +3202,8 @@ enum FLAG {
// v0 = enum RUSTINESS. // v0 = enum RUSTINESS.
// object mods/effects // object mods/effects
F_ONFIRE, // burning, also deals extra fire damage F_ONFIRE, // burning, also deals extra fire damage
//v1 = how much damage the object itself will take
// each turn. (NA or negative means '0')
// option text = xdx amount of extra damage to deal for // option text = xdx amount of extra damage to deal for
// weapons. // weapons.
F_HOT, // object is very hot to the touch. F_HOT, // object is very hot to the touch.
@ -3294,7 +3306,11 @@ enum FLAG {
F_ARMOURSIZE, // v0 = sz_xxx, can be "medium", "human" or "large". F_ARMOURSIZE, // v0 = sz_xxx, can be "medium", "human" or "large".
F_ARMOURRATING, // val0 * 2 = pct of damage reduced F_ARMOURRATING, // val0 * 2 = pct of damage reduced
F_SHIELD, // this is a shield - use special bodyhitchance code F_SHIELD, // this is a shield - use special bodyhitchance code
// v0 = amount to add to shieldblock skillcheck when using
// this.
F_CANBLOCK, // this objcet can block damtype xxx F_CANBLOCK, // this objcet can block damtype xxx
F_DECAY, // v0 = decay level of this object.
// v2 = how much to decay each turn.
F_OBHP, // val0 = object health, val1 = object maxhealth F_OBHP, // val0 = object health, val1 = object maxhealth
F_OBHPDRAIN, // val0 = amt hp to lose each second. val1 = NA or damtype F_OBHPDRAIN, // val0 = amt hp to lose each second. val1 = NA or damtype
// if no damtype specified, it will be DT_DIRECT // if no damtype specified, it will be DT_DIRECT
@ -4123,6 +4139,8 @@ enum FLAG {
// obname must have at least TWO words // obname must have at least TWO words
F_RISEASGHOST, // become a ghost when you die. F_RISEASGHOST, // become a ghost when you die.
F_SEEINDARK, // nightvis range is val0 F_SEEINDARK, // nightvis range is val0
// if v1 is B_BLINDABLE, then bright light will
// blind us.
F_SEEINVIS, // can see invisible things F_SEEINVIS, // can see invisible things
F_SPIDERCLIMB, // lf can climb at 100% success rate, and climbing F_SPIDERCLIMB, // lf can climb at 100% success rate, and climbing
// does not drain their stamina. // does not drain their stamina.

380
io.c
View File

@ -1596,7 +1596,7 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
ot = findot(f->val[0]); ot = findot(f->val[0]);
if (ot) { if (ot) {
enum SPELLSCHOOL school; enum SPELLSCHOOL school;
char spellname[BUFLEN]; char spellname[BUFLEN],source[BUFLEN];
int forcepower; int forcepower;
if (texttospellopts(f->text, "pw:", &forcepower, NULL)) { if (texttospellopts(f->text, "pw:", &forcepower, NULL)) {
@ -1606,9 +1606,9 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
} }
school = getspellschoolknown(lf, ot->id); school = getspellschoolknown(lf, ot->id);
getflagsourcetext(f,source);
msg("^gYou have learned the %s '%s'%s.", msg("^gYou have learned the %s '%s'%s.",
(school == SS_MENTAL) ? "psionic power" : "spell", spellname, (school == SS_MENTAL) ? "psionic power" : "spell", spellname, source);
getflagsourcetext(f));
donesomething = B_TRUE; donesomething = B_TRUE;
} }
} }
@ -1619,7 +1619,7 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
ot = findot(f->val[0]); ot = findot(f->val[0]);
if (ot && (!hasflag(ot->flags, F_NOANNOUNCE))) { if (ot && (!hasflag(ot->flags, F_NOANNOUNCE))) {
char buf[BUFLEN]; char buf[BUFLEN];
char spellname[BUFLEN]; char spellname[BUFLEN],sourcetext[BUFLEN];
int forcepower; int forcepower;
if (texttospellopts(f->text, "pw:", &forcepower, NULL)) { if (texttospellopts(f->text, "pw:", &forcepower, NULL)) {
@ -1628,8 +1628,8 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
getspellname(ot->id, lf, spellname, B_FALSE); getspellname(ot->id, lf, spellname, B_FALSE);
} }
snprintf(buf, BUFLEN, "^gYou have gained the ability '%s'%s.", spellname, getflagsourcetext(f,sourcetext);
getflagsourcetext(f)); snprintf(buf, BUFLEN, "^gYou have gained the ability '%s'%s.", spellname, sourcetext);
msg(buf, ot->name); more(); msg(buf, ot->name); more();
donesomething = B_TRUE; donesomething = B_TRUE;
} }
@ -6145,13 +6145,15 @@ char *makedesc_ob(object_t *o, char *retbuf) {
if (isedible(o)) { if (isedible(o)) {
int basenutr; int basenutr;
flag_t *ff;
basenutr = getnutritionbase(o); basenutr = getnutritionbase(o);
sprintf(buf, "%s edible, and %s %s.\n", sprintf(buf, "%s edible, and %s %s.\n",
OB1(o,"It is","They are"), OB1(o,"It is","They are"),
OB1(o,"is","are each"), OB1(o,"is","are each"),
getfillingname(basenutr)); getfillingname(basenutr));
strncat(retbuf, buf, HUGEBUFLEN); strncat(retbuf, buf, HUGEBUFLEN);
if (hasflagval(o->flags, F_OBHPDRAIN, NA, DT_DECAY, NA, NULL)) { ff = hasflag(o->flags, F_DECAY);
if (ff && (ff->val[2] >= 1)) {
// don't show "it will rot" if it's already rotten (and you know this) // don't show "it will rot" if it's already rotten (and you know this)
if (isrotting(o) && ( (getattrbracket(getattr(player, A_IQ), A_IQ, NULL) >= AT_GTAVERAGE) || getskill(player, SK_COOKING)) ) { if (isrotting(o) && ( (getattrbracket(getattr(player, A_IQ), A_IQ, NULL) >= AT_GTAVERAGE) || getskill(player, SK_COOKING)) ) {
} else { } else {
@ -9654,8 +9656,8 @@ void initgfx(void) {
initcol(C_FLESH, 952, 812, 608); initcol(C_FLESH, 952, 812, 608);
initcol(C_FOG, 812, 808, 728); initcol(C_FOG, 812, 808, 728);
initcol(C_MOSS, 0, 748, 428); initcol(C_MOSS, 0, 748, 428);
initcol(C_CARPET1, 360, 280, 136); initcol(C_CARPET1, 560, 280, 136);
initcol(C_CARPET2, 160, 80, 36); initcol(C_CARPET2, 360, 80, 36);
initcol(C_SMOKE, 250, 250, 300); initcol(C_SMOKE, 250, 250, 300);
initcol(C_WOOD, 384, 244, 64); initcol(C_WOOD, 384, 244, 64);
// dark cols // dark cols
@ -11355,7 +11357,7 @@ void drawstatus(void) {
setcol(statwin, C_YELLOW); setcol(statwin, C_YELLOW);
wprintw(statwin, " Prone"); wprintw(statwin, " Prone");
unsetcol(statwin, C_YELLOW); unsetcol(statwin, C_YELLOW);
} else if (isimmobile(player) && !isdeaf(player)) { } else if (isimmobile(player) && !isdead(player)) {
setcol(statwin, C_RED); setcol(statwin, C_RED);
wprintw(statwin, " Immobile"); wprintw(statwin, " Immobile");
unsetcol(statwin, C_RED); unsetcol(statwin, C_RED);
@ -13190,6 +13192,7 @@ void showlfstats(lifeform_t *lf, int showall) {
} else if (mode == 'e') { } else if (mode == 'e') {
int nfound = 0,luckmod; int nfound = 0,luckmod;
enum LFSIZE racesize,cursize; enum LFSIZE racesize,cursize;
char source[BUFLEN];
x = 0; // override x = 0; // override
// down a line. // down a line.
wattron(mainwin, A_UNDERLINE); wattron(mainwin, A_UNDERLINE);
@ -13270,45 +13273,55 @@ void showlfstats(lifeform_t *lf, int showall) {
// obvious physical effects first. // obvious physical effects first.
f = lfhasknownflag(lf, F_BEINGSTONED); f = lfhasknownflag(lf, F_BEINGSTONED);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s being turning to stone.", you(lf), is(lf)); getflagsourcetext(f, source);
mvwprintw(mainwin, y, 0, "%s %s being turning to stone.%s", you(lf), is(lf), source);
y++; y++;
} }
if (eyesshaded(lf)) { if (eyesshaded(lf)) {
mvwprintw(mainwin, y, 0, "%s eyes are shaded.", your(lf), buf); getflagsourcetext(f, source);
mvwprintw(mainwin, y, 0, "%s eyes are shaded%s.", your(lf), buf, source);
y++; y++;
} }
f = lfhasflag(lf, F_FLAMMABLELF); f = lfhasflag(lf, F_FLAMMABLELF);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s covered in %s.", you(lf), is(lf), f->text); getflagsourcetext(f, source);
mvwprintw(mainwin, y, 0, "%s %s covered in %s.%s", you(lf), is(lf), f->text, source);
y++; y++;
} }
f = hasflag(lf->race->flags, F_SIZE); f = hasflag(lf->race->flags, F_SIZE);
if (f) { if (f) {
getflagsourcetext(f, source);
racesize = f->val[0]; racesize = f->val[0];
} else { } else {
strcpy(source, "");
racesize = SZ_HUMAN; // default racesize = SZ_HUMAN; // default
} }
cursize = getlfsize(lf); cursize = getlfsize(lf);
if (cursize != racesize) { if (cursize != racesize) {
mvwprintw(mainwin, y, 0, "%s body has been magically %s.", your(lf), (cursize > racesize) ? "enlarged" : "shrunken"); mvwprintw(mainwin, y, 0, "%s body has been magically %s.%s", your(lf), (cursize > racesize) ? "enlarged" : "shrunken",
source);
y++; y++;
} }
// show racial effects // show racial effects
if (hasjob(lf, J_PIRATE)) { if (hasjob(lf, J_PIRATE)) {
mvwprintw(mainwin, y, 0, "%s can hold %s liquor well.", you(lf), isplayer(lf) ? "Your" : "its"); mvwprintw(mainwin, y, 0, "%s can hold %s liquor well. (%s)", you(lf), isplayer(lf) ? "Your" : "its",
getsourcetext(FROMJOB));
y++; y++;
mvwprintw(mainwin, y, 0, "%s %s missing one eye.", you(lf), is(lf)); mvwprintw(mainwin, y, 0, "%s %s missing one eye. (%s)", you(lf), is(lf),
getsourcetext(FROMJOB));
y++; y++;
} }
if (hasjob(lf, J_DRUID)) { if (hasjob(lf, J_DRUID)) {
mvwprintw(mainwin, y, 0, "%s spell power is boosted by nearby plants.", isplayer(lf) ? "Your" : "Its"); mvwprintw(mainwin, y, 0, "%s spell power is boosted by nearby plants. (%s)", isplayer(lf) ? "Your" : "Its",
getsourcetext(FROMJOB));
y++; y++;
mvwprintw(mainwin, y, 0, "%s regenerate mana when plants are nearby.", you(lf)); mvwprintw(mainwin, y, 0, "%s regenerate mana when plants are nearby. (%s)", you(lf),
getsourcetext(FROMJOB));
y++; y++;
} }
@ -13391,7 +13404,7 @@ void showlfstats(lifeform_t *lf, int showall) {
lifeform_t *god; lifeform_t *god;
god = findgod(godid); god = findgod(godid);
if (god) { if (god) {
mvwprintw(mainwin, y, 0, "%s is boosting the power of %s %s spells by %d.", mvwprintw(mainwin, y, 0, "%s is boosting the power of %s spells by %d.",
god->race->name, your(lf), mod); god->race->name, your(lf), mod);
y++; y++;
} }
@ -13411,18 +13424,22 @@ void showlfstats(lifeform_t *lf, int showall) {
} }
f = hasflag_real(lf->flags, F_ENHANCESMELL, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_ENHANCESMELL, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s an enhanced sense of smell.", you(lf), isplayer(lf) ? "have" : "has"); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s an enhanced sense of smell.%s", you(lf), isplayer(lf) ? "have" : "has",
source);
y++; y++;
} }
f = lfhasknownflag(lf, F_DISEASEIMMUNE); f = lfhasknownflag(lf, F_DISEASEIMMUNE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s immune to disease.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s immune to disease.%s", you(lf), is(lf), source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_HEAVYBLOW, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_HEAVYBLOW, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
snprintf(buf, BUFLEN,"%s%s attacks knock enemies back.", you(lf), getpossessive(you(lf))); getflagsourcetext(f,source);
snprintf(buf, BUFLEN,"%s%s attacks knock enemies back.%s", you(lf), getpossessive(you(lf)), source);
mvwprintw(mainwin, y, 0, buf); mvwprintw(mainwin, y, 0, buf);
y++; y++;
} }
@ -13438,7 +13455,9 @@ void showlfstats(lifeform_t *lf, int showall) {
} else { // >= 4 } else { // >= 4
strcpy(regenspeed, " extremely quickly"); strcpy(regenspeed, " extremely quickly");
} }
mvwprintw(mainwin, y, 0, "%s regenerate%s health%s.", you(lf),isplayer(lf) ? "" : "s", regenspeed); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s regenerate%s health%s.%s", you(lf),isplayer(lf) ? "" : "s", regenspeed,
source);
y++; y++;
} }
f = lfhasknownflag(lf, F_RESISTMAG); f = lfhasknownflag(lf, F_RESISTMAG);
@ -13469,86 +13488,112 @@ void showlfstats(lifeform_t *lf, int showall) {
} else { // ie. 100 upwards } else { // ie. 100 upwards
strcpy(adjective, "completely"); strcpy(adjective, "completely");
} }
mvwprintw(mainwin, y, 0, "%s %s %s resistant to magic.", you(lf), is(lf), adjective); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s %s resistant to magic.%s", you(lf), is(lf), adjective,source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_FEARLESS, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_FEARLESS, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
wrapprint(mainwin, &y, &x, 0, "%s %s immune to the effects of fear.", you(lf), is(lf)); getflagsourcetext(f,source);
wrapprint(mainwin, &y, &x, 0, "%s %s immune to the effects of fear.%s", you(lf), is(lf));
} }
f = hasflag_real(lf->flags, F_FASTMETAB, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_FASTMETAB, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
wrapprint(mainwin, &y, &x, 0, "%s metabolic rate has been increased. ", your(lf), getpossessive(you(lf))); getflagsourcetext(f,source);
wrapprint(mainwin, &y, &x, 0, "%s metabolic rate has been increased.%s", your(lf), getpossessive(you(lf)),
source);
} }
f = hasflag_real(lf->flags, F_TREMORSENSE, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_TREMORSENSE, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s can 'see' by sensing vibrations around %s.", you(lf), you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s can 'see' by sensing vibrations around %s.%s", you(lf), you(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_SEEINDARK, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_SEEINDARK, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s can see in the dark.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s can see in the dark.%s", you(lf),source);
y++; y++;
if (f->val[1] == B_BLINDABLE) {
mvwprintw(mainwin, y, 0, "Bright lights will blind %s.%s", isplayer(lf) ? "you" : "it",source);
y++;
}
} }
f = hasflag_real(lf->flags, F_SEEINVIS, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_SEEINVIS, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s can see invisible things.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s can see invisible things.%s", you(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_SHADOWED, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_SHADOWED, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s hidden from distant creatures.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s hidden from distant creatures.%s", you(lf), is(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_SPIDERCLIMB, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_SPIDERCLIMB, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s adhesive skin allows %s to climb walls.", your(lf), you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s adhesive skin allows you to climb walls.%s", your(lf), isplayer(lf) ? "you" : "it",
source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_SIXTHSENSE, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_SIXTHSENSE, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s will be warned about nearby enemies.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s will be warned about nearby enemies.%s", you(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_STABILITY, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_STABILITY, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s will not fall on slippery ground.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s will not fall on slippery ground.%s", you(lf),source);
y++; y++;
} }
// only show eating habits if not inherited from race // only show eating habits if not inherited from race
f = hasflag_real(lf->flags, F_CARNIVORE, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_CARNIVORE, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s a carnivore (will not eat non-meat products).", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s a carnivore (will not eat non-meat products).%s", you(lf), is(lf),
source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_VEGETARIAN, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_VEGETARIAN, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s a vegetarian (will not eat meat).", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s a vegetarian (will not eat meat).%s", you(lf), is(lf));
y++; y++;
} }
f = hasflag_real(lf->flags, F_PARTVEGETARIAN, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_PARTVEGETARIAN, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s a part vegetarian (will only eat meat when hungry).", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s a part vegetarian (will only eat meat when hungry).%s", you(lf), is(lf),
source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_VISRANGEMOD, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_VISRANGEMOD, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s vision range has been %s.", your(lf), (f->val[0] > 0) ? "increased" : "decreased"); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s vision range has been %s.%s", your(lf),
(f->val[0] > 0) ? "increased" : "decreased", source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_NIGHTVISRANGEMOD, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_NIGHTVISRANGEMOD, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s night vision range has been %s.", your(lf), (f->val[0] > 0) ? "increased" : "decreased"); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s night vision range has been %s.%s", your(lf),
(f->val[0] > 0) ? "increased" : "decreased", source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_XRAYVIS, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_XRAYVIS, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s can see through walls.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s can see through walls.%s", you(lf), source);
y++; y++;
} }
@ -13558,7 +13603,8 @@ void showlfstats(lifeform_t *lf, int showall) {
f = retflag[i]; f = retflag[i];
m = findmaterial(f->val[0]); m = findmaterial(f->val[0]);
if (m) { if (m) {
mvwprintw(mainwin, y, 0, "%s can see through %s.", you(lf), m->name); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s can see through %s.%s", you(lf), m->name,source);
y++; y++;
} }
} }
@ -13692,8 +13738,9 @@ void showlfstats(lifeform_t *lf, int showall) {
f = retflag[i]; f = retflag[i];
mt = findmaterial(f->val[0]); mt = findmaterial(f->val[0]);
if (mt) { if (mt) {
mvwprintw(mainwin, y, 0, "%s take%s %d%% damage from %s weapons.", you(lf), getflagsourcetext(f,source);
isplayer(lf) ? "" : "s", f->val[1], mt->name); mvwprintw(mainwin, y, 0, "%s take%s %d%% damage from %s weapons.%s", you(lf),
isplayer(lf) ? "" : "s", f->val[1], mt->name,source);
y++; y++;
if (f->val[2] > 0) { if (f->val[2] > 0) {
mvwprintw(mainwin, y, 0, "Touching %s objects will hurt %s (%d dam).", mvwprintw(mainwin, y, 0, "Touching %s objects will hurt %s (%d dam).",
@ -13743,105 +13790,125 @@ void showlfstats(lifeform_t *lf, int showall) {
// show intrinsics // show intrinsics
f = lfhasknownflag(lf, F_ARBOOST); f = lfhasknownflag(lf, F_ARBOOST);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s Armour Rating is being magically %s.", your(lf), (f->val[0] >= 0) ? "boosted" : "reduced"); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s Armour Rating is being magically %s.%s",
your(lf), (f->val[0] >= 0) ? "boosted" : "reduced",source);
y++; y++;
} }
f = lfhasknownflag(lf, F_ATTRSET); f = lfhasknownflag(lf, F_ATTRSET);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s has been modified.", your(lf), getattrname(f->val[0])); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s has been modified.%s", your(lf), getattrname(f->val[0]),source);
y++; y++;
} else { } else {
f = lfhasknownflag(lf, F_ATTRMOD); f = lfhasknownflag(lf, F_ATTRMOD);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s has been %s.", your(lf), getattrname(f->val[0]), (f->val[1] > 0) ? "increased" : "decreased"); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s has been %s.%s", your(lf), getattrname(f->val[0]),
(f->val[1] > 0) ? "increased" : "decreased",source);
y++; y++;
} }
} }
if (lfhasknownflag(lf, F_ANONYMOUS)) { if (lfhasknownflag(lf, F_ANONYMOUS)) {
mvwprintw(mainwin, y, 0, "%s identity is obscured.", your(lf)); mvwprintw(mainwin, y, 0, "%s identity is obscured.%s", your(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_AUTOTANGLE, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_AUTOTANGLE, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s a %d%% chance to automatically entangle enemies.", you(lf), getflagsourcetext(f,source);
isplayer(lf) ? "have" : "has", f->val[0]); mvwprintw(mainwin, y, 0, "%s %s a %d%% chance to automatically entangle enemies.%s", you(lf),
isplayer(lf) ? "have" : "has", f->val[0], source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_AWARENESS, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_AWARENESS, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s can see things which are behind %s.", you(lf), you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s can see things which are behind %s.%s", you(lf), you(lf),
source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_DODGES, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_DODGES, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s will automatically use %s remaining stamina to dodge fatal attacks.", you(lf), your(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s will automatically use %s remaining stamina to dodge fatal attacks.%s", you(lf), your(lf),
source);
y++; y++;
} }
getflags(lf->flags, retflag, &nretflags, F_LEARNBOOST, F_NONE); getflags(lf->flags, retflag, &nretflags, F_LEARNBOOST, F_NONE);
for (i = 0; i < nretflags; i++) { for (i = 0; i < nretflags; i++) {
f = retflag[i]; f = retflag[i];
if (f && f->known) { if (f && f->known) {
mvwprintw(mainwin, y, 0, "%s have a %d%% %s to earned experience points.", you(lf), getflagsourcetext(f,source);
f->val[0], (f->val[0] > 0) ? "bonus" : "penalty"); mvwprintw(mainwin, y, 0, "%s have a %d%% %s to earned experience points.%s", you(lf),
f->val[0], (f->val[0] > 0) ? "bonus" : "penalty",source);
y++; y++;
} }
} }
f = lfhasknownflag(lf, F_MAGICARMOUR); f = lfhasknownflag(lf, F_MAGICARMOUR);
if (f && (f->known)) { if (f && (f->known)) {
getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s protected by %s %s", you(lf), is(lf), mvwprintw(mainwin, y, 0, "%s %s protected by %s %s", you(lf), is(lf),
needan(f->text) ? "an" : "a", f->text); needan(f->text) ? "an" : "a", f->text);
if (isplayer(lf)) { if (isplayer(lf)) {
wprintw(mainwin, " (+%d AR).",f->val[0]); wprintw(mainwin, " (+%d AR).%s",f->val[0],source);
} else { } else {
wprintw(mainwin, "."); wprintw(mainwin, ".%s",source);
} }
y++; y++;
} }
f = lfhasknownflag(lf, F_MAGICBOOST); f = lfhasknownflag(lf, F_MAGICBOOST);
if (f && (f->known)) { if (f && (f->known)) {
int boost; int boost;
getflagsourcetext(f,source);
sumflags(lf->flags, F_MAGICBOOST, &boost, NULL, NULL); sumflags(lf->flags, F_MAGICBOOST, &boost, NULL, NULL);
mvwprintw(mainwin, y, 0, "The power of %s spells is boosted by %d.", mvwprintw(mainwin, y, 0, "The power of %s spells is boosted by %d.%s",
isplayer(lf) ? "your" : "its", boost); isplayer(lf) ? "your" : "its", boost,source);
y++; y++;
} }
f = lfhasknownflag(lf, F_TEMPMAGICBOOST); f = lfhasknownflag(lf, F_TEMPMAGICBOOST);
if (f && (f->known)) { if (f && (f->known)) {
int boost; int boost;
sumflags(lf->flags, F_TEMPMAGICBOOST, &boost, NULL, NULL); sumflags(lf->flags, F_TEMPMAGICBOOST, &boost, NULL, NULL);
mvwprintw(mainwin, y, 0, "The power of %s next spell will be boosted by %d.", getflagsourcetext(f,source);
isplayer(lf) ? "your" : "its", boost); mvwprintw(mainwin, y, 0, "The power of %s next spell will be boosted by %d.%s",
isplayer(lf) ? "your" : "its", boost,source);
y++; y++;
} }
f = lfhasknownflag(lf, F_MINCRITCHANCE); f = lfhasknownflag(lf, F_MINCRITCHANCE);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s attacks are guided by the gods, granting a minimum %d%% criticial hit chance.", getflagsourcetext(f,source);
your(lf), f->val[0]); mvwprintw(mainwin, y, 0, "%s attacks are guided by the gods, granting a minimum %d%% criticial hit chance.%s",
your(lf), f->val[0],source);
y++; y++;
} }
f = lfhasknownflag(lf, F_MINDSHIELD); f = lfhasknownflag(lf, F_MINDSHIELD);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s are protected from psionic attacks.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s are protected from psionic attacks.%s", you(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_MISCASTCHANCE); f = lfhasknownflag(lf, F_MISCASTCHANCE);
if (f && (f->known)) { if (f && (f->known)) {
int chance; int chance;
getflagsourcetext(f,source);
sumflags(lf->flags, F_MISCASTCHANCE, &chance, NULL, NULL); sumflags(lf->flags, F_MISCASTCHANCE, &chance, NULL, NULL);
mvwprintw(mainwin, y, 0, "%s spells have a %d%% chance of failure.", mvwprintw(mainwin, y, 0, "%s spells have a %d%% chance of failure.%s",
isplayer(lf) ? "Your" : "Its", chance); isplayer(lf) ? "Your" : "Its", chance, source);
y++; y++;
} }
f = lfhasflag(lf, F_OMNIPOTENT); f = lfhasflag(lf, F_OMNIPOTENT);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s are omnipotent.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s are omnipotent.%s", you(lf), source);
y++; y++;
} }
if (isblind(lf)) { f = isblind(lf);
mvwprintw(mainwin, y, 0, "%s cannot see.", you(lf)); if (f) {
getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s cannot see.%s", you(lf), source);
y++; y++;
} }
f = lfhasknownflag(lf, F_CHARMEDBY); f = lfhasknownflag(lf, F_CHARMEDBY);
@ -13858,62 +13925,75 @@ void showlfstats(lifeform_t *lf, int showall) {
mvwprintw(mainwin, y, 0, buf); mvwprintw(mainwin, y, 0, buf);
y++; y++;
} }
if (lfhasknownflag(lf, F_BREATHWATER) || lfhasknownflag(lf, F_AQUATIC)) { f = lfhasknownflag(lf, F_BREATHWATER);
mvwprintw(mainwin, y, 0, "%s can breath normally while underwater.", you(lf)); if (!f) f = lfhasknownflag(lf, F_AQUATIC);
if (f) {
getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s can breath normally while underwater.%s", you(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_CONTROL); f = lfhasknownflag(lf, F_CONTROL);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s can control teleportation and polymorphic effects.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s can control teleportation and polymorphic effects.%s", you(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_CONFUSED); f = lfhasknownflag(lf, F_CONFUSED);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s confused.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s confused.%s", you(lf), is(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_CONSUMESOULS); f = lfhasknownflag(lf, F_CONSUMESOULS);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s can consume souls of those who die nearby.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s can consume souls of those who die nearby.%s", you(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_DETECTAURAS); f = lfhasknownflag(lf, F_DETECTAURAS);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s automatically detect blessings or curses.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s automatically detect blessings or curses.%s", you(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_DETECTLIFE); f = lfhasknownflag(lf, F_DETECTLIFE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s automatically detect %snearby lifeforms.", you(lf), getflagsourcetext(f,source);
(f->val[1] == B_TRUE) ? "" : "the size of "); mvwprintw(mainwin, y, 0, "%s automatically detect %snearby lifeforms.%s", you(lf),
(f->val[1] == B_TRUE) ? "" : "the size of ",source);
y++; y++;
} }
f = lfhasknownflag(lf, F_DETECTMAGIC); f = lfhasknownflag(lf, F_DETECTMAGIC);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s automatically detect magical enchantments on objects.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s automatically detect magical enchantments on objects.%s", you(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_DETECTMETAL); f = lfhasknownflag(lf, F_DETECTMETAL);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s automatically detect nearby metal.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s automatically detect nearby metal.%s", you(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_DETECTOBS); f = lfhasknownflag(lf, F_DETECTOBS);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s automatically detect nearby objects.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s automatically detect nearby objects.%s", you(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_ENHANCESEARCH); f = lfhasknownflag(lf, F_ENHANCESEARCH);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s searching ability is enhanced.", you(lf), isplayer(lf) ? "Your" : "Its"); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s searching ability is enhanced.%s", you(lf), isplayer(lf) ? "Your" : "Its",source);
y++; y++;
} }
f = lfhasknownflag(lf, F_DRUNK); f = lfhasknownflag(lf, F_DRUNK);
if (f) { if (f) {
char ddesc[BUFLEN]; char ddesc[BUFLEN];
getflagsourcetext(f,source);
getdrunkdesc(lf, f, ddesc); getdrunkdesc(lf, f, ddesc);
mvwprintw(mainwin, y, 0, "%s %s %s (%s).", you(lf), is(lf), getdrunktext(f), ddesc); mvwprintw(mainwin, y, 0, "%s %s %s (%s).%s", you(lf), is(lf), getdrunktext(f), ddesc,source);
y++; y++;
} }
@ -13958,43 +14038,50 @@ void showlfstats(lifeform_t *lf, int showall) {
} }
getflagsourcetext(f,source);
dicetotext(ndice, nsides, bonus, &min, &max, dicebuf, mmbuf); dicetotext(ndice, nsides, bonus, &min, &max, dicebuf, mmbuf);
if (strcmp(dicebuf, mmbuf)) { if (strcmp(dicebuf, mmbuf)) {
mvwprintw(mainwin, y, 0, "%s deal%s %s (%s) extra %s each hit.", you(lf), mvwprintw(mainwin, y, 0, "%s deal%s %s (%s) extra %s each hit.%s", you(lf),
isplayer(lf) ? "" : "s", dicebuf, mmbuf, damtypebuf); isplayer(lf) ? "" : "s", dicebuf, mmbuf, damtypebuf,source);
} else { } else {
mvwprintw(mainwin, y, 0, "%s deal%s %s extra %s each hit.", you(lf), mvwprintw(mainwin, y, 0, "%s deal%s %s extra %s each hit.%s", you(lf),
isplayer(lf) ? "" : "s", dicebuf, damtypebuf); isplayer(lf) ? "" : "s", dicebuf, damtypebuf,source);
} }
y++; y++;
} }
} }
sumflags(lf->flags, F_EXTRALUCK, &luckmod, NULL, NULL); f = lfhasflag(lf, F_EXTRALUCK);
if (luckmod) { if (f) {
char luckamt[BUFLEN]; sumflags(lf->flags, F_EXTRALUCK, &luckmod, NULL, NULL);
switch (luckmod) { if (luckmod) {
case 1: strcpy(luckamt, "fairly "); break; char luckamt[BUFLEN];
case 2: strcpy(luckamt, "quite "); break; switch (luckmod) {
case 3: strcpy(luckamt, "very "); break; case 1: strcpy(luckamt, "fairly "); break;
case 4: strcpy(luckamt, "extremely "); break; case 2: strcpy(luckamt, "quite "); break;
case 5: case 3: strcpy(luckamt, "very "); break;
default: case 4: strcpy(luckamt, "extremely "); break;
strcpy(luckamt, "incredibly "); break; case 5:
default:
strcpy(luckamt, "incredibly "); break;
}
getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s %slucky.%s", you(lf), is(lf), luckamt,source);
y++;
} }
mvwprintw(mainwin, y, 0, "%s %s %slucky.", you(lf), is(lf), luckamt);
y++;
} }
f = lfhasknownflag(lf, F_EXTRAMP); f = lfhasknownflag(lf, F_EXTRAMP);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "Your mana pool is being boosted.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "Your mana pool is being boosted.%s", you(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_EXTRAINFO); f = lfhasknownflag(lf, F_EXTRAINFO);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s receive enhanced knowledge about the world.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s receive enhanced knowledge about the world.%s", you(lf),source);
y++; y++;
} }
for (f = lf->flags->first ; f ; f = f->next ){ for (f = lf->flags->first ; f ; f = f->next ){
@ -14048,48 +14135,58 @@ void showlfstats(lifeform_t *lf, int showall) {
} }
f = lfhasflag(lf, F_NAUSEATED); f = lfhasflag(lf, F_NAUSEATED);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s nauseated.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s nauseated.%s", you(lf), is(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_HOLYAURA); f = lfhasknownflag(lf, F_HOLYAURA);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s surrounded by a holy aura.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s surrounded by a holy aura.%s", you(lf), is(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_HOLYTOUCH); f = lfhasknownflag(lf, F_HOLYTOUCH);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "Any object %s weild%s will be temporarily blessed.", you(lf), getflagsourcetext(f,source);
isplayer(lf) ? "" : "s"); mvwprintw(mainwin, y, 0, "Any object %s weild%s will be temporarily blessed.%s", you(lf),
isplayer(lf) ? "" : "s",source);
y++; y++;
} }
f = lfhasknownflag(lf, F_HOTFEET); f = lfhasknownflag(lf, F_HOTFEET);
if (f) { if (f) {
msg("%s feet are on fire (%s %s damage per turn stationary)",your(lf), f->val[0], getdamnamenoun(f->val[1])); getflagsourcetext(f,source);
msg("%s feet are on fire (%s %s damage per turn stationary).%s",your(lf), f->val[0],
getdamnamenoun(f->val[1]),source);
} }
f = lfhasknownflag(lf, F_ICESLIDE); f = lfhasknownflag(lf, F_ICESLIDE);
if (f) { if (f) {
msg("%s feet automatically generating sheets of ice.",your(lf)); getflagsourcetext(f,source);
msg("%s feet automatically generating sheets of ice.%s",your(lf),source);
} }
f = lfhasknownflag(lf, F_FREEZINGTOUCH); f = lfhasknownflag(lf, F_FREEZINGTOUCH);
if (f && (f->known)) { if (f && (f->known)) {
getflagsourcetext(f,source);
strcpy(buf,"The next object you touch will turn to solid ice."); strcpy(buf,"The next object you touch will turn to solid ice.");
if (lfhasflag(lf, F_OMNIPOTENT)) { if (lfhasflag(lf, F_OMNIPOTENT)) {
char buf2[BUFLEN]; char buf2[BUFLEN];
snprintf(buf2, BUFLEN, " [%d uses left]", f->val[0]); snprintf(buf2, BUFLEN, " [%d uses left]", f->val[0]);
strcat(buf, buf2); strcat(buf, buf2);
} }
mvwprintw(mainwin, y, 0, buf); mvwprintw(mainwin, y, 0, "%s%s",buf,source);
y++; y++;
} }
f = lfhasflag(lf, F_GRAVBOOSTED); f = lfhasflag(lf, F_GRAVBOOSTED);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "Gravity is increased around %s.", you_l(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "Gravity is increased around %s.%s", you_l(lf),source);
y++; y++;
} }
f = lfhasflag(lf, F_GRAVLESSENED); f = lfhasflag(lf, F_GRAVLESSENED);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "Gravity is lessened around %s, preventing fall damage, increasing flight speed and reducing load.", you_l(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "Gravity is lessened around %s, preventing fall damage, increasing flight speed and reducing load.%s",
you_l(lf),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_FULLSHIELD); f = lfhasknownflag(lf, F_FULLSHIELD);
@ -14098,7 +14195,8 @@ void showlfstats(lifeform_t *lf, int showall) {
char obname[BUFLEN]; char obname[BUFLEN];
sh = hasobid(lf->pack, atol(f->text)); sh = hasobid(lf->pack, atol(f->text));
getobname(sh, obname, 1); getobname(sh, obname, 1);
mvwprintw(mainwin, y, 0, "%s %s fully shielded by %s %s.", you(lf), is(lf), your(lf), obname); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s fully shielded by %s %s.%s", you(lf), is(lf), your(lf), obname,source);
y++; y++;
} }
f = lfhasknownflag(lf, F_HEAVENARM); f = lfhasknownflag(lf, F_HEAVENARM);
@ -14109,119 +14207,139 @@ void showlfstats(lifeform_t *lf, int showall) {
} else { } else {
strcpy(hpbuf, ""); strcpy(hpbuf, "");
} }
mvwprintw(mainwin, y, 0, "%s %s surrounded by a %s. %s", you(lf), is(lf), f->text, hpbuf); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s surrounded by a %s. %s%s", you(lf), is(lf), f->text, hpbuf,source);
y++; y++;
} }
f = lfhasknownflag(lf, F_INVULNERABLE); f = lfhasknownflag(lf, F_INVULNERABLE);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s protected from all physical harm.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s protected from all physical harm.%s", you(lf), is(lf),source);
y++; y++;
} }
f = lfhasflag(lf, F_MAGSHIELD); f = lfhasflag(lf, F_MAGSHIELD);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s surrounded by a magnetic shield.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s surrounded by a magnetic shield.%s", you(lf), is(lf),source);
y++; y++;
} }
f = lfhasflag(lf, F_PAIN); f = lfhasflag(lf, F_PAIN);
if (f && (f->known)) { if (f && (f->known)) {
getflagsourcetext(f,source);
if (lfhasflag(lf, F_DRUNK)) { if (lfhasflag(lf, F_DRUNK)) {
mvwprintw(mainwin, y, 0, "%s %s in extreme pain, somewhat mitigated by %s inebriation.", you(lf), is(lf), isplayer(lf) ? "Your" : "its"); mvwprintw(mainwin, y, 0, "%s %s in extreme pain, somewhat mitigated by %s inebriation.%s", you(lf), is(lf), isplayer(lf) ? "Your" : "its",source);
} else { } else {
mvwprintw(mainwin, y, 0, "%s %s in extreme pain, and movement will cause %s damage.", you(lf), is(lf), isplayer(lf) ? "You" : "it"); mvwprintw(mainwin, y, 0, "%s %s in extreme pain, and movement will cause %s damage.%s", you(lf), is(lf), isplayer(lf) ? "You" : "it",source);
} }
y++; y++;
} }
f = lfhasflag(lf, F_PARALYZED); f = lfhasflag(lf, F_PARALYZED);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s paralyzed.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s paralyzed.%s", you(lf), is(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_PHOTOMEM, NA, NULL, FROMRACE); f = hasflag_real(lf->flags, F_PHOTOMEM, NA, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s do not forget your surroundings.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s do not forget your surroundings.%s", you(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_PLANTFRIEND, NA, NULL, FROMRACE); f = hasflag_real(lf->flags, F_PLANTFRIEND, NA, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "Plants are friendly towards %s.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "Plants are friendly towards %s.%s", you(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_POLYIMMUNE, NA, NULL, FROMRACE); f = hasflag_real(lf->flags, F_POLYIMMUNE, NA, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s cannot be polymorphed.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s cannot be polymorphed.%s", you(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_PROTALIGN, NA, NULL, FROMRACE); f = hasflag_real(lf->flags, F_PROTALIGN, NA, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s protected from attacks by %s-aligned creatures.", you(lf), is(lf), getflagsourcetext(f,source);
getalignmentname(f->val[1])); mvwprintw(mainwin, y, 0, "%s %s protected from attacks by %s-aligned creatures.%s", you(lf), is(lf),
getalignmentname(f->val[1]),source);
y++; y++;
} }
f = lfhasflag(lf, F_RAGE); f = lfhasflag(lf, F_RAGE);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s enraged, gaining accuracy, damage and hit point bonuses.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s enraged, gaining accuracy, damage and hit point bonuses.%s", you(lf), is(lf),source);
y++; y++;
} }
f = lfhasflag(lf, F_REFLECTION); f = lfhasflag(lf, F_REFLECTION);
if (f && (f->known)) { if (f && (f->known)) {
wrapprint(mainwin, &y, &x, 0, "%s %s surrounded by a negative gravity field.", you(lf), is(lf)); getflagsourcetext(f,source);
wrapprint(mainwin, &y, &x, 0, "%s %s surrounded by a negative gravity field.%s", you(lf), is(lf),source);
} }
f = lfhasknownflag(lf, F_TRUESTRIKE); f = lfhasknownflag(lf, F_TRUESTRIKE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s%s attacks will automatically hit.", you(lf), getpossessive(you(lf))); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s%s attacks will automatically hit.%s", you(lf), getpossessive(you(lf)),source);
y++; y++;
} }
f = lfhasknownflag(lf, F_WINDSHIELD); f = lfhasknownflag(lf, F_WINDSHIELD);
if (f) { if (f) {
getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s protected from missiles by a cyclonic shield", you(lf), is(lf)); mvwprintw(mainwin, y, 0, "%s %s protected from missiles by a cyclonic shield", you(lf), is(lf));
if (isplayer(lf)) { if (isplayer(lf)) {
wprintw(mainwin, " (power %d).",roman(f->val[0])); wprintw(mainwin, " (power %d).%s",roman(f->val[0]),source);
} else { } else {
wprintw(mainwin, "."); wprintw(mainwin, ".%s",source);
} }
y++; y++;
} }
f = lfhasflag(lf, F_RISEASGHOST); f = lfhasflag(lf, F_RISEASGHOST);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s will rise as a ghost after death.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s will rise as a ghost after death.%s", you(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_STASIS, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_STASIS, B_TRUE, NULL, FROMRACE);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "Time within your body has been frozen.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "Time within your body has been frozen.%s", you(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_STAMBOOST, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_STAMBOOST, B_TRUE, NULL, FROMRACE);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s stamina is currently being boosted.", your(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s stamina is currently being boosted.%s", your(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_STENCH, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_STENCH, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s %s emitting a foul stench, nauseating those nearby.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s emitting a foul stench, nauseating those nearby.%s", you(lf), is(lf),source);
y++; y++;
} }
f = hasflag_real(lf->flags, F_UNDEAD, B_TRUE, NULL, FROMRACE); f = hasflag_real(lf->flags, F_UNDEAD, B_TRUE, NULL, FROMRACE);
if (f) { if (f) {
mvwprintw(mainwin, y, 0, "%s have been rendered undead.", you(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s have been rendered undead.%s", you(lf),source);
y++; y++;
} }
f = lfhasflag(lf, F_STRIKETOKO); f = lfhasflag(lf, F_STRIKETOKO);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s attacking in a non-lethal manner.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s attacking in a non-lethal manner.%s", you(lf), is(lf),source);
y++; y++;
} }
f = lfhasflag(lf, F_STUNNED); f = lfhasflag(lf, F_STUNNED);
if (f && (f->known)) { if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s stunned and cannot attack, cast spells or use abilities.", you(lf), is(lf)); getflagsourcetext(f,source);
mvwprintw(mainwin, y, 0, "%s %s stunned and cannot attack, cast spells or use abilities.%s", you(lf), is(lf),source);
y++; y++;
} }
} else if (mode == 'i') { } else if (mode == 'i') {

90
lf.c
View File

@ -3737,6 +3737,15 @@ void die(lifeform_t *lf) {
colourmatchob(corpse, lf); colourmatchob(corpse, lf);
} }
// inherit hp
f = hasflag(corpse->flags, F_OBHP);
if (f) {
f->val[0] = lf->maxhp;
f->val[1] = lf->maxhp;
} else {
addflag(corpse->flags, F_OBHP, lf->maxhp, lf->maxhp, NA, NULL);
}
// inherit lifeform knowledge and abilities 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_KNOWSABOUT);
copyflag(corpse->flags, lf->flags, F_HOMEMAP); copyflag(corpse->flags, lf->flags, F_HOMEMAP);
@ -3827,7 +3836,17 @@ void die(lifeform_t *lf) {
// drop head too // drop head too
snprintf(headname, BUFLEN, "%s head",lf->race->name); snprintf(headname, BUFLEN, "%s head",lf->race->name);
headob = addob(corpsecell->obpile, headname); headob = addob(corpsecell->obpile, headname);
colourmatchob(headob, lf); if (headob) {
flag_t *hpflag;
colourmatchob(headob, lf);
hpflag = hasflag(headob->flags, F_OBHP);
if (hpflag) {
hpflag->val[0] = pctof(10, lf->maxhp);
limit(&(hpflag->val[0]), 1, NA);
hpflag->val[1] = hpflag->val[0];
}
}
} }
if (corpse->type->id == OT_BABAYAGAHUT) { if (corpse->type->id == OT_BABAYAGAHUT) {
@ -10257,6 +10276,7 @@ int getallshields(lifeform_t *lf, enum DAMTYPE damtype, object_t **retob, int *c
} }
int getshieldblockmod(lifeform_t *lf, object_t *o) { int getshieldblockmod(lifeform_t *lf, object_t *o) {
flag_t *f;
enum SKILLLEVEL slev = PR_INEPT; enum SKILLLEVEL slev = PR_INEPT;
int othermod = 0; int othermod = 0;
if (isshield(o)) { if (isshield(o)) {
@ -10278,16 +10298,22 @@ int getshieldblockmod(lifeform_t *lf, object_t *o) {
case PR_MASTER: othermod = 16; break; case PR_MASTER: othermod = 16; break;
*/ */
case PR_NOVICE: othermod = 0; break; case PR_NOVICE: othermod = 0; break;
case PR_BEGINNER: othermod = 10; break; case PR_BEGINNER: othermod = 5; break;
case PR_ADEPT: othermod = 20; break; case PR_ADEPT: othermod = 10; break;
case PR_SKILLED: othermod = 30; break; case PR_SKILLED: othermod = 15; break;
case PR_EXPERT: othermod = 40; break; case PR_EXPERT: othermod = 20; break;
case PR_MASTER: othermod = 50; break; case PR_MASTER: othermod = 25; break;
default: default:
// should never happen // should never happen
othermod = -15; othermod = -15;
break; break;
} }
// now modify for shield type
f = hasflag(o->flags, F_SHIELD);
if (f) {
othermod += f->val[0];
}
return othermod; return othermod;
} }
@ -13238,8 +13264,8 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype, enum INJUR
o[1] = getequippedob(lf->pack, BP_LEFTFINGER); o[1] = getequippedob(lf->pack, BP_LEFTFINGER);
fingerbp = BP_LEFTFINGER; fingerbp = BP_LEFTFINGER;
} }
addflag(lf->flags, F_NOBODYPART, bp2, B_FROMINJURY, NA, NULL); addtempflag(lf->flags, F_NOBODYPART, bp2, B_FROMINJURY, NA, NULL, FROMINJURY);
addflag(lf->flags, F_NOBODYPART, fingerbp, B_FROMINJURY, NA, NULL); addtempflag(lf->flags, F_NOBODYPART, fingerbp, B_FROMINJURY, NA, NULL, FROMINJURY);
howlong = PERMENANT; howlong = PERMENANT;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
if (o[i]) { if (o[i]) {
@ -13285,8 +13311,7 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype, enum INJUR
object_t *o; object_t *o;
addob(lf->cell->obpile, "severed finger"); addob(lf->cell->obpile, "severed finger");
o = getequippedob(lf->pack, bp2); o = getequippedob(lf->pack, bp2);
addflag(lf->flags, F_NOBODYPART, bp2, B_FROMINJURY, NA, NULL); addtempflag(lf->flags, F_NOBODYPART, bp2, B_FROMINJURY, NA, NULL,FROMINJURY);
howlong = PERMENANT;
if (o) { if (o) {
char obname[BUFLEN]; char obname[BUFLEN];
if (isplayer(lf)) { if (isplayer(lf)) {
@ -13412,7 +13437,7 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype, enum INJUR
killflagsofid(lf->flags, F_FLYING); killflagsofid(lf->flags, F_FLYING);
break; break;
case IJ_WINGDESTROYED: case IJ_WINGDESTROYED:
addflag(lf->flags, F_NOBODYPART, BP_WINGS, B_FROMINJURY, NA, NULL); addtempflag(lf->flags, F_NOBODYPART, BP_WINGS, B_FROMINJURY, NA, NULL,FROMINJURY);
break; break;
case IJ_WINDED: case IJ_WINDED:
lf->stamina = 0; lf->stamina = 0;
@ -13541,9 +13566,12 @@ int lfproduceslight(lifeform_t *lf, object_t **fromwhat) {
int lighthurtseyes(lifeform_t *lf) { int lighthurtseyes(lifeform_t *lf) {
// note: if you don't have eyes, your'e safe! // note: if you don't have eyes, your'e safe!
if (lfhasflag(lf, F_SEEINDARK) && !isblind(lf) && if (!isblind(lf) && !lfhasflagval(lf, F_NOBODYPART, BP_EYES, NA, NA, NULL)) {
!lfhasflagval(lf, F_NOBODYPART, BP_EYES, NA, NA, NULL)) { flag_t *f;
return B_TRUE; f = lfhasflag(lf, F_SEEINDARK);
if (f && (f->val[1] == B_BLINDABLE)) {
return B_TRUE;
}
} }
return B_FALSE; return B_FALSE;
} }
@ -14138,24 +14166,26 @@ int isbleeding(lifeform_t *lf) {
} }
int isblind(lifeform_t *lf) { flag_t *isblind(lifeform_t *lf) {
flag_t *f; flag_t *f;
if (!lf) return B_FALSE; if (!lf) return NULL;
f = lfhasflag(lf, F_ASLEEP); f = lfhasflag(lf, F_ASLEEP);
if (f && (f->val[1] != ST_MEDITATING)) { if (f && (f->val[1] != ST_MEDITATING)) {
return B_TRUE; return f;
} }
if (lfhasflag(lf, F_BLIND)) { f = lfhasflag(lf, F_BLIND);
return B_TRUE; if (f) {
return f;
} }
if (lfhasflagval(lf, F_NOBODYPART, BP_EYES, NA, NA, NULL)) { f = lfhasflagval(lf, F_NOBODYPART, BP_EYES, NA, NA, NULL);
if (f) {
if (!lfhasflag(lf, F_TREMORSENSE)) { if (!lfhasflag(lf, F_TREMORSENSE)) {
return B_TRUE; return f;
} }
} }
return B_FALSE; return NULL;
} }
enum BURDENED isburdened(lifeform_t *lf) { enum BURDENED isburdened(lifeform_t *lf) {
@ -18272,8 +18302,15 @@ int noise(cell_t *c, lifeform_t *noisemaker, enum NOISECLASS nclass, int volume,
} }
if (targlf && (targlf->cell)) { // ie. not swapping places if (targlf && (targlf->cell)) { // ie. not swapping places
if (getcelldist(l->cell, c) < getcelldist(l->cell, targlf->cell)) { if (getcelldist(l->cell, c) < getcelldist(l->cell, targlf->cell)) {
if ((myvol >= 4) && onein(2)) { if ((myvol >= SV_SHOUT)) {
willrespond = B_TRUE; if ((nclass != NC_ENVIRONMENTAL) && (nclass != NC_MOVEMENT)) {
int chance;
chance = 40;
chance += (20*(myvol - SV_SHOUT));
if (pctchance(chance)) {
willrespond = B_TRUE;
}
}
} }
} }
} else { } else {
@ -23245,11 +23282,14 @@ void startlfturn(lifeform_t *lf) {
amt = obproduceslight(o); amt = obproduceslight(o);
if (amt) { if (amt) {
if (lighthurtseyes(lf)) { if (lighthurtseyes(lf)) {
int min=2,max;
if (isplayer(lf)) { if (isplayer(lf)) {
msg("The bright light burns your vision-enhanced eyes!"); msg("The bright light burns your vision-enhanced eyes!");
} }
// blind for 2+ turns // blind for 2+ turns
addtempflag(lf->flags, F_BLIND, B_TRUE, NA, NA, NULL, rnd(2,2+amt)); max = (amt/2);
limit(&max, min+1,NA);
addtempflag(lf->flags, F_BLIND, B_TRUE, NA, NA, NULL, rnd(2,max));
} }
if (isvulnto(lf->flags, DT_LIGHT, B_FALSE)) { if (isvulnto(lf->flags, DT_LIGHT, B_FALSE)) {
int dam; int dam;

2
lf.h
View File

@ -357,7 +357,7 @@ int isaquatic(lifeform_t *lf);
flag_t *isasleep(lifeform_t *lf); flag_t *isasleep(lifeform_t *lf);
int isbehind(lifeform_t *lf, lifeform_t *otherlf); int isbehind(lifeform_t *lf, lifeform_t *otherlf);
int isbleeding(lifeform_t *lf); int isbleeding(lifeform_t *lf);
int isblind(lifeform_t *lf); flag_t *isblind(lifeform_t *lf);
enum BURDENED isburdened(lifeform_t *lf); enum BURDENED isburdened(lifeform_t *lf);
int ischarmable(lifeform_t *lf); int ischarmable(lifeform_t *lf);
int isclimbing(lifeform_t *lf); int isclimbing(lifeform_t *lf);

90
map.c
View File

@ -982,8 +982,8 @@ void adjustcellglyph(cell_t *c, glyph_t *g, enum CELLADJUSTTYPE how) {
for (i = D_N; i <= D_W; i++) { for (i = D_N; i <= D_W; i++) {
int this; int this;
c2 = getcellindir(c,i); c2 = getcellindir(c,i);
//if (c2 && c2->known && ((c2->type->id == c->type->id) || hasdoor(c2)) ) { if (c2 && c2->known && ((c2->type->id == c->type->id) || hasdoor(c2)) ) {
if (c2 && c2->known && (issolid(c2) || hasdoor(c2)) ) { //if (c2 && c2->known && (issolid(c2) || hasdoor(c2)) ) {
this = 1; this = 1;
// we want: // we want:
// N E S W // N E S W
@ -1630,6 +1630,24 @@ int cellokforreachability(cell_t *startcell, cell_t *c, int srcroomid, int dir,
return B_MAYBE; return B_MAYBE;
} }
enum CELLTYPE celltypefromvault(cell_t *c) {
vault_t *v;
enum FLAG lookfor;
v = getcellvault(c);
if (v) {
flag_t *f;
if (issolid(c)) {
lookfor = F_CELLTYPESOLID;
} else {
lookfor = F_CELLTYPEEMPTY;
}
f = hasflag(v->flags, F_CELLTYPESOLID);
if (f) return B_TRUE;
}
return B_FALSE;
}
// kill everything in the given cell (lifeforms && objects) // kill everything in the given cell (lifeforms && objects)
// but DONT remove the cell itself. // but DONT remove the cell itself.
void clearcell(cell_t *c) { void clearcell(cell_t *c) {
@ -2508,6 +2526,41 @@ int fix_reachability(map_t *m) {
//raise(SIGINT); //raise(SIGINT);
return B_TRUE; return B_TRUE;
} }
// change floor/wall type in the unreachable area, for variety
if (m->habitat->id == H_DUNGEON) {
enum CELLTYPE cursol, curemp, newsol,newemp;
// get current wall type
cursol = getmapsolid(m);
curemp = getmapempty(m);
newsol = cursol;
newemp = curemp;
// select new wall/floor types
selectcelltypes(m,100, 100, &newsol,&newemp);
// change all solid walls adjacent to the unreachable area to this type
for (i = 0; i < nunreach; i++) {
int dir;
// note: we know that all unreachcell[] entries will
// be non-solid
if (!celltypefromvault(unreachcell[i]) &&
(unreachcell[i]->type->id == curemp) ) {
// chance floor style
setcelltype(unreachcell[i], newemp);
}
// check for surrounding walls
for (dir = DC_N; dir <= DC_NW; dir++) {
cell_t *c2;
c2 = getcellindir(unreachcell[i], dir);
if (c2 && issolid(c2) && !celltypefromvault(c2) &&
!cellisfixedvaultwall(c2)) {
if (c2->type->id == cursol) {
// chance wall style
setcelltype(c2, newsol);
}
}
}
}
}
// now run the test again. // now run the test again.
// 'c' will be where the next flood will will happen. // 'c' will be where the next flood will will happen.
@ -2828,6 +2881,7 @@ enum CELLTYPE getcellempty(cell_t *c) {
return c->habitat->emptycelltype; return c->habitat->emptycelltype;
} }
enum CELLTYPE getcellsolid(cell_t *c) { enum CELLTYPE getcellsolid(cell_t *c) {
flag_t *f; flag_t *f;
vault_t *v; vault_t *v;
@ -2867,6 +2921,7 @@ int getmidtemp(enum TEMPERATURE temp) {
enum DEPTH getcellwaterdepth(cell_t *c, lifeform_t *lf) { enum DEPTH getcellwaterdepth(cell_t *c, lifeform_t *lf) {
object_t *o; object_t *o;
if (!c) return DP_NONE;
o = hasobwithflag(c->obpile, F_DEEPWATER); o = hasobwithflag(c->obpile, F_DEEPWATER);
if (o) { if (o) {
return getobdepth(o, lf); return getobdepth(o, lf);
@ -4775,9 +4830,16 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex
failed = B_TRUE; failed = B_TRUE;
while (failed) { while (failed) {
while (failed) { while (failed) {
enum CELLTYPE sol = CT_NONE,emp = CT_NONE;
failed = B_FALSE; failed = B_FALSE;
selectcelltypes(map); selectcelltypes(map,20, 20,&sol,&emp);
if (sol != CT_NONE) {
addflag(map->flags, F_CELLTYPESOLID, sol, NA, NA, NULL);
}
if (emp != CT_NONE) {
addflag(map->flags, F_CELLTYPEEMPTY, emp, NA, NA, NULL);
}
// create initial map cells (they will be solid) // create initial map cells (they will be solid)
for (y = 0; y < map->h; y++) { for (y = 0; y < map->h; y++) {
@ -10127,36 +10189,38 @@ int remove_smallrooms(map_t *m) {
return nremoved; return nremoved;
} }
void selectcelltypes(map_t *map) { void selectcelltypes(map_t *map, int solchance, int empchance, enum CELLTYPE *sol, enum CELLTYPE *emp) {
*sol = CT_NONE;
*emp = CT_NONE;
if (map->habitat->id == H_DUNGEON) { if (map->habitat->id == H_DUNGEON) {
// random chance of different wall type // random chance of different wall type
if (onein(6)) { if (pctchance(solchance)) {
switch (rnd(1,3)) { switch (rnd(1,3)) {
case 1: case 1:
addflag(map->flags, F_CELLTYPESOLID, CT_WALLBRICK, NA, NA, NULL); *sol = CT_WALLBRICK;
break; break;
case 2: case 2:
addflag(map->flags, F_CELLTYPESOLID, CT_WALLMETAL, NA, NA, NULL); *sol = CT_WALLMETAL;
break; break;
case 3: case 3:
addflag(map->flags, F_CELLTYPESOLID, CT_WALLWOOD, NA, NA, NULL); *sol = CT_WALLWOOD;
break; break;
} }
} }
// random chance of different floor type // random chance of different floor type
if (onein(6)) { if (pctchance(empchance)) {
switch (rnd(1,4)) { switch (rnd(1,4)) {
case 1: case 1:
addflag(map->flags, F_CELLTYPEEMPTY, CT_FLOORCARPET, NA, NA, NULL); *emp = CT_FLOORCARPET;
break; break;
case 2: case 2:
addflag(map->flags, F_CELLTYPEEMPTY, CT_FLOORTILE, NA, NA, NULL); *emp = CT_FLOORTILE;
break; break;
case 3: case 3:
addflag(map->flags, F_CELLTYPEEMPTY, CT_FLOORWOOD, NA, NA, NULL); *emp = CT_FLOORWOOD;
break; break;
case 4: case 4:
addflag(map->flags, F_CELLTYPEEMPTY, CT_DIRT, NA, NA, NULL); *emp = CT_DIRT;
break; break;
} }
} }

3
map.h
View File

@ -20,6 +20,7 @@ int cellisfixedvaultwall(cell_t *c);
int cellmeetscondition(cell_t *c, enum CELLCONDITION cond, int arg, int value); int cellmeetscondition(cell_t *c, enum CELLCONDITION cond, int arg, int value);
int cellmeets(cell_t *c, condset_t *cs); int cellmeets(cell_t *c, condset_t *cs);
int cellokforreachability(cell_t *startcell, cell_t *c, int srcroomid, int dir, int wantfilled, int *insameroom, char *why); int cellokforreachability(cell_t *startcell, cell_t *c, int srcroomid, int dir, int wantfilled, int *insameroom, char *why);
enum CELLTYPE celltypefromvault(cell_t *c);
void clearcell(cell_t *c); void clearcell(cell_t *c);
void clearcell_exceptflags(cell_t *c, ...); void clearcell_exceptflags(cell_t *c, ...);
int delve(map_t *map, int neighbourmin, int neighbourmax, int connchance, int chancepct, int newneighbourmin, int newneighbourmax, int newconnchance, enum CELLTYPE empty, enum CELLTYPE solid); int delve(map_t *map, int neighbourmin, int neighbourmax, int connchance, int chancepct, int newneighbourmin, int newneighbourmax, int newconnchance, enum CELLTYPE empty, enum CELLTYPE solid);
@ -206,7 +207,7 @@ enum RACE parserace(char *name, flagpile_t *wantflags, condset_t *cs, enum JOB *
int remove_deadends(map_t *m, int howmuch); int remove_deadends(map_t *m, int howmuch);
int remove_baddoors(map_t *m); int remove_baddoors(map_t *m);
int remove_smallrooms(map_t *m); int remove_smallrooms(map_t *m);
void selectcelltypes(map_t *map); void selectcelltypes(map_t *map, int solchance, int empchance, enum CELLTYPE *sol, enum CELLTYPE *emp);
void set_scanned_glyph(int targettype, void *what, char *descappend, char *desc, glyph_t *glyph); void set_scanned_glyph(int targettype, void *what, char *descappend, char *desc, glyph_t *glyph);
void setcellknown(cell_t *cell, int forcelev); void setcellknown(cell_t *cell, int forcelev);
void setcellknownradius(cell_t *centre, int forcelev, int radius, int dirtype); void setcellknownradius(cell_t *centre, int forcelev, int radius, int dirtype);

View File

@ -1048,6 +1048,28 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
} }
ot = findot(OT_PORTAL); ot = findot(OT_PORTAL);
} else if (strstarts(p, "generator \"")) {
char *pp;
char tempbuf[BUFLEN];
char whattomake[BUFLEN];
int radius,pct;
pp = p + strlen("generator \"");
pp = readuntil(tempbuf, pp, ',');
if (pp) strcpy(whattomake, tempbuf);
else return NULL;
pp = readuntil(tempbuf, pp, ',');
if (pp) radius = atoi(tempbuf);
else return NULL;
pp = readuntil(tempbuf, pp, '"');
if (pp) pct = atoi(tempbuf);
else return NULL;
addflag(wantflags, F_GENERATES, pct, radius, NA, whattomake);
ot = findot(OT_GENERATOR);
} else if (strstarts(p, "sign ")) { } else if (strstarts(p, "sign ")) {
char *pp; char *pp;
pp = strchr(p, '\"'); pp = strchr(p, '\"');
@ -2937,12 +2959,6 @@ void applyobmod(object_t *o, obmod_t *om) {
} }
if (om->id == OM_FROZEN) { if (om->id == OM_FROZEN) {
// frozen things don't decay...
//f = hasflagval(o->flags, F_OBHPDRAIN, NA, DT_DECAY, NA, NULL);
//if (f) {
// killflag(f);
//}
// ...but they do melt! // ...but they do melt!
f = addtempflag(o->flags, F_OBHPDRAIN, 1, DT_MELT, NA, NULL, FROMOBMOD); f = addtempflag(o->flags, F_OBHPDRAIN, 1, DT_MELT, NA, NULL, FROMOBMOD);
@ -3573,6 +3589,23 @@ void damageallobs(object_t *srcob, obpile_t *op, int howmuch, int damtype, lifef
} }
} }
void dodecay(object_t *o) {
flag_t *decayflag;
decayflag = hasflag(o->flags, F_DECAY);
if (!decayflag || (decayflag->val[2] <= 0) ) return;
if (isrotting(o)) {
// if food is rotting, then actually damage it.
takedamage(o, decayflag->val[2], DT_DECAY, NULL);
} else {
// increase decay level
decayflag->val[0] += decayflag->val[2];
addflag(o->flags, F_LASTDAMTYPE, DT_DECAY, NA, NA, NULL);
}
}
// returns TRUE if something happened // returns TRUE if something happened
int doobdieconvert(object_t *o, int wantannounce) { int doobdieconvert(object_t *o, int wantannounce) {
flag_t *f; flag_t *f;
@ -8154,14 +8187,21 @@ int isreadable(object_t *o) {
} }
int isrotting(object_t *o) { int isrotting(object_t *o) {
//int max;
flag_t *f;
if (hasflag(o->flags, F_TAINTED)) { if (hasflag(o->flags, F_TAINTED)) {
return B_TRUE; return B_TRUE;
} }
if (!iscorpse(o)) return B_FALSE; if (!iscorpse(o)) return B_FALSE;
if (getobhppct(o) < 25) {
//getobhp(o, &max);
f = hasflag(o->flags, F_DECAY);
if (f && (f->val[0] >= 50)) {
// ie. food starts to be destroyed completely after 50 turns.
return B_TRUE; return B_TRUE;
} }
return B_FALSE; return B_FALSE;
} }
@ -10802,7 +10842,7 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
addflag(o->flags, F_OBHPDRAIN, 1, NA, NA, NULL); addflag(o->flags, F_OBHPDRAIN, 1, NA, NA, NULL);
addflag(o->flags, F_EXPLODEONDEATH, NA, 1, NA, "10d2"); addflag(o->flags, F_EXPLODEONDEATH, NA, 1, NA, "10d2");
addflag(o->flags, F_OBHP, n, n, NA, NULL); addflag(o->flags, F_OBHP, n, n, NA, NULL);
addflag(lastot->flags, F_MAKESNOISE, 33, SV_TALK, NA, "something sparking."); addflag(lastot->flags, F_MAKESNOISE, 33, SV_SHOUT, NC_DANGER, "something sparking.");
break; break;
case 'i': case 'i':
msg("\"SCAN & IDENTIFY ROUTINE INITIATED.\""); msg("\"SCAN & IDENTIFY ROUTINE INITIATED.\"");
@ -13582,7 +13622,7 @@ int sethiddenname(objecttype_t *ot, char *text) {
} }
if (strstr(text, "humming")) { if (strstr(text, "humming")) {
addflag(ot->flags, F_MAKESNOISE, 20, 2, NA, "humming."); addflag(ot->flags, F_MAKESNOISE, 20, 2, NC_ENVIRONMENTAL, "humming.");
} }
setcolfromhiddenname(ot->flags, text, ot->obclass->glyph.ch); setcolfromhiddenname(ot->flags, text, ot->obclass->glyph.ch);
@ -14250,12 +14290,27 @@ int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce, lif
if (!hpflag || (hpflag->val[0] <= 0)) { if (!hpflag || (hpflag->val[0] <= 0)) {
// special cases.... // special cases....
if (damtype == DT_FIRE) { if (damtype == DT_FIRE) {
if ((o->material->id == MT_FLESH) && onein(3)) { // fire sometimes roasts flesh if ((o->material->id == MT_FLESH) && onein(2)) { // fire sometimes roasts flesh
object_t *meat; object_t *meat;
flag_t *ff;
meat = addob(o->pile, "chunk of roast meat"); meat = addob(o->pile, "chunk of roast meat");
// purposely don't use getweight! // purposely don't use getweight!
meat->weight = o->weight; meat->weight = o->weight;
copyflag(meat->flags, o->flags, F_CORPSEOF); copyflag(meat->flags, o->flags, F_CORPSEOF);
ff = hasflag(o->flags, F_OBHP);
if (ff) {
killflagsofid(meat->flags, F_OBHP);
addflag(meat->flags, F_OBHP, ff->val[1], ff->val[1], NA, NULL);
}
if (hasflag(o->flags, F_DECAY)) {
copyflag(meat->flags, o->flags, F_OBHP);
ff = hasflag(meat->flags, F_DECAY);
if (ff) {
ff->val[2] = 0;
}
}
copyflag(meat->flags, o->flags, F_TAINTED);
} }
} }
@ -14698,13 +14753,16 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
for (oo = where->obpile->first ; oo ; oo = oo->next) { for (oo = where->obpile->first ; oo ; oo = oo->next) {
if ((oo->type->obclass->id == OC_CORPSE) && !hasflag(oo->flags, F_SALTED)) { if ((oo->type->obclass->id == OC_CORPSE) && !hasflag(oo->flags, F_SALTED)) {
flag_t *decayflag; flag_t *decayflag;
decayflag = hasflagval(oo->flags, F_OBHPDRAIN, NA, DT_DECAY, NA, NULL); decayflag = hasflag(oo->flags, F_DECAY);
if (haslos(player, srcloc)) { if (haslos(player, srcloc)) {
char corpsename[BUFLEN]; char corpsename[BUFLEN];
getobname(oo, corpsename, oo->amt); getobname(oo, corpsename, oo->amt);
msg("%s %s covered in salt!", corpsename, (amt == 1) ? "is" : "are"); msg("%s %s covered in salt!", corpsename, (amt == 1) ? "is" : "are");
} }
killflag(decayflag); if (decayflag) {
// stop decaying.
decayflag->val[2] = 0;
}
addflag(oo->flags, F_SALTED, B_TRUE, NA, NA, NULL); addflag(oo->flags, F_SALTED, B_TRUE, NA, NA, NULL);
donesalt = B_TRUE; donesalt = B_TRUE;
} }
@ -15516,7 +15574,7 @@ void timeeffectsob(object_t *o) {
// these are generally just to notify the player that something // these are generally just to notify the player that something
// is nearby, so don't make noises the the player is already there. // is nearby, so don't make noises the the player is already there.
if (location != player->cell) { if (location != player->cell) {
noise(location, NULL, NC_OTHER, f->val[1], f->text, NULL); noise(location, NULL, f->val[2], f->val[1], f->text, NULL);
} }
} }
} }
@ -16002,7 +16060,7 @@ void timeeffectsob(object_t *o) {
// it will make them hot, and then they'll get dropped. the idea // it will make them hot, and then they'll get dropped. the idea
// with weapons is that only the blade is on fire. // with weapons is that only the blade is on fire.
} else { } else {
takedamage(o, 2, DT_FIRE, NULL); // TODO: don't hardcode takedamage(o, rnd(2,4), DT_FIRE, NULL); // TODO: don't hardcode
if (hasflag(o->flags, F_DEAD)) return; if (hasflag(o->flags, F_DEAD)) return;
} }
} }

View File

@ -52,6 +52,7 @@ int countobswithflagval(obpile_t *op, enum FLAG flagid, int val0, int val1, int
int countnoncosmeticobs(obpile_t *op, int onlyifknown, int includetrails); int countnoncosmeticobs(obpile_t *op, int onlyifknown, int includetrails);
int curseob(object_t *o); int curseob(object_t *o);
void damageallobs(object_t *srcob, obpile_t *op, int howmuch, int damtype, lifeform_t *srclf); void damageallobs(object_t *srcob, obpile_t *op, int howmuch, int damtype, lifeform_t *srclf);
void dodecay(object_t *o);
int doobdieconvert(object_t *o, int wantannounce); int doobdieconvert(object_t *o, int wantannounce);
int doobtraps(object_t *o, lifeform_t *lf); int doobtraps(object_t *o, lifeform_t *lf);
void dumpobrarity(void); void dumpobrarity(void);

2
save.c
View File

@ -1173,7 +1173,7 @@ int saveobtobones(object_t *o, FILE *f, int x, int y) {
if (onein(4)) return B_TRUE; if (onein(4)) return B_TRUE;
// modify the object? // modify the object?
if (hasflagval(o->flags, F_OBHPDRAIN, NA, DT_DECAY, NA, NULL)) { if (hasflag(o->flags, F_DECAY)) {
// food will decay by the time someone else finds it. // food will decay by the time someone else finds it.
return B_TRUE; return B_TRUE;
} }

42
spell.c
View File

@ -3802,7 +3802,8 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
} else { } else {
rarity = 0; rarity = 0;
} }
difficulty = 90 + (rarity*10); if (rarity == NA) rarity = RR_COMMON;
difficulty = 120 + (rarity*10);
/* /*
switch (o->type->obclass->id) { switch (o->type->obclass->id) {
case OC_SCROLL: case OC_SCROLL:
@ -5747,7 +5748,21 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
return B_TRUE; return B_TRUE;
} }
for (i = 0; i < power; i++) { for (i = 0; i < power; i++) {
ot = getrandomobofclass(OC_FOOD, NA, NA, NULL, NULL); int pickagain = B_TRUE;
flag_t *f;
while (pickagain) {
ot = getrandomobofclass(OC_FOOD, NA, NA, NULL, NULL);
if (hasflag(ot->flags, F_VENOMSAC)) {
pickagain = B_TRUE;
continue;
}
f = hasflag(ot->flags, F_EDIBLE);
if (!f || (f->val[1] <= 5)) {
pickagain = B_TRUE;
continue;
}
}
o = addobfast(targcell->obpile, ot->id); o = addobfast(targcell->obpile, ot->id);
if (i == 0) { if (i == 0) {
getobname(o, obname, o->amt); getobname(o, obname, o->amt);
@ -6332,7 +6347,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
} }
// use direct damage rather than holy, because otherwise it might be increased // use direct damage rather than holy, because otherwise it might be increased
// due to vulnerabilities // due to vulnerabilities
losehp(target, roll("2d3"), DT_DIRECT, caster, "disruption"); losehp(target, roll("3d6" + power), DT_DIRECT, caster, "disruption");
} else if (spellid == OT_S_DISORIENT) { } else if (spellid == OT_S_DISORIENT) {
target = targcell->lf; target = targcell->lf;
@ -10017,7 +10032,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
int radius; int radius;
// at power 3, you can control where the light appears // at power 3, you can control where the light appears
// at power 8, increase illumination of entire map too! // at power 5, also increase illumination of entire map too!
if (power >= 3) { if (power >= 3) {
// TODO: this actually means we can cast it through walls!!! // TODO: this actually means we can cast it through walls!!!
if (!validatespellcell(caster, &targcell,TT_NONE, spellid, power, frompot)) return B_TRUE; if (!validatespellcell(caster, &targcell,TT_NONE, spellid, power, frompot)) return B_TRUE;
@ -10036,7 +10051,11 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
} }
if (haslos(player, targcell)) { if (haslos(player, targcell)) {
msg("The area is lit by a magical light!"); if (power < 5) {
msg("A magical light appears!");
} else {
msg("The area is lit by a magical light!");
}
if (seenbyplayer) *seenbyplayer = B_TRUE; if (seenbyplayer) *seenbyplayer = B_TRUE;
} }
@ -10874,8 +10893,9 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
f = hasflag(o->flags, F_OBHP); f = hasflag(o->flags, F_OBHP);
if (f) { if (f) {
f->val[0] = f->val[1]; f->val[0] = f->val[1];
f = hasflagval(o->flags, F_OBHPDRAIN, NA, DT_DECAY, NA, NULL); f = hasflag(o->flags, F_DECAY);
if (f) { if (f) {
f->val[2] = 0;
killflag(f); killflag(f);
donesomething = B_TRUE; donesomething = B_TRUE;
ndone++; ndone++;
@ -12791,9 +12811,9 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
swapplaces(caster, target, B_CHANGEDIR, B_NOCHANGEDIR, B_ONPURPOSE); swapplaces(caster, target, B_CHANGEDIR, B_NOCHANGEDIR, B_ONPURPOSE);
} else if (spellid == OT_S_VENTRILOQUISM) { } else if (spellid == OT_S_VENTRILOQUISM) {
if (isplayer(caster)) { if (isplayer(caster)) {
noise(targcell, NULL, NC_OTHER, SV_SHOUT, "your voice shouting", "You hear your voice shouting."); noise(targcell, NULL, NC_OTHER, SV_TALK+power, "your voice shouting", "You hear your voice shouting.");
} else { } else {
noise(targcell, NULL, NC_OTHER, SV_SHOUT, "shouting", "You hear shouting."); noise(targcell, NULL, NC_OTHER, SV_TALK+power, "shouting", "You hear shouting.");
} }
} else if ((spellid == OT_S_SUMMONANIMALSSM) || } else if ((spellid == OT_S_SUMMONANIMALSSM) ||
(spellid == OT_S_SUMMONANIMALSMD) || (spellid == OT_S_SUMMONANIMALSMD) ||
@ -14296,10 +14316,8 @@ char *getspellname(enum OBTYPE spellid, lifeform_t *lf, char *buf, int forcepowe
strcat(buf, "(enhanced)"); strcat(buf, "(enhanced)");
} }
} else if (spellid == OT_S_LIGHT) { } else if (spellid == OT_S_LIGHT) {
if (power >= 8) { if (power >= 5) {
strcat(buf, "(perm,ctrl,blind)"); strcat(buf, "(ctrl,entire-lev)");
} else if (power >= 5) {
strcat(buf, "(ctrl,blind)");
} else if (power >= 3) { } else if (power >= 3) {
strcat(buf, "(ctrl)"); strcat(buf, "(ctrl)");
} }

53
text.c
View File

@ -1233,27 +1233,52 @@ char *getfillingname(int nutrition) {
return "of zero nutritional substance"; return "of zero nutritional substance";
} }
char *getsourcetext(int src) {
switch (src) {
case FROMSKILL: return "skill perk";
case FROMJOB: return "job perk";
case FROMINJURY: return "from injury";
case FROMGODGIFT: return "god gift";
case FROMGODPIETY: return "piety bonus";
case FROMSPELL: return "from spell";
case FROMABIL: return "from ability";
default: break;
}
return "";
}
char *getflagsourcetext(flag_t *f, char *buf) {
char *getflagsourcetext(flag_t *f) { char obname[BUFLEN];
char action[BUFLEN];
strcpy(buf, "");
if (f->pile->owner && !isplayer(f->pile->owner)) return buf;
switch (f->lifetime) { switch (f->lifetime) {
case FROMSKILL: return " (skill perk)"; case FROMSKILL:
case FROMJOB: return " (job perk)"; case FROMJOB:
case FROMGODGIFT:
case FROMGODPIETY:
case FROMSPELL:
case FROMABIL:
case FROMINJURY:
sprintf(buf," (%s)",getsourcetext(f->lifetime));
break;
case FROMOBEQUIP: case FROMOBEQUIP:
case FROMOBHOLD: case FROMOBHOLD:
case FROMOBACTIVATE: case FROMOBACTIVATE:
return " (conferred perk)"; if (f->lifetime == FROMOBEQUIP) strcpy(action, "equipping");
case FROMGODGIFT: else if (f->lifetime == FROMOBEQUIP) strcpy(action, "holding");
return " (god gift)"; else strcpy(action, "activating");
case FROMGODPIETY:
return " (piety bonus)"; if (f->pile->ob) {
case FROMSPELL: getobname(f->pile->ob, obname, f->pile->ob->amt);
return " (from spell)"; } else {
case FROMABIL: strcpy(obname, "an object");
return " (from ability)"; }
sprintf(buf," (from %s %s)", action, obname);
break;
default: break; default: break;
} }
return ""; return buf;
} }
int gethitconferlifetime(char *text, int *min, int *max) { int gethitconferlifetime(char *text, int *min, int *max) {

3
text.h
View File

@ -25,7 +25,8 @@ char *getdirname(int dir);
char *getdirnameshort(int dir); char *getdirnameshort(int dir);
void getdisttext(cell_t *src, cell_t *dst,char *distbuf, char *distbufapprox, char *dirbuf); void getdisttext(cell_t *src, cell_t *dst,char *distbuf, char *distbufapprox, char *dirbuf);
char *getfillingname(int nutrition); char *getfillingname(int nutrition);
char *getflagsourcetext(flag_t *f); char *getsourcetext(int src);
char *getflagsourcetext(flag_t *f, char *buf);
int gethitconferlifetime(char *text, int *min, int *max); int gethitconferlifetime(char *text, int *min, int *max);
char *getjobcatname(enum JOBCATEGORY jc); char *getjobcatname(enum JOBCATEGORY jc);
char *getkillverb(lifeform_t *victim, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp); char *getkillverb(lifeform_t *victim, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp);