- [+] better help text for temperature effects in @e
- [+] why wasn't eyebat levitating? fixed. anything with nostam should always have 100% stamina. - [+] pain shouldn't work on undead. - [+] screamer - [+] walking - [+] plant. purple brocolli - [+] spellcloud scream - [+] deafens adjacent creatures for 40-50 turns (doesn't stack) - [+] attracts other monsters - [+] leaves "screamer slice" - [+] how do you open a barrel without hurting contents? - [+] answer: don't use DT_BASH. - [+] giant bee - [+] sting then die. (cause pain) - [+] don't get dizzy while running
This commit is contained in:
parent
d7f6991a40
commit
fe41614a1c
4
ai.c
4
ai.c
|
@ -1490,7 +1490,7 @@ int ai_handle_emergencies(lifeform_t *lf, enum ATTRBRACKET iqb) {
|
||||||
if (!isprone(lf)) {
|
if (!isprone(lf)) {
|
||||||
if (hasflag(lf->race->flags, F_NATURALFLIGHT) && !lfhasflag(lf, F_FLYING)) {
|
if (hasflag(lf->race->flags, F_NATURALFLIGHT) && !lfhasflag(lf, F_FLYING)) {
|
||||||
if (cancast(lf, OT_A_FLY, NULL) && !isburdened(lf)) {
|
if (cancast(lf, OT_A_FLY, NULL) && !isburdened(lf)) {
|
||||||
if (getstaminapct(lf) >= 80) {
|
if (lfhasflag(lf, F_NOSTAM) || (getstaminapct(lf) >= 80)) {
|
||||||
if (!useability(lf, OT_A_FLY, lf, lf->cell)) {
|
if (!useability(lf, OT_A_FLY, lf, lf->cell)) {
|
||||||
return B_TRUE;
|
return B_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -3201,6 +3201,8 @@ int aispellok(lifeform_t *lf, enum OBTYPE spellid, lifeform_t *victim, enum FLAG
|
||||||
adjcell = get_closest_adjcell(lf->cell, victim->cell);
|
adjcell = get_closest_adjcell(lf->cell, victim->cell);
|
||||||
if (!adjcell || celldangerous(lf, adjcell, B_TRUE, NULL)) { // don't charge into dangerous cells
|
if (!adjcell || celldangerous(lf, adjcell, B_TRUE, NULL)) { // don't charge into dangerous cells
|
||||||
specificcheckok = B_FALSE;
|
specificcheckok = B_FALSE;
|
||||||
|
} else if (adjcell && adjcell->lf) {
|
||||||
|
specificcheckok = B_FALSE;
|
||||||
} else if (!haslofknown(lf->cell, victim->cell, LOF_NEED,NULL)) {
|
} else if (!haslofknown(lf->cell, victim->cell, LOF_NEED,NULL)) {
|
||||||
specificcheckok = B_FALSE;
|
specificcheckok = B_FALSE;
|
||||||
} else if (isimmobile(lf)) {
|
} else if (isimmobile(lf)) {
|
||||||
|
|
2
attack.c
2
attack.c
|
@ -2027,6 +2027,7 @@ int attackob(lifeform_t *lf, object_t *o, object_t *wep, flag_t *damflag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// objects inside might smash
|
// objects inside might smash
|
||||||
|
if (damtype[0] == DT_BASH) {
|
||||||
for (oo = o->contents->first ;oo ; oo = oo->next) {
|
for (oo = o->contents->first ;oo ; oo = oo->next) {
|
||||||
if (willshatter(oo->material->id) && onein(2)) {
|
if (willshatter(oo->material->id) && onein(2)) {
|
||||||
if (isplayer(lf)) {
|
if (isplayer(lf)) {
|
||||||
|
@ -2043,6 +2044,7 @@ int attackob(lifeform_t *lf, object_t *o, object_t *wep, flag_t *damflag) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return B_FALSE;
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
104
data.c
104
data.c
|
@ -524,6 +524,7 @@ void initjobs(void) {
|
||||||
addflag(lastjob->flags, F_STARTSKILL, SK_EVASION, PR_NOVICE, NA, NULL);
|
addflag(lastjob->flags, F_STARTSKILL, SK_EVASION, PR_NOVICE, NA, NULL);
|
||||||
addflag(lastjob->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL);
|
addflag(lastjob->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL);
|
||||||
addflag(lastjob->flags, F_STARTSKILL, SK_UNARMED, PR_ADEPT, NA, NULL);
|
addflag(lastjob->flags, F_STARTSKILL, SK_UNARMED, PR_ADEPT, NA, NULL);
|
||||||
|
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_NOVICE, NA, NULL);
|
||||||
addflag(lastjob->flags, F_STARTSKILL, SK_SEWING, PR_NOVICE, NA, NULL);
|
addflag(lastjob->flags, F_STARTSKILL, SK_SEWING, PR_NOVICE, NA, NULL);
|
||||||
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_NOVICE, NA, NULL);
|
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_NOVICE, NA, NULL);
|
||||||
// learnable skills
|
// learnable skills
|
||||||
|
@ -546,7 +547,7 @@ void initjobs(void) {
|
||||||
addflag(lastjob->flags, F_LEVSKILL, 2, SK_SS_MENTAL, NA, NULL);
|
addflag(lastjob->flags, F_LEVSKILL, 2, SK_SS_MENTAL, NA, NULL);
|
||||||
addflag(lastjob->flags, F_LEVFLAG, 2, F_MPDICE, 1, NULL);
|
addflag(lastjob->flags, F_LEVFLAG, 2, F_MPDICE, 1, NULL);
|
||||||
addflag(lastjob->flags, F_LEVFLAG, 3, F_DTIMMUNE, DT_FALL, NULL);
|
addflag(lastjob->flags, F_LEVFLAG, 3, F_DTIMMUNE, DT_FALL, NULL);
|
||||||
addflag(lastjob->flags, F_LEVSPELL, 3, OT_S_LOWERMETAB, NA, NULL);
|
//addflag(lastjob->flags, F_LEVSPELL, 3, OT_S_LOWERMETAB, NA, NULL);
|
||||||
// 4: self-healing (mp), immune to haste/slow (innate)
|
// 4: self-healing (mp), immune to haste/slow (innate)
|
||||||
addflag(lastjob->flags, F_LEVABIL, 4, OT_A_FLURRY, NA, "pw:1;");
|
addflag(lastjob->flags, F_LEVABIL, 4, OT_A_FLURRY, NA, "pw:1;");
|
||||||
addflag(lastjob->flags, F_LEVFLAG, 4, F_MEDITATES, B_TRUE, NULL);
|
addflag(lastjob->flags, F_LEVFLAG, 4, F_MEDITATES, B_TRUE, NULL);
|
||||||
|
@ -2094,7 +2095,7 @@ void initobjects(void) {
|
||||||
addflag(lastobjectclass->flags, F_OPERWITHOUTID, B_TRUE, NA, NA, NULL);
|
addflag(lastobjectclass->flags, F_OPERWITHOUTID, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastobjectclass->flags, F_OPERUSECHARGE, B_TRUE, NA, NA, NULL);
|
addflag(lastobjectclass->flags, F_OPERUSECHARGE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastobjectclass->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
addflag(lastobjectclass->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastobjectclass->flags, F_RNDCHARGES, 1, 8, NA, NULL);
|
addflag(lastobjectclass->flags, F_RNDCHARGES, 1, 12, NA, NULL);
|
||||||
|
|
||||||
addoc(OC_POTION, "Potions", "A strange concoction contained within a small flask.", '!', C_GREY, RR_COMMON);
|
addoc(OC_POTION, "Potions", "A strange concoction contained within a small flask.", '!', C_GREY, RR_COMMON);
|
||||||
addocnoun(lastobjectclass, "potion");
|
addocnoun(lastobjectclass, "potion");
|
||||||
|
@ -3621,6 +3622,10 @@ void initobjects(void) {
|
||||||
addot(OT_SANDWICHPB, "peanut butter sandwich", "An extremely filling sandwich. Restores all stamina, boosts Fitness, and restores some health.", MT_FOOD, 0.1, OC_FOOD, SZ_TINY);
|
addot(OT_SANDWICHPB, "peanut butter sandwich", "An extremely filling sandwich. Restores all stamina, boosts Fitness, and restores some health.", MT_FOOD, 0.1, OC_FOOD, SZ_TINY);
|
||||||
addflag(lastot->flags, F_GLYPH, C_LIGHTBROWN, '%', NA, NULL);
|
addflag(lastot->flags, F_GLYPH, C_LIGHTBROWN, '%', NA, NULL);
|
||||||
addflag(lastot->flags, F_EDIBLE, B_TRUE, 200, NA, "");
|
addflag(lastot->flags, F_EDIBLE, B_TRUE, 200, NA, "");
|
||||||
|
addot(OT_SCREAMERSLICE, "screamer slice", "The extremely tasty stalk of a dead screamer plant.", MT_FOOD, 0.5, OC_FOOD, SZ_TINY);
|
||||||
|
addflag(lastot->flags, F_GLYPH, C_DARKMAGENTA, '%', NA, NULL);
|
||||||
|
addflag(lastot->flags, F_EDIBLE, B_TRUE, 150, NA, "");
|
||||||
|
addflag(lastot->flags, F_RARITY, H_FOREST, 90, NA, NULL);
|
||||||
addot(OT_SUGAR, "lump of sugar", "A small block of sugar. Used for cooking.", MT_FOOD, 0.1, OC_FOOD, SZ_TINY);
|
addot(OT_SUGAR, "lump of sugar", "A small block of sugar. Used for cooking.", MT_FOOD, 0.1, OC_FOOD, SZ_TINY);
|
||||||
addflag(lastot->flags, F_GLYPH, C_WHITE, '%', NA, NULL);
|
addflag(lastot->flags, F_GLYPH, C_WHITE, '%', NA, NULL);
|
||||||
addflag(lastot->flags, F_EDIBLE, B_TRUE, 5, NA, "");
|
addflag(lastot->flags, F_EDIBLE, B_TRUE, 5, NA, "");
|
||||||
|
@ -5760,6 +5765,8 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||||
addot(OT_A_DEBUG, "debug", "You can toggle debugging for a lifeform.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
addot(OT_A_DEBUG, "debug", "You can toggle debugging for a lifeform.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||||
|
addot(OT_A_DUMPMON, "dump monsters", "dump html monster list to monsters.html", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||||
|
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||||
addot(OT_A_ENHANCE, "enhance stats", "Enhance a lifeform's stats.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
addot(OT_A_ENHANCE, "enhance stats", "Enhance a lifeform's stats.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||||
addot(OT_A_LEARN, "learn", "Learn new skills.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
addot(OT_A_LEARN, "learn", "Learn new skills.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||||
|
@ -5916,6 +5923,11 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||||
addot(OT_A_RESIZE, "resize armour", "Adjust the fit of a piece of armour or clothing.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
addot(OT_A_RESIZE, "resize armour", "Adjust the fit of a piece of armour or clothing.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||||
|
addot(OT_A_SCREAM, "deafening scream", "Emit an ultra-loud scream, deafening all adjacent enemies.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||||
|
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_STAMCOST, 1, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_DONTNEED, NA, NULL);
|
||||||
addot(OT_A_SHIELDBASH, "shield bash", "Attempt to stun your opponent by bashing them with your shield.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
addot(OT_A_SHIELDBASH, "shield bash", "Attempt to stun your opponent by bashing them with your shield.", MT_NOTHING, 0, OC_ABILITY, SZ_TINY);
|
||||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
addflag(lastot->flags, F_SPELLSCHOOL, SS_ABILITY, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_ADJVICTIM, NA, NA, NULL);
|
addflag(lastot->flags, F_AICASTTOATTACK, ST_ADJVICTIM, NA, NA, NULL);
|
||||||
|
@ -9782,6 +9794,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_OBATTACKDELAY, 110, NA, NA, NULL);
|
addflag(lastot->flags, F_OBATTACKDELAY, 110, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CANBEDIFFMAT, MT_BONE, 33, NA, NULL);
|
addflag(lastot->flags, F_CANBEDIFFMAT, MT_BONE, 33, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_CANBLOCK, DT_SLASH, NA, NA, NULL);
|
||||||
addot(OT_CLUBSPIKE, "spiked club", "A heavy wooden club with embedded spikes.", MT_WOOD, 8, OC_WEAPON, SZ_MEDIUM);
|
addot(OT_CLUBSPIKE, "spiked club", "A heavy wooden club with embedded spikes.", MT_WOOD, 8, OC_WEAPON, SZ_MEDIUM);
|
||||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL);
|
||||||
addflag(lastot->flags, F_RARITY, H_CAVE, 100, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_CAVE, 100, NA, NULL);
|
||||||
|
@ -9792,6 +9805,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_OBATTACKDELAY, 110, NA, NA, NULL);
|
addflag(lastot->flags, F_OBATTACKDELAY, 110, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CANBEDIFFMAT, MT_BONE, 33, NA, NULL);
|
addflag(lastot->flags, F_CANBEDIFFMAT, MT_BONE, 33, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_CANBLOCK, DT_SLASH, NA, NA, NULL);
|
||||||
addot(OT_GREATCLUB, "great club", "An enormous, very heavy, blunt instrument to hit things with.", MT_STONE, 15, OC_WEAPON, SZ_MEDIUM);
|
addot(OT_GREATCLUB, "great club", "An enormous, very heavy, blunt instrument to hit things with.", MT_STONE, 15, OC_WEAPON, SZ_MEDIUM);
|
||||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL);
|
||||||
addflag(lastot->flags, F_RARITY, H_CAVE, 50, NA, NULL);
|
addflag(lastot->flags, F_RARITY, H_CAVE, 50, NA, NULL);
|
||||||
|
@ -9830,7 +9844,13 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_DAM, DT_BASH, 5, NA, NULL);
|
addflag(lastot->flags, F_DAM, DT_BASH, 5, NA, NULL);
|
||||||
addflag(lastot->flags, F_ACCURACY, 90, NA, NA, NULL);
|
addflag(lastot->flags, F_ACCURACY, 90, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_CLUBS, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_CLUBS, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CANBLOCK, DT_SLASH, NA, NA, NULL);
|
|
||||||
|
addot(OT_CUDGEL, "cudgel", "An small club, commonly used by thugs and footpads.", MT_WOOD, 2, OC_WEAPON, SZ_MEDIUM);
|
||||||
|
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_RARITY, H_CAVE, 100, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_DAM, DT_BASH, 3, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_ACCURACY, 90, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_USESSKILL, SK_CLUBS, NA, NA, NULL);
|
||||||
|
|
||||||
|
|
||||||
// hammer
|
// hammer
|
||||||
|
@ -15241,7 +15261,6 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL);
|
addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_CANWILL, OT_A_CRUSH, NA, NA, "dam:2d6;");
|
addflag(lastrace->flags, F_CANWILL, OT_A_CRUSH, NA, NA, "dam:2d6;");
|
||||||
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
|
||||||
// plants
|
// plants
|
||||||
addrace(R_BINGEBARK, "bingebark", 30, 'T', C_DARKRED, MT_WOOD, RC_PLANT, "A dry, withered tree with many leafless branches, its dead bark stained by blood.");
|
addrace(R_BINGEBARK, "bingebark", 30, 'T', C_DARKRED, MT_WOOD, RC_PLANT, "A dry, withered tree with many leafless branches, its dead bark stained by blood.");
|
||||||
addbodypart(lastrace, BP_BODY, "trunk");
|
addbodypart(lastrace, BP_BODY, "trunk");
|
||||||
|
@ -15266,7 +15285,6 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_HASATTACK, OT_WHIPATTACK, 6, NA, NULL);
|
addflag(lastrace->flags, F_HASATTACK, OT_WHIPATTACK, 6, NA, NULL);
|
||||||
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL);
|
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL);
|
||||||
addflag(lastrace->flags, F_CANWILL, OT_A_SNATCH, NA, NA, "range:1;");
|
addflag(lastrace->flags, F_CANWILL, OT_A_SNATCH, NA, NA, "range:1;");
|
||||||
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
|
||||||
addflag(lastrace->flags, F_CANWILL, OT_A_SNATCH, NA, NA, "pw:1;");
|
addflag(lastrace->flags, F_CANWILL, OT_A_SNATCH, NA, NA, "pw:1;");
|
||||||
addflag(lastrace->flags, F_CANWILL, OT_S_SUCK, NA, NA, "pw:1;range:2;");
|
addflag(lastrace->flags, F_CANWILL, OT_S_SUCK, NA, NA, "pw:1;range:2;");
|
||||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "extends its branches");
|
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "extends its branches");
|
||||||
|
@ -15294,7 +15312,6 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_HASATTACK, OT_WHIPATTACK, 6, NA, NULL);
|
addflag(lastrace->flags, F_HASATTACK, OT_WHIPATTACK, 6, NA, NULL);
|
||||||
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
|
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, "dam:1d4;");
|
addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, "dam:1d4;");
|
||||||
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
|
||||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||||
|
|
||||||
addrace(R_CACTUS, "cactus", 30, 'F', C_LIGHTGREEN, MT_PLANT, RC_PLANT, "A wide upright plant coated with sharp spines. Said to sprout delicious fruit.");
|
addrace(R_CACTUS, "cactus", 30, 'F', C_LIGHTGREEN, MT_PLANT, RC_PLANT, "A wide upright plant coated with sharp spines. Said to sprout delicious fruit.");
|
||||||
|
@ -15403,7 +15420,6 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
|
||||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
|
||||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
|
||||||
|
@ -15461,7 +15477,6 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
|
||||||
addflag(lastrace->flags, F_HARMLESS, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_HARMLESS, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL);
|
||||||
|
@ -15487,7 +15502,6 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL);
|
||||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
|
||||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
|
||||||
|
@ -15532,6 +15546,33 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_TR, 2, NA, NA, NULL);
|
addflag(lastrace->flags, F_TR, 2, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_DTRESIST, DT_BASH, NA, NA, NULL);
|
addflag(lastrace->flags, F_DTRESIST, DT_BASH, NA, NA, NULL);
|
||||||
|
|
||||||
|
addrace(R_SCREAMER, "screamer", 50, 'P', C_DARKMAGENTA, MT_PLANT, RC_PLANT, "Screamers look like an upright stalk of purple-coloured broccoli. While they are mobile and considered hostile creatures, their only method of attack is an extremely loud scream. This scream only deals minor damage itself, but is sure to attract the attention of anything nearby.");
|
||||||
|
addbodypart(lastrace, BP_BODY, NULL);
|
||||||
|
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||||
|
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
|
||||||
|
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL);
|
||||||
|
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||||
|
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LOW, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_EXLOW, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "screamer slice");
|
||||||
|
addflag(lastrace->flags, F_NOPRINTS, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, "");
|
||||||
|
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_TR, 2, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_DTRESIST, DT_BASH, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_CASTWITHOUTIQ, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_CANWILL, OT_A_SCREAM, 2, 2, "pw:5;dam:1d1;");
|
||||||
|
addflag(lastrace->flags, F_NOISETEXT, N_DEAFENSCREAM, SV_PLANE, NA, "screams piercingly!^a deafening scream!");
|
||||||
// end plants
|
// end plants
|
||||||
|
|
||||||
// animals
|
// animals
|
||||||
|
@ -15807,8 +15848,8 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||||
addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL);
|
addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_FAST, NA, NA, NULL);
|
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_MAXATTACKS, 2, 2, NA, NULL);
|
addflag(lastrace->flags, F_MAXATTACKS, 1, 2, NA, NULL);
|
||||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
||||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
||||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL);
|
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL);
|
||||||
|
@ -15844,7 +15885,6 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LTAVERAGE, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LTAVERAGE, NA, NULL);
|
||||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||||
addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL);
|
|
||||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
||||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL);
|
||||||
|
@ -16981,7 +17021,7 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
||||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||||
addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL);
|
addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_FREQUENT, NULL);
|
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_FREQUENT, NULL);
|
||||||
|
@ -18560,7 +18600,7 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||||
addflag(lastrace->flags, F_CANWILL, OT_A_FLY, NA, NA, NULL);
|
addflag(lastrace->flags, F_CANWILL, OT_A_FLY, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_A_FLY, NA, NA, NULL);
|
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_A_FLY, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||||
addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL);
|
addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_TR, 1, NA, NA, NULL);
|
addflag(lastrace->flags, F_TR, 1, NA, NA, NULL);
|
||||||
|
@ -18578,6 +18618,37 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL);
|
addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL);
|
||||||
|
|
||||||
|
addrace(R_BEE, "giant bee", 10, 'i', C_LIGHTYELLOW, MT_FLESH, RC_INSECT, "An enormous black and yellow bumblebee, with a nasty-looking stinger.");
|
||||||
|
setbodytype(lastrace, BT_FLYINGINSECT);
|
||||||
|
addbodypart(lastrace, BP_TAIL, "stinger");
|
||||||
|
addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LTAVERAGE, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_GTAVERAGE, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||||
|
addflag(lastrace->flags, F_CANWILL, OT_A_FLY, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_A_FLY, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||||
|
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||||
|
addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_TR, 2, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_STARTSKILL, SK_FLIGHT, PR_BEGINNER, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_CASTCHANCE, 20, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_HASATTACK, OT_STING, 2, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_CANWILL, OT_A_STINGACID, NA, NA, "dam:1d4;pw:5;");
|
||||||
|
addflag(lastrace->flags, F_DIEAFTERUSING, OT_A_STINGACID, NA, NA, "using its stinger");
|
||||||
|
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, SV_SHOUT, NA, "buzzes angrily^an angry buzzing");
|
||||||
|
addflag(lastrace->flags, F_NOISETEXT, N_FLY, SV_SHOUT, NA, "^buzzing wings");
|
||||||
|
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
|
||||||
|
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
||||||
|
|
||||||
addrace(R_CENTIPEDE, "giant centipede", 3, 'I', C_GREEN, MT_FLESH, RC_INSECT, "Giant centipedes are long, many-legged creatures with a poisonous bite.");
|
addrace(R_CENTIPEDE, "giant centipede", 3, 'I', C_GREEN, MT_FLESH, RC_INSECT, "Giant centipedes are long, many-legged creatures with a poisonous bite.");
|
||||||
addbodypart(lastrace, BP_EYES, NULL);
|
addbodypart(lastrace, BP_EYES, NULL);
|
||||||
addbodypart(lastrace, BP_HEAD, NULL);
|
addbodypart(lastrace, BP_HEAD, NULL);
|
||||||
|
@ -18671,8 +18742,8 @@ void initrace(void) {
|
||||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||||
addflag(lastrace->flags, F_CANWILL, OT_A_FLY, NA, NA, NULL);
|
addflag(lastrace->flags, F_CANWILL, OT_A_FLY, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_A_FLY, NA, NA, NULL);
|
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_A_FLY, NA, NA, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
|
||||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||||
addflag(lastrace->flags, F_HITDICE, 1, NA, 4, NULL);
|
addflag(lastrace->flags, F_HITDICE, 1, NA, 4, NULL);
|
||||||
addflag(lastrace->flags, F_TR, 1, NA, NA, NULL);
|
addflag(lastrace->flags, F_TR, 1, NA, NA, NULL);
|
||||||
|
@ -20193,6 +20264,7 @@ void initrace(void) {
|
||||||
addflag(r->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL);
|
addflag(r->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL);
|
||||||
addflag(r->flags, F_DAYBOOST, 10, NA, NA, NULL);
|
addflag(r->flags, F_DAYBOOST, 10, NA, NA, NULL);
|
||||||
addflag(r->flags, F_NONAUSEA, B_TRUE, NA, NA, NULL);
|
addflag(r->flags, F_NONAUSEA, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(r->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
||||||
} else if (r->raceclass->id == RC_SLIME) {
|
} else if (r->raceclass->id == RC_SLIME) {
|
||||||
addflag(r->flags, F_NOBREATH, B_TRUE, NA, NA, NULL);
|
addflag(r->flags, F_NOBREATH, B_TRUE, NA, NA, NULL);
|
||||||
addflag(r->flags, F_DISEASEIMMUNE, B_TRUE, NA, NA, NULL);
|
addflag(r->flags, F_DISEASEIMMUNE, B_TRUE, NA, NA, NULL);
|
||||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
9
defs.h
9
defs.h
|
@ -1399,6 +1399,7 @@ enum RACE {
|
||||||
R_FUNGUSRAGE,
|
R_FUNGUSRAGE,
|
||||||
R_NUTTER,
|
R_NUTTER,
|
||||||
R_SAWGRASS,
|
R_SAWGRASS,
|
||||||
|
R_SCREAMER,
|
||||||
R_UNYON,
|
R_UNYON,
|
||||||
// animals
|
// animals
|
||||||
R_ANT,
|
R_ANT,
|
||||||
|
@ -1481,6 +1482,7 @@ enum RACE {
|
||||||
R_EARTHWYRM,
|
R_EARTHWYRM,
|
||||||
R_WYVERN,
|
R_WYVERN,
|
||||||
// insects
|
// insects
|
||||||
|
R_BEE,
|
||||||
R_BEETLE,
|
R_BEETLE,
|
||||||
R_BLASTBUG,
|
R_BLASTBUG,
|
||||||
R_BUTTERFLY,
|
R_BUTTERFLY,
|
||||||
|
@ -1807,6 +1809,7 @@ enum OBTYPE {
|
||||||
OT_SALT,
|
OT_SALT,
|
||||||
OT_SANDWICHCHEESE,
|
OT_SANDWICHCHEESE,
|
||||||
OT_SANDWICHPB,
|
OT_SANDWICHPB,
|
||||||
|
OT_SCREAMERSLICE,
|
||||||
OT_SUGAR,
|
OT_SUGAR,
|
||||||
OT_TOAST,
|
OT_TOAST,
|
||||||
OT_TOMATO,
|
OT_TOMATO,
|
||||||
|
@ -2146,6 +2149,7 @@ enum OBTYPE {
|
||||||
OT_S_SIZEDOWN,
|
OT_S_SIZEDOWN,
|
||||||
OT_S_SPIKEVOLLEY,
|
OT_S_SPIKEVOLLEY,
|
||||||
// -- divine powers
|
// -- divine powers
|
||||||
|
OT_A_DUMPMON,
|
||||||
OT_S_CREATEVAULT,
|
OT_S_CREATEVAULT,
|
||||||
OT_S_GIFT,
|
OT_S_GIFT,
|
||||||
OT_S_WISH,
|
OT_S_WISH,
|
||||||
|
@ -2187,6 +2191,7 @@ enum OBTYPE {
|
||||||
OT_A_RAGE,
|
OT_A_RAGE,
|
||||||
OT_A_REPAIR,
|
OT_A_REPAIR,
|
||||||
OT_A_RESIZE,
|
OT_A_RESIZE,
|
||||||
|
OT_A_SCREAM,
|
||||||
OT_A_SHIELDBASH,
|
OT_A_SHIELDBASH,
|
||||||
OT_A_SNATCH,
|
OT_A_SNATCH,
|
||||||
OT_A_SONICBOLT,
|
OT_A_SONICBOLT,
|
||||||
|
@ -2629,6 +2634,7 @@ enum OBTYPE {
|
||||||
// clubs
|
// clubs
|
||||||
OT_CLUB,
|
OT_CLUB,
|
||||||
OT_CLUBSPIKE,
|
OT_CLUBSPIKE,
|
||||||
|
OT_CUDGEL,
|
||||||
OT_GREATCLUB,
|
OT_GREATCLUB,
|
||||||
OT_MACE,
|
OT_MACE,
|
||||||
OT_MORNINGSTAR,
|
OT_MORNINGSTAR,
|
||||||
|
@ -2731,6 +2737,7 @@ enum NOISETYPE {
|
||||||
N_LOWHP,
|
N_LOWHP,
|
||||||
N_FRUSTRATED,
|
N_FRUSTRATED,
|
||||||
N_SONICBOLT,
|
N_SONICBOLT,
|
||||||
|
N_DEAFENSCREAM,
|
||||||
N_WARCRY,
|
N_WARCRY,
|
||||||
N_SPELLCAST,
|
N_SPELLCAST,
|
||||||
N_TOOCLOSE,
|
N_TOOCLOSE,
|
||||||
|
@ -3480,6 +3487,8 @@ enum FLAG {
|
||||||
// v2: (optional) will also remove flags of CANCAST
|
// v2: (optional) will also remove flags of CANCAST
|
||||||
// with v0 = this.
|
// with v0 = this.
|
||||||
// text: object name of severed limb to drop
|
// text: object name of severed limb to drop
|
||||||
|
F_DIEAFTERUSING, // after this lf uses ability/spell id v0, they
|
||||||
|
// instantly die.
|
||||||
F_DONEPICKUP, // lf has used their free pickup/drop for this turn.
|
F_DONEPICKUP, // lf has used their free pickup/drop for this turn.
|
||||||
F_DONEKNOWLEDGETRADE, // you've already traded knowledge with this
|
F_DONEKNOWLEDGETRADE, // you've already traded knowledge with this
|
||||||
// person.
|
// person.
|
||||||
|
|
44
io.c
44
io.c
|
@ -1236,7 +1236,7 @@ char askdir(char *prompt, int maycancel, int usedrunk) {
|
||||||
dir = chartodir(dirch);
|
dir = chartodir(dirch);
|
||||||
|
|
||||||
// tipsy...
|
// tipsy...
|
||||||
if (usedrunk && movesrandomly(player)) {
|
if (usedrunk && willmoverandomly(player)) {
|
||||||
int dir;
|
int dir;
|
||||||
dir = rnd(DC_N, DC_NW+1);
|
dir = rnd(DC_N, DC_NW+1);
|
||||||
if (dir == (DC_NW + 1)) {
|
if (dir == (DC_NW + 1)) {
|
||||||
|
@ -12224,7 +12224,7 @@ void showlfstats(lifeform_t *lf, int showall) {
|
||||||
}
|
}
|
||||||
|
|
||||||
doheadingsmall(mainwin, y, 0, ftext, "Mana");
|
doheadingsmall(mainwin, y, 0, ftext, "Mana");
|
||||||
wprintw(mainwin, "%d / %d%s ", lf->mp , lf->maxmp,maxmpstr);
|
wprintw(mainwin, "%d / %d%s ", lf->mp , getmaxmp(lf),maxmpstr);
|
||||||
y++;
|
y++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12350,7 +12350,7 @@ void showlfstats(lifeform_t *lf, int showall) {
|
||||||
if (min == max) {
|
if (min == max) {
|
||||||
wprintw(mainwin, "%d", max); y2++;
|
wprintw(mainwin, "%d", max); y2++;
|
||||||
} else {
|
} else {
|
||||||
wprintw(mainwin, "%d-%d", min,max); y2++;
|
wprintw(mainwin, "%d(after move)/%d", min,max); y2++;
|
||||||
}
|
}
|
||||||
y2++;
|
y2++;
|
||||||
|
|
||||||
|
@ -13370,6 +13370,44 @@ void showlfstats(lifeform_t *lf, int showall) {
|
||||||
y++;
|
y++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// temperature
|
||||||
|
if (isplayer(lf) || (lorelev >= PR_BEGINNER)) {
|
||||||
|
int temp;
|
||||||
|
temp = getlftemp(lf);
|
||||||
|
if (temp != T_NORMAL) {
|
||||||
|
mvwprintw(mainwin, y, 0, "%s %s feeling %s.", you(lf), is(lf), gettemperaturename(temp)); y++;
|
||||||
|
if (temp < T_NORMAL) { // cold
|
||||||
|
int pen;
|
||||||
|
pen = gettempaccpenalty(lf, temp);
|
||||||
|
if (pen) {
|
||||||
|
mvwprintw(mainwin, y, 0, " %d accuracy due to exposed body parts.",pen); y++;
|
||||||
|
}
|
||||||
|
if (!isimmuneto(lf->flags, DT_COLD, B_FALSE) && !isresistantto(lf->flags, DT_COLD, B_FALSE)) {
|
||||||
|
mvwprintw(mainwin, y, 0, " Cannot sleep due to cold."); y++;
|
||||||
|
}
|
||||||
|
mvwprintw(mainwin, y, 0, " Chance of shivering or getting sick due to cold."); y++;
|
||||||
|
} else { // hot
|
||||||
|
int pen;
|
||||||
|
if (!lfhasflag(lf, F_NOSTAM)) {
|
||||||
|
pen = gettempstammod(lf, temp);
|
||||||
|
if (pen != 100) {
|
||||||
|
mvwprintw(mainwin, y, 0, " %d%% Stamina usage due to heat.",pen); y++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!lfhasflag(lf, F_NOSLEEP) && (temp >= T_HOT)) {
|
||||||
|
mvwprintw(mainwin, y, 0, " Chance of waking from sleep due to heat."); y++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (temp >= T_HOT) {
|
||||||
|
mvwprintw(mainwin, y, 0, " Reduced healing rate due to heat."); y++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// spells
|
// spells
|
||||||
nfound = 0;
|
nfound = 0;
|
||||||
for (f = lf->flags->first ; f ; f = f->next) {
|
for (f = lf->flags->first ; f ; f = f->next) {
|
||||||
|
|
170
lf.c
170
lf.c
|
@ -838,7 +838,7 @@ int cancast(lifeform_t *lf, enum OBTYPE oid, int *mpcost) {
|
||||||
|
|
||||||
// do we have enough stamina to do this?
|
// do we have enough stamina to do this?
|
||||||
stamcost = getstamcost(lf, oid);
|
stamcost = getstamcost(lf, oid);
|
||||||
if (stamcost && (getstamina(lf) < stamcost)) {
|
if (stamcost && (getstamina(lf) < stamcost) && !lfhasflag(lf, F_NOSTAM)) {
|
||||||
reason = E_NOSTAM;
|
reason = E_NOSTAM;
|
||||||
return B_FALSE;
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -2349,6 +2349,12 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f = lfhasflagval(lf, F_DIEAFTERUSING, sid, NA, NA, NULL);
|
||||||
|
if (f) {
|
||||||
|
lf->hp = 0;
|
||||||
|
setlastdam(lf, f->text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -3557,18 +3563,21 @@ void die(lifeform_t *lf) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R_GODMERCY:
|
case R_GODMERCY:
|
||||||
if (getpietylev(R_GODMERCY, NULL, NULL) == PL_ECSTATIC) {
|
switch (getpietylev(R_GODMERCY, NULL, NULL)) {
|
||||||
i = 90;
|
case PL_ECSTATIC: i = 90; break;
|
||||||
} else {
|
case PL_DELIGHTED: i = 30; break;
|
||||||
i = 10;
|
case PL_PLEASED: i = 20; break;
|
||||||
|
case PL_INDIFFERENT: i = 10; break;
|
||||||
|
case PL_TOLERATED: i = 5; break;
|
||||||
|
default: i = 0; break;
|
||||||
}
|
}
|
||||||
if (onein(10)) {
|
if (pctchance(i)) {
|
||||||
char *nth;
|
char *nth;
|
||||||
f = incflag(lf->flags, F_NUMDEATHS, 1, NA, NA);
|
f = incflag(lf->flags, F_NUMDEATHS, 1, NA, NA);
|
||||||
nth = getnthtext(f->val[0]);
|
nth = getnthtext(f->val[0]);
|
||||||
sprintf(buf, "I will grant you %s %s chance, mortal... use it wisely.",
|
sprintf(buf, "I will grant you %s %s chance, mortal... use it wisely.",
|
||||||
needan(nth) ? "an" : "a", nth); more();
|
needan(nth) ? "an" : "a", nth); more();
|
||||||
godsay(god->race->id, B_TRUE, "I will grant you a second chance, mortal... use it wisely."); more();
|
godsay(god->race->id, B_TRUE, buf); more();
|
||||||
lf->hp = lf->maxhp;
|
lf->hp = lf->maxhp;
|
||||||
lf->alive = B_TRUE;
|
lf->alive = B_TRUE;
|
||||||
killflagsofid(lf->flags, F_DEAD);
|
killflagsofid(lf->flags, F_DEAD);
|
||||||
|
@ -8830,18 +8839,7 @@ int getlfaccuracy(lifeform_t *lf, object_t *wep) {
|
||||||
|
|
||||||
// cold = less accuracy
|
// cold = less accuracy
|
||||||
temp = getlftemp(lf);
|
temp = getlftemp(lf);
|
||||||
switch (temp) {
|
acc -= gettempaccpenalty(lf, temp);
|
||||||
case T_CHILLY:
|
|
||||||
acc -= (getexposedlimbs(lf)*2);
|
|
||||||
break;
|
|
||||||
case T_COLD:
|
|
||||||
acc -= (getexposedlimbs(lf)*3);
|
|
||||||
break;
|
|
||||||
case T_VCOLD:
|
|
||||||
acc -= (getexposedlimbs(lf)*4);
|
|
||||||
break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// day/night boosts
|
// day/night boosts
|
||||||
|
@ -9143,12 +9141,12 @@ void getmonkattacks(int level, int *rmin, int *rmax) {
|
||||||
|
|
||||||
int getmonkdr(int level) {
|
int getmonkdr(int level) {
|
||||||
int dr = 5;
|
int dr = 5;
|
||||||
if (level <= 2) {
|
if (level == 1) {
|
||||||
dr = 5;
|
dr = 5;
|
||||||
} else {
|
} else {
|
||||||
dr = level + 2;
|
dr = 5+(level/2);
|
||||||
}
|
}
|
||||||
limit(&dr, NA, 12);
|
limit(&dr, NA, 8);
|
||||||
return dr;
|
return dr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9355,6 +9353,11 @@ int getnoisedetails(lifeform_t *lf, enum NOISETYPE nid, flag_t *noiseflag,
|
||||||
}
|
}
|
||||||
ok = B_TRUE;
|
ok = B_TRUE;
|
||||||
}
|
}
|
||||||
|
} else if (nid == N_DEAFENSCREAM) {
|
||||||
|
if (volume) *volume = SV_PLANE;
|
||||||
|
if (heartext) strcpy(heartext, "a deafening scream");
|
||||||
|
if (seetext) strcpy(seetext, "screams loudly!");
|
||||||
|
ok = B_TRUE;
|
||||||
} else if (nid == N_DEATHKEEN) {
|
} else if (nid == N_DEATHKEEN) {
|
||||||
if (volume) *volume = SV_TALK;
|
if (volume) *volume = SV_TALK;
|
||||||
if (heartext) strcpy(heartext, "the dread wailing of death!");
|
if (heartext) strcpy(heartext, "the dread wailing of death!");
|
||||||
|
@ -9691,7 +9694,15 @@ int getattacks(lifeform_t *lf, int *min, int *max) {
|
||||||
|
|
||||||
if (min) *min = minattacks;
|
if (min) *min = minattacks;
|
||||||
if (max) *max = maxattacks;
|
if (max) *max = maxattacks;
|
||||||
nattacks = rnd(minattacks,maxattacks);
|
|
||||||
|
// if we moved last turn, get get the minimum attack amount.
|
||||||
|
// otherwise we get a randmo number between 2 and the max.
|
||||||
|
if (lfhasflag(lf, F_MOVED)) {
|
||||||
|
nattacks = minattacks;
|
||||||
|
} else {
|
||||||
|
nattacks = maxattacks;
|
||||||
|
}
|
||||||
|
//nattacks = rnd(minattacks,maxattacks);
|
||||||
|
|
||||||
return nattacks;
|
return nattacks;
|
||||||
}
|
}
|
||||||
|
@ -9838,6 +9849,32 @@ int real_getmr(lifeform_t *lf, int onlyexternal) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int gettempaccpenalty(lifeform_t *lf, int temperature) {
|
||||||
|
switch (temperature) {
|
||||||
|
case T_CHILLY:
|
||||||
|
return (getexposedlimbs(lf)*2);
|
||||||
|
break;
|
||||||
|
case T_COLD:
|
||||||
|
return (getexposedlimbs(lf)*3);
|
||||||
|
break;
|
||||||
|
case T_VCOLD:
|
||||||
|
return (getexposedlimbs(lf)*4);
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int gettempstammod(lifeform_t *lf, int temperature) {
|
||||||
|
switch (temperature) {
|
||||||
|
case T_WARM: return 150;
|
||||||
|
case T_HOT: return 200;
|
||||||
|
case T_VHOT: return 250;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
// get maximum vision range for a lf
|
// get maximum vision range for a lf
|
||||||
int getvisrange(lifeform_t *lf, int useambient) {
|
int getvisrange(lifeform_t *lf, int useambient) {
|
||||||
int range,i;
|
int range,i;
|
||||||
|
@ -10508,6 +10545,8 @@ int getstamina(lifeform_t *lf) {
|
||||||
|
|
||||||
int getstaminapct(lifeform_t *lf) {
|
int getstaminapct(lifeform_t *lf) {
|
||||||
float max;
|
float max;
|
||||||
|
if (lfhasflag(lf, F_NOSTAM)) return 100;
|
||||||
|
|
||||||
max = getmaxstamina(lf);
|
max = getmaxstamina(lf);
|
||||||
if ((max == 0) || lfhasflag(lf, F_NOSTAM)) return 100;
|
if ((max == 0) || lfhasflag(lf, F_NOSTAM)) return 100;
|
||||||
return ((float)lf->stamina / max) * 100.0;
|
return ((float)lf->stamina / max) * 100.0;
|
||||||
|
@ -15998,20 +16037,40 @@ void applywalkdam(lifeform_t *lf, int dam, enum DAMTYPE damtype, object_t *o, in
|
||||||
|
|
||||||
void apply_wep_tr_limit(lifeform_t *lf, condset_t *cs) {
|
void apply_wep_tr_limit(lifeform_t *lf, condset_t *cs) {
|
||||||
if (!isplayer(lf)) {
|
if (!isplayer(lf)) {
|
||||||
int tr,maxdr = NA;
|
object_t *wep[MAXCANDIDATES];
|
||||||
|
flag_t *dflag[MAXCANDIDATES];
|
||||||
|
int nweps = 0,i;
|
||||||
|
int tr,maxdr = NA,thresh = 0;
|
||||||
|
obpile_t *op = NULL;
|
||||||
// generate a set of conditions for this lf's weapon.
|
// generate a set of conditions for this lf's weapon.
|
||||||
// this is basically to prevent lowlevel monsters from
|
// this is basically to prevent lowlevel monsters from
|
||||||
// starting with super strong weapon!
|
// starting with super strong weapon!
|
||||||
|
|
||||||
|
getweapons(lf, B_MELEEONLY, wep, dflag, NULL, &op,&nweps);
|
||||||
|
// get highest damage innate attack
|
||||||
|
for (i = 0; i < nweps; i++) {
|
||||||
|
if (dflag[i]->val[1] > maxdr) maxdr = dflag[i]->val[1];
|
||||||
|
}
|
||||||
|
if (op) {
|
||||||
|
killobpile(op);
|
||||||
|
}
|
||||||
|
|
||||||
tr = gettr(lf);
|
tr = gettr(lf);
|
||||||
if (ISINRANGE(tr,0,4)) {
|
if (ISINRANGE(tr,0,4)) {
|
||||||
getgoodnessdr(G_AVERAGE, NULL, &maxdr);
|
//getgoodnessdr(G_AVERAGE, NULL, &maxdr);
|
||||||
|
thresh = 2;
|
||||||
} else if (ISINRANGE(tr,5,7)) {
|
} else if (ISINRANGE(tr,5,7)) {
|
||||||
getgoodnessdr(G_GOOD, NULL, &maxdr);
|
//getgoodnessdr(G_GOOD, NULL, &maxdr);
|
||||||
|
thresh = 4;
|
||||||
} else if (ISINRANGE(tr,8,10)) {
|
} else if (ISINRANGE(tr,8,10)) {
|
||||||
getgoodnessdr(G_EXCELLENT, NULL, &maxdr);
|
//getgoodnessdr(G_EXCELLENT, NULL, &maxdr);
|
||||||
|
thresh = 6;
|
||||||
|
} else {
|
||||||
|
thresh = 20; // basically unlimited
|
||||||
}
|
}
|
||||||
if (maxdr != NA) {
|
if (maxdr != NA) {
|
||||||
addcond(cs, CC_MAXDR, B_TRUE, maxdr);
|
// can go a little higher, but not too much.
|
||||||
|
addcond(cs, CC_MAXDR, B_TRUE, maxdr+2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16306,13 +16365,13 @@ void autoskill(lifeform_t *lf) {
|
||||||
switch (iqb) {
|
switch (iqb) {
|
||||||
case AT_EXLOW: max = PR_NOVICE; break;
|
case AT_EXLOW: max = PR_NOVICE; break;
|
||||||
case AT_VLOW: max = PR_NOVICE; break;
|
case AT_VLOW: max = PR_NOVICE; break;
|
||||||
case AT_LOW: max = PR_BEGINNER; break;
|
case AT_LOW: max = PR_NOVICE; break;
|
||||||
case AT_LTAVERAGE: max = PR_BEGINNER; break;
|
case AT_LTAVERAGE: max = PR_NOVICE; break;
|
||||||
case AT_AVERAGE: max = PR_ADEPT; break;
|
case AT_AVERAGE: max = PR_BEGINNER; break;
|
||||||
case AT_GTAVERAGE: max = PR_SKILLED; break;
|
case AT_GTAVERAGE: max = PR_BEGINNER; break;
|
||||||
case AT_HIGH: max = PR_SKILLED; break;
|
case AT_HIGH: max = PR_ADEPT; break;
|
||||||
case AT_VHIGH: max = PR_EXPERT; break;
|
case AT_VHIGH: max = PR_ADEPT; break;
|
||||||
case AT_EXHIGH: max = PR_MASTER; break;
|
case AT_EXHIGH: max = PR_SKILLED; break;
|
||||||
default: max = PR_ADEPT; break;
|
default: max = PR_ADEPT; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16938,6 +16997,10 @@ int losehp(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, ch
|
||||||
return losehp_real(lf, amt, damtype, fromlf, damsrc, B_DAMADJUST, NULL, B_RETALIATE, NULL, B_DAMEFFECTS, BP_NONE, B_NOCRIT);
|
return losehp_real(lf, amt, damtype, fromlf, damsrc, B_DAMADJUST, NULL, B_RETALIATE, NULL, B_DAMEFFECTS, BP_NONE, B_NOCRIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int losehp_noarm(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc) {
|
||||||
|
return losehp_real(lf, amt, damtype, fromlf, damsrc, B_DAMADJUST, NULL, B_RETALIATE, NULL, B_NODAMEFFECTS, BP_NONE, B_NOCRIT);
|
||||||
|
}
|
||||||
|
|
||||||
int losehp_bp(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc, int bodypart) {
|
int losehp_bp(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc, int bodypart) {
|
||||||
return losehp_real(lf, amt, damtype, fromlf, damsrc, B_DAMADJUST, NULL, B_RETALIATE, NULL, B_DAMEFFECTS, bodypart, B_NOCRIT);
|
return losehp_real(lf, amt, damtype, fromlf, damsrc, B_DAMADJUST, NULL, B_RETALIATE, NULL, B_DAMEFFECTS, bodypart, B_NOCRIT);
|
||||||
}
|
}
|
||||||
|
@ -17912,7 +17975,7 @@ int makelearnable(lifeform_t *lf, enum SKILL skid) {
|
||||||
|
|
||||||
// returns TRUE on failure.
|
// returns TRUE on failure.
|
||||||
int makenauseated(lifeform_t *lf, int amt, int howlong, enum ERROR *why) {
|
int makenauseated(lifeform_t *lf, int amt, int howlong, enum ERROR *why) {
|
||||||
flag_t *f,*nflag = NULL;
|
flag_t *nflag = NULL;
|
||||||
if (why) *why = E_OK;
|
if (why) *why = E_OK;
|
||||||
|
|
||||||
switch (lf->race->raceclass->id) {
|
switch (lf->race->raceclass->id) {
|
||||||
|
@ -17966,7 +18029,7 @@ int makenauseated(lifeform_t *lf, int amt, int howlong, enum ERROR *why) {
|
||||||
if (nflag) {
|
if (nflag) {
|
||||||
if ((nflag->lifetime >= 0) && (nflag->lifetime < howlong)) {
|
if ((nflag->lifetime >= 0) && (nflag->lifetime < howlong)) {
|
||||||
nflag->lifetime = howlong;
|
nflag->lifetime = howlong;
|
||||||
nflag->val[0] = MAXOF(f->val[0], amt);
|
nflag->val[0] = MAXOF(nflag->val[0], amt);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
addtempflag(lf->flags, F_NAUSEATED, amt, NA, NA, NULL, howlong);
|
addtempflag(lf->flags, F_NAUSEATED, amt, NA, NA, NULL, howlong);
|
||||||
|
@ -18436,12 +18499,7 @@ void modstamina(lifeform_t *lf, float howmuch) {
|
||||||
|
|
||||||
// hot = use stamina more quickly
|
// hot = use stamina more quickly
|
||||||
temp = getlftemp(lf);
|
temp = getlftemp(lf);
|
||||||
switch (temp) {
|
howmuch = pctof(gettempstammod(lf,temp),howmuch);
|
||||||
case T_WARM: howmuch = pctof(150,howmuch); break;
|
|
||||||
case T_HOT: howmuch = pctof(200,howmuch); break;
|
|
||||||
case T_VHOT: howmuch = pctof(250,howmuch); break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isplayer(lf)) {
|
if (isplayer(lf)) {
|
||||||
if (howmuch < 0) {
|
if (howmuch < 0) {
|
||||||
|
@ -18497,23 +18555,25 @@ int movecausesnoise(lifeform_t *lf) {
|
||||||
return B_TRUE;
|
return B_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int movesrandomly(lifeform_t *lf) {
|
// chance of this lf moving randomly due to drunkenness etc...
|
||||||
|
int willmoverandomly(lifeform_t *lf) {
|
||||||
flag_t *f;
|
flag_t *f;
|
||||||
int rndmove = B_FALSE;
|
|
||||||
f = lfhasflag(lf, F_DRUNK);
|
f = lfhasflag(lf, F_DRUNK);
|
||||||
if (f) {
|
if (f) {
|
||||||
if (!hasjob(lf, J_PIRATE)) {
|
if (!hasjob(lf, J_PIRATE)) {
|
||||||
if (rnd(1,6) <= ((f->lifetime/TM_DRUNKTIME)+1)) {
|
if (rnd(1,6) <= ((f->lifetime/TM_DRUNKTIME)+1)) {
|
||||||
// randomize move
|
// randomize move
|
||||||
rndmove = B_TRUE; // ie. you can walk into walls now.
|
return B_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (iswoozy(lf)) {
|
|
||||||
rndmove = B_TRUE;
|
|
||||||
} else if (lfhasflagval(lf, F_INJURY, IJ_TAILBRUISED, NA, NA, NULL) && onein(6)) {
|
|
||||||
rndmove = B_TRUE;
|
|
||||||
}
|
}
|
||||||
return rndmove;
|
if (iswoozy(lf) && onein(3)) {
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
|
if (lfhasflagval(lf, F_INJURY, IJ_TAILBRUISED, NA, NA, NULL) && onein(5)) {
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int needstobreath(lifeform_t *lf) {
|
int needstobreath(lifeform_t *lf) {
|
||||||
|
@ -18888,6 +18948,7 @@ enum NOISECLASS noisetypetoclass(enum NOISETYPE nt) {
|
||||||
case N_FLY:
|
case N_FLY:
|
||||||
return NC_MOVEMENT;
|
return NC_MOVEMENT;
|
||||||
case N_SONICBOLT:
|
case N_SONICBOLT:
|
||||||
|
case N_DEAFENSCREAM:
|
||||||
case N_DEATHKEEN:
|
case N_DEATHKEEN:
|
||||||
case N_WARCRY:
|
case N_WARCRY:
|
||||||
return NC_SPELLEFFECT;
|
return NC_SPELLEFFECT;
|
||||||
|
@ -25467,6 +25528,7 @@ int useability(lifeform_t *lf, enum OBTYPE aid, lifeform_t *who, cell_t *where)
|
||||||
rv = abilityeffects(lf, aid, where, who, cwflag);
|
rv = abilityeffects(lf, aid, where, who, cwflag);
|
||||||
|
|
||||||
if (!rv) {
|
if (!rv) {
|
||||||
|
flag_t *f;
|
||||||
objecttype_t *ot;
|
objecttype_t *ot;
|
||||||
int stamcost = 0;
|
int stamcost = 0;
|
||||||
// success - charge stamina
|
// success - charge stamina
|
||||||
|
@ -25476,6 +25538,12 @@ int useability(lifeform_t *lf, enum OBTYPE aid, lifeform_t *who, cell_t *where)
|
||||||
modstamina(lf, -stamcost);
|
modstamina(lf, -stamcost);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f = lfhasflagval(lf, F_DIEAFTERUSING, aid, NA, NA, NULL);
|
||||||
|
if (f) {
|
||||||
|
lf->hp = 0;
|
||||||
|
setlastdam(lf, f->text);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
|
5
lf.h
5
lf.h
|
@ -243,6 +243,8 @@ float getmaxstamina(lifeform_t *lf);
|
||||||
object_t *getmeleeweapon(lifeform_t *lf);
|
object_t *getmeleeweapon(lifeform_t *lf);
|
||||||
int getmr(lifeform_t *lf);
|
int getmr(lifeform_t *lf);
|
||||||
int real_getmr(lifeform_t *lf, int onlyexternal);
|
int real_getmr(lifeform_t *lf, int onlyexternal);
|
||||||
|
int gettempaccpenalty(lifeform_t *lf, int temperature);
|
||||||
|
int gettempstammod(lifeform_t *lf, int temperature);
|
||||||
int getvisrange(lifeform_t *lf, int useambient);
|
int getvisrange(lifeform_t *lf, int useambient);
|
||||||
void idxtoxy(lifeform_t *lf, int idx, int *x, int *y);
|
void idxtoxy(lifeform_t *lf, int idx, int *x, int *y);
|
||||||
//void setviscell(lifeform_t *lf, cell_t *cell, int how);
|
//void setviscell(lifeform_t *lf, cell_t *cell, int how);
|
||||||
|
@ -425,6 +427,7 @@ int loadfirearmfast(lifeform_t *lf, int onpurpose);
|
||||||
void loseconcentration(lifeform_t *lf);
|
void loseconcentration(lifeform_t *lf);
|
||||||
void loseconsciousness(lifeform_t *lf, int howlong, lifeform_t *fromlf);
|
void loseconsciousness(lifeform_t *lf, int howlong, lifeform_t *fromlf);
|
||||||
int losehp(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc);
|
int losehp(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc);
|
||||||
|
int losehp_noarm(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc);
|
||||||
int losehp_bp(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc, int bodypart);
|
int losehp_bp(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc, int bodypart);
|
||||||
int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc, int reducedam, object_t *fromob, int retaliate, int *waskod, int doeffects, int bodypart, int fromcrit);
|
int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc, int reducedam, object_t *fromob, int retaliate, int *waskod, int doeffects, int bodypart, int fromcrit);
|
||||||
void losehpeffects(lifeform_t *lf, int dam, enum DAMTYPE damtype, lifeform_t *fromlf, object_t *fromob, int retaliate, int ko, int *waskod, int prelowhp, int bodypart, int damreducebyarm, int crit);
|
void losehpeffects(lifeform_t *lf, int dam, enum DAMTYPE damtype, lifeform_t *fromlf, object_t *fromob, int retaliate, int ko, int *waskod, int prelowhp, int bodypart, int damreducebyarm, int crit);
|
||||||
|
@ -453,7 +456,7 @@ void modmorale(lifeform_t *lf, int howmuch);
|
||||||
int modskillcheckroll(lifeform_t *lf, enum CHECKTYPE ct, int *roll);
|
int modskillcheckroll(lifeform_t *lf, enum CHECKTYPE ct, int *roll);
|
||||||
void modstamina(lifeform_t *lf, float howmuch);
|
void modstamina(lifeform_t *lf, float howmuch);
|
||||||
int movecausesnoise(lifeform_t *lf);
|
int movecausesnoise(lifeform_t *lf);
|
||||||
int movesrandomly(lifeform_t *lf);
|
int willmoverandomly(lifeform_t *lf);
|
||||||
int needstobreath(lifeform_t *lf);
|
int needstobreath(lifeform_t *lf);
|
||||||
int needstorest(lifeform_t *lf, char *validchars);
|
int needstorest(lifeform_t *lf, char *validchars);
|
||||||
void noarmouron(race_t *r, enum BODYPART bp);
|
void noarmouron(race_t *r, enum BODYPART bp);
|
||||||
|
|
5
map.c
5
map.c
|
@ -10394,7 +10394,10 @@ void setcelltype(cell_t *cell, enum CELLTYPE id) {
|
||||||
assert(cell->type);
|
assert(cell->type);
|
||||||
cell->hp = cell->type->hp;
|
cell->hp = cell->type->hp;
|
||||||
if (cell->type->solid) {
|
if (cell->type->solid) {
|
||||||
assert(!cell->obpile->first);
|
if (cell->obpile->first) {
|
||||||
|
killallobs(cell->obpile);
|
||||||
|
}
|
||||||
|
//assert(!cell->obpile->first);
|
||||||
}
|
}
|
||||||
if (gamemode == GM_GAMESTARTED) {
|
if (gamemode == GM_GAMESTARTED) {
|
||||||
|
|
||||||
|
|
4
move.c
4
move.c
|
@ -3016,7 +3016,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
||||||
setfacing(lf, dir);
|
setfacing(lf, dir);
|
||||||
drawscreen();
|
drawscreen();
|
||||||
|
|
||||||
if (isplayer(lf) && !lfhasflag(lf, F_AICONTROLLED)) {
|
if (isplayer(lf) && !lfhasflag(lf, F_AICONTROLLED) && !lfhasflag(lf, F_RUNNING)) {
|
||||||
addflagifneeded(lf->flags, F_TURNED, B_TRUE, NA, NA, NULL);
|
addflagifneeded(lf->flags, F_TURNED, B_TRUE, NA, NA, NULL);
|
||||||
lf->turncounter++;
|
lf->turncounter++;
|
||||||
if (lf->turncounter >= 5) {
|
if (lf->turncounter >= 5) {
|
||||||
|
@ -3049,7 +3049,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rndmove = movesrandomly(lf);
|
rndmove = willmoverandomly(lf);
|
||||||
if (rndmove) {
|
if (rndmove) {
|
||||||
dir = rnd(DC_N, DC_NW);
|
dir = rnd(DC_N, DC_NW);
|
||||||
strafe = B_TRUE;
|
strafe = B_TRUE;
|
||||||
|
|
|
@ -9282,6 +9282,8 @@ object_t *real_moveob(object_t *src, obpile_t *dst, int howmany, int stackok) {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (!o) return NULL;
|
||||||
|
|
||||||
// special effects if a lifeform picked up an object
|
// special effects if a lifeform picked up an object
|
||||||
if (dst->owner) {
|
if (dst->owner) {
|
||||||
//flag_t *f;
|
//flag_t *f;
|
||||||
|
@ -12186,6 +12188,11 @@ void quaff(lifeform_t *lf, object_t *o) {
|
||||||
willid = B_TRUE;
|
willid = B_TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case OT_POT_MAGIC:
|
||||||
|
if (lf->mp < getmaxmp(lf)) {
|
||||||
|
willid = B_TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case OT_FOUNTAIN:
|
case OT_FOUNTAIN:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
45
spell.c
45
spell.c
|
@ -333,6 +333,10 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
||||||
}
|
}
|
||||||
return B_TRUE;
|
return B_TRUE;
|
||||||
}
|
}
|
||||||
|
if (adjcell->lf) {
|
||||||
|
if (isplayer(user)) msg("Your path there is blocked!");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// take some time
|
// take some time
|
||||||
taketime(user, getactspeed(user));
|
taketime(user, getactspeed(user));
|
||||||
|
@ -2046,6 +2050,29 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
||||||
practice(user, SK_SEWING, 1);
|
practice(user, SK_SEWING, 1);
|
||||||
// TODO: make this like eating/resting/etc ?
|
// TODO: make this like eating/resting/etc ?
|
||||||
taketime(user, getactspeed(user));
|
taketime(user, getactspeed(user));
|
||||||
|
} else if (abilid == OT_A_SCREAM) {
|
||||||
|
lifeform_t *lf;
|
||||||
|
if (lfhasflag(user, F_SILENCED)) {
|
||||||
|
if (isplayer(user)) msg("You are unable to make a sound!");
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!validatespellcell(user, &targcell,TT_MONSTER, abilid, power, B_FALSE)) return B_TRUE;
|
||||||
|
|
||||||
|
makenoise(user, N_DEAFENSCREAM);
|
||||||
|
|
||||||
|
// adjacent lfs must pass a magic resistance check or die
|
||||||
|
for (lf = user->cell->map->lf ; lf ; lf = lf->next) {
|
||||||
|
if (lf != user) {
|
||||||
|
int nwalls;
|
||||||
|
if (canhear(lf, user->cell, SV_PLANE, &nwalls) && isadjacent(lf->cell, user->cell)) {
|
||||||
|
if ((nwalls == 0) && !lfhasflag(lf, F_DEAF)) {
|
||||||
|
addtempflag(lf->flags, F_DEAF, B_TRUE, NA, NA, NULL, rnd(30,50));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if (abilid == OT_A_SHIELDBASH) {
|
} else if (abilid == OT_A_SHIELDBASH) {
|
||||||
object_t *shield = NULL;
|
object_t *shield = NULL;
|
||||||
flag_t *f;
|
flag_t *f;
|
||||||
|
@ -2291,8 +2318,12 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
||||||
}
|
}
|
||||||
losehp(target, roll(damstr), DT_ACID, user, killername);
|
losehp(target, roll(damstr), DT_ACID, user, killername);
|
||||||
if (!lfhasflagval(target, F_PAIN, DT_ACID, NA,NA, NULL)) {
|
if (!lfhasflagval(target, F_PAIN, DT_ACID, NA,NA, NULL)) {
|
||||||
// cause ongoing pain for 2 turns
|
int howlong = 2;
|
||||||
addtempflag(target->flags, F_PAIN, DT_ACID, NA, NA, damstr, 2);
|
if (power > 0) {
|
||||||
|
howlong = power * 2;
|
||||||
|
}
|
||||||
|
// cause ongoing pain for power*2 turns
|
||||||
|
addtempflag(target->flags, F_PAIN, DT_ACID, NA, NA, damstr, howlong);
|
||||||
}
|
}
|
||||||
taketime(user, getactspeed(user));
|
taketime(user, getactspeed(user));
|
||||||
} else if (abilid == OT_A_STUDYSCROLL) {
|
} else if (abilid == OT_A_STUDYSCROLL) {
|
||||||
|
@ -3305,6 +3336,9 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
||||||
if (where && where->lf) {
|
if (where && where->lf) {
|
||||||
debug(where->lf);
|
debug(where->lf);
|
||||||
}
|
}
|
||||||
|
} else if (abilid == OT_A_DUMPMON) {
|
||||||
|
dumpmonsters(H_DUNGEON);
|
||||||
|
msg("Monster list dumped to monsters.html.");
|
||||||
} else if (abilid == OT_A_PATHFIND) {
|
} else if (abilid == OT_A_PATHFIND) {
|
||||||
cell_t *where;
|
cell_t *where;
|
||||||
where = askcoords("Pathfind to where?", "Pathfind->",TT_NONE, user, UNLIMITED, LOF_DONTNEED, B_FALSE);
|
where = askcoords("Pathfind to where?", "Pathfind->",TT_NONE, user, UNLIMITED, LOF_DONTNEED, B_FALSE);
|
||||||
|
@ -6200,7 +6234,10 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
||||||
}
|
}
|
||||||
|
|
||||||
if (haslos(player, targcell)) {
|
if (haslos(player, targcell)) {
|
||||||
msg("A cloud of darkness descends!");
|
msg("A cloud of darkness descends nearby!");
|
||||||
|
if (seenbyplayer) *seenbyplayer = B_TRUE;
|
||||||
|
} else if (getcelldist(player->cell, targcell) <= radius) {
|
||||||
|
msg("A cloud of darkness descends on you!");
|
||||||
if (seenbyplayer) *seenbyplayer = B_TRUE;
|
if (seenbyplayer) *seenbyplayer = B_TRUE;
|
||||||
}
|
}
|
||||||
} else if (spellid == OT_S_DEATHKEEN) {
|
} else if (spellid == OT_S_DEATHKEEN) {
|
||||||
|
@ -9448,7 +9485,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
||||||
int failed = B_FALSE;
|
int failed = B_FALSE;
|
||||||
target = targcell->lf;
|
target = targcell->lf;
|
||||||
|
|
||||||
if (lfhasflag(target, F_PAIN)) {
|
if (lfhasflag(target, F_PAIN) || isundead(target)) {
|
||||||
fizzle(caster);
|
fizzle(caster);
|
||||||
return B_TRUE;
|
return B_TRUE;
|
||||||
}
|
}
|
||||||
|
|
6
vault.c
6
vault.c
|
@ -326,7 +326,7 @@ void addvaultcontents(map_t *m, vault_t *v, int minx, int miny, int maxx, int ma
|
||||||
}
|
}
|
||||||
} // end foreach x/y
|
} // end foreach x/y
|
||||||
|
|
||||||
if (db) dblog("cells counted=%d",totcells);
|
if (db) dblog("cells counted=%d, valid=%d",totcells,nposs);
|
||||||
|
|
||||||
if (totcells == 0) {
|
if (totcells == 0) {
|
||||||
dblog("PROBLEM: couldn't find place to put vaultscatter thing!");
|
dblog("PROBLEM: couldn't find place to put vaultscatter thing!");
|
||||||
|
@ -417,12 +417,12 @@ int addvaultthing(cell_t *c, vault_t *v, enum VAULTTHING vt, char *what) {
|
||||||
break;
|
break;
|
||||||
case VT_LF:
|
case VT_LF:
|
||||||
lf = addmonster(c, R_SPECIFIED, what, B_TRUE, 1, B_TRUE, B_NOEXTRA, NULL);
|
lf = addmonster(c, R_SPECIFIED, what, B_TRUE, 1, B_TRUE, B_NOEXTRA, NULL);
|
||||||
if (!lf) {
|
/*if (!lf) {
|
||||||
dblog("invalid racename '%s' in vault %s", what, v->id);
|
dblog("invalid racename '%s' in vault %s", what, v->id);
|
||||||
msg("invalid racename '%s' in vault %s", what, v->id);
|
msg("invalid racename '%s' in vault %s", what, v->id);
|
||||||
raise(SIGINT);
|
raise(SIGINT);
|
||||||
rv = B_TRUE;
|
rv = B_TRUE;
|
||||||
}
|
}*/
|
||||||
// first lifeform in a shop is the shopkeeper
|
// first lifeform in a shop is the shopkeeper
|
||||||
/*
|
/*
|
||||||
if (lf && hasflag(v->flags, F_VAULTISSHOP)) {
|
if (lf && hasflag(v->flags, F_VAULTISSHOP)) {
|
||||||
|
|
Loading…
Reference in New Issue