From 25ca8f3e43b97c1e200f57454e4332c6c106ec7c Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Thu, 17 Nov 2011 00:50:33 +0000 Subject: [PATCH] - [+] fix bug in randomtalk - [+] fix bug with beggars - [+] prompt before giving money in C-d - [+] bug: allies walking into walls - [+] make your own race / job more likely to kjoin for less gold - [+] new rarity level: rr_frequent ? - [+] add it - [+] in swamp, aquatic things are freqentut - [+] swamp level: - [+] createdungeon (but use different h_habitat. how do i do this?) - [+] then remove all doors - [+] then change all walls into deep water - [+] add rarity for monsterss - [+] add rarity for objects - [+] add f_nolink for vaults which aren't linked to rest of map - [+] fishbowl vault - [+] change misisle dam calculation - add firespeed rather than multiply. - [+] forced shops at certain level intervals - [+] implmement RT_OBJECT text=objectname - [+] add buildings at levles 2-4 5- 7 8 - 10 11-13 14-16 17-19 20-22 23 -25 - [+] split sp_ally_attack into attack and attack_unseen - [+] base throwspeed on throwin gskill, not strength - [+] make it much harder to catch thrown missiles - [+] try to place RT_OBJECTs in rooms - [+] maybe get rid of sound lowering for 's'lowwalk. this should be based on stealth! - [+] don't let you walk down stairs if there's an impassable object in the way. --- ai.c | 18 +- attack.c | 1 + data.c | 406 +++++++++++++++++++++++------------------ data/hiscores.db | Bin 12288 -> 12288 bytes defs.h | 18 +- doc/vaults.txt | 3 + io.c | 21 ++- lf.c | 134 +++++++------- lf.h | 2 +- map.c | 137 +++++++++++--- map.h | 1 + nexus.c | 8 +- objects.c | 113 ++++++------ spell.c | 33 ++-- text.c | 1 + vaults/circle.vlt | 2 +- vaults/crossroads.vlt | 2 +- vaults/glasscorner.vlt | 2 +- vaults/roundabout.vlt | 2 +- vaults/uturn.vlt | 2 +- vaults/vault.vlt | 3 +- 21 files changed, 545 insertions(+), 364 deletions(-) diff --git a/ai.c b/ai.c index 157d35f..f88dba1 100644 --- a/ai.c +++ b/ai.c @@ -97,7 +97,11 @@ int aiattack(lifeform_t *lf, lifeform_t *victim, int timelimit) { } else { strcpy(text, "something"); } - sayphrase(lf, SP_ALLY_ATTACK, SV_SHOUT, NA, text); + if (cansee(player, victim)) { + sayphrase(lf, SP_ALLY_ATTACK, SV_SHOUT, NA, text); + } else { + sayphrase(lf, SP_ALLY_ATTACKUNSEEN, SV_SHOUT, NA, text); + } } else { makenoise(lf, N_GETANGRY); } @@ -234,6 +238,11 @@ cell_t *aigetlastknownpos(lifeform_t *lf, lifeform_t *target, int *lastx, int *l int besttime = -1; int i; + // defaults + if (lastx) *lastx = NA; + if (lasty) *lasty = NA; + if (lastdir) *lastdir = D_NONE; + // check scent/footprints first for (i = 0; i < lf->nlos; i++) { if (hastrailof(lf->los[i]->obpile, target, NA, &tflag, lf)) { @@ -277,9 +286,6 @@ cell_t *aigetlastknownpos(lifeform_t *lf, lifeform_t *target, int *lastx, int *l return c; } - if (lastx) *lastx = NA; - if (lasty) *lasty = NA; - if (lastdir) *lastdir = D_NONE; return NULL; } @@ -846,7 +852,7 @@ int aimovetolf(lifeform_t *lf, lifeform_t *target, int wantattack) { // move towards their last known location instead cell_t *targcell; int lastx,lasty; - int lastdir; + int lastdir = D_NONE; targcell = aigetlastknownpos(lf, target, &lastx, &lasty, &lastdir); @@ -1165,7 +1171,7 @@ void aiturn(lifeform_t *lf) { int vol; f = poss[rnd(0,nposs-1)]; vol = rnd(f->val[1], f->val[2]); - if (f->text) { + if (strlen(f->text)) { say(lf, f->text, vol); } else { sayphrase(lf, f->val[0], vol, NA, NULL); diff --git a/attack.c b/attack.c index a7f64c5..e2357b7 100644 --- a/attack.c +++ b/attack.c @@ -747,6 +747,7 @@ int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) dam[0] = (int) ( (float)dam[0] * 1.25 ); } + // modify for weapon skill, strength etc applylfdammod(&dam[0], lf, wep); // modify for size diff --git a/data.c b/data.c index e6c0909..d897890 100644 --- a/data.c +++ b/data.c @@ -1169,10 +1169,10 @@ void initobjects(void) { addflag(lastobjectclass->flags, F_ENCHANTABLE, B_TRUE, NA, NA, NULL); addflag(lastobjectclass->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); addflag(lastobjectclass->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); - addoc(OC_FLORA, "Plants", "Some kind of plant/foliage.", ',', C_GREEN, RR_COMMON); + addoc(OC_FLORA, "Plants", "Some kind of plant/foliage.", ',', C_GREEN, RR_FREQUENT); addocnoun(lastobjectclass, "plant"); - addoc(OC_ROCK, "Rocks/Gems", "Boring (or not so boring) rocks or plants.", '*', C_GREY, RR_COMMON); - addoc(OC_FOOD, "Food", "Yum!", '%', C_GREY, RR_UNCOMMON); + addoc(OC_ROCK, "Rocks/Gems", "Boring (or not so boring) rocks or plants.", '*', C_GREY, RR_FREQUENT); + addoc(OC_FOOD, "Food", "Yum!", '%', C_GREY, RR_FREQUENT); addocnoun(lastobjectclass, "food"); addflag(lastobjectclass->flags, F_STACKABLE, B_TRUE, NA, NA, ""); addflag(lastobjectclass->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); @@ -1614,7 +1614,7 @@ void initobjects(void) { // money etc addot(OT_GOLD, "gold coin", "Sparkling nuggets of gold, the standard currency of Nexus.", MT_GOLD, 0.01, OC_MONEY, SZ_MINI); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, ""); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_FREQUENT, ""); addflag(lastot->flags, F_NUMAPPEAR, 1, 100, NA, ""); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_FEELTEXT, NA, NA, NA, "some gold"); @@ -1770,14 +1770,14 @@ void initobjects(void) { addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL); // flora addot(OT_FLOWER, "flower", "A colourful woodland flower.", MT_PLANT, 0.01, OC_FLORA, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, ""); + addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_FREQUENT, ""); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, ""); addflag(lastot->flags, F_GLYPH, C_MAGENTA, NA, NA, ","); 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_LEAF, "leaf", "A fallen leaf from a tree.", MT_PLANT, 0.01, OC_FLORA, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, ""); + addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_FREQUENT, ""); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, ""); addflag(lastot->flags, F_GLYPH, C_BROWN, NA, NA, ","); addflag(lastot->flags, F_NUMAPPEAR, 1, 10, NA, NULL); @@ -1792,7 +1792,7 @@ void initobjects(void) { addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, "3d6"); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addot(OT_SHRUB, "shrub", "A small but dense shrub.", MT_PLANT, 50, OC_FLORA, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, ""); + addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_FREQUENT, ""); addflag(lastot->flags, F_GLYPH, C_GREEN, NA, NA, "%"); addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MEDIUM, NA, NULL); addflag(lastot->flags, F_REDUCEMOVEMENT, 1, NA, NA, NULL); @@ -1802,7 +1802,7 @@ void initobjects(void) { addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, "2d6"); addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, NA, NULL); addot(OT_STUMP, "tree stump", "A large tree stump.", MT_WOOD, 150, OC_FLORA, SZ_LARGE); - addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, ""); + addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_FREQUENT, ""); addflag(lastot->flags, F_GLYPH, C_BROWN, NA, NA, "'"); addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_HUMAN, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); @@ -1903,15 +1903,17 @@ void initobjects(void) { addflag(lastot->flags, F_ISMEAT, B_TRUE, 80, NA, ""); addot(OT_MUSHROOMSHI, "shiitake mushroom", "A large brown mushroom.", MT_FOOD, 0.2, OC_FOOD, SZ_TINY); addflag(lastot->flags, F_EDIBLE, B_TRUE, 30, NA, ""); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, NA, NULL); - addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, NULL); + addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_FREQUENT, NULL); + addflag(lastot->flags, F_RARITY, H_SWAMP, 100, RR_FREQUENT, NULL); addflag(lastot->flags, F_NUMAPPEAR, 1, 3, NA, ""); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, "mushroom"); addot(OT_MUSHROOMTOAD, "toadstool", "A poisonous variety of mushroom.", MT_FOOD, 0.2, OC_FOOD, SZ_TINY); addflag(lastot->flags, F_EDIBLE, B_TRUE, 50, NA, NULL); addflag(lastot->flags, F_TAINTED, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, NA, NULL); - addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, NULL); + addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_FREQUENT, NULL); + addflag(lastot->flags, F_RARITY, H_SWAMP, 100, RR_FREQUENT, NULL); addflag(lastot->flags, F_NUMAPPEAR, 1, 3, NA, ""); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, "mushroom"); addot(OT_NUT, "peanut", "A species in the legume family.", MT_FOOD, 0.1, OC_FOOD, SZ_TINY); @@ -1969,102 +1971,102 @@ void initobjects(void) { // potions (sorted by rarity) addot(OT_POT_JUICE, "potion of fruit juice", "Tasty (but not very fresh) fruit juice! Sates hunger and restores a little stamina.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL); addot(OT_POT_CANINETRACKING, "potion of canine tracking", "Mimics the effects of a 'canine tracking' spell.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addot(OT_POT_HEALINGMIN, "potion of minor healing", "Restores 1-10 health to whoever drinks it.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL); addflag(lastot->flags, F_AIHEALITEM, B_TRUE, NA, NA, NULL); addot(OT_POT_WATER, "potion of water", "Plain, regular water.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, NULL); - addflag(lastot->flags, F_RARITY, H_VILLAGE, 100, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_FREQUENT, NULL); + addflag(lastot->flags, F_RARITY, H_VILLAGE, 100, RR_FREQUENT, NULL); addflag(lastot->flags, F_DIECONVERT, NA, NA, NA, "small puddle of water"); modflag(lastot->flags, F_HASHIDDENNAME, NA, NA, NA, "clear potion"); addot(OT_POT_HEALING, "potion of healing", "Restores 10-20 health to whoever drinks it.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 90, NA, NULL); addflag(lastot->flags, F_AIHEALITEM, B_TRUE, NA, NA, NULL); addot(OT_POT_HEALINGMAJ, "potion of major healing", "Restores 20-30 health to whoever drinks it.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 72, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 72, NA, NULL); addflag(lastot->flags, F_AIHEALITEM, B_TRUE, NA, NA, NULL); addot(OT_POT_OIL, "potion of oil", "A bottle of cooking oil.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 83, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 83, NA, NULL); addflag(lastot->flags, F_DIECONVERT, NA, NA, NA, "puddle of oil"); addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, NULL); addflag(lastot->flags, F_EXPLODEONDAM, DT_FIRE, NA, NA, "2d4"); addot(OT_POT_COFFEE, "potion of coffee", "A caffeinated beverage prepared from coffee beans.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 83, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 83, NA, NULL); addot(OT_POT_RUM, "potion of rum", "Strong liqour which is sure to make you tipsy. This will make you unsteady and lower your accuracy, but also let you ignore pain, minor damage, and many mental attacks.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 83, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 83, NA, NULL); addflag(lastot->flags, F_FLAMMABLE, 1, NA, NA, "medium fire"); addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, NULL); addflag(lastot->flags, F_EXPLODEONDAM, DT_FIRE, NA, NA, "2d6"); addflag(lastot->flags, F_BADOBJECT, B_TRUE, NA, NA, NULL); addot(OT_POT_RESTORATION, "potion of restoration", "Restores lost abilities to the drinker.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, NULL); addot(OT_POT_SLEEP, "potion of sleep", "Puts the drinker into a deep sleep.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 83, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 83, NA, NULL); addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_BADOBJECT, B_TRUE, NA, NA, NULL); addot(OT_POT_SPEED, "potion of haste", "Temporarily increasees the drinker's speed.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, NULL); addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL); addot(OT_POT_LEVITATION, "potion of levitation", "Causes the drinker to float up in the air.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 78, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 78, NA, NULL); addot(OT_POT_MAGIC, "potion of magic", "Fully restores the drinker's magical energy.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, NULL); addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL); addot(OT_POT_ACROBATICS, "potion of acrobatics", "Allows the drinker to leap large distances.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, NULL); addot(OT_POT_INVIS, "potion of invisibility", "Temporarily renders the drinker invisible.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, NULL); addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL); addot(OT_POT_POISON, "potion of poison", "Poisons the drinker.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, NULL); addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_BADOBJECT, B_TRUE, NA, NA, NULL); addot(OT_POT_ACID, "flask of battery acid", "Causes massive internal burning if ingested.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, NULL); addflag(lastot->flags, F_DIECONVERT, NA, NA, NA, "puddle of acid"); addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_BADOBJECT, B_TRUE, NA, NA, NULL); addot(OT_POT_ELEMENTIMMUNE, "potion of elemental immunity", "Grants the imbiber temporary immunity to both fire and cold.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 60, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 60, NA, NULL); addot(OT_POT_BLOOD, "potion of blood", "A small quantity of blood.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 60, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 60, NA, NULL); addflag(lastot->flags, F_DIECONVERT, NA, NA, NA, "splash of blood"); addot(OT_POT_SANCTUARY, "potion of sanctuary", "Creates a temporary magical barrier abour the drinker.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 60, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 60, NA, NULL); addot(OT_POT_ETHEREALNESS, "potion of etherealness", "Allows the walker to temporarily pass through walls.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 65, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 65, NA, NULL); addot(OT_POT_EXPERIENCE, "potion of experience", "Instantly grants the imbiber the next experience level.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 40, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 40, NA, NULL); addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, 40, NA, NULL); addot(OT_POT_BLOODC, "potion of cockatrice blood", "A small quantity of cockatrice blood.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 50, NA, NULL); addflag(lastot->flags, F_DIECONVERT, NA, NA, NA, "splash of cockatrice blood"); addot(OT_POT_COMPETENCE, "potion of competence", "Permemantly increases the drinker's strength, intelligence or dexterity.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 50, NA, NULL); addot(OT_POT_GASEOUSFORM, "potion of gaseous form", "Turns the drinker into a cloud of gas. Only intended for emergencies, since it will cause you to drop all your items.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 50, NA, NULL); addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL); addot(OT_POT_POLYMORPH, "potion of polymorph self", "Transmutes the drinker into another living race.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 50, NA, NULL); addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL); addot(OT_POT_INVULN, "potion of invulnerability", "Grants the drinker temporary immunity to physical harm.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 40, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 40, NA, NULL); addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL); addot(OT_POT_AMBROSIA, "vial of ambrosia", "The nectar of the gods, said to completely restore the drinker's health.", MT_GLASS, 1, OC_POTION, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 35, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 35, NA, NULL); addflag(lastot->flags, F_AIHEALITEM, B_TRUE, NA, NA, NULL); @@ -2089,99 +2091,99 @@ void initobjects(void) { // scrolls addot(OT_SCR_AWARENESS, "scroll of awareness", "Mimics the effects of a 'heightened awareness' spell.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addot(OT_SCR_REMOVECURSE, "scroll of remove curse", "Removes curses from all weilded equipment.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_FREQUENT, NULL); addot(OT_SCR_IDENTIFY, "scroll of identify", "Completely identifies any one item.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_IDENTIFY, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_FREQUENT, NULL); addot(OT_SCR_MENDING, "scroll of mending", "Repairs damage to objects.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_MENDING, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 98, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 98, RR_COMMON, NULL); addflag(lastot->flags, F_MAXPOWER, 4, NA, NA, NULL); addot(OT_SCR_NOTHING, "scroll of nothing", "Looks like a magic scroll, but doesn't do anything.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 84, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 84, RR_UNCOMMON, NULL); addot(OT_GRAPHPAPER, "magic map", "Paper containing a set of grid-lines, which automatically draws a map of its surroundings.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_HOLDCONFER, F_PHOTOMEM, NA, IFKNOWN, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addot(OT_MAP, "map", "A visual representation of the area.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addot(OT_SCR_CREATEMONSTER, "scroll of create monster", "Summons a (probably hostile) monster to a nearby location.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_CREATEMONSTER, 4, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL); 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_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addot(OT_SCR_DETECTLIFE, "scroll of detect life", "Senses life near the caster.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_DETECTLIFE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addot(OT_SCR_DETECTOBS, "scroll of detect objects", "Senses objects near the caster.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_DETECTOBS, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addot(OT_SCR_DETECTMAGIC, "scroll of detect magic", "Allows the reader to detect magical enchantments.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_DETECTMAGIC, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL); addot(OT_SCR_FLAMEPILLAR, "scroll of flame pillar", "Creates a tall pillar of flame.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_FLAMEPILLAR, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addot(OT_SCR_FLAMEBURST, "scroll of flame burst", "Creates a radial blast of fire out from the caster, dealing 2d6 damage. Range is based on spell power.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_FLAMEBURST, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addot(OT_SCR_ENCHANT, "scroll of enhancement", "Magically enhances a weapon or piece of armour.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_ENCHANT, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL); addot(OT_SCR_FREEZEOB, "scroll of freezing touch", "Permenantly changes the next object touched into solid ice.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_FREEZEOB, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_RARE, NULL); addflag(lastot->flags, F_BADOBJECT, B_TRUE, NA, NA, NULL); addot(OT_SCR_KNOCK, "scroll of knock", "Magically opens a barrier.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_KNOCK, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 80, RR_COMMON, NULL); addot(OT_SCR_LIGHT, "scroll of light", "Creates a permenant light source centred on the caster.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_LIGHT, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL); addot(OT_SCR_MAPPING, "scroll of sense surroundings", "Magically imbues the caster with a map of his/her surroundings.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_MAPPING, 4, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 80, RR_UNCOMMON, NULL); addot(OT_SCR_MINDSCAN, "scroll of mind scan", "Allows you to view the world through another creature's eyes.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_MINDSCAN, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, NULL); addot(OT_SCR_PERMENANCE, "scroll of permenance", "Makes all effects on an object last forever.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 50, RR_RARE, NULL); addot(OT_SCR_TELEPORT, "scroll of teleportation", "Causes the caster to teleport to a random location within the same level.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_TELEPORT, 4, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL); addot(OT_SCR_TURNUNDEAD, "scroll of turn undead", "Instills fear in undead creatures.", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_TURNUNDEAD, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 70, RR_UNCOMMON, NULL); addot(OT_SCR_WISH, "scroll of wishing", "Grants the caster any item of their choice (with some limitations).", MT_PAPER, 0.5, OC_SCROLL, SZ_SMALL); addflag(lastot->flags, F_LINKSPELL, OT_S_WISHLIMITED, NA, NA, NULL); @@ -3674,7 +3676,7 @@ void initobjects(void) { addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GLYPH, C_GREY, NA, NA, "^"); addflag(lastot->flags, F_SHARP, 2, 5, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, NULL); addot(OT_BUGLAMP, "glowing flask", "A glass flask with a glowbug corpse inside.", MT_GLASS, 0.3, OC_TOOLS, SZ_SMALL); addflag(lastot->flags, F_GLYPH, NA, NA, NA, "!"); @@ -3683,7 +3685,7 @@ void initobjects(void) { addflag(lastot->flags, F_FEELTEXT, NA, NA, NA, "a flask"); addot(OT_CANDLE, "candle", "A short wax candle.", MT_WAX, 0.2, OC_TOOLS, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 90, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ACTIVATEPREFIX, NA, NA, NA, "lit"); @@ -3715,7 +3717,7 @@ void initobjects(void) { addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, "pile of black powder"); addflag(lastot->flags, F_GLYPH, NA, NA, NA, ","); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 65, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 65, NA, NULL); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_EXPLODEONDAM, DT_FIRE, NA, NA, "8d2"); addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, "2d6"); @@ -3723,7 +3725,7 @@ void initobjects(void) { addflag(lastot->flags, F_POWDER, B_TRUE, NA, NA, NULL); addot(OT_LAMPOIL, "oil lamp", "An oil-powered lamp which produces light.", MT_METAL, 1, OC_TOOLS, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ACTIVATECONFER, F_PRODUCESLIGHT, 2, NA, NULL); @@ -3735,7 +3737,7 @@ void initobjects(void) { addflag(lastot->flags, F_CHARGEOUTMSG, B_TRUE, NA, NA, "goes out"); addot(OT_LANTERNOIL, "oil lantern", "An oil-powered lantern which produces a lot of light.", MT_METAL, 1, OC_TOOLS, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 55, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 55, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ACTIVATECONFER, F_PRODUCESLIGHT, 3, NA, NULL); @@ -3748,7 +3750,7 @@ void initobjects(void) { addot(OT_LOCKPICK, "lockpick", "An angled piece of metal, used to open locks.", MT_METAL, 0.05, OC_TOOLS, SZ_TINY); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, NULL); addflag(lastot->flags, F_PICKLOCKS, 10, B_DIEONFAIL, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); @@ -3867,7 +3869,7 @@ void initobjects(void) { addflag(lastot->flags, F_STARTOBRND, 50, NA, NA, NULL); addot(OT_TORCH, "torch", "A metre-long wooden rod with a flammable end.", MT_WOOD, 2, OC_TOOLS, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 85, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 85, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ACTIVATEPREFIX, NA, NA, NA, "lit"); @@ -3884,7 +3886,7 @@ void initobjects(void) { addflag(lastot->flags, F_CHARGEOUTMSG, B_TRUE, NA, NA, "goes out"); addot(OT_TOWEL, "towel", "An large absorbent cloth used for drawing off moisture.", MT_CLOTH, 1.5, OC_TOOLS, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 73, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 73, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); // tech - l0 @@ -3892,14 +3894,14 @@ void initobjects(void) { addflag(lastot->flags, F_RARITY, H_ALL, 90, NA, NULL); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, NULL); addflag(lastot->flags, F_PICKLOCKS, 2, NA, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addot(OT_PAPERCLIP, "paperclip", "A thin, looped wire for holding paper together.", MT_WIRE, 0.01, OC_TECH, SZ_TINY); addflag(lastot->flags, F_RARITY, H_ALL, 90, NA, NULL); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, NULL); addflag(lastot->flags, F_PICKLOCKS, 4, B_DIEONFAIL, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); // can use as a (very bad) weapon too... @@ -3912,7 +3914,7 @@ void initobjects(void) { // tech - l1 addot(OT_BUTANETORCH, "butane torch", "A cooking tool which creates an intensely hot flame using butane gas.", MT_METAL, 0.5, OC_TECH, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 85, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 85, RR_UNCOMMON, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERUSECHARGE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, TR_NEEDLOF, 1, "Where will you aim?"); @@ -3920,17 +3922,18 @@ void initobjects(void) { addflag(lastot->flags, F_TECHLEVEL, PR_NOVICE, NA, NA, NULL); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_POCKETWATCH, "pocket watch", "A portable timekeeping device made to be carried in a pocket.", MT_METAL, 0.1, OC_TECH, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 90, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_TECHLEVEL, PR_NOVICE, NA, NA, NULL); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_DIGITALWATCH, "digital watch", "An electronic timekeeping device which shows the time as a number.", MT_METAL, 0.1, OC_TECH, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 85, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 85, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_TECHLEVEL, PR_NOVICE, NA, NA, NULL); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_INSECTICIDE, "can of insecticide", "A spraycan containing poisonous chemicals.", MT_METAL, 0.5, OC_TECH, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 85, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_SWAMP, 85, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 85, RR_UNCOMMON, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERUSECHARGE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERNEEDTARGET, TT_MONSTER, NA, NA, "Where will you spray?"); @@ -3939,7 +3942,7 @@ void initobjects(void) { addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_LANTERNLED, "LED lantern", "A low-powered but efficient lantern which will last almost forever.", MT_METAL, 0.5, OC_TECH, SZ_TINY); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ACTIVATECONFER, F_PRODUCESLIGHT, 2, NA, NULL); @@ -3954,7 +3957,7 @@ void initobjects(void) { addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_TECHLEVEL, PR_BEGINNER, NA, NA, NULL); addot(OT_FLASHBANG, "flashbang", "A stun grenade which temporarily blinds all within sight.", MT_METAL, 1, OC_TECH, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 90, RR_UNCOMMON, NULL); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); @@ -3971,7 +3974,7 @@ void initobjects(void) { addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_GRENADE, "grenade", "An explosive weapon which explodes a short time after activation.", MT_METAL, 1, OC_TECH, SZ_TINY); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 80, RR_UNCOMMON, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); @@ -3987,7 +3990,7 @@ void initobjects(void) { addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_GRENADESMOKE, "smoke grenade", "A device which once activated, will explode into a cloud of smoke upon impact.", MT_METAL, 1, OC_TECH, SZ_TINY); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 80, RR_UNCOMMON, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); @@ -4004,7 +4007,7 @@ void initobjects(void) { addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_C4, "block of c4", "An extremely explosive plastic which explodes a medium time after activation.", MT_PLASTIC, 1, OC_TECH, SZ_TINY); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 76, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 76, RR_UNCOMMON, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); @@ -4052,26 +4055,26 @@ void initobjects(void) { // tech - l3 addot(OT_INFOVISOR, "infovisor", "Sleek looking metal visor which displays info directly into the retina.", MT_METAL, 0.2, OC_TECH, SZ_SMALL); addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 70, RR_RARE, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_EXTRAINFO, B_TRUE, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_ENHANCESEARCH, 10, NA, NULL); addflag(lastot->flags, F_TECHLEVEL, PR_ADEPT, NA, NA, NULL); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_LOCKHACKER, "lock hacker", "A sophisticated machine to manipulate physical locks.", MT_METAL, 3, OC_TECH, SZ_TINY); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 78, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 78, RR_UNCOMMON, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_TECHLEVEL, PR_ADEPT, NA, NA, NULL); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_PORTLADDER, "portable ladder", "A lightweight two metre ladder which automatically folds down to pocket size.", MT_METAL, 2, OC_TECH, SZ_TINY); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 83, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 83, RR_UNCOMMON, NULL); addflag(lastot->flags, F_TECHLEVEL, PR_ADEPT, NA, NA, NULL); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); // tech - l4 addot(OT_JETPACK, "jet pack", "A portable ion-thruster which allows the wearer to fly.", MT_METAL, 10, OC_TECH, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 68, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 68, RR_RARE, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_RNDCHARGES, 10, 30, NA, NULL); @@ -4083,14 +4086,14 @@ void initobjects(void) { // tech - l5 addot(OT_TELEPAD, "teleport beacon", "A metal cone which will teleport the user to the nearest similar cone.", MT_METAL, 3, OC_TECH, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 68, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 68, RR_UNCOMMON, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_TECHLEVEL, PR_EXPERT, NA, NA, NULL); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); addot(OT_XRAYGOGGLES, "pair of xray goggles", "Bulky looking goggles which allow you to see through walls.", MT_METAL, 0.3, OC_TECH, SZ_TINY); addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_XRAYVIS, 2, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 60, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 60, RR_RARE, NULL); addflag(lastot->flags, F_TECHLEVEL, PR_EXPERT, NA, NA, NULL); addflag(lastot->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL); @@ -4121,13 +4124,13 @@ void initobjects(void) { addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GLYPH, NA, NA, NA, "!"); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 90, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addot(OT_EMPTYVIAL, "empty vial", "An empty glass vial.", MT_GLASS, 0.1, OC_MISC, SZ_TINY); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GLYPH, NA, NA, NA, "!"); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 82, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 82, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addot(OT_BROKENGLASS, "piece of broken glass", "Sharp shards of broken glass.", MT_GLASS, 0.1, OC_MISC, SZ_MINI); addflag(lastot->flags, F_STACKABLE, NA, NA, NA, NULL); @@ -4136,7 +4139,7 @@ void initobjects(void) { addflag(lastot->flags, F_GLYPH, NA, NA, NA, "^"); addflag(lastot->flags, F_SHARP, 1, 2, NA, NULL); addflag(lastot->flags, F_CRUSHABLE, SZ_MEDIUM, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 65, NA, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 65, NA, NULL); addflag(lastot->flags, F_NOSHATTER, B_TRUE, NA, NA, NULL); addot(OT_ICESHEET, "sheet of ice", "A large sheet of slippery ice.", MT_ICE, 0.5, OC_MISC, SZ_MEDIUM); addflag(lastot->flags, F_STACKABLE, NA, NA, NA, NULL); @@ -4263,6 +4266,7 @@ void initobjects(void) { addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GLYPH, C_BLUE, NA, NA, ","); addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); + addflag(lastot->flags, F_RARITY, H_SWAMP, 90, RR_FREQUENT, NULL); addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OBDIETEXT, NA, NA, NA, "evaporates"); addflag(lastot->flags, F_OBHP, 5, 5, NA, NULL); @@ -4277,6 +4281,7 @@ void initobjects(void) { addflag(lastot->flags, F_GLYPH, C_BROWN, NA, NA, "~"); addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 90, NA, NULL); + addflag(lastot->flags, F_RARITY, H_SWAMP, 90, RR_COMMON, NULL); addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DTIMMUNE, DT_WATER, NA, NA, NULL); addflag(lastot->flags, F_REDUCEMOVEMENT, 2, NA, NA, NULL); @@ -4289,8 +4294,9 @@ void initobjects(void) { addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GLYPH, C_BLUE, NA, NA, ","); addflag(lastot->flags, F_RARITY, H_VILLAGE, 100, RR_COMMON, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); - addflag(lastot->flags, F_RARITY, H_FOREST, 90, NA, NULL); + addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_FOREST, 90, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_SWAMP, 90, RR_FREQUENT, NULL); addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DTCONVERT, DT_COLD, NA, NA, "sheet of ice"); addflag(lastot->flags, F_DTCONVERT, DT_FIRE, NA, NA, "puff of steam"); @@ -4309,8 +4315,9 @@ void initobjects(void) { addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GLYPH, C_BLUE, NA, NA, "~"); addflag(lastot->flags, F_RARITY, H_VILLAGE, 100, RR_COMMON, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, NA, NULL); - addflag(lastot->flags, F_RARITY, H_FOREST, 85, NA, NULL); + addflag(lastot->flags, F_RARITY, H_DUNGEON, 70, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_FOREST, 85, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_SWAMP, 90, RR_FREQUENT, NULL); addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_DTCONVERT, DT_COLD, NA, NA, "sheet of ice"); addflag(lastot->flags, F_DTCONVERT, DT_FIRE, NA, NA, "cloud of steam"); @@ -4693,8 +4700,9 @@ void initobjects(void) { addot(OT_VINE, "entangling vine", "A living vine which grasps nearby creature", MT_SILK, 0.1, OC_EFFECT, SZ_HUMAN); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 82, NA, NULL); - addflag(lastot->flags, F_RARITY, H_FOREST, 90, NA, NULL); + addflag(lastot->flags, F_RARITY, H_DUNGEON, 82, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_FOREST, 90, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_SWAMP, 90, RR_COMMON, NULL); addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GLYPH, C_GREEN, NA, NA, "^"); addflag(lastot->flags, F_RESTRICTMOVEMENT, 30, B_TRUE, B_TRUE, NULL);// the value here will be filled in by the spell. @@ -4721,7 +4729,7 @@ void initobjects(void) { // armour objects // armour - multipart addot(OT_WETSUIT, "wetsuit", "Full-body rubber suit which provides good insulation from cold.", MT_RUBBER, 6, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESONMULTI, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); @@ -4736,7 +4744,7 @@ void initobjects(void) { // armour - body addot(OT_CHEFJACKET, "set of chef whites", "A large double-breasted white jacket. Its thick cotton cloth is resistant to heat.", MT_CLOTH, 2, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL); @@ -4748,7 +4756,7 @@ void initobjects(void) { killflagsofid(lastot->flags, F_DTVULN); addot(OT_COTTONSHIRT, "cotton shirt", "A comfortable white cotton shirt.", MT_CLOTH, 0.7, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); @@ -4759,7 +4767,7 @@ void initobjects(void) { addot(OT_ARMOURDEMON, "demonskin vest", "Body armour created by flaying the flesh from a living demon, it retains its innate immunity to fire.", MT_FLESH, 7, OC_ARMOUR, SZ_MEDIUM); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 5, NA, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_ARMOURPENALTY, 10, 10, NULL); @@ -4770,7 +4778,7 @@ void initobjects(void) { addflag(lastot->flags, F_CRITPROTECTION, 80, NA, NA, NULL); addflag(lastot->flags, F_STARTBLESSED, B_CURSED, NA, NA, NULL); addot(OT_ARMOURLEATHER, "leather armour", "Body armour created from soft leather.", MT_LEATHER, 10, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 4, NA, NA, NULL); @@ -4779,7 +4787,7 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_STR, 3, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 95, NA, NA, NULL); addot(OT_ARMOURRING, "suit of ring mail", "Body armour formed by a series of metallic rings sewn to a leather foundation.", MT_METAL, 15, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 6, NA, NA, NULL); @@ -4788,7 +4796,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_ARMOURSCALE, "suit of scale armour", "Body armour consisting of many small scales attached to leather.", MT_METAL, 20, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 10, NA, NA, NULL); @@ -4797,7 +4805,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 35, 35, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_ARMOURCHAIN, "suit of chainmail", "Heavy body armour consisting of tightly meshed metal rings.", MT_METAL, 25, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 15, NA, NA, NULL); @@ -4806,7 +4814,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 45, 45, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_ARMOURSPLINT, "suit of splint mail", "Heavy armour, consisting of strips of metal attached to a leather backing.", MT_METAL, 35, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 20, NA, NA, NULL); @@ -4815,7 +4823,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 50, 50, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_ARMOURPLATE, "suit of plate mail", "Heavy armour with embedded metal plates.", MT_METAL, 40, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 90, RR_RARE, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 25, NA, NA, NULL); @@ -4825,7 +4833,7 @@ void initobjects(void) { addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_FLAKJACKET, "flak jacket", "Heavy metal body armour. Designed to stop a bullet, but ineffective against melee attacks.", MT_METAL, 30, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 2, NA, NA, NULL); @@ -4834,7 +4842,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 3, 3, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_OVERALLS, "pair of overalls", "Well-made, brightly coloured workman overalls.", MT_CLOTH, 1, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_LEGS, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 2, NA, NA, NULL); @@ -4842,7 +4850,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 10, 10, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 85, NA, NA, NULL); addot(OT_SILKSHIRT, "silk shirt", "A lightweight, comfortable white silk shirt.", MT_SILK, 0.5, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); @@ -4851,14 +4859,14 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_AGI, 3, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 50, NA, NA, NULL); addot(OT_ROBE, "robe", "A plain robe.", MT_CLOTH, 4, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); addflag(lastot->flags, F_OBHP, 10, 10, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 70, NA, NA, NULL); addot(OT_VELVETROBE, "velvet robe", "A luxurious velvet robe.", MT_CLOTH, 4, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 90, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 90, RR_UNCOMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_BODY, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); @@ -4868,7 +4876,7 @@ void initobjects(void) { // armour - shoulders addot(OT_CLOAK, "cloak", "A standard leather cloak.", MT_LEATHER, 4, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SHOULDERS, NA, NA, NULL); @@ -4877,7 +4885,7 @@ void initobjects(void) { addflag(lastot->flags, F_WATERPROOF, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_HELPSREST, 5, NA, NA, NULL); addot(OT_APRON, "apron", "A sturdy rubber apron, designed to protect against stains.", MT_RUBBER, 2, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SHOULDERS, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); @@ -4886,14 +4894,14 @@ void initobjects(void) { addflag(lastot->flags, F_CRITPROTECTION, 80, NA, NA, NULL); // armour - waist addot(OT_BELTLEATHER, "leather belt", "A plain leather belt.", MT_LEATHER, 0.2, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_WAIST, NA, NA, NULL); addflag(lastot->flags, F_ATTREQ, A_AGI, 3, NA, NULL); addflag(lastot->flags, F_OBHP, 2, 2, NA, NULL); // armour - legs addot(OT_CLOTHTROUSERS, "pair of cloth trousers", "A rough pair of cloth trousers.", MT_CLOTH, 2, OC_ARMOUR, SZ_MEDIUM); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_LEGS, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); @@ -4902,7 +4910,7 @@ void initobjects(void) { addflag(lastot->flags, F_CRITPROTECTION, 60, NA, NA, NULL); addot(OT_RIDINGTROUSERS, "pair of riding trousers", "A fitted pair of leather trousers.", MT_LEATHER, 2, OC_ARMOUR, SZ_MEDIUM); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_LEGS, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 2, NA, NA, NULL); @@ -4910,7 +4918,7 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_AGI, 3, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 75, NA, NA, NULL); addot(OT_COMBATPANTS, "pair of combat pants", "An lightly-armoured pair of camoflauged trousers.", MT_CLOTH, 2, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_LEGS, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 3, NA, NA, NULL); @@ -4918,7 +4926,7 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_AGI, 3, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 90, NA, NA, NULL); addot(OT_GREAVES, "set of greaves", "A set of heavy metal greaves.", MT_METAL, 4, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_GOESON, BP_LEGS, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 4, NA, NA, NULL); @@ -4929,7 +4937,7 @@ void initobjects(void) { addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); // armour - feet addot(OT_SANDALS, "pair of sandals", "Comfortable pair of open leather sandals.", MT_LEATHER, 1, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_FEET, NA, NA, NULL); @@ -4937,7 +4945,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 1, 1, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 30, NA, NA, NULL); addot(OT_SHOESLEATHER, "pair of leather shoes", "Cheap and rather uncomfortable leather shoes.", MT_LEATHER, 2, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_FEET, NA, NA, NULL); @@ -4946,7 +4954,7 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_AGI, 7, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 85, NA, NA, NULL); addot(OT_BOOTSRUBBER, "pair of rubber boots", "A waterproof (but somewhat cumbersome) pair of rubber boots.", MT_RUBBER, 6, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_FEET, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); @@ -4956,7 +4964,7 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_AGI, 3, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 95, NA, NA, NULL); addot(OT_BOOTSSPIKED, "pair of spiked boots", "A plain pair of leather boots with spikes on the bottom.", MT_LEATHER, 3, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL); addflag(lastot->flags, F_GOESON, BP_FEET, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 2, NA, NA, NULL); @@ -4965,7 +4973,7 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_AGI, 7, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 90, NA, NA, NULL); addot(OT_BOOTSLEATHER, "pair of leather boots", "A stout pair of leather boots.", MT_LEATHER, 4, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_FEET, NA, NA, NULL); @@ -4974,7 +4982,7 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_AGI, 7, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 90, NA, NA, NULL); addot(OT_BOOTSMETAL, "pair of metal boots", "A strong pair of metal boots.", MT_METAL, 5, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_RARE, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_FEET, NA, NA, NULL); @@ -4984,7 +4992,7 @@ void initobjects(void) { addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); // armour - gloves addot(OT_GLOVESCLOTH, "pair of cloth gloves", "A pair of soft cloth gloves.", MT_CLOTH, 0.15, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_HANDS, NA, NA, NULL); @@ -4993,7 +5001,7 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_AGI, 3, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 70, NA, NA, NULL); addot(OT_GLOVESLEATHER, "pair of leather gloves", "A pair of coarse leather gloves.", MT_LEATHER, 0.25, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HANDS, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); @@ -5001,7 +5009,7 @@ void initobjects(void) { addflag(lastot->flags, F_ATTREQ, A_AGI, 3, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 90, NA, NA, NULL); addot(OT_GAUNTLETS, "pair of gauntlets", "A durable pair of metal gauntlets.", MT_METAL, 2, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HANDS, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 2, NA, NA, NULL); @@ -5011,21 +5019,21 @@ void initobjects(void) { addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); // armour - head addot(OT_SUNHAT, "sun hat", "Wide-brimmed hat made for working in the sun.", MT_CLOTH, 1, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); addflag(lastot->flags, F_OBHP, 3, 3, NA, NULL); addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addot(OT_PIRATEHAT, "tricorne", "A three cornered hat with a skull and crossbones emblem.", MT_CLOTH, 1, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); addflag(lastot->flags, F_OBHP, 2, 2, NA, NULL); addflag(lastot->flags, F_SCARY, 2, NA, NA, NULL); addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addot(OT_BALACLAVA, "balaclava", "A form of cloth headgear that covers the whole head, exposing only the eyes.", MT_CLOTH, 1, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL); @@ -5033,7 +5041,7 @@ void initobjects(void) { addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_ANONYMOUS, NA, NA, NULL); addot(OT_CAP, "cap", "Close-fitting headwear with a short shade visor at the front.", MT_CLOTH, 1, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); @@ -5041,14 +5049,14 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 3, 3, NA, NULL); addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addot(OT_CHEFHAT, "toque", "A tall white hat with no brim. Commonly worn by professional cooks.", MT_CLOTH, 1, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); addflag(lastot->flags, F_OBHP, 3, 3, NA, NULL); addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addot(OT_GASMASK, "gas mask", "A full face mask which protects the wearer from toxic gasses.", MT_METAL, 3.5, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 2, NA, NA, NULL); addflag(lastot->flags, F_ACCURACYMOD, -10, NA, NA, NULL); @@ -5058,13 +5066,13 @@ void initobjects(void) { addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 65, NA, NA, NULL); addot(OT_HELM, "helmet", "A plain metal helmet.", MT_METAL, 2, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 3, NA, NA, NULL); addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_HELMFOOTBALL, "football helmet", "A metal helmet with a grill in front of the face.", MT_METAL, 1, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_MULTISIZE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 2, NA, NA, NULL); @@ -5073,13 +5081,13 @@ void initobjects(void) { addflag(lastot->flags, F_EQUIPCONFER, F_VISRANGEMOD, -1, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_GOLDCROWN, "golden crown", "A heavy gold crown, encrusted with jewels.", MT_GOLD, 5, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 25, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 25, RR_RARE, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); addflag(lastot->flags, F_OBHP, 10, 10, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 33, NA, NA, NULL); addot(OT_HELMBONE, "bone helmet", "Scary-looking helmet made from the bones of an animal (?).", MT_BONE, 1, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 2, NA, NA, NULL); @@ -5087,7 +5095,7 @@ void initobjects(void) { addflag(lastot->flags, F_SCARY, 4, NA, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_POINTYHAT, "wizard hat", "A foot-long brimmed conical hat, inscribed with strange symbols.", MT_CLOTH, 1, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 1, NA, NA, NULL); addflag(lastot->flags, F_OBHP, 3, 3, NA, NULL); @@ -5097,7 +5105,7 @@ void initobjects(void) { // armour - ears addot(OT_EARPLUGS, "set of earplugs", "A pair of cloth plugs designed to give the wearer a peaceful night's sleep. ", MT_CLOTH, 0.01, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_GOESON, BP_EARS, NA, NA, NULL); addflag(lastot->flags, F_OBHP, 1, 1, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_DEAF, NA, NA, NULL); @@ -5105,7 +5113,7 @@ void initobjects(void) { // armour - eyes addot(OT_SAFETYGLASSES, "pair of safety goggles", "A plastic eyemask designed for protection.", MT_PLASTIC, 0.01, OC_ARMOUR, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL); @@ -5113,7 +5121,7 @@ void initobjects(void) { addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_SPECTACLES, "pair of spectacles", "Eyewear with special lenses to enhance your vision.", MT_GLASS, 0.01, OC_ARMOUR, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL); @@ -5122,7 +5130,7 @@ void initobjects(void) { addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_SUNGLASSES, "pair of sunglasses", "Tinted eyewear to protect against sunlight.", MT_GLASS, 0.01, OC_ARMOUR, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_COMMON, NULL); addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL); addflag(lastot->flags, F_ARMOURRATING, 0, NA, NA, NULL); @@ -5133,7 +5141,7 @@ void initobjects(void) { addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL); addot(OT_EYEPATCH, "eyepatch", "A small patch of black material which covers one eye. Scary looking.", MT_CLOTH, 0.01, OC_ARMOUR, SZ_TINY); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_RARITY, H_FOREST, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_GOESON, BP_EYES, NA, NA, NULL); addflag(lastot->flags, F_NOQUALITY, B_TRUE, NA, NA, NULL); @@ -5143,32 +5151,32 @@ void initobjects(void) { // armour - shields addot(OT_BUCKLER, "buckler", "A small, unobtrusive wooden shield.", MT_WOOD, 3.00, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 5, NA, NULL); addflag(lastot->flags, F_OBHP, 20, 20, NA, NULL); // similar to a buckler, but repairable, lighter, and less durable addot(OT_SHIELDHIDE, "hide shield", "A small shield constructed out of animal skin.", MT_LEATHER, 2.00, OC_ARMOUR, SZ_SMALL); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL); addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 5, NA, NULL); addflag(lastot->flags, F_OBHP, 18, 18, NA, NULL); addot(OT_SHIELD, "shield", "A medium-sized metal shield.", MT_METAL, 4.00, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 15, NA, NULL); addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL); addot(OT_SHIELDLARGE, "large shield", "A large (if somewhat cumbersome) shield.", MT_METAL, 6.00, OC_ARMOUR, SZ_MEDIUM); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_UNCOMMON, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL); addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 20, NA, NULL); addflag(lastot->flags, F_OBHP, 40, 40, NA, NULL); addot(OT_SHIELDTOWER, "tower shield", "An enormous but very cumbersome shield.", MT_METAL, 11.00, OC_ARMOUR, SZ_HUMAN); - addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL); + addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL); addflag(lastot->flags, F_SHIELD, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_GOESON, BP_SECWEAPON, NA, NA, NULL); addflag(lastot->flags, F_EQUIPCONFER, F_SHIELDPENALTY, 30, NA, NULL); @@ -5489,7 +5497,7 @@ void initobjects(void) { addot(OT_SHURIKEN, "shuriken", "A sharpened star-shaped piece of metal, made for throwing.", MT_METAL, 1, OC_MISSILE, SZ_SMALL); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, ""); addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, ""); - addflag(lastot->flags, F_MISSILEDAM, 3, NA, NA, ""); + addflag(lastot->flags, F_MISSILEDAM, 4, NA, NA, ""); addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, NA, ""); addflag(lastot->flags, F_NUMAPPEAR, 1, 3, NA, ""); addflag(lastot->flags, F_CANBEDIFFMAT, MT_SILVER, 15, NA, NULL); @@ -5522,6 +5530,7 @@ void initobjects(void) { addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL); addflag(lastot->flags, F_DAM, DT_CHOP, 7, NA, NULL); addflag(lastot->flags, F_ACCURACY, 85, NA, NA, NULL); + addflag(lastot->flags, F_MISSILEDAM, 5, NA, NA, NULL); addflag(lastot->flags, F_THROWMISSILE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_USESSKILL, SK_AXES, NA, NA, NULL); addflag(lastot->flags, F_ATTREQ, A_STR, 7, NA, NULL); @@ -5996,7 +6005,7 @@ void initobjects(void) { addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); addflag(lastot->flags, F_FIREARM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_FIRESPEED, 8, NA, NA, NULL); + addflag(lastot->flags, F_FIRESPEED, 6, NA, NA, NULL); addflag(lastot->flags, F_ACCURACY, 80, NA, NA, NULL); addflag(lastot->flags, F_RANGE, 5, NA, NA, NULL); addflag(lastot->flags, F_AMMOOB, OT_ARROW, NA, NA, NULL); @@ -6009,7 +6018,7 @@ void initobjects(void) { addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); addflag(lastot->flags, F_FIREARM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_FIRESPEED, 15, NA, NA, NULL); + addflag(lastot->flags, F_FIRESPEED, 10, NA, NA, NULL); addflag(lastot->flags, F_ACCURACY, 80, NA, NA, NULL); addflag(lastot->flags, F_RANGE, 10, NA, NA, NULL); addflag(lastot->flags, F_AMMOOB, OT_BOLT, NA, NA, NULL); @@ -6021,7 +6030,7 @@ void initobjects(void) { addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); addflag(lastot->flags, F_FIREARM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_FIRESPEED, 8, NA, NA, NULL); + addflag(lastot->flags, F_FIRESPEED, 5, NA, NA, NULL); addflag(lastot->flags, F_ACCURACY, 75, NA, NA, NULL); addflag(lastot->flags, F_RANGE, 7, NA, NA, NULL); addflag(lastot->flags, F_AMMOOB, OT_BOLT, NA, NA, NULL); @@ -6032,7 +6041,7 @@ void initobjects(void) { addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); addflag(lastot->flags, F_FIREARM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_FIRESPEED, 12, NA, NA, NULL); + addflag(lastot->flags, F_FIRESPEED, 8, NA, NA, NULL); addflag(lastot->flags, F_ACCURACY, 80, NA, NA, NULL); addflag(lastot->flags, F_RANGE, 10, NA, NA, NULL); addflag(lastot->flags, F_AMMOOB, OT_ARROW, NA, NA, NULL); @@ -6046,7 +6055,7 @@ void initobjects(void) { addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); //addflag(lastot->flags, F_DAMTYPE, DT_BASH, NA, NA, NULL); //addflag(lastot->flags, F_DAM, 3, 4, NA, NULL); - addflag(lastot->flags, F_FIRESPEED, 20, NA, NA, NULL); + addflag(lastot->flags, F_FIRESPEED, 15, NA, NA, NULL); addflag(lastot->flags, F_ACCURACY, 80, NA, NA, NULL); addflag(lastot->flags, F_RANGE, 10, NA, NA, NULL); addflag(lastot->flags, F_AMMOOB, OT_BULLET, NA, NA, NULL); @@ -6059,7 +6068,7 @@ void initobjects(void) { addflag(lastot->flags, F_FIREARM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_TWOHANDED, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_FIRESPEED, 30, NA, NA, NULL); + addflag(lastot->flags, F_FIRESPEED, 20, NA, NA, NULL); addflag(lastot->flags, F_ACCURACY, 80, NA, NA, NULL); addflag(lastot->flags, F_RANGE, 3, NA, NA, NULL); addflag(lastot->flags, F_AMMOOB, OT_BULLET, NA, NA, NULL); @@ -6070,7 +6079,7 @@ void initobjects(void) { addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, NA, NULL); addflag(lastot->flags, F_FIREARM, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_FIRESPEED, 6, NA, NA, NULL); + addflag(lastot->flags, F_FIRESPEED, 4, NA, NA, NULL); addflag(lastot->flags, F_ACCURACY, 70, NA, NA, NULL); addflag(lastot->flags, F_RANGE, 5, NA, NA, NULL); addflag(lastot->flags, F_AMMOOB, OT_STONE, NA, NA, NULL); @@ -6445,7 +6454,7 @@ void initrace(void) { // 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."); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL); addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_DEMANDSBRIBE, NA, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); @@ -6470,7 +6479,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_SKILLED, NA, NULL); addrace(R_BANDIT, "bandit", 75, '@', C_GREY, MT_FLESH, RC_HUMANOID, "Bandits prey on travellers, demanding cash in exchange for not beating them to a pulp."); addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); @@ -6762,7 +6771,8 @@ void initrace(void) { addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_VHIGH, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_VERYRARE, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "12d4+4"); addflag(lastrace->flags, F_ARMOURRATING, 8, NA, NA, NULL); @@ -6794,6 +6804,7 @@ void initrace(void) { addrace(R_BUGBEAR, "bugbear", 120, 'G', C_BROWN, MT_FLESH, RC_HUMANOID, "A huge goblinoid creature, similar to a hobgoblin but larger again, with a temperament to match."); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+5"); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); @@ -6844,6 +6855,7 @@ void initrace(void) { addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, ""); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4"); @@ -6906,6 +6918,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+3"); addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL); @@ -7075,6 +7088,7 @@ void initrace(void) { 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_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "8d4"); addflag(lastrace->flags, F_ARMOURRATING, 9, NA, NA, NULL); @@ -7108,6 +7122,7 @@ void initrace(void) { 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_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "10d4"); addflag(lastrace->flags, F_ARMOURRATING, 9, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); @@ -7142,6 +7157,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 87, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 87, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 87, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+3"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); @@ -7174,6 +7190,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 75, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 75, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 75, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+5"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); @@ -7204,6 +7221,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 70, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 70, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 70, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+7"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); @@ -7237,6 +7255,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 63, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 63, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 63, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+6"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); @@ -7266,6 +7285,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 73, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 73, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 73, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 1, 2, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+3"); @@ -7300,6 +7320,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 60, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 60, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 60, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 1, 2, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4+3"); @@ -7336,6 +7357,7 @@ void initrace(void) { addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 95, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 95, NA, NULL); addflag(lastrace->flags, F_POISONCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, ""); addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); @@ -7366,7 +7388,8 @@ void initrace(void) { addflag(lastrace->flags, F_POISONCORPSE, B_TRUE, 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, 78, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, 78, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 78, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL); @@ -7415,8 +7438,9 @@ void initrace(void) { addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_DUNGEON, 72, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_FOREST, 72, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, 72, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, 72, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "6d4"); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL); @@ -7476,6 +7500,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 60, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 66, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 66, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "7d4+0"); addflag(lastrace->flags, F_EVASION, -5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 11, NA, NA, NULL); @@ -7507,6 +7532,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 45, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 50, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 50, RR_VERYRARE, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "12d4+0"); addflag(lastrace->flags, F_ARMOURRATING, 11, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -7537,6 +7563,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 78, NA, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, 80, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 80, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+3"); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 5, NA, NA, NULL); @@ -7598,6 +7625,7 @@ void initrace(void) { addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, 57, NA, ""); addflag(lastrace->flags, F_RARITY, H_FOREST, 57, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 57, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_HIGH, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CON, AT_VHIGH, NA, NULL); @@ -7654,8 +7682,9 @@ void initrace(void) { 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_HUMAN, NA, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_DUNGEON, 72, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_FOREST, 75, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, 72, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_FOREST, 75, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, 72, RR_RARE, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4"); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, AT_HIGH, NA, NULL); @@ -7707,7 +7736,8 @@ void initrace(void) { addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "pool of slime"); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_DUNGEON, 80, NA, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, 80, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+0"); addflag(lastrace->flags, F_MOVESPEED, SP_VERYSLOW, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -7787,7 +7817,8 @@ void initrace(void) { 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_LARGE, NA, NA, NULL); - addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+0"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -7808,6 +7839,7 @@ void initrace(void) { 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_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+0"); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -7828,6 +7860,7 @@ void initrace(void) { addrace(R_CRAB, "giant crab", 150, ';', C_ORANGE, MT_FLESH, RC_AQUATIC, "A massive orange crab with sharp pincers."); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 20, NA, NA, NULL); // very high armour addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+4"); @@ -7850,6 +7883,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL); addflag(lastrace->flags, F_ARMOURRATING, 15, NA, NA, NULL); // high armour addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+4"); @@ -7882,6 +7916,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4"); addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -7903,6 +7938,7 @@ void initrace(void) { addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+2"); addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, NULL); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); @@ -7924,6 +7960,7 @@ void initrace(void) { addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+0"); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -7945,6 +7982,7 @@ void initrace(void) { addflag(lastrace->flags, F_AWARENESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+0"); addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); @@ -7989,6 +8027,7 @@ void initrace(void) { addrace(R_DREAMFUNGUS, "dreamfungus", 0.5, 'F', C_MAGENTA, MT_PLANT, RC_PLANT, "A huge, spotty, purple mold which releases speed-inducing spores on the slightest contact."); 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_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HARMLESS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); @@ -8042,6 +8081,7 @@ void initrace(void) { addrace(R_BAT, "giant bat", 3, 'B', C_BROWN, MT_FLESH, RC_ANIMAL, "A larger (and more savage) version of your average household bat."); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); @@ -8065,6 +8105,7 @@ void initrace(void) { addrace(R_BATMUTATED, "mutated bat", 3, 'B', C_MAGENTA, MT_FLESH, RC_ANIMAL, "Bats exposed to toxic radiation become mutated, and their sonic navigation skills turn deadly."); 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_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); @@ -8525,6 +8566,7 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL); addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "3d4+1"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); addflag(lastrace->flags, F_NOBODYPART, BP_WEAPON, NA, NA, NULL); @@ -8591,6 +8633,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, ""); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "0d4+1"); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); @@ -8774,6 +8817,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOFLEE, B_TRUE, NA, NA, NULL); addrace(R_SNAKEWATER, "water snake", 3, 's', C_BLUE, MT_FLESH, RC_ANIMAL, "Aquatic snakes who can nevertheless exist quite happily on land. Non-venomous."); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_FREQUENT, NULL); addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_BREATHWATER, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL); @@ -9351,6 +9395,7 @@ void initrace(void) { addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d1+0"); addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); @@ -9361,7 +9406,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOBODYPART, BP_HANDS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "buzzes angrily^an angry buzzing"); - addflag(lastrace->flags, F_NOISETEXT, N_FLY, 2, NA, "^buzzing"); + addflag(lastrace->flags, F_NOISETEXT, N_FLY, 1, NA, "^buzzing"); addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_CORPSE, B_COVETS, NA, NULL); @@ -9379,6 +9424,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+3"); addflag(lastrace->flags, F_EVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); @@ -9390,7 +9436,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOBODYPART, BP_LEGS, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 2, NA, "buzzes angrily^an angry buzzing"); - addflag(lastrace->flags, F_NOISETEXT, N_FLY, 2, NA, "^buzzing"); + addflag(lastrace->flags, F_NOISETEXT, N_FLY, 1, NA, "^buzzing"); addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL); addflag(lastrace->flags, F_WANTS, OT_CORPSE, B_COVETS, NA, NULL); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); @@ -9405,6 +9451,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+1"); addflag(lastrace->flags, F_ENHANCESMELL, 2, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); @@ -9428,6 +9475,7 @@ void initrace(void) { addrace(R_CENTIPEDE, "giant centipede", 3, 'w', C_GREEN, MT_FLESH, RC_INSECT, "Giant centipedes are long, many-legged creatures with a poisonous bite."); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_INSECT, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL); @@ -9457,6 +9505,7 @@ void initrace(void) { addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+0"); addflag(lastrace->flags, F_EVASION, 60, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_ZAPPER, 1, NA, NULL); @@ -9470,7 +9519,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_PRODUCESLIGHT, 2, NA, NA, NULL); addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL); - addflag(lastrace->flags, F_NOISETEXT, N_FLY, 2, NA, "^buzzing"); + addflag(lastrace->flags, F_NOISETEXT, N_FLY, 1, NA, "^buzzing"); addflag(lastrace->flags, F_DEAF, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL); @@ -9559,6 +9608,7 @@ void initrace(void) { addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL); addflag(lastrace->flags, F_STARTATT, A_CON, NA, NA, "6"); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL); addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, NULL); @@ -9647,7 +9697,8 @@ void initrace(void) { addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_FLYING, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_RARE, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TOUCHCHILL, 4, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "5d4+2"); @@ -9671,6 +9722,7 @@ void initrace(void) { addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL); + addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL); addflag(lastrace->flags, F_STENCH, 3, 1, NA, NULL); addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "4d4+2"); @@ -10222,11 +10274,11 @@ void initskills(void) { if (isweaponskill(sk->id) || (sk->id == SK_UNARMED)) { addskilldesc(sk->id, PR_INEPT, "This skill increases your accuracy and damage when using matching weapons.", B_FALSE); addskilldesc(sk->id, PR_NOVICE, "^g-2 accuracy penalty.^n", B_FALSE); - addskilldesc(sk->id, PR_BEGINNER, "^g-1 accuracy penalty, +10% damage bonus^n", B_FALSE); - addskilldesc(sk->id, PR_ADEPT, "^g+20% damage bonus.^n", B_FALSE); - addskilldesc(sk->id, PR_SKILLED, "^g+2 accuracy, +30% damage bonus.^n", B_FALSE); - addskilldesc(sk->id, PR_EXPERT, "^g+4 accuracy, +40% damage bonus.^n", B_FALSE); - addskilldesc(sk->id, PR_MASTER, "^g+6 accuracy, +50%% damage bonus, combination strike ability.^n", B_FALSE); + addskilldesc(sk->id, PR_BEGINNER, "^g-1 accuracy penalty^n", B_FALSE); + addskilldesc(sk->id, PR_ADEPT, "^g+10% damage bonus.^n", B_FALSE); + addskilldesc(sk->id, PR_SKILLED, "^g+2 accuracy, +20% damage bonus.^n", B_FALSE); + addskilldesc(sk->id, PR_EXPERT, "^g+4 accuracy, +30% damage bonus.^n", B_FALSE); + addskilldesc(sk->id, PR_MASTER, "^g+6 accuracy, +40%% damage bonus, combination strike ability.^n", B_FALSE); } } } diff --git a/data/hiscores.db b/data/hiscores.db index 0bd9d3396faaec516cefda96a2476c5b58c9e0a9..1826b6f29f1e560aef8e7c71f80b7672f9a9e9d2 100644 GIT binary patch delta 582 zcmXw!O>7cT5XWcUuzXesMTNFt7Nsacw-#FHK^u+7Hl|GvMorUFp)H6kt{|QiZjBza zc_w%+=>$#C1Z(n- z=C4M9fWZoXZdu>P!Jw;a>=p>TX7!o=X_Y^-E(X(E-Map~YV1TAXA zF=_T#VG3xSf^3sLVaKqHHh2#=VM_ISZXniqqifEHhBA_X3=dMS4w3G)=v% z#jY|x{=gNi;3&G`3p)w7AthT;W6Z`-(g}c43HbggiTC<+NB%DoRFH zq><{N5zrMrKE@yI_x0w*^uPG$1*VlJ6aoz3LaVo^yJq`_)b|LO>~_}kDf`>dQR zit?OzUM}TRlIrd|inhLLOlM;7OJlgtZsJ#@*pBwyhDbH8_XY$-UnQ=sBFrzyrJTAc GIq@&UQjiP) delta 463 zcmXYrO=uGV5QS&vCEILb6RLqtY>G`bMgr}oO{n!Cf_f5vPzoL@(r&S0D={ji5f74H zO3{Os5$Z)~3VIQQxLCm-(2JtbfSPI@MC&PCCw(R_yxCq(JAJFQ+9Yzo8h!xE|^{`F%n6|=qzC!1=)~i zazZSwbBsRGJuj2G%RH^E^!d=x5re$$ojaRG?mg~St2OtM9<-Cj O^;&geYSPtext, '^'); - msg("^%c%s%s %s!", getlfcol(lf, CC_VBAD), lfname, getpossessive(lfname), buf); - donesomething = B_TRUE; + if (isplayer(lf) || !lfhasflag(lf, F_FEIGNINGDEATH)) { + p = readuntil(buf, f->text, '^'); + msg("^%c%s%s %s!", getlfcol(lf, CC_VBAD), lfname, getpossessive(lfname), buf); + donesomething = B_TRUE; + } break; case F_INVISIBLE: if (isplayer(lf)) { @@ -3621,6 +3623,17 @@ void docomms(lifeform_t *lf) { o = askobject(player->pack, buf, &count, AO_NONE); if (o) { if (o->type->id == OT_GOLD) { + char countbuf[BUFLEN]; + // ask how much! + + snprintf(buf, BUFLEN, "How much money will you give to %s (0-%d)", + lfname, countmoney(player->pack)); + askstring(buf, '?', countbuf, BUFLEN, NULL); + count = atoi(buf); + if (!count) { + msg("Cancelled."); + return; + } getobname(o, buf, count); givemoney(player, lf, count); msg("You give %s to %s.", buf, lfname); @@ -3637,7 +3650,7 @@ void docomms(lifeform_t *lf) { if (givenob) { if ((lf->race->id == R_BEGGAR) && (givenob->type->id == OT_GOLD)) { // begger effects - if (countmoney(lf->pack) == 1) { + if (!countmoney(lf->pack)) { i = rnd(1,100); if (i <= 5) { // attack you sayphrase(lf, SP_BEGATTACK, SV_SHOUT, NA, NULL); diff --git a/lf.c b/lf.c index 578ad11..9f100fe 100644 --- a/lf.c +++ b/lf.c @@ -2956,7 +2956,7 @@ int eat(lifeform_t *lf, object_t *o) { } } // limit - if (nutrition > (HUNGERCONST/4)) nutrition = (HUNGERCONST/4); + if (nutrition > (HUNGERCONST/3)) nutrition = (HUNGERCONST/3); rawmeat = B_TRUE; } } @@ -3203,7 +3203,7 @@ int eat(lifeform_t *lf, object_t *o) { // end of turn effects void endlfturn(lifeform_t *lf) { // lf will complain if in pain - if (isbleeding(lf) && onein(3)) { + if (isbleeding(lf) && onein(3) && !hasflag(lf->flags, F_ASLEEP)) { // TODO: replace 4 if (ispetof(lf, player)) { if (!canhear(player, lf->cell, 4)) { @@ -5987,10 +5987,6 @@ int getnoisedetails(lifeform_t *lf, enum NOISETYPE nid, char *heartext, if (nid == N_WALK) { *volume += getarmournoise(lf); } - if (lfhasflag(lf, F_SNEAK)) { - *volume -= 2; - limit(volume, 1, NA); - } return B_FALSE; } else { // some defaults @@ -6036,7 +6032,7 @@ int getnoisedetails(lifeform_t *lf, enum NOISETYPE nid, char *heartext, if (volume) *volume += getarmournoise(lf); if (heartext) strcpy(heartext, movetext); if (lfhasflag(lf, F_SNEAK)) { - *volume -= 2; + (*volume)--; limit(volume, 1, NA); } return B_FALSE; @@ -6840,16 +6836,18 @@ int getracerarity(map_t *map, enum RACE rid) { int rarity = -1; r = findrace(rid); if (r) { - flag_t *f; + flag_t *f = NULL; - f = hasflagval(r->flags, F_RARITY, H_ALL, NA, NA, NULL); - if (!f) { - if (map) { - f = hasflagval(r->flags, F_RARITY, map->habitat->id, NA, NA, NULL); - } else { - f = hasflagval(r->flags, F_RARITY, NA, NA, NA, NULL); - } + if (map) { + f = hasflagval(r->flags, F_RARITY, map->habitat->id, NA, NA, NULL); } + if (!f) { + f = hasflagval(r->flags, F_RARITY, H_ALL, NA, NA, NULL); + } + /*if (!f) { + f = hasflagval(r->flags, F_RARITY, NA, NA, NA, NULL); + }*/ + if (f) { // ignore habitat for now! @@ -6929,10 +6927,11 @@ enum BODYPART getrandomcorebp(lifeform_t *lf) { } race_t *getrandomcorpserace(cell_t *c) { - race_t *r; - r = getrandomrace(c, NA); - while (hasflag(r->flags, F_NOCORPSE)) { - r = getrandomrace(c, NA); + race_t *r = NULL; + + while (!r || (hasflag(r->flags, F_NOCORPSE))) { + if (c) r = getrandomrace(c, NA); + else r = getreallyrandomrace(RC_ANY); } return r; } @@ -6987,7 +6986,7 @@ race_t *getrandomrace(cell_t *c, int forcedepth) { int db = B_FALSE; int depth; int hdmin,hdmax; - enum RARITY wantrr = RR_COMMON; + enum RARITY wantrr = RR_FREQUENT; // determine rarity of lf to generate if (forcedepth != NA) { @@ -7018,14 +7017,15 @@ race_t *getrandomrace(cell_t *c, int forcedepth) { valid = B_FALSE; } else { // correct rarity? - rarflag = hasflagval(r->flags, F_RARITY, H_ALL, NA, NA, NULL); - if (!rarflag) { - if (c) { - rarflag = hasflagval(r->flags, F_RARITY, c->habitat->id, NA, NA, NULL); - } else { - rarflag = hasflagval(r->flags, F_RARITY, NA, NA, NA, NULL); - } + if (c) { + rarflag = hasflagval(r->flags, F_RARITY, c->habitat->id, NA, NA, NULL); } + if (!rarflag) { + rarflag = hasflagval(r->flags, F_RARITY, H_ALL, NA, NA, NULL); + } + /*if (!rarflag) { + rarflag = hasflagval(r->flags, F_RARITY, NA, NA, NA, NULL); + }*/ if (rarflag) { if ((rarflag->val[2] == NA) || (rarflag->val[2] <= wantrr)) { @@ -7488,34 +7488,24 @@ char *getskilllevelname(enum SKILLLEVEL sl) { // ie. 4 = 64km/h // ie. 5 = 125km/h // ie. 10 = 1000km/h -int getthrowspeed(int str) { +int getthrowspeed(lifeform_t *lf) { enum ATTRBRACKET sb; int speed = 0; - sb = getattrbracket(str, A_STR, NULL); + + // ie. 1 - 4 + speed = (getskill(lf, SK_THROWING) / 3) + 1; + + sb = getattrbracket(getattr(lf, A_STR), A_STR, NULL); switch (sb) { - case AT_EXLOW: - case AT_VLOW: - speed = 1; - break; - case AT_LOW: - case AT_LTAVERAGE: - speed = 2; - break; - case AT_AVERAGE: - speed = 3; - break; - case AT_GTAVERAGE: - case AT_HIGH: - speed = 4; + default: break; case AT_VHIGH: - speed = 5; + speed++; break; - default: case AT_EXHIGH: - speed = 6; + speed += 2; break; - // gun is 10 + // gun is 15 } return speed; } @@ -10498,9 +10488,9 @@ void applylfdammod(int *dam, lifeform_t *lf, object_t *wep) { // extra damage for being skilled? slev = getweaponskill(lf, wep); - if (slev > 1) { + if (slev >= 3) { float pctextra; - pctextra = ((slev - 1) * 10); + pctextra = ((slev - 2) * 10); *dam += pctof(pctextra, *dam); } } @@ -12620,6 +12610,12 @@ int recruit(lifeform_t *lf) { } if (askingprice != 0) { + // modify for same job + if (getjob(player) == getjob(lf)) { + askingprice = pctof(50, askingprice); + } else if (player->race->baseid == lf->race->baseid) { // modify for same race + askingprice = pctof(80, askingprice); + } // modify by charisma askingprice = pctof(100 - getstatmod(player, A_CHA), askingprice); limit(&askingprice, 0, NA); @@ -13008,29 +13004,29 @@ int say(lifeform_t *lf, char *text, int volume) { int sayphrase(lifeform_t *lf, enum SAYPHRASE what, int volume, int val0, char *text) { int i,rv = B_FALSE; char buf[BUFLEN]; + char *p; switch (what) { case SP_ALLY_ATTACK: - if (cansee(player, lf)) { - switch (rnd(1,3)) { - case 1: snprintf(buf, BUFLEN, "I'm attacking %s!", text); break; - case 2: snprintf(buf, BUFLEN, "%s is mine!", text); - buf[0] = toupper(buf[0]); - break; - case 3: snprintf(buf, BUFLEN, "I'll take care of %s!", text); break; - } - } else { - char *p; - p = strdup(text); - strrep(p, "the ","a ", NULL); - switch (rnd(1,3)) { - case 1: snprintf(buf, BUFLEN, "There's %s over here!", p); break; - case 2: snprintf(buf, BUFLEN, "I'm attacking %s!", p); break; - case 3: snprintf(buf, BUFLEN, "Beware %s!", p); break; - } - free(p); + switch (rnd(1,3)) { + case 1: snprintf(buf, BUFLEN, "I'm attacking %s!", text); break; + case 2: snprintf(buf, BUFLEN, "%s is mine!", text); + buf[0] = toupper(buf[0]); + break; + case 3: snprintf(buf, BUFLEN, "I'll take care of %s!", text); break; } rv = say(lf, buf, volume); break; + case SP_ALLY_ATTACKUNSEEN: + p = strdup(text); + strrep(p, "the ","a ", NULL); + switch (rnd(1,3)) { + case 1: snprintf(buf, BUFLEN, "There's %s over here!", p); break; + case 2: snprintf(buf, BUFLEN, "I'm attacking %s!", p); break; + case 3: snprintf(buf, BUFLEN, "Beware %s!", p); break; + } + free(p); + rv = say(lf, buf, volume); + break; case SP_ALLY_INPAIN: switch (rnd(1,3)) { case 1: snprintf(buf, BUFLEN, "I'm hurting here!"); break; @@ -15415,7 +15411,7 @@ int throwat(lifeform_t *thrower, object_t *o, cell_t *where) { return B_TRUE; } taketime(thrower, getactspeed(thrower)); - return fireat(thrower, o, 1, where, getthrowspeed(getattr(thrower, A_STR)), NULL); + return fireat(thrower, o, 1, where, getthrowspeed(thrower), NULL); } // lf effects which happen every xx ticks @@ -15991,7 +15987,7 @@ int usestairs(lifeform_t *lf, object_t *o, int onpurpose, int climb) { } // check noone is in the way - if (movelfsoutofway(newcell)) { + if (movelfsoutofway(newcell) || !cellwalkable(lf, newcell, NULL)) { // TODO: handle this differently - ie always allow the player // go there? if (isplayer(lf)) msg("The stairs seem to be blocked."); diff --git a/lf.h b/lf.h index 8c56c7e..94d17e4 100644 --- a/lf.h +++ b/lf.h @@ -227,7 +227,7 @@ float getstatmod(lifeform_t *lf, enum ATTRIB att); char *getskilldesc(enum SKILL id ); char *getskillname(enum SKILL id ); char *getskilllevelname(enum SKILLLEVEL sl); -int getthrowspeed(int str); +int getthrowspeed(lifeform_t *lf); int getturnspeed(lifeform_t *lf); void getwantdistance(lifeform_t *lf, lifeform_t *victim, int *min, int *max, int attacking); object_t *getweapon(lifeform_t *lf); diff --git a/map.c b/map.c index ebbf820..d711f2a 100644 --- a/map.c +++ b/map.c @@ -1247,27 +1247,33 @@ int fix_reachability(map_t *m) { // any remaining non-filled empty cells? for (i = 0; i < m->w * m->h; i++) { if (!m->cell[i]->type->solid && !m->cell[i]->filled) { - int nadded = 0; - // found an unreachable cell! link it back to a filled cell. - if (db) dblog(" found unreachable area at %d,%d. will fix it.", - m->cell[i]->x, m->cell[i]->y); - - linkexit(m->cell[i], B_TRUE, &nadded); - - if (nadded) { - if (db) dblog(" fixed unreachable area by adding %d cells.", nadded); + vault_t *v; + v = getcellvault(m->cell[i]); + if (v && hasflag(v->flags, F_VAULTNOLINK)) { + // don't need to link it. } else { - // didn't add anything - fail! - if (db) dblog(" fix_reachability failed."); - return B_TRUE; + int nadded = 0; + // found an unreachable cell! link it back to a filled cell. + if (db) dblog(" found unreachable area at %d,%d. will fix it.", + m->cell[i]->x, m->cell[i]->y); + + linkexit(m->cell[i], B_TRUE, &nadded); + + if (nadded) { + if (db) dblog(" fixed unreachable area by adding %d cells.", nadded); + } else { + // didn't add anything - fail! + if (db) dblog(" fix_reachability failed."); + return B_TRUE; + } + + // now run the test again. + // 'c' will be where the next flood will will happen. + keepgoing = B_TRUE; + c = m->cell[i]; + nfixed++; + break; } - - // now run the test again. - // 'c' will be where the next flood will will happen. - keepgoing = B_TRUE; - c = m->cell[i]; - nfixed++; - break; } } } @@ -2074,7 +2080,14 @@ void createdungeon(map_t *map, int depth, map_t *parentmap, int exitdir, object_ // link up room exits for (i = 0; i < map->nrooms; i++) { + int wantlink = B_FALSE; if (!map->room[i].exitslinked) { + if (map->room[i].vault && hasflag(map->room[i].vault->flags, F_VAULTNOLINK)) { + } else { + wantlink = B_TRUE; + } + } + if (wantlink) { linkexits(map, map->room[i].id); } } @@ -2349,6 +2362,9 @@ void createhabitat(map_t *map, int depth, map_t *parentmap, int exitdir, object_ case H_FOREST: createforest(map, depth, parentmap, exitdir, entryob, rnd(0,5)); break; + case H_SWAMP: + createswamp(map, depth, parentmap, exitdir, entryob); + break; case H_VILLAGE: createforest(map, depth, parentmap, exitdir, entryob, 0); break; @@ -2647,10 +2663,18 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex if (db) dblog(" adding remembered region outline things..."); for (i = 0; i < nthings ;i++) { vault_t *v; + cell_t *c; // add this thing switch (thing[i]->whatkind) { case RT_HABITAT: // already handled above break; + case RT_OBJECT: + if (db) dblog(" adding forced regionthing object: %s", thing[i]->what); + c = getrandomroomcell(map, ANYROOM); + if (!c) c = getrandomcell(map); + c = real_getrandomadjcell(c, WE_WALKABLE, B_ALLOWEXPAND, LOF_DONTNEED, NULL); + addob(c->obpile, thing[i]->what); + break; case RT_REGIONLINK: if (db) dblog(" adding regionlink"); createregionlink(map, NULL, NULL, thing[i]->what, thing[i]->value, map->region); @@ -2915,6 +2939,33 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex if (db) dblog(" Map creation finished."); } +void createswamp(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob) { + int x,y; + cell_t *c; + object_t *o, *nexto; + + // first create a normal dungeon + createdungeon(map, depth, parentmap, exitdir, entryob); + + for (y = 0; y < map->h; y++) { + for (x = 0; x < map->w; x++) { + c = getcellat(map, x, y); + // replace all walls with water + if (c->type->solid) { + setcelltype(c, CT_LOWFLOOR); + addob(c->obpile, "very deep water"); + } + // remove all doors + for (o = c->obpile->first ; o ; o = nexto) { + nexto = o->next; + if (isdoor(o, NULL)) { + killob(o); + } + } + } + } +} + int createvault(map_t *map, int roomid, vault_t *v, int *retw, int *reth, int *retx, int *rety) { int w,h,x,y; int xmargin = DEF_VAULTMARGIN,ymargin = DEF_VAULTMARGIN; // defaults @@ -3019,7 +3070,9 @@ int createvault(map_t *map, int roomid, vault_t *v, int *retw, int *reth, int *r } // link up exits from this vault - linkexits(map, roomid); + if (!hasflag(v->flags, F_VAULTNOLINK)) { + linkexits(map, roomid); + } return B_FALSE; } @@ -4755,12 +4808,13 @@ object_t *hastrailof(obpile_t *op, lifeform_t *lf, enum OBTYPE oid, flag_t **tfl void initmap(void) { int vx[4],vy[4],i; // habitats - // thingchance, obchance, vaultchance + // thingchance, obchance, vaultchance, maxvisrange addhabitat(H_DUNGEON, "dungeon", CT_CORRIDOR, CT_WALL, 3, 50, 30, 6); addhabitat(H_FOREST, "forest", CT_GRASS, CT_WALL, 3, 75, 0, MAXVISRANGE); addhabitat(H_HEAVEN, "heaven", CT_CORRIDOR, CT_WALL, 0, 0, 0, MAXVISRANGE); addhabitat(H_PIT, "pit", CT_CORRIDOR, CT_WALL, 0, 0, 0, 5); addhabitat(H_VILLAGE, "village", CT_GRASS, CT_WALL, 3, 70, 0, MAXVISRANGE); + addhabitat(H_SWAMP, "swamp", CT_CORRIDOR, CT_WALL, 3, 50, 0, MAXVISRANGE); // cell types addcelltype(CT_FAKE, "fake cell", '.', C_GREEN, B_EMPTY, B_TRANS, MT_STONE, 0); @@ -4813,10 +4867,26 @@ void initmap(void) { addregionthing(lastregionoutline, NA, vx[i], vy[i], RT_RNDVAULTWITHFLAG, F_VAULTISSHOP, NULL); } //vx = 0; vy = -1; + + addregionoutline(RG_FIRSTDUNGEON); addregionthing(lastregionoutline, 1, NA, NA, RT_RNDVAULTWITHFLAG, F_VAULTISPLAYERSTART, NULL); + // l6: jimbo's lair addregionthing(lastregionoutline, 6, NA, NA, RT_VAULT, NA, "jimbos_lair"); - addregionthing(lastregionoutline, 10, NA, NA, RT_RNDVAULTWITHFLAG, F_VAULTISSHRINE, NULL); // godstone on last floor + // l7 - 10: swamp + addregionthing(lastregionoutline, rnd(7,10), NA, NA, RT_HABITAT, H_SWAMP, NULL); + // l25: last level + addregionthing(lastregionoutline, 25, NA, NA, RT_RNDVAULTWITHFLAG, F_VAULTISSHRINE, NULL); // godstone on last floor + + // forced shops: + addregionthing(lastregionoutline, rnd(2,4), NA, NA, RT_OBJECT, NA, "random building"); + addregionthing(lastregionoutline, rnd(5,7), NA, NA, RT_OBJECT, NA, "random building"); + addregionthing(lastregionoutline, rnd(8,10), NA, NA, RT_OBJECT, NA, "random building"); + addregionthing(lastregionoutline, rnd(11,13), NA, NA, RT_OBJECT, NA, "random building"); + addregionthing(lastregionoutline, rnd(14,16), NA, NA, RT_OBJECT, NA, "random building"); + addregionthing(lastregionoutline, rnd(17,19), NA, NA, RT_OBJECT, NA, "random building"); + addregionthing(lastregionoutline, rnd(20,22), NA, NA, RT_OBJECT, NA, "random building"); + addregionthing(lastregionoutline, rnd(23,25), NA, NA, RT_OBJECT, NA, "random building"); } int isadjacent(cell_t *src, cell_t *dst) { @@ -5755,33 +5825,46 @@ int validateregions(void) { } int validateregionthing(regionthing_t *thing) { + cell_t fakecell; + map_t fakemap; + int goterrors = B_FALSE; + object_t *o; + createfakes(&fakemap, &fakecell); switch (thing->whatkind) { case RT_HABITAT: if (!findhabitat(thing->value)) { dblog("Invalid habitat %d specified in regionthing.", thing->value); - return B_TRUE; + goterrors = B_TRUE; + } + break; + case RT_OBJECT: + o = addob(fakecell.obpile, thing->what); + if (!o) { + dblog("Invalid object '%s' specified in regionthing.", thing->what); + goterrors = B_TRUE; } break; case RT_REGIONLINK: if (!findregiontype(thing->value)) { dblog("Invalid regionlink to regiontype %d specified in regionthing.", thing->value); - return B_TRUE; + goterrors = B_TRUE; } break; case RT_VAULT: if (!findvault(thing->what)) { dblog("Invalid rt_vault to vaulttype '%s' specified in regionthing.", thing->what); - return B_TRUE; + goterrors = B_TRUE; } break; case RT_RNDVAULTWITHFLAG: if (!findvaultwithflag(thing->value)) { dblog("Invalid rt_rndvaultwithflag specified in regionthing."); - return B_TRUE; + goterrors = B_TRUE; } break; } - return B_FALSE; + killfakes(&fakemap, &fakecell); + return goterrors; } int wallstoleftright(cell_t *c, int dir) { diff --git a/map.h b/map.h index 36e29fc..dbb34e1 100644 --- a/map.h +++ b/map.h @@ -57,6 +57,7 @@ void createregionlink(map_t *m, cell_t *c, object_t *o, char *obname, enum REGIO void createregionthing(map_t *map, regionthing_t *rt); void createriver(map_t *m); int createroom(map_t *map, int roomid, int overrideminw, int overrideminh, int xmargin, int ymargin, int *retx, int *rety, int *retw, int *reth, int doorpct, int forcewalls); +void createswamp(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob); int createvault(map_t *map, int roomid, vault_t *v, int *retw, int *reth, int *retx, int *rety); int dirtox(int dt, int dir); int dirtoy(int dt, int dir); diff --git a/nexus.c b/nexus.c index ecfbbe9..308fa6d 100644 --- a/nexus.c +++ b/nexus.c @@ -171,7 +171,7 @@ int main(int argc, char **argv) { job_t *j = NULL; race_t *startrace = NULL; char ch; - object_t *o; + //object_t *o; cell_t *where; int dir; flag_t *f; @@ -271,8 +271,10 @@ int main(int argc, char **argv) { addflag(player->flags, F_CANWILL, OT_A_PRAY, NA, NA, NULL); addflag(player->flags, F_CANWILL, OT_A_TRAIN, NA, NA, NULL); addflag(player->flags, F_CANWILL, OT_A_DEBUG, NA, NA, NULL); ///////// - o = hasob(where->obpile, OT_PLAYERSTART); - killob(o); + /*o = hasob(where->obpile, OT_PLAYERSTART); + killob(o);*/ + killallobs(where->obpile); + addobfast(where->obpile, OT_HOLEINROOF); user = getenv("USER"); if (user) { diff --git a/objects.c b/objects.c index 34db678..e1d1138 100644 --- a/objects.c +++ b/objects.c @@ -642,6 +642,10 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes p += strlen("silver "); donesomething = B_TRUE; // rarity + } else if (strstarts(p, "frequent ")) { + wantrarity = RR_FREQUENT; + p += strlen("frequent "); + donesomething = B_TRUE; } else if (strstarts(p, "common ")) { wantrarity = RR_COMMON; p += strlen("common "); @@ -1132,7 +1136,9 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes if (o->type->id == OT_TEMPLE) { lifeform_t *god; god = getrandomgod(); - addflag(o->flags, F_LINKGOD, god->race->id, NA, NA, NULL); + if (god) { + addflag(o->flags, F_LINKGOD, god->race->id, NA, NA, NULL); + } } // fill in door flags @@ -2797,7 +2803,7 @@ void dumpobrarity(void) { flag_t *f; int min,max; - for (rr = RR_COMMON; rr <= RR_VERYRARE; rr++) { + for (rr = RR_FREQUENT; rr <= RR_VERYRARE; rr++) { rrtorarity(rr, &min, &max); dblog("Obs with rarity %s:", getrarityname(rr)); for (ot = objecttype ; ot ; ot = ot->next) { @@ -3432,7 +3438,7 @@ int getobvalue(object_t *o) { float price; flag_t *f; int rarity = 0,i; - enum RARITY rr = RR_COMMON; + enum RARITY rr = RR_FREQUENT; flag_t *retflag[MAXCANDIDATES]; int nretflags = 0; @@ -3563,6 +3569,9 @@ int getobvalue(object_t *o) { case RR_COMMON: price *= 0.75; break; + case RR_FREQUENT: + price *= 0.5; + break; default: break; } @@ -5130,7 +5139,7 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat, obmod_t *om; flag_t *omposs[MAXCANDIDATES]; int noms = 0; - enum RARITY wantrr = RR_COMMON; + enum RARITY wantrr = RR_FREQUENT; habitat_t *hab; char habname[BUFLEN]; @@ -5224,19 +5233,21 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat, flag_t *rarflag = NULL; // correct rarity number? - rarflag = hasflagval(ot->flags, F_RARITY, H_ALL, NA, NA, NULL); - if (!rarflag) { - if (hab) { - rarflag = hasflagval(ot->flags, F_RARITY, hab->id, NA, NA, NULL); - } else { - rarflag = hasflag(ot->flags, F_RARITY); - } + if (hab) { + rarflag = hasflagval(ot->flags, F_RARITY, hab->id, NA, NA, NULL); } + if (!rarflag) { + rarflag = hasflagval(ot->flags, F_RARITY, H_ALL, NA, NA, NULL); + } + /*if (!rarflag) { + rarflag = hasflag(ot->flags, F_RARITY); + }*/ + if (rarflag) { if ((rarflag->val[1] >= raritymin) && (rarflag->val[1] <= raritymax)) { enum RARITY thisrr; thisrr = rarflag->val[2]; - if (thisrr == NA) thisrr = RR_COMMON; + if (thisrr == NA) thisrr = RR_FREQUENT; if (thisrr == wantrr) { rarok = B_TRUE; @@ -5303,7 +5314,7 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat, // already at lowest rarity? if ((raritymax >= 100) && (raritymin <= 0)) { // now lower wantrr - if (wantrr > RR_COMMON) { + if (wantrr > RR_FREQUENT) { if (db) dblog("rarity at min/max and no obs. lowering wantrr to %d.",wantrr); wantrr--; } else { @@ -5452,7 +5463,7 @@ enum OBCLASS getrandomobclass(void) { } } if (!nposs) { - if (wantrr > RR_COMMON) { + if (wantrr > RR_FREQUENT) { wantrr--; } else { // should never happen! @@ -5469,7 +5480,7 @@ int getobrarity(object_t *o, enum RARITY *rr) { map_t *m = NULL; flag_t *f; - if (rr) *rr = RR_COMMON; + if (rr) *rr = RR_FREQUENT; // check for rarity on this object's map first c = getoblocation(o); @@ -5643,29 +5654,17 @@ int getthrowdam(object_t *o) { // ie. 100 kg object does 20 damage (person) // ie. 1 tonne object does 200 damage (car) dam = ceil((double)getobunitweight(o)) / 2; - // missile objects do extra damage - if (hasflag(o->flags, F_THROWMISSILE)) { - dam *= 2; + // non-missile objects do 25% less damage + if (!hasflag(o->flags, F_THROWMISSILE)) { + dam = pctof(75, dam); + } + // soft materials do less damage + if (gethardness(o->material->id) < 2) { + dam /= 2; } } - if (o->type->obclass->id == OC_MISSILE) { - if (dam < 1) dam = 1; - } else { - // adjust for material - switch (o->material->id) { - // soft materials do less damage - case MT_PAPER: - case MT_WETPAPER: - case MT_CLOTH: - dam /= 2; - break; - break; - default: - break; - } - } - if (dam > 20) dam = 20; + //if (dam > 20) dam = 20; // modify for bonus f = hasflag(o->flags, F_BONUS); @@ -8413,7 +8412,7 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) { enum RARITY pickrr(int whatfor) { - enum RARITY wantrr = RR_COMMON; + enum RARITY wantrr = RR_FREQUENT; int chance = 3; if ((gamemode == GM_GAMESTARTED) && hasflag(player->flags, F_EXTRALUCK)) { @@ -8956,6 +8955,7 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE case OT_POT_RUM: // kill coffee flags killtransitoryflags(lf->flags, F_CAFFEINATED); + if (lfhasflag(lf, F_CAFFEINATED)) { // ie. conferred by something equipped etc if (isplayer(lf)) { @@ -8975,6 +8975,10 @@ void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE addtempflag(lf->flags, F_DRUNK, 1, NA, NA, NULL, TM_DRUNKTIME); } } + // also a bit filling + if (potblessed != B_CURSED) { + modhunger(lf, -pctof(25, (float)HUNGERCONST)); + } break; case OT_POT_ELEMENTIMMUNE: if (getmr(lf) && skillcheck(lf, SC_RESISTMAG, 30, 0)) { @@ -9939,6 +9943,10 @@ void rrtorarity(enum RARITY r, int *minr, int *maxr) { if (minr) *minr = 80; if (maxr) *maxr = 100; break; + case RR_FREQUENT: + if (minr) *minr = 90; + if (maxr) *maxr = 100; + break; default: if (minr) *minr = 0; if (maxr) *maxr = 100; // ie. rarity can be anything @@ -10634,11 +10642,14 @@ int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce) { if (isplayer(o->pile->owner)) { msg("^wYour %s %s!",noprefix(obname), getobhurtname(o, damtype)); } else if (cansee(player, o->pile->owner)) { - // don't announce decay damage for object you aren't holding - if (damtype != DT_DECAY) { - char monname[BUFLEN]; - getlfname(o->pile->owner, monname); - msg("%s's %s %s!",monname, noprefix(obname), getobhurtname(o, damtype)); + // avoid "the goblin corses's armour is damaged" + if (!lfhasflag(o->pile->owner, F_FEIGNINGDEATH)) { + // don't announce decay damage for object you aren't holding + if (damtype != DT_DECAY) { + char monname[BUFLEN]; + getlfname(o->pile->owner, monname); + msg("%s's %s %s!",monname, noprefix(obname), getobhurtname(o, damtype)); + } } } } @@ -10683,7 +10694,6 @@ int fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed, int willcatch = B_FALSE; int announcedmiss = B_FALSE; int outofammo = B_FALSE; - float multiplier; obpile_t *op = NULL; reason = E_OK; @@ -10705,8 +10715,6 @@ int fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed, limit(&speed, 1, NA); } - multiplier = speed / 2; - if (firearm) { strcpy(throwverbpres, "fire"); strcpy(throwverbpast, "fired"); @@ -11060,9 +11068,7 @@ int fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed, shield = getshield(target); if (shield && hasfreeaction(target)) { // block chance based on shield skill - // ie. AT_AVERAGE = speed3 = 18 - // ie. gun = speed20 = 120 = impossible - if (skillcheck(target, SC_SHIELDBLOCK, speed*6, 0)) { + if (skillcheck(target, SC_SHIELDBLOCK, 14 + (speed*2), 0)) { int throwdam,dam; if (seen) { char shname[BUFLEN]; @@ -11076,7 +11082,7 @@ int fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed, } // damage shield throwdam = getthrowdam(o); - dam = (int)((float)throwdam * multiplier); + dam = throwdam + speed; takedamage(shield, dam, DT_PROJECTILE); youhit = B_FALSE; practice(target, SK_SHIELDS, 1); @@ -11111,15 +11117,15 @@ int fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed, catchmod = -6; dodgemod = 2; } - // first check to see if you can catch it + // first check to see if you can catch it. this is hard! if (!lfhasflag(target, F_NOPACK) && hasbp(target, BP_HANDS) && lfhasflag(target, F_HUMANOID) && canpickup(target, o, o->amt) && !willburden(target, o, o->amt) && !isimmobile(target) && - skillcheck(target, SC_DEX, 15*speed, catchmod)) { + skillcheck(target, SC_DEX, 30 + (speed*5), catchmod)) { willcatch = B_TRUE; - } else if (!lfhasflag(target, F_CASTINGSPELL) && skillcheck(target, SC_DODGE, 7*speed, dodgemod)) { + } else if (!lfhasflag(target, F_CASTINGSPELL) && skillcheck(target, SC_DODGE, 14+(speed*2), dodgemod)) { // then check if we dodge it... if (db) dblog("target passed dodge check."); @@ -11188,7 +11194,8 @@ int fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed, throwdam = getthrowdam(o); - dam = (int)((float)throwdam * multiplier); + //dam = (int)((float)throwdam * multiplier); + dam = throwdam + speed; // firearms at pointblank range? +50% damage if (firearm) { @@ -11207,7 +11214,7 @@ int fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed, dam = 1; } - if (db) dblog("fireat(): dam = throwdam(%d) * multi(%d)",throwdam, multiplier); + if (db) dblog("fireat(): dam = throwdam(%d) + speed(%d)",throwdam, speed); if (db) dblog("dealing %d damage", dam); // deal extra cutting damage afterwards? diff --git a/spell.c b/spell.c index 3a0fde1..ab8b3e1 100644 --- a/spell.c +++ b/spell.c @@ -271,12 +271,31 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef msg("Cancelled."); return B_TRUE; } + + // announce the check, so that the player has feedback + // if map generation takes a while. + if (ch == 'l') { + msg("You sniff %s...",obname); + } else if (ch == 's') { // smell + msg("You listen at %s...",obname); + } else if (ch == 'f') { // footprints + msg("You inspect %s...",obname); + } else if (ch == 'p') { // peek + msg("You peek %s the stairs...", getdirname(stairdir)); + } + + // find out where the other end goes... c = getstairdestination(stairs, &madenewmap); + + // show --more-- after we have the destination + more(); + if (!c) { msg("These stairs don't seem to go anywhere!"); return B_TRUE; } + noredraw = B_TRUE; // move any lfs at the other end out of the way. @@ -304,9 +323,6 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef slev = getskill(user, SK_LISTEN); - msg("You listen at %s...",obname); - more(); - if (inway) { // just get the lf in the way if (getnoisedetails(inway, N_WALK, thismovetext, NULL, &vol)) { @@ -388,9 +404,6 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef race_t *smellrace[MAXCANDIDATES]; int nposs = 0,n,smellcount[MAXCANDIDATES], range = 0; - msg("You sniff %s...",obname); - more(); - f = lfhasflag(user, F_ENHANCESMELL); if (f) { range = f->val[0]; @@ -461,9 +474,6 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef char *fpname[MAXCANDIDATES],thisfpname[BUFLEN]; int nposs = 0,n,fpcount[MAXCANDIDATES]; - msg("You inspect %s...",obname); - more(); - if (inway) { // just do footprints for the lf in the way trailob = addtrail(inway, c, inway->facing, B_TRUE, B_FALSE); @@ -523,7 +533,6 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef } } else if (ch == 'p') { // peek flag_t *awareness; - msg("You peek %s the stairs...", getdirname(stairdir)); more(); // process light sources for the other end (otherwise new // maps will be dark by default and you might not see anything) calclight(c->map); @@ -5663,13 +5672,13 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ for (i = 0; i < nretflags; i++) { if ((retflag[i]->id == F_NOBODYPART) && (retflag[i]->val[1] == B_FROMINJURY)) { if (isplayer(target)) { - msg("Your %s grows back!", getbodypartname(target, retflag[0]->val[0])); + msg("Your %s grows back!", getbodypartname(target, retflag[i]->val[0])); if (seenbyplayer) *seenbyplayer = B_TRUE; } else if (cansee(player, target)) { char targname[BUFLEN]; getlfname(target, targname); msg("%s%s %s grows back!", targname, getpossessive(targname), - getbodypartname(target, retflag[0]->val[0])); + getbodypartname(target, retflag[i]->val[0])); if (seenbyplayer) *seenbyplayer = B_TRUE; } killflag(retflag[i]); diff --git a/text.c b/text.c index 64bb13b..e7bf570 100644 --- a/text.c +++ b/text.c @@ -918,6 +918,7 @@ char *getrarityname(enum RARITY rr) { case RR_RARE: return "Rare"; case RR_UNCOMMON: return "Uncommon"; case RR_COMMON: return "Common"; + case RR_FREQUENT: return "Frequent"; case RR_NONE: return "None"; } diff --git a/vaults/circle.vlt b/vaults/circle.vlt index 09cae92..7bd27f7 100644 --- a/vaults/circle.vlt +++ b/vaults/circle.vlt @@ -21,6 +21,6 @@ goesin:dungeon autodoors:50 autopop -rarity:uncommon +rarity:frequent @end diff --git a/vaults/crossroads.vlt b/vaults/crossroads.vlt index 50e7cf4..a9017b6 100644 --- a/vaults/crossroads.vlt +++ b/vaults/crossroads.vlt @@ -16,6 +16,6 @@ x:exit @flags goesin:dungeon -rarity:uncommon +rarity:frequent @end diff --git a/vaults/glasscorner.vlt b/vaults/glasscorner.vlt index 080c44b..e162aae 100644 --- a/vaults/glasscorner.vlt +++ b/vaults/glasscorner.vlt @@ -15,6 +15,6 @@ x:exit @flags goesin:dungeon -rarity:common +rarity:frequent mayrotate @end diff --git a/vaults/roundabout.vlt b/vaults/roundabout.vlt index 9280baa..d6a852e 100644 --- a/vaults/roundabout.vlt +++ b/vaults/roundabout.vlt @@ -16,6 +16,6 @@ x:exit @flags goesin:dungeon -rarity:uncommon +rarity:frequent @end diff --git a/vaults/uturn.vlt b/vaults/uturn.vlt index 389401d..47221c5 100644 --- a/vaults/uturn.vlt +++ b/vaults/uturn.vlt @@ -15,6 +15,6 @@ X:exit ! autoscale goesin:dungeon mayrotate -rarity:common +rarity:frequent @end diff --git a/vaults/vault.vlt b/vaults/vault.vlt index 1f00997..6333d8c 100644 --- a/vaults/vault.vlt +++ b/vaults/vault.vlt @@ -17,7 +17,8 @@ $:ob:25-200 gold @flags goesin:dungeon mayrotate -! no auto doors. ie this can be in the middle of nowhere. rarity:uncommon +! don't link to rest of map. ie this can be in the middle of nowhere. +nolink @end