- [+] bones bug:
- [+] saving "a clear fountain" - [+] getobnametrue() needs to show "a fountain of xxxx" or "a water fountain" - [+] addobject() needs to handle "fountain of xxx" or "water fountain" - [+] don't generate bones file while debugging - [+] should amour really be 'battered' at 98% ? - [+] make 85 and abve still mean 'pristine' - [+] reduce bjorn cowardice anger amount - [+] snakes shouldnt follow up stairs - [+] fix broken f_accuracymod. - [+] unicode for trees and dense bushland. - [+] bug loading again......related to gratings - [+] don't inherit alignment when giving jobs to monsters
This commit is contained in:
parent
3c65d5d552
commit
cbbab346e2
15
data.c
15
data.c
|
@ -228,7 +228,6 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "10 blocks of chocolate");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "10 vials of ambrosia");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "10 blessed scrolls of identify");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "potion of water");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "salt");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "leather armour");
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "leather boots");
|
||||
|
@ -2279,7 +2278,8 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, NA, NULL);
|
||||
addot(OT_TREE, "tree", "A tree.", MT_WOOD, 200, OC_FLORA, SZ_LARGE);
|
||||
addflag(lastot->flags, F_RARITY, H_FOREST, 100, NA, "");
|
||||
addflag(lastot->flags, F_GLYPH, C_GREEN, '#', NA, NULL);
|
||||
//addflag(lastot->flags, F_GLYPH, C_GREEN, '#', NA, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREEN, UNI_TREE, NA, NULL);
|
||||
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_LARGE, NA, NULL);
|
||||
addflag(lastot->flags, F_BLOCKSVIEW, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_BLOCKSLOF, B_TRUE, NA, NA, NULL);
|
||||
|
@ -3102,7 +3102,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_NEED, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_ADJVICTIM, NA, NA, NULL);
|
||||
addot(OT_S_REFRACTION, "refraction", "Instantly shatters all glass in the target location.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addot(OT_S_REFRACTION, "refraction", "Bends light around the caster, making them harder to hit.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_AIR, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 2, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAXPOWER, 4, NA, NA, NULL);
|
||||
|
@ -13215,7 +13215,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_WANTSOBFLAG, F_EDIBLE, B_COVETS, NA, NULL);
|
||||
addflag(lastrace->flags, F_SEEINDARK, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTVULN, DT_POISONGAS, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 7, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 4, NA, NA, NULL);
|
||||
|
||||
addrace(R_RATPLAGUE, "plague rat", 3, 'r', C_GREEN, MT_FLESH, RC_ANIMAL, "Plague rats are named both for their infectious bite as well as the great speed at which they run.");
|
||||
setbodytype(lastrace, BT_QUADRAPED);
|
||||
|
@ -13354,6 +13354,7 @@ void initrace(void) {
|
|||
setbodytype(lastrace, BT_SNAKE);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSMELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
||||
|
@ -13387,6 +13388,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_NOSMELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_ANIMAL, NA, NULL);
|
||||
|
@ -13414,6 +13416,7 @@ void initrace(void) {
|
|||
setbodytype(lastrace, BT_SNAKE);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSMELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
||||
|
@ -13444,6 +13447,7 @@ void initrace(void) {
|
|||
setbodytype(lastrace, BT_SNAKE);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSMELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
||||
|
@ -13476,6 +13480,7 @@ void initrace(void) {
|
|||
setbodytype(lastrace, BT_SNAKE);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSMELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_LOW, NA, NULL);
|
||||
|
@ -13509,6 +13514,7 @@ void initrace(void) {
|
|||
setbodytype(lastrace, BT_SNAKE);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_COLDBLOOD, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSMELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL);
|
||||
|
@ -13540,6 +13546,7 @@ void initrace(void) {
|
|||
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_RARITY, H_SEWER, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSMELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NEEDSWATER, B_TRUE, NA, NA, NULL);
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
3
defs.h
3
defs.h
|
@ -60,6 +60,9 @@
|
|||
#define UNI_SHADEDARK 0x2593
|
||||
#define UNI_SPIRAL 0x2202
|
||||
//#define UNI_SOLID '#'
|
||||
#define UNI_TUNNEL 0x2126
|
||||
#define UNI_TREELOTS 0x2051
|
||||
#define UNI_TREE 0x2042
|
||||
|
||||
// getrandomemptycell() params
|
||||
#define WE_NONE 0
|
||||
|
|
10
lf.c
10
lf.c
|
@ -3057,6 +3057,7 @@ void die(lifeform_t *lf) {
|
|||
// drop corpse/splatter blood
|
||||
if (corpsecell) {
|
||||
if (vaporised) {
|
||||
if (lf->material->id == MT_FLESH) {
|
||||
switch (rnd(1,2)) {
|
||||
case 1:
|
||||
fragments(corpsecell, "chunk of flesh", 0, UNLIMITED);
|
||||
|
@ -3065,6 +3066,7 @@ void die(lifeform_t *lf) {
|
|||
fragments(corpsecell, "pool of blood", 0, UNLIMITED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if ((lf->lastdamtype == DT_BASH) && lfhasflag(lf, F_FROZEN)) {
|
||||
// shattered
|
||||
fragments(corpsecell, "chunk of ice", 2, UNLIMITED);
|
||||
|
@ -7375,10 +7377,12 @@ int getlfaccuracy(lifeform_t *lf, object_t *wep) {
|
|||
}
|
||||
|
||||
// adjust for bulky armour/shield, or injuries
|
||||
getflags(lf->flags, retflag, &nretflags, F_ARMOURPENALTY, F_INJURY, F_SHIELDPENALTY, F_NONE);
|
||||
getflags(lf->flags, retflag, &nretflags, F_ACCURACYMOD, F_ARMOURPENALTY, F_INJURY, F_SHIELDPENALTY, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
f = retflag[i];
|
||||
if (f->id == F_SHIELDPENALTY) {
|
||||
if (f->id == F_ACCURACYMOD) {
|
||||
acc += f->val[0];
|
||||
} else if (f->id == F_SHIELDPENALTY) {
|
||||
acc -= adjustshieldpenalty(lf, f->val[0]);
|
||||
} else if (f->id == F_ARMOURPENALTY) {
|
||||
acc -= adjustarmourpenalty(lf, f->val[0]);
|
||||
|
@ -9933,7 +9937,9 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
|
|||
}
|
||||
}
|
||||
|
||||
if (isplayer(lf)) {
|
||||
generatealignment(lf);
|
||||
}
|
||||
|
||||
if (hasflag(j->flags, F_STAYINROOM)) sethomeroom(lf);
|
||||
}
|
||||
|
|
3
map.c
3
map.c
|
@ -6521,7 +6521,8 @@ void initmap(void) {
|
|||
addcelltype(CT_WALLWOOD, "wooden wall", UNI_SOLID, C_BROWN, B_SOLID, B_OPAQUE, MT_WOOD, 0, 30);
|
||||
addcelltype(CT_WALLFLESH, "flesh wall", UNI_SOLID, C_RED, B_SOLID, B_OPAQUE, MT_FLESH, 0, 25);
|
||||
addcelltype(CT_WALLGLASS, "glass wall", UNI_SOLID, C_CYAN, B_SOLID, B_TRANS, MT_GLASS, 0, 20);
|
||||
addcelltype(CT_WALLTREE, "dense bushland", UNI_SHADEDARK, C_GREEN, B_SOLID, B_OPAQUE, MT_PLANT, 0, 100);
|
||||
//addcelltype(CT_WALLTREE, "dense bushland", UNI_SHADEDARK, C_GREEN, B_SOLID, B_OPAQUE, MT_PLANT, 0, 100);
|
||||
addcelltype(CT_WALLTREE, "dense bushland", UNI_TREELOTS, C_GREEN, B_SOLID, B_OPAQUE, MT_PLANT, 0, 100);
|
||||
addcelltype(CT_WALLMETAL, "metal wall", UNI_SOLID, C_WHITE, B_SOLID, B_OPAQUE, MT_METAL, 0, 75);
|
||||
// cell types - non-solid
|
||||
addcelltype(CT_FAKE, "fake cell", '.', C_GREEN, B_EMPTY, B_TRANS, MT_STONE, 0, -1);
|
||||
|
|
2
move.c
2
move.c
|
@ -2807,7 +2807,7 @@ int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe) {
|
|||
// check for fleeing...
|
||||
if (isplayer(lf) && !isdead(lf)) {
|
||||
if (prebattle && !isinbattle(lf, B_FALSE) && onpurpose) {
|
||||
angergodmaybe(R_GODBATTLE, 15, GA_COWARD);
|
||||
angergodmaybe(R_GODBATTLE, 5, GA_COWARD);
|
||||
}
|
||||
}
|
||||
return B_FALSE;
|
||||
|
|
33
objects.c
33
objects.c
|
@ -496,6 +496,7 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
int wantrarity = RR_NONE;
|
||||
int wantgoodness = G_NA;
|
||||
int wantfoodtaint = B_FALSE;
|
||||
enum OBTYPE wantfountaintype = OT_NONE;
|
||||
enum LFSIZE wantarmsize = SZ_ANY;
|
||||
enum MATERIAL wantdiffmat = MT_NOTHING;
|
||||
map_t *targetmap = NULL; // for portals
|
||||
|
@ -878,6 +879,18 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
|
||||
corpserace = findracebyname(racename);
|
||||
ot = findot(OT_ROASTMEAT);
|
||||
} else if (strstr(p, "water fountain")) {
|
||||
wantfountaintype = OT_POT_WATER;
|
||||
ot = findot(OT_FOUNTAIN);
|
||||
} else if (strstarts(p, "fountain of ")) {
|
||||
char potname[BUFLEN];
|
||||
char *p2;
|
||||
objecttype_t *pot;
|
||||
p2 = p + strlen("fountain of ");
|
||||
sprintf(potname, "potion of %s", p2);
|
||||
pot = findotn(potname);
|
||||
wantfountaintype = pot->id;
|
||||
ot = findot(OT_FOUNTAIN);
|
||||
} else if (strstr(p, "corpse")) {
|
||||
int len;
|
||||
char racename[BUFLEN];
|
||||
|
@ -1091,14 +1104,14 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (gamemode != GM_LOADING) {
|
||||
// don't put floor gratings on low floors
|
||||
if (ot->id == OT_GRATINGFLOOR) {
|
||||
if (where->where && (where->where->type->id == CT_LOWFLOOR)) {
|
||||
setcelltype(where->where, where->where->map->habitat->emptycelltype);
|
||||
}
|
||||
}
|
||||
|
||||
if (gamemode != GM_LOADING) {
|
||||
if (hasflag(ot->flags, F_ONEPERCELL)) {
|
||||
if (hasob(where, ot->id)) {
|
||||
if (db) dblog("DB: trying to add >1 ONEPERCELL object to a cell. (%s) bailing out.", ot->name);
|
||||
|
@ -1441,7 +1454,9 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
// fountain flags
|
||||
if (o && (o->type->id == OT_FOUNTAIN)) {
|
||||
f = hasflag(o->flags, F_LINKOB);
|
||||
if (where->where && (where->where->habitat->id != H_VILLAGE)) {
|
||||
if (wantfountaintype != OT_NONE) {
|
||||
f->val[0] = wantfountaintype;
|
||||
} else if (where->where && (where->where->habitat->id != H_VILLAGE)) {
|
||||
if (onein(3)) {
|
||||
objecttype_t *ot;
|
||||
int min,max;
|
||||
|
@ -1719,8 +1734,6 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
f->val[1] = maxhp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if (o->type->id == OT_HEAD) {
|
||||
flag_t *rf, *cf;
|
||||
|
||||
|
@ -5168,7 +5181,11 @@ char *real_getobname(object_t *o, char *buf, int count, int wantpremods, int wan
|
|||
if (ot) {
|
||||
char *srcp;
|
||||
// get potion name (or hidden name if we don't recognise it)
|
||||
if (showall) {
|
||||
srcp = ot->name;
|
||||
} else {
|
||||
srcp = gethiddennameot(ot->id);
|
||||
}
|
||||
|
||||
// if this is "potion of xxx"
|
||||
if (strstarts(srcp, "potion ") || strstarts(srcp, "vial ") || strstarts(srcp, "flask ")) {
|
||||
|
@ -5674,7 +5691,7 @@ char *getobconditionname(object_t *o, char *buf) {
|
|||
if (iqb >= AT_LOW) {
|
||||
pct = getobhppct(o);
|
||||
|
||||
if (pct >= 100) {
|
||||
if (pct >= 85) {
|
||||
strcpy(buf, "");
|
||||
} else if (pct >= 75) {
|
||||
snprintf(buf, BUFLEN, "battered");
|
||||
|
@ -12186,8 +12203,8 @@ int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce) {
|
|||
getobconditionname(o, postdamname);
|
||||
|
||||
// was it enough to change the status
|
||||
if (!hasflag(o->flags, F_NOOBDAMTEXT) && strcmp(predamname, postdamname) &&
|
||||
!streq(postdamname, "battered")) {
|
||||
if (!hasflag(o->flags, F_NOOBDAMTEXT) && strcmp(predamname, postdamname)) {
|
||||
//&& !streq(postdamname, "battered")) {
|
||||
// if it was melting, drop some water here
|
||||
if (damtype == DT_MELT) {
|
||||
if (hasflag(o->flags, F_EQUIPPED) ) {
|
||||
|
|
43
spell.c
43
spell.c
|
@ -7121,7 +7121,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
return B_TRUE;
|
||||
}
|
||||
|
||||
if (isplayer(caster)) {
|
||||
if (o->pile->owner && isplayer(o->pile->owner)) {
|
||||
if (isidentified(o)) { // already identified?
|
||||
nothinghappens();
|
||||
return B_TRUE;
|
||||
|
@ -7611,6 +7611,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
} else if (spellid == OT_S_OBJECTGROWTH) {
|
||||
enum OBTYPE newoid = OT_NONE;
|
||||
enum LFSIZE newsize = SZ_ANY;
|
||||
enum CELLTYPE newcelltype = CT_NONE;
|
||||
skill_t *obsk = SK_NONE;
|
||||
char obname[BUFLEN],newobname[BUFLEN];
|
||||
int seen;
|
||||
|
@ -7645,24 +7646,33 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
hasflag(targob->flags, F_MULTISIZE) &&
|
||||
(getarmoursize(targob) < SZ_LARGE)) {
|
||||
newsize = getarmoursize(targob) + 1;
|
||||
} else if (targob->type->obclass->id == OC_POTION) {
|
||||
newcelltype = CT_WALLGLASS;
|
||||
} else {
|
||||
switch (targob->type->id) {
|
||||
case OT_ASH: newoid = OT_STONE; break;
|
||||
case OT_ASHCONCEAL: newoid = OT_STONE; break;
|
||||
case OT_ASHEXPLODE: newoid = OT_STONE; break;
|
||||
case OT_ASHSLEEP: newoid = OT_STONE; break;
|
||||
case OT_ASH: newoid = OT_DUSTCLOUD; break;
|
||||
case OT_ASHCONCEAL: newoid = OT_DUSTCLOUD; break;
|
||||
case OT_ASHEXPLODE: newoid = OT_DUSTCLOUD; break;
|
||||
case OT_ASHSLEEP: newoid = OT_DUSTCLOUD; break;
|
||||
case OT_BAGOFHOLDING: newoid = OT_BAGOFHOLDINGLARGE; break;
|
||||
case OT_BAGOFHOLDINGLARGE: newoid = OT_BAGOFHOLDINGHUGE; break;
|
||||
case OT_BED: newoid = OT_DOORWOOD; break;
|
||||
case OT_BUCKLER: newoid = OT_SHIELD; break;
|
||||
case OT_DOORWOOD: newoid = OT_DOORIRON; break;
|
||||
case OT_CLOVER: newoid = OT_SHRUB; break;
|
||||
case OT_DOORIRON: newcelltype = CT_WALLMETAL; break;
|
||||
case OT_DOORWOOD: newcelltype = CT_WALLWOOD; break;
|
||||
case OT_FENCEWOOD: newcelltype = CT_WALLWOOD; break;
|
||||
case OT_FIRESMALL: newoid = OT_FIREMED; break;
|
||||
case OT_FIREMED: newoid = OT_FIRELARGE; break;
|
||||
case OT_FIREPLACE: newoid = OT_FIRELARGE; break;
|
||||
case OT_FLOWER: newoid = OT_SHRUB; break;
|
||||
case OT_FOUNTAIN: newoid = OT_WATERDEEP; break;
|
||||
case OT_WOODENSTOOL: newoid = OT_WOODENTABLE; break;
|
||||
case OT_GATEIRON: newcelltype = CT_WALLMETAL; break;
|
||||
case OT_GATEWOOD: newcelltype = CT_WALLWOOD; break;
|
||||
case OT_ICESHEET: newoid = OT_ICICLE; break;
|
||||
case OT_LEAF: newoid = OT_SHRUB; break;
|
||||
case OT_MISTLETOE: newoid = OT_SHRUB; break;
|
||||
case OT_NUT: newoid = OT_TREE; break;
|
||||
case OT_SACK: newoid = OT_SACKLARGE; break;
|
||||
case OT_SACKLARGE: newoid = OT_SACKHUGE; break;
|
||||
case OT_SHIELDHIDE: newoid = OT_SHIELD; break;
|
||||
|
@ -7670,6 +7680,10 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
case OT_SHIELDLARGE: newoid = OT_SHIELDTOWER; break;
|
||||
case OT_SHRUB: newoid = OT_TREE; break;
|
||||
case OT_STUMP: newoid = OT_TREE; break;
|
||||
case OT_TREE: newcelltype = CT_WALLTREE; break;
|
||||
case OT_WOODENBARREL: newoid = OT_DOORWOOD; break;
|
||||
case OT_WOODENSTOOL: newoid = OT_WOODENTABLE; break;
|
||||
case OT_WOODENTABLE: newoid = OT_DOORWOOD; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
@ -7678,6 +7692,16 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
resizeobject(targob, newsize);
|
||||
getobname(targob, newobname, 1);
|
||||
if (seen) msg("%s grows into %s!", obname, newobname);
|
||||
} else if (newcelltype != CT_NONE) {
|
||||
cell_t *where;
|
||||
if (seen) {
|
||||
celltype_t *ct;
|
||||
ct = findcelltype(newcelltype);
|
||||
msg("%s grows into %s %s!", needan(ct->name) ? "an" : "a", ct->name);
|
||||
}
|
||||
where = getoblocation(targob);
|
||||
killob(targob);
|
||||
setcelltype(where, newcelltype);
|
||||
} else if (newoid == targob->id) {
|
||||
if (seen) msg("%s shudders for a moment.", obname);
|
||||
} else if (newoid != OT_NONE) {
|
||||
|
@ -7688,6 +7712,11 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
if (targob) {
|
||||
getobname(targob, newobname, 1);
|
||||
if (seen) msg("%s grows into %s!", obname, newobname);
|
||||
if (targob->type->id == OT_WATERDEEP) {
|
||||
cell_t *where;
|
||||
where = getoblocation(targob);
|
||||
setcelltype(where, CT_LOWFLOOR); // lower floor so water doesn't spread
|
||||
}
|
||||
} else {
|
||||
if (seen) msg("%s shudders then explodes!", obname);
|
||||
}
|
||||
|
|
2
text.c
2
text.c
|
@ -1374,7 +1374,7 @@ char *getregionname(char *buf, map_t *m, region_t *r, enum REGIONNAMEFORMAT how)
|
|||
snprintf(buf, BUFLEN, "goblin caves L%d", m->depth);
|
||||
break;
|
||||
case RG_WOODS:
|
||||
snprintf(buf, BUFLEN, "syvan woods L%d", m->depth);
|
||||
snprintf(buf, BUFLEN, "sylvan woods L%d", m->depth);
|
||||
break;
|
||||
case RG_WORLDMAP:
|
||||
snprintf(buf, BUFLEN, "the surface(%d,%d)",x,y);
|
||||
|
|
9
vault.c
9
vault.c
|
@ -18,6 +18,8 @@
|
|||
|
||||
vault_t *firstvault = NULL, *lastvault = NULL;
|
||||
|
||||
extern lifeform_t *player;
|
||||
|
||||
extern enum GAMEMODE gamemode;
|
||||
|
||||
vlegend_t *addlegend(vault_t *v, int ch, enum VAULTTHING tt, int pct, char *what) {
|
||||
|
@ -772,6 +774,7 @@ vault_t *getvaulttype(map_t *m) {
|
|||
if (hasflag(v->flags, F_NORANDOM)) continue;
|
||||
if (getvaultrarity(v) != rr) continue;
|
||||
|
||||
|
||||
// can this vault go in this map?
|
||||
if (vaultokformap(v, m)) {
|
||||
poss[nposs++] = v;
|
||||
|
@ -1732,6 +1735,12 @@ int vaultokformap(vault_t *v, map_t *m) {
|
|||
if (f && (getmapdifficulty(m) > f->val[0])) {
|
||||
return B_FALSE;
|
||||
}
|
||||
// dont make bones files while debugging.
|
||||
if ((gamemode == GM_GAMESTARTED) && hasjob(player, J_GOD)) {
|
||||
if (hasflagval(v->flags, F_VAULTTAG, NA, NA, NA, "bones")) {
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return B_TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue