- [+] add a glyph for 'bright light'. yellow sun
- [+] bug: i was able to repair leather armour usint the metalwork skill. - [+] fix bug with vell not getting starting weapon. - [+] monsters: don't walk on producelsight obs if you have sensitive, uncovered eyes. - [+] (if wis >= animal) - [+] snakes shoudl have f_enhancesmell and bad eyesight. also lower their tremossense range - [+] new lore: skills which auto makeknown() objects based on rarity. - [+] lore:chemistry - potions - [+] lore:relics = rings/amulets - [+] lore:language = scrolls / books - [+] also study scrolls - [+] lore:arcana: wands+magic creatures - [+] finalise work to redo god piety - [+] amberon - [+] thrilled = poly immune, - [+] glorana - [+] t = auto bless weapons / arm - [+] ekrub - [+] e = autotangle (instead of d) - [+] yumi - [+] e = 90 save life chance - [+] felix - [+] p = enhance stealth ? - [+] t = enhance search 20 - [+] e = enhance lockpick 50
This commit is contained in:
parent
49893b20e4
commit
095fb8b7d4
116
data.c
116
data.c
|
@ -301,6 +301,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_ARMOUR, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_HUMANOID, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_UNDEAD, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
|
||||
// learnable skills
|
||||
for (i = 1; i < MAXSKILLS; i++) {
|
||||
addflag(lastjob->flags, F_CANLEARN, i, NA, NA, NULL);
|
||||
|
@ -371,6 +372,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_COOKING, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_EVASION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LISTEN, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_CHEMISTRY, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_NATURE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SHORTBLADES, PR_NOVICE, NA, NULL);
|
||||
|
@ -420,6 +422,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_SWIMMING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_TECHUSAGE, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_CHEMISTRY, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_HUMANOID, PR_SKILLED, NA, NULL);
|
||||
// learnable skills
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_BACKSTAB, PR_ADEPT, NA, NULL);
|
||||
|
@ -450,7 +453,11 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_CLIMBING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_COOKING, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_EVASION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_ARCANA, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_CHEMISTRY, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_NATURE, PR_SKILLED, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_RELICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_CARTOGRAPHY, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
|
||||
|
@ -499,6 +506,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "nylon rope");
|
||||
// initial skills
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_HUMANOID, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_RELICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_ATHLETICS, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_CARTOGRAPHY, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_COMBAT, PR_BEGINNER, NA, NULL);
|
||||
|
@ -674,6 +682,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_LONGBLADES, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_EXOTICWEPS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_HUMANOID, PR_SKILLED, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_CHEMISTRY, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_THROWING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_STEALTH, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_TECHUSAGE, PR_BEGINNER, NA, NULL);
|
||||
|
@ -724,7 +733,9 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_SHORTBLADES, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LONGBLADES, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_HUMANOID, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_NATURE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_RELICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_RANGED, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_SKILLED, NA, NULL);
|
||||
|
@ -824,6 +835,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_TECHUSAGE, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_THIEVERY, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_THROWING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_CHEMISTRY, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_HUMANOID, PR_BEGINNER, NA, NULL);
|
||||
// learnable skills
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_ARMOUR, PR_NOVICE, NA, NULL); // limit
|
||||
|
@ -852,9 +864,9 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_JOBATTRMOD, A_CON, 0, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_EVIL, NA, NA, "e");
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "short sword");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "bone dagger");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "5 poisoned knifes");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "3 potions of posion");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "3 potions of poison");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "leather cloak");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "leather armour");
|
||||
// initial skills
|
||||
|
@ -870,6 +882,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_TECHUSAGE, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_THROWING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_CHEMISTRY, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_HUMANOID, PR_BEGINNER, NA, NULL);
|
||||
// learnable skills
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_ARMOUR, PR_NOVICE, NA, NULL); // limit
|
||||
|
@ -1028,6 +1041,8 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_ATHLETICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_ARMOUR, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SHIELDS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_ARCANA, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_RELICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_HUMANOID, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_NATURE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SEWING, PR_NOVICE, NA, NULL);
|
||||
|
@ -1155,6 +1170,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_SHIELDS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_HUMANOID, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_NATURE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_ARCANA, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SEWING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_METALWORK, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
|
||||
|
@ -1283,6 +1299,8 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_ARCANA, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_UNDEAD, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_DEMONS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_RELICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_CHANNELING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_NOVICE, NA, NULL);
|
||||
|
@ -1340,6 +1358,8 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_ARCANA, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_UNDEAD, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_DEMONS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_RELICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_CHANNELING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_NOVICE, NA, NULL);
|
||||
|
@ -1396,6 +1416,8 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_ARCANA, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_UNDEAD, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_DEMONS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_RELICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_CHANNELING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_NOVICE, NA, NULL);
|
||||
|
@ -1452,6 +1474,8 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_ARCANA, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_UNDEAD, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_DEMONS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_RELICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_CHANNELING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_NOVICE, NA, NULL);
|
||||
|
@ -1508,6 +1532,8 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_ARCANA, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_UNDEAD, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_DEMONS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_LANGUAGE, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_LORE_RELICS, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_CHANNELING, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SPEECH, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_NOVICE, NA, NULL);
|
||||
|
@ -2608,8 +2634,9 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_MAGICLIGHT, "very bright light", "A very bright light, seemingly coming from nowhere.", MT_MAGIC, 0, OC_EFFECT, SZ_HUGE);
|
||||
addflag(lastot->flags, F_NOGLYPH, NA, NA, NA, NULL);
|
||||
//addflag(lastot->flags, F_NOGLYPH, NA, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_WHITE, UNI_SUN, 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_THEREISHERE, B_TRUE, NA, NA, "!");
|
||||
|
@ -2618,7 +2645,8 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_MAGICDARK, "unnatural darkness", "An unnattural area of pitch black darkness.", MT_MAGIC, 0, OC_EFFECT, SZ_HUGE);
|
||||
addflag(lastot->flags, F_NOGLYPH, NA, NA, NA, NULL);
|
||||
//addflag(lastot->flags, F_NOGLYPH, NA, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_BLUE, UNI_CLOUD, 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_NOFEEL, B_TRUE, NA, NA, NULL);
|
||||
|
@ -10816,6 +10844,7 @@ void initrace(void) {
|
|||
// granted bonuses
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_PLEASED, GB_FLAG, F_PRODUCESLIGHT, "5,NA,NA");
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_DELIGHTED, GB_FLAG, F_HOLYAURA, "1,NA,NA");
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_DELIGHTED, GB_FLAG, F_POLYIMMUNE, "1,NA,NA");
|
||||
sprintf(buf, "%d,%d,NA",PERMENANT, AL_EVIL);
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_ECSTATIC, GB_FLAG, F_PROTALIGN, buf);
|
||||
// likes/dislikes
|
||||
|
@ -10983,8 +11012,8 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "blessing armour");
|
||||
// god bonus
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_PLEASED, GB_FLAG, F_PLANTFRIEND, "-1,NA,NA");
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_DELIGHTED, GB_FLAG, F_AUTOTANGLE, "10,5,NA");
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_DELIGHTED, GB_FLAG, F_DISEASEIMMUNE, "1,NA,NA");
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_ECSTATIC, GB_FLAG, F_AUTOTANGLE, "20,5,NA");
|
||||
|
||||
|
||||
|
||||
|
@ -11003,7 +11032,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_TR, 50, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "+5 dagger of sharpness");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "+5 dagger of penetration");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed ring of hunger");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "10 huge bags of holding");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "10 huge bags of holding");
|
||||
|
@ -11045,6 +11074,13 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "unlocking doors");
|
||||
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "uncursing items");
|
||||
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "identifying objects");
|
||||
// god bonus
|
||||
sprintf(buf, "%d,20,NA", SC_STEALTH);
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_PLEASED, GB_FLAG, F_SKILLCHECKMOD, buf);
|
||||
sprintf(buf, "%d,30,NA", SC_OPENLOCKS);
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_DELIGHTED, GB_FLAG, F_SKILLCHECKMOD, buf);
|
||||
sprintf(buf, "%d,40,NA", SC_SEARCH);
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_ECSTATIC, GB_FLAG, F_SKILLCHECKMOD, buf);
|
||||
|
||||
addrace(R_GODLIFE, "Glorana", 2, '@', C_BOLDMAGENTA, MT_FLESH, RC_GOD, "Glorana is the goddess of life. She appears as a pulsating orb of holy energy.");
|
||||
addbodypart(lastrace, BP_BODY, "life energy");
|
||||
|
@ -11102,7 +11138,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_GODNOBATTLE, NA, NA, NA, "creating holy water");
|
||||
// god bonuses
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_PLEASED, GB_FLAG, F_STAMBOOST, "3");
|
||||
// TODO: t = auto bless weapon
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_DELIGHTED, GB_FLAG, F_HOLYTOUCH, "1");
|
||||
addflag(lastrace->flags, F_GODBONUS, PL_ECSTATIC, GB_FLAG, F_REGENERATES, "1,NA,NA");
|
||||
|
||||
addrace(R_GODDEATH, "Hecta", 100, '@', C_BOLDMAGENTA, MT_BONE, RC_GOD, "The skeletal god of Death is garbed in a cloak made of pure shadow. and weilds an enormous scythe.");
|
||||
|
@ -11124,7 +11160,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "cloak of shadows");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "bone helmet");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "10-20 bones");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "+15 scythe of sharpness");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "+15 scythe of penetration");
|
||||
//addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_SS_DEATH, PR_MASTER, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL);
|
||||
|
@ -11287,7 +11323,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "cotton shirt of health");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "cloth trousers ");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "cloth trousers");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed longsword of mercy");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "ring of miracles");
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_FIRSTAID, PR_MASTER, NA, NULL);
|
||||
|
@ -13007,7 +13043,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, B_COVETS, NA, NULL);
|
||||
|
||||
addrace(R_OGRA, "ogra", 160, 'O', C_BROWN, MT_FLESH, RC_HUMANOID, "Female ogres (known as 'ogras' are no less angry of hungry than the males of the species. They are however slightly faster and weaker.");
|
||||
addrace(R_OGRA, "ogra", 160, 'O', C_BROWN, MT_FLESH, RC_HUMANOID, "Female ogres (known as 'ogras' are no less angry or hungry than the males of the species. They are however slightly faster and weaker.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -16138,7 +16174,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slithering");
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "hisses^hissing");
|
||||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_VISRANGE, 1, NA, NA, NULL); // low vision range
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "10");
|
||||
|
@ -16167,7 +16205,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slithering");
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "hisses^hissing");
|
||||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_VISRANGE, 1, NA, NA, NULL); // low vision range
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addrace(R_SNAKETREE, "tree snake", 3, 's', C_GREEN, MT_FLESH, RC_ANIMAL, "Non-venomous snakes which leap at their prey.");
|
||||
|
@ -16197,7 +16237,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_VISRANGE, 1, NA, NA, NULL); // low vision range
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addrace(R_SNAKECOBRABLACK, "black cobra", 3, 's', C_BLUE, MT_FLESH, RC_ANIMAL, "Black cobras can spit globs of venom at their prey.");
|
||||
|
@ -16228,7 +16270,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "spits");
|
||||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_VISRANGE, 1, NA, NA, NULL); // low vision range
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "15");
|
||||
|
@ -16261,7 +16305,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_POISON, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_BLINDNESS, 4, 4, "pw:3;range:2;");
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_VISRANGE, 1, NA, NA, NULL); // low vision range
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "15");
|
||||
|
@ -16292,7 +16338,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_DEAF, B_TRUE, 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_TREMORSENSE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_VISRANGE, 1, NA, NA, NULL); // low vision range
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addrace(R_SNAKEWATER, "water snake", 3, 's', C_BLUE, MT_FLESH, RC_ANIMAL, "Aquatic snakes who can nevertheless exist quite happily on land. Non-venomous.");
|
||||
|
@ -16327,7 +16375,9 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slithering");
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "hisses^hissing");
|
||||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_VISRANGE, 1, NA, NA, NULL); // low vision range
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addrace(R_SPIDER, "giant spider", 5, 'S', C_GREY, MT_FLESH, RC_ANIMAL, "An eight legged beast which features prominently in many nightmares.");
|
||||
|
@ -19097,20 +19147,44 @@ void initskills(void) {
|
|||
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);
|
||||
// knowledge
|
||||
// descriptions for all of these will be added later.
|
||||
addskill(SK_LORE_ARCANA, "Lore:Arcana", "Allows you a chance of recognising magical objects and creatures.", 5);
|
||||
addskilldesc(SK_LORE_ARCANA, PR_NOVICE, "^gYou can attempt to identify objects with the 'inspect' ability.^n", B_FALSE);
|
||||
addskill(SK_LORE_ARCANA, "Lore:Arcana", "Allows you a chance of recognising magical wands and creatures.", 5);
|
||||
addskilldesc(SK_LORE_ARCANA, PR_NOVICE, "^gYou can attempt to identify wands with the 'inspect' ability.^n", B_FALSE);
|
||||
addskillabil(SK_LORE_ARCANA, PR_NOVICE, OT_A_INSPECT, NA, NULL, B_FALSE);
|
||||
addskillabil(SK_LORE_ARCANA, PR_ADEPT, OT_A_STUDYSCROLL, NA, NULL, B_TRUE);
|
||||
addskilldesc(SK_LORE_ARCANA, PR_BEGINNER, "^gYou can now recognise very common wands.", B_TRUE);
|
||||
addskilldesc(SK_LORE_ARCANA, PR_ADEPT, "^gYou can now recognise common wands.", B_TRUE);
|
||||
addskilldesc(SK_LORE_ARCANA, PR_EXPERT, "^gYou can now recognise uncommon wands.", B_TRUE);
|
||||
addskilldesc(SK_LORE_ARCANA, PR_MASTER, "^gYou can now recognise rare wands.", B_TRUE);
|
||||
addskill(SK_LORE_CHEMISTRY, "Lore:Chemistry", "Allows you a chance of recognising potions.", 5);
|
||||
addskilldesc(SK_LORE_CHEMISTRY, PR_NOVICE, "^gYou can attempt to identify potions with the 'inspect' ability.^n", B_FALSE);
|
||||
addskillabil(SK_LORE_CHEMISTRY, PR_NOVICE, OT_A_INSPECT, NA, NULL, B_FALSE);
|
||||
addskilldesc(SK_LORE_CHEMISTRY, PR_BEGINNER, "^gYou can now recognise very common potions.", B_TRUE);
|
||||
addskilldesc(SK_LORE_CHEMISTRY, PR_ADEPT, "^gYou can now recognise common potions.", B_TRUE);
|
||||
addskilldesc(SK_LORE_CHEMISTRY, PR_EXPERT, "^gYou can now recognise uncommon potions.", B_TRUE);
|
||||
addskilldesc(SK_LORE_CHEMISTRY, PR_MASTER, "^gYou can now recognise rare potions.", B_TRUE);
|
||||
addskill(SK_LORE_DEMONS, "Lore:Demonology", "Determines your knowledge about demons.", 5);
|
||||
free(lastskill->shortname); lastskill->shortname = strdup("Lore:Demons");
|
||||
addskillabil(SK_LORE_DEMONS, PR_NOVICE, OT_S_EXORCISE, NA, NULL, B_TRUE);
|
||||
addskilldesc(SK_LORE_DEMONS, PR_SKILLED, "^gEvery 50 turns you can summon demons.", B_FALSE);
|
||||
addskillabil(SK_LORE_DEMONS, PR_SKILLED, OT_S_SUMMONDEMON, 50, "pw:1", B_FALSE);
|
||||
addskill(SK_LORE_HUMANOID, "Lore:Humanoid", "Determines your knowledge about humanoid (bipedal) creatures.", 5);
|
||||
addskill(SK_LORE_LANGUAGE, "Lore:Linguistics", "Allows you a chance of recognising scrolls and books.", 5);
|
||||
addskilldesc(SK_LORE_LANGUAGE, PR_NOVICE, "^gYou can attempt to identify scrolls/books with the 'inspect' ability.^n", B_FALSE);
|
||||
addskillabil(SK_LORE_LANGUAGE, PR_NOVICE, OT_A_INSPECT, NA, NULL, B_FALSE);
|
||||
addskillabil(SK_LORE_LANGUAGE, PR_ADEPT, OT_A_STUDYSCROLL, NA, NULL, B_TRUE);
|
||||
addskilldesc(SK_LORE_LANGUAGE, PR_BEGINNER, "^gYou can now recognise very common scrolls and books.", B_TRUE);
|
||||
addskilldesc(SK_LORE_LANGUAGE, PR_ADEPT, "^gYou can now recognise common scrolls and books.", B_TRUE);
|
||||
addskilldesc(SK_LORE_LANGUAGE, PR_EXPERT, "^gYou can now recognise uncommon scrolls and books.", B_TRUE);
|
||||
addskilldesc(SK_LORE_LANGUAGE, PR_MASTER, "^gYou can now recognise rare scrolls and books.", B_TRUE);
|
||||
addskill(SK_LORE_NATURE, "Lore:Nature", "Determines your knowledge of plants, animals and insects.", 5);
|
||||
addskill(SK_LORE_UNDEAD, "Lore:Undead", "Determines your knowledge of the undead.", 5);
|
||||
addskill(SK_LORE_DRAGONS, "Lore:Wyrms", "Determines your knowledge about wryms.", 5);
|
||||
addskill(SK_LORE_RELICS, "Lore:Relics", "Allows you a chance of recognising rings and amulets.", 5);
|
||||
addskilldesc(SK_LORE_RELICS, PR_NOVICE, "^gYou can attempt to identify rings/amulets with the 'inspect' ability.^n", B_FALSE);
|
||||
addskillabil(SK_LORE_RELICS, PR_NOVICE, OT_A_INSPECT, NA, NULL, B_FALSE);
|
||||
addskilldesc(SK_LORE_RELICS, PR_BEGINNER, "^gYou can now recognise very common rings and amulets.", B_TRUE);
|
||||
addskilldesc(SK_LORE_RELICS, PR_ADEPT, "^gYou can now recognise common rings and amulets.", B_TRUE);
|
||||
addskilldesc(SK_LORE_RELICS, PR_EXPERT, "^gYou can now recognise uncommon rings and amulets.", B_TRUE);
|
||||
addskilldesc(SK_LORE_RELICS, PR_MASTER, "^gYou can now recognise rare rings and amulets.", B_TRUE);
|
||||
|
||||
// weaponry
|
||||
addskill(SK_AXES, "Axes", "Helps you use chopping weapons like axes.", 50);
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
18
defs.h
18
defs.h
|
@ -65,6 +65,8 @@
|
|||
#define UNI_SHADEMED 0x2592
|
||||
#define UNI_SHADEDARK 0x2593
|
||||
#define UNI_SPIRAL 0x2202
|
||||
#define UNI_SUN 0x203B
|
||||
#define UNI_CLOUD 0x203B
|
||||
//#define UNI_SOLID '#'
|
||||
#define UNI_TUNNEL 0x2126
|
||||
#define UNI_TREELOTS 0x2051
|
||||
|
@ -699,10 +701,13 @@ enum SKILL {
|
|||
SK_TWOWEAPON,
|
||||
// knowledge
|
||||
SK_LORE_ARCANA,
|
||||
SK_LORE_CHEMISTRY,
|
||||
SK_LORE_DEMONS,
|
||||
SK_LORE_DRAGONS,
|
||||
SK_LORE_HUMANOID,
|
||||
SK_LORE_LANGUAGE,
|
||||
SK_LORE_NATURE,
|
||||
SK_LORE_RELICS,
|
||||
SK_LORE_UNDEAD,
|
||||
// weaponry
|
||||
SK_AXES,
|
||||
|
@ -728,7 +733,7 @@ enum SKILL {
|
|||
SK_SS_TRANSLOCATION,
|
||||
SK_SS_WILD,
|
||||
};
|
||||
#define MAXSKILLS 53
|
||||
#define MAXSKILLS 56
|
||||
|
||||
// proficiency levels
|
||||
enum SKILLLEVEL {
|
||||
|
@ -2732,7 +2737,7 @@ enum FLAG {
|
|||
F_MATIMMUNE, // immune to damage from obs with material 'v0'
|
||||
F_MATVULN, // vulnarable to damage from obs with material 'v0'
|
||||
// v1 = this % of damage is done. ie. 110%
|
||||
// if v2 > 0, you take this much dam by touching it
|
||||
// if v2 > 0, you take this much dam just from touching it
|
||||
F_PURIFIESTO, // v0 = new obid after purify food spell
|
||||
F_CLIMBOBSTACLE, // must pass climb check of difficulty v0 to
|
||||
// walk onto this object. if you fail, you fall
|
||||
|
@ -2843,6 +2848,12 @@ enum FLAG {
|
|||
F_LOCKABLE,// this object can be locked
|
||||
F_CANBEDIFFMAT, // v0 is different material id which this ob could be
|
||||
// v1 is the chance of it being this material
|
||||
// NOTE: when adding this to objects,always put the
|
||||
// less commons ones first. if a lf starts
|
||||
// with an object whose material they are
|
||||
// vulnerable to, the object's material will be
|
||||
// automatically changed to the first listed.
|
||||
// CANBEDIFFMAT.
|
||||
F_CANBETRAPPED, // this object might start with a trap
|
||||
// v0 = base pct chance
|
||||
// v1 = extra pct chance every 5 levels
|
||||
|
@ -3203,6 +3214,7 @@ enum FLAG {
|
|||
F_HOTFEET, // target takes v0 damage of type v1 unless they move.
|
||||
// text = killed by xxx
|
||||
F_MELEEDAMPCT, // all melee damage is changed to v0% of value.
|
||||
F_NUMDEATHS, // # times died and saved
|
||||
F_WASROBBED, // your stuff was stolen while you were
|
||||
// unconscious. announce it when you wake up.
|
||||
F_WOKENBY, // at the start of your next turn, you will wake up
|
||||
|
@ -3796,6 +3808,7 @@ enum FLAG {
|
|||
// text = name of armour.
|
||||
F_HOLYAURA, // holy aura - attacks deal holy damage to vulnerable
|
||||
// enemies.
|
||||
F_HOLYTOUCH, // weilded weapons/armour become temporarily blessed.
|
||||
F_LEARNBOOST, // +v0% xp and skillxp
|
||||
F_LEVITATING, // like flying but uncontrolled
|
||||
F_MAGSHIELD,// magnetic shield
|
||||
|
@ -3807,6 +3820,7 @@ enum FLAG {
|
|||
F_PHOTOMEM, // you don't forget your surroundings
|
||||
F_REGENERATES, // regenerate HP at val0 per turn
|
||||
F_RESISTMAG, // immunity to magic effects. v0= resist%
|
||||
F_POLYIMMUNE, // cannot be polymorphed.
|
||||
F_MPREGEN, // regenerate MP at val0 per turn
|
||||
F_RAGE, // you are enraged. v0/v1 will be set to player's old hp/maxhp
|
||||
F_REFLECTION, // missiles are reflected back at thrower
|
||||
|
|
19
flag.c
19
flag.c
|
@ -935,6 +935,25 @@ flag_t *hasflagval_real(flagpile_t *fp, int id, int val1, int val2, int val3, ch
|
|||
*/
|
||||
}
|
||||
|
||||
|
||||
flag_t *incflag(flagpile_t *fp, enum FLAG fid, int val1, int val2, int val3) {
|
||||
flag_t *f;
|
||||
f = hasflag(fp, fid);
|
||||
if (!f) {
|
||||
return addflag(fp, fid, val1, val1, val3, NULL);
|
||||
}
|
||||
// make sure there is only one!
|
||||
if (f->next && (f->next->id == fid)) {
|
||||
if (gamemode == GM_GAMESTARTED) msg("WARNING: incflag() found multiple flag instances");
|
||||
dblog("WARNING: incflag() found multiple flag instances (fid=%d)", (int)fid);
|
||||
}
|
||||
if (val1 != NA) f->val[0] += val1;
|
||||
if (val2 != NA) f->val[1] += val2;
|
||||
if (val3 != NA) f->val[2] += val3;
|
||||
return f;
|
||||
}
|
||||
|
||||
|
||||
int istransitoryflag(flag_t *f) {
|
||||
if ((f->lifetime >= FROMEXTERNAL_LOW) && (f->lifetime <= FROMEXTERNAL_HIGH)) {
|
||||
return B_FALSE;
|
||||
|
|
1
flag.h
1
flag.h
|
@ -35,6 +35,7 @@ flag_t *hasflag_real(flagpile_t *fp, int id, int wantknown, flag_t *exception, i
|
|||
flag_t *hasflagval(flagpile_t *fp, int id, int val1, int val2, int val3, /*@null@*/ char *text);
|
||||
flag_t *hasflagvalknown(flagpile_t *fp, int id, int val1, int val2, int val3, /*@null@*/ char *text);
|
||||
flag_t *hasflagval_real(flagpile_t *fp, int id, int val1, int val2, int val3, /*@null@*/ char *text, int wantknown, int lifetimeexception);
|
||||
flag_t *incflag(flagpile_t *fp, enum FLAG fid, int val1, int val2, int val3);
|
||||
int istransitoryflag(flag_t *f);
|
||||
int killflagsofid(flagpile_t *fp, enum FLAG fid);
|
||||
int killflagsofval(int count, flagpile_t *fp, enum FLAG fid, int v0, int v1, int v2, int lifetime, long obfrom);
|
||||
|
|
15
god.c
15
god.c
|
@ -538,6 +538,12 @@ void checkgodbonus(enum RACE rid, enum PIETYLEV newlev, enum PIETYLEV oldlev) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// non-auto-announced ones...
|
||||
if (newlev > oldlev) {
|
||||
if ((rid == R_GODMERCY) && (newlev == PL_ECSTATIC)) {
|
||||
godsay(rid, B_FALSE, "My mercy shall be with you!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dooffer(void) {
|
||||
|
@ -926,6 +932,15 @@ void givegodbonus(enum RACE rid, flag_t *bf) {
|
|||
if (!lfhasflagval(player, arg, targ[0], targ[1], targ[2], NULL)) {
|
||||
f = addtempflag(player->flags, arg, targ[0], targ[1], targ[2], NULL, FROMGODPIETY);
|
||||
f->obfrom = rid;
|
||||
// extra text for flags which aren't announced
|
||||
if (arg == F_SKILLCHECKMOD) {
|
||||
switch (targ[0]) {
|
||||
case SC_STEALTH: godsay(rid, B_FALSE, "Henceforce the shadows will cloak you!"); break;
|
||||
case SC_OPENLOCKS: godsay(rid, B_FALSE, "Locks will open at your touch!"); break;
|
||||
case SC_SEARCH: godsay(rid, B_FALSE, "That which is hidden shall be revealed!"); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GB_CANWILL:
|
||||
|
|
44
io.c
44
io.c
|
@ -1873,6 +1873,11 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
|
|||
msg("%s %s surrounded by a holy aura!", lfname, isplayer(lf) ? "are" : "is");
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_HOLYTOUCH:
|
||||
msg("%s%s %s are surrounded by a holy aura!", lfname, getpossessive(lfname),
|
||||
hasbp(lf, BP_HANDS) ? getbodypartname(lf, BP_HANDS) : "limbs");
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_LEARNBOOST:
|
||||
if (isplayer(lf)) {
|
||||
msg("You feel more receptive to new knowledge!");
|
||||
|
@ -1940,6 +1945,12 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
|
|||
donesomething = B_TRUE;
|
||||
}
|
||||
break;
|
||||
case F_POLYIMMUNE:
|
||||
if (isplayer(lf)) { // don't know if monsters get it
|
||||
msg("You feel very resistant to change.");
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
break;
|
||||
case F_PRODUCESLIGHT:
|
||||
msg("%s start%s producing light!", lfname, isplayer(lf) ? "" : "s");
|
||||
donesomething = B_TRUE;
|
||||
|
@ -2620,6 +2631,11 @@ int announceflagloss(lifeform_t *lf, flag_t *f) {
|
|||
msg("%s%s holy aura vanishes.", lfname, getpossessive(lfname));
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_HOLYTOUCH:
|
||||
msg("The holy aura vanishes from %s%s %s.", lfname, getpossessive(lfname),
|
||||
hasbp(lf, BP_HANDS) ? getbodypartname(lf, BP_HANDS) : "limbs");
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_LEARNBOOST:
|
||||
if (isplayer(lf)) {
|
||||
msg("You no longer feel receptive to new knowledge.");
|
||||
|
@ -2677,11 +2693,17 @@ int announceflagloss(lifeform_t *lf, flag_t *f) {
|
|||
}
|
||||
break;
|
||||
case F_PLANTFRIEND:
|
||||
if (isplayer(lf)) { // don't know if monsters get it
|
||||
if (isplayer(lf)) { // don't know if monsters lose it
|
||||
msg("You no longer feel an affinity towards plantlife.");
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
break;
|
||||
case F_POLYIMMUNE:
|
||||
if (isplayer(lf)) { // don't know if monsters lose it
|
||||
msg("You no longer feel resistant to change.");
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
break;
|
||||
case F_PRODUCESLIGHT:
|
||||
msg("%s %s no longer producing light.", lfname, is(lf));
|
||||
donesomething = B_TRUE;
|
||||
|
@ -7106,6 +7128,10 @@ char *makedesc_ob(object_t *o, char *retbuf) {
|
|||
sprintf(buf2, "%s prevents you from forgetting your surroundings.\n", buf);
|
||||
strncat(retbuf, buf2, HUGEBUFLEN);
|
||||
break;
|
||||
case F_POLYIMMUNE:
|
||||
sprintf(buf2, "%s prevents you from being polymorphed.\n", buf);
|
||||
strncat(retbuf, buf2, HUGEBUFLEN);
|
||||
break;
|
||||
case F_SIXTHSENSE:
|
||||
sprintf(buf2, "%s warns you about nearby enemies.\n", buf);
|
||||
strncat(retbuf, buf2, HUGEBUFLEN);
|
||||
|
@ -7587,7 +7613,7 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel
|
|||
}
|
||||
}
|
||||
break;
|
||||
case F_DODGES: if (lorelev >= PR_ADEPT) strcpy(buf, "Can dodge fatal attacks into adjacent locations"); break;
|
||||
case F_DODGES: if (lorelev >= PR_ADEPT) strcpy(buf, "Can dodge fatal attacks into adjacent locations."); break;
|
||||
case F_DTIMMUNE:
|
||||
if ((lorelev >= PR_BEGINNER) && !hasflag(doneflags, F_DTIMMUNE)) {
|
||||
if (f->val[0] == DT_ALL) {
|
||||
|
@ -7674,6 +7700,7 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel
|
|||
case F_NOSLEEP: if (lorelev >= PR_BEGINNER) sprintf(buf, "Does not sleep"); break;
|
||||
case F_PHALANX: if (lorelev >= PR_ADEPT) sprintf(buf, "Gains extra defence when in a pack."); break;
|
||||
case F_PHOTOMEM: sprintf(buf, "Photographic memory"); break;
|
||||
case F_POLYIMMUNE: if (lorelev >= PR_BEGINNER) sprintf(buf, "Immune to polymophic effects."); break;
|
||||
case F_REGENERATES: if (lorelev >= PR_BEGINNER) sprintf(buf, "Automatically regenerates health."); break;
|
||||
case F_RESISTMAG: if (lorelev >= PR_BEGINNER) sprintf(buf, "Magic-resistant"); break;
|
||||
case F_SEEINDARK: if (lorelev >= PR_BEGINNER) sprintf(buf, "Darkvision (range %d)", f->val[0]); break;
|
||||
|
@ -13792,6 +13819,12 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
mvwprintw(mainwin, y, 0, "%s %s surrounded by a holy aura.", you(lf), is(lf));
|
||||
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");
|
||||
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]));
|
||||
|
@ -13858,11 +13891,16 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
mvwprintw(mainwin, y, 0, "%s %s paralyzed.", you(lf), is(lf));
|
||||
y++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_PHOTOMEM, B_TRUE, NULL, FROMRACE);
|
||||
f = hasflag_real(lf->flags, F_PHOTOMEM, NA, NULL, FROMRACE);
|
||||
if (f) {
|
||||
mvwprintw(mainwin, y, 0, "%s do not forget your surroundings.", you(lf));
|
||||
y++;
|
||||
}
|
||||
f = hasflag_real(lf->flags, F_POLYIMMUNE, NA, NULL, FROMRACE);
|
||||
if (f) {
|
||||
mvwprintw(mainwin, y, 0, "%s cannot be polymorphed.", you(lf));
|
||||
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),
|
||||
|
|
167
lf.c
167
lf.c
|
@ -3314,7 +3314,17 @@ void die(lifeform_t *lf) {
|
|||
}
|
||||
break;
|
||||
case R_GODMERCY:
|
||||
if (getpietylev(R_GODMERCY, NULL, NULL) == PL_ECSTATIC) {
|
||||
i = 90;
|
||||
} else {
|
||||
i = 10;
|
||||
}
|
||||
if (onein(10)) {
|
||||
char *nth;
|
||||
f = incflag(lf->flags, F_NUMDEATHS, 1, NA, NA);
|
||||
nth = getnthtext(f->val[0]);
|
||||
sprintf(buf, "I will grant you %s %s chance, mortal... use it wisely.",
|
||||
needan(nth) ? "an" : "a", nth); more();
|
||||
godsay(god->race->id, B_TRUE, "I will grant you a second chance, mortal... use it wisely."); more();
|
||||
lf->hp = lf->maxhp;
|
||||
lf->alive = B_TRUE;
|
||||
|
@ -3322,6 +3332,8 @@ void die(lifeform_t *lf) {
|
|||
statdirty = B_TRUE;
|
||||
// teleport somewhere different.
|
||||
dospelleffects(god, OT_S_TELEPORT, 3, lf, NULL, NULL, B_UNCURSED, NULL, B_TRUE, NULL);
|
||||
// drop piety level.
|
||||
setpiety(R_GODMERCY, getpietycutoff(PL_INDIFFERENT));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -11545,6 +11557,51 @@ flag_t *giveskill(lifeform_t *lf, enum SKILL id) {
|
|||
makeknown(OT_MUSHROOMTOAD);
|
||||
}
|
||||
}
|
||||
} else if (id == SK_LORE_ARCANA) {
|
||||
if (isplayer(lf)) {
|
||||
switch (f->val[1]) {
|
||||
case PR_BEGINNER: makeknownobclass(OC_WAND, RR_FREQUENT); break;
|
||||
case PR_ADEPT: makeknownobclass(OC_WAND, RR_COMMON); break;
|
||||
case PR_SKILLED: makeknownobclass(OC_WAND, RR_UNCOMMON); break;
|
||||
case PR_EXPERT: makeknownobclass(OC_WAND, RR_RARE); break;
|
||||
case PR_MASTER: makeknownobclass(OC_WAND, RR_VERYRARE); break;
|
||||
}
|
||||
}
|
||||
} else if (id == SK_LORE_CHEMISTRY) {
|
||||
if (isplayer(lf)) {
|
||||
switch (f->val[1]) {
|
||||
case PR_BEGINNER: makeknownobclass(OC_POTION, RR_FREQUENT); break;
|
||||
case PR_ADEPT: makeknownobclass(OC_POTION, RR_COMMON); break;
|
||||
case PR_SKILLED: makeknownobclass(OC_POTION, RR_UNCOMMON); break;
|
||||
case PR_EXPERT: makeknownobclass(OC_POTION, RR_RARE); break;
|
||||
case PR_MASTER: makeknownobclass(OC_POTION, RR_VERYRARE); break;
|
||||
}
|
||||
}
|
||||
} else if (id == SK_LORE_LANGUAGE) {
|
||||
if (isplayer(lf)) {
|
||||
switch (f->val[1]) {
|
||||
case PR_BEGINNER:
|
||||
makeknownobclass(OC_SCROLL, RR_FREQUENT);
|
||||
makeknownobclass(OC_BOOK, RR_FREQUENT);
|
||||
break;
|
||||
case PR_ADEPT:
|
||||
makeknownobclass(OC_SCROLL, RR_COMMON);
|
||||
makeknownobclass(OC_BOOK, RR_COMMON);
|
||||
break;
|
||||
case PR_SKILLED:
|
||||
makeknownobclass(OC_SCROLL, RR_UNCOMMON);
|
||||
makeknownobclass(OC_BOOK, RR_UNCOMMON);
|
||||
break;
|
||||
case PR_EXPERT:
|
||||
makeknownobclass(OC_SCROLL, RR_RARE);
|
||||
makeknownobclass(OC_BOOK, RR_RARE);
|
||||
break;
|
||||
case PR_MASTER:
|
||||
makeknownobclass(OC_SCROLL, RR_VERYRARE);
|
||||
makeknownobclass(OC_BOOK, RR_VERYRARE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (id == SK_LORE_NATURE) {
|
||||
if (f->val[1] == PR_BEGINNER) {
|
||||
if (isplayer(lf)) {
|
||||
|
@ -11552,6 +11609,31 @@ flag_t *giveskill(lifeform_t *lf, enum SKILL id) {
|
|||
makeknown(OT_MUSHROOMTOAD);
|
||||
}
|
||||
}
|
||||
} else if (id == SK_LORE_RELICS) {
|
||||
if (isplayer(lf)) {
|
||||
switch (f->val[1]) {
|
||||
case PR_BEGINNER:
|
||||
makeknownobclass(OC_RING, RR_FREQUENT);
|
||||
makeknownobclass(OC_AMULET, RR_FREQUENT);
|
||||
break;
|
||||
case PR_ADEPT:
|
||||
makeknownobclass(OC_RING, RR_COMMON);
|
||||
makeknownobclass(OC_AMULET, RR_COMMON);
|
||||
break;
|
||||
case PR_SKILLED:
|
||||
makeknownobclass(OC_RING, RR_UNCOMMON);
|
||||
makeknownobclass(OC_AMULET, RR_UNCOMMON);
|
||||
break;
|
||||
case PR_EXPERT:
|
||||
makeknownobclass(OC_RING, RR_RARE);
|
||||
makeknownobclass(OC_AMULET, RR_RARE);
|
||||
break;
|
||||
case PR_MASTER:
|
||||
makeknownobclass(OC_RING, RR_VERYRARE);
|
||||
makeknownobclass(OC_AMULET, RR_VERYRARE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (id == SK_PERCEPTION) {
|
||||
if ((f->val[1] == PR_ADEPT) || (f->val[1] == PR_MASTER)) {
|
||||
// our FOV gets wider
|
||||
|
@ -11570,9 +11652,10 @@ flag_t *giveskill(lifeform_t *lf, enum SKILL id) {
|
|||
// if objecttype has a tech level , and it is
|
||||
// lower (or equal to) our tech knowledge...
|
||||
if (tf && !isknownot(ot) && (tf->val[0] <= f->val[1])) {
|
||||
object_t *o;
|
||||
//object_t *o;
|
||||
// then make it known!
|
||||
makeknown(ot->id);
|
||||
/*
|
||||
for (o = lf->pack->first ; o ; o = o->next) {
|
||||
if (o->type->id == ot->id) {
|
||||
if (isplayer(lf)) {
|
||||
|
@ -11590,6 +11673,7 @@ flag_t *giveskill(lifeform_t *lf, enum SKILL id) {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11644,7 +11728,7 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
object_t *o = NULL;
|
||||
flag_t *f;
|
||||
char buf[BUFLEN],buf2[BUFLEN];
|
||||
int db = B_FALSE;
|
||||
int db = B_TRUE;
|
||||
obpile_t *op;
|
||||
map_t *targmap;
|
||||
enum LFSIZE maxobsize = SZ_MAX;
|
||||
|
@ -11664,8 +11748,13 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
assert("error - givestartobs() called without lf or targob" == 0);
|
||||
}
|
||||
|
||||
if (db) {
|
||||
snprintf(buf2, BUFLEN, "calling givestartobs for %s",lf->race->name);
|
||||
if (db && lf) {
|
||||
if (isplayer(lf)) {
|
||||
snprintf(buf2, BUFLEN, "calling givestartobs for %s (PLAYER)",lf->race->name);
|
||||
} else {
|
||||
snprintf(buf2, BUFLEN, "calling givestartobs for %s",lf->race->name);
|
||||
}
|
||||
dblog("%s", buf2);
|
||||
}
|
||||
|
||||
// handle autoweapon
|
||||
|
@ -11701,6 +11790,7 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
char thisdesc[BUFLEN];
|
||||
int dam,acc;
|
||||
enum DAMTYPE dt;
|
||||
flag_t *vf;
|
||||
|
||||
f2 = hasflag(poss[i]->flags, F_ACCURACY);
|
||||
acc = f2->val[0];
|
||||
|
@ -11711,7 +11801,8 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
dam, getdamname(dt), getaccuracyname(acc));
|
||||
|
||||
// don't allow this if the player is vulnerable to it!
|
||||
if (!lfhasflagval(lf, F_MATVULN, poss[i]->material->id, NA, NA, NULL)) {
|
||||
vf = lfhasflagval(lf, F_MATVULN, poss[i]->material->id, NA, NA, NULL);
|
||||
if (!vf || (vf->val[2] <= 0)) {
|
||||
addchoice(&prompt, ch++, thisdesc, NULL, poss[i], NULL);
|
||||
}
|
||||
}
|
||||
|
@ -11801,7 +11892,11 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
assert(strlen(text) > 0);
|
||||
if (rnd(1,100) <= val[0]) {
|
||||
o = addob(op, text);
|
||||
if (!o) {
|
||||
if (o) {
|
||||
if (db && lf) {
|
||||
dblog("successfully gave startob: %s (asked for '%s')", o->type->name, text);
|
||||
}
|
||||
} else {
|
||||
if (db) {
|
||||
dblog("couldnt give startob: %s", text);
|
||||
}
|
||||
|
@ -11908,12 +12003,37 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
if (!obfits(o, op)) {
|
||||
// don't add objects which won't fit
|
||||
obok = B_FALSE;
|
||||
if (db) dblog("problem: ob doesn't fit in its pile (%s)",o->type->name);
|
||||
} else if (op->parentob && hasflag(o->flags, F_CONTAINER)) {
|
||||
// don't put containers in other containers
|
||||
obok = B_FALSE;
|
||||
if (db) dblog("problem: cant put container in another container (%s)",o->type->name);
|
||||
} else if (lf && lfhasflagval(lf, F_MATVULN, o->material->id, NA, NA, NULL)) {
|
||||
// don't start with objects which are dangerous to the lf
|
||||
obok = B_FALSE;
|
||||
int ii;
|
||||
flag_t *retflag2[MAXCANDIDATES],*f2,*vf;
|
||||
int nretflags2;
|
||||
int resolved = B_FALSE;
|
||||
|
||||
vf = lfhasflagval(lf, F_MATVULN, o->material->id, NA, NA, NULL);
|
||||
assert(vf);
|
||||
if (vf->val[2] > 0) {
|
||||
// don't start with objects which are dangerous to the lf
|
||||
// ...but try to change their material into something else.
|
||||
getflags(o->type->flags, retflag2, &nretflags2, F_CANBEDIFFMAT, F_NONE);
|
||||
for (ii = 0; ii < nretflags2; ii++) {
|
||||
f2 = retflag2[ii];
|
||||
if (!lfhasflagval(lf, F_MATVULN, f2->val[0], NA, NA, NULL)) {
|
||||
if (!changemat(o, f2->val[0])) {
|
||||
resolved = B_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!resolved) {
|
||||
obok = B_FALSE;
|
||||
if (db) dblog("problem: lf is vuln to object's material (%s)",o->type->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!obok) {
|
||||
|
@ -12114,16 +12234,18 @@ flag_t *hasbleedinginjury(lifeform_t *lf, enum BODYPART bp) {
|
|||
int hasfreeaction(lifeform_t *lf) {
|
||||
return real_hasfreeaction(lf, F_NONE);
|
||||
}
|
||||
// special case: exception = F_DEAD means don't check whether lf is dead, even
|
||||
// though they won't really have the F_DEAD flag.
|
||||
int real_hasfreeaction(lifeform_t *lf, enum FLAG exception) {
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int nretflags,i;
|
||||
if (isimmobile(lf)) return B_FALSE;
|
||||
getflags(lf->flags, retflag, &nretflags, F_ASLEEP, F_CASTINGSPELL, F_DIGGING, F_EATING, F_NONE);
|
||||
getflags(lf->flags, retflag, &nretflags, F_ASLEEP, F_CASTINGSPELL, F_DIGGING, F_EATING, F_FROZEN, F_PARALYZED, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
if (retflag[i]->id != exception) {
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
if ((exception != F_DEAD) && isdead(lf)) return B_FALSE;
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
|
@ -12765,6 +12887,15 @@ int lfproduceslight(lifeform_t *lf, object_t **fromwhat) {
|
|||
return radius;
|
||||
}
|
||||
|
||||
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)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
// if you pass in 'target', then you don't need 'targcell'
|
||||
// return true on failure
|
||||
int lockpick(lifeform_t *lf, cell_t *targcell, object_t *target, object_t *device) {
|
||||
|
@ -13083,6 +13214,7 @@ int haslof_real(cell_t *src, cell_t *dest, enum LOFTYPE loftype, cell_t **newdes
|
|||
// - they're in our destination
|
||||
if (cell->lf && (!isprone(cell->lf)) && (loftype & LOF_LFSSTOP)) {
|
||||
int lfcanblocklof = B_TRUE;
|
||||
|
||||
if (srclf && !cansee(srclf, cell->lf)) {
|
||||
lfcanblocklof = B_FALSE;
|
||||
}
|
||||
|
@ -15944,7 +16076,7 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml
|
|||
if ((countcellexits(lf->cell, DT_COMPASS) == 1) && fromlf && (getcelldist(fromlf->cell, lf->cell) == 1)) {
|
||||
strcat(buf2, "^while cornered");
|
||||
}
|
||||
if (!hasfreeaction(lf)) {
|
||||
if (!real_hasfreeaction(lf, F_DEAD)) {
|
||||
if (strlen(buf2)) strcat(buf2, " and helpless");
|
||||
else strcat(buf2, "^while helpless");
|
||||
}
|
||||
|
@ -21928,15 +22060,12 @@ void startlfturn(lifeform_t *lf) {
|
|||
|
||||
amt = obproduceslight(o);
|
||||
if (amt) {
|
||||
if (lfhasflag(lf, F_SEEINDARK) && !isblind(lf)) {
|
||||
// if you don't have eyes, your'e safe!
|
||||
if (!lfhasflagval(lf, F_NOBODYPART, BP_EYES, NA, NA, NULL)) {
|
||||
if (isplayer(lf)) {
|
||||
msg("The bright light burns your vision-enhanced eyes!");
|
||||
}
|
||||
// blind for 1-3 turns
|
||||
addtempflag(lf->flags, F_BLIND, B_TRUE, NA, NA, NULL, rnd(3,3+amt));
|
||||
if (lighthurtseyes(lf)) {
|
||||
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));
|
||||
}
|
||||
if (isvulnto(lf->flags, DT_LIGHT, B_FALSE)) {
|
||||
int dam;
|
||||
|
|
1
lf.h
1
lf.h
|
@ -324,6 +324,7 @@ flag_t *lfhasflagval(lifeform_t *lf, enum FLAG fid, int val0, int val1, int val2
|
|||
flag_t *lfhasknownflag(lifeform_t *lf, enum FLAG fid);
|
||||
flag_t *lfhasknownflagval(lifeform_t *lf, enum FLAG fid, int val0, int val1, int val2, /*@null@*/ char *text);
|
||||
int lfproduceslight(lifeform_t *lf, object_t **fromwhat);
|
||||
int lighthurtseyes(lifeform_t *lf);
|
||||
int lockpick(lifeform_t *lf, cell_t *targcell, object_t *target, object_t *device);
|
||||
void loseobflags(lifeform_t *lf, object_t *o, int kind);
|
||||
int hasbp(lifeform_t *lf, enum BODYPART bp);
|
||||
|
|
35
move.c
35
move.c
|
@ -2014,6 +2014,7 @@ int opendoor(lifeform_t *lf, object_t *o) {
|
|||
return B_TRUE;
|
||||
} else {
|
||||
int wasjammed = B_FALSE;
|
||||
int touchrv = B_FALSE;
|
||||
if (lf) {
|
||||
if (!canopendoors(lf)) {
|
||||
if (isplayer(lf)) {
|
||||
|
@ -2062,11 +2063,11 @@ int opendoor(lifeform_t *lf, object_t *o) {
|
|||
}
|
||||
}
|
||||
|
||||
taketime(lf, getactspeed(lf));
|
||||
touch(lf, o);
|
||||
|
||||
// stop sprinting
|
||||
stopsprinting(lf);
|
||||
|
||||
taketime(lf, getactspeed(lf));
|
||||
touchrv = touch(lf, o);
|
||||
} // end if lf
|
||||
|
||||
// trapped?
|
||||
|
@ -2075,6 +2076,9 @@ int opendoor(lifeform_t *lf, object_t *o) {
|
|||
return B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (touchrv) return B_TRUE;
|
||||
|
||||
// locked?
|
||||
if (hasflag(o->flags, F_LOCKED)) {
|
||||
if (lf) {
|
||||
|
@ -2090,8 +2094,6 @@ int opendoor(lifeform_t *lf, object_t *o) {
|
|||
noise(doorcell, NULL, NC_OTHER, SV_TALK, "a door handle rattling.", NULL);
|
||||
}
|
||||
}
|
||||
taketime(lf, getactspeed(lf));
|
||||
touch(lf, o);
|
||||
}
|
||||
return B_TRUE;
|
||||
} else {// ie. door not locked, but it might be jammed
|
||||
|
@ -2317,8 +2319,6 @@ int closedoor(lifeform_t *lf, object_t *o) {
|
|||
msg("%s closes.",obname);
|
||||
}
|
||||
}
|
||||
taketime(lf, getactspeed(lf));
|
||||
touch(lf, o);
|
||||
}
|
||||
if (player && haslos(player, cell)) {
|
||||
needredraw = B_TRUE;
|
||||
|
@ -3734,6 +3734,7 @@ int willmove(lifeform_t *lf, int dir, enum ERROR *error) {
|
|||
// look for avoided objects (because they are cursed or otherwise).
|
||||
for (o = cell->obpile->first ; o ; o = o->next) {
|
||||
flag_t *f;
|
||||
int oblit = 0;
|
||||
snprintf(buf, BUFLEN, "%ld",o->id);
|
||||
f = lfhasflagval(lf, F_AVOIDOB, NA, NA, NA, buf);
|
||||
if (f) {
|
||||
|
@ -3747,15 +3748,23 @@ int willmove(lifeform_t *lf, int dir, enum ERROR *error) {
|
|||
}
|
||||
}
|
||||
|
||||
if (isundead(lf)) {
|
||||
int amt;
|
||||
amt = obproduceslight(o);
|
||||
if (amt && (amt >= gettr(lf))) {
|
||||
if (error) *error = E_WONT;
|
||||
return B_FALSE;
|
||||
oblit = obproduceslight(o);
|
||||
if (oblit) {
|
||||
if (isundead(lf)) {
|
||||
if (oblit >= gettr(lf)) {
|
||||
if (error) *error = E_WONT;
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
if (lighthurtseyes(lf)) {
|
||||
if (wis >= AT_AVERAGE) {
|
||||
if (error) *error = E_WONT;
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (hasflag(o->flags, F_TRAP)) {
|
||||
if (hasflag(o->flags, F_SECRET)) {
|
||||
// hidden traps?
|
||||
|
|
77
objects.c
77
objects.c
|
@ -475,7 +475,7 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
char numstringmax[BUFLEN];
|
||||
int howmany = 1;
|
||||
int i;
|
||||
int db = B_FALSE;
|
||||
int db = B_TRUE;
|
||||
flag_t *f;
|
||||
char *localname = NULL;
|
||||
int wantblessed = B_UNCURSED;
|
||||
|
@ -4012,6 +4012,25 @@ enum LFSIZE getarmoursize(object_t *o) {
|
|||
return SZ_ANY;
|
||||
}
|
||||
|
||||
enum RARITY getavgrarity(flagpile_t *fp) {
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int nretflags = 0,i;
|
||||
int temprr = 0,nfound = 0;
|
||||
enum RARITY finalrr = RR_NEVER;
|
||||
|
||||
getflags(fp, retflag, &nretflags, F_RARITY, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
if (retflag[i]->val[2] > 0) {
|
||||
temprr += retflag[i]->val[2];
|
||||
nfound++;
|
||||
}
|
||||
}
|
||||
if (nfound) {
|
||||
finalrr = (enum RARITY) (temprr / nfound);
|
||||
}
|
||||
return finalrr;
|
||||
}
|
||||
|
||||
// returns largest posisble container with free space
|
||||
object_t *getbestcontainer(obpile_t *op) {
|
||||
object_t *o,*poss[MAXPILEOBS],*poss2[MAXPILEOBS];
|
||||
|
@ -8352,6 +8371,43 @@ void makeknown(enum OBTYPE otid) {
|
|||
}
|
||||
}
|
||||
|
||||
// make objects of the given class & rarity be known
|
||||
void makeknownobclass(enum OBCLASS ocid, enum RARITY rrlev) {
|
||||
objecttype_t *ot;
|
||||
// automatically make known all tech <= our skill level
|
||||
for (ot = objecttype ; ot ; ot = ot->next) {
|
||||
// if objectclass and rarity matches...
|
||||
if (ot->obclass->id == ocid) {
|
||||
enum RARITY thisrr;
|
||||
thisrr = getavgrarity(ot->flags);
|
||||
if ((thisrr <= rrlev) && !isknownot(ot)) {
|
||||
//object_t *o;
|
||||
// then make it known!
|
||||
makeknown(ot->id);
|
||||
/*
|
||||
for (o = player->pack->first ; o ; o = o->next) {
|
||||
if (o->type->id == ot->id) {
|
||||
if (isplayer(lf)) {
|
||||
char buf[BUFLEN];
|
||||
getobname(o, buf, o->amt);
|
||||
msgnocap("%c - %s", o->letter, buf);
|
||||
}
|
||||
// now confer effects...
|
||||
giveobflags(lf, o, F_HOLDCONFER);
|
||||
if (isactivated(o)) {
|
||||
giveobflags(lf, o, F_ACTIVATECONFER);
|
||||
}
|
||||
if (isequipped(o)) {
|
||||
giveobflags(lf, o, F_EQUIPCONFER);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void maketemporary(object_t *o, int howlong, char *obdietext) {
|
||||
addflag(o->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(o->flags, F_OBHP, howlong, howlong, NA, NULL);
|
||||
|
@ -8710,6 +8766,12 @@ object_t *real_moveob(object_t *src, obpile_t *dst, int howmany, int stackok) {
|
|||
}
|
||||
*/
|
||||
|
||||
if (lfhasflag(dst->owner, F_HOLYTOUCH) && (o->blessed == B_UNCURSED)) {
|
||||
if (isweapon(o) || isarmour(o)) {
|
||||
blessob(o);
|
||||
}
|
||||
}
|
||||
|
||||
// did this make us burdened?
|
||||
if (isplayer(dst->owner)) {
|
||||
checkburdened(dst->owner, preburdened);
|
||||
|
@ -15833,6 +15895,19 @@ int willshatter(enum MATERIAL mat) {
|
|||
return B_FALSE;
|
||||
}
|
||||
|
||||
enum SKILL getclassloreskill(enum OBCLASS ocid) {
|
||||
switch (ocid) {
|
||||
case OC_POTION: return SK_LORE_CHEMISTRY;
|
||||
case OC_SCROLL: return SK_LORE_LANGUAGE;
|
||||
case OC_BOOK: return SK_LORE_LANGUAGE;
|
||||
case OC_WAND: return SK_LORE_ARCANA;
|
||||
case OC_RING: return SK_LORE_RELICS;
|
||||
case OC_AMULET: return SK_LORE_RELICS;
|
||||
default: break;
|
||||
}
|
||||
return SK_NONE;
|
||||
}
|
||||
|
||||
int getcritchance(lifeform_t *lf, object_t *o, lifeform_t *victim) {
|
||||
flag_t *f;
|
||||
int chance = 0;
|
||||
|
|
|
@ -70,9 +70,11 @@ int fountain_will_dryup(object_t *o);
|
|||
void fragments(cell_t *centre, char *what, int speed, int howfar);
|
||||
void genhiddennames(void);
|
||||
enum LFSIZE getarmoursize(object_t *o);
|
||||
enum RARITY getavgrarity(flagpile_t *fp);
|
||||
object_t *getbestcontainer(obpile_t *op);
|
||||
int getchargeinfo(object_t *o, int *cur, int *max);
|
||||
int getcharges(object_t *o);
|
||||
enum SKILL getclassloreskill(enum OBCLASS oc);
|
||||
int getcritchance(lifeform_t *lf, object_t *o, lifeform_t *victim);
|
||||
int getdr(object_t *o);
|
||||
int checkcritprotection(lifeform_t *lf, object_t *o);
|
||||
|
@ -243,6 +245,7 @@ lifeform_t *makeanimated(lifeform_t *lf, object_t *o, int level);
|
|||
int makeduller(object_t *o, int howmuch);
|
||||
void makehot(object_t *o, int howmuch, int howlong);
|
||||
void makeknown(enum OBTYPE otid);
|
||||
void makeknownobclass(enum OBCLASS ocid, enum RARITY rrlev);
|
||||
void maketemporary(object_t *o, int howlong, char *obdietext);
|
||||
void maketried(enum OBTYPE otid, char *triedon);
|
||||
void makewet(object_t *o, int amt);
|
||||
|
|
51
spell.c
51
spell.c
|
@ -1972,12 +1972,22 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
|
||||
// only works if shield is hard
|
||||
if (gethardness(shield->material->id)) {
|
||||
// success depends on shield skill, relative lf size, target's evasion
|
||||
mod = 0;
|
||||
modifyforsize(&mod, user, target, 10, M_VAL);
|
||||
if (mod > 0) mod = 0;
|
||||
if (skillcheck(user, SC_SHIELDBLOCK, 25 + getevasion(target), mod)) {
|
||||
stun(target, 3);
|
||||
int damamt;
|
||||
// victim takes a little bit of damage
|
||||
damamt = getstrdammod(user);
|
||||
if (damamt > 0) {
|
||||
char damstr[BUFLEN];
|
||||
sprintf(damstr, "%s%s shield bash", username, getpossessive(username));
|
||||
losehp(target, damamt, DT_BASH, user, damstr);
|
||||
}
|
||||
if (!isdead(target)) {
|
||||
// stun success depends on shield skill, relative lf size, target's evasion
|
||||
mod = 0;
|
||||
modifyforsize(&mod, user, target, 10, M_VAL);
|
||||
if (mod > 0) mod = 0;
|
||||
if (skillcheck(user, SC_SHIELDBLOCK, 25 + getevasion(target), mod)) {
|
||||
stun(target, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3607,21 +3617,13 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
|
||||
|
||||
// ask what to inspect
|
||||
|
||||
initprompt(&prompt, "Inspect which object");
|
||||
for (o = user->pack->first ; o ; o = o->next) {
|
||||
int classok = B_FALSE;
|
||||
// can only inspect certain types of things
|
||||
switch (o->type->obclass->id) {
|
||||
case OC_SCROLL:
|
||||
case OC_BOOK:
|
||||
case OC_WAND:
|
||||
case OC_RING:
|
||||
classok = B_TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
enum SKILL whichsk;
|
||||
whichsk = getclassloreskill(o->type->obclass->id);
|
||||
// can we inspect this?
|
||||
if ((whichsk != SK_NONE) && getskill(user, whichsk)) classok = B_TRUE;
|
||||
if (classok && !isknown(o)) {
|
||||
char buf[BUFLEN];
|
||||
getobname(o, buf, o->amt);
|
||||
|
@ -3655,6 +3657,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
rarity = 0;
|
||||
}
|
||||
difficulty = 90 + (rarity*10);
|
||||
/*
|
||||
switch (o->type->obclass->id) {
|
||||
case OC_SCROLL:
|
||||
difficulty += 2; break;
|
||||
|
@ -3667,12 +3670,12 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
default:
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
slev = getskill(user, SK_LORE_ARCANA);
|
||||
slev = getskill(user, getclassloreskill(o->type->obclass->id));
|
||||
switch (slev) {
|
||||
case PR_INEPT:
|
||||
mod = -5;
|
||||
mod = -5; // should never happen
|
||||
break;
|
||||
default:
|
||||
mod = slev*4;
|
||||
|
@ -14287,6 +14290,8 @@ int getworkablematerials(lifeform_t *lf, enum SKILL skid , enum MATERIAL *repair
|
|||
int cutoff,nworkable = 0;
|
||||
object_t *helpob = NULL;
|
||||
|
||||
// note: we DONT initialise nmats to zero.
|
||||
|
||||
slev = getskill(lf, skid);
|
||||
switch (slev) {
|
||||
case PR_NOVICE: cutoff = 80; break;
|
||||
|
@ -14295,7 +14300,7 @@ int getworkablematerials(lifeform_t *lf, enum SKILL skid , enum MATERIAL *repair
|
|||
case PR_SKILLED: cutoff = 25; break;
|
||||
case PR_EXPERT: cutoff = 0; break;
|
||||
case PR_MASTER: cutoff = 0; break;
|
||||
default: cutoff = 0; break;
|
||||
default: cutoff = 100; break;
|
||||
}
|
||||
if (skid == SK_METALWORK) {
|
||||
helpob = getworkhelpob(lf->pack, MT_METAL);
|
||||
|
@ -14306,7 +14311,7 @@ int getworkablematerials(lifeform_t *lf, enum SKILL skid , enum MATERIAL *repair
|
|||
|
||||
limit(&cutoff, 0, NA);
|
||||
|
||||
if (cutoff != 100) {
|
||||
if (cutoff < 100) {
|
||||
if (skid == SK_METALWORK) {
|
||||
repairablemats[*nmats] = MT_METAL;
|
||||
cutoffpct[*nmats] = cutoff;
|
||||
|
|
30
text.c
30
text.c
|
@ -1344,6 +1344,36 @@ char *getkillverb(lifeform_t *victim, object_t *wep, enum DAMTYPE damtype, int d
|
|||
return "kill";
|
||||
}
|
||||
|
||||
char *getnthtext(int num) {
|
||||
switch (num) {
|
||||
case 0:
|
||||
case 1:
|
||||
return "first";
|
||||
case 2: return "second";
|
||||
case 3: return "third";
|
||||
case 4: return "fourth";
|
||||
case 5: return "fifth";
|
||||
case 6: return "sixth";
|
||||
case 7: return "seventh";
|
||||
case 8: return "eighth";
|
||||
case 9: return "ninth";
|
||||
case 10: return "tenth";
|
||||
case 11: return "eleventh";
|
||||
case 12: return "twelvth";
|
||||
case 13: return "thirteenth";
|
||||
case 14: return "fourteenth";
|
||||
case 15: return "fifteenth";
|
||||
case 16: return "sixteenth";
|
||||
case 17: return "seventeenth";
|
||||
case 18: return "eighteenth";
|
||||
case 19: return "nineteenth";
|
||||
case 20: return "twentieth";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return "upteenth";
|
||||
}
|
||||
|
||||
char *getpossessive(char *text) {
|
||||
char lastchar;
|
||||
// you -> your
|
||||
|
|
1
text.h
1
text.h
|
@ -28,6 +28,7 @@ char *getflagsourcetext(flag_t *f);
|
|||
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);
|
||||
char *getnthtext(int num);
|
||||
char *getpctname(int pct);
|
||||
char *getpoisondamverb(enum POISONTYPE ptype);
|
||||
//char *getpoisondesc(enum POISONTYPE ptype);
|
||||
|
|
Loading…
Reference in New Issue