- [+] operate will turn electromachete on/off

- [+] Interact should also be able to open/close doors
- [+] closing doors should take time.
- [+] remove armourrating from many standard monsters.
- [+] should be able to get nauseated while asleep
- [+] shouldn't be able to generate corpses of unique monsters!
- [+] mental feedback should do more damage.
This commit is contained in:
Rob Pearce 2012-12-26 06:12:09 +00:00
parent 60914f4842
commit a42ca5bb37
10 changed files with 69 additions and 45 deletions

View File

@ -2693,6 +2693,9 @@ int getextradamwep(object_t *wep, int *dam, enum DAMTYPE *damtype, int *ndam, in
// ie don't display the extra damage // ie don't display the extra damage
charges = 0; charges = 0;
} }
if ((f->val[2] == IFACTIVE) && !isactivated(wep) ) {
charges = 0;
}
if (charges > 0) { if (charges > 0) {
if (!fordisplay) { if (!fordisplay) {
// use up a charge // use up a charge

48
data.c
View File

@ -5281,7 +5281,7 @@ void initobjects(void) {
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL); addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL); addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
addot(OT_S_MFEEDBACK, "mental feedback", "Assaults the target's brain with a mental feedback loop, dealing damage based on their intelligence.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); addot(OT_S_MFEEDBACK, "mental feedback", "Assaults the target's brain with a mental feedback loop, dealing damage based on their intelligence.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Damage dealt is between 10% and 20% of target's intelligence."); addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Damage dealt is 20% and 25% of target's intelligence.");
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Creatures with higher intelligence will take more damage."); addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Creatures with higher intelligence will take more damage.");
addflag(lastot->flags, F_SPELLSCHOOL, SS_MENTAL, NA, NA, NULL); addflag(lastot->flags, F_SPELLSCHOOL, SS_MENTAL, NA, NA, NULL);
addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL); addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL);
@ -6713,9 +6713,11 @@ void initobjects(void) {
addflag(lastot->flags, F_VALUE, 100, NA, NA, NULL); addflag(lastot->flags, F_VALUE, 100, NA, NA, NULL);
addflag(lastot->flags, F_USESSKILL, SK_SHORTBLADES, NA, NA, NULL); addflag(lastot->flags, F_USESSKILL, SK_SHORTBLADES, NA, NA, NULL);
addflag(lastot->flags, F_DAM, DT_SLASH, 5, NA, NULL); addflag(lastot->flags, F_DAM, DT_SLASH, 5, NA, NULL);
addflag(lastot->flags, F_EXTRADAMWITHCHARGES, DT_ELECTRIC, NA, NA, "2"); addflag(lastot->flags, F_EXTRADAMWITHCHARGES, DT_ELECTRIC, NA, IFACTIVE, "2");
addflag(lastot->flags, F_ACCURACY, 85, NA, NA, NULL); addflag(lastot->flags, F_ACCURACY, 85, NA, NA, NULL);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL);
@ -7520,7 +7522,7 @@ void initobjects(void) {
addflag(lastot->flags, F_GROWSTO, OT_FIRELARGE, VT_OB, NA, NULL); addflag(lastot->flags, F_GROWSTO, OT_FIRELARGE, VT_OB, NA, NULL);
addflag(lastot->flags, F_SHRINKSTO, NA, VT_OB, NA, "red-hot helmet"); addflag(lastot->flags, F_SHRINKSTO, NA, VT_OB, NA, "red-hot helmet");
addot(OT_WARDROBE, "wardrobe", "An upright enclosed shelving unit for clothes storage.", MT_WOOD, 80, OC_FURNITURE, SZ_HUMAN); addot(OT_WARDROBE, "wardrobe", "An upright enclosed shelving unit for clothes storage.", MT_WOOD, 200, OC_FURNITURE, SZ_HUMAN);
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_LARGE, NA, NULL); addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_LARGE, NA, NULL);
addflag(lastot->flags, F_PUSHABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_PUSHABLE, B_TRUE, NA, NA, NULL);
@ -12039,7 +12041,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 6, NA, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^hissing"); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^hissing");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, SV_CAR, NA, "hisses^a loud hissing"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, SV_CAR, NA, "hisses^a loud hissing");
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 3, NA, "roars in pain^roars of pain"); addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 3, NA, "roars in pain^roars of pain");
@ -12076,7 +12078,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 8, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 8, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 9, NA, NA, NULL); addflag(lastrace->flags, F_TR, 9, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL);
addflag(lastrace->flags, F_LEVITATING, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_LEVITATING, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL);
addflag(lastrace->flags, F_SPELLSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_SPELLSPEED, SP_NORMAL, NA, NA, NULL);
@ -12275,7 +12276,6 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^clucking"); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^clucking");
addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
@ -12365,7 +12365,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_TR, 7, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL);
//addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL); //addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL);
@ -12764,7 +12763,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 13, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 13, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 11, NA, NA, NULL); addflag(lastrace->flags, F_TR, 11, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, -20, NA, NA, NULL); addflag(lastrace->flags, F_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_ACTIONSPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_SLOW, NA, NA, NULL);
@ -12805,7 +12803,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 15, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 15, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 12, NA, NA, NULL); addflag(lastrace->flags, F_TR, 12, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 13, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, -20, NA, NA, NULL); addflag(lastrace->flags, F_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_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
@ -12850,7 +12847,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 15, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 15, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 13, NA, NA, NULL); addflag(lastrace->flags, F_TR, 13, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, -20, NA, NA, NULL); addflag(lastrace->flags, F_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_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
@ -12905,7 +12901,6 @@ void initrace(void) {
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 9, NA, NA, NULL);
//addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); //addflag(lastrace->flags, F_EVASION, 10, 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_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
@ -12988,7 +12983,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, 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_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
@ -13376,7 +13370,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
@ -13421,7 +13414,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_TR, 7, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL);
//addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); //addflag(lastrace->flags, F_EVASION, 10, 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_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
@ -13571,7 +13563,7 @@ void initrace(void) {
addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SEWER, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 2, 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_STARTATT, A_STR, AT_HIGH, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL);
@ -13815,7 +13807,6 @@ void initrace(void) {
addflag(lastrace->flags, F_HATESRACE, R_GNOLL, NA, NA, NULL); addflag(lastrace->flags, F_HATESRACE, R_GNOLL, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 8, NA, NA, NULL); addflag(lastrace->flags, F_TR, 8, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_STAYINROOM, NA, B_NOCHASE, NA, NULL); // stay in our maze addflag(lastrace->flags, F_STAYINROOM, NA, B_NOCHASE, NA, NULL); // stay in our maze
addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL);
@ -13854,7 +13845,6 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, -5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -5, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 11, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 8, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 8, NA, NULL);
@ -13933,7 +13923,6 @@ void initrace(void) {
addflag(lastrace->flags, F_RARITY, H_SWAMP, 66, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_SWAMP, 66, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 6, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 6, NA, NULL);
@ -13973,7 +13962,6 @@ void initrace(void) {
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_HITDICE, 10, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 10, NA, NA, NULL); addflag(lastrace->flags, F_TR, 10, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 16, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 16, NA, NULL);
@ -14012,7 +14000,6 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
@ -14055,7 +14042,6 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
@ -14097,7 +14083,6 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
@ -14163,7 +14148,6 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL);
@ -14192,7 +14176,6 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_TR, 7, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_STARTATT, A_STR, AT_EXHIGH, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_EXHIGH, NA, NULL);
@ -14679,7 +14662,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_TR, 2, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL);
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL);
@ -16201,7 +16183,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_ANTNEST, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_FREQUENT, NULL);
addflag(lastrace->flags, F_NUMAPPEAR, 1, 4, NA, ""); addflag(lastrace->flags, F_NUMAPPEAR, 1, 4, NA, "");
addflag(lastrace->flags, F_ARMOURRATING, 4, 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);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LTAVERAGE, NA, NULL);
@ -16233,7 +16214,7 @@ 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_ANTNEST, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_FREQUENT, NULL);
addflag(lastrace->flags, F_NUMAPPEAR, 1, 2, NA, ""); addflag(lastrace->flags, F_NUMAPPEAR, 1, 2, NA, "");
addflag(lastrace->flags, F_ARMOURRATING, 6, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 4, 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);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LTAVERAGE, NA, NULL);
@ -16296,7 +16277,7 @@ void initrace(void) {
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_FOREST, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 4, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 8, 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);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, 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_AGI, AT_AVERAGE, NA, NULL);
@ -16507,7 +16488,6 @@ void initrace(void) {
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL);
addflag(lastrace->flags, F_MAXATTACKS, 2, 2, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 2, 2, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL);
@ -16543,7 +16523,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL); addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 6, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_ENHANCESMELL, 8, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 8, NA, NA, NULL);
@ -17240,7 +17220,7 @@ void initrace(void) {
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_RARE, NULL); addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 9, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 7, NA, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL);
@ -17283,7 +17263,7 @@ void initrace(void) {
addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_RARE, NULL); addflag(lastrace->flags, F_RARITY, H_ANTNEST, NA, RR_RARE, NULL);
addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); addflag(lastrace->flags, F_TR, 7, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 18, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 12, NA, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_ACIDATTACK, 11, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_ACIDATTACK, 11, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slurping"); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^slurping");
addflag(lastrace->flags, F_DTIMMUNE, DT_ACID, B_TRUE, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_ACID, B_TRUE, NA, NULL);
@ -19650,7 +19630,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 2, NA, NA, NULL); addflag(lastrace->flags, F_TR, 2, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_SLOW, NA, NA, NULL);
@ -19691,7 +19670,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -10, 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_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
@ -20212,7 +20190,6 @@ void initrace(void) {
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 8, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 8, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 8, NA, NA, NULL); addflag(lastrace->flags, F_TR, 8, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
@ -20253,7 +20230,6 @@ void initrace(void) {
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
addflag(lastrace->flags, F_HITDICE, 8, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 8, NA, NA, NULL);
addflag(lastrace->flags, F_TR, 9, NA, NA, NULL); addflag(lastrace->flags, F_TR, 9, NA, NA, NULL);
addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL);
addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL); addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL);
addflag(lastrace->flags, F_HOMEOB, 100, NA, NA, "coffin"); addflag(lastrace->flags, F_HOMEOB, 100, NA, NA, "coffin");
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 10, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 10, NA, NULL);

