nexus/vault.c

1897 lines
46 KiB
C
Raw Normal View History

2011-11-30 13:07:19 +11:00
#include <assert.h>
#include <ctype.h>
#include <dirent.h>
#include <math.h>
#include <signal.h>
2011-11-30 13:07:19 +11:00
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "defs.h"
#include "flag.h"
#include "io.h"
#include "move.h"
#include "nexus.h"
#include "lf.h"
#include "map.h"
#include "objects.h"
#include "text.h"
#include "vault.h"
vault_t *firstvault = NULL, *lastvault = NULL;
extern lifeform_t *player;
2011-11-30 13:07:19 +11:00
extern enum GAMEMODE gamemode;
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
vlegend_t *addlegend(vault_t *v, int ch, enum VAULTTHING tt, int pct, char *what, enum VAULTTHING tt2, char *what2) {
2011-11-30 13:07:19 +11:00
vlegend_t *l;
// add to the end of the list
if (v->legend == NULL) {
v->legend = malloc(sizeof(vlegend_t));
l = v->legend;
l->prev = NULL;
} else {
// go to end of list
l = v->lastlegend;
l->next = malloc(sizeof(vlegend_t));
l->next->prev = l;
l = l->next;
}
v->lastlegend = l;
l->next = NULL;
l->vault = v;
// props
l->ch = ch;
l->tt = tt;
l->pct = pct;
l->what = strdup(what);
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
// alternatives...
l->tt2 = tt2;
if (what2) {
l->what2 = strdup(what2);
} else {
l->what2 = strdup("");
}
2011-11-30 13:07:19 +11:00
return l;
}
vault_t *addvault(void) {
vault_t *v;
if (firstvault == NULL) {
firstvault = malloc(sizeof(vault_t));
v = firstvault;
v->prev = NULL;
} else {
// go to end of list
v = lastvault;
v->next = malloc(sizeof(vault_t));
v->next->prev = v;
v = v->next;
}
lastvault = v;
v->next = NULL;
// props
v->filename = NULL; // will be filled in during load.
v->id = NULL;
if (v == firstvault) {
v->numid = 0;
} else {
v->numid = lastvault->numid+1;
}
v->valid = B_TRUE;
v->state = VS_ALLOCATED;
v->flags = addflagpile(NULL, NULL);
* [+] let credit cards be used at some shops? * [+] bug with adding obejcts to shops - [+] issue with objects dying and killing their flagpiles - [+] A medium fire dies down a little. A medium fire is no longer glowing. - [+] shouldn't say "is no longer glowing" when we're changing the type... ? - [+] put a breakpoint on "is no longer glowing" * [+] let you bless objects using a holy circle somehow (but it might make the circle disappear?). - [+] darness bug - need to recalc light for anyone who sees a cell's lightlevel change. - [+] call more() after showing vaultentertext() - [+] remove "inspected" when you ident or makeknown an object. - [+] BUG - no objects in inventory!!!! - [+] listobs failing? mylist[0] = null. MEMLEAK - [+] finish implementing CLEANUP() - [+] crash in cleanup() -> killot() -> findleak.c_stuff while freeing STACKABLE flag from cactus fruit??? - [+] better now? - [+] now a crash freeing hiddennames! - [+] forgot to free obmods - [+] leaking approx. 1 meg per turn! - [+] where am i leaking?! maybe try valgrind or findleak.c - [+] findleak.c now finds nothing. - [+] but i am sitll leaking????? - [+] related to lifeform count. killing all but player dramatically slows it. - [+] check calclos()... looks okay. - [+] setcellknown() ?no. - [+] startlfturn?? no. - [+] remove unused "lf->viscell" - [+] when there are 2 things in a cell, say "you see x and x here." - [+] restore original stast when polymorphing back to original form!!! - [+] when making shops, pick new ones more often. - [+] change to maps: don't let vaults overlap. - [+] HARDCODE object values - [+] potions - [+] tech - [+] tools - [+] rings - [+] increase evasion skill effects - [+] changes to animradial... and animradialorth - [+] combine into one function - [+] move msg into here - [+] refs to spellcloud() - [+] refs to animradial() - [+] fire should spread onto flammable lifeforms - [+] bug: attack flurry doesn't work for monk - [+] let monsters climb even when not facing a wall? - [+] set their facing first. - [+] CRASH when you die while climbing (or on a solid cell) - [+] rings - [+] stench - [+] breath water - [+] detect life - [+] deceleration - [+] meditation - [+] reflection - [+] boost magic power - [+] education - gain xpskills more quickly - [+] crit protection - [+] greed - detect obs - [+] ivy - grows! - [+] ragefungus - bezerk spores - [+] nutter - drops peanuts - [+] dish which slightly increases maxhp (beginner level) - [+] stuffed mushroom. shiitake mushroom + bread
2011-12-08 13:55:14 +11:00
v->legend = NULL;
v->lastlegend = NULL;
2011-11-30 13:07:19 +11:00
v->map[0].mlen = 0;
v->map[0].w = 0;
v->map[0].h = 0;
v->nmaps = 0;
return v;
}
// add content to vault based on legend
void addvaultcellcontents(cell_t *c, vault_t *v, int x, int y, int rotation) {
char ch;
vlegend_t *l;
// set cell's vault id before adding anything
// this is needed for things like shopkeepers
// and shop items.
c->room->vault = v;
ch = getvaultchar(v, x, y, rotation, NULL);
// does this char give us a monster/object?
for (l = v->legend ; l ; l = l->next) {
if (l->ch == ch) {
if (rnd(1,100) <= l->pct) {
addvaultthing(c, v, l->tt, l->what);
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
} else if (l->tt2 != VT_NONE) {
addvaultthing(c, v, l->tt2, l->what2);
2011-11-30 13:07:19 +11:00
}
}
}
}
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
// add vault contents based on flags
2011-11-30 13:07:19 +11:00
void addvaultcontents(map_t *m, vault_t *v, int minx, int miny, int maxx, int maxy, int rotation) {
flag_t *f;
char buf[BUFLEN];
int db = B_FALSE;
int x,y;
cell_t *c;
if (db) dblog("addvaultcontenets started for vaulttype %s, version %d",v->id, rotation);
for (f = v->flags->first ; f ; f = f->next) {
if ((f->id == F_VAULTATOB) || (f->id == F_VAULTATLF) || (f->id == F_VAULTATCELL)) {
if (rnd(1,100) <= f->val[2]) {
cell_t *c;
int x,y;
getadjustedcoords(v, f->val[0], f->val[1], minx, miny, maxx, maxy, rotation, &x, &y);
c = getcellat(m, x, y);
if (c) {
enum VAULTTHING vt;
switch (f->id) {
default:
case F_VAULTATOB: vt = VT_OB; break;
case F_VAULTATLF: vt = VT_LF; break;
case F_VAULTATCELL: vt = VT_CELL; break;
}
addvaultthing(c, v, vt, f->text);
}
}
} else if (f->id == F_VAULTATONEOF) {
if (rnd(1,100) <= f->val[1]) {
int x[10],y[10];
int nposs = 0,sel;
int selx,sely;
char *p;
enum VAULTTHING vt;
// get a list of all of the possible locations for this object
p = f->text;
while (*p == '(') {
// go past '('
p++;
// get x
p = readuntil(buf, p, ',');
x[nposs] = atoi(buf);
// get y
p = readuntil(buf, p, ')');
y[nposs] = atoi(buf);
nposs++;
}
// go past whitespace - we'll end up on the thing name
while (isspace(*p)) p++;
// select random position
sel = rnd(0,nposs-1);
getadjustedcoords(v, x[sel], y[sel], minx, miny, maxx, maxy, rotation, &selx, &sely);
c = getcellat(m, selx, sely);
// get thing type
vt = f->val[0];
// add thing
addvaultthing(c, v, vt, p);
}
} else if (f->id == F_VAULTEXIT) {
cell_t *c;
int x,y;
getadjustedcoords(v, f->val[0], f->val[1], minx, miny, maxx, maxy, rotation, &x, &y);
c = getcellat(m, x, y);
if (c) {
addflag(c->map->flags, F_ROOMEXIT, getroomid(c), c->x, c->y, "from f_vaultexit");
}
} else if ( (f->id == F_VAULTBOX) && (rnd(1,100) <= f->val[1]) ) {
char *p;
char thingname[BUFLEN];
int x1,y1,x2,y2,x,y;
// get relative range
p = f->text;
p = readuntil(buf, p, ',');
x1 = atoi(buf);
p = readuntil(buf, p, ',');
y1 = atoi(buf);
/*
if (x1 < 0) x1 = maxx + x1 + 1;
else x1 += minx;
if (y1 < 0) y1 = maxy + y1 + 1;
else y1 += miny;
*/
getadjustedcoords(v, x1, y1, minx, miny, maxx, maxy, rotation, &x1, &y1);
p = readuntil(buf, p, ',');
x2 = atoi(buf);
p = readuntil(buf, p, ',');
y2 = atoi(buf);
/*
if (x2 < 0) x2 = maxx + x2 + 1;
else x2 += minx;
if (y2 < 0) y2 = maxy + y2 + 1;
else y2 += miny;
*/
getadjustedcoords(v, x2, y2, minx, miny, maxx, maxy, rotation, &x2, &y2);
// now figure out the top left and bottom right.....
getboundingbox(x1, y1, x2, y2, &x1, &y1, &x2, &y2);
p = readuntil(buf, p, ',');
strcpy(thingname,buf);
// fill in
for (y = y1; y <= y2; y++) {
for (x = x1; x <= x2; x++) {
int doit = B_FALSE;
if (f->val[2] == B_TRUE) { // ie. fill
doit = B_TRUE;
} else { // ie. box
if ((x == x1) || (x == x2) || (y == y1) || (y == y2)) {
doit = B_TRUE;
}
}
if (doit) {
cell_t *c;
c = getcellat(m, x, y);
if (c) {
// add the thing
addvaultthing(c, v, f->val[0], thingname);
}
}
}
} // end foreach x/y
} else if ( (f->id == F_VAULTSCATTER) && (rnd(1,100) <= f->val[1]) ) {
char *p;
char thingname[BUFLEN];
cell_t *poss[MAXCANDIDATES]; // TODO: should be maxroomsize
int nposs = 0;
int totcells = 0;
int i,nplaced;
int x1,y1,x2,y2,x,y;
int countmin,countmax,count;
if (db) dblog("room is %d,%d-%d,%d (%dx%d)",minx,miny,maxx,maxy,maxx-minx,maxy-miny);
// get relative range
p = f->text;
p = readuntil(buf, p, ',');
x1 = atoi(buf);
p = readuntil(buf, p, ',');
y1 = atoi(buf);
/*
if (x1 < 0) x1 = maxx + x1 + 1;
else x1 += minx;
if (y1 < 0) y1 = maxy + y1 + 1;
else y1 += miny;
*/
getadjustedcoords(v, x1, y1, minx, miny, maxx, maxy, rotation, &x1, &y1);
p = readuntil(buf, p, ',');
x2 = atoi(buf);
p = readuntil(buf, p, ',');
y2 = atoi(buf);
/*
if (x2 < 0) x2 = maxx + x2 + 1;
else x2 += minx;
if (y2 < 0) y2 = maxy + y2 + 1;
else y2 += miny;
*/
getadjustedcoords(v, x2, y2, minx, miny, maxx, maxy, rotation, &x2, &y2);
p = readuntil(buf, p, '-');
countmin = atoi(buf);
p = readuntil(buf, p, ',');
countmax = atoi(buf);
p = readuntil(buf, p, ',');
strcpy(thingname,buf);
// now figure out the top left and bottom right.....
getboundingbox(x1, y1, x2, y2, &x1, &y1, &x2, &y2);
if (db) dblog("subregion is %d,%d-%d,%d (%dx%d)",x1,y1,x2,y2,x2-x1,y2-y1);
// get list of cells
nposs = 0;
totcells = 0;
for (y = y1; y <= y2; y++) {
for (x = x1; x <= x2; x++) {
cell_t *c;
c = getcellat(m, x, y);
if (c) {
int valid = B_TRUE;
totcells++;
- [+] add f_nostam to undead. - [+] add nonausea rather than nosmell sometimes. - [+] rats should eb able to smell, but not get nauseated. - [+] fix triumph pleasure for bjorn. must be no monsters within LOF... or within radius ? - [+] and make it very low piety gain. - [+] remember which level we got flags form - [+] flag_t -> fromlev - [+] announce this in getflagcourse - [+] undead qualities - [+] no criticals - [+] don't naturally heal - [+] don't breath - [+] drainlevel(fromlf) - [+] check for dtresist necrotic - [+] fitness saving throw (difficulty is 100 + fromlf's level*6) - [+] call loselevel() - [+] loselevel() - [+] announce. - [+] drop maxhp. - [+] adjust hp appropriately - [+] lose any flags where >fromlev is too high. - [+] handle monk f_hasattack specially. - [+] getmonkdr(level) - [+] getmonkattacks(level) - [+] keep track of what stats we gained and lose them again. - [+] TEST level drain with cursed xp pot - [+] TEST level drain with stats... - [+] prevent drinking when wearing full-face masks like gas mask/football helmet - [+] implement f_COVERSFACE. - [+] add it to objects. - [+] check it when doing caneat() candrink() - [+] up their AC bonus too - [+] large scorpion - [+] hellhound - [+] large primalities - [+] new vault flag: usehabitat:xxx - [+] means "set the habitat of all vault cells to xxx" - [+] real_getrandomob() should be given a CELL, not MAP. - [+] getrandomobofclass() should be given a CELL, not MAP. - [+] use CELL habitat to determine random obs - [+] apply to caves - [+] vault scatter: ignore locked cells (ie. reusable ones) new vaults - [+] dualroom - [+] sauna - vhot! - [+] pentagram and demons new pionic spells - [+] chi bolt - low dam ranged attack 1d4 - [+] chi strike (l4) - add 1d4 explosive damage to melee hits
2012-12-03 16:12:29 +11:00
if (c->locked) {
valid = B_FALSE;
} else if (f->val[0] == VT_LF) {
2011-11-30 13:07:19 +11:00
// make sure it's walkable
if (!cellwalkable(NULL, c, NULL)) valid = B_FALSE;
} else if (f->val[0] == VT_OB) {
// make sure it's not solid
if (c->type->solid) valid = B_FALSE;
}
if (valid) {
poss[nposs++] = c;
}
}
}
} // end foreach x/y
if (db) dblog("cells counted=%d",totcells);
if (totcells == 0) {
dblog("PROBLEM: couldn't find place to put vaultscatter thing!");
msg("PROBLEM: couldn't find place to put vaultscatter thing!");
}
// figure out how many to place
if (countmax == PCT) {
count = pctof(countmin, nposs);
} else {
count = rnd(countmin, countmax);
}
if (db) dblog("nposs=%d, count=%d\n", nposs,count);
// now fill in the right amount
nplaced = 0;
for (i = 0; (i < count) && (nposs > 0); i++) {
cell_t *c;
int sel,n;
// get random cell
sel = rnd(0,nposs-1);
c = poss[sel];
// put the thing there
addvaultthing(c, v, f->val[0], thingname);
nplaced++;
// remove this cell
for (n = sel; n < nposs-1; n++) {
poss[n] = poss[n+1];
}
nposs--;
}
if (db) dblog("placed %d\n", nplaced);
}
}
- [+] fix carpetted floor colour - [+] bug: giant ant zombie not attacking giant ant - [+] change table symol to PI - [+] replace footstool with chair - [+] allow reusable cells in vaults - [+] slippery floors should make pushing easier - [+] when checking stairs i found "Pete footprints" - [+] new monsters: - [+] polar bear - [+] owlbear - [+] bug: sleeping monsters never waking up. - [+] "random good weapon" wish broken. fixed now. - [+] cope with med/small/large dancing weapons - [+] generice code to check baseid instead of raceid - [+] handle automatic generation - need to populate: - [+] select an appropriate object (rarity freq / common, uncommon, rare) - [+] copy from obejct to lf: - [+] OBHP - [+] SIZE - [+] OBATTACKDELAY - [+] bug: always getting 'twisted branch' for small dancing weapon - [+] bug: crash in attackcell. nweps = 0 - [+] replace thin walls with unicode symbols - [+] glass - [+] wood - [+] metal - [+] getcellglyph() looks at surrounding cells if required - [+] too slow? - [+] attacking helpless undead shouldn't count - [+] differentiate EXTRADAM from WOUNDING. - [+] wounding = add damage to ALL attacks - [+] EXTRADAM = add DIFFERENT type of damage - [+] psionics on levelup - [+] make this a "select from iq/10", not a select from any - [+] if poison needle trap misses, place it on the ground. - [+] no nauseated effects while asleep. - [+] if something runs out of view adjacent to you, say "xxx moves behind you" - [+] ashkari bug: - [+] when getting enraged by the sight of something, f_rage runs out a few turns before f_aicontrolled. should be the same!!!
2012-11-30 07:18:21 +11:00
// set vault id for each cell (except for ones which were
// previously marked as reusable via RT_REUSABLE)
2011-11-30 13:07:19 +11:00
for (y = miny; y <= maxy; y++) {
for (x = minx; x <= maxx; x++) {
c = getcellat(m, x, y);
- [+] fix carpetted floor colour - [+] bug: giant ant zombie not attacking giant ant - [+] change table symol to PI - [+] replace footstool with chair - [+] allow reusable cells in vaults - [+] slippery floors should make pushing easier - [+] when checking stairs i found "Pete footprints" - [+] new monsters: - [+] polar bear - [+] owlbear - [+] bug: sleeping monsters never waking up. - [+] "random good weapon" wish broken. fixed now. - [+] cope with med/small/large dancing weapons - [+] generice code to check baseid instead of raceid - [+] handle automatic generation - need to populate: - [+] select an appropriate object (rarity freq / common, uncommon, rare) - [+] copy from obejct to lf: - [+] OBHP - [+] SIZE - [+] OBATTACKDELAY - [+] bug: always getting 'twisted branch' for small dancing weapon - [+] bug: crash in attackcell. nweps = 0 - [+] replace thin walls with unicode symbols - [+] glass - [+] wood - [+] metal - [+] getcellglyph() looks at surrounding cells if required - [+] too slow? - [+] attacking helpless undead shouldn't count - [+] differentiate EXTRADAM from WOUNDING. - [+] wounding = add damage to ALL attacks - [+] EXTRADAM = add DIFFERENT type of damage - [+] psionics on levelup - [+] make this a "select from iq/10", not a select from any - [+] if poison needle trap misses, place it on the ground. - [+] no nauseated effects while asleep. - [+] if something runs out of view adjacent to you, say "xxx moves behind you" - [+] ashkari bug: - [+] when getting enraged by the sight of something, f_rage runs out a few turns before f_aicontrolled. should be the same!!!
2012-11-30 07:18:21 +11:00
if (c && c->room) {
2011-11-30 13:07:19 +11:00
c->room->vault = v;
}
}
}
}
int addvaultthing(cell_t *c, vault_t *v, enum VAULTTHING vt, char *what) {
celltype_t *ct;
object_t *o;
lifeform_t *lf;
int rv = B_FALSE;
switch (vt) {
case VT_EXIT:
// mark this position as a room exit
addflag(c->map->flags, F_ROOMEXIT, getroomid(c), c->x, c->y, "from addvaultthing");
break;
- [+] fix carpetted floor colour - [+] bug: giant ant zombie not attacking giant ant - [+] change table symol to PI - [+] replace footstool with chair - [+] allow reusable cells in vaults - [+] slippery floors should make pushing easier - [+] when checking stairs i found "Pete footprints" - [+] new monsters: - [+] polar bear - [+] owlbear - [+] bug: sleeping monsters never waking up. - [+] "random good weapon" wish broken. fixed now. - [+] cope with med/small/large dancing weapons - [+] generice code to check baseid instead of raceid - [+] handle automatic generation - need to populate: - [+] select an appropriate object (rarity freq / common, uncommon, rare) - [+] copy from obejct to lf: - [+] OBHP - [+] SIZE - [+] OBATTACKDELAY - [+] bug: always getting 'twisted branch' for small dancing weapon - [+] bug: crash in attackcell. nweps = 0 - [+] replace thin walls with unicode symbols - [+] glass - [+] wood - [+] metal - [+] getcellglyph() looks at surrounding cells if required - [+] too slow? - [+] attacking helpless undead shouldn't count - [+] differentiate EXTRADAM from WOUNDING. - [+] wounding = add damage to ALL attacks - [+] EXTRADAM = add DIFFERENT type of damage - [+] psionics on levelup - [+] make this a "select from iq/10", not a select from any - [+] if poison needle trap misses, place it on the ground. - [+] no nauseated effects while asleep. - [+] if something runs out of view adjacent to you, say "xxx moves behind you" - [+] ashkari bug: - [+] when getting enraged by the sight of something, f_rage runs out a few turns before f_aicontrolled. should be the same!!!
2012-11-30 07:18:21 +11:00
case VT_REUSABLE:
// this cell doesn't count as part of the room/vault
c->room = NULL;
c->locked = B_FALSE;
break;
2011-11-30 13:07:19 +11:00
case VT_OB:
if (streq(what, "random")) {
o = addrandomob(c);
if (!o) {
rv = B_TRUE;
}
} else {
int placeob = B_TRUE;
// special case: ot_playerstart will only be placed if:
// - game is not already in progress
// - there isn't currently one on the level
if (streq(what, "playerstart")) {
if ((gamemode == GM_GAMESTARTED) || findobinmap(c->map, OT_PLAYERSTART)) {
placeob = B_FALSE;
}
}
if (placeob) {
o = addob(c->obpile, what);
if (!o) {
rv = B_TRUE;
}
}
}
break;
case VT_LF:
- [+] chat->all allies command. - [+] replace 'step carefully' key to free up 's' - OT_A_TIPTOE - [+] 's' = 'shut door' (replace 'c') - [+] 'c' = 'chat to single' - [+] rewrite docomms() to use other funcs - [+] 'C' = 'command all allies' - [+] only possible for single person: - [+] 'o' donate - [+] 'i' tell me about this area - [+] 'j' join me - [+] 'k' trade knowledge - [+] 'm' mercy - [+] 't' trade - [+] 'x' dangers nearby? - [+] make a list of all commands which are valid for EVERYONE - [+] send command to everyone. - [+] docommslf() - [+] test with single target - [+] test with multiple targets - [+] hitconfer lifetime for wight/contagion zombie should only happen on fatal hits - [+] makezombie() should be able to call petify() - [+] bug: mosnters never using HIDE ability. - [+] monsters which pretend to be objects (ie. gargoyle) - [+] F_ISMONSTER v0=raceid v1=objectid, v2 = spot check difficulty - [+] when generating, add contents->first as objectid v1 - [+] getobname -> if you have f_mosnters, use contents->first - [+] getobdesc -> if you have f_mosnters, use contents->first - [+] mosnters won't walk onto it - [+] if you are next to them and can't see them... reveal then attack! - [+] F_ISMONSTER - must always be impassable to everyone!!! - [+] if you try to walk onto it: - [+] "the xxx starts to move!" - [+] kill ob - [+] add lf - [+] they get a free attack - [+] if it takes damage - [+] ... convert. - [+] spot checks to see them. - [+] ...convert. - [+] F_PRETENDSTOBE - mosnters will revert if unseen. - [+] reveal hidden should show them. - [+] gargoyle - [+] stone statues - [+] winged - [+] large - [+] ~37hp - [+] start off as an obejct - [+] wight - [+] rare. - [+] ~26 hp ...TR5 - [+] silent move - [+] dr4 attack (low damage) but.... - [+] any humans killed rise as a wight . - [+] (hitconfer revive). how can i limit hitconfer to a race? maybe f_hitconferrace - [+] bones file - [+] tested ok. - [+] 1 leveldrain per hit - [+] skillcheck to avoid - [+] wight gains +5 hp
2012-12-04 16:15:27 +11:00
lf = addmonster(c, R_SPECIFIED, what, B_TRUE, 1, B_TRUE, B_NOEXTRA, NULL);
2011-11-30 13:07:19 +11:00
if (!lf) {
dblog("invalid racename '%s' in vault %s", what, v->id);
msg("invalid racename '%s' in vault %s", what, v->id);
raise(SIGINT);
2011-11-30 13:07:19 +11:00
rv = B_TRUE;
}
// first lifeform in a shop is the shopkeeper
/*
2011-11-30 13:07:19 +11:00
if (lf && hasflag(v->flags, F_VAULTISSHOP)) {
if (!findshopkeeper(c->map, getroomid(c))) {
givejob(lf, J_SHOPKEEPER);
}
}
*/
if (lf && hasflag(v->flags, F_MONSTERSSTAY)) {
if (!lfhasflag(lf, F_STAYINROOM)) {
addflag(lf->flags, F_STAYINROOM, getroomid(c), B_MAYCHASE, NA, NULL);
}
2011-11-30 13:07:19 +11:00
}
break;
case VT_CELL:
if (streq(what, "EMPTY")) {
ct = findcelltype(getmapempty(c->map));
} else if (streq(what, "SOLID")) {
ct = findcelltype(getmapsolid(c->map));
} else {
ct = findcelltypebyname(what);
}
setcelltype(c, ct ? ct->id : getmapempty(c->map));
2011-11-30 13:07:19 +11:00
break;
default:
break;
}
return rv;
}
void dumpvault(char *name, int rotation) {
int x,y;
char buf[BUFLEN];
char *p;
vault_t *v;
v = findvault(name);
if (v) {
if (rotation >= v->nmaps) {
dblog("vault dump for '%s' failed. vault exists but no such rotation %d (nmaps=%d).",name, rotation, v->nmaps);
}
dblog("start vault dump(%s,rot=%d):",v->id, rotation);
/*
// build up a temp map
for (y = 0; y < v->map[0].h; y++) {
for (x = 0; x < v->map[0].w; x++) {
int offset;
int ch;
ch = getvaultchar(v, x, y, rotation, &offset);
temp[offset] = ch;
}
}
// dump the temp map
x = 0;
y = 0;
strcpy(buf, "");
p = buf;
for (i = 0; i < v->map[rotation].mlen; i++) {
*p = temp[i];
x++;
p++;
if (x >= v->map[rotation].w) {
x = 0;
y++;
*p = '\0';
dblog("%s",buf);
strcpy(buf, "");
p = buf;
}
}
*/
strcpy(buf, "");
p = buf;
for (y = 0; y < v->map[rotation].h; y++) {
for (x = 0; x < v->map[rotation].w; x++) {
*p = getvaultchar(v, x, y, rotation, NULL);
p++;
}
*p = '\0';
dblog("%s",buf);
strcpy(buf, "");
p = buf;
}
dblog("end vault dump");
} else {
dblog("vault dump for '%s' failed. no such vault.",name);
}
}
vault_t *findvault(char *id) {
vault_t *v;
for (v = firstvault ; v ; v = v->next) {
if (!v->valid) continue;
if (streq(v->id, id)) return v;
}
return NULL;
}
vault_t *findvaultbyid(int id) {
vault_t *v;
for (v = firstvault ; v ; v = v->next) {
if (!v->valid) continue;
if (v->numid == id) return v;
}
return NULL;
}
// return a random vault with the given flag.
// don't care about rarity.
vault_t *findvaultwithflag(enum FLAG fid) {
vault_t *v;
vault_t *poss[MAXCANDIDATES];
int nposs = 0;
for (v = firstvault ; v ; v = v->next) {
if (!v->valid) continue;
if (hasflag(v->flags, fid)) poss[nposs++] = v;
}
if (nposs) {
v = poss[rnd(0,nposs-1)];
} else {
v = NULL;
}
return v;
}
- [+] allies should always give out info without payment - [+] ....but only about their home level! - [+] f_startmapid - [+] cave entrances should make noise - [+] drip - [+] echoing - [+] cope with multiple f_makesnoise flags on objects (pick one randomly) - [+] showlfstats skill display bug - "MORE" keystroke doesn't fall through. - [+] You impale the chicken! The chicken turns to face you. - [+] shouldn't turn to face if your'e dead! - [+] nulllify spell not populating seenbyplayer - [+] crash in createfakes() - [+] animals hsould still walk onto SHARP objects. - [+] secret doors showing up as empty remembered cells when you look away from them (and have lowish cartography) - [+] don't call remove_deadends on vaults. - [+] when walking down stairs to level 3: - [+] ERROR - stairs link to existing map 3('dungeon L2 (id #3)', depth 2), but it has no free stairs - [+] ie. Level 3 has too many up staircases ? no. 3 on all of them. - [+] FIXED. countstairs() was including too much. now using countmapobs(map, stairtype) instead. - [+] The goblin rogue a half-sized leather armour (null). - [+] fixed crash when you cast rage on someone who is eating. - [+] crash when catching a glowbug in a flask - [+] use canreachbp code when selecting armour to damage as well.... ie newt can't hit your helmet! - [+] BUG: "tunnel doing up" went down! - [+] for monsters:auto raise lf stats to match starting weapons - [+] crash in aigetspelltarget() for CLIMB - [+] should deactiveate all spells on polymorph - [+] allow usage of FEIGNDEATH while prone. - [+] make coprses non-stackable - [+] CRASH in animatedead - [+] shouldn't say 'you attack x from behind' if x has awareness
2012-01-06 11:20:57 +11:00
// return a random vault with the given tag (ie. f_vaulttag "xxx").
// don't care about rarity.
vault_t *findvaultwithtag(char *tag) {
vault_t *v;
vault_t *poss[MAXCANDIDATES];
int nposs = 0;
for (v = firstvault ; v ; v = v->next) {
if (!v->valid) continue;
if (hasflagval(v->flags, F_VAULTTAG, NA, NA, NA, tag)) poss[nposs++] = v;
}
if (nposs) {
v = poss[rnd(0,nposs-1)];
} else {
v = NULL;
}
return v;
}
// generate vault map 1 as x-flipped map0.
// remember offsets into map[0]
void generatevaultflipsx(vault_t *v) {
int x,y;
v->map[1].mlen = 0;
for (y = 0 ; y < v->map[0].h; y++) {
for (x = v->map[0].w-1; x >= 0; x--) {
int offset;
getvaultchar(v, x, y, 0, &offset);
v->map[1].data[v->map[1].mlen] = offset;
v->map[1].mlen++;
}
}
v->map[1].w = v->map[0].w;
v->map[1].h = v->map[0].h;
v->nmaps = 2;
}
// generate vault map 1 as y-flipped map0.
// remember offsets into map[0]
void generatevaultflipsy(vault_t *v) {
int x,y;
v->map[1].mlen = 0;
for (y = v->map[0].h-1; y >= 0; y--) {
for (x = 0 ; x < v->map[0].w; x++) {
int offset;
getvaultchar(v, x, y, 0, &offset);
v->map[1].data[v->map[1].mlen] = offset;
v->map[1].mlen++;
}
}
v->map[1].w = v->map[0].w;
v->map[1].h = v->map[0].h;
v->nmaps = 2;
}
2011-11-30 13:07:19 +11:00
// generate vault maps 1-3 with offsets into map[0]
void generatevaultrotations(vault_t *v) {
int i;
int x,y;
for (i = 1; i <= 3; i++) {
// rotate 90degrees from previous
v->map[i].mlen = 0;
for (x = 0; x < v->map[i-1].w; x++) {
for (y = v->map[i-1].h-1; y >= 0; y--) {
if (i == 1) { // ie. first rotation
int offset;
getvaultchar(v, x, y, 0, &offset);
v->map[i].data[v->map[i].mlen] = offset;
} else {
v->map[i].data[v->map[i].mlen] = v->map[i-1].data[ y * v->map[i-1].w + x ];
}
v->map[i].mlen++;
}
}
v->map[i].w = v->map[i-1].h;
v->map[i].h = v->map[i-1].w;
v->nmaps++;
}
assert(v->nmaps == 4);
}
void getadjustedcoords(vault_t *v, int origx, int origy, int minx, int miny, int maxx, int maxy, int rotation, int *retx, int *rety) {
int x,y;
int db = B_FALSE;
int w,h;
if (v->map[0].w) {
w = v->map[0].w;
} else {
w = maxx - minx + 1;
}
if (v->map[0].h) {
h = v->map[0].h;
} else {
h = maxy - miny + 1;
}
if (db) dblog("adjustcoords: %d,%d with mapcoord base %d,%d",origx,origy,minx,miny);
// first get coords if this was map #0 (unrotated).
if (origx >= 0) {
x = origx;
} else {
// offset from right. -1 is rightmost.
x = w + origx;
}
if (origy >= 0) {
y = origy;
} else {
// offset from bottom. -1 is bottommost.
y = h + origy;
}
if (db) dblog("adjustcoords: %d,%d translates to vaultcoords %d,%d (vault w=%d,h=%d)",origx,origy,x,y, w, h);
// now rotate them
rotatecoords(&x, &y, v, rotation, NULL);
if (db) dblog("adjustcoords: -> rotated to vaultcoords %d,%d (rotation=%d)",x, y,rotation );
// now change them to map coords rather than vault coords
x += minx;
y += miny;
if (db) dblog("adjustcoords: -> translated to mapcoords %d,%d",x, y);
// return values
*retx = x;
*rety = y;
}
void getboundingbox(int x1, int y1, int x2, int y2, int *retleft, int *rettop, int *retright, int *retbottom) {
int left,right,top,bottom;
if (x1 < x2) {
left = x1;
right = x2;
} else {
left = x2;
right = x1;
}
if (y1 < y2) {
top = y1;
bottom = y2;
} else {
top = y2;
bottom = y1;
}
if (retleft) *retleft = left;
if (retright) *retright = right;
if (rettop) *rettop = top;
if (retbottom) *retbottom = bottom;
}
enum RARITY getvaultrarity(vault_t *v) {
flag_t *f;
f = hasflag(v->flags, F_VAULTRARITY);
if (f) {
return f->val[0];
}
return RR_COMMON;
}
void getvaultwh(vault_t *v, int *w, int *h, int rotation) {
assert(rotation < v->nmaps);
*w = v->map[rotation].w;
*h = v->map[rotation].h;
}
char *getvstatename(enum VAULTSTATE vs) {
switch (vs) {
case VS_ALLOCATED:
return "allocated";
case VS_NOID:
return "no ID";
case VS_LOADING:
return "loading (toplevel)";
case VS_LOADINGMAP:
return "loading map";
case VS_LOADINGLEGEND:
return "loading legend";
case VS_LOADINGFLAGS:
return "loading flags";
default:
break;
}
return "?unknown?";
}
celltype_t *getvaultcelltype(vault_t *v, int x, int y, int rotation) {
char ch;
celltype_t *ct = NULL;
vlegend_t *l;
ch = getvaultchar(v, x, y, rotation, NULL);
// does this char give us a cell?
for (l = v->legend ; l ; l = l->next) {
if ((l->ch == ch) && (l->tt == VT_CELL)) {
ct = findcelltypebyname(l->what);
break;
}
}
return ct;
}
// return that character at position x/y on give map rotation
char getvaultchar(vault_t *v, int x, int y, int rotation, int *map0offset) {
char ch;
int offset;
//rotatecoords(&x, &y, v, rotation, &offset);
assert(rotation < v->nmaps);
offset = y * v->map[rotation].w + x;
if (rotation == 0) {
ch = v->map[0].data[offset];
} else {
ch = v->map[0].data[v->map[rotation].data[offset]];
}
if (map0offset) *map0offset = offset;
return ch;
}
// select a random vault type for the given map
vault_t *getvaulttype(map_t *m) {
vault_t *v;
vault_t *poss[MAXCANDIDATES];
int nposs = 0;
enum RARITY rr = RR_COMMON;
// select random rarity
rr = pickrr(TT_NONE);
while (!nposs) {
for (v = firstvault ; v ; v = v->next) {
if (!v->valid) continue;
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;
}
}
if (nposs > 0) {
return poss[rnd(0,nposs-1)];
}
// if we have no possibilities, lower rarity and try again
if (rr == RR_FREQUENT) {
2011-11-30 13:07:19 +11:00
// give up.
break;
2011-11-30 13:07:19 +11:00
} else {
rr--;
}
}
return NULL;
}
int handleline(vault_t *v, char *line) {
int ok = B_FALSE;
char localline[BUFLEN];
char *command = NULL,*temp;
char *dummy;
char *arg[MAXVAULTARGS];
int nargs = 0;
int i;
int hasfire = B_FALSE;
2011-11-30 13:07:19 +11:00
if (!strlen(line)) return B_FALSE;
if (line[0] == '!') return B_FALSE;
strcpy(localline, line);
if (v->state == VS_LOADINGMAP) {
if (streq(localline, "@end")) {
// go to toplevel loading state
v->state = VS_LOADING;
ok = B_TRUE;
} else if (strstarts(localline, "random(")) {
char *p;
int minw,minh;
p = localline + 7;
if (*p) {
char buf[BUFLEN];
p = readuntil(buf, p, ',');
minw = atoi(buf);
p = readuntil(buf, p, ')');
minh = atoi(buf);
addflag(v->flags, F_VAULTRANDOMMAP, minw, minh, NA, NULL);
} else {
dblog("error - random() map data is missing minw/minh values.");
return B_TRUE;
}
addflag(v->flags, F_VAULTRANDOMMAP, minw, minh, NA, NULL);
ok = B_TRUE;
} else {
// map line definition
if (hasflag(v->flags, F_VAULTRANDOMMAP)) {
dblog("error - map data found after randommap.");
return B_TRUE;
}
// check length
if ((v->map[0].w != 0) && (strlen(localline) != v->map[0].w)) {
dblog("incorrect map line length! %d != %d", strlen(localline), v->map[0].w);
} else {
char *p;
// read a new map line. we already read into map[0].
// the others will be populated automatically if/when we
// add f_vaultmayrotate
for (p = localline ; *p; p++) {
v->map[0].data[v->map[0].mlen] = *p;
v->map[0].mlen++;
}
ok = B_TRUE;
// increase width/height
if (!v->map[0].w) {
v->map[0].w = strlen(localline);
}
v->map[0].h++;
}
}
} else {
// split into command and args
if (strchr(localline, ':')) {
temp = strtok_r(localline, ":", &dummy);
command = strdup(temp);
temp = strtok_r(NULL, ":", &dummy);
while (temp) {
arg[nargs] = strdup(temp);
nargs++;
temp = strtok_r(NULL, ":", &dummy);
}
} else {
command = strdup(localline);
nargs = 0;
}
// process command and args
if (v->state == VS_NOID) { // haven't for our id yet
if (streq(command, "@id")) {
if (!v->id) {
if (nargs == 1) {
- [+] disrupt undead - [+] gust of wind has higher chance of knocking down small creatures - [+] check: ensure vault names have no ' 's - [+] loading bug: celltype id 0 doesn't exist. - [+] loading bug: adding minotair - don't call sethomeroom() - [+] fixed - bones bug: "2 loaves of stale bread" - [+] crash when object thrown away by holy circle dies. - [+] armour with "permenance" cast shouldn't be able to be healed either! - [+] use immutable instead of invulnerable - [+] if you weild your spare weapon (and dont have a spare), remove 'spareweapon' flag! - [+] skoob should be made out of "water", not "ice" (don't want it to have hardness) - [+] change its material - [+] hitting water-based lfs should rust weapon! - [+] rusted weapons should have 10-30% chance of giving tetanus. - [+] low chance of spasm each turn (5%) - [+] "your [xx] spasms/contorts violently!" - [+] hand = drop weapon - [+] leg = fall over - [+] jaw = nothing - [+] back = spine broken, you die - [+] tail = tail broken - [+] chest = rib broken - [+] wings = stop flying - [+] electricity damage confuses robots - [+] poison's power increase chance of its effects happening - [+] whenver tetanus effect fires, increase power. - [+] electric damage spreads through water - [+] create water spell (like grease, but just makes water) - [+] objectgrowth spell shoudl use f_growsto instead of hardcoding - [+] v0 = obid or celltypeid - [+] vt = determines VT_ob or vt_cell - [+] then add shrink spell which uses f_shrinksto - [+] deinfe it - [+] add effects - [+] specail case - brazer -> helmet should be red hot - [+] hecta should mind attacking evil peaceful creatures - [+] ai should still flee with bleeding legs - [+] bandit had 90hp - problem with varlevel!! have changed calculation. - [+] monsters now just get 1 extra hit die per level after the first. - [+] only some branches should use region->depthmod. others only use regiontype->depthmod. - [+] spell: disrupt undead - - [+] announce 'shatter' spell: you hear an ultra=high pitched whining/ringing. - [+] announce'sleep' spell: suddenly, you feel very drowsy. - [+] inducefear: too powerful. tweak skillcheck values. Initial work on baba yaga (sylvan forest boss)
2012-04-02 05:48:13 +10:00
if (strchr(arg[0], ' ')) {
dblog("Vault names may not contain spaces: '%s'.", arg[0]);
return B_TRUE;
} else if (findvault(arg[0])) {
2011-11-30 13:07:19 +11:00
dblog("Duplicate vault id %s", arg[0]);
return B_TRUE;
}
v->id = strdup(arg[0]);
v->state = VS_LOADING;
ok = B_TRUE;
} else {
dblog("invalid syntax for @id");
}
} else {
dblog("@id command found but we already have an id");
}
}
} else if (v->state == VS_LOADING) { // toplevel
if (streq(line, "@map")) {
v->nmaps = 1;
v->state = VS_LOADINGMAP;
ok = B_TRUE;
} else if (streq(line, "@legend")) {
v->state = VS_LOADINGLEGEND;
ok = B_TRUE;
} else if (streq(line, "@flags")) {
v->state = VS_LOADINGFLAGS;
ok = B_TRUE;
}
} else if (v->state == VS_LOADINGLEGEND) {
if (streq(line, "@end")) {
v->state = VS_LOADING;
ok = B_TRUE;
} else {
// legend definition
if (nargs >= 2) {
int pct;
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
enum VAULTTHING tt,tt2;
char what[BUFLEN],what2[BUFLEN];
// default is no alternative
tt2 = VT_NONE;
strcpy(what2, "");
// get ob specification
tt = strtovt(arg[0]);
2011-11-30 13:07:19 +11:00
strcpy(what, arg[1]);
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
if (nargs >= 3) { // ie have a percentage
2011-11-30 13:07:19 +11:00
pct = atoi(arg[2]);
} else {
pct = 100;
}
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
if (nargs == 5) { // have alternative value if percentage fails
tt2 = strtovt(arg[3]);
strcpy(what2, arg[4]);
}
if (nargs == 4) {
dblog("alternative obtype given but no alternative ob text");
} else if (tt == VT_NONE) {
2011-11-30 13:07:19 +11:00
dblog("invalid type in legend definition");
} else {
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
int error = B_FALSE;
if (!real_vaultthingok(tt, what, &hasfire)) {
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
dblog("invalid legend definition: '%s'", line);
error = B_TRUE;
}
if ((tt2 != VT_NONE) && !real_vaultthingok(tt2,what2, &hasfire)) {
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
dblog("invalid legend alternative definition: '%s'", line);
error = B_TRUE;
}
if (!error) {
// validated ok.
addlegend(v, command[0], tt, pct, what, tt2, what2);
ok = B_TRUE;
}
2011-11-30 13:07:19 +11:00
}
- [+] fix carpetted floor colour - [+] bug: giant ant zombie not attacking giant ant - [+] change table symol to PI - [+] replace footstool with chair - [+] allow reusable cells in vaults - [+] slippery floors should make pushing easier - [+] when checking stairs i found "Pete footprints" - [+] new monsters: - [+] polar bear - [+] owlbear - [+] bug: sleeping monsters never waking up. - [+] "random good weapon" wish broken. fixed now. - [+] cope with med/small/large dancing weapons - [+] generice code to check baseid instead of raceid - [+] handle automatic generation - need to populate: - [+] select an appropriate object (rarity freq / common, uncommon, rare) - [+] copy from obejct to lf: - [+] OBHP - [+] SIZE - [+] OBATTACKDELAY - [+] bug: always getting 'twisted branch' for small dancing weapon - [+] bug: crash in attackcell. nweps = 0 - [+] replace thin walls with unicode symbols - [+] glass - [+] wood - [+] metal - [+] getcellglyph() looks at surrounding cells if required - [+] too slow? - [+] attacking helpless undead shouldn't count - [+] differentiate EXTRADAM from WOUNDING. - [+] wounding = add damage to ALL attacks - [+] EXTRADAM = add DIFFERENT type of damage - [+] psionics on levelup - [+] make this a "select from iq/10", not a select from any - [+] if poison needle trap misses, place it on the ground. - [+] no nauseated effects while asleep. - [+] if something runs out of view adjacent to you, say "xxx moves behind you" - [+] ashkari bug: - [+] when getting enraged by the sight of something, f_rage runs out a few turns before f_aicontrolled. should be the same!!!
2012-11-30 07:18:21 +11:00
} else { // special legend types...
2011-11-30 13:07:19 +11:00
if (streq(arg[0], "exit")) {
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
addlegend(v, command[0], VT_EXIT, 100, "", VT_NONE, NULL);
2011-11-30 13:07:19 +11:00
ok = B_TRUE;
- [+] fix carpetted floor colour - [+] bug: giant ant zombie not attacking giant ant - [+] change table symol to PI - [+] replace footstool with chair - [+] allow reusable cells in vaults - [+] slippery floors should make pushing easier - [+] when checking stairs i found "Pete footprints" - [+] new monsters: - [+] polar bear - [+] owlbear - [+] bug: sleeping monsters never waking up. - [+] "random good weapon" wish broken. fixed now. - [+] cope with med/small/large dancing weapons - [+] generice code to check baseid instead of raceid - [+] handle automatic generation - need to populate: - [+] select an appropriate object (rarity freq / common, uncommon, rare) - [+] copy from obejct to lf: - [+] OBHP - [+] SIZE - [+] OBATTACKDELAY - [+] bug: always getting 'twisted branch' for small dancing weapon - [+] bug: crash in attackcell. nweps = 0 - [+] replace thin walls with unicode symbols - [+] glass - [+] wood - [+] metal - [+] getcellglyph() looks at surrounding cells if required - [+] too slow? - [+] attacking helpless undead shouldn't count - [+] differentiate EXTRADAM from WOUNDING. - [+] wounding = add damage to ALL attacks - [+] EXTRADAM = add DIFFERENT type of damage - [+] psionics on levelup - [+] make this a "select from iq/10", not a select from any - [+] if poison needle trap misses, place it on the ground. - [+] no nauseated effects while asleep. - [+] if something runs out of view adjacent to you, say "xxx moves behind you" - [+] ashkari bug: - [+] when getting enraged by the sight of something, f_rage runs out a few turns before f_aicontrolled. should be the same!!!
2012-11-30 07:18:21 +11:00
} else if (streq(arg[0], "reusable")) {
addlegend(v, command[0], VT_REUSABLE, 100, "", VT_NONE, NULL);
ok = B_TRUE;
2011-11-30 13:07:19 +11:00
} else {
dblog("invalid syntax for legend value");
}
}
}
} else if (v->state == VS_LOADINGFLAGS) {
if (streq(line, "@end")) {
v->state = VS_LOADING;
ok = B_TRUE;
} else {
// handle flags
if (strstarts(line, "at(")) {
// at(x,y) type:what[:pct]
int x,y;
enum FLAG flagtype;
char *p;
char buf[BUFLEN];
char thingname[BUFLEN];
enum VAULTTHING vt = VT_NONE;
int pct;
// get x
p = line + 3;
p = readuntil(buf, p, ',');
x = atoi(buf);
// get y
p = readuntil(buf, p, ')');
y = atoi(buf);
// go past whitespace
while (isspace(*p)) p++;
// get type
p = readuntil(buf, p, ':');
if (streq(buf, "ob")) {
vt = VT_OB;
flagtype = F_VAULTATOB;
} else if (streq(buf, "mon") || streq(buf, "lf")) {
vt = VT_LF;
flagtype = F_VAULTATLF;
} else { // ie. cell
vt = VT_CELL;
flagtype = F_VAULTATCELL;
}
// get thing name
p = readuntil(buf, p, ':');
strcpy(thingname, buf);
// optional percent chance
if (*p) {
p = readuntil(buf, p, ':');
pct = atoi(buf);
} else {
pct = 100;
}
if (real_vaultthingok(vt, thingname, &hasfire)) {
2011-11-30 13:07:19 +11:00
addflag(v->flags, flagtype, x, y, pct, thingname);
ok = B_TRUE;
} else {
dblog("invalid at() definition: '%s'", line);
}
} else if (strstarts(line, "atoneof(")) {
// atoneof(x,y)(x,y)(x,y)...(x,y) type:what[:pct]
// can have up to 10 x,y pairs.
int x[10],y[10];
int nposs = 0;
char *p;
char buf[BUFLEN];
char thingname[BUFLEN];
enum VAULTTHING vt = VT_NONE;
int pct;
p = line + 7;
while (*p == '(') {
// go past '('
p++;
// get x
p = readuntil(buf, p, ',');
x[nposs] = atoi(buf);
// get y
p = readuntil(buf, p, ')');
y[nposs] = atoi(buf);
nposs++;
}
// go past whitespace
while (isspace(*p)) p++;
// get type
p = readuntil(buf, p, ':');
if (streq(buf, "ob")) {
vt = VT_OB;
} else if (streq(buf, "mon") || streq(buf, "lf")) {
vt = VT_LF;
} else { // ie. cell
vt = VT_CELL;
}
// get thing name
p = readuntil(buf, p, ':');
strcpy(thingname, buf);
// optional percent chance
if (*p) {
p = readuntil(buf, p, ':');
pct = atoi(buf);
} else {
pct = 100;
}
if (nposs) {
if (real_vaultthingok(vt, thingname, &hasfire)) {
2011-11-30 13:07:19 +11:00
int i;
char locbuf[BUFLEN];
// construct string for all the possible positions
strcpy(buf, "");
for (i = 0; i < nposs; i++) {
snprintf(locbuf, BUFLEN, "(%d,%d)",x[i],y[i]);
strcat(buf, locbuf);
}
snprintf(locbuf, BUFLEN, " %s",thingname);
strcat(buf, locbuf);
addflag(v->flags, F_VAULTATONEOF, vt, pct, NA, buf);
ok = B_TRUE;
} else {
dblog("invalid vaultthing in atoneof() definition: '%s'", line);
}
} else {
dblog("no x/y coords found in atoneof() definition: '%s'", line);
}
} else if (strstarts(line, "exitat(")) { // mark a vault exit
// exitat(x,y)
int x,y;
char *p;
char buf[BUFLEN];
// get x
p = line + 3;
p = readuntil(buf, p, ',');
x = atoi(buf);
// get y
p = readuntil(buf, p, ')');
y = atoi(buf);
addflag(v->flags, F_VAULTEXIT, x, y, NA, NULL);
ok = B_TRUE;
} else if (strstarts(line, "box(")) { // outline region
// box(x,y,x2,y2) type:what[:pct]
// if x2/y2 are negative, count back from w/h. ie x=-1 means 'rightmost cell'
int x1,y1,x2,y2;
enum VAULTTHING thingtype;
char *p;
char buf[BUFLEN];
char thingname[BUFLEN];
int pct;
p = line + 4;
// get x/y
p = readuntil(buf, p, ',');
x1 = atoi(buf);
p = readuntil(buf, p, ',');
y1 = atoi(buf);
// get x2/y2
p = readuntil(buf, p, ',');
x2 = atoi(buf);
p = readuntil(buf, p, ')');
y2 = atoi(buf);
// go past whitespace
while (isspace(*p)) p++;
// get type
p = readuntil(buf, p, ':');
if (streq(buf, "ob")) {
thingtype = VT_OB;
} else if (streq(buf, "mon") || streq(buf, "lf")) {
thingtype = VT_LF;
} else { // ie. cell
thingtype = VT_CELL;
}
// get thing name
p = readuntil(buf, p, ':');
strcpy(thingname, buf);
// optional percent chance
if (*p) {
p = readuntil(buf, p, ':');
pct = atoi(buf);
} else {
pct = 100;
}
if (real_vaultthingok(thingtype, thingname, &hasfire)) {
2011-11-30 13:07:19 +11:00
snprintf(buf, BUFLEN, "%d,%d,%d,%d,%s",x1,y1,x2,y2,thingname);
addflag(v->flags, F_VAULTBOX, thingtype, pct, B_FALSE, buf);
ok = B_TRUE;
} else {
- [+] vault:pub - [+] has lots of recruitable people - [+] plants, magic creatures, etc shoudl have infinite staina - [+] severed fingers/heads are no longer considered "corpses". - [+] new kind of bed: pile of straw - [+] closed shops now work properly. - [+] stench skillcheck (in makenauseated) - announce this differenlty to 'nothing happen's - [+] monsters won't turn to face sounds when fleeing. - [+] increase accuracy for spear, but reduce accuracy when adjacent - [+] why didn't cyborg warrior start with bullwhip equiped?? - [+] isbetterwepthan() should take EXTRADAM flag into account - [+] monster starting skill levels should depend on iq - [+] no sprinting with injured legs - [+] more restructions when stunned: - [+] no throwing - [+] no operating - [+] no firearms - [+] tombstone text: Eaten by a snow troll's halberd - [+] bug: ekrub gained MASSIVE piety when i sacrificed a soldier ant corpse! reduced. - [+] learning certain lore skills should please gods - [+] repairing should take a lot longer. ie. shoudlbn't be able to do it during a fight. - [+] workhelpobs (spanner/needle) should have F_HELPSREPAIR, v0=material, v1=howmuch - [+] continuerepairing() should only fix <skill + helpsrepair> hp per turn. - [+] announce helpsrepair in obdesc - [+] coldroom vault: - [+] ice floor - [+] ice walls - [+] ice pillar - [+] frozen corpses - [+] new job: gladiator - [+] sword - [+] shield - [+] high shield skill - [+] high evasion skill - [+] limited armour skill - [+] net - [+] war cry fairly early on - [+] gust of wind and airblast should drop flying creatures - [+] fall_from_air(). - [+] trigger then when wind-based effects hit. - [+] chance of falling depends on size. - [+] if you polymorph a monster, it should NOT turn back to its original form! - [+] criticals dont seem to be happening any more... fixed - [+] when picking first askcoords target lf, pick the closest - [+] sakcs etc should contain rarer objects. - [+] intelligent ai: if exhausted and in battle, and faster than opponent, flee.??? - [+] easy way to fix reachability: - [+] is there a solid cell which is: - [+] adjacent to both a filled and an unfilled area? - [+] not a fixed vault wall? - [+] if so, just clear it. - [+] genericise getrandomrace flags - [+] some containers should have mini/tiny monsters inside! - [+] f_hashidinglf, v0=rid - [+] if you loot it, monster jumps out - [+] ...and gets a free hit! - [+] perception lets you see the container moving (only if it weighs less than what is inside it) - [+] genericise getrandomcell() with conditionsets. * [+] condset_t - [+] then replace all getrandomadjcell() calls... - [+] remove getrandomroomcells - [+] then remove WE_xxx
2012-11-13 16:04:30 +11:00
dblog("thingok() failed in box definition: '%s'", line);
2011-11-30 13:07:19 +11:00
}
} else if (strstarts(line, "fill(")) { // fill region
// fill(x,y,x2,y2) type:what[:pct]
// if x2/y2 are negative, count back from w/h. ie x=-1 means 'rightmost cell'
int x1,y1,x2,y2;
enum VAULTTHING thingtype;
char *p;
char buf[BUFLEN];
char thingname[BUFLEN];
int pct;
p = line + 5;
// get x/y
p = readuntil(buf, p, ',');
x1 = atoi(buf);
p = readuntil(buf, p, ',');
y1 = atoi(buf);
// get x2/y2
p = readuntil(buf, p, ',');
x2 = atoi(buf);
p = readuntil(buf, p, ')');
y2 = atoi(buf);
// go past whitespace
while (isspace(*p)) p++;
// get type
p = readuntil(buf, p, ':');
if (streq(buf, "ob")) {
thingtype = VT_OB;
} else if (streq(buf, "mon") || streq(buf, "lf")) {
thingtype = VT_LF;
} else { // ie. cell
thingtype = VT_CELL;
}
// get thing name
p = readuntil(buf, p, ':');
strcpy(thingname, buf);
// optional percent chance
if (*p) {
p = readuntil(buf, p, ':');
pct = atoi(buf);
} else {
pct = 100;
}
if (real_vaultthingok(thingtype, thingname, &hasfire)) {
2011-11-30 13:07:19 +11:00
snprintf(buf, BUFLEN, "%d,%d,%d,%d,%s",x1,y1,x2,y2,thingname);
addflag(v->flags, F_VAULTBOX, thingtype, pct, B_TRUE, buf);
ok = B_TRUE;
} else {
- [+] vault:pub - [+] has lots of recruitable people - [+] plants, magic creatures, etc shoudl have infinite staina - [+] severed fingers/heads are no longer considered "corpses". - [+] new kind of bed: pile of straw - [+] closed shops now work properly. - [+] stench skillcheck (in makenauseated) - announce this differenlty to 'nothing happen's - [+] monsters won't turn to face sounds when fleeing. - [+] increase accuracy for spear, but reduce accuracy when adjacent - [+] why didn't cyborg warrior start with bullwhip equiped?? - [+] isbetterwepthan() should take EXTRADAM flag into account - [+] monster starting skill levels should depend on iq - [+] no sprinting with injured legs - [+] more restructions when stunned: - [+] no throwing - [+] no operating - [+] no firearms - [+] tombstone text: Eaten by a snow troll's halberd - [+] bug: ekrub gained MASSIVE piety when i sacrificed a soldier ant corpse! reduced. - [+] learning certain lore skills should please gods - [+] repairing should take a lot longer. ie. shoudlbn't be able to do it during a fight. - [+] workhelpobs (spanner/needle) should have F_HELPSREPAIR, v0=material, v1=howmuch - [+] continuerepairing() should only fix <skill + helpsrepair> hp per turn. - [+] announce helpsrepair in obdesc - [+] coldroom vault: - [+] ice floor - [+] ice walls - [+] ice pillar - [+] frozen corpses - [+] new job: gladiator - [+] sword - [+] shield - [+] high shield skill - [+] high evasion skill - [+] limited armour skill - [+] net - [+] war cry fairly early on - [+] gust of wind and airblast should drop flying creatures - [+] fall_from_air(). - [+] trigger then when wind-based effects hit. - [+] chance of falling depends on size. - [+] if you polymorph a monster, it should NOT turn back to its original form! - [+] criticals dont seem to be happening any more... fixed - [+] when picking first askcoords target lf, pick the closest - [+] sakcs etc should contain rarer objects. - [+] intelligent ai: if exhausted and in battle, and faster than opponent, flee.??? - [+] easy way to fix reachability: - [+] is there a solid cell which is: - [+] adjacent to both a filled and an unfilled area? - [+] not a fixed vault wall? - [+] if so, just clear it. - [+] genericise getrandomrace flags - [+] some containers should have mini/tiny monsters inside! - [+] f_hashidinglf, v0=rid - [+] if you loot it, monster jumps out - [+] ...and gets a free hit! - [+] perception lets you see the container moving (only if it weighs less than what is inside it) - [+] genericise getrandomcell() with conditionsets. * [+] condset_t - [+] then replace all getrandomadjcell() calls... - [+] remove getrandomroomcells - [+] then remove WE_xxx
2012-11-13 16:04:30 +11:00
dblog("thingok failed in fill() definition: '%s'", line);
dblog("failed thingname: '%s'", thingname);
2011-11-30 13:07:19 +11:00
}
} else if (strstarts(line, "scatter(")) { // fill region
// scatter(x,y,x2,y2) type:what:howmany[:pct]
// if x2/y2 are negative, count back from w/h. ie x=-1 means 'rightmost cell'
int x1,y1,x2,y2;
enum VAULTTHING thingtype;
char *p;
char buf[BUFLEN];
char thingname[BUFLEN];
int pct;
int countmin,countmax;
p = line + 8;
// get x/y
p = readuntil(buf, p, ',');
x1 = atoi(buf);
p = readuntil(buf, p, ',');
y1 = atoi(buf);
// get x2/y2
p = readuntil(buf, p, ',');
x2 = atoi(buf);
p = readuntil(buf, p, ')');
y2 = atoi(buf);
// go past whitespace
while (isspace(*p)) p++;
// get type
p = readuntil(buf, p, ':');
if (streq(buf, "ob")) {
thingtype = VT_OB;
} else if (streq(buf, "mon") || streq(buf, "lf")) {
thingtype = VT_LF;
} else { // ie. cell
thingtype = VT_CELL;
}
// get thing name
p = readuntil(buf, p, ':');
strcpy(thingname, buf);
// get count
p = readuntil(buf, p, ':');
// is this a range?
if (strchr(buf, '-') && strchr(buf, '%')) {
dblog("error - scatter() count contains both range and percentage.");
return B_TRUE;
} else if (strchr(buf, '-')) {
char *p2;
char buf2[BUFLENSMALL];
p2 = readuntil(buf2, buf, '-');
countmin = atoi(buf2);
p2 = readuntil(buf2, p2, ':');
countmax = atoi(buf2);
} else if (strchr(buf, '%')) {
char *p2;
p2 = strchr(buf, '%'); // replace % with nul
*p2 = '\0';
countmin = atoi(buf);
countmax = PCT;
} else {
countmin = atoi(buf);
countmax = countmin;
}
// optional percent chance
if (*p) {
p = readuntil(buf, p, ':');
pct = atoi(buf);
} else {
pct = 100;
}
if (real_vaultthingok(thingtype, thingname, &hasfire)) {
2011-11-30 13:07:19 +11:00
snprintf(buf, BUFLEN, "%d,%d,%d,%d,%d-%d,%s",x1,y1,x2,y2,countmin,countmax,thingname);
addflag(v->flags, F_VAULTSCATTER, thingtype, pct, NA, buf);
ok = B_TRUE;
} else {
dblog("invalid scatter() definition: '%s'", line);
}
} else if (strstarts(line, "autodoors")) {
char *p;
int pct = 100;
p = line + 9;
if (*p == ':') {
char buf[BUFLEN];
p++;
p = readuntil(buf, p, ','); // really jsut want EOL
pct = atoi(buf);
}
addflag(v->flags, F_AUTODOORS, pct, NA, NA, NULL);
ok = B_TRUE;
} else if (streq(line, "autopop")) {
addflag(v->flags, F_AUTOPOPULATE, B_TRUE, NA, NA, NULL);
ok = B_TRUE;
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
} else if (strstarts(line, "cellempty")) {
char *p;
p = line + strlen("cellempty");
if (*p == ':') {
char buf[BUFLEN];
celltype_t *ct;
p++;
p = readuntil(buf, p, ','); // eol
// validate celltype name
ct = findcelltypebyname(buf);
if (ct) {
addflag(v->flags, F_CELLTYPEEMPTY, ct->id, NA, NA, NULL);
ok = B_TRUE;
} else {
dblog("invalid celltype specified in cellempty definition: '%s'", line);
}
} else {
dblog("syntax error in cellempty definition: '%s'", line);
}
} else if (strstarts(line, "cellsolid")) {
char *p;
p = line + strlen("cellsolid");
if (*p == ':') {
char buf[BUFLEN];
celltype_t *ct;
p++;
p = readuntil(buf, p, ','); // eol
// validate celltype name
ct = findcelltypebyname(buf);
if (ct) {
addflag(v->flags, F_CELLTYPESOLID, ct->id, NA, NA, NULL);
ok = B_TRUE;
} else {
dblog("invalid celltype specified in cellsolid definition: '%s'", line);
}
} else {
dblog("syntax error in cellsolid definition: '%s'", line);
}
2011-11-30 13:07:19 +11:00
} else if (strstarts(line, "dlevmax")) {
// dlevmax:max
char *p;
p = line + 7;
if (*p == ':') {
int lev;
char buf[BUFLEN];
p++;
p = readuntil(buf, p, ','); // eol
lev = atoi(buf);
addflag(v->flags, F_VAULTDLEVMAX, lev, NA, NA, NULL);
ok = B_TRUE;
} else {
dblog("invalid dlevmax definition: '%s'", line);
}
} else if (strstarts(line, "dlevmin")) {
// dlevmin:min
char *p;
p = line + 7;
if (*p == ':') {
int lev;
char buf[BUFLEN];
p++;
p = readuntil(buf, p, ','); // eol
lev = atoi(buf);
addflag(v->flags, F_VAULTDLEVMIN, lev, NA, NA, NULL);
ok = B_TRUE;
} else {
dblog("invalid dlevmin definition: '%s'", line);
}
} else if (strstarts(line, "entertext")) {
char *p;
p = line + 9;
if (*p == ':') {
char buf[BUFLEN];
p++;
p = readuntil(buf, p, ','); // really jsut want EOL
if (strlen(buf)) {
addflag(v->flags, F_VAULTENTERTEXT, NA, NA, NA, buf);
ok = B_TRUE;
} else {
dblog("invalid entertext definition: '%s' (arglen is 0)",line);
}
} else {
dblog("missing entertext definition: '%s'", line);
}
} else if (strstarts(line, "goesin")) {
char *p;
p = line + 6;
if (*p == ':') {
habitat_t *h;
char buf[BUFLEN];
p++;
p = readuntil(buf, p, ','); // really jsut want EOL
h = findhabitatbyname(buf);
if (h) {
addflag(v->flags, F_VAULTGOESIN, h->id, NA, NA, NULL);
ok = B_TRUE;
} else {
dblog("invalid goesin() definition: '%s' [BAD HABITAT]", line);
}
} else {
dblog("invalid goesin() definition: '%s'", line);
}
- [+] if you cancel a limited wish, don't age you. - [+] sourges shouldn't learn spells from books - [+] MR doesn't affect canwill spells? - [+] innate MR (ie. fromrace or from scource) doesn't affect spells either. - [+] too many potions of water! made it common rather than frequent. now NO frequent potions. - [+] getting 'wake t someone runmmaging through your pack' when noone nearby - [+] maybe this flag isn't gettginre removed properly? - [+] polymorph should fix injuries first * [+] for missing hand injuries, select the hand AFTER main switch() * [+] shouldn't be able to weild 2-handed weapons if you only have 1 hand!!! - [+] "travel" spell should let you go to RT_HABITAT things. - [+] fix crash validating f_spotted flag - [+] don't always put "The " on unique objects. - [+] use F_THE for this instead. - [+] godstones should still have F_THE - [+] don't place staircases inside MAINTAINEDGE vaults!! - [+] burning a wood floor only makes a hole in the ground if there are more levels underneath! - [+] end of caves: - [+] both bossrooms should have goblin king and red wyrmling - [+] stone key. - [+] need a vault flag which say s: add f_stayinroom to everyone who is created in this room - [+] done: "keepmonsinroom" - [+] cope with a branch's entry stairs coming from a vault - [+] killing unique monsters with necrotic damage should still leave a corpse. - [+] make "ornate chest" which has rare objects - [+] put it in branch endings and make it a rare object - [+] f_extrainfo in fireat() should show damage _after_ adjustment - [+] BUG: swamp rooms aren't connected!!!! - [+] end of forest branch: - [+] vault containing baba yaga's hut - [+] bone fence around it - [+] skeletons - [+] the hut. - [+] baba yaga's hut - [+] cabin on chicken legs - [+] f_timid! - [+] jump - [+] claw attacks - [+] walks around - [+] corpsetype = link to inside the hut - [+] made of dragonwood (ie. hardness 5) - [+] Don't say "You kill the walking hut". - [+] text when it dies: "Exhausted, the hut slumps to the ground." - [+] inside the hut = small level with baba yaga - [+] new regiontype: babayaga's hut - [+] new habitat: byhut - [+] making the habitat: only has a single vault. (one with tag 'byhut') - [+] diff layouts - [+] circular - [+] square - [+] baba yaga herself - [+] baba yaga - [+] weighs 50kg - [+] obs: - [+] key! - [+] hp: 135 = 22 hitdice (d6) - [+] 75% magic resistance - [+] attribs - [+] str: exhigh - [+] iq: exhigh - [+] wis: exhigh - [+] agi: average - [+] con: high - [+] cha: exlow - [+] fire, cold, magic, poison resist - [+] immune to necrotic - [+] abilities - [+] seeinvis - [+] awareness - [+] claw/teeth attacks. - [+] claw = 8 DR - [+] teeth = 6 DR - [+] maxattacks = 2 - [+] grab ability - [+] spells?????? - [+] fear - [+] weaken - [+] summon insects/animals - [+] entangle - [+] blink - [+] when she dies, unlock the hut door. - [+] delving code. - [+] new digging code: - [+] delve() - [+] delve_pullcell - [+] etc - [+] h_antnest - [+] creaetantnest calls delve() functions. - [+] insert this in the main dungeon somewhere - [+] populate with monsters (set rarity) - [+] place queen ant on the map. - [+] via new regionthing type RT_LF - [+] branch ends should have a boss with a key! - [+] jimbo - [+] babayaga - [+] cave boss (dragon ?)
2012-04-04 19:59:48 +10:00
} else if (streq(line, "keepmonsinroom")) {
addflag(v->flags, F_STAYINROOM, NA, B_MAYCHASE, NA, NULL);
- [+] if you cancel a limited wish, don't age you. - [+] sourges shouldn't learn spells from books - [+] MR doesn't affect canwill spells? - [+] innate MR (ie. fromrace or from scource) doesn't affect spells either. - [+] too many potions of water! made it common rather than frequent. now NO frequent potions. - [+] getting 'wake t someone runmmaging through your pack' when noone nearby - [+] maybe this flag isn't gettginre removed properly? - [+] polymorph should fix injuries first * [+] for missing hand injuries, select the hand AFTER main switch() * [+] shouldn't be able to weild 2-handed weapons if you only have 1 hand!!! - [+] "travel" spell should let you go to RT_HABITAT things. - [+] fix crash validating f_spotted flag - [+] don't always put "The " on unique objects. - [+] use F_THE for this instead. - [+] godstones should still have F_THE - [+] don't place staircases inside MAINTAINEDGE vaults!! - [+] burning a wood floor only makes a hole in the ground if there are more levels underneath! - [+] end of caves: - [+] both bossrooms should have goblin king and red wyrmling - [+] stone key. - [+] need a vault flag which say s: add f_stayinroom to everyone who is created in this room - [+] done: "keepmonsinroom" - [+] cope with a branch's entry stairs coming from a vault - [+] killing unique monsters with necrotic damage should still leave a corpse. - [+] make "ornate chest" which has rare objects - [+] put it in branch endings and make it a rare object - [+] f_extrainfo in fireat() should show damage _after_ adjustment - [+] BUG: swamp rooms aren't connected!!!! - [+] end of forest branch: - [+] vault containing baba yaga's hut - [+] bone fence around it - [+] skeletons - [+] the hut. - [+] baba yaga's hut - [+] cabin on chicken legs - [+] f_timid! - [+] jump - [+] claw attacks - [+] walks around - [+] corpsetype = link to inside the hut - [+] made of dragonwood (ie. hardness 5) - [+] Don't say "You kill the walking hut". - [+] text when it dies: "Exhausted, the hut slumps to the ground." - [+] inside the hut = small level with baba yaga - [+] new regiontype: babayaga's hut - [+] new habitat: byhut - [+] making the habitat: only has a single vault. (one with tag 'byhut') - [+] diff layouts - [+] circular - [+] square - [+] baba yaga herself - [+] baba yaga - [+] weighs 50kg - [+] obs: - [+] key! - [+] hp: 135 = 22 hitdice (d6) - [+] 75% magic resistance - [+] attribs - [+] str: exhigh - [+] iq: exhigh - [+] wis: exhigh - [+] agi: average - [+] con: high - [+] cha: exlow - [+] fire, cold, magic, poison resist - [+] immune to necrotic - [+] abilities - [+] seeinvis - [+] awareness - [+] claw/teeth attacks. - [+] claw = 8 DR - [+] teeth = 6 DR - [+] maxattacks = 2 - [+] grab ability - [+] spells?????? - [+] fear - [+] weaken - [+] summon insects/animals - [+] entangle - [+] blink - [+] when she dies, unlock the hut door. - [+] delving code. - [+] new digging code: - [+] delve() - [+] delve_pullcell - [+] etc - [+] h_antnest - [+] creaetantnest calls delve() functions. - [+] insert this in the main dungeon somewhere - [+] populate with monsters (set rarity) - [+] place queen ant on the map. - [+] via new regionthing type RT_LF - [+] branch ends should have a boss with a key! - [+] jimbo - [+] babayaga - [+] cave boss (dragon ?)
2012-04-04 19:59:48 +10:00
ok = B_TRUE;
} else if (streq(line, "maintainedge")) {
addflag(v->flags, F_MAINTAINEDGE, B_TRUE, NA, NA, NULL);
ok = B_TRUE;
- [+] if you cancel a limited wish, don't age you. - [+] sourges shouldn't learn spells from books - [+] MR doesn't affect canwill spells? - [+] innate MR (ie. fromrace or from scource) doesn't affect spells either. - [+] too many potions of water! made it common rather than frequent. now NO frequent potions. - [+] getting 'wake t someone runmmaging through your pack' when noone nearby - [+] maybe this flag isn't gettginre removed properly? - [+] polymorph should fix injuries first * [+] for missing hand injuries, select the hand AFTER main switch() * [+] shouldn't be able to weild 2-handed weapons if you only have 1 hand!!! - [+] "travel" spell should let you go to RT_HABITAT things. - [+] fix crash validating f_spotted flag - [+] don't always put "The " on unique objects. - [+] use F_THE for this instead. - [+] godstones should still have F_THE - [+] don't place staircases inside MAINTAINEDGE vaults!! - [+] burning a wood floor only makes a hole in the ground if there are more levels underneath! - [+] end of caves: - [+] both bossrooms should have goblin king and red wyrmling - [+] stone key. - [+] need a vault flag which say s: add f_stayinroom to everyone who is created in this room - [+] done: "keepmonsinroom" - [+] cope with a branch's entry stairs coming from a vault - [+] killing unique monsters with necrotic damage should still leave a corpse. - [+] make "ornate chest" which has rare objects - [+] put it in branch endings and make it a rare object - [+] f_extrainfo in fireat() should show damage _after_ adjustment - [+] BUG: swamp rooms aren't connected!!!! - [+] end of forest branch: - [+] vault containing baba yaga's hut - [+] bone fence around it - [+] skeletons - [+] the hut. - [+] baba yaga's hut - [+] cabin on chicken legs - [+] f_timid! - [+] jump - [+] claw attacks - [+] walks around - [+] corpsetype = link to inside the hut - [+] made of dragonwood (ie. hardness 5) - [+] Don't say "You kill the walking hut". - [+] text when it dies: "Exhausted, the hut slumps to the ground." - [+] inside the hut = small level with baba yaga - [+] new regiontype: babayaga's hut - [+] new habitat: byhut - [+] making the habitat: only has a single vault. (one with tag 'byhut') - [+] diff layouts - [+] circular - [+] square - [+] baba yaga herself - [+] baba yaga - [+] weighs 50kg - [+] obs: - [+] key! - [+] hp: 135 = 22 hitdice (d6) - [+] 75% magic resistance - [+] attribs - [+] str: exhigh - [+] iq: exhigh - [+] wis: exhigh - [+] agi: average - [+] con: high - [+] cha: exlow - [+] fire, cold, magic, poison resist - [+] immune to necrotic - [+] abilities - [+] seeinvis - [+] awareness - [+] claw/teeth attacks. - [+] claw = 8 DR - [+] teeth = 6 DR - [+] maxattacks = 2 - [+] grab ability - [+] spells?????? - [+] fear - [+] weaken - [+] summon insects/animals - [+] entangle - [+] blink - [+] when she dies, unlock the hut door. - [+] delving code. - [+] new digging code: - [+] delve() - [+] delve_pullcell - [+] etc - [+] h_antnest - [+] creaetantnest calls delve() functions. - [+] insert this in the main dungeon somewhere - [+] populate with monsters (set rarity) - [+] place queen ant on the map. - [+] via new regionthing type RT_LF - [+] branch ends should have a boss with a key! - [+] jimbo - [+] babayaga - [+] cave boss (dragon ?)
2012-04-04 19:59:48 +10:00
} else if (strstarts(line, "nostairs")) {
addflag(v->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
ok = B_TRUE;
2011-11-30 13:07:19 +11:00
} else if (strstarts(line, "margin")) {
char *p;
p = line + 6;
if (*p == ':') {
char buf[BUFLEN];
int xmargin,ymargin;
p++;
p = readuntil(buf, p, ',');
xmargin = atoi(buf);
p = readuntil(buf, p, ','); // really EOL
ymargin = atoi(buf);
addflag(v->flags, F_KEEPMARGIN, xmargin, ymargin, NA, NULL);
ok = B_TRUE;
} else {
dblog("invalid margin flag: '%s'", line);
}
} else if (streq(line, "mayrotate")) {
if (hasflag(v->flags, F_VAULTMAYFLIPX) || hasflag(v->flags, F_VAULTMAYFLIPY)) {
dblog("vault can only have one of mayrotate / mayflipx / mayflipy.");
} else if (v->nmaps == 1) {
2011-11-30 13:07:19 +11:00
addflag(v->flags, F_VAULTMAYROTATE, B_TRUE, NA, NA, NULL);
// now generate rotated versions
generatevaultrotations(v);
ok = B_TRUE;
} else {
dblog("vault flag mayrotate isnt valid for vaults with random maps.");
}
} else if (streq(line, "mayflipx")) {
if (hasflag(v->flags, F_VAULTMAYROTATE) || hasflag(v->flags, F_VAULTMAYFLIPY)) {
dblog("vault can only have one of mayrotate / mayflipx / mayflipy.");
} else if (v->nmaps == 1) {
addflag(v->flags, F_VAULTMAYFLIPX, B_TRUE, NA, NA, NULL);
// now generate rotated versions
generatevaultflipsx(v);
ok = B_TRUE;
} else {
dblog("vault flag mayflipx isnt valid for vaults with random maps.");
}
} else if (streq(line, "mayflipy")) {
if (hasflag(v->flags, F_VAULTMAYROTATE) || hasflag(v->flags, F_VAULTMAYFLIPX)) {
dblog("vault can only have one of mayrotate / mayflipx / mayflipy.");
} else if (v->nmaps == 1) {
addflag(v->flags, F_VAULTMAYFLIPY, B_TRUE, NA, NA, NULL);
// now generate rotated versions
generatevaultflipsy(v);
ok = B_TRUE;
} else {
dblog("vault flag mayflipy isnt valid for vaults with random maps.");
}
} else if (streq(line, "monstersstay")) {
addflag(v->flags, F_MONSTERSSTAY, B_TRUE, NA, NA, NULL);
ok = B_TRUE;
2011-11-30 13:07:19 +11:00
} else if (streq(line, "nolink")) {
addflag(v->flags, F_VAULTNOLINK, B_TRUE, NA, NA, NULL);
ok = B_TRUE;
} else if (streq(line, "norandom")) {
addflag(v->flags, F_NORANDOM, B_TRUE, NA, NA, NULL);
addflag(v->flags, F_VAULTRARITY, RR_NEVER, NA, NA, NULL);
ok = B_TRUE;
} else if (strstarts(line, "rarity")) {
char *p;
p = line + 6;
if (*p == ':') {
char buf[BUFLEN];
p++;
p = readuntil(buf, p, ','); // really EOL
if (streq(buf, "frequent")) {
addflag(v->flags, F_VAULTRARITY, RR_FREQUENT, NA, NA, NULL);
ok = B_TRUE;
} else if (streq(buf, "common")) {
addflag(v->flags, F_VAULTRARITY, RR_COMMON, NA, NA, NULL);
ok = B_TRUE;
} else if (streq(buf, "uncommon")) {
addflag(v->flags, F_VAULTRARITY, RR_UNCOMMON, NA, NA, NULL);
ok = B_TRUE;
} else if (streq(buf, "rare")) {
addflag(v->flags, F_VAULTRARITY, RR_RARE, NA, NA, NULL);
ok = B_TRUE;
} else if (streq(buf, "vrare") || streq(buf, "veryrare")) {
addflag(v->flags, F_VAULTRARITY, RR_VERYRARE, NA, NA, NULL);
ok = B_TRUE;
} else if (streq(buf, "never")) {
addflag(v->flags, F_VAULTRARITY, RR_NEVER, NA, NA, NULL);
ok = B_TRUE;
} else {
dblog("invalid rarity value: '%s'", line);
}
} else {
dblog("invalid rarity flag: '%s'", line);
}
} else if (streq(line, "playerstart")) {
addflag(v->flags, F_VAULTISPLAYERSTART, B_TRUE, NA, NA, NULL);
ok = B_TRUE;
/*
2011-11-30 13:07:19 +11:00
} else if (streq(line, "shop")) {
addflag(v->flags, F_VAULTISSHOP, B_TRUE, NA, NA, NULL);
ok = B_TRUE;
*/
- [+] allies should always give out info without payment - [+] ....but only about their home level! - [+] f_startmapid - [+] cave entrances should make noise - [+] drip - [+] echoing - [+] cope with multiple f_makesnoise flags on objects (pick one randomly) - [+] showlfstats skill display bug - "MORE" keystroke doesn't fall through. - [+] You impale the chicken! The chicken turns to face you. - [+] shouldn't turn to face if your'e dead! - [+] nulllify spell not populating seenbyplayer - [+] crash in createfakes() - [+] animals hsould still walk onto SHARP objects. - [+] secret doors showing up as empty remembered cells when you look away from them (and have lowish cartography) - [+] don't call remove_deadends on vaults. - [+] when walking down stairs to level 3: - [+] ERROR - stairs link to existing map 3('dungeon L2 (id #3)', depth 2), but it has no free stairs - [+] ie. Level 3 has too many up staircases ? no. 3 on all of them. - [+] FIXED. countstairs() was including too much. now using countmapobs(map, stairtype) instead. - [+] The goblin rogue a half-sized leather armour (null). - [+] fixed crash when you cast rage on someone who is eating. - [+] crash when catching a glowbug in a flask - [+] use canreachbp code when selecting armour to damage as well.... ie newt can't hit your helmet! - [+] BUG: "tunnel doing up" went down! - [+] for monsters:auto raise lf stats to match starting weapons - [+] crash in aigetspelltarget() for CLIMB - [+] should deactiveate all spells on polymorph - [+] allow usage of FEIGNDEATH while prone. - [+] make coprses non-stackable - [+] CRASH in animatedead - [+] shouldn't say 'you attack x from behind' if x has awareness
2012-01-06 11:20:57 +11:00
} else if (strstarts(line, "tag:")) {
char *p;
p = line + 4;
addflag(v->flags, F_VAULTTAG, B_TRUE, NA, NA, p);
ok = B_TRUE;
- [+] add f_nostam to undead. - [+] add nonausea rather than nosmell sometimes. - [+] rats should eb able to smell, but not get nauseated. - [+] fix triumph pleasure for bjorn. must be no monsters within LOF... or within radius ? - [+] and make it very low piety gain. - [+] remember which level we got flags form - [+] flag_t -> fromlev - [+] announce this in getflagcourse - [+] undead qualities - [+] no criticals - [+] don't naturally heal - [+] don't breath - [+] drainlevel(fromlf) - [+] check for dtresist necrotic - [+] fitness saving throw (difficulty is 100 + fromlf's level*6) - [+] call loselevel() - [+] loselevel() - [+] announce. - [+] drop maxhp. - [+] adjust hp appropriately - [+] lose any flags where >fromlev is too high. - [+] handle monk f_hasattack specially. - [+] getmonkdr(level) - [+] getmonkattacks(level) - [+] keep track of what stats we gained and lose them again. - [+] TEST level drain with cursed xp pot - [+] TEST level drain with stats... - [+] prevent drinking when wearing full-face masks like gas mask/football helmet - [+] implement f_COVERSFACE. - [+] add it to objects. - [+] check it when doing caneat() candrink() - [+] up their AC bonus too - [+] large scorpion - [+] hellhound - [+] large primalities - [+] new vault flag: usehabitat:xxx - [+] means "set the habitat of all vault cells to xxx" - [+] real_getrandomob() should be given a CELL, not MAP. - [+] getrandomobofclass() should be given a CELL, not MAP. - [+] use CELL habitat to determine random obs - [+] apply to caves - [+] vault scatter: ignore locked cells (ie. reusable ones) new vaults - [+] dualroom - [+] sauna - vhot! - [+] pentagram and demons new pionic spells - [+] chi bolt - low dam ranged attack 1d4 - [+] chi strike (l4) - add 1d4 explosive damage to melee hits
2012-12-03 16:12:29 +11:00
} else if (strstarts(line, "usehabitat")) {
char *p;
p = line + strlen("usehabitat");
if (*p == ':') {
habitat_t *h;
char buf[BUFLEN];
p++;
p = readuntil(buf, p, ','); // really jsut want EOL
h = findhabitatbyname(buf);
if (h) {
if (hasflag(v->flags, F_VAULTHABITAT)) {
dblog("multiple usehabitat definitions found: '%s'", line);
} else {
addflag(v->flags, F_VAULTHABITAT, h->id, NA, NA, NULL);
ok = B_TRUE;
}
} else {
dblog("invalid usehabitat() definition: '%s' [BAD HABITAT]", line);
}
} else {
dblog("invalid usehabitat() definition: '%s'", line);
}
2011-11-30 13:07:19 +11:00
}
}
}
}
// free args
if (command) free(command);
for (i = 0; i < nargs; i++) {
free(arg[i]);
}
if (ok) {
// remember if the vault has objects made of fire
if (hasfire && !hasflag(v->flags, F_VAULTHASFIRE)) {
addflag(v->flags, F_VAULTHASFIRE, B_TRUE, NA, NA, NULL);
}
} else {
2011-11-30 13:07:19 +11:00
dblog("[vault:%s/%s] Invalid line: [%s]",
(v->state == VS_NOID) ? "no_id" : v->id,
getvstatename(v->state), line);
return B_TRUE;
}
return B_FALSE;
}
void killlegend(vlegend_t *l) {
vlegend_t *nextone,*lastone;
if (l->what) free(l->what);
- [+] glorana doesn't like you attacking during Glorana's Peace - [+] make more shops let you donate - [+] bookstore - [+] jewellery store - [+] rename blood hawk to hunting hawk - [+] offering a bribe to creatures should make them move likely to helkp you, AND reset the "auto don't help' flag - [+] change "get lost " message to "get lost, <racename>" if your race is different. - [+] sayphrase() needs a new arg: lifeform_t *talkingto - [+] colours for spell effect. - [+] eg. "the flame dart hits xxx" should use CC_BAD - [+] muddy room - mud should be immutable. - [+] maybe change rage - you lose control totally and just attack anything in sight? - [+] do it. - [+] don't train when enraged - [+] don't hear sounds when enraged - [+] RAGE effects: strength bonus, accuracy bonus, infinite stamina, never flee, - [+] fix bug in skill point calculation - [+] CRASH - someone got their turn BEFORE the player! - [+] new poisontype field - contracttext - [+] hecta's pray effect not working. - [+] adjust food poisioning check difficulty based on food age - [+] check OBHP percentage of max. - [+] >= 80% obhp means -30% difficulty check - [+] ring of unholiness should confer dtvuln holy. - [+] fix colour on spellclouds - [+] fix bug with spellclouds not affecting centre cell. - [+] if you are frozen, heat does extra damage and cold does none. - [+] when frozen, lessen chance of melting. - [+] reduce bite damage of snakes - [+] balaclava should protect from gas - [+] make some floor types (like carpet) be multicoloured - [+] celltype->altcolour - [+] if altcolour is not C_NONE then use it where (x + y) % 2 is true. - [+] don't regain stamina while training - [+] random text in shops - sayphrase needs to cope with lf == null - [+] done - [+] fixed - hecta gifted me with a bamboo staff, but i'm inept with staves! - [+] BUG: in vault.vlt. - [+] "30% chance of door" really means "otherwise empty cell" - [+] need to be able to say "else put a wall here" - [+] so change: - [+] c:type:what[:pct] - [+] to this: - [+] c:type:what[:pct][:alttype:altwhat] - [+] vlegend_t needs - [+] enum VAULTTHING tt2 - [+] char *what2 - [+] they default to VT_NONE, NULL - [+] secret doors should take their fake wall type from the vault spec - [+] vaults need f_celltypeempty/solid flags - [+] add via: solid:xxx in vault def - [+] recycler - [+] donate anything
2012-07-15 15:01:58 +10:00
if (l->what2) free(l->what2);
2011-11-30 13:07:19 +11:00
// deallocate
nextone = l->next;
if (nextone != NULL) {
nextone->prev = l->prev;
} else { /* last */
l->vault->lastlegend = l->prev;
}
if (l->prev == NULL) {
/* first */
nextone = l->next;
l->vault->legend = nextone;
free(l);
} else {
lastone = l->prev;
free (lastone->next );
lastone->next = nextone;
}
}
void killvault(vault_t *v) {
vault_t *nextone,*lastone;
if (!v) return;
if (v->id) free(v->id);
- [+] make zombies eat flesh. - [+] warn before eating your own kind if it will anger your god, and you wisdom is high. - [+] make disease way worse if you eat your own race's corpse! - [+] CRASH when i try to cook firebug corpse * [+] bones files: - [+] when your leg is bleeding, don't lose hp for ATTACKING, only for MOVING. - [+] bug: issue with skill display if you learn higher than your max level by reading a book! - [+] in this case, reading the book should fail. - [+] when you start worshipping felix, allow you to learn lockpicking & thievery to full level! - [+] infinite loop when an ashkari enters rage while already eating. - [+] felix prayer should always unlock all nearby doors - [+] if you add f_calwill xxx, v1=112312 v2=NA, make v2 = v1. - [+] that way we can confer it! - [+] say "this is xxx!" after wearing a new amulet. - [+] fork / knife should make you eat faster. - [+] double the hp of most armour again AMULETS - [+] add new bodypart = neck - [+] object hiddennames * [+] nouns * [+] adjectives - [+] flight (canwill fly) - [+] enhance spell power - [+] victimization (makes everything hostile) (no auto id) - [+] blinking - [+] anger (canwill rage) - [+] vs poison (poison immune) - [+] vs magic (magic resistance) - [+] common - [+] feather fall (dt_fall dmg = 0) - [+] don't "slam into the ground", just "float gently to the ground" - [+] of amplification (boost listening skillchecks, allow you to listen at stairs) - [+] peaceful sleep (don't get woken up by sound, cursed) - [+] chef's amulet(lower metabolism) - [+] thief's amulet (lockpicking)
2012-03-05 21:31:21 +11:00
if (v->filename) free(v->filename);
2011-11-30 13:07:19 +11:00
while (v->legend) {
killlegend(v->legend);
}
killflagpile(v->flags);
- [+] weapon skill of sk_skilled or high gives you a chance to block some damtypes - [+] BUT each weapon can only block certain damtypes (whereas shields can block all melee damtypes) - [+] add f_canblock to some weapons - [+] add f_canblock to shields - [+] check_for_block() should be a function - [+] getallshields() - [+] move othermod in SC_SHIELDBLOCK out of skillcheck(). calculate the bonus beforehand instead?? - [+] update descriptions for weapon skills - [+] can only block if you have full attrib requirements for this weapon - [+] update io.c to show what weapons/shields can block. "it can block xx, xx and xx damage" - [+] weapons can't ever block projectiles - [+] make pickup/drop actions heaps faster - [+] better description of agi/str affecting weapon accuracy/dam - [+] stinkbeetle should be hostile, and should have bite attack ,not zapper - [+] don't recover stamina while training - [+] add seetext for "a blaring siren" - [+] draw up a matrix for weapon types - [+] draw it up for: - [+] accuracy - [+] damage - [+] attack speed - [+] crit chance - [+] then adjust weapon stats - [+] in shops, "?" now lets you examine an object - [+] add canwill option for abilities: "stamcost:" (to override stamina cost) - [+] add it. - [+] bug: pickaxe not working - [+] "you start digging". but nothign more. - [+] salt kills: - [+] frog - [+] impaler frog - [+] canwill jump - [+] ranged tongue attack - [+] killed by salt - [+] BUG; getting manuals with no contents - [+] odd-sized armour should cost more. - [+] need to set statdirty when we change armour. - [+] when we say "you see x and y here", don't include obs we can't see
2011-12-13 03:40:17 +11:00
v->flags = NULL;
2011-11-30 13:07:19 +11:00
// deallocate
nextone = v->next;
if (nextone != NULL) {
nextone->prev = v->prev;
} else { /* last */
lastvault = v->prev;
}
if (v->prev == NULL) {
/* first */
nextone = v->next;
firstvault = nextone;
free(v);
} else {
lastone = v->prev;
free (lastone->next );
lastone->next = nextone;
}
}
- [+] make zombies eat flesh. - [+] warn before eating your own kind if it will anger your god, and you wisdom is high. - [+] make disease way worse if you eat your own race's corpse! - [+] CRASH when i try to cook firebug corpse * [+] bones files: - [+] when your leg is bleeding, don't lose hp for ATTACKING, only for MOVING. - [+] bug: issue with skill display if you learn higher than your max level by reading a book! - [+] in this case, reading the book should fail. - [+] when you start worshipping felix, allow you to learn lockpicking & thievery to full level! - [+] infinite loop when an ashkari enters rage while already eating. - [+] felix prayer should always unlock all nearby doors - [+] if you add f_calwill xxx, v1=112312 v2=NA, make v2 = v1. - [+] that way we can confer it! - [+] say "this is xxx!" after wearing a new amulet. - [+] fork / knife should make you eat faster. - [+] double the hp of most armour again AMULETS - [+] add new bodypart = neck - [+] object hiddennames * [+] nouns * [+] adjectives - [+] flight (canwill fly) - [+] enhance spell power - [+] victimization (makes everything hostile) (no auto id) - [+] blinking - [+] anger (canwill rage) - [+] vs poison (poison immune) - [+] vs magic (magic resistance) - [+] common - [+] feather fall (dt_fall dmg = 0) - [+] don't "slam into the ground", just "float gently to the ground" - [+] of amplification (boost listening skillchecks, allow you to listen at stairs) - [+] peaceful sleep (don't get woken up by sound, cursed) - [+] chef's amulet(lower metabolism) - [+] thief's amulet (lockpicking)
2012-03-05 21:31:21 +11:00
vault_t *loadvault(char *dir, char *filename) {
2011-11-30 13:07:19 +11:00
FILE *f;
vault_t *v;
char line[BUFLEN];
char fullname[BUFLEN];
int goterrors = B_FALSE;
- [+] make zombies eat flesh. - [+] warn before eating your own kind if it will anger your god, and you wisdom is high. - [+] make disease way worse if you eat your own race's corpse! - [+] CRASH when i try to cook firebug corpse * [+] bones files: - [+] when your leg is bleeding, don't lose hp for ATTACKING, only for MOVING. - [+] bug: issue with skill display if you learn higher than your max level by reading a book! - [+] in this case, reading the book should fail. - [+] when you start worshipping felix, allow you to learn lockpicking & thievery to full level! - [+] infinite loop when an ashkari enters rage while already eating. - [+] felix prayer should always unlock all nearby doors - [+] if you add f_calwill xxx, v1=112312 v2=NA, make v2 = v1. - [+] that way we can confer it! - [+] say "this is xxx!" after wearing a new amulet. - [+] fork / knife should make you eat faster. - [+] double the hp of most armour again AMULETS - [+] add new bodypart = neck - [+] object hiddennames * [+] nouns * [+] adjectives - [+] flight (canwill fly) - [+] enhance spell power - [+] victimization (makes everything hostile) (no auto id) - [+] blinking - [+] anger (canwill rage) - [+] vs poison (poison immune) - [+] vs magic (magic resistance) - [+] common - [+] feather fall (dt_fall dmg = 0) - [+] don't "slam into the ground", just "float gently to the ground" - [+] of amplification (boost listening skillchecks, allow you to listen at stairs) - [+] peaceful sleep (don't get woken up by sound, cursed) - [+] chef's amulet(lower metabolism) - [+] thief's amulet (lockpicking)
2012-03-05 21:31:21 +11:00
snprintf(fullname, BUFLEN, "%s/%s", dir, filename);
2011-11-30 13:07:19 +11:00
dblog("Loading vault file '%s'", fullname);
f = fopen(fullname,"rt");
if (!f) {
- [+] make zombies eat flesh. - [+] warn before eating your own kind if it will anger your god, and you wisdom is high. - [+] make disease way worse if you eat your own race's corpse! - [+] CRASH when i try to cook firebug corpse * [+] bones files: - [+] when your leg is bleeding, don't lose hp for ATTACKING, only for MOVING. - [+] bug: issue with skill display if you learn higher than your max level by reading a book! - [+] in this case, reading the book should fail. - [+] when you start worshipping felix, allow you to learn lockpicking & thievery to full level! - [+] infinite loop when an ashkari enters rage while already eating. - [+] felix prayer should always unlock all nearby doors - [+] if you add f_calwill xxx, v1=112312 v2=NA, make v2 = v1. - [+] that way we can confer it! - [+] say "this is xxx!" after wearing a new amulet. - [+] fork / knife should make you eat faster. - [+] double the hp of most armour again AMULETS - [+] add new bodypart = neck - [+] object hiddennames * [+] nouns * [+] adjectives - [+] flight (canwill fly) - [+] enhance spell power - [+] victimization (makes everything hostile) (no auto id) - [+] blinking - [+] anger (canwill rage) - [+] vs poison (poison immune) - [+] vs magic (magic resistance) - [+] common - [+] feather fall (dt_fall dmg = 0) - [+] don't "slam into the ground", just "float gently to the ground" - [+] of amplification (boost listening skillchecks, allow you to listen at stairs) - [+] peaceful sleep (don't get woken up by sound, cursed) - [+] chef's amulet(lower metabolism) - [+] thief's amulet (lockpicking)
2012-03-05 21:31:21 +11:00
dblog("error opening vault file '%s/%s'", dir,fullname);
2011-11-30 13:07:19 +11:00
return NULL;
}
v = addvault();
if (!v) {
dblog("error allocating new vault");
return NULL;
}
- [+] make zombies eat flesh. - [+] warn before eating your own kind if it will anger your god, and you wisdom is high. - [+] make disease way worse if you eat your own race's corpse! - [+] CRASH when i try to cook firebug corpse * [+] bones files: - [+] when your leg is bleeding, don't lose hp for ATTACKING, only for MOVING. - [+] bug: issue with skill display if you learn higher than your max level by reading a book! - [+] in this case, reading the book should fail. - [+] when you start worshipping felix, allow you to learn lockpicking & thievery to full level! - [+] infinite loop when an ashkari enters rage while already eating. - [+] felix prayer should always unlock all nearby doors - [+] if you add f_calwill xxx, v1=112312 v2=NA, make v2 = v1. - [+] that way we can confer it! - [+] say "this is xxx!" after wearing a new amulet. - [+] fork / knife should make you eat faster. - [+] double the hp of most armour again AMULETS - [+] add new bodypart = neck - [+] object hiddennames * [+] nouns * [+] adjectives - [+] flight (canwill fly) - [+] enhance spell power - [+] victimization (makes everything hostile) (no auto id) - [+] blinking - [+] anger (canwill rage) - [+] vs poison (poison immune) - [+] vs magic (magic resistance) - [+] common - [+] feather fall (dt_fall dmg = 0) - [+] don't "slam into the ground", just "float gently to the ground" - [+] of amplification (boost listening skillchecks, allow you to listen at stairs) - [+] peaceful sleep (don't get woken up by sound, cursed) - [+] chef's amulet(lower metabolism) - [+] thief's amulet (lockpicking)
2012-03-05 21:31:21 +11:00
asprintf(&v->filename, "%s/%s",dir,filename);
2011-11-30 13:07:19 +11:00
v->state = VS_NOID;
// init line.
bzero(line, BUFLEN);
2011-11-30 13:07:19 +11:00
// read a line
fgets(line, BUFLEN, f);
while (!feof(f)) {
// strip newline
line[strlen(line)-1] = '\0';
- [+] vault:pub - [+] has lots of recruitable people - [+] plants, magic creatures, etc shoudl have infinite staina - [+] severed fingers/heads are no longer considered "corpses". - [+] new kind of bed: pile of straw - [+] closed shops now work properly. - [+] stench skillcheck (in makenauseated) - announce this differenlty to 'nothing happen's - [+] monsters won't turn to face sounds when fleeing. - [+] increase accuracy for spear, but reduce accuracy when adjacent - [+] why didn't cyborg warrior start with bullwhip equiped?? - [+] isbetterwepthan() should take EXTRADAM flag into account - [+] monster starting skill levels should depend on iq - [+] no sprinting with injured legs - [+] more restructions when stunned: - [+] no throwing - [+] no operating - [+] no firearms - [+] tombstone text: Eaten by a snow troll's halberd - [+] bug: ekrub gained MASSIVE piety when i sacrificed a soldier ant corpse! reduced. - [+] learning certain lore skills should please gods - [+] repairing should take a lot longer. ie. shoudlbn't be able to do it during a fight. - [+] workhelpobs (spanner/needle) should have F_HELPSREPAIR, v0=material, v1=howmuch - [+] continuerepairing() should only fix <skill + helpsrepair> hp per turn. - [+] announce helpsrepair in obdesc - [+] coldroom vault: - [+] ice floor - [+] ice walls - [+] ice pillar - [+] frozen corpses - [+] new job: gladiator - [+] sword - [+] shield - [+] high shield skill - [+] high evasion skill - [+] limited armour skill - [+] net - [+] war cry fairly early on - [+] gust of wind and airblast should drop flying creatures - [+] fall_from_air(). - [+] trigger then when wind-based effects hit. - [+] chance of falling depends on size. - [+] if you polymorph a monster, it should NOT turn back to its original form! - [+] criticals dont seem to be happening any more... fixed - [+] when picking first askcoords target lf, pick the closest - [+] sakcs etc should contain rarer objects. - [+] intelligent ai: if exhausted and in battle, and faster than opponent, flee.??? - [+] easy way to fix reachability: - [+] is there a solid cell which is: - [+] adjacent to both a filled and an unfilled area? - [+] not a fixed vault wall? - [+] if so, just clear it. - [+] genericise getrandomrace flags - [+] some containers should have mini/tiny monsters inside! - [+] f_hashidinglf, v0=rid - [+] if you loot it, monster jumps out - [+] ...and gets a free hit! - [+] perception lets you see the container moving (only if it weighs less than what is inside it) - [+] genericise getrandomcell() with conditionsets. * [+] condset_t - [+] then replace all getrandomadjcell() calls... - [+] remove getrandomroomcells - [+] then remove WE_xxx
2012-11-13 16:04:30 +11:00
// strip trailing spaces
while (line[strlen(line)-1] == ' ') {
line[strlen(line)-1] = '\0';
}
2011-11-30 13:07:19 +11:00
// handle it
if (handleline(v, line)) {
goterrors = B_TRUE;
break;
}
// read next line
fgets(line, BUFLEN, f);
}
fclose(f);
if (goterrors && v) {
// mark vault as invalid
v->valid = B_FALSE;
v = NULL;
} else {
//dumpvault(v);
}
return v;
}
void loadvaults(void) {
- [+] make zombies eat flesh. - [+] warn before eating your own kind if it will anger your god, and you wisdom is high. - [+] make disease way worse if you eat your own race's corpse! - [+] CRASH when i try to cook firebug corpse * [+] bones files: - [+] when your leg is bleeding, don't lose hp for ATTACKING, only for MOVING. - [+] bug: issue with skill display if you learn higher than your max level by reading a book! - [+] in this case, reading the book should fail. - [+] when you start worshipping felix, allow you to learn lockpicking & thievery to full level! - [+] infinite loop when an ashkari enters rage while already eating. - [+] felix prayer should always unlock all nearby doors - [+] if you add f_calwill xxx, v1=112312 v2=NA, make v2 = v1. - [+] that way we can confer it! - [+] say "this is xxx!" after wearing a new amulet. - [+] fork / knife should make you eat faster. - [+] double the hp of most armour again AMULETS - [+] add new bodypart = neck - [+] object hiddennames * [+] nouns * [+] adjectives - [+] flight (canwill fly) - [+] enhance spell power - [+] victimization (makes everything hostile) (no auto id) - [+] blinking - [+] anger (canwill rage) - [+] vs poison (poison immune) - [+] vs magic (magic resistance) - [+] common - [+] feather fall (dt_fall dmg = 0) - [+] don't "slam into the ground", just "float gently to the ground" - [+] of amplification (boost listening skillchecks, allow you to listen at stairs) - [+] peaceful sleep (don't get woken up by sound, cursed) - [+] chef's amulet(lower metabolism) - [+] thief's amulet (lockpicking)
2012-03-05 21:31:21 +11:00
char *vaultdir[2];
int i;
2011-11-30 13:07:19 +11:00
//
- [+] make zombies eat flesh. - [+] warn before eating your own kind if it will anger your god, and you wisdom is high. - [+] make disease way worse if you eat your own race's corpse! - [+] CRASH when i try to cook firebug corpse * [+] bones files: - [+] when your leg is bleeding, don't lose hp for ATTACKING, only for MOVING. - [+] bug: issue with skill display if you learn higher than your max level by reading a book! - [+] in this case, reading the book should fail. - [+] when you start worshipping felix, allow you to learn lockpicking & thievery to full level! - [+] infinite loop when an ashkari enters rage while already eating. - [+] felix prayer should always unlock all nearby doors - [+] if you add f_calwill xxx, v1=112312 v2=NA, make v2 = v1. - [+] that way we can confer it! - [+] say "this is xxx!" after wearing a new amulet. - [+] fork / knife should make you eat faster. - [+] double the hp of most armour again AMULETS - [+] add new bodypart = neck - [+] object hiddennames * [+] nouns * [+] adjectives - [+] flight (canwill fly) - [+] enhance spell power - [+] victimization (makes everything hostile) (no auto id) - [+] blinking - [+] anger (canwill rage) - [+] vs poison (poison immune) - [+] vs magic (magic resistance) - [+] common - [+] feather fall (dt_fall dmg = 0) - [+] don't "slam into the ground", just "float gently to the ground" - [+] of amplification (boost listening skillchecks, allow you to listen at stairs) - [+] peaceful sleep (don't get woken up by sound, cursed) - [+] chef's amulet(lower metabolism) - [+] thief's amulet (lockpicking)
2012-03-05 21:31:21 +11:00
vaultdir[0] = strdup(VAULTDIR);
vaultdir[1] = strdup(BONESDIR);
for (i = 0; i < 2; i++) {
int nvaults = 0;
DIR *dir;
struct dirent *ent;
dir = opendir(vaultdir[i]);
if (!dir) {
dblog("Could not open vault directory '%s'",vaultdir[i]);
return;
}
nvaults = 0;
while ((ent = readdir(dir)) != NULL) {
char *p;
// ie. start of 4 char prefix
p = ent->d_name + strlen(ent->d_name) - 4;
if (!strcmp(p, ".vlt") ) {
if (loadvault(vaultdir[i], ent->d_name)) {
nvaults++;
} else {
dblog("Errors found in vaultfile %s - loading cancelled.",ent->d_name);
}
2011-11-30 13:07:19 +11:00
}
}
- [+] make zombies eat flesh. - [+] warn before eating your own kind if it will anger your god, and you wisdom is high. - [+] make disease way worse if you eat your own race's corpse! - [+] CRASH when i try to cook firebug corpse * [+] bones files: - [+] when your leg is bleeding, don't lose hp for ATTACKING, only for MOVING. - [+] bug: issue with skill display if you learn higher than your max level by reading a book! - [+] in this case, reading the book should fail. - [+] when you start worshipping felix, allow you to learn lockpicking & thievery to full level! - [+] infinite loop when an ashkari enters rage while already eating. - [+] felix prayer should always unlock all nearby doors - [+] if you add f_calwill xxx, v1=112312 v2=NA, make v2 = v1. - [+] that way we can confer it! - [+] say "this is xxx!" after wearing a new amulet. - [+] fork / knife should make you eat faster. - [+] double the hp of most armour again AMULETS - [+] add new bodypart = neck - [+] object hiddennames * [+] nouns * [+] adjectives - [+] flight (canwill fly) - [+] enhance spell power - [+] victimization (makes everything hostile) (no auto id) - [+] blinking - [+] anger (canwill rage) - [+] vs poison (poison immune) - [+] vs magic (magic resistance) - [+] common - [+] feather fall (dt_fall dmg = 0) - [+] don't "slam into the ground", just "float gently to the ground" - [+] of amplification (boost listening skillchecks, allow you to listen at stairs) - [+] peaceful sleep (don't get woken up by sound, cursed) - [+] chef's amulet(lower metabolism) - [+] thief's amulet (lockpicking)
2012-03-05 21:31:21 +11:00
closedir(dir);
if (nvaults) {
dblog("Successfully loaded %d %s definition%s.", nvaults,
(i == 0) ? "fixed vault" : "bones vault",
(nvaults == 1) ? "" : "s");
} else {
dblog("No (valid) vault definitions found.", nvaults);
}
2011-11-30 13:07:19 +11:00
}
- [+] make zombies eat flesh. - [+] warn before eating your own kind if it will anger your god, and you wisdom is high. - [+] make disease way worse if you eat your own race's corpse! - [+] CRASH when i try to cook firebug corpse * [+] bones files: - [+] when your leg is bleeding, don't lose hp for ATTACKING, only for MOVING. - [+] bug: issue with skill display if you learn higher than your max level by reading a book! - [+] in this case, reading the book should fail. - [+] when you start worshipping felix, allow you to learn lockpicking & thievery to full level! - [+] infinite loop when an ashkari enters rage while already eating. - [+] felix prayer should always unlock all nearby doors - [+] if you add f_calwill xxx, v1=112312 v2=NA, make v2 = v1. - [+] that way we can confer it! - [+] say "this is xxx!" after wearing a new amulet. - [+] fork / knife should make you eat faster. - [+] double the hp of most armour again AMULETS - [+] add new bodypart = neck - [+] object hiddennames * [+] nouns * [+] adjectives - [+] flight (canwill fly) - [+] enhance spell power - [+] victimization (makes everything hostile) (no auto id) - [+] blinking - [+] anger (canwill rage) - [+] vs poison (poison immune) - [+] vs magic (magic resistance) - [+] common - [+] feather fall (dt_fall dmg = 0) - [+] don't "slam into the ground", just "float gently to the ground" - [+] of amplification (boost listening skillchecks, allow you to listen at stairs) - [+] peaceful sleep (don't get woken up by sound, cursed) - [+] chef's amulet(lower metabolism) - [+] thief's amulet (lockpicking)
2012-03-05 21:31:21 +11:00
free(vaultdir[0]);
free(vaultdir[1]);
2011-11-30 13:07:19 +11:00
// debugging
//dumpvault("jimbos_lair", 0);
//dumpvault("jimbos_lair", 1);
//dumpvault("jimbos_lair", 2);
//dumpvault("jimbos_lair", 3);
}
// translate coords on map0 into coords of the same position on map1-3
void rotatecoords(int *x, int *y, vault_t *v, int rotation, int *retoffset) {
int offset,newoffset;
// get offset in map 0
offset = (*y * (v->map[0].w) + *x);
if (hasflag(v->flags, F_VAULTRANDOMMAP)) {
// don't need to rotate in random maps
if (retoffset) *retoffset = offset;
return;
}
if (rotation == 0) {
// leave offset (and therefore x/y) unchanged
newoffset = offset;
} else {
int i;
newoffset = -1;
// find translated offset
for (i = 0; i < v->map[rotation].mlen; i++) {
if (v->map[rotation].data[i] == offset) {
newoffset = i;
break;
}
}
assert(newoffset != -1);
}
// get new x/y
*x = newoffset % v->map[rotation].w;
*y = newoffset / v->map[rotation].w;
if (retoffset) *retoffset = newoffset;
}
int vaultthingok(enum VAULTTHING vt, char *what) {
return real_vaultthingok(vt, what, NULL);
}
int real_vaultthingok(enum VAULTTHING vt, char *what, int *hasfire) {
2011-11-30 13:07:19 +11:00
celltype_t *ct;
object_t *o;
race_t *r;
obpile_t *op;
// default
if (hasfire) *hasfire = B_FALSE;
2011-11-30 13:07:19 +11:00
switch (vt) {
case VT_LF:
if (streq(what, "random")) {
return B_TRUE;
} else {
- [+] vault:pub - [+] has lots of recruitable people - [+] plants, magic creatures, etc shoudl have infinite staina - [+] severed fingers/heads are no longer considered "corpses". - [+] new kind of bed: pile of straw - [+] closed shops now work properly. - [+] stench skillcheck (in makenauseated) - announce this differenlty to 'nothing happen's - [+] monsters won't turn to face sounds when fleeing. - [+] increase accuracy for spear, but reduce accuracy when adjacent - [+] why didn't cyborg warrior start with bullwhip equiped?? - [+] isbetterwepthan() should take EXTRADAM flag into account - [+] monster starting skill levels should depend on iq - [+] no sprinting with injured legs - [+] more restructions when stunned: - [+] no throwing - [+] no operating - [+] no firearms - [+] tombstone text: Eaten by a snow troll's halberd - [+] bug: ekrub gained MASSIVE piety when i sacrificed a soldier ant corpse! reduced. - [+] learning certain lore skills should please gods - [+] repairing should take a lot longer. ie. shoudlbn't be able to do it during a fight. - [+] workhelpobs (spanner/needle) should have F_HELPSREPAIR, v0=material, v1=howmuch - [+] continuerepairing() should only fix <skill + helpsrepair> hp per turn. - [+] announce helpsrepair in obdesc - [+] coldroom vault: - [+] ice floor - [+] ice walls - [+] ice pillar - [+] frozen corpses - [+] new job: gladiator - [+] sword - [+] shield - [+] high shield skill - [+] high evasion skill - [+] limited armour skill - [+] net - [+] war cry fairly early on - [+] gust of wind and airblast should drop flying creatures - [+] fall_from_air(). - [+] trigger then when wind-based effects hit. - [+] chance of falling depends on size. - [+] if you polymorph a monster, it should NOT turn back to its original form! - [+] criticals dont seem to be happening any more... fixed - [+] when picking first askcoords target lf, pick the closest - [+] sakcs etc should contain rarer objects. - [+] intelligent ai: if exhausted and in battle, and faster than opponent, flee.??? - [+] easy way to fix reachability: - [+] is there a solid cell which is: - [+] adjacent to both a filled and an unfilled area? - [+] not a fixed vault wall? - [+] if so, just clear it. - [+] genericise getrandomrace flags - [+] some containers should have mini/tiny monsters inside! - [+] f_hashidinglf, v0=rid - [+] if you loot it, monster jumps out - [+] ...and gets a free hit! - [+] perception lets you see the container moving (only if it weighs less than what is inside it) - [+] genericise getrandomcell() with conditionsets. * [+] condset_t - [+] then replace all getrandomadjcell() calls... - [+] remove getrandomroomcells - [+] then remove WE_xxx
2012-11-13 16:04:30 +11:00
r = findracebyname(what, NULL);
2011-11-30 13:07:19 +11:00
if (r) {
if (r->material->id == MT_FIRE) {
*hasfire = B_TRUE;
}
2011-11-30 13:07:19 +11:00
return B_TRUE;
} else {
enum RACE rid;
- [+] vault:pub - [+] has lots of recruitable people - [+] plants, magic creatures, etc shoudl have infinite staina - [+] severed fingers/heads are no longer considered "corpses". - [+] new kind of bed: pile of straw - [+] closed shops now work properly. - [+] stench skillcheck (in makenauseated) - announce this differenlty to 'nothing happen's - [+] monsters won't turn to face sounds when fleeing. - [+] increase accuracy for spear, but reduce accuracy when adjacent - [+] why didn't cyborg warrior start with bullwhip equiped?? - [+] isbetterwepthan() should take EXTRADAM flag into account - [+] monster starting skill levels should depend on iq - [+] no sprinting with injured legs - [+] more restructions when stunned: - [+] no throwing - [+] no operating - [+] no firearms - [+] tombstone text: Eaten by a snow troll's halberd - [+] bug: ekrub gained MASSIVE piety when i sacrificed a soldier ant corpse! reduced. - [+] learning certain lore skills should please gods - [+] repairing should take a lot longer. ie. shoudlbn't be able to do it during a fight. - [+] workhelpobs (spanner/needle) should have F_HELPSREPAIR, v0=material, v1=howmuch - [+] continuerepairing() should only fix <skill + helpsrepair> hp per turn. - [+] announce helpsrepair in obdesc - [+] coldroom vault: - [+] ice floor - [+] ice walls - [+] ice pillar - [+] frozen corpses - [+] new job: gladiator - [+] sword - [+] shield - [+] high shield skill - [+] high evasion skill - [+] limited armour skill - [+] net - [+] war cry fairly early on - [+] gust of wind and airblast should drop flying creatures - [+] fall_from_air(). - [+] trigger then when wind-based effects hit. - [+] chance of falling depends on size. - [+] if you polymorph a monster, it should NOT turn back to its original form! - [+] criticals dont seem to be happening any more... fixed - [+] when picking first askcoords target lf, pick the closest - [+] sakcs etc should contain rarer objects. - [+] intelligent ai: if exhausted and in battle, and faster than opponent, flee.??? - [+] easy way to fix reachability: - [+] is there a solid cell which is: - [+] adjacent to both a filled and an unfilled area? - [+] not a fixed vault wall? - [+] if so, just clear it. - [+] genericise getrandomrace flags - [+] some containers should have mini/tiny monsters inside! - [+] f_hashidinglf, v0=rid - [+] if you loot it, monster jumps out - [+] ...and gets a free hit! - [+] perception lets you see the container moving (only if it weighs less than what is inside it) - [+] genericise getrandomcell() with conditionsets. * [+] condset_t - [+] then replace all getrandomadjcell() calls... - [+] remove getrandomroomcells - [+] then remove WE_xxx
2012-11-13 16:04:30 +11:00
condset_t cs;
rid = parserace(what, NULL, &cs, NULL, NULL);
if (rid) {
if (hasfire) {
r = findrace(rid);
if (r && (r->material->id == MT_FIRE)) {
*hasfire = B_TRUE;
}
}
2011-11-30 13:07:19 +11:00
return B_TRUE;
}
}
}
break;
case VT_OB:
if (streq(what, "random")) {
return B_TRUE;
} else {
op = addobpile(NULL, NULL, NULL);
- [+] vaults - [+] oval - [+] chasm - [+] room split in 4 by glass - [+] concentricroom - [+] Crash when a vault uses the object 'hole in the ground' - [+] better method of giving spells to monsters - [+] f_randomspellcount v0=amt - [+] f_randomspellschool v0=ss_xxx v1=minlevel v2=maxlevle, text = pw:xxx or null - [+] if power not given: - [+] castig power is (starting depth / 2) - [+] limited by spell's max level. - [+] OR - [+] f_randomspellcount v0=amt - [+] f_randomspellposs v0=spellid, optional text = power. - [+] include these in validateraces - [+] populate monsters... - [+] TEST! (with fire sprite, check if it casts a spell other then fire dart) - [+] if monster is randomly given the job "j_wizard", you MUST pick a subjob too! - [+] go back to using CANCAST for monster spells, so that they show up properly in a mind scan. - [+] druid should start with sickle as secondary weapon. - [+] healing not hurting undead - should be fixed now. - [+] add description of spell powe calculation to spell skills - [+] increase obhp of armour - [+] i was a druid, levelled up to l4, and didn't get a new spell! FIXED. wasn't refreshing LEVSPELLSCHOOLFROMX. - [+] make it a lot harder to get "beheaded" etc. - [+] show real object name in "killed by a thrown xxx" even if you didn't see it - [+] short blades shouldn't be able to behead. - [+] monster threat calc should take #attacks into account! - [+] CTRL-DIR to turn isn't working agian. fixed. - [+] make peasoup have range 1, rather than just going straight in front of you. - [+] power 1 glyph of wardning useless. fixed. - [+] reduce zombie maxattacks to 1. - [+] bug: Are alcohol no longer covered in (null).--More-- - [+] make merlochs much more rare. - [+] light recalc is MASSIVELY slow on some levels. - [+] for now: remove dark levels completely? - [+] "You see 2 sheet of ices here." - [+] remove F_FROZEN when you cook something. - [+] frostbite should do a little more damage. d4 instead of d3.
2012-02-29 17:05:14 +11:00
// disable linking of holes
o = addobject(op, what, B_TRUE, B_FALSE, OT_NONE);
2011-11-30 13:07:19 +11:00
if (o) {
if (o->material->id == MT_FIRE) {
*hasfire = B_TRUE;
}
2011-11-30 13:07:19 +11:00
killobpile(op);
return B_TRUE;
}
killobpile(op);
}
break;
case VT_CELL:
if (streq(what, "EMPTY") || streq(what, "SOLID")) {
return B_TRUE;
}
2011-11-30 13:07:19 +11:00
ct = findcelltypebyname(what);
if (ct) return B_TRUE;
break;
- [+] fix carpetted floor colour - [+] bug: giant ant zombie not attacking giant ant - [+] change table symol to PI - [+] replace footstool with chair - [+] allow reusable cells in vaults - [+] slippery floors should make pushing easier - [+] when checking stairs i found "Pete footprints" - [+] new monsters: - [+] polar bear - [+] owlbear - [+] bug: sleeping monsters never waking up. - [+] "random good weapon" wish broken. fixed now. - [+] cope with med/small/large dancing weapons - [+] generice code to check baseid instead of raceid - [+] handle automatic generation - need to populate: - [+] select an appropriate object (rarity freq / common, uncommon, rare) - [+] copy from obejct to lf: - [+] OBHP - [+] SIZE - [+] OBATTACKDELAY - [+] bug: always getting 'twisted branch' for small dancing weapon - [+] bug: crash in attackcell. nweps = 0 - [+] replace thin walls with unicode symbols - [+] glass - [+] wood - [+] metal - [+] getcellglyph() looks at surrounding cells if required - [+] too slow? - [+] attacking helpless undead shouldn't count - [+] differentiate EXTRADAM from WOUNDING. - [+] wounding = add damage to ALL attacks - [+] EXTRADAM = add DIFFERENT type of damage - [+] psionics on levelup - [+] make this a "select from iq/10", not a select from any - [+] if poison needle trap misses, place it on the ground. - [+] no nauseated effects while asleep. - [+] if something runs out of view adjacent to you, say "xxx moves behind you" - [+] ashkari bug: - [+] when getting enraged by the sight of something, f_rage runs out a few turns before f_aicontrolled. should be the same!!!
2012-11-30 07:18:21 +11:00
default: // ie. exit, reusable
2011-11-30 13:07:19 +11:00
return B_TRUE;
break;
}
return B_FALSE;
}
int vaultokformap(vault_t *v, map_t *m) {
flag_t *f;
celltype_t *floortype;
2011-11-30 13:07:19 +11:00
// check HABITAT
if (hasflag(v->flags, F_VAULTGOESIN)) {
int ok = B_FALSE;
// check which habitats are valid
for (f = v->flags->first ; f ; f = f->next) {
if (f->id == F_VAULTGOESIN) {
if (f->val[0] == m->habitat->id) {
ok = B_TRUE;
break;
}
}
}
if (!ok) return B_FALSE;
}
f = hasflag(v->flags, F_VAULTDLEVMIN);
if (f && (getmapdifficulty(m) < f->val[0])) {
return B_FALSE;
}
f = hasflag(v->flags, F_VAULTDLEVMAX);
if (f && (getmapdifficulty(m) > f->val[0])) {
return B_FALSE;
}
// if the map's floor is flammable don't make vaults which have objects made of fire
floortype = findcelltype(getmapempty(m));
if (hasflag(floortype->material->flags, F_FLAMMABLE)) {
if (hasflag(v->flags, F_VAULTHASFIRE)) {
return B_FALSE;
}
}
// dont make bones vaults while debugging.
if ((gamemode == GM_GAMESTARTED) && hasjob(player, J_GOD)) {
if (hasflagval(v->flags, F_VAULTTAG, NA, NA, NA, "bones")) {
return B_FALSE;
}
}
2011-11-30 13:07:19 +11:00
return B_TRUE;
}