- [+] poltergeists are not honouring stayinroom.... fixed.
- [+] unique monsters shouldn't get things like 'hungry' - [+] A some bread flies through the air toward you. A some bread hits you. - [+] related to using "FEELTEXT" - [+] fixed - need to set "no_a" when using feeltext. - [+] bug: ice wraith drops a bog wraith corpse - [+] ...why ? - [+] wish for 'ice wraith corpse', and i end up with 'bog wraith corpse' - [+] racename is "wraith", not "ice wraith" - [+] ...because "p" was just "wraith corpse", what happened to "ice" ? - [+] wishing for "bog wraith corpse", p is "bog wraight corpse" was expected. - [+] for some reason the prefix "ice " is special... - [+] it's because "ice" is the name of a material - [+] need isvalidoverridemat() - [+] don't show attribs as options when levelling up if the base score is maxed. - [+] bug donating money - [+] bug: wearing gauntlets, someone cast heat metal on me. my gauntlets didn't hurt me? - [+] nor did my armour?? - [+] they get set to 'a red-hot xxx' - [+] ...but don't deal damage. - [+] touch() needs to differentiate touching something (with your hands) from it touching you! - [+] ie. int onpurpose argument. - [+] bjorn no longer being pleased by defeating all foes... - [+] monster modification at nighttime/daytime - [+] undead are stronger at night (bonus on all skillchecks & tohit) +/- 15% - [+] undead are weaker during the day (penalty to skillchecks & tohit) - [+] plants are stronger during the day - [+] describe in adept level knowledge - [+] more work on hydra - [+] poison breath - autocreate poison gas in front of it - [+] cases where head not severed - [+] criticalhit() needs to know about the weapon which was used (or NULL) - [+] then: - [+] flaming weapon cauterises wound - [+] silver does too - [+] in this case after severing a head: - [+] don't regrow more - [+] lower TR - [+] lose f_hasattack - [+] if it was the last head, it dies. - [+] fishfolk should have extra evasion in water, and aviads in air - [+] implmement - [+] apply to races: - [+] fishfolk - [+] aviad - [+] nimble creatures with aquatic - [+] nimble creatures with natural flight - [+] announce in makedesc_race, beginner level knowledge.
This commit is contained in:
parent
079a69f648
commit
43aa7888f3
58
data.c
58
data.c
|
@ -975,7 +975,7 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "random good armour");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "random good armour");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "random good armour");
|
||||
addflag(lastjob->flags, F_STAYINROOM, NA, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_STAYINROOM, NA, B_NOCHASE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_ARMOUR, PR_SKILLED, NA, NULL);
|
||||
// 50% of guards are bribable
|
||||
f = addflag(lastjob->flags, F_WANTS, OT_GOLD, NA, NA, NULL); addcondition(f, FC_IFMONSTER, 50);
|
||||
|
@ -8663,7 +8663,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STAYINROOM, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STAYINROOM, NA, B_MAYCHASE, NA, NULL);
|
||||
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_JUMP, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^clucking");
|
||||
|
@ -8720,6 +8720,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, "pw:1;");
|
||||
addflag(lastrace->flags, F_VISRANGEMOD, 1, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_EVASION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 20, NA, NA, NULL);
|
||||
// penalties
|
||||
addbonustext(lastrace->flags, F_PENDESC, "Low hit points.");
|
||||
addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
|
||||
|
@ -8910,6 +8911,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_BREATHWATER, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_ADEPT, NA, NULL);
|
||||
addflag(lastrace->flags, F_SWIMEVASION, 20, NA, NA, NULL);
|
||||
// penalties
|
||||
addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
|
||||
// for monsters:
|
||||
|
@ -10234,7 +10236,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_SS_NATURE, PR_EXPERT, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_THIEVERY, PR_SKILLED, NA, NULL);
|
||||
addflag(lastrace->flags, F_STAYINROOM, NA, NA, NA, NULL); // stay in our starting room
|
||||
addflag(lastrace->flags, F_STAYINROOM, NA, B_NOCHASE, NA, NULL); // stay in our starting room
|
||||
addflag(lastrace->flags, F_MORALE, 2, NA, NA, NULL);
|
||||
|
||||
addrace(R_DJINNI, "genie", 65, 'Y', C_YELLOW, MT_FLESH, RC_MAGIC, "Genies are powerful air spirits. They resemble richly dressed humans floating on a cone of whirling air.");
|
||||
|
@ -11473,7 +11475,7 @@ void initrace(void) {
|
|||
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_STAYINROOM, NA, NA, 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_STARTATT, A_STR, AT_VHIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, NA, NA, "25-35");
|
||||
|
@ -12012,7 +12014,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_INVISIBLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STAYINROOM, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STAYINROOM, NA, B_NOCHASE, NA, NULL);
|
||||
|
||||
addrace(R_PRIMALFIRE, "fire primality", 50, 'E', C_RED, MT_FIRE, RC_MAGIC, "A living mass of fire, animated by powerful magic.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
|
@ -12904,6 +12906,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 1, NA, 2, NULL);
|
||||
addflag(lastrace->flags, F_TR, 1, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SWIMEVASION, 20, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, "");
|
||||
|
@ -12930,6 +12933,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_TR, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_SWIMEVASION, 20, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, "");
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL);
|
||||
|
@ -12950,6 +12954,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SWIMEVASION, 20, 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_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -12977,6 +12982,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, 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_SWIMEVASION, 20, 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_TREMORSENSE, 10, NA, NA, NULL);
|
||||
|
@ -13266,6 +13272,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, 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_HITDICE, 1, NA, 4, NULL);
|
||||
|
@ -13273,7 +13280,6 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, 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_TREMORSENSE, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_FLY, 1, NA, "^flapping wings");
|
||||
|
@ -13295,6 +13301,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, 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_HITDICE, 1, NA, NA, NULL);
|
||||
|
@ -13302,7 +13309,6 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_SONICBOLT, 3, 3, "pw:5;dam:1d4;");
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
|
@ -13355,6 +13361,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, 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_HITDICE, 2, NA, NA, NULL);
|
||||
|
@ -13362,7 +13369,6 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_MAXATTACKS, 2, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, -10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_VAMPIRIC, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
|
||||
|
@ -14056,6 +14062,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, 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_HITDICE, 7, NA, NA, NULL);
|
||||
|
@ -14096,7 +14103,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 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_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
|
||||
|
@ -14131,7 +14138,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL);
|
||||
|
@ -14165,7 +14172,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 7, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL);
|
||||
|
@ -14196,7 +14203,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_TR, 8, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 11, NA, NULL);
|
||||
addflag(lastrace->flags, F_EXTRADAM, DT_COLD, NA, NA, "1d6");
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL);
|
||||
|
@ -14301,7 +14308,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HITDICE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 9, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 14, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL);
|
||||
|
@ -14544,7 +14551,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_TR, 15, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 18, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 18, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 15, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 15, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL);
|
||||
|
@ -14833,6 +14840,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_SWIMEVASION, 20, 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_HASATTACK, OT_TEETH, 5, NA, NULL);
|
||||
|
@ -15263,6 +15271,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 5, 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_HITDICE, 10, NA, NA, NULL);
|
||||
|
@ -15299,6 +15308,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, 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_HITDICE, 28, NA, NA, NULL);
|
||||
|
@ -15402,6 +15412,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 15, 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_HITDICE, 40, NA, NA, NULL);
|
||||
|
@ -15462,6 +15473,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, 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_HITDICE, 30, NA, NA, NULL);
|
||||
|
@ -15562,6 +15574,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 15, 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_HITDICE, 45, NA, NA, NULL);
|
||||
|
@ -15617,6 +15630,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, 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_HITDICE, 22, NA, NA, NULL);
|
||||
|
@ -15714,6 +15728,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 15, 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_HITDICE, 32, NA, NA, NULL);
|
||||
|
@ -15799,11 +15814,11 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_AIREVASION, 50, 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_HITDICE, 0, NA, 1, NULL);
|
||||
addflag(lastrace->flags, F_TR, 0, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 60, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -15833,7 +15848,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 0, NA, 1, NULL);
|
||||
addflag(lastrace->flags, F_TR, 1, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
|
@ -15869,7 +15884,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 1, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
|
@ -15990,7 +16005,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 1, NA, 4, NULL);
|
||||
addflag(lastrace->flags, F_TR, 1, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 60, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 50, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_ZAPPER, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_S_FLASH, 15, 15, "pw:4;");
|
||||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "pulses");
|
||||
|
@ -17076,7 +17091,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 8, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 50, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AIREVASION, 30, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL);
|
||||
|
@ -17193,6 +17208,7 @@ void initrace(void) {
|
|||
addflag(r->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_NOINJURIES, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_DAYBOOST, 10, NA, NA, NULL);
|
||||
} else if (r->raceclass->id == RC_SLIME) {
|
||||
addflag(r->flags, F_NOBREATH, B_TRUE, NA, NA, NULL);
|
||||
addflag(r->flags, F_DISEASEIMMUNE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -17230,6 +17246,10 @@ void initrace(void) {
|
|||
addflag(r->flags, F_DTIMMUNE, DT_NECROTIC, NA, NA, NULL);
|
||||
addflag(r->flags, F_BREATHWATER, B_TRUE, NA, NA, NULL);
|
||||
|
||||
// +/- 15 accuracy during day/night
|
||||
addflag(r->flags, F_NIGHTBOOST, 15, NA, NA, NULL);
|
||||
addflag(r->flags, F_DAYBOOST, -15, NA, NA, NULL);
|
||||
|
||||
switch (r->id) {
|
||||
case R_SKELETONFIRE:
|
||||
f = hasflagval(r->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL);
|
||||
|
|
9
defs.h
9
defs.h
|
@ -86,6 +86,7 @@
|
|||
#define B_NODISTANT (0)
|
||||
|
||||
#define B_MAYCHASE (-1)
|
||||
#define B_NOCHASE (0)
|
||||
#define B_ONLYEXTERNAL (-1)
|
||||
#define B_FORCE (-2)
|
||||
#define B_ONPURPOSE (-1)
|
||||
|
@ -2971,6 +2972,8 @@ enum FLAG {
|
|||
// DEF_AIFOLLOWTIME.
|
||||
F_FOUNDGODSTONE, // this flag is added once the player picks up their
|
||||
// first godstone, and a god appears.
|
||||
F_DAYBOOST, // this lf gets +v0 acc during the day
|
||||
F_NIGHTBOOST, // this lf gets +v0 acc during the night
|
||||
F_WINNER, // player has won the game!
|
||||
// if you won by becoming a god, v1 = godid
|
||||
// if you won by becoming a demigod, v1 = godid
|
||||
|
@ -2995,6 +2998,8 @@ enum FLAG {
|
|||
// v0 = max time allowed to rest before checkout
|
||||
// v1 = total time rested
|
||||
// text = obid of hotel
|
||||
F_FLIGHTEVASION, // evasion = v0% of evasion if lf flying
|
||||
F_SWIMEVASION, // evasion = v0% of evasion if lf swimming
|
||||
F_ALIGNMENT, // v0 = al_good, al_neutral, al_evil. default neutral.
|
||||
// if al_none is selected for the player, they
|
||||
// can pick what alignment they want to be.
|
||||
|
@ -3174,11 +3179,11 @@ enum FLAG {
|
|||
// habitat
|
||||
F_STAYINROOM, // lf will not walk out of roomid v0
|
||||
// if v0 is not set, we won't leave our current room.
|
||||
// if v1 is set (not NA), then we are allowed to chase
|
||||
// if v1 is B_MAYCHASE, then we are allowed to chase
|
||||
// our targets out of the room.
|
||||
// THIS CAN ALSO GO ON VAULTS:
|
||||
// for vaults, it means that monsters created in
|
||||
// this vault will have: f_stayinroom, na, true, na
|
||||
// this vault will have: f_stayinroom, na, maychase, na
|
||||
F_FALLDISTANCE, // how many floors this lf has fallen through.
|
||||
// ABILITY/SPELL FLAGS / ability flags / spell flags
|
||||
F_FAILEDINSPECT, // lf has failed an inspect check for objecttype v0
|
||||
|
|
32
io.c
32
io.c
|
@ -4357,7 +4357,7 @@ void docomms(lifeform_t *lf) {
|
|||
snprintf(buf, BUFLEN, "How much money will you give to %s (0-%d)",
|
||||
lfname, countmoney(player->pack));
|
||||
askstring(buf, '?', countbuf, BUFLEN, NULL);
|
||||
count = atoi(buf);
|
||||
count = atoi(countbuf);
|
||||
if (!count) {
|
||||
msg("Cancelled.");
|
||||
return;
|
||||
|
@ -7233,6 +7233,13 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel
|
|||
case F_AQUATIC: if (lorelev >= PR_NOVICE) strcpy(buf, "Moves normally through water"); break;
|
||||
case F_AWARENESS: if (lorelev >= PR_BEGINNER) strcpy(buf, "Can see in all directions."); break;
|
||||
case F_CANEATRAW: if (lorelev >= PR_ADEPT) strcpy(buf, "Can safely digest raw meat."); break;
|
||||
case F_DAYBOOST:
|
||||
if (lorelev >= PR_ADEPT) {
|
||||
if (f->val[0] > 0) {
|
||||
sprintf(buf, "+%d accuracy during the day.", getaccuracymodnum(f->val[0]));
|
||||
}
|
||||
}
|
||||
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)) {
|
||||
|
@ -7283,6 +7290,7 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel
|
|||
}
|
||||
break;
|
||||
case F_ENHANCESMELL: if (lorelev >= PR_BEGINNER) sprintf(buf, "Enhanced sense of smell (range %d)", f->val[0]); break;
|
||||
case F_FLIGHTEVASION: if (lorelev >= PR_BEGINNER) sprintf(buf, "%d%% evasion while flying", f->val[0]); break;
|
||||
case F_FLYING: if (lorelev >= PR_NOVICE) sprintf(buf, "Can fly at will"); break;
|
||||
case F_HEAVYBLOW: if (lorelev >= PR_ADEPT) sprintf(buf, "Attacks will knock enemies backwards"); break;
|
||||
case F_HITCONFER:
|
||||
|
@ -7303,6 +7311,13 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel
|
|||
case F_LEVITATING: if (lorelev >= PR_NOVICE) sprintf(buf, "Can levitate at will"); break;
|
||||
case F_MEDITATES: if (lorelev >= PR_ADEPT) sprintf(buf, "Meditates to retain awareness while sleeping."); break;
|
||||
case F_MPMOD: if (f->val[0] > 0) sprintf(buf, "+%d Mana", f->val[0]); break;
|
||||
case F_NIGHTBOOST:
|
||||
if (lorelev >= PR_ADEPT) {
|
||||
if (f->val[0] > 0) {
|
||||
sprintf(buf, "+%d accuracy at night.", getaccuracymodnum(f->val[0]));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_NONCORPOREAL: if (lorelev >= PR_NOVICE) sprintf(buf, "Only affected by blessed, magic or silver weapons"); break;
|
||||
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;
|
||||
|
@ -7316,6 +7331,7 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel
|
|||
case F_SPIDERCLIMB: if (lorelev >= PR_NOVICE) sprintf(buf, "Adheres to walls"); break;
|
||||
case F_STABILITY: if (lorelev >= PR_BEGINNER) sprintf(buf, "Will not fall on slippery ground."); break;
|
||||
case F_STENCH: sprintf(buf, "Emits a foul odour which affects others"); break;
|
||||
case F_SWIMEVASION: if (lorelev >= PR_BEGINNER) sprintf(buf, "%d%% evasion while swimming", f->val[0]); break;
|
||||
case F_TREMORSENSE: if (lorelev >= PR_BEGINNER) sprintf(buf, "Can sense vibrations (range %d)", f->val[0]); break;
|
||||
case F_VISRANGEMOD: if (lorelev >= PR_BEGINNER) if (f->val[0] > 0) sprintf(buf, "Enhanced vision range (+%d)", f->val[0]); break;
|
||||
default:
|
||||
|
@ -7366,6 +7382,13 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel
|
|||
strcpy(buf, "");
|
||||
switch (f->id) {
|
||||
case F_CARNIVORE: if (lorelev >= PR_BEGINNER) sprintf(buf, "Will only eat meat."); break;
|
||||
case F_DAYBOOST:
|
||||
if (lorelev >= PR_ADEPT) {
|
||||
if ((f->val[0] != NA) && (f->val[0] < 0)) {
|
||||
sprintf(buf, "-%d accuracy during the day.", getaccuracymodnum(abs(f->val[0])));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_DEAF: if (lorelev >= PR_BEGINNER) sprintf(buf, "Deaf"); break;
|
||||
case F_DIURNAL: if ((lorelev >= PR_BEGINNER) && !forplayersel) sprintf(buf, "Sleeps at night."); break;
|
||||
case F_DTVULN:
|
||||
|
@ -7406,6 +7429,13 @@ char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel
|
|||
break;
|
||||
case F_MPMOD: if (f->val[0] < 0) sprintf(buf, "%d Mana", f->val[0]); break;
|
||||
case F_NEEDSWATER: if (lorelev >= PR_NOVICE) sprintf(buf, "Will suffocate without water"); break;
|
||||
case F_NIGHTBOOST:
|
||||
if (lorelev >= PR_ADEPT) {
|
||||
if ((f->val[0] != NA) && (f->val[0] < 0)) {
|
||||
sprintf(buf, "-%d accuracy at night.", getaccuracymodnum(abs(f->val[0])));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_NOPRAY: if (lorelev >= PR_BEGINNER) sprintf(buf, "Cannot worship gods."); break;
|
||||
case F_NOSMELL: if ((lorelev >= PR_NOVICE) ) sprintf(buf, "No sense of smell."); break;
|
||||
case F_NOCTURNAL: if ((lorelev >= PR_BEGINNER) && !forplayersel) sprintf(buf, "Sleeps during the day."); break;
|
||||
|
|
134
lf.c
134
lf.c
|
@ -3549,10 +3549,12 @@ void die(lifeform_t *lf) {
|
|||
int battledone = B_TRUE;
|
||||
for (l = lf->cell->map->lf ; l ; l = l->next) {
|
||||
if (!isplayer(l) && areenemies(l, player) && haslof(l->cell, player->cell, LOF_WALLSTOP, NULL)) {
|
||||
if (l != lf) {
|
||||
battledone = B_FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (battledone) {
|
||||
pleasegodmaybe(R_GODBATTLE, 5);
|
||||
}
|
||||
|
@ -4939,10 +4941,43 @@ void enhanceskills(lifeform_t *lf) {
|
|||
f = lfhasflag(lf, F_STATGAINREADY);
|
||||
while (f && (f->val[2] > 0)) {
|
||||
enum ATTRIB att = A_NONE;
|
||||
enum ATTRIB a,poss[MAXATTS];
|
||||
int nposs = 0;
|
||||
for (a = 0; a < MAXATTS; a++) {
|
||||
if (!ismaxedattr(lf, a) && attrincreasable(a)) {
|
||||
poss[nposs++] = a;
|
||||
}
|
||||
}
|
||||
|
||||
if (nposs == 1) {
|
||||
att = poss[0];
|
||||
} else if (nposs) {
|
||||
if (isplayer(lf)) {
|
||||
char ch;
|
||||
char ch,ques[BUFLEN],answers[BUFLEN];
|
||||
int i;
|
||||
more();
|
||||
ch = askchar("Increase your Strength, Agility, Fitness, IQ or Wisdom?", "safiw",NULL, B_TRUE, B_FALSE);
|
||||
strcpy(answers, "");
|
||||
|
||||
for (i = 0; i < nposs; i++) {
|
||||
char this[2];
|
||||
sprintf(this, "%c", getattrletter(poss[i]));
|
||||
if (isalpha(this[0])) {
|
||||
if (i == 0) {
|
||||
sprintf(ques, "Increase your %s", getattrname(poss[i]));
|
||||
} else if (i == (nposs-1)) {
|
||||
strcat(ques, "or ");
|
||||
strcat(ques, getattrname(poss[i]));
|
||||
strcat(ques, "?");
|
||||
} else {
|
||||
strcat(ques, ", ");
|
||||
strcat(ques, getattrname(poss[i]));
|
||||
}
|
||||
|
||||
strcat(answers, this);
|
||||
}
|
||||
}
|
||||
|
||||
ch = askchar(ques, answers,NULL, B_TRUE, B_FALSE);
|
||||
switch (ch) {
|
||||
case 's': att = A_STR; break;
|
||||
case 'a': att = A_AGI; break;
|
||||
|
@ -4952,9 +4987,20 @@ void enhanceskills(lifeform_t *lf) {
|
|||
}
|
||||
} else {
|
||||
// pick randomly
|
||||
att = rnd(0,MAXATTS-1);
|
||||
att = poss[rnd(0,nposs-1)];
|
||||
}
|
||||
} else {
|
||||
// none possible
|
||||
if (isplayer(lf)) {
|
||||
more();
|
||||
msg("All your attributes are already maxed.");
|
||||
}
|
||||
}
|
||||
|
||||
if (att != A_NONE) {
|
||||
modattr(lf, att, 5);
|
||||
}
|
||||
|
||||
f->val[2]--;
|
||||
if (f->val[2] <= 0) {
|
||||
killflag(f);
|
||||
|
@ -7163,6 +7209,18 @@ int getevasion(lifeform_t *lf) {
|
|||
skillpctmod = 100 + (getskill(lf, SK_EVASION) * 12);
|
||||
ev = pctof(skillpctmod, ev);
|
||||
|
||||
// swimevasion creatures get extra evasion while swimming
|
||||
f = lfhasflag(lf, F_SWIMEVASION);
|
||||
if (f && isswimming(lf)) {
|
||||
ev = pctof(f->val[0], ev);
|
||||
}
|
||||
|
||||
// flightevasion creatures get extra evasion while flying
|
||||
f = lfhasflag(lf, F_FLIGHTEVASION);
|
||||
if (f && (isairborne(lf) == F_FLYING)) {
|
||||
ev = pctof(f->val[0], ev);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// now negative modifiers
|
||||
//////////////////////////////////////////////////
|
||||
|
@ -7177,13 +7235,26 @@ int getevasion(lifeform_t *lf) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// you are easier to hit if you're glowing
|
||||
if (hasflag(lf->flags, F_PRODUCESLIGHT)) {
|
||||
ev -= 5;
|
||||
}
|
||||
|
||||
// swimevasion creatures get extra evasion while swimming
|
||||
if (isswimming(lf) && lfhasflag(lf, F_SWIMEVASION) && !isaquatic(lf)) {
|
||||
// evasion penalty based on swimming skill
|
||||
switch (getskill(lf, SK_SWIMMING)) {
|
||||
case PR_INEPT: ev -= 30; break;
|
||||
case PR_NOVICE: ev -= 20; break;
|
||||
case PR_BEGINNER: ev -= 10; break;
|
||||
case PR_ADEPT: ev -= 5; break;
|
||||
case PR_SKILLED: ev -= 0; break;
|
||||
case PR_EXPERT:
|
||||
case PR_MASTER:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// modify for stickiness
|
||||
if (hasobwithflag(lf->cell->obpile, F_RESTRICTMOVEMENT)) {
|
||||
ev -= 50;
|
||||
|
@ -7841,6 +7912,20 @@ int getlfaccuracy(lifeform_t *lf, object_t *wep) {
|
|||
if (isprone(lf)) {
|
||||
acc -= 40;
|
||||
}
|
||||
|
||||
// day/night boosts
|
||||
if (isnighttime()) {
|
||||
f = lfhasflag(lf, F_NIGHTBOOST);
|
||||
if (f) {
|
||||
if (f->val[0] != NA) acc += f->val[0];
|
||||
}
|
||||
} else { // ie. daytime
|
||||
f = lfhasflag(lf, F_DAYBOOST);
|
||||
if (f) {
|
||||
if (f->val[0] != NA) acc += f->val[0];
|
||||
}
|
||||
}
|
||||
|
||||
// modify for swimming
|
||||
if (isswimming(lf) && !isaquatic(lf)) {
|
||||
switch (getskill(lf, SK_SWIMMING)) {
|
||||
|
@ -13355,6 +13440,14 @@ int ismadeofice(lifeform_t *lf) {
|
|||
return B_FALSE;
|
||||
}
|
||||
|
||||
// is this lf's BASE attrib maxed?
|
||||
int ismaxedattr(lifeform_t *lf, enum ATTRIB a) {
|
||||
if (lf->att[a] >= MAX_ATTRIBVAL) {
|
||||
return B_TRUE;
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
int ismaxedskill(lifeform_t *lf, enum SKILL skid) {
|
||||
if (getskill(lf, skid) >= getmaxskilllevel(lf, skid)) {
|
||||
return B_TRUE;
|
||||
|
@ -14523,6 +14616,21 @@ char *assignnpcname(flagpile_t *fp) {
|
|||
return sel->name;
|
||||
}
|
||||
|
||||
// is this attrib increasable on levelup?
|
||||
int attrincreasable(enum ATTRIB a) {
|
||||
switch (a) {
|
||||
case A_AGI:
|
||||
case A_CON:
|
||||
case A_IQ:
|
||||
case A_STR:
|
||||
case A_WIS:
|
||||
return B_TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
void autoshortcut(lifeform_t *lf, enum OBTYPE spellid) {
|
||||
flag_t *retflag[MAXCANDIDATES],*f;
|
||||
int nretflags,i,found = B_FALSE;
|
||||
|
@ -19212,6 +19320,7 @@ int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *r
|
|||
|
||||
pct = getskillcheckchance(lf, ct, diff, mod);
|
||||
|
||||
// lower roll is better
|
||||
roll = rnd(1,100);
|
||||
|
||||
if (db) {
|
||||
|
@ -20624,7 +20733,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
// touch your weapons/armour in case it became hot, it was blessed and you
|
||||
// becaome undead, etc.
|
||||
if (isequipped(o)) {
|
||||
touch(lf, o);
|
||||
real_touch(lf, o, B_NOTONPURPOSE);
|
||||
}
|
||||
}
|
||||
if (isdead(lf)) return;
|
||||
|
@ -21596,9 +21705,12 @@ int tryclimb(lifeform_t *lf, cell_t *where, char *towhat, int onpurpose) {
|
|||
return B_FALSE;
|
||||
}
|
||||
|
||||
int touch(lifeform_t *lf, object_t *o) {
|
||||
return real_touch(lf, o, B_ONPURPOSE);
|
||||
}
|
||||
|
||||
// returns B_TRUE if the action which involved touching this should fail
|
||||
int touch(lifeform_t *lf, object_t *o) {
|
||||
int real_touch(lifeform_t *lf, object_t *o, int onpurpose) {
|
||||
flag_t *f;
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int nretflags,i;
|
||||
|
@ -21734,8 +21846,8 @@ int touch(lifeform_t *lf, object_t *o) {
|
|||
} else if ((f->id == F_HOT) && resistant) {
|
||||
// fire resistance will stop F_HOT, but not F_ONFIRE.
|
||||
} else {
|
||||
// wearing gloves? they get damaged.
|
||||
if (gloves) {
|
||||
// touching something onfire while wearing gloves? they get damaged.
|
||||
if (gloves && onpurpose) {
|
||||
if (f->id == F_ONFIRE) { // fire will damage your gloves, just being hot will not.
|
||||
takedamage(gloves, 2, DT_FIRE);
|
||||
if (hasflag(gloves->flags, F_DEAD)) {
|
||||
|
@ -21766,8 +21878,8 @@ int touch(lifeform_t *lf, object_t *o) {
|
|||
dam = f->val[0];
|
||||
}
|
||||
losehp(lf, dam, dt, NULL, buf);
|
||||
// drop the object if we're holding it
|
||||
if ((o->pile->owner == lf) && isequipped(o)) {
|
||||
// drop the object if it's an equipped weapon
|
||||
if ((o->pile->owner == lf) && isequipped(o) && isweapon(o)) {
|
||||
drop(o, ALL);
|
||||
}
|
||||
return B_TRUE;
|
||||
|
|
3
lf.h
3
lf.h
|
@ -23,6 +23,7 @@ int armourfits(lifeform_t *lf, object_t *o, enum ERROR *reason);
|
|||
int askforinfo(lifeform_t *lf, int diffmod);
|
||||
//int askforpayment(lifeform_t *shk, lifeform_t *lf);
|
||||
char *assignnpcname(flagpile_t *fp);
|
||||
int attrincreasable(enum ATTRIB a);
|
||||
void autoshortcut(lifeform_t *lf, enum OBTYPE spellid);
|
||||
void autoskill(lifeform_t *lf);
|
||||
void autospells(lifeform_t *lf, int howmany);
|
||||
|
@ -346,6 +347,7 @@ int isloreskill(enum SKILL skid);
|
|||
int islowhp(lifeform_t *lf);
|
||||
int isspellskill(enum SKILL skid);
|
||||
int ismadeofice(lifeform_t *lf);
|
||||
int ismaxedattr(lifeform_t *lf, enum ATTRIB a);
|
||||
int ismaxedskill(lifeform_t *lf, enum SKILL skid);
|
||||
int ispeaceful(lifeform_t *lf);
|
||||
int isknownpeaceful(lifeform_t *lf);
|
||||
|
@ -476,6 +478,7 @@ void timeeffectslf(lifeform_t *lf);
|
|||
int tradeknowledge(lifeform_t *lf);
|
||||
int tryclimb(lifeform_t *lf, cell_t *where, char *towhat, int onpurpose);
|
||||
int touch(lifeform_t *lf, object_t *o);
|
||||
int real_touch(lifeform_t *lf, object_t *o, int onpurpose);
|
||||
void turntoface(lifeform_t *lf, cell_t *dstcell);
|
||||
void unequipeffects(lifeform_t *lf, object_t *o);
|
||||
void unpoison(lifeform_t *lf);
|
||||
|
|
3
map.c
3
map.c
|
@ -6268,10 +6268,13 @@ void finalisemonster(lifeform_t *lf, lifeform_t *leader, flagpile_t *wantflags,
|
|||
}
|
||||
|
||||
// random monster behaviours
|
||||
if (!lfhasflag(lf, F_UNIQUE)) {
|
||||
// might get a random behaviour if one wasn't specified
|
||||
if ((wantbehaviour == BH_NONE) && canhaverandombehaviour(lf) && onein(6)) {
|
||||
wantbehaviour = getrandombehaviour();
|
||||
}
|
||||
givebehaviour(lf, wantbehaviour);
|
||||
}
|
||||
|
||||
if (wantflags) {
|
||||
copyflags(lf->flags, wantflags, NA);
|
||||
|
|
18
move.c
18
move.c
|
@ -3508,19 +3508,29 @@ int willmove(lifeform_t *lf, int dir, enum ERROR *error) {
|
|||
f = lfhasflag(lf, F_STAYINROOM);
|
||||
if (f) {
|
||||
int roomid;
|
||||
int goingtodiffroom = B_FALSE;
|
||||
roomid = f->val[0];
|
||||
if (roomid != NA) {
|
||||
// don't move out of the given room.
|
||||
|
||||
if (roomid == NA) {
|
||||
if (getroomid(lf->cell) != getroomid(cell)) {
|
||||
goingtodiffroom = B_TRUE;
|
||||
}
|
||||
} else {
|
||||
if ((getroomid(lf->cell) == roomid) && (getroomid(lf->cell) != getroomid(cell))) {
|
||||
if ((f->val[1] != NA) && aihastarget(lf)) {
|
||||
goingtodiffroom = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (goingtodiffroom) {
|
||||
if ((f->val[1] == B_MAYCHASE) && aihastarget(lf)) {
|
||||
// exception!
|
||||
} else {
|
||||
// won't go to a different room.
|
||||
if (error) *error = E_WONT;
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (lfhasflag(lf, F_STAYINHABITAT) && (cell->habitat->id != lf->cell->habitat->id)) {
|
||||
if (error) *error = E_WONT;
|
||||
|
|
17
nexus.c
17
nexus.c
|
@ -893,12 +893,29 @@ void donextturn(map_t *map) {
|
|||
o = findobidinmap(who->cell->map, atol(f->text));
|
||||
}
|
||||
if (o && caneat(who, o) && (getoblocation(o) == who->cell)) {
|
||||
int cancelled = B_FALSE;
|
||||
|
||||
// has it gone bad while we're eating it?
|
||||
if (isbadfood(o) && isplayer(who) && (getskill(who, SK_COOKING) >= PR_BEGINNER)) {
|
||||
char ques[BUFLEN],obname[BUFLEN];
|
||||
char ch;
|
||||
getobname(o, obname, 1);
|
||||
sprintf(ques, "%s has gone bad - stop eating?", obname);
|
||||
ch = askchar(ques, "yn", "y", B_TRUE, B_FALSE);
|
||||
if (ch == 'y') {
|
||||
killflag(f);
|
||||
cancelled = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!cancelled) {
|
||||
if (eat(who,o)) {
|
||||
// failed
|
||||
killflag(f);
|
||||
} else {
|
||||
donormalmove = B_FALSE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
killflag(f);
|
||||
}
|
||||
|
|
15
objects.c
15
objects.c
|
@ -804,7 +804,8 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
p += strlen("lit ");
|
||||
donesomething = B_TRUE;
|
||||
// different materials
|
||||
} else if (((mat = strmatchesmaterial(p)) != NULL) && !strstr(p, "gold coin") && !strstr(p, "leather armour")) {
|
||||
} else if (((mat = strmatchesmaterial(p)) != NULL) &&
|
||||
isvalidoverridemat(mat->id) ) {
|
||||
wantdiffmat = mat->id;
|
||||
p += strlen(mat->name);
|
||||
p++; // go past the space
|
||||
|
@ -5344,6 +5345,7 @@ char *real_getobname(object_t *o, char *buf, int count, int wantpremods, int wan
|
|||
if ((gamemode == GM_GAMESTARTED) && adjustforblind && !haslos(player, where) ) {
|
||||
f = hasflag(o->flags, F_FEELTEXT);
|
||||
if (f) {
|
||||
no_a = B_TRUE;
|
||||
strcpy(basename, f->text);
|
||||
} else {
|
||||
// override with obclass names
|
||||
|
@ -7480,6 +7482,17 @@ knowledge_t *istriedot(objecttype_t *ot) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int isvalidoverridemat(enum MATERIAL mat) {
|
||||
switch (mat) {
|
||||
case MT_BONE:
|
||||
case MT_GLASS:
|
||||
case MT_SILVER:
|
||||
return B_TRUE;
|
||||
default: break;
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
int isoperable(object_t *o) {
|
||||
if (hasflag(o->flags, F_OPERABLE)) return B_TRUE;
|
||||
//if (o->type->obclass->id == OC_TECH) return B_TRUE;
|
||||
|
|
|
@ -203,6 +203,7 @@ int ismagical(object_t *o);
|
|||
int ismeleeweapon(object_t *o);
|
||||
int ismetal(enum MATERIAL mat);
|
||||
int isthrowmissile(object_t *o);
|
||||
int isvalidoverridemat(enum MATERIAL mat);
|
||||
int isoperable(object_t *o);
|
||||
int isplainob(object_t *o);
|
||||
int ispourable(object_t *o);
|
||||
|
|
20
text.c
20
text.c
|
@ -811,6 +811,26 @@ char *getattrbracketname(enum ATTRIB whichatt, enum ATTRBRACKET brack) {
|
|||
return "?unknown?";
|
||||
}
|
||||
|
||||
char getattrletter(enum ATTRIB att) {
|
||||
switch (att) {
|
||||
case A_NONE:
|
||||
return '?';
|
||||
case A_CHA:
|
||||
return 'c';
|
||||
case A_CON:
|
||||
return 'f';
|
||||
case A_AGI:
|
||||
return 'a';
|
||||
case A_IQ:
|
||||
return 'i';
|
||||
case A_STR:
|
||||
return 's';
|
||||
case A_WIS:
|
||||
return 'w';
|
||||
}
|
||||
return '?';
|
||||
}
|
||||
|
||||
char *getattrname(enum ATTRIB att) {
|
||||
switch (att) {
|
||||
case A_NONE:
|
||||
|
|
1
text.h
1
text.h
|
@ -14,6 +14,7 @@ char *getalignmentname(enum ALIGNMENT al);
|
|||
char *getattackverb(lifeform_t *lf, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp);
|
||||
char *getattrabbrev(enum ATTRIB att);
|
||||
char *getattrbracketname(enum ATTRIB whichatt, enum ATTRBRACKET brack);
|
||||
char getattrletter(enum ATTRIB att);
|
||||
char *getattrname(enum ATTRIB att);
|
||||
char *getdamname(enum DAMTYPE damtype);
|
||||
char *getdamnamenoun(enum DAMTYPE damtype);
|
||||
|
|
2
vault.c
2
vault.c
|
@ -411,7 +411,7 @@ int addvaultthing(cell_t *c, vault_t *v, enum VAULTTHING vt, char *what) {
|
|||
}
|
||||
*/
|
||||
if (lf && hasflag(v->flags, F_MONSTERSSTAY)) {
|
||||
addflag(lf->flags, F_STAYINROOM, getroomid(c), NA, NA, NULL);
|
||||
addflag(lf->flags, F_STAYINROOM, getroomid(c), B_MAYCHASE, NA, NULL);
|
||||
}
|
||||
break;
|
||||
case VT_CELL:
|
||||
|
|
Loading…
Reference in New Issue