Binary file not shown.

4
defs.h
View File

@ -674,7 +674,7 @@ enum SHOPACTION {
#define LEVABILITYDONE (-8000) #define LEVABILITYDONE (-8000)
#define IFKNOWN (-9772) // used by f_xxconfer. only confer a flag if item is known. #define IFKNOWN (-9772) // used by f_xxconfer. only confer a flag if item is known.
#define IFACTIVE (-9771) // used by f_prodeuceslight. only does so if object is activated #define IFACTIVE (-9771) // used by f_prodeuceslight, f_extradamwithchanges, ect. only does so if object is activated
// Misc constants // Misc constants
#define ANYROOM (-9770) #define ANYROOM (-9770)
@ -4167,6 +4167,8 @@ enum FLAG {
// roll. // roll.
F_EXTRADAMWITHCHARGES, // if this objects has charges remaining, F_EXTRADAMWITHCHARGES, // if this objects has charges remaining,
// deal an extra "text" damage of type v0. // deal an extra "text" damage of type v0.
// if v2 = IFACTIVE , only works if ob has been
// activated.
F_EXTRAINFO, // knows extra info F_EXTRAINFO, // knows extra info
F_EXTRALUCK, // lf gets +v0 to all skill checks! F_EXTRALUCK, // lf gets +v0 to all skill checks!
// higher chance of rare objects // higher chance of rare objects

26
io.c
View File

@ -6426,7 +6426,9 @@ char *makedesc_ob(object_t *o, char *retbuf) {
getflags(o->flags, retflag, &nretflags, F_EXTRADAMWITHCHARGES, F_NONE); getflags(o->flags, retflag, &nretflags, F_EXTRADAMWITHCHARGES, F_NONE);
for (i = 0 ; i < nretflags; i++) { for (i = 0 ; i < nretflags; i++) {
f = retflag[i]; f = retflag[i];
sprintf(buf,"@It also inflicts %s extra %s damage while charged.\n", f->text, getdamname(f->val[0])); sprintf(buf,"@It also inflicts %s extra %s damage while charged%s.\n",
f->text, getdamname(f->val[0]),
(f->val[2] == IFACTIVE) ? " and activated" : "");
strncat(retbuf, buf, HUGEBUFLEN); strncat(retbuf, buf, HUGEBUFLEN);
} }
} }
@ -9051,6 +9053,7 @@ void dointeract(void) {
int dir; int dir;
object_t *ob[(MAXPILEOBS*8)+1]; object_t *ob[(MAXPILEOBS*8)+1];
condset_t cs; condset_t cs;
int opened = B_FALSE;
int nobs,n; int nobs,n;
dir = askdir("Interact in which direction (- to cancel)", B_TRUE, B_TRUE); dir = askdir("Interact in which direction (- to cancel)", B_TRUE, B_TRUE);
@ -9072,7 +9075,18 @@ void dointeract(void) {
initcondv(&cs, CC_HASFLAG, B_TRUE, F_IMPASSABLE, initcondv(&cs, CC_HASFLAG, B_TRUE, F_IMPASSABLE,
CC_OPERABLE, B_TRUE, NA, CC_OPERABLE, B_TRUE, NA,
CC_NONE); CC_NONE);
getobs(c->obpile, &cs, ob, &nobs);
for (n = 0; n < nobs; n++) {
char obname[BUFLEN];
getobname(ob[n], obname, ob[n]->amt);
addchoice(&prompt, ch, obname, NULL, ob[n], NULL);
if (ch == 'z') ch = 'A';
else ch++;
}
// open doors
initcondv(&cs, CC_HASFLAG, B_TRUE, F_DOOR,
CC_NONE);
getobs(c->obpile, &cs, ob, &nobs); getobs(c->obpile, &cs, ob, &nobs);
for (n = 0; n < nobs; n++) { for (n = 0; n < nobs; n++) {
char obname[BUFLEN]; char obname[BUFLEN];
@ -9097,8 +9111,16 @@ void dointeract(void) {
msg("Cancelled."); msg("Cancelled.");
return; return;
} }
operate(player, o, NULL);
if (isdoor(o, &opened)) {
if (opened) {
closedoor(player, o);
} else {
opendoor(player, o);
}
} else {
operate(player, o, NULL);
}
} }
void doinventory(obpile_t *op) { void doinventory(obpile_t *op) {

13
lf.c
View File

@ -630,6 +630,10 @@ int canbuild(lifeform_t *lf, objecttype_t *ot, char *needtext, enum OBTYPE *need
altob[0] = OT_STICK; altob[0] = OT_STICK;
nalt = 1; nalt = 1;
break; break;
case OT_BOLT:
localneed = OT_METALCHUNK;
localnum = 1;
break;
case OT_BARRICADE: case OT_BARRICADE:
localneed = OT_IRONSTAFF; localneed = OT_IRONSTAFF;
localnum = 2; localnum = 2;
@ -10808,7 +10812,9 @@ enum BODYPART getrandomcorebp(lifeform_t *lf, lifeform_t *attacker) {
race_t *getrandomcorpserace(cell_t *c, enum LFSIZE wantsize) { race_t *getrandomcorpserace(cell_t *c, enum LFSIZE wantsize) {
condset_t cs; condset_t cs;
initcondv(&cs, CC_HASCORPSE, B_TRUE, NA, CC_NONE); initcondv(&cs, CC_HASCORPSE, B_TRUE, NA,
CC_HASFLAG, B_FALSE, F_UNIQUE,
CC_NONE);
if (wantsize != SZ_ANY) { if (wantsize != SZ_ANY) {
addcond(&cs, CC_HASSIZE, B_TRUE, wantsize); addcond(&cs, CC_HASSIZE, B_TRUE, wantsize);
@ -18133,6 +18139,11 @@ int makenauseated(lifeform_t *lf, int amt, int howlong, enum ERROR *why) {
break; break;
} }
if (isasleep(lf)) {
if (why) *why = E_NOEFFECT;
return B_TRUE;
}
if (lfhasflag(lf, F_STENCH)) { if (lfhasflag(lf, F_STENCH)) {
if (why) *why = E_NOEFFECT; if (why) *why = E_NOEFFECT;
return B_TRUE; // your own smell makes you used to it return B_TRUE; // your own smell makes you used to it

7
move.c
View File

@ -139,7 +139,7 @@ int canswapwith(lifeform_t *lf, lifeform_t *lf2) {
} }
if (isplayer(lf)) { if (isplayer(lf)) {
if (lfhasflag(lf2, F_ASLEEP)) { if (isunconscious(lf2)) {
if (getlfsize(lf2) <= getlfsize(lf)) { if (getlfsize(lf2) <= getlfsize(lf)) {
return B_TRUE; return B_TRUE;
} }
@ -2349,6 +2349,11 @@ int closedoor(lifeform_t *lf, object_t *o) {
// stop sprinting // stop sprinting
stopsprinting(lf); stopsprinting(lf);
taketime(lf, getactspeed(lf));
if (touch(lf, o)) {
return B_TRUE;
}
if (isplayer(lf)) { if (isplayer(lf)) {
msg("You close %s.", obname); msg("You close %s.", obname);
} else { } else {

View File

@ -17282,6 +17282,10 @@ int validateobs(void) {
goterror = B_TRUE; goterror = B_TRUE;
} }
} }
if (hasflag(ot->flags, F_OPERONOFF) && !hasflag(ot->flags, F_OPERABLE)) {
printf("ERROR in object '%s' - has F_OPERONOFF but not F_OPERABLE.\n", ot->name);
goterror = B_TRUE;
}
f = hasflag(ot->flags, F_EXPLODEONDAM); f = hasflag(ot->flags, F_EXPLODEONDAM);
if (f && !strlen(f->text)) { if (f && !strlen(f->text)) {
printf("ERROR in object '%s' - F_EXPLODEONDAM does not have damage string.\n", ot->name); printf("ERROR in object '%s' - F_EXPLODEONDAM does not have damage string.\n", ot->name);

View File

@ -143,6 +143,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
initprompt(&prompt, "What will you build?"); initprompt(&prompt, "What will you build?");
if (slev >= PR_NOVICE) { if (slev >= PR_NOVICE) {
addbuildchoice(&prompt, user, OT_ARROW, &ch); addbuildchoice(&prompt, user, OT_ARROW, &ch);
addbuildchoice(&prompt, user, OT_BOLT, &ch);
} }
} else if (dir < 0) { } else if (dir < 0) {
msg("Cancelled."); msg("Cancelled.");
@ -9781,7 +9782,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
} }
return B_TRUE; return B_TRUE;
} }
dam = rnd((iq/10),(iq/5)); dam = rnd((iq/5),(iq/4));
losehp(target, dam, DT_DIRECT, caster, "a mental feedback loop"); losehp(target, dam, DT_DIRECT, caster, "a mental feedback loop");
getlfname(target, targetname); getlfname(target, targetname);
if (isplayer(target)) { if (isplayer(target)) {

2
text.c
View File

@ -250,7 +250,7 @@ char *construct_hit_string(lifeform_t *lf, lifeform_t *victim, char *attackernam
if (onein(2)) { if (onein(2)) {
strcpy(extradambuf, " ineffectually"); strcpy(extradambuf, " ineffectually");
} else { } else {
strcpy(extradambuf, ", but do no damage."); strcpy(extradambuf, ", but do no damage");
} }
knownnodam = B_TRUE; knownnodam = B_TRUE;
} }