- [+] non-player insects should never be able to break out of a web.

- [+] stench should still affect non humanoid/animals if they have
      f_enhancesmell
- [+] bug: god of fire should only be pleased by kills if you used fire.
- [+] luck should affect whether you gain abils from eating corpses
- [+] lower weight of four leaf clover
- [+] bug: when dungeon had different wall type selected, still got
      scattered rock walls
- [+] death spells shouldn't please hecta if they fail
- [+] bjorn should restore stamina when you pray
- [+] show your score when you didn't make the hiscore table.
- [+] eating corpses for resistances
    - [+] f_eatconfer on race defs. fill in text for stacking, ie.
          resist becomes immunity if you already ahve it.
        - [+] must have f_mutable.
    - [+] have to eat mutant corpse first to enable this.
        - [+] you gain f_mutable.
        - [+] "Your body feels ready for mutation."
    - [+] thereafter......
    - [+] for resistances, you first take maxhp/2 damage of the same
          type (with chance to ko rather than kill)!
    - [+] inherited by corpses
    - [+] eat shadowcat to see through smoke? this replaces the
          temporary smoke creation effects.
    - [+] add to some lfs
        - [+] dtresist (elemental based)
        - [+] attrmod (wyrm or giant corpses)
    - [+] when you create a new corpse object, take EATCONFERS from
          race!
- [+] store owners shouldn't let you in if you have f_stench
- [+] if you pick up a non-magical object (ie. a potion of water), and
      have detect magic, and it's not magic...you know it's uncursed,
      +0, etc.
    - [+] (assuming pot_water is known)
- [+] other effects of alignment
    - [+] areenemies()
        - [+] good:
            - [+] other good creatures are still "peaceful" (remove
                  f_hostile on creation)
            - [+] evil creatures are always hostile (even npcs) (add
                  this flag in addlf())
            - [+] no xp for attacking peaceful
        - [+] neutral: nothing special
            - [+] no xp for attacking peaveful
        - [+] evil: 
            - [+] still get xp for attacking peaceful
            - [+] good creatures are always hostile (add this flag in
                  addlf())
    - [+] show alignment in @. maybe after "Race: xxx"
    - [+] add random alignments to some humanoid races
        - [+] should be able to jsut use f_align al_none "gne"
        - [+] lizardman
        - [+] all the playable races
    - [+] bonus when 'c'hating to your own alignment npcs 
    - [+] move alignment question to givejob(), and make it random for
          mosnters
    - [+] add alignment to gods
- [+] sandman - puts you to sleep. OR has lots of sleeping dust.
    - [+] glyph: brown 'y'
    - [+] miniature tornado of sand, humanoid visible inside
    - [+] can cast sleep, range 1 (or 2 and need lof?)
    - [+] corpse:  smoke and sleeping dust?
    - [+] no attack.
    - [+] low hitdice (2)
    - [+] fairly high ar (10)
    - [+] madeof dirt
This commit is contained in:
Rob Pearce 2012-02-10 06:44:12 +00:00
parent d2588bdd98
commit 3e5c718502
17 changed files with 455 additions and 119 deletions

View File

@ -218,6 +218,11 @@ int attackcell(lifeform_t *lf, cell_t *c, int force) {
return B_TRUE;
}
attackedpeaceful = B_TRUE;
// non-evil players get no xp for attacking peaceful lfs
if ((isplayer(lf) || areallies(player, lf)) && (getalignment(lf) != AL_EVIL)) {
killflagsofid(c->lf->flags, F_XPVAL);
addflag(c->lf->flags, F_XPVAL, 0, NA, NA, NULL);
}
}
// above average wisdom will prvent you from annoying your god

77
data.c
View File

