Increase cooldown time on monsters casting 'flee' spells

This commit is contained in:
Rob Pearce 2016-06-06 19:21:15 +10:00
parent 250fe6033a
commit 95e36275d3
2 changed files with 12 additions and 10 deletions

20
data.c
View File

@ -10537,8 +10537,8 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, 6, NULL); addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, 6, NULL);
addflag(lastrace->flags, F_SEEINDARK, 7, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 7, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 3, 3, "pw:1;race:plague rat;"); addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 10, 10, "pw:1;race:plague rat;");
addflag(lastrace->flags, F_CANCAST, OT_S_SUMMONANIMALSSM, 2, 2, "pw:5;race:giant rat;count:2;"); addflag(lastrace->flags, F_CANCAST, OT_S_SUMMONANIMALSSM, 3, 3, "pw:5;race:giant rat;count:2;");
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_THIEVERY, PR_BEGINNER, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_THIEVERY, PR_BEGINNER, NA, NULL);
addflag(lastrace->flags, F_AISPELLTARGETOVERRIDE, OT_S_SHAPESHIFT, F_AICASTTOFLEE, ST_SELF, "100"); addflag(lastrace->flags, F_AISPELLTARGETOVERRIDE, OT_S_SHAPESHIFT, F_AICASTTOFLEE, ST_SELF, "100");
@ -12547,7 +12547,7 @@ void initrace(void) {
addflag(lastrace->flags, F_CANCAST, OT_S_AIRBLAST, NA, NA, "pw:3;"); addflag(lastrace->flags, F_CANCAST, OT_S_AIRBLAST, NA, NA, "pw:3;");
addflag(lastrace->flags, F_CANCAST, OT_S_GUSTOFWIND, NA, NA, "pw:8;"); addflag(lastrace->flags, F_CANCAST, OT_S_GUSTOFWIND, NA, NA, "pw:8;");
addflag(lastrace->flags, F_CANCAST, OT_S_INVISIBILITY, 20, 20, "pw:1;"); addflag(lastrace->flags, F_CANCAST, OT_S_INVISIBILITY, 20, 20, "pw:1;");
addflag(lastrace->flags, F_CANCAST, OT_S_GASEOUSFORM, NA, NA, "pw:1;"); addflag(lastrace->flags, F_CANCAST, OT_S_GASEOUSFORM, 5, 5, "pw:1;");
addflag(lastrace->flags, F_CANCAST, OT_S_MIRRORIMAGE, 10, 10, "pw:2;"); addflag(lastrace->flags, F_CANCAST, OT_S_MIRRORIMAGE, 10, 10, "pw:2;");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_TWOWEAPON, PR_ADEPT, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_TWOWEAPON, PR_ADEPT, NA, NULL);
@ -12586,7 +12586,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout"); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
addflag(lastrace->flags, F_CANCAST, OT_S_WALLOFFIRE, 10, 10, "pw:5;"); addflag(lastrace->flags, F_CANCAST, OT_S_WALLOFFIRE, 10, 10, "pw:5;");
addflag(lastrace->flags, F_CANCAST, OT_S_FLAMEPILLAR, NA, NA, "pw:7;"); addflag(lastrace->flags, F_CANCAST, OT_S_FLAMEPILLAR, NA, NA, "pw:7;");
addflag(lastrace->flags, F_CANCAST, OT_S_GASEOUSFORM, NA, NA, "pw:1;"); addflag(lastrace->flags, F_CANCAST, OT_S_GASEOUSFORM, 5, 5, "pw:1;");
addflag(lastrace->flags, F_CANCAST, OT_S_SIZEUP, 20, 20, "pw:1;"); addflag(lastrace->flags, F_CANCAST, OT_S_SIZEUP, 20, 20, "pw:1;");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_TWOWEAPON, PR_ADEPT, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_TWOWEAPON, PR_ADEPT, NA, NULL);
@ -13322,7 +13322,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_GASEOUSFORM, NA, NA, "pw:1;"); addflag(lastrace->flags, F_CANCAST, OT_S_GASEOUSFORM, 4, 4, "pw:1;");
// gremlins also cause tech to fail around them. // gremlins also cause tech to fail around them.
addrace(R_GRIFFON, "griffon", 220, 'f', C_WHITE, MT_FLESH, RC_ANIMAL, "Griffons have a lion's body and the head, torso and forelegs of an eagle."); addrace(R_GRIFFON, "griffon", 220, 'f', C_WHITE, MT_FLESH, RC_ANIMAL, "Griffons have a lion's body and the head, torso and forelegs of an eagle.");
@ -15029,7 +15029,7 @@ void initrace(void) {
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
addflag(lastrace->flags, F_SPELLSPEED, SP_SLOW, NA, NA, NULL); addflag(lastrace->flags, F_SPELLSPEED, SP_SLOW, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_FROSTBITE, NA, NA, "pw:1;"); addflag(lastrace->flags, F_CANCAST, OT_S_FROSTBITE, NA, NA, "pw:1;");
addflag(lastrace->flags, F_CANCAST, OT_S_ICICLE, 3, 3, "pw:1;"); addflag(lastrace->flags, F_CANCAST, OT_S_ICICLE, 8, 8, "pw:1;");
addflag(lastrace->flags, F_RNDSPELLCOUNT, 1, NA, NA, NULL); addflag(lastrace->flags, F_RNDSPELLCOUNT, 1, NA, NA, NULL);
addflag(lastrace->flags, F_RNDSPELLSCHOOL, SS_COLD, 1, 2, "pw:1;"); addflag(lastrace->flags, F_RNDSPELLSCHOOL, SS_COLD, 1, 2, "pw:1;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures");
@ -20323,7 +20323,7 @@ void initrace(void) {
addflag(lastrace->flags, F_CANCAST, OT_S_CHARM, 3, 3, "pw:6;"); addflag(lastrace->flags, F_CANCAST, OT_S_CHARM, 3, 3, "pw:6;");
addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:3;"); addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:3;");
addflag(lastrace->flags, F_CANCAST, OT_S_STUN, 5, 5, "pw:1;"); addflag(lastrace->flags, F_CANCAST, OT_S_STUN, 5, 5, "pw:1;");
addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 3, 3, "pw:1;race:vampire bat;"); addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 10, 10, "pw:1;race:vampire bat;");
addflag(lastrace->flags, F_AISPELLTARGETOVERRIDE, OT_S_SHAPESHIFT, F_AICASTTOATTACK, ST_SELF, "100"); addflag(lastrace->flags, F_AISPELLTARGETOVERRIDE, OT_S_SHAPESHIFT, F_AICASTTOATTACK, ST_SELF, "100");
addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL);
addflag(lastrace->flags, F_DETECTOBS, 10, OT_COFFIN, NA, NULL); addflag(lastrace->flags, F_DETECTOBS, 10, OT_COFFIN, NA, NULL);
@ -20362,7 +20362,7 @@ void initrace(void) {
addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL); addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_CRUSH, NA, NA, "dam:2d8;"); addflag(lastrace->flags, F_CANWILL, OT_A_CRUSH, NA, NA, "dam:2d8;");
addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 3, 3, "pw:1;race:grizzly bear;"); addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 10, 10, "pw:1;race:grizzly bear;");
addflag(lastrace->flags, F_CANCAST, OT_S_SUMMONANIMALSLG, 10, 10, "pw:5;race:black bear;count:2;"); addflag(lastrace->flags, F_CANCAST, OT_S_SUMMONANIMALSLG, 10, 10, "pw:5;race:black bear;count:2;");
addflag(lastrace->flags, F_CASTCHANCE, 20, NA, NA, NULL); addflag(lastrace->flags, F_CASTCHANCE, 20, NA, NA, NULL);
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "bares its teeth"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "bares its teeth");
@ -20408,7 +20408,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL);
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL); addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 3, 3, "pw:1;race:plague rat;"); addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 10, 10, "pw:1;race:plague rat;");
addflag(lastrace->flags, F_CANCAST, OT_S_SUMMONANIMALSSM, 10, 10, "pw:5;race:giant rat;count:5;"); addflag(lastrace->flags, F_CANCAST, OT_S_SUMMONANIMALSSM, 10, 10, "pw:5;race:giant rat;count:5;");
addflag(lastrace->flags, F_STARTOBWEPSK, 40, SK_SHORTBLADES, NA, "common"); addflag(lastrace->flags, F_STARTOBWEPSK, 40, SK_SHORTBLADES, NA, "common");
addflag(lastrace->flags, F_STARTOB, 10, NA, NA, "potion of rum"); addflag(lastrace->flags, F_STARTOB, 10, NA, NA, "potion of rum");
@ -20451,7 +20451,7 @@ 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_MAXATTACKS, 1, 1, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL); addflag(lastrace->flags, F_REGENERATES, 1, NA, NA, NULL);
addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 3, 3, "pw:1;race:dire wolf;"); addflag(lastrace->flags, F_CANCAST, OT_S_SHAPESHIFT, 10, 10, "pw:1;race:dire wolf;");
addflag(lastrace->flags, F_CANCAST, OT_S_SUMMONANIMALSMD, 10, 10, "pw:5;race:young wolf;"); addflag(lastrace->flags, F_CANCAST, OT_S_SUMMONANIMALSMD, 10, 10, "pw:5;race:young wolf;");
addflag(lastrace->flags, F_AISPELLTARGETOVERRIDE, OT_S_SHAPESHIFT, F_AICASTTOATTACK, ST_SELF, "100"); addflag(lastrace->flags, F_AISPELLTARGETOVERRIDE, OT_S_SHAPESHIFT, F_AICASTTOATTACK, ST_SELF, "100");
addflag(lastrace->flags, F_STARTSKILL, SK_FIRSTAID, PR_ADEPT, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_FIRSTAID, PR_ADEPT, NA, NULL);

2
defs.h
View File

@ -4163,6 +4163,8 @@ enum FLAG {
F_CAFFEINATED, // can't sleep. F_CAFFEINATED, // can't sleep.
F_CANEATRAW, // lf can eat raw food with no issues F_CANEATRAW, // lf can eat raw food with no issues
F_CANCAST, // can cast the spell val0 (need MP) F_CANCAST, // can cast the spell val0 (need MP)
// for monsters, v1 / v2 = cooldown. when v1 = v2, you can cast it.
// after catsing, v1 is set to -1.
F_CASTWITHOUTIQ, // can cast spells even eith low iq. F_CASTWITHOUTIQ, // can cast spells even eith low iq.
F_CANHEARLF, // you can hear lifeform id v0 F_CANHEARLF, // you can hear lifeform id v0