From 192afcec2b11c0d8683fe6f5fa95fcf6bb34e876 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Sun, 11 Mar 2012 14:40:45 +0000 Subject: [PATCH] - [+] when checking stairs for prints, check for f_naturalflight, not for f_flying - [+] reduce explosion size for robot corpses. - [+] cats - [+] Evasion, fast, normal attack speed but 2 attacks - [+] Cheetah/leopard 3. tr. 3. Brown, jump/leap - [+] Tiger. 4hd. tr. 5kk Red - [+] Lion. 4. tr 6. Orange - [+] Panther ? Magenta - [+] Shadowcat .blue - [+] hecta did finger of death on a troll, why didn't it leave a corpse ? because i used necrotic damage. - [+] crash when asking druid for levelup spell. - [+] fix up msgs when charmed monsters are moving. - [+] fix up explodecells() to do better LOF calculation. - [+] cancast() timer on monster ablities is not working!!! --- data.c | 285 +++++++++++++++++++++++++++++++++++++++++------ data/hiscores.db | Bin 14336 -> 14336 bytes defs.h | 12 +- god.c | 12 +- io.c | 21 ++-- lf.c | 71 +++++++++--- map.c | 63 ++++------- objects.c | 4 + spell.c | 20 +++- 9 files changed, 379 insertions(+), 109 deletions(-) diff --git a/data.c b/data.c index 1f2fe19..deef6e7 100644 --- a/data.c +++ b/data.c @@ -492,7 +492,6 @@ void initjobs(void) { // somewhere: slow falling when next to walls // somehwere: alertness when sleeping addflag(lastjob->flags, F_LEVFLAG, 2, F_MPDICE, 1, NULL); - addflag(lastjob->flags, F_LEVSPELL, 2, OT_S_CALMANIMALS, NA, NULL); // 2: body control - low metabolism addflag(lastjob->flags, F_LEVSPELL, 3, OT_S_LOWERMETAB, NA, NULL); // 4: self-healing (mp), immune to haste/slow (innate) @@ -2231,7 +2230,7 @@ void initobjects(void) { addflag(lastot->flags, F_NUMAPPEAR, 1, 10, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, "3d6"); - addot(OT_MISTLETOE, "sprig of mistletoe", "A small cutting of mistletoe. Druids can sacrifice these cuttings to increase their magical reservces.", MT_PLANT, 0.01, OC_FLORA, SZ_TINY); + addot(OT_MISTLETOE, "sprig of mistletoe", "A small cutting of mistletoe. Druids can sacrifice these cuttings to increase their magical reserves.", MT_PLANT, 0.01, OC_FLORA, SZ_TINY); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, "leaf"); addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, ""); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, ""); @@ -2666,7 +2665,7 @@ void initobjects(void) { addot(OT_SCR_DETECTAURA, "scroll of detect aura", "Senses holiness or evil near the caster.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_DETECTAURA, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addot(OT_SCR_DETECTLIFE, "scroll of detect life", "Senses life near the caster.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); @@ -3018,7 +3017,6 @@ void initobjects(void) { addot(OT_S_DETECTMAGIC, "detect magic", "Allows the caster to detect magical enchantments.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines duration."); addflag(lastot->flags, F_SPELLSCHOOL, SS_DIVINATION, NA, NA, NULL); - addflag(lastot->flags, F_SPELLSCHOOL, SS_NATURE, NA, NA, NULL); addflag(lastot->flags, F_SPELLLEVEL, 5, NA, NA, NULL); // l6 addot(OT_S_IDENTIFY, "identification", "Completely identifies any one item.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); @@ -3986,6 +3984,7 @@ void initobjects(void) { addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "Spell power determines how powerful a creature you can become."); addflag(lastot->flags, F_SPELLSCHOOL, SS_MODIFICATION, NA, NA, NULL); addflag(lastot->flags, F_SPELLLEVEL, 4, NA, NA, NULL); +oooooooo addflag(lastot->flags, F_AICASTTOATTACK, ST_SELF, 10, NA, NULL); addflag(lastot->flags, F_AICASTTOFLEE, ST_SELF, NA, NA, NULL); // l5 @@ -4652,6 +4651,7 @@ void initobjects(void) { addflag(lastot->flags, F_HELPSDIG, 10, NA, NA, NULL); addot(OT_ROPE, "rope", "A long length of strong rope.", MT_CLOTH, 5, OC_TOOLS, SZ_MEDIUM); + addflag(lastot->flags, F_GLYPH, C_BROWN, ']', NA, NULL); addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 75, NA, NULL); addflag(lastot->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL); @@ -4992,7 +4992,7 @@ void initobjects(void) { addflag(lastot->flags, F_NOOBDIETEXT, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL); addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL); - addflag(lastot->flags, F_EXPLODEONDEATH, NA, 2, NA, "10d2"); + addflag(lastot->flags, F_EXPLODEONDEATH, NA, 1, NA, "10d2"); addflag(lastot->flags, F_MAKESNOISE, 33, SV_TALK, NA, "something sparking."); // tech - l3 @@ -7964,6 +7964,7 @@ void initrace(void) { addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL); addflag(lastrace->flags, F_HATESRACEWITHFLAG, F_CANINE, NA, NA, NULL); addflag(lastrace->flags, F_HATESRACEWITHFLAG, F_AVIAN, NA, NA, NULL); + addflag(lastrace->flags, F_FELINE, B_TRUE, NA, NA, NULL); // bonuses addbonustext(lastrace->flags, F_BONDESC, "Unarmed claw attack (damage rating 3)"); @@ -9995,6 +9996,7 @@ void initrace(void) { addflag(lastrace->flags, F_VEGETARIAN, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RESISTMAG, 25, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, B_COVETS, NA, NULL); addrace(R_OGRA, "ogra", 160, 'O', C_BROWN, MT_FLESH, RC_HUMANOID, "Female ogres (known as 'ogras' are no less angry of hungry than the males of the species. They are however slightly faster and weaker."); setbodytype(lastrace, BT_HUMANOID); @@ -10344,6 +10346,7 @@ void initrace(void) { addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL); addflag(lastrace->flags, F_VEGETARIAN, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RESISTMAG, 25, NA, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, B_COVETS, NA, NULL); addrace(R_POLTERGEIST, "poltergeist", 50, 'p', C_GREEN, MT_FLESH, RC_UNDEAD, "An evil ghostly spirit who telekinetically throws objects at its enemies."); // sPirit addbodypart(lastrace, BP_BODY, NULL); @@ -10662,30 +10665,6 @@ void initrace(void) { addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 20, NA, NA, NULL); - addrace(R_SHADOWCAT, "shadowcat", 5, 'f', C_BLUE, MT_FLESH, RC_MAGIC, "A huge, feral black cat, surrounded by clouds of black smoke."); - setbodytype(lastrace, BT_QUADRAPED); - addbodypart(lastrace, BP_TAIL, NULL); - addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); - addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_DUNGEON, 65, NA, NULL); - addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); - addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL); - addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); - addflag(lastrace->flags, F_EVASION, 40, NA, NA, NULL); - addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); - addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); - addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); - addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "hisses^a hiss"); - addflag(lastrace->flags, F_SEEINDARK, 8, NA, NA, NULL); - addflag(lastrace->flags, F_CANSEETHROUGHMAT, MT_GAS, NA, NA, NULL); - addflag(lastrace->flags, F_AUTOCREATEOB, 1, NA, NA, "puff of smoke"); - addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); - addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL); - addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL); - addflag(lastrace->flags, F_EATCONFER, F_CANSEETHROUGHMAT, MT_GAS, NA, "80"); addrace(R_SKOOB, "skoob", 40, 'g', C_WHITE, MT_ICE, RC_MAGIC, "Your typical snowman right down to the carrot nose, with just a two key differences: it is alive, and it is homocidal."); setbodytype(lastrace, BT_HUMANOID); @@ -10785,6 +10764,8 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_PRODUCESLIGHT, 3, NA, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL); + addflag(lastrace->flags, F_DTVULN, DT_WATER, NA, NA, "1d6"); + addflag(lastrace->flags, F_DTVULN, DT_COLD, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_WALK, 1, NA, "^crackling flames"); addflag(lastrace->flags, F_STARTSKILL, SK_SS_FIRE, PR_BEGINNER, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL); @@ -10793,6 +10774,7 @@ void initrace(void) { addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL); addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_FIRE, NA, "25"); + addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, B_COVETS, NA, NULL); addrace(R_SPRITEGRAVE, "grave sprite", 5, 'n', C_GREY, MT_FLESH, RC_MAGIC, "A small magical creature made from corpse dust."); setbodytype(lastrace, BT_HUMANOID); @@ -10814,7 +10796,7 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_SPELLSPEED, SP_SLOW, NA, NA, NULL); - addflag(lastrace->flags, F_CANCAST, OT_S_SMITEGOOD, NA, NA, "pw:2;"); + addflag(lastrace->flags, F_CANCAST, OT_S_SMITEGOOD, NA, NA, "pw:1;"); addflag(lastrace->flags, F_CANCAST, OT_S_LETHARGY, NA, NA, "pw:3;"); addflag(lastrace->flags, F_CANCAST, OT_S_ANIMATEDEAD, NA, NA, "pw:10;"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, B_APPENDYOU, "gestures"); @@ -10827,6 +10809,7 @@ void initrace(void) { addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL); addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, UNLIMITED, NA, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, B_COVETS, NA, NULL); addrace(R_SPRITEICE, "ice sprite", 5, 'n', C_CYAN, MT_ICE, RC_MAGIC, "A small magical creature made from freezing ice."); setbodytype(lastrace, BT_HUMANOID); @@ -10855,6 +10838,7 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_DTIMMUNE, DT_COLD, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_ELECTRIC, NA, NA, NULL); + addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_SS_COLD, PR_ADEPT, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); @@ -10862,6 +10846,7 @@ void initrace(void) { addflag(lastrace->flags, F_CASTCHANCE, 30, NA, NA, NULL); addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_COLD, NA, "25"); + addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, B_COVETS, NA, NULL); addrace(R_TROLL, "troll", 100, 't', C_GREEN, MT_FLESH, RC_HUMANOID, "A savage, hairy green monster. Trolls are extremely muscular, move abnormally quickly and regenerate."); setbodytype(lastrace, BT_HUMANOID); @@ -11385,6 +11370,181 @@ void initrace(void) { addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL); addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); + + + addrace(R_CATCHEETAH, "cheetah", 250, 'f', C_BROWN, MT_FLESH, RC_ANIMAL, "A large cat capable of amazing running speeds. It also has unique paws which do not allow for gripping."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); + addflag(lastrace->flags, F_ALIGNMENT, AL_NEUTRAL, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_FREQUENT, NULL); + addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); + addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_AGI, AT_HIGH, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); + addflag(lastrace->flags, F_ACTIONSPEED, SP_FAST, NA, NA, NULL); + addflag(lastrace->flags, F_MAXATTACKS, 1, 2, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL); + addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "roars^a roar"); + addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); + addflag(lastrace->flags, F_MORALE, 6, NA, NA, NULL); + addflag(lastrace->flags, F_CANWILL, OT_A_JUMP, NA, NA, "stamcost:0;"); + addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, NULL); + addflag(lastrace->flags, F_CANWILL, OT_A_SPRINT, NA, NA, NULL); + addflag(lastrace->flags, F_CASTCHANCE, 50, NA, NA, NULL); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL); + addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL); + addflag(lastrace->flags, F_SKILLCHECKMOD, SC_SLIP, -3, NA, NULL); // paws can't grip + addflag(lastrace->flags, F_SKILLCHECKMOD, SC_FALL, -3, NA, NULL); // paws can't grip + addflag(lastrace->flags, F_FELINE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_HATESRACEWITHFLAG, F_CANINE, NA, NA, NULL); + + addrace(R_CATLION, "lion", 275, 'f', C_ORANGE, MT_FLESH, RC_ANIMAL, "The \'King of the Jungle\' is the most powerful large cat, its neck rings by a great mane of fur. Lions lack leaping or jumping abilites of other cats, but make up for this in raw power."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); + addflag(lastrace->flags, F_ALIGNMENT, AL_NEUTRAL, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_ENHANCESMELL, 8, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL); + addflag(lastrace->flags, F_TR, 7, NA, NA, NULL); + addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); + addflag(lastrace->flags, F_ACTIONSPEED, SP_FAST, NA, NA, NULL); + addflag(lastrace->flags, F_MAXATTACKS, 2, 2, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 5, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 5, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 10, NA, NULL); + addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "roars^a roar"); + addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); + addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STABILITY, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL); + addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL); + addflag(lastrace->flags, F_FELINE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_HATESRACEWITHFLAG, F_CANINE, NA, NA, NULL); + + addrace(R_CATPANTHER, "panther", 90, 'f', C_MAGENTA, MT_FLESH, RC_ANIMAL, "Panthers are graceful large cats, skilled at climbing and swimming."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); + addflag(lastrace->flags, F_ALIGNMENT, AL_NEUTRAL, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); + addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); + addflag(lastrace->flags, F_ACTIONSPEED, SP_FAST, NA, NA, NULL); + addflag(lastrace->flags, F_MAXATTACKS, 1, 2, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 6, NA, NULL); + addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, "dam:1d3;"); + addflag(lastrace->flags, F_CANWILL, OT_A_JUMP, NA, NA, "stamcost:0;"); + addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, NULL); + addflag(lastrace->flags, F_CASTCHANCE, 50, NA, NA, NULL); + addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "roars^a roar"); + addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); + addflag(lastrace->flags, F_MORALE, 6, NA, NA, NULL); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STABILITY, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_SKILLED, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_CLIMBING, PR_SKILLED, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL); + addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL); + addflag(lastrace->flags, F_FELINE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_HATESRACEWITHFLAG, F_CANINE, NA, NA, NULL); + + + addrace(R_CATTIGER, "tiger", 50, 'f', C_RED, MT_FLESH, RC_ANIMAL, "One of the largest of the natural cats, tigers are known for their combination of power and agility."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); + addflag(lastrace->flags, F_ALIGNMENT, AL_NEUTRAL, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_FREQUENT, NULL); + addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); + addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); + addflag(lastrace->flags, F_ACTIONSPEED, SP_FAST, NA, NA, NULL); + addflag(lastrace->flags, F_MAXATTACKS, 2, 2, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 8, NA, NULL); + addflag(lastrace->flags, F_CASTCHANCE, 50, NA, NA, NULL); + addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "roars^a roar"); + addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); + addflag(lastrace->flags, F_MORALE, 8, NA, NA, NULL); + addflag(lastrace->flags, F_CANWILL, OT_A_CHARGE, NA, NA, "range:5;"); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STABILITY, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_MASTER, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL); + addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL); + addflag(lastrace->flags, F_FELINE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_HATESRACEWITHFLAG, F_CANINE, NA, NA, NULL); + + addrace(R_CATSHADOW, "shadowcat", 5, 'f', C_BLUE, MT_FLESH, RC_MAGIC, "A huge, feral black cat, surrounded by clouds of black smoke."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); + addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, 65, NA, NULL); + addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL); + addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); + addflag(lastrace->flags, F_EVASION, 40, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 4, NA, NULL); + addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "hisses^a hiss"); + addflag(lastrace->flags, F_SEEINDARK, 8, NA, NA, NULL); + addflag(lastrace->flags, F_CANSEETHROUGHMAT, MT_GAS, NA, NA, NULL); + addflag(lastrace->flags, F_AUTOCREATEOB, 1, NA, NA, "puff of smoke"); + addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CARNIVORE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL); + addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL); + addflag(lastrace->flags, F_EATCONFER, F_CANSEETHROUGHMAT, MT_GAS, NA, "80"); + addflag(lastrace->flags, F_FELINE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_HATESRACEWITHFLAG, F_CANINE, NA, NA, NULL); + addrace(R_BEAR, "black bear", 150, 'Q', C_BLUE, MT_FLESH, RC_ANIMAL, "A medium sized omnivore bear."); setbodytype(lastrace, BT_QUADRAPED); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -12504,6 +12664,7 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL); addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); @@ -12532,6 +12693,7 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, ""); addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL); addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 5, NA, NULL); @@ -12552,6 +12714,37 @@ void initrace(void) { addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL); + addrace(R_WOLFDIRE, "dire wolf", 60, 'd', C_BLUE, MT_FLESH, RC_ANIMAL, "Enormous wolves which attack with an intelligence and ferocity far beyond their regular kin."); + setbodytype(lastrace, BT_QUADRAPED); + addbodypart(lastrace, BP_TAIL, NULL); + addflag(lastrace->flags, F_STARTATT, A_CON, AT_VHIGH, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, ""); + addflag(lastrace->flags, F_ENHANCESMELL, 6, NA, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL); + addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 7, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 7, 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_CARNIVORE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, NA, NA, NULL); // can't fool it with food + addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); + addflag(lastrace->flags, F_CANWILL, OT_A_SPRINT, NA, NA, NULL); + addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 2, NA, "whines in pain^whining"); + addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "growls^growling"); + addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, ""); + addflag(lastrace->flags, F_HASSKILL, SK_SWIMMING, PR_BEGINNER, NA, NULL); + addflag(lastrace->flags, F_MORALE, 9, NA, NA, NULL); + addflag(lastrace->flags, F_CANINE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_FATALFOOD, OT_CHOCOLATE, NA, NA, NULL); + addrace(R_WOLFWINTER, "winter wolf", 25, 'd', C_CYAN, MT_FLESH, RC_ANIMAL, "Wolves which have lived in close proximity to the undead sometimes mutate into these frosty beasts. While their claws have become less sharp, they instead deal unnatural cold damage."); setbodytype(lastrace, BT_QUADRAPED); addbodypart(lastrace, BP_TAIL, NULL); @@ -13963,7 +14156,6 @@ void initrace(void) { addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CHA, AT_VHIGH, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, 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_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_VAMPIRIC, B_TRUE, NA, NA, NULL); @@ -13999,6 +14191,36 @@ void initrace(void) { addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL); + addrace(R_WEREWOLF, "werewolf", 100, '@', C_BROWN, MT_FLESH, RC_HUMANOID, "Shaggy humans with the uncanny ability to shapeshift into a ferocious wolf."); + setbodytype(lastrace, BT_HUMANOID); + addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_AGI, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_CON, AT_GTAVERAGE, NA, NULL); + addflag(lastrace->flags, F_STARTATT, A_CHA, AT_LOW, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); + addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); + addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, "3d6"); + addflag(lastrace->flags, F_MATVULN, MT_SILVER, 200, NA, NULL); + addflag(lastrace->flags, F_SEEINDARK, 5, NA, NA, NULL); + addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL); + addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL); + addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); + addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 6, 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_SUMMONANIMALSMD, 10, 10, "pw:5;race:young wolf;"); + addflag(lastrace->flags, F_STARTSKILL, SK_FIRSTAID, PR_ADEPT, NA, NULL); + addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL); + addflag(lastrace->flags, F_ENHANCESMELL, 3, NA, NA, NULL); + addflag(lastrace->flags, F_CASTCHANCE, 40, NA, NA, NULL); + addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "howls"); + addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL); + // special monsters addrace(R_GASCLOUD, "cloud of gas", 0.1, 'y', C_GREY, MT_GAS, RC_OTHER, "A large cloud of gas which seems to move with a life of its own..."); addflag(lastrace->flags, F_MOVESPEED, SP_ULTRAFAST, NA, NA, ""); @@ -14029,7 +14251,6 @@ void initrace(void) { addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NODEATHANNOUNCE, B_TRUE, NA, NA, NULL); - 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_CORPSETYPE, NA, NA, NA, "5-20 bones"); addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL); diff --git a/data/hiscores.db b/data/hiscores.db index a689b20eea682cfcab83a7cbfd68d9d3fea2df50..34333eeeae9b17f5199f6afac4cb8874d3715176 100644 GIT binary patch delta 386 zcmW-Z&nts*9LGODW*bvWO0ma$52DZ>GAAc;@GBQZDTinF9Zx-bHjihM+c;>46?*(A zIq(N4_TWSg6fU^ANlFe*t{m9byI%Ev_kO=~>0Ejdo0D9f&;IYyafFeKtis4LBGsTdV(c>fLoNh`>vt?YwR)i)JhL)7V&RCYT+n2<$mX#uv z5DDFKBB~OYSW~^FH+7L4oR=2SR?4MVN?W>Js+q!&S!sx9d0{U|5zm@`_V=QtAs!{+BY$xJLBO_FSz{q(o7 nNN_QHWMI-~s$@FMEXW+oyovDv;}k|GhK~~quWtTm!p{r<;N(Dq diff --git a/defs.h b/defs.h index d6d4c1b..3566bb6 100644 --- a/defs.h +++ b/defs.h @@ -1034,7 +1034,6 @@ enum RACE { R_SANDMAN, R_SASQUATCH, R_SATYR, - R_SHADOWCAT, R_SINKMITE, R_SKOOB, R_SPRITEFIRE, @@ -1047,6 +1046,7 @@ enum RACE { R_TROLLSNOW, R_TROLLSWAMP, R_VAMPIRE, + R_WEREWOLF, R_XAT, // fish R_CRAB, @@ -1077,6 +1077,11 @@ enum RACE { R_BEARCUB, R_BEARGRIZZLY, R_BILCO, + R_CATCHEETAH, + R_CATLION, + R_CATPANTHER, + R_CATTIGER, + R_CATSHADOW, R_CHICKEN, R_CRYSTALCUR, R_DOG, @@ -1112,6 +1117,7 @@ enum RACE { R_SWAN, R_WOLFYOUNG, R_WOLF, + R_WOLFDIRE, R_WOLFWINTER, R_WORMGLUT, // dragons @@ -2185,7 +2191,7 @@ enum LFSIZE { SZ_MINI = 0, // ie. fly SZ_TINY = 1, // ie. mouse SZ_SMALL = 2, // ie. cat - SZ_MEDIUM = 3, // ie. wolf/dog + SZ_MEDIUM = 3, // ie. wolf/large dog SZ_HUMAN = 4, // ie. human-sized SZ_LARGE = 5, // ie. bear/horse SZ_HUGE = 6, // ie. elephant, dragon, giant @@ -2817,6 +2823,7 @@ enum FLAG { F_LEVRACE, // at level v0, this race is promoted to race v1 // must apply this to the BASE race. F_JOBATTRMOD, // add v1 to attr v0. only used in jobs. + F_SKILLCHECKMOD, // modify skillchecks of type v0 by v1. F_ATTRMOD, // modify attribute val0 by val1. ie. 0=A_STR,1=-3 F_ATTRSET, // forces attribute val0 to be val1. ie. 0=A_STR,1=18 F_SIZE, // val0 = lf size (enum LFSIZE) @@ -3137,6 +3144,7 @@ enum FLAG { // level. F_AVIAN, // this race is an avian F_CANINE, // this race is a canine + F_FELINE, // this race is a feline F_HUMANOID, // this race is a humanoid // (can wear armour / use weapons) F_INSECT, // this race is classed as an insect diff --git a/god.c b/god.c index 435c208..d66f9c0 100644 --- a/god.c +++ b/god.c @@ -1963,11 +1963,9 @@ int prayto(lifeform_t *lf, lifeform_t *god) { msg("\"Behold, the power of death!\""); c = NULL; n = OT_NONE; - switch (rnd(0,3)) { - case 0: n = OT_S_PAIN; break; - case 1: n = OT_S_DRAINLIFE; break; - case 2: n = OT_S_FLAYFLESH; break; - case 3: n = OT_S_HECTASSERVANT; + switch (rnd(0,1)) { + case 0: n = OT_S_FLAYFLESH; break; + case 1: n = OT_S_HECTASSERVANT; c = getrandomadjcell(player->cell, WE_WALKABLE, B_ALLOWEXPAND); break; } @@ -1988,13 +1986,13 @@ int prayto(lifeform_t *lf, lifeform_t *god) { if (who && !areallies(lf, who)) { if (isundead(who)) { makepeaceful(who, god); - } else if (gettr(who) <= 4) { + } else if (gettr(who) <= 5) { // instakill who->lastdamtype = DT_NECROTIC; setlastdam(who, "Hecta's finger of death."); who->hp = 0; } else { - castspell(god, n, who, NULL, who->cell, NULL, NULL); + //castspell(god, n, who, NULL, who->cell, NULL, NULL); dospelleffects(god, n, 20, who, NULL, who->cell, B_UNCURSED, NULL, B_FALSE); break; } diff --git a/io.c b/io.c index efac290..9c392ad 100644 --- a/io.c +++ b/io.c @@ -5595,7 +5595,7 @@ char *makedesc_ob(object_t *o, char *retbuf) { sprintf(buf, "It is a %s firearm.\n", twohandf ? "two-handed" : "single handed"); strncat(retbuf, buf, HUGEBUFLEN); - if ((twohandf->val[0] > 0) && (twohandf->val[0] < SZ_ENORMOUS)) { + if (twohandf && (twohandf->val[0] > 0) && (twohandf->val[0] < SZ_ENORMOUS)) { char sizebuf[BUFLEN]; sprintf(sizebuf, "%s", getsizetext(twohandf->val[0] + 1)); capitalise(sizebuf); @@ -5702,7 +5702,7 @@ char *makedesc_ob(object_t *o, char *retbuf) { strcat(buf, buf2); //dicetotext(f->val[0], f->val[1], f->val[2], NULL, NULL, dicebuf, NULL); - if ((twohandf->val[0] > 0) && (twohandf->val[0] < SZ_ENORMOUS)) { + if (twohandf && (twohandf->val[0] > 0) && (twohandf->val[0] < SZ_ENORMOUS)) { char sizebuf[BUFLEN]; sprintf(sizebuf, "%s", getsizetext(twohandf->val[0] + 1)); capitalise(sizebuf); @@ -7533,19 +7533,22 @@ void makespellchoicelist(prompt_t *pr, lifeform_t *lf, char *ques, char *ques2, getspellcosttext(lf, ot->id, power, mpdesc[nposs]); } if (mpcost[nposs] <= mpcutoff) { - if (f->val[2] == NA) { - validspell[nposs] = B_TRUE; - err[nposs] = E_OK; - } else { - if (f->val[1] == f->val[2]) { + if (f) { + if (f->val[2] == NA) { // no timer. + validspell[nposs] = B_TRUE; + err[nposs] = E_OK; + } if (f->val[1] == f->val[2]) { // timer is full. snprintf(mpdesc[nposs], BUFLEN, "(ready)"); validspell[nposs] = B_TRUE; err[nposs] = E_OK; - } else { + } else { // not ready yet snprintf(mpdesc[nposs], BUFLEN, "(%d/%d)",f->val[1],f->val[2]); validspell[nposs] = B_FALSE; err[nposs] = E_NOTREADY; } + } else { + validspell[nposs] = B_TRUE; + err[nposs] = E_OK; } } else { validspell[nposs] = B_FALSE; @@ -11150,7 +11153,7 @@ void showlfstats(lifeform_t *lf, int showall) { if (isplayer(lf)) { doheadingsmall(mainwin, y, 0, ftext, "Exp Level"); } else { - doheadingsmall(mainwin, y, 0, ftext, "Hit Dice"); + doheadingsmall(mainwin, y, 0, ftext, "Threat Rating"); } if (isplayer(lf)) { xpneeded = getxpforlev(lf->level + 1) - lf->xp; diff --git a/lf.c b/lf.c index 3f9ac03..17ee08c 100644 --- a/lf.c +++ b/lf.c @@ -1596,7 +1596,7 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar int needtovalidate = B_FALSE; int targettype; int cost; - flag_t *f,*willflag = NULL; + flag_t *f,*willflag = NULL,*castflag = NULL; int power; int spellblessed = B_UNCURSED; objecttype_t *sp; @@ -1659,6 +1659,7 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar } willflag = lfhasflagval(lf, F_CANWILL, sid, NA, NA, NULL); + castflag = lfhasflagval(lf, F_CANCAST, sid, NA, NA, NULL); // special case if (!willflag) { @@ -1875,13 +1876,18 @@ int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *tar } if (!fromob) { - // willing this spell? reset counter! + flag_t *ff; + // is this a spell which we can only cast every x turns? + // if so, rest counter. // do this _before_ casting the spell, // in case the spell causes us to lose - // the f_canwill flag (eg. polymorph) - if (willflag) { - if (willflag->val[2] != NA) { - willflag->val[1] = -1; + // the f_canwill/f_cancast flag (eg. polymorph) + if (willflag) ff = willflag; + else ff = castflag; + + if (ff) { + if (ff->val[2] != NA) { + ff->val[1] = -1; } } } @@ -2103,10 +2109,19 @@ int charmedaction(lifeform_t *lf, flag_t *charmflag) { if (isequipped(o)) { takeoff(lf, o); } else { - char obname[BUFLEN]; - getobname(o, obname, o->amt); - msg("^wYou hand over your %s to %s.", obname, - cansee(lf, charmer) ? charmername : "your new master"); + if (isplayer(lf)) { + char obname[BUFLEN]; + getobname(o, obname, o->amt); + msg("^wYou hand over your %s to %s.", noprefix(obname), + cansee(lf, charmer) ? charmername : "your new master"); + } else if (cansee(player, lf)) { + char lfname[BUFLEN]; + char obname[BUFLEN]; + getlfname(lf, lfname); + getobname(o, obname, o->amt); + msg("^w%s hands over %s to %s.", lfname, obname, + cansee(lf, charmer) ? charmername : "someone"); + } moveob(o, charmer->pack, o->amt); } ndone++; @@ -2124,7 +2139,13 @@ int charmedaction(lifeform_t *lf, flag_t *charmflag) { } } if (!ndone) { - msg("^wYou bask in the glory of %s!", cansee(lf, charmer) ? charmername : "your new master"); + if (isplayer(lf)) { + msg("^wYou bask in the glory of %s!", cansee(lf, charmer) ? charmername : "your new master"); + } else if (cansee(player, lf)) { + char lfname[BUFLEN]; + getlfname(lf, lfname); + msg("^w%s stares in awe at %s.", lfname, cansee(lf, charmer) ? charmername : "someone"); + } taketime(lf, getactspeed(lf)); } } else { @@ -2133,11 +2154,20 @@ int charmedaction(lifeform_t *lf, flag_t *charmflag) { turntoface(lf, charmer->cell); dir = getdirtowards(lf->cell, charmer->cell, lf, B_FALSE, DT_ORTH); if (dir == D_NONE) { - msg("^wYou try to %s towards %s, but fail.", getmoveverb(lf), - cansee(lf, charmer) ? charmername : "your new master"); + if (isplayer(lf)) { + msg("^wYou try to %s towards %s, but fail.", getmoveverb(lf), + cansee(lf, charmer) ? charmername : "your new master"); + } else if (cansee(player, lf)) { + char lfname[BUFLEN]; + getlfname(lf, lfname); + msg("^w%s tries to %s towards %s, but fail.", lfname, getmoveverb(lf), + cansee(lf, charmer) ? charmername : "something"); + } } else { - msg("^wYou mindlessly %s towards %s.", getmoveverb(lf), - cansee(lf, charmer) ? charmername : "your new master"); + if (isplayer(lf)) { + msg("^wYou mindlessly %s towards %s.", getmoveverb(lf), + cansee(lf, charmer) ? charmername : "your new master"); + } trymove(lf, dir, B_FALSE, B_TRUE); } taketime(lf, getactspeed(lf)); @@ -17787,6 +17817,8 @@ int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *r int modroll; int luckmod = 0; char mbuf[BUFLEN]; + flag_t *retflag[MAXCANDIDATES]; + int nretflags,i; flag_t *f; /* @@ -17986,6 +18018,10 @@ int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *r othermod += (getstatmod(lf, A_AGI) / 15); } + getflags(lf->flags, retflag, &nretflags, F_SKILLCHECKMOD, F_NONE); + for (i = 0; i < nretflags; i++) { + if (retflag[i]->val[0] == ct) mod += retflag[i]->val[1]; + } // luck sumflags(lf->flags, F_EXTRALUCK, &luckmod, NULL, NULL); @@ -20991,6 +21027,11 @@ int validateraces(void) { } } + if (hasflag(r->flags, F_NOCORPSE) && hasflag(r->flags, F_CORPSETYPE)) { + printf("ERROR in race '%s' - has both F_NOCORPSE and F_CORPSETYPE.\n", r->name); + goterror = B_TRUE; + } + for (f = r->flags->first ; f ; f = f->next) { if (f->id == F_RNDSPELLCOUNT) { if (!hasflag(r->flags, F_RNDSPELLSCHOOL) && !hasflag(r->flags, F_RNDSPELLPOSS)) { diff --git a/map.c b/map.c index 72c1356..ddb57b6 100644 --- a/map.c +++ b/map.c @@ -5064,8 +5064,9 @@ void dumpoutlines(void) { // dirtype of DT_ORTH will give a square explosion // dirtype of DT_COMPASS will give a circular explosion void explodecells(cell_t *c, int dam, int killwalls, object_t *o, int range, int dirtype, int wantannounce) { - int x,y; char buf[BUFLEN]; + cell_t *retcell[MAXRETCELLS]; + int nretcells,i; if (wantannounce) { sprintf(buf, "You see %s explosion!", (range > 0) ? "a huge" : "an"); } @@ -5080,49 +5081,27 @@ void explodecells(cell_t *c, int dam, int killwalls, object_t *o, int range, int noise(c, NULL, NC_OTHER, (range > 0) ? SV_PLANE : SV_TRUCK, "an explosion!", NULL); } - for (y = c->y - range ; y <= c->y + range ; y++) { - for (x = c->x - range ; x <= c->x + range ; x++) { - int inrange = B_FALSE; - cell_t *cc; - cc = getcellat(c->map, x,y); - if (cc) { - if ((dirtype == DT_COMPASS) && (getcelldist(c,cc) <= range)) { - inrange = B_TRUE; - } else if ((dirtype == DT_ORTH) && (getcelldistorth(c,cc) <= range)) { - inrange = B_TRUE; - } - if (inrange) { - //cell_t *stopcell = NULL; - // if a door stops the explosion, the door will - // take the damage. - //haslof(c, cc, LOF_WALLSTOP, &stopcell); - // don't check LOF for explosions. - explodesinglecell(cc, dam, killwalls, o, c); - } - } - } + getradiuscells(c, range, dirtype, B_FALSE, killwalls ? LOF_DONTNEED : LOF_WALLSTOP, B_TRUE, retcell, &nretcells, B_FALSE); + for (i = 0; i < nretcells; i++) { + explodesinglecell(retcell[i], dam, killwalls, o, c); } - // lfs up to 1 cell away are knocked back - for (y = c->y - range-1 ; y <= c->y + range+1 ; y++) { - for (x = c->x - range-1 ; x <= c->x + range+1 ; x++) { - cell_t *cc; - int mydist; - cc = getcellat(c->map, x,y); - mydist = getcelldist(c,cc); - if (cc && (mydist <= (range+1))) { - if (cc->lf && !isdead(cc->lf)) { - int critchance; - // critical hit? 100% chance in middle, 60 at one cell, 20 at two cells - critchance = 100 - (mydist*40); - if (pctchance(critchance)) { - criticalhit(NULL, cc->lf, BP_HANDS, pctof(critchance, dam), DT_EXPLOSIVE); - } - - // move away from centre of explosion - knockback(cc->lf, getdiraway(cc, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 2, NULL, 40-(mydist*10), B_TRUE); - } + // lfs up to 1 cell away are knocked back, if no walls in the way + getradiuscells(c, range+1, dirtype, B_FALSE, LOF_WALLSTOP, B_TRUE, retcell, &nretcells, B_FALSE); + for (i = 0; i < nretcells; i++) { + cell_t *cc; + int mydist; + cc = retcell[i]; + mydist = getcelldist(c,cc); + if (cc->lf && !isdead(cc->lf)) { + int critchance; + // critical hit? 100% chance in middle, 60 at one cell, 20 at two cells + critchance = 100 - (mydist*40); + if (pctchance(critchance)) { + criticalhit(NULL, cc->lf, BP_HANDS, pctof(critchance, dam), DT_EXPLOSIVE); } + // move away from centre of explosion + knockback(cc->lf, getdiraway(cc, c, NULL, B_FALSE, DT_COMPASS, B_FALSE), 2, NULL, 40-(mydist*10), B_TRUE); } } } @@ -6457,7 +6436,7 @@ void initmap(void) { addcelltype(CT_FLOORWOOD, "wood floor", '.', C_BROWN, B_EMPTY, B_TRANS, MT_WOOD, 0, -1); addcelltype(CT_FLOORFLESH, "flesh floor", '.', C_RED, B_EMPTY, B_TRANS, MT_FLESH, 0, -1); addcelltype(CT_FLOORSHOP, "shop floor", '.', C_BROWN, B_EMPTY, B_TRANS, MT_WOOD, 0, -1); - addcelltype(CT_FLOORTILE, "tiled floor", '.', C_WHITE, B_EMPTY, B_TRANS, MT_METAL, 0, -1); + addcelltype(CT_FLOORTILE, "tiled floor", '.', C_CYAN, B_EMPTY, B_TRANS, MT_METAL, 0, -1); addcelltype(CT_GRASS, "grass", '.', C_GREEN, B_EMPTY, B_TRANS, MT_PLANT, 0, -1); addcelltype(CT_DIRT, "dirt", '.', C_BROWN, B_EMPTY, B_TRANS, MT_STONE, 0, -1); addcelltype(CT_LOWFLOOR, "low rock floor", '.', C_GREY, B_EMPTY, B_TRANS, MT_STONE, -1, -1); diff --git a/objects.c b/objects.c index 1a0fbe9..eda2984 100644 --- a/objects.c +++ b/objects.c @@ -11500,6 +11500,10 @@ int sethiddenname(objecttype_t *ot, char *text) { addflag(ot->flags, F_PRODUCESLIGHT, 1, NA, NA, NULL); } + if (strstr(text, "humming")) { + addflag(lastot->flags, F_MAKESNOISE, 20, 2, NA, "humming."); + } + // set colour based on hiddenname for (n = 0; strlen(colour[n].name); n++) { if (strstr(text, colour[n].name)) { diff --git a/spell.c b/spell.c index 1853eea..8c6162f 100644 --- a/spell.c +++ b/spell.c @@ -176,6 +176,8 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef case R_LEECH: case R_SNAKETREE: case R_PIRANHAKING: + case R_CATTIGER: + case R_CATPANTHER: strcpy(verb, "leap"); break; default: @@ -10814,6 +10816,8 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ enum RACECLASS wantrc; enum RACE wantrace = R_NONE; int friendly; + char racename[BUFLEN]; + lifeform_t *summoner = NULL; if (spellid == OT_S_HECTASSERVANT) { lifetime = 10; @@ -10862,8 +10866,6 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ friendly = B_TRUE; break; case OT_S_SUMMONANIMALSMD: - wantrc = RC_ANIMAL; - wantsize = SZ_MEDIUM; nwant = rnd(2,3); successrate = 100; friendly = B_TRUE; @@ -10884,6 +10886,17 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ break; } + // override with forced race? + if (caster && getforcedspellrace(caster, spellid, racename)) { + race_t *r; + r = findracebyname(racename); + if (r) { + wantrace = r->id; + wantrc = RC_ANY; + wantsize = SZ_ANY; + } + } + if (!pctchance(successrate)) { fizzle(caster); return B_TRUE; @@ -11833,6 +11846,9 @@ char *getforcedspellrace(lifeform_t *lf, enum OBTYPE spellid, char *racestr) { flag_t *f; // forced? f = lfhasflagval(lf, F_CANWILL, spellid, NA, NA, NULL); + if (!f) { + f = lfhasflagval(lf, F_CANCAST, spellid, NA, NA, NULL); + } if (f) { texttospellopts(f->text, "race:", racestr, NULL); if (strlen(racestr)) {