@ -653,7 +653,7 @@ void initjobs(void) {
// abilities
addflag(lastjob->flags, F_HIRABLE, B_TRUE, NA, NA, NULL);
addjob(J_PIRATE, "Pirate", "Pirates roam the seven seas, their mug of ale in one hand, and... nothing much in the other, since all pirates (in deference to some kind of ancient tale) have had their left hand replaced with a sharp hook. Their lifestyle had made them very wealthy and given them an impressive ability to handle their alcohol. They even start with a pet hawk. On the other hand, they are missing an eye, and not very attractive.");
addjob(J_PIRATE, "Pirate", "Pirates roam the seven seas, their mug of ale in one hand, and... nothing much in the other, since all pirates (in deference to some kind of ancient tale) have had their left hand replaced with a sharp hook. Their lifestyle has made them very wealthy and given them an impressive ability to handle their alcohol. They even start with a pet hawk. On the other hand, they are missing an eye, and not very attractive.");
// stats
addflag(lastjob->flags, F_JOBATTRMOD, A_STR, 15, NA, NULL);
addflag(lastjob->flags, F_JOBATTRMOD, A_AGI, 10, NA, NULL);
@ -778,7 +778,7 @@ void initjobs(void) {
addflag(lastjob->flags, F_STARTSKILL, SK_METALWORK, PR_NOVICE, NA, NULL);
addflag(lastjob->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
// learnable skills
addflag(lastjob->flags, F_CANLEARN, SK_ALLOMANCY, NA, NA, NULL);
addflag(lastjob->flags, F_CANLEARN, SK_SS_ALLOMANCY, NA, NA, NULL);
addflag(lastjob->flags, F_CANLEARN, SK_CARTOGRAPHY, PR_SKILLED, NA, NULL);
addflag(lastjob->flags, F_CANLEARN, SK_CLIMBING, NA, NA, NULL);
addflag(lastjob->flags, F_CANLEARN, SK_COOKING, PR_ADEPT, NA, NULL); // limit
@ -2166,7 +2166,7 @@ void initobjects(void) {
addflag(lastot->flags, F_GLYPH, C_BROWN, '%', NA, NULL);
addflag(lastot->flags, F_EDIBLE, B_TRUE, 250, NA, "");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL);
addot(OT_CLOVER, "four leafed clover", "A rare 4-leafed clover.", MT_FOOD, 0.5, OC_FOOD, SZ_TINY);
addot(OT_CLOVER, "four leafed clover", "A rare 4-leafed clover.", MT_FOOD, 0.1, OC_FOOD, SZ_TINY);
addflag(lastot->flags, F_GLYPH, C_GREEN, '%', NA, NULL);
addflag(lastot->flags, F_EDIBLE, B_TRUE, 5, NA, "");
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_VERYRARE, NULL);
@ -7351,6 +7351,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
addrace(R_AVIAD, "aviad", 60, 'h', C_WHITE, MT_FLESH, RC_HUMANOID, "A bipedal bird-like race. Aviads are human-sized but have more delicate bones and are covered in feathers. They have sharp talons in place of fingernails, and large feathered wings sprouting from their backs. While capable of flight from birth, their feathers make them vulnerable to fire and lightning based attacks.");
@ -7391,6 +7392,7 @@ void initrace(void) {
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 40, NA, NA, NULL);
addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
addrace(R_CYBORG, "cyborg", 150, 'R', C_GREY, MT_FLESH, RC_HUMANOID, "A cyborg is a human with cybernetic implants grafted throughout their body. In most cases their body has been completely reconstructed from metal, with a thin later of skin outside to maintain a human appearance. Cyborgs are exceptionaly good with technology due to their computer-enhanced brain, but completely unable to use magic (for much the same reason).");
setbodytype(lastrace, BT_HUMANOID);
@ -7448,6 +7450,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "bleeps^a bleep");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 35, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
addrace(R_ASHKARI, "ashkari", 60, '@', C_ORANGE, MT_FLESH, RC_HUMANOID, "The egotistical cat-like Ashkari are nimble, have extraordinary balance, smell, eyesight... and ego. The latter makes them unwise and vulnerable to will-based magic attacks. They instinctually hate canines and avians.");
@ -7495,6 +7498,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DTVULN, DT_WATER, NA, NA, NULL);
addflag(lastrace->flags, F_NOSKILL, SK_SWIMMING, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 25, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
addrace(R_DWARF, "delver", 60, 'h', C_BROWN, MT_FLESH, RC_HUMANOID, "Delvers are short, hardy creatures who generally spend their entire lives mining underground. As such they have great fitness and enhanced low-light vision, but generally lack great reasoning skills and magical ability.");
@ -7523,7 +7527,7 @@ void initrace(void) {
addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_CARTOGRAPHY, PR_NOVICE, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_METALWORK, PR_NOVICE, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_ALLOMANCY, PR_NOVICE, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_SS_ALLOMANCY, PR_NOVICE, NA, NULL);
// penalties
addflag(lastrace->flags, F_MPMOD, -3, NA, NA, NULL);
addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, "1d6");
@ -7531,6 +7535,7 @@ void initrace(void) {
// for ai:
addflag(lastrace->flags, F_WANTS, OT_GOLD, NA, NA, NULL);
addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
addrace(R_ELF, "selnor", 60, '@', C_GREEN, MT_FLESH, RC_HUMANOID, "The Selnor race are slender, graceful beings around human-sized but far nimbler. They have high intelligence and magical affinity, but lack physical strength. The Selnor meditate instead of sleeping, thus maintaining basic awareness.");
@ -7572,6 +7577,7 @@ void initrace(void) {
// penalties
addbonustext(lastrace->flags, F_PENDESC, "Slightly below average Hit Points.");
addflag(lastrace->flags, F_TAMABLE, 25, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
addrace(R_MAMMOAN, "mammoan", 150, '@', C_GREY, MT_LEATHER, RC_HUMANOID, "Mammoans are huge, elephant-like humanoids. Their have great senses of hearing and smell, a photographic memory, and leather skin which greatly lessens damage. On the other hand they vision is poor, their movement slow, and their digestive system cannot cope with meat.");
setbodytype(lastrace, BT_HUMANOID);
@ -7612,6 +7618,7 @@ void initrace(void) {
addflag(lastrace->flags, F_VEGETARIAN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOSKILL, SK_ATHLETICS, NA, NA, NULL);
addflag(lastrace->flags, F_TAMABLE, 25, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
// human monsters...
addrace(R_BANDITLDR, "bandit leader", 75, '@', C_GREY, MT_FLESH, RC_HUMANOID, "Like a regular bandit, but bigger and stronger. Enough so to bully their followers into submission anyway.");
@ -7723,6 +7730,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HIREPRICE, 0, NA, NA, NULL);
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
addrace(R_TOWNGUARD, "town guard", 100, '@', C_GREY, MT_FLESH, RC_HUMANOID, "A surly guard employed to uphold the laws of a town.");
setbodytype(lastrace, BT_HUMANOID);
@ -8269,6 +8277,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DTIMMUNE, DT_PETRIFY, B_TRUE, NA, NULL);
addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL);
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTIMMUNE, DT_PETRIFY, NA, "50");
// special attack handled in attack.c
addrace(R_CREEPINGCLAW, "creeping claw", 3, 'x', C_YELLOW, MT_FLESH, RC_MAGIC, "A disembodied hand, animated by magic. Its favourite pastime is to leap onto unsuspecting victims and crush the life out of them.");
@ -8325,6 +8334,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_NIGHTVISRANGEMOD, 1, NA, "75");
addrace(R_EYEBAT, "eyebat", 5, 'e', C_BLUE, MT_FLESH, RC_MAGIC, "A smaller cousin to the beholder, an eyebat is a single oversized eyeball suspended between bat-like wings.");
addbodypart(lastrace, BP_BODY, NULL);
@ -8383,6 +8393,7 @@ void initrace(void) {
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_STUN, NA, B_APPENDYOU, "gazes");
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_VISRANGEMOD, 1, NA, "50");
addrace(R_GIANTHILL, "mountain giant", 160, 'H', C_GREY, MT_FLESH, RC_HUMANOID, "Enormous humanoids who dwell in the mountains, using their grat strength to leap between valleys and pelt their prey with enormous boulders.");
setbodytype(lastrace, BT_HUMANOID);
@ -8400,6 +8411,7 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTOB, 90, NA, NA, "25-100 gold coins");
addflag(lastrace->flags, F_STARTOB, 70, NA, NA, "1-2 boulders");
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "50");
f = addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "great club");
addcondition(f, FC_NOCONDITION, 70);
@ -8453,6 +8465,8 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "50");
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_FIRE, NA, "50");
addrace(R_GIANTFIREFC, "flame giant shaman", 160, 'H', C_RED, MT_FLESH, RC_HUMANOID, "A subspecies of flame giant who have developed the ability to command the primal volcanic fires around them.");
setbodytype(lastrace, BT_HUMANOID);
@ -8490,6 +8504,8 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 15, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "50");
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_FIRE, NA, "50");
addrace(R_GIANTFIRETITAN, "flame titan", 160, 'H', C_RED, MT_FLESH, RC_HUMANOID, "The ultimate evolutionary form of a flame giant. Flame titans tower over even the largest of regular giants and can generate massive amounts of raging flame at will.");
setbodytype(lastrace, BT_HUMANOID);
@ -8522,6 +8538,8 @@ void initrace(void) {
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "75");
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_FIRE, NA, "100");
// TODO: storm giant
// TODO: storm titan
@ -8970,6 +8988,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EXTRALUCK, 2, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_EXTRALUCK, 1, NA, "25");
addrace(R_LIZARDMAN, "lizardman", 100, 'z', C_GREEN, MT_LEATHER, RC_HUMANOID, "Lizardmen are as they sound - a cross between a human and a lizard. Their leathery skin helps protect them from pummeling blows, and their tails give them enhanced stability.");
setbodytype(lastrace, BT_HUMANOID);
@ -9001,6 +9020,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_STABILITY, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
addrace(R_MINOTAUR, "minotaur", 130, 'H', C_BROWN, MT_FLESH, RC_HUMANOID, "Legendary creatures with the head of a bull, with a strength and temperament to match.");
setbodytype(lastrace, BT_HUMANOID);
@ -9104,6 +9124,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MINIONS, 25, 1, 2, "orc warrior");
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_ADEPT, NA, NULL);
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "75");
addrace(R_ORC, "orc", 90, 'o', C_BROWN, MT_FLESH, RC_HUMANOID, "Orcs are fierce humanoid monsters with green skin and grotesque features.");
setbodytype(lastrace, BT_HUMANOID);
@ -9204,6 +9225,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MORALE, 10, NA, NA, NULL);
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, "80");
addrace(R_PEGASUS, "pegasus", 130, 'Q', C_GREY, MT_FLESH, RC_MAGIC, "A legendary white, winged horse.");
setbodytype(lastrace, BT_QUADRAPED);
@ -9447,8 +9469,9 @@ void initrace(void) {
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, 'n', 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.");
addrace(R_SKOOB, "skoob", 40, 'm', 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);
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "carrot");
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "puddle of water");
@ -9471,6 +9494,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_CASTCHANCE, 60, NA, NA, NULL);
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_COLD, NA, "50");
addrace(R_OOZEGREY, "sizzling slime", 10, 'j', C_GREEN, MT_SLIME, RC_SLIME, "Exactly what it sounds like - a small lump of green ooze. Green, acidic ooze.");
@ -9514,6 +9538,7 @@ void initrace(void) {
addflag(lastrace->flags, F_CANWILL, OT_S_DIG, NA, NA, "pw:1;");
addflag(lastrace->flags, F_CASTCHANCE, 50, NA, NA, NULL);
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "pounds its drills into the ground");
addflag(lastrace->flags, F_EATCONFER, F_MUTABLE, B_TRUE, NA, "100");
addrace(R_SPRITEFIRE, "fire sprite", 5, 'n', C_RED, MT_FIRE, RC_MAGIC, "A small magical creature surrounded by crackling flames.");
setbodytype(lastrace, BT_HUMANOID);
@ -9543,6 +9568,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
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");
addrace(R_SPRITEGRAVE, "grave sprite", 5, 'n', C_BLUE, MT_FLESH, RC_MAGIC, "A small magical creature made from corpse dust.");
setbodytype(lastrace, BT_HUMANOID);
@ -9577,7 +9603,7 @@ void initrace(void) {
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);
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "sheet of ice");
addflag(lastrace->flags, F_EXTRACORPSE, NA, NA, NA, "sheet of ice");
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "small puddle of water");
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_AVERAGE, NA, NULL);
@ -9605,6 +9631,7 @@ void initrace(void) {
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
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");
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);
@ -9662,6 +9689,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_REVIVETIMER, 0, 25, R_TROLL, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_COLD, NA, "50");
addrace(R_XAT, "xat", 2, 'x', C_BROWN, MT_FLESH, RC_ANIMAL, "Xats are wild pigs with the claws of a dog.");
setbodytype(lastrace, BT_QUADRAPED);
@ -9725,6 +9753,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOISETEXT, N_WALK, 2, NA, "^gurgling");
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 4, NA, "gurgles loudly^a loud gurgle");
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_MUTABLE, B_TRUE, NA, "100");
addrace(R_PIRANHA, "piranha", 0.5, ';', C_GREEN, MT_FLESH, RC_AQUATIC, "A vicious, flesh-eating fish");
@ -9781,6 +9810,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DTIMMUNE, DT_ELECTRIC, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 3, NA, NA, NULL);
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_ELECTRIC, NA, "50");
addrace(R_EELGIANT, "giant eel", 150, ';', C_BLUE, MT_FLESH, RC_AQUATIC, "A very long, slippery eel. They tend to catch and crush their prey.");
setbodytype(lastrace, BT_FISH);
addflag(lastrace->flags, F_NEEDSWATER, B_TRUE, NA, NA, NULL);
@ -9966,6 +9996,7 @@ void initrace(void) {
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_NOISETEXT, N_FLY, 1, NA, "^flapping wings");
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_MUTABLE, B_TRUE, NA, "100");
addrace(R_BATVAMPIRE, "vampire bat", 6, 'B', C_BLUE, MT_FLESH, RC_ANIMAL, "Bats which suck the blood of their victims.");
setbodytype(lastrace, BT_BIRD);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
@ -10173,6 +10204,7 @@ void initrace(void) {
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, NULL);
addflag(lastrace->flags, F_AISPELLTARGETOVERRIDE, OT_S_FLOOD, ST_SELF, NA, NULL);
addflag(lastrace->flags, F_WALKVERB, NA, NA, NA, "hop");
addflag(lastrace->flags, F_EATCONFER, F_BREATHWATER, B_TRUE, NA, "50");
addrace(R_CHICKEN, "chicken", 0.5, 'c', C_BROWN, MT_FLESH, RC_ANIMAL, "A common farm-yard chicken.");
@ -10449,6 +10481,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOISETEXT, N_LOWHP, 3, NA, "screeches in pain^screeches of pain");
addflag(lastrace->flags, F_AVIAN, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_COLD, NA, "20");
addrace(R_LEECH, "giant leech", 10, 'j', C_MAGENTA, MT_FLESH, RC_ANIMAL, "A boneless blood-sucking creature. Quite dangerous until it eats it becomes satiated with blood, at which point it will slither off and fall asleep.");
addbodypart(lastrace, BP_BODY, NULL);
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
@ -10619,6 +10652,7 @@ void initrace(void) {
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "10");
addrace(R_SNAKECARPET, "carpet snake", 3, 's', C_GREY, MT_FLESH, RC_ANIMAL, "Non-venemous (but not quite harmless) snakes.");
setbodytype(lastrace, BT_SNAKE);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
@ -10690,6 +10724,7 @@ void initrace(void) {
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "15");
addrace(R_SNAKECOBRAGOLDEN, "golden cobra", 3, 's', C_YELLOW, MT_FLESH, RC_ANIMAL, "Golden cobras spit a blindness-inducing venom at their enemies.");
setbodytype(lastrace, BT_SNAKE);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
@ -10716,6 +10751,7 @@ void initrace(void) {
addflag(lastrace->flags, F_TREMORSENSE, 10, NA, NA, NULL);
addflag(lastrace->flags, F_DIURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "15");
addrace(R_SNAKECONSTRICTOR, "constrictor", 3, 's', C_MAGENTA, MT_FLESH, RC_ANIMAL, "A huge snake which coils around its victims then crushes them to death.");
setbodytype(lastrace, BT_SNAKE);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
@ -10823,6 +10859,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HOMELEVOB, NA, NA, NA, "20-30 webs");
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FLEEONHPPCT, 25, NA, NA, "");
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "15");
addrace(R_SPIDERREDBACK, "giant redback", 5, 'S', C_RED, MT_FLESH, RC_ANIMAL, "A version of a giant spider with a highly painful bite.");
setbodytype(lastrace, BT_SPIDER);
lastrace->baseid = R_SPIDER;
@ -10852,6 +10889,7 @@ void initrace(void) {
addflag(lastrace->flags, F_HOMELEVOB, NA, NA, NA, "10-20 webs");
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_FLEEONHPPCT, 25, NA, NA, "");
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_POISON, NA, "10");
addrace(R_WOLFYOUNG, "young wolf", 10, 'd', C_GREY, MT_FLESH, RC_ANIMAL, "Immature wolves.");
setbodytype(lastrace, BT_QUADRAPED);
addbodypart(lastrace, BP_TAIL, NULL);
@ -10939,6 +10977,7 @@ void initrace(void) {
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);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_COLD, NA, "25");
addrace(R_WORMGLUT, "glutwyrm", 25, 'W', C_MAGENTA, MT_FLESH, RC_DRAGON, "Gigantic wyrms who have become so obese over the centuries that they have evolved without wings. They swallow their prey whole, slowly digesting their still living bodies.");
addbodypart(lastrace, BP_HEAD, NULL);
@ -11046,6 +11085,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTS, OT_GOLD, 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_EATCONFER, F_DTRESIST, DT_ELECTRIC, NA, "100");
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "50");
addrace(R_DRAGONBLUEY, "blue wyrmling", 150, 'w', C_BLUE, MT_FLESH, RC_DRAGON, "Blue wyrms are massive reptilian creatures who can (and will) consume almost any living creature.");
setbodytype(lastrace, BT_HUMANOID);
@ -11095,6 +11136,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTS, OT_GOLD, 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_EATCONFER, F_DTRESIST, DT_ELECTRIC, NA, "50");
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "25");
addrace(R_DRAGONBLUEA, "ancient blue wyrm", 600, 'W', C_BLUE, MT_FLESH, RC_DRAGON, "Blue wyrms are massive reptilian creatures who can (and will) consume almost any living creature.");
setbodytype(lastrace, BT_HUMANOID);
addbodypart(lastrace, BP_WINGS, NULL);
@ -11149,6 +11192,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTS, OT_GOLD, 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_EATCONFER, F_DTRESIST, DT_ELECTRIC, NA, "100");
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "100");
addrace(R_DRAGONRED, "red wyrm", 400, 'W', C_RED, MT_FLESH, RC_DRAGON, "Red wyrms are massive evil reptilians who thrive on destruction, especially by means of fire.");
@ -11199,6 +11244,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTS, OT_GOLD, 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_EATCONFER, F_DTRESIST, DT_FIRE, NA, "100");
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "50");
addrace(R_DRAGONREDY, "red wyrmling", 150, 'w', C_RED, MT_FLESH, RC_DRAGON, "Red wyrms are massive evil reptilians who thrive on destruction, especially by means of fire.");
setbodytype(lastrace, BT_HUMANOID);
addbodypart(lastrace, BP_WINGS, NULL);
@ -11243,6 +11290,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTS, OT_GOLD, 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_EATCONFER, F_DTRESIST, DT_FIRE, NA, "50");
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "25");
addrace(R_DRAGONREDA, "ancient red wyrm", 600, 'W', C_RED, MT_FLESH, RC_DRAGON, "Red wyrms are massive evil reptilians who thrive on destruction, especially by means of fire.");
setbodytype(lastrace, BT_HUMANOID);
addbodypart(lastrace, BP_WINGS, NULL);
@ -11293,6 +11342,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTS, OT_GOLD, 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_EATCONFER, F_DTRESIST, DT_FIRE, NA, "100");
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "100");
addrace(R_DRAGONWHITE, "white wyrm", 400, 'W', C_WHITE, MT_FLESH, RC_DRAGON, "Although white wyrms are smaller than other varieties, their icy breath still makes them a formidable threat.");
setbodytype(lastrace, BT_HUMANOID);
@ -11341,6 +11392,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTS, OT_GOLD, 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_EATCONFER, F_DTRESIST, DT_COLD, NA, "100");
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "50");
addrace(R_DRAGONWHITEY, "white wyrmling", 150, 'w', C_WHITE, MT_FLESH, RC_DRAGON, "Although white wyrms are smaller than other varieties, their icy breath still makes them a formidable threat.");
setbodytype(lastrace, BT_HUMANOID);
addbodypart(lastrace, BP_WINGS, NULL);
@ -11383,6 +11436,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTS, OT_GOLD, 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_EATCONFER, F_DTRESIST, DT_COLD, NA, "50");
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "25");
addrace(R_DRAGONWHITEA, "ancient white wyrm", 600, 'W', C_WHITE, MT_FLESH, RC_DRAGON, "Although white wyrms are smaller than other varieties, their icy breath still makes them a formidable threat.");
setbodytype(lastrace, BT_HUMANOID);
addbodypart(lastrace, BP_WINGS, NULL);
@ -11433,6 +11488,8 @@ void initrace(void) {
addflag(lastrace->flags, F_WANTS, OT_GOLD, 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_EATCONFER, F_DTRESIST, DT_COLD, NA, "100");
addflag(lastrace->flags, F_EATCONFER, F_ATTRMOD, A_STR, 5, "100");
// end dragons / wyrms
// insects
@ -11456,7 +11513,7 @@ void initrace(void) {
addflag(lastrace->flags, F_CANWILL, OT_S_DETONATEDELAY, 20, 20, "pw:1;range:3;");
addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "vibrates");
addrace(R_BUTTERFLY, "butterfly", 0.01, 'i', C_YELLOW, MT_FLESH, RC_ANIMAL, "A harmless, colourful butterfly.");
addrace(R_BUTTERFLY, "butterfly", 0.01, 'i', C_YELLOW, MT_FLESH, RC_INSECT, "A harmless, colourful butterfly.");
setbodytype(lastrace, BT_BIRD);
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL);
@ -11606,6 +11663,7 @@ void initrace(void) {
addflag(lastrace->flags, F_DAMAGEGROUNDOBS, 2, DT_FIRE, NA, NULL);
addflag(lastrace->flags, F_MORALE, 5, NA, NA, NULL);
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_FIRE, NA, "10");
addrace(R_GLOWBUG, "glowbug", 1, 'i', C_WHITE, MT_FLESH, RC_INSECT, "Glowbugs are tiny flying creatures, magically producing light from their bodies.");
setbodytype(lastrace, BT_BIRD);
addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL);
@ -11633,6 +11691,7 @@ void initrace(void) {
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL);
addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_PRODUCESLIGHT, B_TRUE, NA, "100");
addrace(R_STINKBUG, "stinkbeetle", 1, 'x', C_MAGENTA, MT_FLESH, RC_INSECT, "A dog-sized beetle with tough scales. Emits a foul odour upon death.");
setbodytype(lastrace, BT_QUADRAPED);
addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL);
@ -11960,6 +12019,7 @@ void initrace(void) {
addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_CANWILL, OT_A_SPRINT, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
addflag(lastrace->flags, F_EATCONFER, F_DTRESIST, DT_COLD, NA, "15");
addrace(R_GHAST, "ghast", 50, 'Z', C_MAGENTA, MT_FLESH, RC_UNDEAD, "A more slender and ghost-like form of ghoul. Ghasts are cunning and deadly, and possess a paralyzing touch.");
setbodytype(lastrace, BT_HUMANOID);
@ -12146,7 +12206,6 @@ void initrace(void) {
addflag(lastrace->flags, F_NOISETEXT, N_FRUSTRATED, 3, NA, "hisses angrily^an angry hiss");
// special: change to gas cloud with 1 hp on death, if not asleep
// special: flee from garlic
// TODO: can shapeshift to bat
addflag(lastrace->flags, F_SILENTMOVE, B_TRUE, NA, NA, NULL);
addflag(lastrace->flags, F_MORALE, 30, NA, NA, NULL);
@ -12546,7 +12605,7 @@ void initskills(void) {
// spell schools
addskill(SK_SS_ALLOMANCY, "Allomancy", "Boosts casting of spells from this school.", 50);
addskilldesc(SK_SS_MENTAL, PR_INEPT, "- Each rank gives you a 20% chance to learn a new allomantic ability when levelling up.", B_FALSE);
addskilldesc(SK_SS_ALLOMANCY, PR_INEPT, "- Each rank gives you a 20% chance to learn a new allomantic ability when levelling up.", B_FALSE);
addskilldesc(SK_SS_ALLOMANCY, PR_NOVICE, "You gain knowledge of all Allomancy spells.", B_FALSE);
addskilldesc(SK_SS_ALLOMANCY, PR_NOVICE, "Allows you to cast Allomancy spells up to level 1.", B_FALSE);
addskilldesc(SK_SS_ALLOMANCY, PR_BEGINNER, "Allows you to cast Allomancy spells up to level 2.", B_FALSE);

Binary file not shown.

9
defs.h
View File

@ -20,6 +20,7 @@
#define TEXT_WARN_ATTACK_NOXP "You will not gain experience until you train. Really attack?"
#define TEXT_WARN_CLIMB "Really attempt to climb without Climbing skill?"
#define TEXT_WARN_FLY "Warning: while airborne you will not map your surroundings."
#define TEXT_WARN_MUTABLE "(you can now gain abilities by eating corpses)"
// Defaults
#define DEF_AIFOLLOWTIME (50) // if target lf is out of view
@ -2548,6 +2549,11 @@ enum FLAG {
F_NOSTRDAMMOD, // this object/lf does not have attacks modified
// using their strength
F_HARDNESS, // must do >= v0 damage to hurt this
F_EATCONFER, // if you eat this lf's corpse, you have a
// text% chance of gaining flag v0.
// with vals v1,v2,text.
// OR
// eating this object gives it.
// player only flags
F_DONEDARKMSG, // tells the game not to say 'it is very dark here'
F_DONELISTEN, // supress further 'you hear xx' messages this turn.
@ -2606,7 +2612,7 @@ enum FLAG {
F_PLAYABLE, // player can select to be this race.
F_RACESLAY, // deal 4x damage to creatures of raceclass v0
F_VAMPIRIC, // when on a lf:
// successful bite attacks form this lf will heal it
// successful bite attacks from this lf will heal it
// when on an object
// successful attacks with this weapon will heal lf
F_VEGETARIAN, // this lf will not eat meat.
@ -3039,6 +3045,7 @@ enum FLAG {
F_GRAVLESSENED,// knockback maeks you go further, can jump further
// your current load is reduce by v0 * 15kg.
F_MEDITATES, // meditates instead of sleeping.
F_MUTABLE, // you can mutate by eating corpses.
F_NEEDSWATER, // cannot survive out of deep water
F_PAIN, // take damage if you walk. v0=damtype,text is damage (xdy+z).
// if text not set, default dam is 1d2

View File

@ -14,7 +14,7 @@ c = cockatrice / chicken
d = canine/dog
D = ?
e = eye or floating thing
E = elemental ?
E = elemental / primality
f = feline/cat
F = flora (flowers, plants, etc)
g = goblin / gremlin
@ -25,7 +25,7 @@ i = insect
I = large insect
j = jelly/ooze/leech
k = kobold
m = mutant
m = mutant / magic creature
M = mummy
n = small humanoid / nymph / sprite
N = necron

6
god.c
View File

@ -1494,6 +1494,12 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
if (isinbattle(player, B_TRUE)) {
int redo = B_TRUE;
object_t *o;
if (getstamina(player) <= pctof(25, getmaxstamina(player))) {
setstamina(player, getmaxstamina(player));
msg("\"Time for your second wind!\"");
}
while (redo) {
redo = B_FALSE;
switch (rnd(1,4)) {

44
io.c
View File

@ -1686,6 +1686,13 @@ int announceflaggain(lifeform_t *lf, flag_t *f) {
donesomething = B_TRUE;
}
break;
case F_MUTABLE:
if (isplayer(lf)) {
msg("^GYour body feels ready for mutation.^n");
real_warnabout(TEXT_WARN_MUTABLE, PERMENANT, B_FALSE);
donesomething = B_TRUE;
}
break;
case F_NAUSEATED:
if (isplayer(lf)) {
msg("^wYou are nauseated by a disgusting stench!");
@ -2323,6 +2330,12 @@ int announceflagloss(lifeform_t *lf, flag_t *f) {
donesomething = B_TRUE;
}
break;
case F_MUTABLE:
if (isplayer(lf)) {
msg("Your body is no longer receptive to mutation.");
donesomething = B_TRUE;
}
break;
case F_NAUSEATED:
if (isplayer(lf)) { // don't know if monsters lose it
msg("You no longer feel nauseated.");
@ -3845,8 +3858,8 @@ void docomms(lifeform_t *lf) {
char lfname2[BUFLEN];
char buf2[BUFLEN];
int count;
int alignmod = 0;
object_t *o, *givenob = NULL;
if (!lf) {
where = askcoords("Talk to who?", "Talk->", TT_MONSTER, player, UNLIMITED, LOF_DONTNEED, B_FALSE);
if (where && where->lf && cansee(player, where->lf)) {
@ -3857,6 +3870,9 @@ void docomms(lifeform_t *lf) {
msg("Cancelled.");
return;
}
alignmod = getalignmod(lf);
getlfname(lf, lfname);
snprintf(buf, BUFLEN, "What will you say to %s?",lfname);
@ -4114,7 +4130,7 @@ void docomms(lifeform_t *lf) {
// money
if (givenob->type->id != OT_GOLD) {
f = lfhasflag(lf, F_TAMABLE);
if (f && skillcheck(lf, SC_SPEECH, f->val[0], mod)) {
if (f && skillcheck(lf, SC_SPEECH, f->val[0], mod + alignmod)) {
petify(lf, player);
if (cantalk(lf)) {
char *p = NULL;
@ -4177,7 +4193,7 @@ void docomms(lifeform_t *lf) {
canhear(lf, player->cell, SV_SHOUT) &&
(getattrbracket(getattr(lf, A_IQ), A_IQ, NULL) > IQ_ANIMAL) &&
!isundead(lf)) {
if (skillcheck(player, SC_SPEECH, 30, 0)) {
if (skillcheck(player, SC_SPEECH, 30, alignmod)) {
// passed!
sayphrase(lf, SP_MERCYACCEPT, SV_TALK, NA, player->race->name);
// they knock you out
@ -6145,6 +6161,10 @@ char *makedesc_ob(object_t *o, char *retbuf) {
sprintf(buf2, "%s surrounds you with a magnetic shield.\n", buf);
strncat(retbuf, buf2, HUGEBUFLEN);
break;
case F_MUTABLE:
sprintf(buf2, "%s allows your body to mutate.\n", buf);
strncat(retbuf, buf2, HUGEBUFLEN);
break;
case F_NAUSEATED:
sprintf(buf2, "%s causes you to feel nauseated.\n", buf);
strncat(retbuf, buf2, HUGEBUFLEN);
@ -10500,7 +10520,6 @@ void showlfstats(lifeform_t *lf, int showall) {
doheadingsmall(mainwin, y, 0, ftext, "Type");
wprintw(mainwin, "%-20s", lf->race->raceclass->name); y++;
}
j = getjob(lf);
if (j) {
doheadingsmall(mainwin, y, 0, ftext, "Job");
@ -10511,8 +10530,10 @@ void showlfstats(lifeform_t *lf, int showall) {
}
wprintw(mainwin, "%-20s", buf); y++;
}
if (isplayer(lf) || (lorelev >= PR_BEGINNER) ) {
doheadingsmall(mainwin, y, 0, ftext, "Alignment");
wprintw(mainwin, "%-20s", getalignmentname(getalignment(lf))); y++;
}
// size
if (showall) {
float w;
@ -11781,12 +11802,12 @@ void showlfstats(lifeform_t *lf, int showall) {
f = hasflag_real(lf->flags, F_VISRANGEMOD, B_TRUE, NULL, FROMRACE);
if (f) {
mvwprintw(mainwin, y, 0, "%s vision range has been %d.", your(lf), (f->val[0] > 0) ? "increased" : "decreased");
mvwprintw(mainwin, y, 0, "%s vision range has been %s.", your(lf), (f->val[0] > 0) ? "increased" : "decreased");
y++;
}
f = hasflag_real(lf->flags, F_NIGHTVISRANGEMOD, B_TRUE, NULL, FROMRACE);
if (f) {
mvwprintw(mainwin, y, 0, "%s night vision range has been %d.", your(lf), (f->val[0] > 0) ? "increased" : "decreased");
mvwprintw(mainwin, y, 0, "%s night vision range has been %s.", your(lf), (f->val[0] > 0) ? "increased" : "decreased");
y++;
}
@ -12188,6 +12209,11 @@ void showlfstats(lifeform_t *lf, int showall) {
}
}
f = lfhasflag(lf, F_MUTABLE);
if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s body is receptive to mutations.", your(lf), isplayer(lf) ? "is" : "are");
y++;
}
f = lfhasflag(lf, F_NAUSEATED);
if (f && (f->known)) {
mvwprintw(mainwin, y, 0, "%s %s nauseated.", you(lf), is(lf));
@ -12600,7 +12626,7 @@ void tombstone(lifeform_t *lf) {
minrank = 1;
maxrank = 10;
} else if (rank > 100) {
mvwprintw(mainwin, y, 0, "You didn't make the top 100 list."); y++;
mvwprintw(mainwin, y, 0, "Your score of %ld didn't make the top 100 list.", playerscore); y++;
minrank = 1;
maxrank = 10;
} else {

197
lf.c
View File

@ -2126,6 +2126,17 @@ int confuse(lifeform_t *lf, int howlong) {
return B_FALSE;
}
void copycorpseflags(flagpile_t *dst, flagpile_t *src) {
// inherit physical properties...
copyflag(dst, src, F_DTVULN);
copyflag(dst, src, F_DTRESIST);
copyflag(dst, src, F_DTIMMUNE);
// inherit alighnment
copyflag(dst, src, F_ALIGNMENT);
// inherit eat conferred flags
copyflag(dst, src, F_EATCONFER);
}
int continuedigging(lifeform_t *lf) {
cell_t *c;
flag_t *f = NULL;
@ -2592,12 +2603,11 @@ void die(lifeform_t *lf) {
pleasegodmaybe(R_GODNATURE, 50);
break;
default:
pleasegodmaybe(R_GODFIRE, 5);
break;
}
if (lf->lastdamtype == DT_FIRE) {
pleasegodmaybe(R_GODFIRE, 5);
}
// mercy god doesn't like killing
//angergodmaybe(R_GODMERCY, 1, GA_MURDER);
@ -2727,13 +2737,6 @@ void die(lifeform_t *lf) {
copyflag(corpse->flags, lf->flags, F_KNOWSABOUT);
copyflag(corpse->flags, lf->flags, F_HOMEMAP);
// inherit physical properties...
copyflag(corpse->flags, lf->flags, F_DTVULN);
copyflag(corpse->flags, lf->flags, F_DTRESIST);
copyflag(corpse->flags, lf->flags, F_DTIMMUNE);
// inherit alighnment
copyflag(corpse->flags, lf->flags, F_ALIGNMENT);
// some corpses will regenerate...
if (copyflag(corpse->flags, lf->flags, F_REVIVETIMER)) {
killflagsofid(corpse->flags, F_OBHPDRAIN);
@ -2936,6 +2939,35 @@ void genareaknowledge(flagpile_t *fp, int chancemod) {
addflag(fp, F_KNOWSABOUT, NA, NA, NA, knownstuff);
}
// if alignment needs to be generated randomly (or selected in the case of the player), do so.
void generatealignment(lifeform_t *lf) {
flag_t *f;
f = hasflagval(lf->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
if (f && strlen(f->text)) {
char buf[BUFLEN];
char buf2[BUFLEN],ch;
getplayername(buf2);
snprintf(buf, BUFLEN, "%s, select your alignment:", buf2);
initprompt(&prompt, buf);
if (strchr(f->text, 'g')) addchoice(&prompt, 'g', "Good", NULL, NULL, NULL);
if (strchr(f->text, 'n')) addchoice(&prompt, 'n', "Neutral", NULL, NULL, NULL);
if (strchr(f->text, 'e')) addchoice(&prompt, 'e', "Evil", NULL, NULL, NULL);
if (isplayer(lf)) {
ch = getchoice(&prompt);
} else {
ch = prompt.choice[rnd(0,prompt.nchoices-1)].ch;
}
switch (ch) {
case 'g': f->val[0] = AL_GOOD; break;
case 'e': f->val[0] = AL_EVIL; break;
default:
case 'n': f->val[0] = AL_NEUTRAL; break;
}
free(f->text);
f->text = strdup("");
}
}
void genxplist(void) {
race_t *r;
race_t *racetemp;
@ -3578,9 +3610,7 @@ int eat(lifeform_t *lf, object_t *o) {
if (fullyeaten) {
// special cases
if (hasflagval(o->flags, F_CORPSEOF, R_GLOWBUG, NA, NA, NULL)) {
addtempflag(lf->flags, F_PRODUCESLIGHT, B_TRUE, NA, NA, NULL, 30);
}
if (!hasflag(o->flags, F_TAINTED)) {
if (hasflagval(o->flags, F_CORPSEOF, R_NEWT, NA, NA, NULL)) {
// think "eye of newt"
gainmp(lf, 2);
@ -3592,7 +3622,74 @@ int eat(lifeform_t *lf, object_t *o) {
drawstatus();
msg("You feel slightly more magically attuned.");
}
} else if (hasflagval(o->flags, F_CORPSEOF, R_BEHOLDER, NA, NA, NULL)) {
lf->maxmp += 10;
if (isplayer(lf)) {
statdirty = B_TRUE;
drawstatus();
msg("You feel much more magically attuned!");
}
}
// most eat effects only happen if you have f_MUTABLE.
if (lfhasflag(lf, F_MUTABLE)) {
flag_t *retflag[MAXCANDIDATES];
int nretflags,i;
getflags(o->flags, retflag, &nretflags, F_EATCONFER, F_NONE);
for (i = 0; i < nretflags; i++) {
f = retflag[i];
if (f->val[0] != F_MUTABLE) {
int chance;
int luckmod = 0;
chance = atoi(f->text);
sumflags(lf->flags, F_EXTRALUCK, &luckmod, NULL, NULL);
chance += (luckmod*5);
limit(&chance, 0, 100);
if (pctchance(chance)) {
enum FLAG fid;
int val[2];
fid = f->val[0];
val[0] = f->val[1];
val[1] = f->val[2];
// already got this?
if (lfhasflag(lf, fid)) {
int changed = B_FALSE;
// sometimes improve it
switch (fid) {
case F_DTRESIST: fid = F_DTIMMUNE; changed = B_TRUE; break;
case F_SEEINDARK:
case F_PRODUCESLIGHT:
break; // can have multiple.
default: fid = F_NONE; break;
}
// still got the new one?
if (changed && (fid != F_NONE)) {
if (lfhasflag(lf, fid)) {
fid = F_NONE;
}
}
}
if (fid != F_NONE) {
// lose half your max hp!
losehp_real(lf, (lf->maxhp/2), DT_DIRECT, NULL, "the shock of mutation",
B_FALSE, o, B_FALSE);
if (isplayer(lf)) {
msg("^%cYou convulse in agony as your body mutates!",
getlfcol(lf, CC_BAD));
} else if (cansee(player, lf)) {
msg("^%c%s convulses in agony as its body mutates!",
getlfcol(lf, CC_BAD), lfname);
}
// still alive? you gain the ability!
if (!isdead(lf)) {
addflag(lf->flags, fid, val[0], val[1], NA, NULL);
}
}
} // end if pctchance
} // end if v0 not f_mutable
} // end foreach f_eatconfer flag
} // end if lf has f_mutable
} // end if !tainted
// special cases for object types
if (o->type->id == OT_BANANA) {
@ -3656,6 +3753,12 @@ int eat(lifeform_t *lf, object_t *o) {
dospelleffects(lf, OT_S_DETONATE, 10, lf, NULL, lf->cell, B_UNCURSED, NULL, B_TRUE);
stopeating = B_TRUE;
}
// you can gain F_MUTABLE even if you don't fully eat the corpse.
f = hasflagval(o->flags, F_EATCONFER, F_MUTABLE, NA, NA, NULL);
if (f) {
if (!lfhasflag(lf, F_MUTABLE)) addflag(lf->flags, F_MUTABLE, B_TRUE, NA, NA, NULL);
}
@ -3731,13 +3834,6 @@ int eat(lifeform_t *lf, object_t *o) {
break;
}
if (hasflagval(o->flags, F_CORPSEOF, R_SHADOWCAT, NA, NA, NULL)) {
int howlong;
howlong = rnd(10,20);
addtempflag(lf->flags, F_CANSEETHROUGHMAT, MT_GAS, NA, NA, NULL, howlong);
addtempflag(lf->flags, F_AUTOCREATEOB, 1, NA, NA, "puff of smoke", howlong+2);
}
// remove object
removeob(o, 1);
} else {
@ -4113,7 +4209,7 @@ void enhanceskills(lifeform_t *lf) {
if (prompt.nchoices > 0) {
objecttype_t *ot;
// pick one randomly
ot = (objecttype_t *)prompt.choice[rnd(0,prompt.nchoices)].data;
ot = (objecttype_t *)prompt.choice[rnd(0,prompt.nchoices-1)].data;
if (ot) {
addtempflag(lf->flags, F_CANCAST, ot->id, NA, NA, NULL, FROMJOB);
}
@ -4195,7 +4291,7 @@ void enhanceskills(lifeform_t *lf) {
} else {
if (prompt.nchoices > 0) {
// pick randomly
ot = (objecttype_t *)prompt.choice[rnd(0,prompt.nchoices)].data;
ot = (objecttype_t *)prompt.choice[rnd(0,prompt.nchoices-1)].data;
if (ot) {
addtempflag(lf->flags, F_CANCAST, ot->id, NA, NA, NULL, FROMJOB);
}
@ -4756,7 +4852,7 @@ int flee(lifeform_t *lf) {
// player let something flee?
if (isplayer(thisone)) {
pleasegodmaybe(R_GODMERCY, 5);
angergodmaybe(R_GODDEATH, 15, GA_MERCY);
angergodmaybe(R_GODDEATH, 10, GA_MERCY);
}
killflag(f);
} else {
@ -5454,6 +5550,19 @@ enum ALIGNMENT getalignment(lifeform_t *lf) {
return f->val[0];
}
// return skillcheck modifier for speech checks player vs lf
int getalignmod(lifeform_t *lf) {
enum ALIGNMENT al = AL_NONE;
int alignmod = 0;
al = getalignment(lf);
if ((al == AL_GOOD) || (al == AL_EVIL)) {
if (al == getalignment(player)) {
alignmod = 3;
}
}
return alignmod;
}
enum ALLEGIENCE getallegiance(lifeform_t *lf) {
flag_t *f;
f = lfhasflag(lf, F_CHARMEDBY);
@ -8887,6 +8996,7 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
killflagsofid(lf->flags, F_ALIGNMENT);
}
// apply attrib mods from this job
getflags(j->flags, retflag, &nretflags, F_JOBATTRMOD, F_NONE);
for (i = 0; i < nretflags; i++) {
@ -9030,6 +9140,8 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
}
*/
}
generatealignment(lf);
}
@ -11792,10 +11904,16 @@ raceclass_t *addraceclass(enum RACECLASS id, char *name, char *pluralname, enum
}
skill_t *addskill(enum SKILL id, char *name, char *desc, int traintime) {
skill_t *a;
skill_t *a,*temp;
int count = 0;
assert(!findskill(id));
for (temp = firstskill ; temp ; temp = temp->next) {
count++;
}
assert(count < MAXSKILLS);
// add to the end of the list
if (firstskill == NULL) {
firstskill = malloc(sizeof(skill_t));
@ -12294,6 +12412,9 @@ int armourfits(lifeform_t *lf, object_t *o, enum ERROR *reason) {
// returns TRUE if 'lf' agrees to share knowledge with the player
int askforinfo(lifeform_t *lf, int diffmod) {
int alignmod = 0;
alignmod = getalignmod(lf);
if (lfhasflag(lf, F_NOINFO)) {
// refusing to give info
sayphrase(lf, SP_INFO_REFUSE_AGAIN, SV_TALK, NA, NULL);
@ -12319,7 +12440,7 @@ int askforinfo(lifeform_t *lf, int diffmod) {
int difficulty;
difficulty = 20 + diffmod + ((gethitdice(player) - gethitdice(lf))*2);
if (real_skillcheck(player, SC_SPEECH, difficulty, 0, &result)) {
if (real_skillcheck(player, SC_SPEECH, difficulty, alignmod, &result)) {
askingprice = 0;
// passed - free!
} else {
@ -13055,8 +13176,10 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml
}
// bashing damage sometimes ko's
// damage when eating corpses also does this.
if (!ko) {
int threshold,kochance;
int threshold,kochance = 0;
int damtypeok = B_FALSE;
int playerinvolved = B_FALSE;
if (isplayer(lf)) {
@ -13065,6 +13188,13 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml
playerinvolved = B_TRUE;
}
if (damtype == DT_BASH) {
damtypeok = B_TRUE;
} else if ((damtype == DT_DIRECT) && fromob && hasflag(fromob->flags, F_EATCONFER)) {
damtypeok = B_TRUE;
}
if (damtypeok) {
if (playerinvolved && godprayedto(R_GODMERCY)) {
threshold = -10;
kochance = 75;
@ -13072,8 +13202,9 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml
threshold = -5;
kochance = 50;
}
}
if (damtype == DT_BASH) {
if (kochance) {
int hpleftafterdam;
// if this damage would reduce the lf to between -threshold and 0 hp
hpleftafterdam = lf->hp - amt;
@ -13411,8 +13542,12 @@ int makenauseated(lifeform_t *lf, int amt, int howlong) {
case RC_ANIMAL:
break;
default:
// only affects humanoids & animals, unless you have enhanced smell.
if (!lfhasflag(lf, F_ENHANCESMELL)) {
return B_TRUE;
}
break;
}
if (lfhasflag(lf, F_STENCH)) return B_TRUE; // your own smell makes you used to it
if (lfhasflag(lf, F_NOSMELL)) return B_TRUE; // can't smell it.
@ -15728,6 +15863,16 @@ int scare(lifeform_t *lf, lifeform_t *scarer, int howlong, int scarerbonus) {
return B_FALSE;
}
void setalignment(lifeform_t *lf, enum ALIGNMENT al) {
flag_t *f;
f = lfhasflag(lf, F_ALIGNMENT);
if (f) {
f->val[0] = al;
} else {
addflag(lf->flags, F_ALIGNMENT, al, NA, NA, NULL);
}
}
void setattr(lifeform_t *lf, enum ATTRIB attr, int val) {
lf->att[attr] = val;
if (lf->att[attr] > lf->baseatt[attr]) {

4
lf.h
View File

@ -71,6 +71,7 @@ int check_rest_ok(lifeform_t *lf);
//void checkxp(enum RACE rid);
float comparelfs(lifeform_t *lf1, lifeform_t *lf2);
int confuse(lifeform_t *lf, int howlong);
void copycorpseflags(flagpile_t *dst, flagpile_t *src);
int continuedigging(lifeform_t *lf);
int countinnateattacks(lifeform_t *lf);
int countnearbyallies(lifeform_t *lf);
@ -119,6 +120,7 @@ void gainlevel(lifeform_t *lf, int autotrain);
void gainmp(lifeform_t *lf, int amt);
void gainxp(lifeform_t *lf, long amt);
void genareaknowledge(flagpile_t *fp, int chancemod);
void generatealignment(lifeform_t *lf);
void genxplist(void);
int get_adjacent_quadrants(int dir, enum QUADRANT *start, enum QUADRANT *end);
int get_circular_fov_endpoints(lifeform_t *lf, int maxvisrange, int *endx, int *endy, int *nendcells);
@ -126,6 +128,7 @@ int getactspeed(lifeform_t *lf);
int getadjenemies(lifeform_t *lf, lifeform_t **adjlf, int *nadjlfs);
void getwhowillfollow(lifeform_t *lf, object_t *stairob, lifeform_t **adjally, int *seen, int *nadjallies);
enum ALIGNMENT getalignment(lifeform_t *lf);
int getalignmod(lifeform_t *lf);
enum ALLEGIENCE getallegiance(lifeform_t *lf);
int getallouterarmour(lifeform_t *lf, object_t **ob, int *nobs);
object_t *getarmour(lifeform_t *lf, enum BODYPART bp);
@ -395,6 +398,7 @@ int say(lifeform_t *lf, char *text, int volume);
int sayphrase(lifeform_t *lf, enum SAYPHRASE what, int volume, int val0, char *text);
int scare(lifeform_t *lf, lifeform_t *scarer, int howlong, int scarerbonus);
//int setammo(lifeform_t *lf, object_t *o);
void setalignment(lifeform_t *lf, enum ALIGNMENT al);
void setattr(lifeform_t *lf, enum ATTRIB attr, int val);
void setbodypartname(race_t *r, enum BODYPART bp, char *name);
void setbodytype(race_t *r, enum BODYTYPE bt);

68
map.c
View File

@ -296,6 +296,8 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int jobok, int
} else {
givejob(lf, wantjob);
}
generatealignment(lf);
//if (gamemode == GM_GAMESTARTED) checkallflags(player->cell->map); // debugging
if (autogen) {
@ -334,6 +336,33 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int jobok, int
}
finalisemonster(lf, NULL, wantflags);
}
// NOTE: because the initial maps (world, heaven, dungeon lev1) are created BEFORE the player,
// monsters on these maps will not have their hostility adjusted!
if (gamemode == GM_GAMESTARTED) {
// adjust hostility based on player's alignment
switch (getalignment(player)) {
case AL_GOOD:
if (getalignment(lf) == AL_GOOD) {
killflagsofid(lf->flags, F_HOSTILE);
} else if (getalignment(lf) == AL_EVIL) {
if (!lfhasflag(lf, F_HOSTILE)) {
addflag(lf->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
}
}
break;
case AL_EVIL:
if (getalignment(lf) == AL_GOOD) {
if (!lfhasflag(lf, F_HOSTILE)) {
addflag(lf->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
}
}
break;
default:
break;
}
}
lf->born = B_TRUE;
//if (gamemode == GM_GAMESTARTED) checkallflags(player->cell->map); // debugging
@ -370,6 +399,15 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int jobok, int
newlf->born = B_TRUE;
// match alignment
setalignment(newlf, getalignment(lf));
// match hostility
if (lfhasflag(lf, F_HOSTILE)) {
if (!lfhasflag(newlf, F_HOSTILE)) addflag(newlf->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
} else {
killflagsofid(newlf->flags, F_HOSTILE);
}
// initial monster should remember its minions
addflag(lf->flags, F_MINION, newlf->id, NA, NA, NULL);
}
@ -870,7 +908,7 @@ int autodoors(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, in
makedoor(cell[i], dooropenchance);
} else {
setcelltype(cell[i], getcellempty(cell[i]));
cell[i]->isroomwall = compassdir(d);
cell[i]->isroomwall = orthdir(d);
addflag(map->flags, F_ROOMEXIT, roomid, cell[i]->x, cell[i]->y, "from autodoors, only way out");
}
} else {
@ -894,7 +932,7 @@ int autodoors(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, in
setcelltype(poss[sel], getcellempty(poss[sel]));
addflag(map->flags, F_ROOMEXIT, roomid, poss[sel]->x, poss[sel]->y, "from autodoors, potential location");
}
poss[sel]->isroomwall = compassdir(possdir[sel]);
poss[sel]->isroomwall = orthdir(possdir[sel]);
doorsadded++;
}
@ -944,7 +982,7 @@ int autodoors(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, in
addflag(map->flags, F_ROOMEXIT, roomid, cell[sel]->x, cell[sel]->y, "from autodoors, forced at end");
doorsadded++;
}
cell[sel]->isroomwall = compassdir(d);
cell[sel]->isroomwall = orthdir(d);
}
}
}
@ -2501,9 +2539,16 @@ void createdungeon(map_t *map, int depth, map_t *parentmap, int exitdir, object_
// what kind of cells will 'empty' ones be?
emptycell = getmapempty(map);
//solidcell = map->habitat->solidcelltype;
solidcell = getmapsolid(map);
// redo all map cells as selected type
for (y = 0; y < map->h; y++) {
for (x = 0; x < map->w; x++) {
c = getcellat(map, x, y);
setcelltype(c, solidcell);
}
}
// pick initial random spot
if (corridortype == CDT_NORMAL) {
c = getrandomcell(map);
@ -5924,6 +5969,7 @@ int compassdir(int orthdir) {
}
int getrandomdir(int dirtype) {
if (dirtype == DT_ORTH) {
return rnd(D_N, D_W);
@ -7070,6 +7116,20 @@ void moveobtoclearcell(object_t *o) {
moveob(o, c->obpile, ALL);
}
int orthdir(int compassdir) {
switch (compassdir) {
case DC_N:
return D_N;
case DC_S:
return D_S;
case DC_E:
return D_E;
case DC_W:
return D_W;
}
return D_NONE;
}
enum RACE parserace(char *name, flagpile_t *wantflags, enum JOB *wantjob) {
int donesomething;
char *p;

1
map.h
View File

@ -163,6 +163,7 @@ void makelitradius(cell_t *c, int radius, enum LIGHTLEV how, int howlong);
void markroomwalls(map_t *m, room_t *r);
void mapentereffects(map_t *m);
void moveobtoclearcell(object_t *o);
int orthdir(int compassdir);
enum RACE parserace(char *name, flagpile_t *wantflags, enum JOB *wantjob);
int remove_deadends(map_t *m, int howmuch);
void set_scanned_glyph(int targettype, void *what, char *descappend, char *desc, glyph_t *glyph);

26
move.c
View File

@ -2334,13 +2334,6 @@ int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg) {
int checkmod = 0;
int getsweaker;
if ((o->type->id == OT_WEB) && isairborne(lf)) {
checkmod -= 5;
}
getlfname(lf,lfname);
real_getobname(o, buf, o->amt, B_FALSE, B_FALSE, B_TRUE, B_FALSE, B_FALSE);
// for stacks of sticky objects, each one after the first adds
// quarter its difficuly. ie:
// 1 x object with f_sticky:20, difficult is 20
@ -2353,6 +2346,25 @@ int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg) {
diff = (o->amt - 1) * ((float)f->val[0] / 4.0);
}
getsweaker = f->val[1];
if (o->type->id == OT_WEB) {
if (isairborne(lf)) {
checkmod -= 5;
}
if (lf->race->raceclass->id == RC_INSECT) {
// basically impossible.
checkmod -= 20;
if (!isplayer(lf)) {
// AND you will never escape!
getsweaker = 0;
}
}
}
getlfname(lf,lfname);
real_getobname(o, buf, o->amt, B_FALSE, B_FALSE, B_TRUE, B_FALSE, B_FALSE);
if (skillcheck(lf, SC_STR, diff, checkmod)) {
if (isplayer(lf)) {
msg("You tear free from %s!", buf);

21
nexus.c
View File

@ -427,27 +427,6 @@ int main(int argc, char **argv) {
}
//////////////////////
// select alignment?
f = hasflagval(player->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
if (f) {
char buf2[BUFLEN],ch;
getplayername(buf2);
snprintf(buf, BUFLEN, "%s, select your alignment:", buf2);
initprompt(&prompt, buf);
if (strchr(f->text, 'g')) addchoice(&prompt, 'g', "Good", NULL, NULL, NULL);
if (strchr(f->text, 'n')) addchoice(&prompt, 'n', "Neutral", NULL, NULL, NULL);
if (strchr(f->text, 'e')) addchoice(&prompt, 'e', "Evil", NULL, NULL, NULL);
ch = getchoice(&prompt);
switch (ch) {
case 'g': f->val[0] = AL_GOOD; break;
case 'e': f->val[0] = AL_EVIL; break;
default:
case 'n': f->val[0] = AL_NEUTRAL; break;
}
free(f->text);
f->text = strdup("");
}
// read cheat info from player file
if (playerfile) {
if (parseplayerfile(playerfile, player)) {

View File

@ -1645,6 +1645,14 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes
cf->val[1] = sizetonutrition(rf->val[0]);
}
}
}
if (o->type->id == OT_CORPSE) {
if (corpserace) {
// inherit properties from race
copycorpseflags(o->flags, corpserace->flags);
}
}
// depth
@ -6960,13 +6968,10 @@ int isimpassableob(object_t *o, lifeform_t *lf, enum LFSIZE forcesize) {
return B_FALSE;
}
int ismagical(object_t *o) {
if (hasflag(o->flags, F_HASBRAND)) {
return B_TRUE;
}
switch (o->type->obclass->id) {
int ismagicalobtype(objecttype_t *ot) {
switch (ot->obclass->id) {
case OC_SCROLL:
switch (o->type->id) {
switch (ot->id) {
case OT_SCR_NOTHING:
// these scrolls are non-magical
break;
@ -6981,7 +6986,7 @@ int ismagical(object_t *o) {
return B_TRUE;
break;
case OC_POTION:
switch (o->type->id) {
switch (ot->id) {
case OT_POT_ACID:
case OT_POT_OIL:
case OT_POT_WATER:
@ -6995,19 +7000,10 @@ int ismagical(object_t *o) {
break;
}
break;
case OC_BOOK:
if (hasflag(o->flags, F_LINKSPELL)) {
// ie. spellbooks
return B_TRUE;
}
break;
default:
break;
}
if (hasflag(o->flags, F_ENCHANTABLE) && hasflag(o->flags, F_BONUS)) {
return B_TRUE;
}
switch (o->type->id) {
switch (ot->id) {
case OT_SHILLELAGH:
case OT_WIZARDSTAFF:
return B_TRUE;
@ -7017,6 +7013,26 @@ int ismagical(object_t *o) {
return B_FALSE;
}
int ismagical(object_t *o) {
if (ismagicalobtype(o->type)) {
return B_TRUE;
}
if (o->type->obclass->id == OC_BOOK) {
if (hasflag(o->flags, F_LINKSPELL)) {
// ie. spellbooks
return B_TRUE;
}
}
if (hasflag(o->flags, F_HASBRAND)) {
return B_TRUE;
}
if (hasflag(o->flags, F_ENCHANTABLE) && hasflag(o->flags, F_BONUS)) {
return B_TRUE;
}
return B_FALSE;
}
int ismeleeweapon(object_t *o) {
if (hasflag(o->flags, F_DAM)) {
return B_TRUE;
@ -8057,6 +8073,16 @@ object_t *real_moveob(object_t *src, obpile_t *dst, int howmany, int stackok) {
checkburdened(dst->owner, preburdened);
}
// sometime spicking up something will it id
if (isplayer(dst->owner)) {
if (lfhasflag(player, F_DETECTMAGIC)) {
// have detect magic and picking up non-magical object which doesn't show up as magic?
if (isknown(o) && !isidentified(o) && !ismagicalobtype(o->type) && !ismagical(o)) {
identify(o);
}
}
}
// in case you picked up money, something which changes your AR, etc
if (isplayer(dst->owner)) {
statdirty = B_TRUE;

View File

@ -196,6 +196,7 @@ int isknownot(objecttype_t *ot);
int isheavyweapon(object_t *o);
int isidentified(object_t *o);
int isimpassableob(object_t *o, lifeform_t *lf, enum LFSIZE forcesize);
int ismagicalobtype(objecttype_t *ot);
int ismagical(object_t *o);
int ismeleeweapon(object_t *o);
int ismetal(enum MATERIAL mat);

View File

@ -132,6 +132,10 @@ void shop(lifeform_t *lf, object_t *vm) {
return;
}
if (lfhasflag(lf, F_STENCH)) {
msg("\"Pheeew! You're not coming in smelling like that.\"");
return;
}
if (hasflagval(vm->flags, F_BANNEDLF, lf->id, NA, NA, NULL)) {
if (!lfhasflag(lf, F_ANONYMOUS)) {
msg("\"You are not welcome here, thief!\"");
@ -830,7 +834,7 @@ enum SHOPRETURN shoppurchase(lifeform_t *lf, object_t *vm, int starty, char *top
strcpy(buytext, "Purchased");
if (npurchased) (*npurchased)++;
} else {
msg("I'm afraid that won't cover it..."); more();
msg("\"I'm afraid that won't cover it...\""); more();
o = NULL;
}
}

View File

@ -9685,13 +9685,14 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
return B_FALSE;
}
howlong = getspellduration(5,10,blessed) + power;
if (makenauseated(target, power, howlong)) {
if (isplayer(caster)) nothinghappens();
return B_FALSE;
}
if (isplayer(target) || haslos(player, target->cell)) {
if (seenbyplayer) *seenbyplayer = B_TRUE;
}
if (makenauseated(target, power, howlong)) {
if (isplayer(caster)) nothinghappens();
// failed
return B_TRUE;
}
} else if (spellid == OT_S_STICKTOSNAKE) {
int i;
//cell_t *poss[MAXCANDIDATES];