- [+] 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:
parent
a144e9c4a6
commit
bfab1b10ed
3
ai.c
3
ai.c
|
@ -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)) {
|
||||
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)) {
|
||||
specificcheckok = B_FALSE;
|
||||
}
|
||||
|
|
2
attack.c
2
attack.c
|
@ -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);
|
||||
for (i = 0; i < nshields; i++) {
|
||||
int blocked = B_FALSE;
|
||||
// did f_fuillblock skill work?
|
||||
// did f_fullblock skill work?
|
||||
if (fflag && ranged && (shield[i]->id == shid)) {
|
||||
int fullchance;
|
||||
fullchance = 40 + (getobsize(shield[i])*5);
|
||||
|
|
172
data.c
172
data.c
|
@ -311,8 +311,10 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
|
||||
// learnable skills
|
||||
for (i = 1; i < MAXSKILLS; i++) {
|
||||
if (i != SK_FLIGHT) {
|
||||
addflag(lastjob->flags, F_CANLEARN, i, NA, NA, NULL);
|
||||
}
|
||||
}
|
||||
// abilities
|
||||
addflag(lastjob->flags, F_MPDICE, 1, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_HIRABLE, B_TRUE, 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_COMBAT, PR_BEGINNER, 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_SHORTBLADES, 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);
|
||||
addflag(lastobjectclass->flags, F_NOBLESS, 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_OBHPDRAIN, 1, DT_DECAY, NA, NULL); // ie. corpses last for 50 turns
|
||||
addflag(lastobjectclass->flags, F_OBHP, 50, 50, NA, NULL); // will be overridden when making a corpse
|
||||
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);
|
||||
addocnoun(lastobjectclass, "technology");
|
||||
addocnoun(lastobjectclass, "tech");
|
||||
|
@ -2235,6 +2239,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_NOBLESS, 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, UNI_FOUNTAIN, NA, 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_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);
|
||||
// important: don't make these in a swamp.
|
||||
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_CLIMBABLE, D_DOWN, NA, NA, "drainage grate");
|
||||
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_ONEPERCELL, 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, NA, "birds chirping.");
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "rustling leaves.");
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "birds chirping.");
|
||||
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);
|
||||
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_NOBLESS, 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, NA, "an echoing drip.");
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "a strange echoing.");
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "an echoing drip.");
|
||||
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);
|
||||
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_NOBLESS, 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, NA, "howling winds");
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "cracking ice");
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NC_ENVIRONMENTAL, "howling winds");
|
||||
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);
|
||||
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, 1, MA_GOTOMENU, SM_PURCHASEITEMS, "b:buy provisions");
|
||||
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++) {
|
||||
f = addflag(lastot->flags, F_STARTOBCLASS, 100, OC_FOOD, NA, NULL);
|
||||
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, 3, MA_GOTOMENU, SM_RESIZE, "s:resize equipment");
|
||||
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++) {
|
||||
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_SHOPMENU, 0, MA_GOTOMENU, SM_DONATE, "d:donate something");
|
||||
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);
|
||||
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, 2, MA_GOTOMENU, SM_ID, "i:inspect items");
|
||||
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++) {
|
||||
if (onein(3)) {
|
||||
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, 2, MA_GOTOMENU, SM_RESIZE, "r:resize equipment");
|
||||
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++) {
|
||||
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_CONTAINER, B_TRUE, NA, NA, 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, 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)");
|
||||
|
@ -2702,7 +2707,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_NOPICKUP, 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_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);
|
||||
|
||||
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);
|
||||
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, 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_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_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);
|
||||
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);
|
||||
|
@ -3330,6 +3357,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, 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);
|
||||
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_CAVE, 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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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_GLYPH, C_BROWN, '\'', NA, NULL);
|
||||
|
@ -3565,6 +3589,9 @@ void initobjects(void) {
|
|||
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
|
||||
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_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL);
|
||||
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_LOSLOF, B_TRUE, LOF_DONTNEED, 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_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_TARGETTEDSPELL, TT_MONSTER, 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_MAXPOWER, 1, 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_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_TARGETTEDSPELL, TT_MONSTER, 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_PLEASESGOD, R_GODLIFE, 2, NA, NULL);
|
||||
// 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_SPELLLEVEL, 3, NA, 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);
|
||||
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);
|
||||
|
@ -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);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_MENTAL, 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_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);
|
||||
|
@ -6614,7 +6645,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_GOESON, BP_EYES, 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_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);
|
||||
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);
|
||||
|
@ -6650,7 +6681,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL);
|
||||
addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL);
|
||||
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);
|
||||
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_USESSKILL, SK_SHORTBLADES, NA, NA, NULL);
|
||||
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_CAVE, 100, 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_GLYPH, C_RED, '\\', NA, 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_NOBLESS, 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_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_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_PRODUCESLIGHT, 10, NA, NA, NULL);
|
||||
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_GENERATES, 10, 0, B_INADJCELL, "cloud 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_PRODUCESLIGHT, 7, NA, NA, NULL);
|
||||
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_SHRINKSTO, OT_FIRESMALL, VT_OB, NA, NULL);
|
||||
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_PRODUCESLIGHT, 5, NA, NA, NULL);
|
||||
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_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_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_OBDIETEXT, B_TRUE, NA, NA, "disperses");
|
||||
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_NOOBDAMTEXT, 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_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, "!");
|
||||
|
||||
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
|
||||
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_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_GOESON, BP_SECWEAPON, NA, 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
|
||||
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_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_GOESON, BP_SECWEAPON, NA, 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);
|
||||
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_GOESON, BP_SECWEAPON, NA, 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_CRITPROTECTION, 100, NA, 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);
|
||||
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_GOESON, BP_SECWEAPON, NA, 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);
|
||||
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_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_EQUIPCONFER, F_SHIELDPENALTY, 20, 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);
|
||||
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_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_GOESON, BP_SECWEAPON, NA, 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);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 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_ACCURACY, 85, 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
|
||||
|
||||
// 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_PUSHN, "pushn", "pusher north", MT_NOTHING, 0, OC_MISC, SZ_MINI);
|
||||
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_FLEEONHPPCT, 50, NA, NA, NULL);
|
||||
// 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_METALWORK, PR_NOVICE, 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_FLEEONHPPCT, 50, NA, NA, NULL);
|
||||
// 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_MPMOD, 3, NA, 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_WANTS, OT_GOLD, B_COVETS, NA, NULL);
|
||||
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_HUMANOID, B_TRUE, NA, 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, 50, NA, NA, "1-50 gold dollars");
|
||||
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_MINIONS, 90, 1, 2, "goblin");
|
||||
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, 50, NA, NA, "1-25 gold dollars");
|
||||
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_MINIONS, 70, 1, 2, "goblin");
|
||||
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_STARTOB, 80, NA, NA, "leather armour");
|
||||
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_CANCAST, OT_S_BLINDNESS, 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, 50, NA, NA, "100-300 gold dollars");
|
||||
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_MINIONS, 90, 4, 6, "goblin");
|
||||
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_WANTS, OT_GOLD, NA, NA, NULL);
|
||||
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_MINIONS, 50, 1, 2, "goblin");
|
||||
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_WANTSBETTERWEP, B_TRUE, NA, NA, NULL);
|
||||
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_FLEEONHPPCT, 30, NA, NA, "");
|
||||
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_HASATTACK, OT_CLAWS, 6, NA, NULL);
|
||||
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_DARKNESS, NA, NA, "pw:8;");
|
||||
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_HASATTACK, OT_CLAWS, 8, 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_HUMANOID, B_TRUE, 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_HITCONFERVALS, P_VENOM, 3, NA, NULL);
|
||||
addflag(lastrace->flags, F_REGENERATES, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 5, B_BLINDABLE, 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_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_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_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_AUTOCREATEOB, 1, NA, NA, "puff of smoke");
|
||||
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_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 6, NA, NA, NULL);
|
||||
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_FRUSTRATED, 3, NA, "growls^growling");
|
||||
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_NOSPELLS, B_TRUE, 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_GETANGRY, 3, NA, "howls^a howl");
|
||||
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_NOSPELLS, B_TRUE, 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_FRUSTRATED, 2, NA, "growls^growling");
|
||||
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_FLY, SV_TALK, NA, "^buzzing wings");
|
||||
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_CANWILL, OT_A_SUCKBLOOD, NA, NA, "dam:1d1;");
|
||||
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_MATVULN, MT_SILVER, 200, 6, 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_MOVESPEED, SP_FAST, 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);
|
||||
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_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);
|
||||
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);
|
||||
|
@ -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);
|
||||
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 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, "^gYou gain the 'wild strike' ability.^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_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) {
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
20
defs.h
20
defs.h
|
@ -71,6 +71,7 @@
|
|||
|
||||
// unicode chars
|
||||
#define UNI_DYNAMIC 0x2500 // use surrounding cells and box chars
|
||||
#define UNI_FOUNTAIN 0x26F2
|
||||
#define UNI_SOLID 0x2588
|
||||
#define UNI_SHADELIGHT 0x2591
|
||||
#define UNI_SHADEMED 0x2592
|
||||
|
@ -103,6 +104,8 @@
|
|||
#define B_MAYBE (-2)
|
||||
#define B_ONEOF (-3)
|
||||
|
||||
#define B_BLINDABLE (-1)
|
||||
|
||||
#define B_ADD 1
|
||||
#define B_REMOVE -1
|
||||
|
||||
|
@ -651,6 +654,7 @@ enum SHOPACTION {
|
|||
#define FROMSKILL (-7863)
|
||||
#define FROMGODGIFT (-7862)
|
||||
#define FROMGODPIETY (-7861)
|
||||
#define FROMINJURY (-7860)
|
||||
#define FROMEXTERNAL_LOW (-7999)
|
||||
#define LEVABILITYDONE (-8000)
|
||||
|
||||
|
@ -772,7 +776,9 @@ enum NOISECLASS {
|
|||
NC_SPEECH = 2,
|
||||
NC_FIGHTING = 3,
|
||||
NC_SPELLEFFECT = 4,
|
||||
NC_OTHER = 5,
|
||||
NC_ENVIRONMENTAL = 6,
|
||||
NC_DANGER = 7,
|
||||
NC_OTHER = 99,
|
||||
};
|
||||
|
||||
enum QUADRANT {
|
||||
|
@ -1697,6 +1703,8 @@ enum OBTYPE {
|
|||
OT_TRAPWIND,
|
||||
// rocks
|
||||
OT_ASH,
|
||||
OT_ASHLARGE,
|
||||
OT_ASHHUGE,
|
||||
OT_ASHEXPLODE,
|
||||
OT_ASHCONCEAL,
|
||||
OT_ASHINVIS,
|
||||
|
@ -2608,6 +2616,7 @@ enum OBTYPE {
|
|||
OT_ICEHELMET,
|
||||
OT_ICESHIELD,
|
||||
// special obs
|
||||
OT_GENERATOR,
|
||||
OT_PLAYERSTART,
|
||||
OT_PUSHN,
|
||||
OT_PUSHE,
|
||||
|
@ -3109,6 +3118,7 @@ enum FLAG {
|
|||
F_MAKESNOISE, // object periodically makes noise.
|
||||
// v0 = % chance of noise.
|
||||
// v1 = volume.
|
||||
// v2 = enum noiseclass
|
||||
// f->text is the sound made. ie. "a splash."
|
||||
// shops
|
||||
F_BANNEDLF, // lfid v0 is not allowed to enter this shop
|
||||
|
@ -3192,6 +3202,8 @@ enum FLAG {
|
|||
// v0 = enum RUSTINESS.
|
||||
// object mods/effects
|
||||
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
|
||||
// weapons.
|
||||
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_ARMOURRATING, // val0 * 2 = pct of damage reduced
|
||||
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_DECAY, // v0 = decay level of this object.
|
||||
// v2 = how much to decay each turn.
|
||||
F_OBHP, // val0 = object health, val1 = object maxhealth
|
||||
F_OBHPDRAIN, // val0 = amt hp to lose each second. val1 = NA or damtype
|
||||
// if no damtype specified, it will be DT_DIRECT
|
||||
|
@ -4123,6 +4139,8 @@ enum FLAG {
|
|||
// obname must have at least TWO words
|
||||
F_RISEASGHOST, // become a ghost when you die.
|
||||
F_SEEINDARK, // nightvis range is val0
|
||||
// if v1 is B_BLINDABLE, then bright light will
|
||||
// blind us.
|
||||
F_SEEINVIS, // can see invisible things
|
||||
F_SPIDERCLIMB, // lf can climb at 100% success rate, and climbing
|
||||
// does not drain their stamina.
|
||||
|
|
356
io.c
356
io.c
|
@ -1596,7 +1596,7 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
|
|||
ot = findot(f->val[0]);
|
||||
if (ot) {
|
||||
enum SPELLSCHOOL school;
|
||||
char spellname[BUFLEN];
|
||||
char spellname[BUFLEN],source[BUFLEN];
|
||||
int forcepower;
|
||||
|
||||
if (texttospellopts(f->text, "pw:", &forcepower, NULL)) {
|
||||
|
@ -1606,9 +1606,9 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
|
|||
}
|
||||
|
||||
school = getspellschoolknown(lf, ot->id);
|
||||
getflagsourcetext(f,source);
|
||||
msg("^gYou have learned the %s '%s'%s.",
|
||||
(school == SS_MENTAL) ? "psionic power" : "spell", spellname,
|
||||
getflagsourcetext(f));
|
||||
(school == SS_MENTAL) ? "psionic power" : "spell", spellname, source);
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -1619,7 +1619,7 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
|
|||
ot = findot(f->val[0]);
|
||||
if (ot && (!hasflag(ot->flags, F_NOANNOUNCE))) {
|
||||
char buf[BUFLEN];
|
||||
char spellname[BUFLEN];
|
||||
char spellname[BUFLEN],sourcetext[BUFLEN];
|
||||
int forcepower;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
snprintf(buf, BUFLEN, "^gYou have gained the ability '%s'%s.", spellname,
|
||||
getflagsourcetext(f));
|
||||
getflagsourcetext(f,sourcetext);
|
||||
snprintf(buf, BUFLEN, "^gYou have gained the ability '%s'%s.", spellname, sourcetext);
|
||||
msg(buf, ot->name); more();
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
|
@ -6145,13 +6145,15 @@ char *makedesc_ob(object_t *o, char *retbuf) {
|
|||
|
||||
if (isedible(o)) {
|
||||
int basenutr;
|
||||
flag_t *ff;
|
||||
basenutr = getnutritionbase(o);
|
||||
sprintf(buf, "%s edible, and %s %s.\n",
|
||||
OB1(o,"It is","They are"),
|
||||
OB1(o,"is","are each"),
|
||||
getfillingname(basenutr));
|
||||
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)
|
||||
if (isrotting(o) && ( (getattrbracket(getattr(player, A_IQ), A_IQ, NULL) >= AT_GTAVERAGE) || getskill(player, SK_COOKING)) ) {
|
||||
} else {
|
||||
|
@ -9654,8 +9656,8 @@ void initgfx(void) {
|
|||
initcol(C_FLESH, 952, 812, 608);
|
||||
initcol(C_FOG, 812, 808, 728);
|
||||
initcol(C_MOSS, 0, 748, 428);
|
||||
initcol(C_CARPET1, 360, 280, 136);
|
||||
initcol(C_CARPET2, 160, 80, 36);
|
||||
initcol(C_CARPET1, 560, 280, 136);
|
||||
initcol(C_CARPET2, 360, 80, 36);
|
||||
initcol(C_SMOKE, 250, 250, 300);
|
||||
initcol(C_WOOD, 384, 244, 64);
|
||||
// dark cols
|
||||
|
@ -11355,7 +11357,7 @@ void drawstatus(void) {
|
|||
setcol(statwin, C_YELLOW);
|
||||
wprintw(statwin, " Prone");
|
||||
unsetcol(statwin, C_YELLOW);
|
||||
} else if (isimmobile(player) && !isdeaf(player)) {
|
||||
} else if (isimmobile(player) && !isdead(player)) {
|
||||
setcol(statwin, C_RED);
|
||||
wprintw(statwin, " Immobile");
|
||||
unsetcol(statwin, C_RED);
|
||||
|
@ -13190,6 +13192,7 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
} else if (mode == 'e') {
|
||||
int nfound = 0,luckmod;
|
||||
enum LFSIZE racesize,cursize;
|
||||
char source[BUFLEN];
|
||||
x = 0; // override
|
||||
// down a line.
|
||||
wattron(mainwin, A_UNDERLINE);
|
||||
|
@ -13270,45 +13273,55 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
// obvious physical effects first.
|
||||
f = lfhasknownflag(lf, F_BEINGSTONED);
|
||||
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++;
|
||||
}
|
||||
|
||||
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++;
|
||||
}
|
||||
|
||||
f = lfhasflag(lf, F_FLAMMABLELF);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = hasflag(lf->race->flags, F_SIZE);
|
||||
if (f) {
|
||||
getflagsourcetext(f, source);
|
||||
racesize = f->val[0];
|
||||
} else {
|
||||
strcpy(source, "");
|
||||
racesize = SZ_HUMAN; // default
|
||||
}
|
||||
cursize = getlfsize(lf);
|
||||
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++;
|
||||
}
|
||||
|
||||
|
||||
// show racial effects
|
||||
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++;
|
||||
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++;
|
||||
}
|
||||
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++;
|
||||
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++;
|
||||
}
|
||||
|
||||
|
@ -13391,7 +13404,7 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
lifeform_t *god;
|
||||
god = findgod(godid);
|
||||
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);
|
||||
y++;
|
||||
}
|
||||
|
@ -13411,18 +13424,22 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
}
|
||||
f = hasflag_real(lf->flags, F_ENHANCESMELL, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_DISEASEIMMUNE);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = hasflag_real(lf->flags, F_HEAVYBLOW, B_TRUE, NULL, FROMRACE);
|
||||
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);
|
||||
y++;
|
||||
}
|
||||
|
@ -13438,7 +13455,9 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
} else { // >= 4
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_RESISTMAG);
|
||||
|
@ -13469,86 +13488,112 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
} else { // ie. 100 upwards
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_FEARLESS, B_TRUE, NULL, FROMRACE);
|
||||
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);
|
||||
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);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_SEEINDARK, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
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);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_SHADOWED, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_SPIDERCLIMB, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_SIXTHSENSE, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_STABILITY, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
|
||||
// only show eating habits if not inherited from race
|
||||
f = hasflag_real(lf->flags, F_CARNIVORE, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_VEGETARIAN, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_PARTVEGETARIAN, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = hasflag_real(lf->flags, F_VISRANGEMOD, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_NIGHTVISRANGEMOD, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = hasflag_real(lf->flags, F_XRAYVIS, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
|
||||
|
@ -13558,7 +13603,8 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
f = retflag[i];
|
||||
m = findmaterial(f->val[0]);
|
||||
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++;
|
||||
}
|
||||
}
|
||||
|
@ -13692,8 +13738,9 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
f = retflag[i];
|
||||
mt = findmaterial(f->val[0]);
|
||||
if (mt) {
|
||||
mvwprintw(mainwin, y, 0, "%s take%s %d%% damage from %s weapons.", you(lf),
|
||||
isplayer(lf) ? "" : "s", f->val[1], mt->name);
|
||||
getflagsourcetext(f,source);
|
||||
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++;
|
||||
if (f->val[2] > 0) {
|
||||
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
|
||||
f = lfhasknownflag(lf, F_ARBOOST);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = lfhasknownflag(lf, F_ATTRSET);
|
||||
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++;
|
||||
} else {
|
||||
f = lfhasknownflag(lf, F_ATTRMOD);
|
||||
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++;
|
||||
}
|
||||
}
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_AUTOTANGLE, B_TRUE, NULL, FROMRACE);
|
||||
if (f) {
|
||||
mvwprintw(mainwin, y, 0, "%s %s a %d%% chance to automatically entangle enemies.", you(lf),
|
||||
isplayer(lf) ? "have" : "has", f->val[0]);
|
||||
getflagsourcetext(f,source);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_AWARENESS, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_DODGES, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
getflags(lf->flags, retflag, &nretflags, F_LEARNBOOST, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
f = retflag[i];
|
||||
if (f && f->known) {
|
||||
mvwprintw(mainwin, y, 0, "%s have a %d%% %s to earned experience points.", you(lf),
|
||||
f->val[0], (f->val[0] > 0) ? "bonus" : "penalty");
|
||||
getflagsourcetext(f,source);
|
||||
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++;
|
||||
}
|
||||
}
|
||||
|
||||
f = lfhasknownflag(lf, F_MAGICARMOUR);
|
||||
if (f && (f->known)) {
|
||||
getflagsourcetext(f,source);
|
||||
mvwprintw(mainwin, y, 0, "%s %s protected by %s %s", you(lf), is(lf),
|
||||
needan(f->text) ? "an" : "a", f->text);
|
||||
if (isplayer(lf)) {
|
||||
wprintw(mainwin, " (+%d AR).",f->val[0]);
|
||||
wprintw(mainwin, " (+%d AR).%s",f->val[0],source);
|
||||
} else {
|
||||
wprintw(mainwin, ".");
|
||||
wprintw(mainwin, ".%s",source);
|
||||
}
|
||||
y++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_MAGICBOOST);
|
||||
if (f && (f->known)) {
|
||||
int boost;
|
||||
getflagsourcetext(f,source);
|
||||
sumflags(lf->flags, F_MAGICBOOST, &boost, NULL, NULL);
|
||||
mvwprintw(mainwin, y, 0, "The power of %s spells is boosted by %d.",
|
||||
isplayer(lf) ? "your" : "its", boost);
|
||||
mvwprintw(mainwin, y, 0, "The power of %s spells is boosted by %d.%s",
|
||||
isplayer(lf) ? "your" : "its", boost,source);
|
||||
y++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_TEMPMAGICBOOST);
|
||||
if (f && (f->known)) {
|
||||
int boost;
|
||||
sumflags(lf->flags, F_TEMPMAGICBOOST, &boost, NULL, NULL);
|
||||
mvwprintw(mainwin, y, 0, "The power of %s next spell will be boosted by %d.",
|
||||
isplayer(lf) ? "your" : "its", boost);
|
||||
getflagsourcetext(f,source);
|
||||
mvwprintw(mainwin, y, 0, "The power of %s next spell will be boosted by %d.%s",
|
||||
isplayer(lf) ? "your" : "its", boost,source);
|
||||
y++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_MINCRITCHANCE);
|
||||
if (f && (f->known)) {
|
||||
mvwprintw(mainwin, y, 0, "%s attacks are guided by the gods, granting a minimum %d%% criticial hit chance.",
|
||||
your(lf), f->val[0]);
|
||||
getflagsourcetext(f,source);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_MINDSHIELD);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_MISCASTCHANCE);
|
||||
if (f && (f->known)) {
|
||||
int chance;
|
||||
getflagsourcetext(f,source);
|
||||
sumflags(lf->flags, F_MISCASTCHANCE, &chance, NULL, NULL);
|
||||
mvwprintw(mainwin, y, 0, "%s spells have a %d%% chance of failure.",
|
||||
isplayer(lf) ? "Your" : "Its", chance);
|
||||
mvwprintw(mainwin, y, 0, "%s spells have a %d%% chance of failure.%s",
|
||||
isplayer(lf) ? "Your" : "Its", chance, source);
|
||||
y++;
|
||||
}
|
||||
|
||||
f = lfhasflag(lf, F_OMNIPOTENT);
|
||||
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++;
|
||||
}
|
||||
if (isblind(lf)) {
|
||||
mvwprintw(mainwin, y, 0, "%s cannot see.", you(lf));
|
||||
f = isblind(lf);
|
||||
if (f) {
|
||||
getflagsourcetext(f,source);
|
||||
mvwprintw(mainwin, y, 0, "%s cannot see.%s", you(lf), source);
|
||||
y++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_CHARMEDBY);
|
||||
|
@ -13858,62 +13925,75 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
mvwprintw(mainwin, y, 0, buf);
|
||||
y++;
|
||||
}
|
||||
if (lfhasknownflag(lf, F_BREATHWATER) || lfhasknownflag(lf, F_AQUATIC)) {
|
||||
mvwprintw(mainwin, y, 0, "%s can breath normally while underwater.", you(lf));
|
||||
f = lfhasknownflag(lf, F_BREATHWATER);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_CONTROL);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_CONFUSED);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_CONSUMESOULS);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_DETECTAURAS);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_DETECTLIFE);
|
||||
if (f) {
|
||||
mvwprintw(mainwin, y, 0, "%s automatically detect %snearby lifeforms.", you(lf),
|
||||
(f->val[1] == B_TRUE) ? "" : "the size of ");
|
||||
getflagsourcetext(f,source);
|
||||
mvwprintw(mainwin, y, 0, "%s automatically detect %snearby lifeforms.%s", you(lf),
|
||||
(f->val[1] == B_TRUE) ? "" : "the size of ",source);
|
||||
y++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_DETECTMAGIC);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_DETECTMETAL);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_DETECTOBS);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_ENHANCESEARCH);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = lfhasknownflag(lf, F_DRUNK);
|
||||
if (f) {
|
||||
char ddesc[BUFLEN];
|
||||
getflagsourcetext(f,source);
|
||||
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++;
|
||||
}
|
||||
|
||||
|
@ -13958,18 +14038,21 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
}
|
||||
|
||||
|
||||
getflagsourcetext(f,source);
|
||||
dicetotext(ndice, nsides, bonus, &min, &max, dicebuf, mmbuf);
|
||||
if (strcmp(dicebuf, mmbuf)) {
|
||||
mvwprintw(mainwin, y, 0, "%s deal%s %s (%s) extra %s each hit.", you(lf),
|
||||
isplayer(lf) ? "" : "s", dicebuf, mmbuf, damtypebuf);
|
||||
mvwprintw(mainwin, y, 0, "%s deal%s %s (%s) extra %s each hit.%s", you(lf),
|
||||
isplayer(lf) ? "" : "s", dicebuf, mmbuf, damtypebuf,source);
|
||||
} else {
|
||||
mvwprintw(mainwin, y, 0, "%s deal%s %s extra %s each hit.", you(lf),
|
||||
isplayer(lf) ? "" : "s", dicebuf, damtypebuf);
|
||||
mvwprintw(mainwin, y, 0, "%s deal%s %s extra %s each hit.%s", you(lf),
|
||||
isplayer(lf) ? "" : "s", dicebuf, damtypebuf,source);
|
||||
}
|
||||
y++;
|
||||
}
|
||||
}
|
||||
|
||||
f = lfhasflag(lf, F_EXTRALUCK);
|
||||
if (f) {
|
||||
sumflags(lf->flags, F_EXTRALUCK, &luckmod, NULL, NULL);
|
||||
if (luckmod) {
|
||||
char luckamt[BUFLEN];
|
||||
|
@ -13982,19 +14065,23 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
default:
|
||||
strcpy(luckamt, "incredibly "); break;
|
||||
}
|
||||
mvwprintw(mainwin, y, 0, "%s %s %slucky.", you(lf), is(lf), luckamt);
|
||||
getflagsourcetext(f,source);
|
||||
mvwprintw(mainwin, y, 0, "%s %s %slucky.%s", you(lf), is(lf), luckamt,source);
|
||||
y++;
|
||||
}
|
||||
}
|
||||
|
||||
f = lfhasknownflag(lf, F_EXTRAMP);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = lfhasknownflag(lf, F_EXTRAINFO);
|
||||
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++;
|
||||
}
|
||||
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);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_HOLYAURA);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_HOLYTOUCH);
|
||||
if (f) {
|
||||
mvwprintw(mainwin, y, 0, "Any object %s weild%s will be temporarily blessed.", you(lf),
|
||||
isplayer(lf) ? "" : "s");
|
||||
getflagsourcetext(f,source);
|
||||
mvwprintw(mainwin, y, 0, "Any object %s weild%s will be temporarily blessed.%s", you(lf),
|
||||
isplayer(lf) ? "" : "s",source);
|
||||
y++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_HOTFEET);
|
||||
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);
|
||||
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);
|
||||
if (f && (f->known)) {
|
||||
getflagsourcetext(f,source);
|
||||
strcpy(buf,"The next object you touch will turn to solid ice.");
|
||||
if (lfhasflag(lf, F_OMNIPOTENT)) {
|
||||
char buf2[BUFLEN];
|
||||
snprintf(buf2, BUFLEN, " [%d uses left]", f->val[0]);
|
||||
strcat(buf, buf2);
|
||||
}
|
||||
mvwprintw(mainwin, y, 0, buf);
|
||||
mvwprintw(mainwin, y, 0, "%s%s",buf,source);
|
||||
y++;
|
||||
}
|
||||
f = lfhasflag(lf, F_GRAVBOOSTED);
|
||||
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++;
|
||||
}
|
||||
f = lfhasflag(lf, F_GRAVLESSENED);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_FULLSHIELD);
|
||||
|
@ -14098,7 +14195,8 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
char obname[BUFLEN];
|
||||
sh = hasobid(lf->pack, atol(f->text));
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_HEAVENARM);
|
||||
|
@ -14109,119 +14207,139 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
} else {
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_INVULNERABLE);
|
||||
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++;
|
||||
}
|
||||
f = lfhasflag(lf, F_MAGSHIELD);
|
||||
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++;
|
||||
}
|
||||
f = lfhasflag(lf, F_PAIN);
|
||||
if (f && (f->known)) {
|
||||
getflagsourcetext(f,source);
|
||||
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 {
|
||||
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++;
|
||||
}
|
||||
|
||||
f = lfhasflag(lf, F_PARALYZED);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_PHOTOMEM, NA, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_PLANTFRIEND, NA, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_POLYIMMUNE, NA, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_PROTALIGN, NA, NULL, FROMRACE);
|
||||
if (f) {
|
||||
mvwprintw(mainwin, y, 0, "%s %s protected from attacks by %s-aligned creatures.", you(lf), is(lf),
|
||||
getalignmentname(f->val[1]));
|
||||
getflagsourcetext(f,source);
|
||||
mvwprintw(mainwin, y, 0, "%s %s protected from attacks by %s-aligned creatures.%s", you(lf), is(lf),
|
||||
getalignmentname(f->val[1]),source);
|
||||
y++;
|
||||
}
|
||||
f = lfhasflag(lf, F_RAGE);
|
||||
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++;
|
||||
}
|
||||
f = lfhasflag(lf, F_REFLECTION);
|
||||
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);
|
||||
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++;
|
||||
}
|
||||
f = lfhasknownflag(lf, F_WINDSHIELD);
|
||||
if (f) {
|
||||
getflagsourcetext(f,source);
|
||||
mvwprintw(mainwin, y, 0, "%s %s protected from missiles by a cyclonic shield", you(lf), is(lf));
|
||||
|
||||
if (isplayer(lf)) {
|
||||
wprintw(mainwin, " (power %d).",roman(f->val[0]));
|
||||
wprintw(mainwin, " (power %d).%s",roman(f->val[0]),source);
|
||||
} else {
|
||||
wprintw(mainwin, ".");
|
||||
wprintw(mainwin, ".%s",source);
|
||||
}
|
||||
y++;
|
||||
}
|
||||
f = lfhasflag(lf, F_RISEASGHOST);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = hasflag_real(lf->flags, F_STASIS, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = hasflag_real(lf->flags, F_STAMBOOST, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = hasflag_real(lf->flags, F_STENCH, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = hasflag_real(lf->flags, F_UNDEAD, B_TRUE, NULL, FROMRACE);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = lfhasflag(lf, F_STRIKETOKO);
|
||||
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++;
|
||||
}
|
||||
|
||||
f = lfhasflag(lf, F_STUNNED);
|
||||
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++;
|
||||
}
|
||||
} else if (mode == 'i') {
|
||||
|
|
84
lf.c
84
lf.c
|
@ -3737,6 +3737,15 @@ void die(lifeform_t *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
|
||||
copyflag(corpse->flags, lf->flags, F_KNOWSABOUT);
|
||||
copyflag(corpse->flags, lf->flags, F_HOMEMAP);
|
||||
|
@ -3827,7 +3836,17 @@ void die(lifeform_t *lf) {
|
|||
// drop head too
|
||||
snprintf(headname, BUFLEN, "%s head",lf->race->name);
|
||||
headob = addob(corpsecell->obpile, headname);
|
||||
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) {
|
||||
|
@ -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) {
|
||||
flag_t *f;
|
||||
enum SKILLLEVEL slev = PR_INEPT;
|
||||
int othermod = 0;
|
||||
if (isshield(o)) {
|
||||
|
@ -10278,16 +10298,22 @@ int getshieldblockmod(lifeform_t *lf, object_t *o) {
|
|||
case PR_MASTER: othermod = 16; break;
|
||||
*/
|
||||
case PR_NOVICE: othermod = 0; break;
|
||||
case PR_BEGINNER: othermod = 10; break;
|
||||
case PR_ADEPT: othermod = 20; break;
|
||||
case PR_SKILLED: othermod = 30; break;
|
||||
case PR_EXPERT: othermod = 40; break;
|
||||
case PR_MASTER: othermod = 50; break;
|
||||
case PR_BEGINNER: othermod = 5; break;
|
||||
case PR_ADEPT: othermod = 10; break;
|
||||
case PR_SKILLED: othermod = 15; break;
|
||||
case PR_EXPERT: othermod = 20; break;
|
||||
case PR_MASTER: othermod = 25; break;
|
||||
default:
|
||||
// should never happen
|
||||
othermod = -15;
|
||||
break;
|
||||
}
|
||||
|
||||
// now modify for shield type
|
||||
f = hasflag(o->flags, F_SHIELD);
|
||||
if (f) {
|
||||
othermod += f->val[0];
|
||||
}
|
||||
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);
|
||||
fingerbp = BP_LEFTFINGER;
|
||||
}
|
||||
addflag(lf->flags, F_NOBODYPART, bp2, B_FROMINJURY, NA, NULL);
|
||||
addflag(lf->flags, F_NOBODYPART, fingerbp, B_FROMINJURY, NA, NULL);
|
||||
addtempflag(lf->flags, F_NOBODYPART, bp2, B_FROMINJURY, NA, NULL, FROMINJURY);
|
||||
addtempflag(lf->flags, F_NOBODYPART, fingerbp, B_FROMINJURY, NA, NULL, FROMINJURY);
|
||||
howlong = PERMENANT;
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (o[i]) {
|
||||
|
@ -13285,8 +13311,7 @@ int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype, enum INJUR
|
|||
object_t *o;
|
||||
addob(lf->cell->obpile, "severed finger");
|
||||
o = getequippedob(lf->pack, bp2);
|
||||
addflag(lf->flags, F_NOBODYPART, bp2, B_FROMINJURY, NA, NULL);
|
||||
howlong = PERMENANT;
|
||||
addtempflag(lf->flags, F_NOBODYPART, bp2, B_FROMINJURY, NA, NULL,FROMINJURY);
|
||||
if (o) {
|
||||
char obname[BUFLEN];
|
||||
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);
|
||||
break;
|
||||
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;
|
||||
case IJ_WINDED:
|
||||
lf->stamina = 0;
|
||||
|
@ -13541,10 +13566,13 @@ int lfproduceslight(lifeform_t *lf, object_t **fromwhat) {
|
|||
|
||||
int lighthurtseyes(lifeform_t *lf) {
|
||||
// note: if you don't have eyes, your'e safe!
|
||||
if (lfhasflag(lf, F_SEEINDARK) && !isblind(lf) &&
|
||||
!lfhasflagval(lf, F_NOBODYPART, BP_EYES, NA, NA, NULL)) {
|
||||
if (!isblind(lf) && !lfhasflagval(lf, F_NOBODYPART, BP_EYES, NA, NA, NULL)) {
|
||||
flag_t *f;
|
||||
f = lfhasflag(lf, F_SEEINDARK);
|
||||
if (f && (f->val[1] == B_BLINDABLE)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
}
|
||||
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;
|
||||
if (!lf) return B_FALSE;
|
||||
if (!lf) return NULL;
|
||||
|
||||
f = lfhasflag(lf, F_ASLEEP);
|
||||
if (f && (f->val[1] != ST_MEDITATING)) {
|
||||
return B_TRUE;
|
||||
return f;
|
||||
}
|
||||
if (lfhasflag(lf, F_BLIND)) {
|
||||
return B_TRUE;
|
||||
f = lfhasflag(lf, F_BLIND);
|
||||
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)) {
|
||||
return B_TRUE;
|
||||
return f;
|
||||
}
|
||||
}
|
||||
|
||||
return B_FALSE;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
enum BURDENED isburdened(lifeform_t *lf) {
|
||||
|
@ -18272,10 +18302,17 @@ int noise(cell_t *c, lifeform_t *noisemaker, enum NOISECLASS nclass, int volume,
|
|||
}
|
||||
if (targlf && (targlf->cell)) { // ie. not swapping places
|
||||
if (getcelldist(l->cell, c) < getcelldist(l->cell, targlf->cell)) {
|
||||
if ((myvol >= 4) && onein(2)) {
|
||||
if ((myvol >= SV_SHOUT)) {
|
||||
if ((nclass != NC_ENVIRONMENTAL) && (nclass != NC_MOVEMENT)) {
|
||||
int chance;
|
||||
chance = 40;
|
||||
chance += (20*(myvol - SV_SHOUT));
|
||||
if (pctchance(chance)) {
|
||||
willrespond = B_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// will respond if the sound is closer than our target cell.
|
||||
cell_t *tc;
|
||||
|
@ -23245,11 +23282,14 @@ void startlfturn(lifeform_t *lf) {
|
|||
amt = obproduceslight(o);
|
||||
if (amt) {
|
||||
if (lighthurtseyes(lf)) {
|
||||
int min=2,max;
|
||||
if (isplayer(lf)) {
|
||||
msg("The bright light burns your vision-enhanced eyes!");
|
||||
}
|
||||
// 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)) {
|
||||
int dam;
|
||||
|
|
2
lf.h
2
lf.h
|
@ -357,7 +357,7 @@ int isaquatic(lifeform_t *lf);
|
|||
flag_t *isasleep(lifeform_t *lf);
|
||||
int isbehind(lifeform_t *lf, lifeform_t *otherlf);
|
||||
int isbleeding(lifeform_t *lf);
|
||||
int isblind(lifeform_t *lf);
|
||||
flag_t *isblind(lifeform_t *lf);
|
||||
enum BURDENED isburdened(lifeform_t *lf);
|
||||
int ischarmable(lifeform_t *lf);
|
||||
int isclimbing(lifeform_t *lf);
|
||||
|
|
90
map.c
90
map.c
|
@ -982,8 +982,8 @@ void adjustcellglyph(cell_t *c, glyph_t *g, enum CELLADJUSTTYPE how) {
|
|||
for (i = D_N; i <= D_W; i++) {
|
||||
int this;
|
||||
c2 = getcellindir(c,i);
|
||||
//if (c2 && c2->known && ((c2->type->id == c->type->id) || hasdoor(c2)) ) {
|
||||
if (c2 && c2->known && (issolid(c2) || hasdoor(c2)) ) {
|
||||
if (c2 && c2->known && ((c2->type->id == c->type->id) || hasdoor(c2)) ) {
|
||||
//if (c2 && c2->known && (issolid(c2) || hasdoor(c2)) ) {
|
||||
this = 1;
|
||||
// we want:
|
||||
// N E S W
|
||||
|
@ -1630,6 +1630,24 @@ int cellokforreachability(cell_t *startcell, cell_t *c, int srcroomid, int dir,
|
|||
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)
|
||||
// but DONT remove the cell itself.
|
||||
void clearcell(cell_t *c) {
|
||||
|
@ -2509,6 +2527,41 @@ int fix_reachability(map_t *m) {
|
|||
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.
|
||||
// 'c' will be where the next flood will will happen.
|
||||
c = ucell;
|
||||
|
@ -2828,6 +2881,7 @@ enum CELLTYPE getcellempty(cell_t *c) {
|
|||
return c->habitat->emptycelltype;
|
||||
}
|
||||
|
||||
|
||||
enum CELLTYPE getcellsolid(cell_t *c) {
|
||||
flag_t *f;
|
||||
vault_t *v;
|
||||
|
@ -2867,6 +2921,7 @@ int getmidtemp(enum TEMPERATURE temp) {
|
|||
|
||||
enum DEPTH getcellwaterdepth(cell_t *c, lifeform_t *lf) {
|
||||
object_t *o;
|
||||
if (!c) return DP_NONE;
|
||||
o = hasobwithflag(c->obpile, F_DEEPWATER);
|
||||
if (o) {
|
||||
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;
|
||||
while (failed) {
|
||||
while (failed) {
|
||||
enum CELLTYPE sol = CT_NONE,emp = CT_NONE;
|
||||
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)
|
||||
for (y = 0; y < map->h; y++) {
|
||||
|
@ -10127,36 +10189,38 @@ int remove_smallrooms(map_t *m) {
|
|||
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) {
|
||||
// random chance of different wall type
|
||||
if (onein(6)) {
|
||||
if (pctchance(solchance)) {
|
||||
switch (rnd(1,3)) {
|
||||
case 1:
|
||||
addflag(map->flags, F_CELLTYPESOLID, CT_WALLBRICK, NA, NA, NULL);
|
||||
*sol = CT_WALLBRICK;
|
||||
break;
|
||||
case 2:
|
||||
addflag(map->flags, F_CELLTYPESOLID, CT_WALLMETAL, NA, NA, NULL);
|
||||
*sol = CT_WALLMETAL;
|
||||
break;
|
||||
case 3:
|
||||
addflag(map->flags, F_CELLTYPESOLID, CT_WALLWOOD, NA, NA, NULL);
|
||||
*sol = CT_WALLWOOD;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// random chance of different floor type
|
||||
if (onein(6)) {
|
||||
if (pctchance(empchance)) {
|
||||
switch (rnd(1,4)) {
|
||||
case 1:
|
||||
addflag(map->flags, F_CELLTYPEEMPTY, CT_FLOORCARPET, NA, NA, NULL);
|
||||
*emp = CT_FLOORCARPET;
|
||||
break;
|
||||
case 2:
|
||||
addflag(map->flags, F_CELLTYPEEMPTY, CT_FLOORTILE, NA, NA, NULL);
|
||||
*emp = CT_FLOORTILE;
|
||||
break;
|
||||
case 3:
|
||||
addflag(map->flags, F_CELLTYPEEMPTY, CT_FLOORWOOD, NA, NA, NULL);
|
||||
*emp = CT_FLOORWOOD;
|
||||
break;
|
||||
case 4:
|
||||
addflag(map->flags, F_CELLTYPEEMPTY, CT_DIRT, NA, NA, NULL);
|
||||
*emp = CT_DIRT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
3
map.h
3
map.h
|
@ -20,6 +20,7 @@ int cellisfixedvaultwall(cell_t *c);
|
|||
int cellmeetscondition(cell_t *c, enum CELLCONDITION cond, int arg, int value);
|
||||
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);
|
||||
enum CELLTYPE celltypefromvault(cell_t *c);
|
||||
void clearcell(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);
|
||||
|
@ -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_baddoors(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 setcellknown(cell_t *cell, int forcelev);
|
||||
void setcellknownradius(cell_t *centre, int forcelev, int radius, int dirtype);
|
||||
|
|
86
objects.c
86
objects.c
|
@ -1048,6 +1048,28 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
}
|
||||
|
||||
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 ")) {
|
||||
char *pp;
|
||||
pp = strchr(p, '\"');
|
||||
|
@ -2937,12 +2959,6 @@ void applyobmod(object_t *o, obmod_t *om) {
|
|||
}
|
||||
|
||||
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!
|
||||
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
|
||||
int doobdieconvert(object_t *o, int wantannounce) {
|
||||
flag_t *f;
|
||||
|
@ -8154,14 +8187,21 @@ int isreadable(object_t *o) {
|
|||
}
|
||||
|
||||
int isrotting(object_t *o) {
|
||||
//int max;
|
||||
flag_t *f;
|
||||
if (hasflag(o->flags, F_TAINTED)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
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_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_EXPLODEONDEATH, NA, 1, NA, "10d2");
|
||||
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;
|
||||
case 'i':
|
||||
msg("\"SCAN & IDENTIFY ROUTINE INITIATED.\"");
|
||||
|
@ -13582,7 +13622,7 @@ int sethiddenname(objecttype_t *ot, char *text) {
|
|||
}
|
||||
|
||||
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);
|
||||
|
@ -14250,12 +14290,27 @@ int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce, lif
|
|||
if (!hpflag || (hpflag->val[0] <= 0)) {
|
||||
// special cases....
|
||||
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;
|
||||
flag_t *ff;
|
||||
meat = addob(o->pile, "chunk of roast meat");
|
||||
// purposely don't use getweight!
|
||||
meat->weight = o->weight;
|
||||
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) {
|
||||
if ((oo->type->obclass->id == OC_CORPSE) && !hasflag(oo->flags, F_SALTED)) {
|
||||
flag_t *decayflag;
|
||||
decayflag = hasflagval(oo->flags, F_OBHPDRAIN, NA, DT_DECAY, NA, NULL);
|
||||
decayflag = hasflag(oo->flags, F_DECAY);
|
||||
if (haslos(player, srcloc)) {
|
||||
char corpsename[BUFLEN];
|
||||
getobname(oo, corpsename, oo->amt);
|
||||
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);
|
||||
donesalt = B_TRUE;
|
||||
}
|
||||
|
@ -15516,7 +15574,7 @@ void timeeffectsob(object_t *o) {
|
|||
// these are generally just to notify the player that something
|
||||
// is nearby, so don't make noises the the player is already there.
|
||||
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
|
||||
// with weapons is that only the blade is on fire.
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 curseob(object_t *o);
|
||||
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 doobtraps(object_t *o, lifeform_t *lf);
|
||||
void dumpobrarity(void);
|
||||
|
|
2
save.c
2
save.c
|
@ -1173,7 +1173,7 @@ int saveobtobones(object_t *o, FILE *f, int x, int y) {
|
|||
if (onein(4)) return B_TRUE;
|
||||
|
||||
// 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.
|
||||
return B_TRUE;
|
||||
}
|
||||
|
|
38
spell.c
38
spell.c
|
@ -3802,7 +3802,8 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
} else {
|
||||
rarity = 0;
|
||||
}
|
||||
difficulty = 90 + (rarity*10);
|
||||
if (rarity == NA) rarity = RR_COMMON;
|
||||
difficulty = 120 + (rarity*10);
|
||||
/*
|
||||
switch (o->type->obclass->id) {
|
||||
case OC_SCROLL:
|
||||
|
@ -5747,7 +5748,21 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
return B_TRUE;
|
||||
}
|
||||
for (i = 0; i < power; i++) {
|
||||
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);
|
||||
if (i == 0) {
|
||||
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
|
||||
// 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) {
|
||||
target = targcell->lf;
|
||||
|
||||
|
@ -10017,7 +10032,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
int radius;
|
||||
|
||||
// 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) {
|
||||
// TODO: this actually means we can cast it through walls!!!
|
||||
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 (power < 5) {
|
||||
msg("A magical light appears!");
|
||||
} else {
|
||||
msg("The area is lit by a magical light!");
|
||||
}
|
||||
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);
|
||||
if (f) {
|
||||
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) {
|
||||
f->val[2] = 0;
|
||||
killflag(f);
|
||||
donesomething = B_TRUE;
|
||||
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);
|
||||
} else if (spellid == OT_S_VENTRILOQUISM) {
|
||||
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 {
|
||||
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) ||
|
||||
(spellid == OT_S_SUMMONANIMALSMD) ||
|
||||
|
@ -14296,10 +14316,8 @@ char *getspellname(enum OBTYPE spellid, lifeform_t *lf, char *buf, int forcepowe
|
|||
strcat(buf, "(enhanced)");
|
||||
}
|
||||
} else if (spellid == OT_S_LIGHT) {
|
||||
if (power >= 8) {
|
||||
strcat(buf, "(perm,ctrl,blind)");
|
||||
} else if (power >= 5) {
|
||||
strcat(buf, "(ctrl,blind)");
|
||||
if (power >= 5) {
|
||||
strcat(buf, "(ctrl,entire-lev)");
|
||||
} else if (power >= 3) {
|
||||
strcat(buf, "(ctrl)");
|
||||
}
|
||||
|
|
61
text.c
61
text.c
|
@ -1233,29 +1233,54 @@ char *getfillingname(int nutrition) {
|
|||
return "of zero nutritional substance";
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *getflagsourcetext(flag_t *f) {
|
||||
switch (f->lifetime) {
|
||||
case FROMSKILL: return " (skill perk)";
|
||||
case FROMJOB: return " (job perk)";
|
||||
case FROMOBEQUIP:
|
||||
case FROMOBHOLD:
|
||||
case FROMOBACTIVATE:
|
||||
return " (conferred perk)";
|
||||
case FROMGODGIFT:
|
||||
return " (god gift)";
|
||||
case FROMGODPIETY:
|
||||
return " (piety bonus)";
|
||||
case FROMSPELL:
|
||||
return " (from spell)";
|
||||
case FROMABIL:
|
||||
return " (from ability)";
|
||||
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 obname[BUFLEN];
|
||||
char action[BUFLEN];
|
||||
strcpy(buf, "");
|
||||
if (f->pile->owner && !isplayer(f->pile->owner)) return buf;
|
||||
switch (f->lifetime) {
|
||||
case FROMSKILL:
|
||||
case FROMJOB:
|
||||
case FROMGODGIFT:
|
||||
case FROMGODPIETY:
|
||||
case FROMSPELL:
|
||||
case FROMABIL:
|
||||
case FROMINJURY:
|
||||
sprintf(buf," (%s)",getsourcetext(f->lifetime));
|
||||
break;
|
||||
case FROMOBEQUIP:
|
||||
case FROMOBHOLD:
|
||||
case FROMOBACTIVATE:
|
||||
if (f->lifetime == FROMOBEQUIP) strcpy(action, "equipping");
|
||||
else if (f->lifetime == FROMOBEQUIP) strcpy(action, "holding");
|
||||
else strcpy(action, "activating");
|
||||
|
||||
if (f->pile->ob) {
|
||||
getobname(f->pile->ob, obname, f->pile->ob->amt);
|
||||
} else {
|
||||
strcpy(obname, "an object");
|
||||
}
|
||||
sprintf(buf," (from %s %s)", action, obname);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
int gethitconferlifetime(char *text, int *min, int *max) {
|
||||
int howlong;
|
||||
int localmin = -1,localmax = -1;
|
||||
|
|
3
text.h
3
text.h
|
@ -25,7 +25,8 @@ char *getdirname(int dir);
|
|||
char *getdirnameshort(int dir);
|
||||
void getdisttext(cell_t *src, cell_t *dst,char *distbuf, char *distbufapprox, char *dirbuf);
|
||||
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);
|
||||
char *getjobcatname(enum JOBCATEGORY jc);
|
||||
char *getkillverb(lifeform_t *victim, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp);
|
||||
|
|
Loading…
Reference in New Issue