- [+] for intelligent and wise monsters in groups, make at lesat one
stay awake (on guard) - [+] shouldn't get salmonella from roast meat! implement israwmeat() - [+] Curse removal - $-2147483648 each Blessings - $-2147483648 each (there is a $644245120 surcharge for uncursing an equipped item) Pay for a blessing (you have $118) [yn]? - [+] fixed. - [+] f_rage should make f_hiding disapepar. - [+] after stealing from shop, call more() to allow for god messages - [+] problem - vampires shouldn't ALWAYS be flying. - [+] any race with 'f_flying' should have f_canwill fly as well. Use naturalflight on race instead. - [+] call touch() on your weapon every turn? (ie. for red-hot , undead, etc) - [+] CRASH right after a cockatrice stoned my wolf. - [+] lf->flags = NULL - [+] lf->race = corrupt. - [+] because i'm calling die() from withing stone() from within timeeffectsflags()
This commit is contained in:
parent
df442e96d1
commit
30006c4cac
2
ai.c
2
ai.c
|
@ -959,7 +959,7 @@ int ai_handle_emergencies(lifeform_t *lf, enum ATTRBRACKET iqb) {
|
|||
|
||||
// flying monsters not flying?
|
||||
if (!isprone(lf)) {
|
||||
if (hasflag(lf->race->flags, F_FLYING) && !lfhasflag(lf, F_FLYING)) {
|
||||
if (hasflag(lf->race->flags, F_NATURALFLIGHT) && !lfhasflag(lf, F_FLYING)) {
|
||||
if (cancast(lf, OT_S_FLIGHT, NULL)) {
|
||||
if (!castspell(lf, OT_S_FLIGHT, lf, NULL, lf->cell, NULL, NULL)) {
|
||||
return B_TRUE;
|
||||
|
|
75
data.c
75
data.c
|
@ -8343,7 +8343,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4");
|
||||
addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, 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_SPELLSPEED, SP_VERYSLOW, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_VERYSLOW, NA, NA, "");
|
||||
|
@ -8375,7 +8375,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+3");
|
||||
addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL);
|
||||
|
@ -9448,7 +9448,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4");
|
||||
|
@ -9474,7 +9474,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4");
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -9606,7 +9606,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_EXTRACORPSE, 50, NA, NA, "pile of sleeping powder");
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4");
|
||||
|
@ -9691,6 +9691,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4");
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_STABILITY, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_SNOWBALL, NA, NA, "pw:1;");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_SLIDE, NA, NA, "pw:10;");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "rubs its hands together");
|
||||
|
@ -9758,7 +9759,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4");
|
||||
addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -9789,7 +9790,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4");
|
||||
addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -9820,7 +9821,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4");
|
||||
addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -10166,7 +10167,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "0d4+2");
|
||||
|
@ -10190,7 +10191,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+2");
|
||||
|
@ -10214,7 +10215,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+4");
|
||||
|
@ -10586,7 +10587,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+2");
|
||||
|
@ -10617,7 +10618,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3");
|
||||
|
@ -10646,7 +10647,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+3");
|
||||
|
@ -10671,7 +10672,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4");
|
||||
|
@ -11222,7 +11223,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4");
|
||||
|
@ -11254,7 +11255,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "28d4");
|
||||
|
@ -11304,7 +11305,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "13d4");
|
||||
|
@ -11354,7 +11355,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "40d4");
|
||||
|
@ -11412,7 +11413,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "30d4");
|
||||
|
@ -11462,7 +11463,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "15d4");
|
||||
|
@ -11508,7 +11509,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "45d4");
|
||||
|
@ -11561,7 +11562,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "22d4");
|
||||
|
@ -11610,7 +11611,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4");
|
||||
|
@ -11654,7 +11655,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "32d4");
|
||||
|
@ -11729,7 +11730,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "0d4+1");
|
||||
|
@ -11751,7 +11752,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
|
@ -11781,7 +11782,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "giant gnat corpse");
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
|
@ -11808,7 +11809,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
|
@ -11879,7 +11880,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
|
@ -12223,8 +12224,10 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "screeches^a screech");
|
||||
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_SPRINT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_COLD, NA, "15");
|
||||
|
@ -12260,7 +12263,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
|
@ -12277,7 +12280,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_XRAYVIS, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_INDUCEFEAR, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_INVISIBILITY, 40, 40, "pw:1;");
|
||||
// special: ghosts gain canwill->possession if they are near
|
||||
|
@ -12400,7 +12403,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOMEOB, NA, NA, NA, "coffin");
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 10, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 7, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_CHARM, 3, 3, "pw:6;");
|
||||
|
@ -12424,7 +12427,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+1");
|
||||
|
@ -12468,7 +12471,7 @@ void initrace(void) {
|
|||
|
||||
addrace(R_DANCINGWEAPON, "dancing weapon", 0, ')', C_GREY, MT_METAL, RC_OTHER, "A magically animated weapon.");
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4");
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
3
defs.h
3
defs.h
|
@ -21,7 +21,7 @@
|
|||
#define TEXT_WARN_CLIMB "Really attempt to climb without Climbing skill?"
|
||||
#define TEXT_WARN_FLY "Warning: while airborne you will not map your surroundings."
|
||||
#define TEXT_WARN_MUTABLE "(you can now gain attributes by eating corpses)"
|
||||
#define TEXT_WARN_NOXP_GOODVSPEACEFUL "Warning: Good-aligned players gain no XP for peaceful kills."
|
||||
#define TEXT_WARN_NOXP_GOODVSPEACEFUL "Warning: Only Evil players gain XP for peaceful kills."
|
||||
|
||||
// Defaults
|
||||
#define DEF_AIFOLLOWTIME (50) // if target lf is out of view
|
||||
|
@ -2817,6 +2817,7 @@ enum FLAG {
|
|||
F_HOSTILE, // lf will attack the player if in sight
|
||||
F_FRIENDLY, // lf will attack all non-players if in sight
|
||||
F_FATALFOOD, // if lf eats food with id = v0, they die.
|
||||
F_NATURALFLIGHT, // lf can fly natural using wings or similar
|
||||
F_WANTS, // lf will try to pick up object type val0. if
|
||||
// val1 = B_COVETS, will even abandon attacks
|
||||
// for it!
|
||||
|
|
25
flag.c
25
flag.c
|
@ -1288,19 +1288,6 @@ void timeeffectsflag(flag_t *f, int howlong) {
|
|||
}
|
||||
}
|
||||
|
||||
if (f->id == F_BEINGSTONED) {
|
||||
f->val[0]--;
|
||||
if (f->val[0] == 0) {
|
||||
if (!stone(f->pile->owner)) {
|
||||
// lf turned to stone!
|
||||
return;
|
||||
} else {
|
||||
// stoning failed. stop being stoned.
|
||||
killflag(f);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (f->id == F_WET) {
|
||||
f->val[1]--;
|
||||
|
@ -1316,6 +1303,18 @@ void timeeffectsflag(flag_t *f, int howlong) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (f->id == F_BEINGSTONED) {
|
||||
f->val[0]--;
|
||||
if (f->val[0] == 0) {
|
||||
if (stone(f->pile->owner)) {
|
||||
// stoning failed
|
||||
killflag(f);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cell_t *getflagpilelocation(flagpile_t *fp) {
|
||||
|
|
8
god.c
8
god.c
|
@ -76,12 +76,13 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
godsay(rid, B_TRUE, "That is NOT acceptable for consumption!"); break;
|
||||
case GA_HERESY:
|
||||
if (rid == R_GODFIRE) {
|
||||
godsay(rid, B_TRUE, "HERESY!"); break;
|
||||
godsay(rid, B_TRUE, "HERESY!");
|
||||
} else if (rid == R_GODMAGIC) {
|
||||
godsay(rid, B_TRUE, "One's mundanity is offensive!"); break;
|
||||
godsay(rid, B_TRUE, "One's mundanity is offensive!");
|
||||
} else {
|
||||
godsay(rid, B_TRUE, "Heresy!"); break;
|
||||
godsay(rid, B_TRUE, "Heresy!");
|
||||
}
|
||||
break;
|
||||
case GA_MERCY:
|
||||
godsay(rid, B_TRUE, "You allowed my sacrifice to escape!"); break;
|
||||
case GA_MONEY:
|
||||
|
@ -903,6 +904,7 @@ int godgiftmaybe(enum RACE rid, int fromtemple) {
|
|||
rollagain = B_TRUE;
|
||||
} else {
|
||||
msg("\"Go forth and kill in my name!\"");
|
||||
msg("You transform into a vampire!");
|
||||
setrace(player, R_VAMPIRE, B_FALSE); // ie. don't set origrace!
|
||||
}
|
||||
break;
|
||||
|
|
2
io.c
2
io.c
|
@ -2217,7 +2217,7 @@ int announceflagloss(lifeform_t *lf, flag_t *f) {
|
|||
}
|
||||
break;
|
||||
case F_ICESLIDE:
|
||||
msg("%s%s feet are longer generating ice.",lfname, getpossessive(lfname));
|
||||
msg("%s%s feet are no longer generating ice.",lfname, getpossessive(lfname));
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
case F_INJURY:
|
||||
|
|
53
lf.c
53
lf.c
|
@ -3574,7 +3574,7 @@ int eat(lifeform_t *lf, object_t *o) {
|
|||
snprintf(dambuf, BUFLEN, "a bad %s",noprefix(obname));
|
||||
|
||||
// raw meat?
|
||||
if (hasflag(o->flags, F_ISMEAT) && !hasflag(o->flags, F_PREPARED) && !lfhasflag(lf, F_CANEATRAW)) {
|
||||
if (israwmeat(o) && !lfhasflag(lf, F_CANEATRAW)) {
|
||||
flag_t *cf;
|
||||
race_t *corpserace = NULL;
|
||||
cf = hasflag(o->flags, F_CORPSEOF);
|
||||
|
@ -17541,6 +17541,10 @@ void startlfturn(lifeform_t *lf) {
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (lfhasflag(lf, F_RAGE)) {
|
||||
killflagsofid(lf->flags, F_HIDING);
|
||||
}
|
||||
|
||||
// if you run out of stamina while climbing, you fall
|
||||
if (isclimbing(lf)) {
|
||||
if ((getstamina(lf) <= 0) || isburdened(lf) || lfhasflag(lf, F_GRAVBOOSTED)) {
|
||||
|
@ -17767,22 +17771,10 @@ void startlfturn(lifeform_t *lf) {
|
|||
|
||||
// effects from pack objects
|
||||
for (o = lf->pack->first ; o ; o = o->next) {
|
||||
// hot equipped objects?
|
||||
if (isequipped(o) && !isweapon(o) && !isimmuneto(lf->flags, DT_FIRE, B_FALSE)) {
|
||||
f = hasflag(o->flags, F_HOT);
|
||||
if (f) {
|
||||
f->known = B_TRUE;
|
||||
if (isplayer(lf)) {
|
||||
getobname(o, buf, 1);
|
||||
msg("^BYour %s burns you!^n", noprefix(buf));
|
||||
} else if (cansee(player, lf)) {
|
||||
char lfname[BUFLEN];
|
||||
getlfname(lf, lfname);
|
||||
getobname(o, buf, 1);
|
||||
msg("^B%s%s %s burns it!^n", lfname, getpossessive(lfname), noprefix(buf));
|
||||
}
|
||||
losehp_real(lf, f->val[0], DT_HEAT, NULL, buf, B_TRUE, o, B_FALSE);
|
||||
}
|
||||
// touch your weapons/armour in case it became hot, it was blessed and you
|
||||
// becaome undead, etc.
|
||||
if (isequipped(o)) {
|
||||
touch(lf, o);
|
||||
}
|
||||
}
|
||||
if (isdead(lf)) return;
|
||||
|
@ -18117,7 +18109,7 @@ int stone(lifeform_t *lf) {
|
|||
msg("^%c%s %s to stone!", getlfcol(lf, CC_VBAD), lfname, isplayer(lf) ? "turn" : "turns");
|
||||
}
|
||||
setlastdam(lf, "petrification");
|
||||
die(lf);
|
||||
lf->hp = 0;
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
|
@ -18770,6 +18762,24 @@ int touch(lifeform_t *lf, object_t *o) {
|
|||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (isequipped(o) && !isweapon(o) && !isimmuneto(lf->flags, DT_FIRE, B_FALSE)) {
|
||||
f = hasflag(o->flags, F_HOT);
|
||||
if (f) {
|
||||
f->known = B_TRUE;
|
||||
if (isplayer(lf)) {
|
||||
getobname(o, buf, 1);
|
||||
msg("^BYour %s burns you!^n", noprefix(buf));
|
||||
} else if (cansee(player, lf)) {
|
||||
char lfname[BUFLEN];
|
||||
getlfname(lf, lfname);
|
||||
getobname(o, buf, 1);
|
||||
msg("^B%s%s %s burns it!^n", lfname, getpossessive(lfname), noprefix(buf));
|
||||
}
|
||||
losehp_real(lf, f->val[0], DT_HEAT, NULL, buf, B_TRUE, o, B_FALSE);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// flaming or red-hot objects?
|
||||
if (!isimmuneto(lf->flags, DT_FIRE, B_FALSE)) {
|
||||
|
@ -19399,6 +19409,11 @@ int validateraces(void) {
|
|||
printf("ERROR in race '%s' - F_HASATTACK with no DR\n", r->name);
|
||||
goterror = B_TRUE;
|
||||
}
|
||||
} else if (f->id == F_FLYING) {
|
||||
if (!hasflagval(r->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL)) {
|
||||
printf("ERROR in race '%s' - has F_FLYING but can't use FLIGHT ability.\n", r->name);
|
||||
goterror = B_TRUE;
|
||||
}
|
||||
} else if (f->id == F_NOFLEE) {
|
||||
if (lfhasflag(lf, F_FLEEONHPPCT)) {
|
||||
printf("ERROR in race '%s' - has both F_NOFLEE and F_FLEEONHPPCT.\n", r->name);
|
||||
|
@ -19441,7 +19456,7 @@ int validateraces(void) {
|
|||
}
|
||||
} else if (f->id == F_NOISETEXT) {
|
||||
if (f->val[0] == N_FLY) {
|
||||
if (!hasflag(r->flags, F_FLYING) && !hasflag(r->flags, F_LEVITATING)) {
|
||||
if (!hasflag(r->flags, F_NATURALFLIGHT) && !hasflag(r->flags, F_LEVITATING)) {
|
||||
printf("ERROR in race '%s' - has NOISETEXT N_FLY but isn't flying.\n", r->name);
|
||||
goterror = B_TRUE;
|
||||
|
||||
|
|
39
map.c
39
map.c
|
@ -334,7 +334,7 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int jobok, int
|
|||
}
|
||||
}
|
||||
}
|
||||
finalisemonster(lf, NULL, wantflags);
|
||||
finalisemonster(lf, NULL, wantflags, 0);
|
||||
}
|
||||
|
||||
// NOTE: because the initial maps (world, heaven, dungeon lev1) are created BEFORE the player,
|
||||
|
@ -375,11 +375,12 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int jobok, int
|
|||
amt = rnd(f->val[0], f->val[1]);
|
||||
}
|
||||
if (amt > 1) {
|
||||
int idx = 0;
|
||||
cell_t *adjcell;
|
||||
amt--; // we've already added one
|
||||
|
||||
//adjcell = c;
|
||||
for ( ; amt > 0; amt--) {
|
||||
for ( ; amt > 0; amt--, idx++) {
|
||||
lifeform_t *newlf;
|
||||
// find an adjacent cell to one of the newly added monsters,
|
||||
// starting with the first one
|
||||
|
@ -395,7 +396,7 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int jobok, int
|
|||
newlf->born = B_FALSE;
|
||||
|
||||
|
||||
finalisemonster(newlf, lf, wantflags);
|
||||
finalisemonster(newlf, lf, wantflags, idx);
|
||||
|
||||
newlf->born = B_TRUE;
|
||||
|
||||
|
@ -443,7 +444,7 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int jobok, int
|
|||
|
||||
if (nadded) (*nadded)++;
|
||||
|
||||
finalisemonster(newlf, lf, wantflags);
|
||||
finalisemonster(newlf, lf, wantflags, 0);
|
||||
|
||||
newlf->born = B_TRUE;
|
||||
}
|
||||
|
@ -5268,16 +5269,33 @@ void finalisemap(map_t *map, object_t *entryob) {
|
|||
|
||||
}
|
||||
|
||||
void finalisemonster(lifeform_t *lf, lifeform_t *leader, flagpile_t *wantflags) {
|
||||
void finalisemonster(lifeform_t *lf, lifeform_t *leader, flagpile_t *wantflags, int idx) {
|
||||
flag_t *f;
|
||||
enum FLAG noflag[MAXCANDIDATES];
|
||||
int nnoflags = 0,i;
|
||||
if (leader) {
|
||||
// if leader is asleep, minions will also be asleep
|
||||
// if leader is asleep:
|
||||
// for unintelligent monsters, minions will also be asleep
|
||||
// for intelligent monsters, all but the FIRST minion will also be asleep
|
||||
if (lfhasflag(leader, F_ASLEEP)) {
|
||||
enum ATTRBRACKET iqb,wisb;
|
||||
int keepguard = B_FALSE;
|
||||
iqb = getattrbracket(getattr(lf, A_IQ), A_IQ, NULL);
|
||||
wisb = getattrbracket(getattr(lf, A_WIS), A_WIS, NULL);
|
||||
if ((iqb > IQ_ANIMAL) && (wisb >= AT_AVERAGE)) {
|
||||
keepguard = B_TRUE;
|
||||
}
|
||||
if (keepguard && (idx == 0)) {
|
||||
// first minion will stay awake
|
||||
noflag[nnoflags++] = F_ASLEEP;
|
||||
} else {
|
||||
if (wantflags && hasflag(wantflags, F_ASLEEP)) {
|
||||
// already going to be asleep?
|
||||
} else {
|
||||
addflag(wantflags, F_ASLEEP, NA, ST_ASLEEP, NA, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((lf->cell->map->illumination != IL_FULLLIT) && !lfhasflag(lf, F_SEEINDARK)) {
|
||||
if ((getraceclass(lf) != RC_HUMANOID) && pctchance(75)) {
|
||||
|
@ -5287,7 +5305,6 @@ void finalisemonster(lifeform_t *lf, lifeform_t *leader, flagpile_t *wantflags)
|
|||
|
||||
// minions never have certain flags.
|
||||
killflagsofid(lf->flags, F_DEMANDSBRIBE);
|
||||
killflagsofid(wantflags, F_DEMANDSBRIBE);
|
||||
}
|
||||
|
||||
// random monster behaviours
|
||||
|
@ -5335,6 +5352,10 @@ void finalisemonster(lifeform_t *lf, lifeform_t *leader, flagpile_t *wantflags)
|
|||
copyflags(lf->flags, wantflags, NA);
|
||||
}
|
||||
|
||||
for (i = 0; i < nnoflags; i++ ){
|
||||
killflagsofid(lf->flags, noflag[i]);
|
||||
}
|
||||
|
||||
if (lfhasflag(lf, F_ASLEEP)) {
|
||||
killflagsofid(lf->flags, F_FLYING);
|
||||
killflagsofid(lf->flags, F_HIDING);
|
||||
|
@ -6080,15 +6101,15 @@ int getslipperyness(cell_t *c, object_t **slipob) {
|
|||
}
|
||||
|
||||
for (o = c->obpile->first ; o ; o = o->next) {
|
||||
int thisslip;
|
||||
int thisslip = 0;
|
||||
sumflags(o->flags, F_SLIPPERY, &thisslip, NULL, NULL);
|
||||
thisslip += addition;
|
||||
limit(&thisslip, 0, NA);
|
||||
if (thisslip > 0) {
|
||||
if (thisslip > bestslip) {
|
||||
bestob = o;
|
||||
bestslip = thisslip;
|
||||
}
|
||||
thisslip += addition;
|
||||
thisslip *= o->amt;
|
||||
totalslip += thisslip;
|
||||
}
|
||||
|
|
2
map.h
2
map.h
|
@ -84,7 +84,7 @@ void expand_cave(map_t *map, int numpasses);
|
|||
void explodesinglecell(cell_t *c, int dam, int killwalls, object_t *o, cell_t *centre);
|
||||
void explodecells(cell_t *c, int dam, int killwalls, object_t *o, int range, int dirtype, int wantannounce);
|
||||
void finalisemap(map_t *map, object_t *entryob);
|
||||
void finalisemonster(lifeform_t *lf, lifeform_t *leader, flagpile_t *wantflags);
|
||||
void finalisemonster(lifeform_t *lf, lifeform_t *leader, flagpile_t *wantflags, int idx);
|
||||
celltype_t *findcelltype(enum CELLTYPE cid);
|
||||
celltype_t *findcelltypebyname(char *name);
|
||||
habitat_t *findhabitat(enum HABITAT id);
|
||||
|
|
11
objects.c
11
objects.c
|
@ -7144,6 +7144,13 @@ int ispushable(object_t *o) {
|
|||
return B_FALSE;
|
||||
}
|
||||
|
||||
int israwmeat(object_t *o) {
|
||||
if (hasflag(o->flags, F_ISMEAT) && !hasflag(o->flags, F_PREPARED) && (o->type->id != OT_ROASTMEAT)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
int isreadable(object_t *o) {
|
||||
switch (o->type->obclass->id) {
|
||||
case OC_SCROLL:
|
||||
|
@ -12508,8 +12515,12 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
|
|||
// doesn't matter wheter you hit or not...
|
||||
if (isundead(target) && isblessed(o)) {
|
||||
if (seen) {
|
||||
if (isplayer(target)) {
|
||||
msg("%s recoil in fear!", targetname);
|
||||
} else {
|
||||
msg("%s recoils in fear!", targetname);
|
||||
}
|
||||
}
|
||||
o->blessknown = B_TRUE;
|
||||
// ... but undead won't catch blessed things
|
||||
willcatch = B_FALSE;
|
||||
|
|
|
@ -205,6 +205,7 @@ int isoperable(object_t *o);
|
|||
int isplainob(object_t *o);
|
||||
int ispourable(object_t *o);
|
||||
int ispushable(object_t *o);
|
||||
int israwmeat(object_t *o);
|
||||
int isreadable(object_t *o);
|
||||
int isrotting(object_t *o);
|
||||
flag_t *issecretdoor(object_t *o);
|
||||
|
|
6
shops.c
6
shops.c
|
@ -49,7 +49,9 @@ float applyshoppricemod(float origprice, lifeform_t *lf, object_t *shop, enum SH
|
|||
// reduce based on speech (up to -30%);
|
||||
slev = getskill(lf, SK_SPEECH);
|
||||
if (slev) {
|
||||
pricepct += ((slev*5)*dir);
|
||||
int modamt;
|
||||
modamt = ((int)(slev*5))*dir;
|
||||
pricepct += modamt;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -852,6 +854,7 @@ enum SHOPRETURN shoppurchase(lifeform_t *lf, object_t *vm, int starty, char *top
|
|||
if (purchasemethod == PM_CARD) {
|
||||
// god of thieves likes credit cards...
|
||||
pleasegodmaybe(R_GODTHIEVES, (value/75));
|
||||
more(); // in case there was an effect
|
||||
} else {
|
||||
practice(player, SK_SPEECH, 1);
|
||||
}
|
||||
|
@ -884,6 +887,7 @@ enum SHOPRETURN shoppurchase(lifeform_t *lf, object_t *vm, int starty, char *top
|
|||
|
||||
practice(player, SK_THIEVERY, 1);
|
||||
pleasegodmaybe(R_GODTHIEVES, (value/50));
|
||||
more(); // in case there was an effect
|
||||
o = NULL;
|
||||
} else {
|
||||
msg("^B\"HEY! Get out of my shop, thief!\""); more();
|
||||
|
|
7
spell.c
7
spell.c
|
@ -5321,7 +5321,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
int ispoisoned = B_FALSE, isdecayed = B_FALSE;
|
||||
if (isrotting(o)) {
|
||||
isdecayed = B_TRUE;
|
||||
} else if (o->type->id == OT_POT_POISON) {
|
||||
} else if ((o->type->id == OT_POT_POISON) || (hasflag(o->flags, F_PURIFIESTO))) {
|
||||
ispoisoned = B_TRUE;
|
||||
} else if ((o->type->id == OT_TRAPARROWP) ||
|
||||
(o->type->id == OT_TRAPNEEDLEP) ||
|
||||
|
@ -6208,8 +6208,9 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
f->val[0] = 30 + (power/2);
|
||||
f->val[1] = B_FALSE; // struggling doesn't damage the vine
|
||||
}
|
||||
if (caster) {
|
||||
/// remmeber creator. if they don't have los to us, spell
|
||||
if (caster && (caster->cell->map == targcell->map)) {
|
||||
// if caster is on the same map (ie. not being cast by a god)
|
||||
/// remember creator. if they don't have los to us, spell
|
||||
// is broken and vines will vanish.
|
||||
setobcreatedby(o, caster);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue