- [+] monk fist damage not increasing.
- [+] RANDOM MONSTER BUGS - [+] levle 1: always getting goblins/kobolds - [+] levle 2: always getting poltergeists - [+] debug getrandomrace().... - [+] enforce f_rarity val[2] != NA!! - [+] empty levels - [+] whenever we pick rr=frquent, we're getting no monsters - [+] start MONSTER randomness at COMMON - [+] bug: i lost f_size when i died when polymorphed! - [+] yumi should only hate killing helpless things, not ANYTHNIG! - [+] make armour more common than weapons, since this tends to get damaged - [+] bookshelf (contains scrolls/books) - [+] wardrobe (contains armour) - [+] coffin sometimes contains corpses - [+] not getting enough objects now ??
This commit is contained in:
parent
c20802fc6e
commit
c596623603
2
attack.c
2
attack.c
|
@ -185,7 +185,7 @@ int attackcell(lifeform_t *lf, cell_t *c, int force) {
|
|||
// anyone there? if so just attack.
|
||||
if (c->lf) {
|
||||
if (!force && isplayer(lf) && isprone(lf)) {
|
||||
if (!warnabout("Really attack while prone (-40% accuracy)?")) {
|
||||
if (!warnabout("Really attack while prone (-4 accuracy)?")) {
|
||||
return B_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
66
data.c
66
data.c
|
@ -1117,13 +1117,13 @@ void initobjects(void) {
|
|||
addflag(lastobjectclass->flags, F_SHOP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastobjectclass->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
|
||||
addoc(OC_DFEATURE, "Dungeon Features", "Doors, etc.", '\\', C_GREY, RR_RARE);
|
||||
addoc(OC_FURNITURE, "Furniture", "Various kinds of mundane (or not so mundane) furnishings.", '\\', C_BROWN, RR_COMMON);
|
||||
addoc(OC_FURNITURE, "Furniture", "Various kinds of mundane (or not so mundane) furnishings.", '\\', C_BROWN, RR_FREQUENT);
|
||||
addocnoun(lastobjectclass, "furniture");
|
||||
addflag(lastobjectclass->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addoc(OC_TERRAIN, "Terrain", "Water, etc.", '\\', C_GREY, RR_NEVER);
|
||||
addoc(OC_TRAP, "Trap", "Fiendish traps.", '^', C_GREY, RR_RARE);
|
||||
addocnoun(lastobjectclass, "trap");
|
||||
addoc(OC_MONEY, "Money", "The standard currency of Nexus.", '$', C_GREY, RR_COMMON);
|
||||
addoc(OC_MONEY, "Money", "The standard currency of Nexus.", '$', C_GREY, RR_UNCOMMON);
|
||||
addoc(OC_SCROLL, "Scrolls", "An arcane roll of parchment, inscribed with many magical glyphs.", '?', C_GREY, RR_UNCOMMON);
|
||||
addocnoun(lastobjectclass, "scroll");
|
||||
addflag(lastobjectclass->flags, F_HASHIDDENNAME, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1161,7 +1161,7 @@ void initobjects(void) {
|
|||
addflag(lastobjectclass->flags, F_ENCHANTABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastobjectclass->flags, F_CANHAVEOBMOD, OM_MASTERWORK, 17, NA, NULL);
|
||||
addflag(lastobjectclass->flags, F_CANHAVEOBMOD, OM_SHODDY, 34, NA, NULL);
|
||||
addoc(OC_ARMOUR, "Armour/Clothing", "Protective gear.", '[', C_GREY, RR_COMMON);
|
||||
addoc(OC_ARMOUR, "Armour/Clothing", "Protective gear.", '[', C_GREY, RR_FREQUENT);
|
||||
addocnoun(lastobjectclass, "armour");
|
||||
addocnoun(lastobjectclass, "clothing");
|
||||
addocnoun(lastobjectclass, "clothes");
|
||||
|
@ -4414,9 +4414,35 @@ void initobjects(void) {
|
|||
|
||||
|
||||
// furniture
|
||||
addot(OT_ARMOURRACK, "armour rack", "An upright metal rack made for armour storage.", MT_METAL, 150, OC_FURNITURE, SZ_HUMAN);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREY, NA, NA, "\\");
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CONTAINER, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_STARTOB, 80, NA, NA, "random armour");
|
||||
addflag(lastot->flags, F_STARTOB, 60, NA, NA, "random armour");
|
||||
addflag(lastot->flags, F_STARTOB, 50, NA, NA, "good armour");
|
||||
addflag(lastot->flags, F_STARTOB, 50, NA, NA, "great armour");
|
||||
|
||||
addot(OT_BOOKSHELF, "bookshelf", "A set of wooden shelves, sized for book storage.", MT_WOOD, 150, OC_FURNITURE, SZ_HUMAN);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREY, NA, NA, "\\");
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CONTAINER, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_STARTOB, 90, NA, NA, "random scroll");
|
||||
addflag(lastot->flags, F_STARTOB, 80, NA, NA, "random scroll");
|
||||
addflag(lastot->flags, F_STARTOB, 70, NA, NA, "random scroll");
|
||||
addflag(lastot->flags, F_STARTOB, 60, NA, NA, "random scroll");
|
||||
addflag(lastot->flags, F_STARTOB, 60, NA, NA, "random book");
|
||||
addflag(lastot->flags, F_STARTOB, 50, NA, NA, "random book");
|
||||
|
||||
addot(OT_CANDELABRUM, "candelabrum", "A large (and heavy) decorative candle, about human height.", MT_METAL, 60, OC_FURNITURE, SZ_HUMAN);
|
||||
addflag(lastot->flags, F_GLYPH, C_YELLOW, NA, NA, "\\");
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 85, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 85, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERONOFF, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ACTIVATEPREFIX, NA, NA, NA, "lit");
|
||||
|
@ -4429,17 +4455,19 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_CHARGEOUTMSG, B_TRUE, NA, NA, "goes out");
|
||||
|
||||
addot(OT_COFFIN, "coffin", "A wooden coffin, made for holding the dead.", MT_WOOD, 100, OC_FURNITURE, SZ_HUMAN);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 75, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREY, NA, NA, "|");
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CONTAINER, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_STARTOB, 80, NA, NA, "3-4 piles of ash");
|
||||
addflag(lastot->flags, F_STARTOB, 80, NA, NA, "5-10 bones");
|
||||
addflag(lastot->flags, F_STARTOB, 80, NA, NA, "corpse");
|
||||
addflag(lastot->flags, F_STARTOB, 70, NA, NA, "3-4 piles of ash");
|
||||
addflag(lastot->flags, F_STARTOB, 70, NA, NA, "5-10 bones");
|
||||
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OBHP, 30, 30, NA, NULL);
|
||||
|
||||
addot(OT_FIREPLACE, "fireplace", "A roaring fireplace.", MT_STONE, 200, OC_FURNITURE, SZ_LARGE);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_RED, NA, NA, "\\");
|
||||
addflag(lastot->flags, F_PRODUCESLIGHT, 3, NA, IFACTIVE, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
|
@ -4447,8 +4475,9 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_ONFIRE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_MAX, NA, NULL);
|
||||
|
||||
|
||||
addot(OT_WEAPONRACK, "weapon rack", "A large matel frame, made to store weapons.", MT_METAL, 150, OC_FURNITURE, SZ_HUMAN);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 80, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 80, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREY, NA, NA, "\\");
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
|
@ -4460,8 +4489,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_STARTOB, 50, NA, NA, "great weapon");
|
||||
|
||||
addot(OT_WOODENBARREL, "wooden barrel", "A solid wooden barrel.", MT_WOOD, 40, OC_FURNITURE, SZ_HUMAN);
|
||||
addflag(lastot->flags, F_RARITY, H_VILLAGE, 75, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, NA, NA, NA, "(");
|
||||
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_LARGE, NA, NULL);
|
||||
addflag(lastot->flags, F_CRUSHABLE, SZ_HUGE, NA, NA, NULL);
|
||||
|
@ -4482,7 +4510,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_STARTOBCLASS, 50, OC_FOOD, NA, NULL);
|
||||
|
||||
addot(OT_WOODENTABLE, "wooden table", "A waist-height wooden table.", MT_WOOD, 25, OC_FURNITURE, SZ_HUMAN);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 70, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 70, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_BROWN, NA, NA, "\\");
|
||||
addflag(lastot->flags, F_IMPASSABLE, SZ_MIN, SZ_HUMAN, NA, NULL);
|
||||
addflag(lastot->flags, F_CRUSHABLE, SZ_LARGE, NA, NA, NULL);
|
||||
|
@ -4495,7 +4523,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_DTVULN, DT_CHOP, NA, NA, NULL);
|
||||
|
||||
addot(OT_WOODENSTOOL, "wooden footstool", "A small, wooden footstool.", MT_WOOD, 5, OC_FURNITURE, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 83, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 83, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, NA, NA, NA, "\\");
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -7271,11 +7299,11 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_FEIGNDEATH, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 87, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, 87, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, 87, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 87, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, 87, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, 87, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "2d4+3");
|
||||
addflag(lastrace->flags, F_HITDICE, NA, NA, NA, "1d4+3");
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, "");
|
||||
|
@ -7294,7 +7322,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_DODGES, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_PACKATTACK, 2, DT_SLASH, 3, NULL);
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTJOB, 25, J_ROGUE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTJOB, 10, J_ROGUE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MORALE, 0, NA, NA, NULL);
|
||||
|
@ -7472,8 +7500,8 @@ void initrace(void) {
|
|||
addrace(R_KOBOLD, "kobold", 18, 'k', C_BROWN, MT_FLESH, RC_HUMANOID, "An evil humanoid race with doglike features, kobolds are known for their cowardace and prefer to attack from a distance if at all possible.");
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 95, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, 95, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 95, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, 95, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_POISONCORPSE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NUMAPPEAR, 1, 3, NA, "");
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
2
defs.h
2
defs.h
|
@ -1485,6 +1485,8 @@ enum OBTYPE {
|
|||
// tech l6
|
||||
// none yet.
|
||||
// furniture
|
||||
OT_ARMOURRACK,
|
||||
OT_BOOKSHELF,
|
||||
OT_CANDELABRUM,
|
||||
OT_COFFIN,
|
||||
OT_FIREPLACE,
|
||||
|
|
6
flag.c
6
flag.c
|
@ -58,6 +58,7 @@ flag_t *addflag_real(flagpile_t *fp, enum FLAG id, int val1, int val2, int val3,
|
|||
int redrawstatatend = B_FALSE;
|
||||
int i;
|
||||
|
||||
|
||||
// identified things mean all new flags are autmaticlaly known.
|
||||
if (hasflag(fp, F_IDENTIFIED)) {
|
||||
known = B_KNOWN;
|
||||
|
@ -73,6 +74,11 @@ flag_t *addflag_real(flagpile_t *fp, enum FLAG id, int val1, int val2, int val3,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// overrite NA rarity
|
||||
if ((id == F_RARITY) && (val3 == NA)) {
|
||||
val3 = RR_COMMON;
|
||||
}
|
||||
|
||||
// auto-increment order for EXTRADESC flag
|
||||
if ((id == F_EXTRADESC) && (val1 == NA)) {
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
|
|
6
io.c
6
io.c
|
@ -4134,7 +4134,7 @@ void doeat(obpile_t *op) {
|
|||
int dowear(obpile_t *op) {
|
||||
object_t *o;
|
||||
int rv;
|
||||
o = askobject(op, "Wear what", NULL, 'W', AO_WEARABLE);
|
||||
o = askobject(op, "Wear what", NULL, '\0', AO_WEARABLE);
|
||||
if (o) {
|
||||
if (isunknownbadobject(o) && skillcheck(player, A_WIS, 30, 0)) {
|
||||
if (!confirm_badfeeling(o)) {
|
||||
|
@ -9289,7 +9289,7 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
xpneeded = getxpforlev(lf->level + 1) - lf->xp;
|
||||
wprintw(mainwin, "%d (%ld XP, %ld for next)", lf->level, lf->xp, xpneeded); y++;
|
||||
} else {
|
||||
wprintw(mainwin, "%d", lf->level); y++;
|
||||
wprintw(mainwin, "%d", gethitdice(lf)); y++;
|
||||
}
|
||||
if (isplayer(lf)) {
|
||||
int attpoints;
|
||||
|
@ -9753,7 +9753,7 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
//mvwprintw(mainwin, y, 0, "Threat rating: %0.1f",comparelfs(player, lf));
|
||||
wrapprint(mainwin, &y, &x, "%s ", buf);
|
||||
unsetcol(mainwin, lorecol);
|
||||
y++;
|
||||
y++; x = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
79
lf.c
79
lf.c
|
@ -2280,7 +2280,7 @@ void die(lifeform_t *lf) {
|
|||
}
|
||||
|
||||
// mercy god doesn't like killing
|
||||
angergodmaybe(R_GODMERCY, 1, GA_MURDER);
|
||||
//angergodmaybe(R_GODMERCY, 1, GA_MURDER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2780,7 +2780,7 @@ void dumplev(void) {
|
|||
int min,max,prevmin,prevmax;
|
||||
gethitdicerange(i-1, &prevmin, &prevmax, RARITYVARIANCELF, B_FALSE);
|
||||
gethitdicerange(i, &min, &max, RARITYVARIANCELF, B_FALSE);
|
||||
fprintf(logfile, "Dlev %d (hd >= %d): ",i,min);
|
||||
fprintf(logfile, "Dlev %d (hd %d-%d): ",i,min,max);
|
||||
for (r = firstrace ; r; r = r->next) {
|
||||
int hd = 0;
|
||||
hd = gethitdicerace(r);
|
||||
|
@ -2954,7 +2954,7 @@ int eat(lifeform_t *lf, object_t *o) {
|
|||
// uncooked meat?
|
||||
if (iscorpse(o) && isplayer(lf)) {
|
||||
if (!hasflag(o->flags, F_PREPARED)) {
|
||||
if (getskill(lf, SK_COOKING)) {
|
||||
if (!lfhasflag(lf, F_EATING) && getskill(lf, SK_COOKING)) {
|
||||
int ch;
|
||||
char ques[BUFLEN];
|
||||
more();
|
||||
|
@ -3555,45 +3555,38 @@ void enhanceskills(lifeform_t *lf) {
|
|||
// enhance fist strength
|
||||
f = lfhasflagval(lf, F_HASATTACK, OT_FISTS, NA, NA, NULL);
|
||||
if (f) {
|
||||
char newtext[BUFLEN];
|
||||
strcpy(newtext, f->text);
|
||||
int newdr;
|
||||
//newdr = ((lf->level+1) / 2) + 2;
|
||||
newdr = lf->level+2;
|
||||
/*
|
||||
switch(lf->level) {
|
||||
case 2:
|
||||
strcpy(newtext,"1d6");
|
||||
break;
|
||||
newdr = 4; break;
|
||||
case 3:
|
||||
newdr = 5; break;
|
||||
case 4:
|
||||
strcpy(newtext,"1d6+1");
|
||||
break;
|
||||
newdr = 6; break;
|
||||
case 5:
|
||||
strcpy(newtext,"2d4");
|
||||
break;
|
||||
newdr = 7; break;
|
||||
case 6:
|
||||
newdr = 8; break;
|
||||
case 7:
|
||||
strcpy(newtext,"3d3");
|
||||
break;
|
||||
newdr = 9; break;
|
||||
case 8:
|
||||
strcpy(newtext,"2d6");
|
||||
break;
|
||||
newdr = 10; break;
|
||||
case 9:
|
||||
case 10:
|
||||
strcpy(newtext,"3d4");
|
||||
break;
|
||||
newdr = 11; break;
|
||||
case 11:
|
||||
strcpy(newtext,"3d4+1");
|
||||
break;
|
||||
case 12:
|
||||
newdr = 12; break;
|
||||
case 13:
|
||||
strcpy(newtext,"4d4");
|
||||
break;
|
||||
case 14:
|
||||
strcpy(newtext,"4d4+1");
|
||||
break;
|
||||
newdr = 13; break;
|
||||
case 15:
|
||||
strcpy(newtext,"5d4");
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
newdr = 14; break;
|
||||
strcpy(newtext,"4d6");
|
||||
break;
|
||||
case 18:
|
||||
|
@ -3609,8 +3602,11 @@ void enhanceskills(lifeform_t *lf) {
|
|||
strcpy(newtext,"6d6");
|
||||
break;
|
||||
}
|
||||
if (!streq(newtext, f->text)) {
|
||||
changeflagtext(f, newtext);
|
||||
*/
|
||||
if (newdr != f->val[1]) {
|
||||
//if (!streq(newtext, f->text)) {
|
||||
// changeflagtext(f, newtext);
|
||||
f->val[1] = newdr;
|
||||
if (isplayer(lf)) msg("^gYour unarmed attack damage has increased!");
|
||||
}
|
||||
}
|
||||
|
@ -5766,6 +5762,7 @@ int getlfaccuracy(lifeform_t *lf, object_t *wep) {
|
|||
}
|
||||
|
||||
// agi scaling on weapon
|
||||
if (wep) {
|
||||
getflags(wep->flags, retflag, &nretflags, F_ATTREQ, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
if (retflag[i]->val[0] == A_AGI) {
|
||||
|
@ -5774,7 +5771,7 @@ int getlfaccuracy(lifeform_t *lf, object_t *wep) {
|
|||
acc += pctmod;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// modify for nausea
|
||||
if (lfhasflag(lf, F_NAUSEATED)) {
|
||||
|
@ -6694,7 +6691,10 @@ char *real_getlfnamea(lifeform_t *lf, char *buf, int usevis) {
|
|||
enum LFSIZE getlfsize(lifeform_t *lf) {
|
||||
flag_t *f;
|
||||
f = hasflag(lf->flags, F_SIZE);
|
||||
assert(f);
|
||||
if (!f) f = hasflag(lf->race->flags, F_SIZE);
|
||||
if (!f) {
|
||||
return SZ_HUMAN;
|
||||
}
|
||||
return f->val[0];
|
||||
}
|
||||
|
||||
|
@ -7009,7 +7009,7 @@ race_t *getrandomrace(cell_t *c, int forcedepth) {
|
|||
race_t *poss[MAXRANDOMLFCANDIDATES];
|
||||
int nposs = 0;
|
||||
int selidx;
|
||||
int db = B_FALSE;
|
||||
int db = B_TRUE;
|
||||
int depth;
|
||||
int hdmin,hdmax;
|
||||
enum RARITY wantrr = RR_FREQUENT;
|
||||
|
@ -7029,7 +7029,7 @@ race_t *getrandomrace(cell_t *c, int forcedepth) {
|
|||
// pick rr...
|
||||
wantrr = pickrr(TT_MONSTER);
|
||||
|
||||
if (db) dblog("finding random lf with hitdice %d-%d and rr <= %d\n",hdmin,hdmax, wantrr);
|
||||
if (db) dblog("finding random lf with hitdice %d-%d and rr <= %d (for depth %d)\n",hdmin,hdmax, wantrr, depth);
|
||||
|
||||
// try to find a lf of this type which will
|
||||
// fit in the map's habitat
|
||||
|
@ -7061,7 +7061,7 @@ race_t *getrandomrace(cell_t *c, int forcedepth) {
|
|||
|
||||
if (rarflag) {
|
||||
if ((rarflag->val[2] == NA) || (rarflag->val[2] <= wantrr)) {
|
||||
if (db) dblog("%s has correct rarity rr (%d <= wantr(%d)).",r->name, rarflag->val[2], wantrr);
|
||||
if (db) dblog("%s has correct rarity rr (%d <= wantrr(%d)).",r->name, rarflag->val[2], wantrr);
|
||||
valid = B_TRUE;
|
||||
thisrr = rarflag->val[2];
|
||||
} else {
|
||||
|
@ -7099,7 +7099,11 @@ race_t *getrandomrace(cell_t *c, int forcedepth) {
|
|||
|
||||
// nothing found?
|
||||
if (nposs == 0) {
|
||||
// already at lowest hitdice?
|
||||
// at frequency "FREQUENT"? Try COMMON.
|
||||
if (wantrr == RR_FREQUENT) {
|
||||
if (db) dblog("no possible lfs like this. trying again with rr_common instead of frequent.\n");
|
||||
wantrr = RR_COMMON;
|
||||
} else {
|
||||
if ((hdmax >= maxmonhitdice) && (hdmin <= 0)) {
|
||||
// give up
|
||||
if (db) dblog("no possible lf at all! giving up.");
|
||||
|
@ -7112,6 +7116,7 @@ race_t *getrandomrace(cell_t *c, int forcedepth) {
|
|||
if (db) dblog("no possible lfs like this. trying again with hitdice %d-%d\n",hdmin,hdmax);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (db) dblog("got %d possibilities.",nposs);
|
||||
// pick a random lf from our possiblities
|
||||
|
@ -7844,14 +7849,14 @@ void givejob(lifeform_t *lf, enum JOB jobid) {
|
|||
f = lfhasflagval(lf, F_HASATTACK, OT_FISTS, NA, NA, NULL);
|
||||
if (f) {
|
||||
// monk fists do more damage
|
||||
changeflagtext(f, "1d4");
|
||||
f->val[1] = 3;
|
||||
}
|
||||
} else if (j->id == J_PIRATE) {
|
||||
flag_t *f;
|
||||
f = lfhasflagval(lf, F_HASATTACK, OT_FISTS, NA, NA, NULL);
|
||||
if (f) {
|
||||
f->val[0] = OT_HOOKHAND;
|
||||
changeflagtext(f, "1d4");
|
||||
f->val[1] = 4;
|
||||
}
|
||||
} else if (j->id == J_SHOPKEEPER) {
|
||||
// shopkeepers are not hostile.
|
||||
|
@ -14302,19 +14307,19 @@ void startlfturn(lifeform_t *lf) {
|
|||
}
|
||||
// suffocate?
|
||||
if (lfhasflag(lf, F_NEEDSWATER) && !hasobwithflag(lf->cell->obpile, F_DEEPWATER)) {
|
||||
int dam;
|
||||
if (isplayer(lf)) {
|
||||
msg("^BYou are suffocating without water to breath!");
|
||||
} else if (cansee(player, lf)) {
|
||||
int dam;
|
||||
char lfname[BUFLEN];
|
||||
getlfname(lf, lfname);
|
||||
msg("^%c%s is suffocating!", getlfcol(lf, CC_VBAD), lfname);
|
||||
}
|
||||
dam = lf->maxhp / 3;
|
||||
limit(&dam, 1, NA);
|
||||
losehp(lf, dam, DT_DIRECT, NULL, "suffocation");
|
||||
if (isdead(lf)) return;
|
||||
}
|
||||
}
|
||||
// vampire in sunlight?
|
||||
if ((lf->race->id == R_VAMPIRE) && isoutdoors(lf->cell->map) && !isnighttime()) {
|
||||
if (isplayer(lf)) {
|
||||
|
|
12
objects.c
12
objects.c
|
@ -5129,7 +5129,7 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat,
|
|||
int amt;
|
||||
flag_t *f;
|
||||
int db = B_FALSE;
|
||||
int partdb = B_TRUE;
|
||||
int partdb = B_FALSE;
|
||||
char *pluralname;
|
||||
char brandname[BUFLEN];
|
||||
char cursestr[BUFLEN];
|
||||
|
@ -8422,18 +8422,22 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
|
||||
enum RARITY pickrr(int whatfor) {
|
||||
enum RARITY wantrr = RR_FREQUENT;
|
||||
int chance = 3;
|
||||
int chance = 2;
|
||||
int mod = 0;
|
||||
|
||||
if ((gamemode == GM_GAMESTARTED) && hasflag(player->flags, F_EXTRALUCK)) {
|
||||
if (whatfor == TT_OBJECT) {
|
||||
chance = 2;
|
||||
wantrr++;
|
||||
} else if (whatfor == TT_MONSTER) {
|
||||
chance = 4;
|
||||
mod = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// pick rr...
|
||||
while ((wantrr < RR_VERYRARE) && onein(chance)) {
|
||||
wantrr++;
|
||||
//chance = wantrr + 1 + mod;
|
||||
chance = 2 + mod;
|
||||
}
|
||||
return wantrr;
|
||||
}
|
||||
|
|
2
save.c
2
save.c
|
@ -1122,7 +1122,7 @@ int writehiscore(lifeform_t *lf, int *rank) {
|
|||
|
||||
// add escapes
|
||||
escaped = strdup(killedby);
|
||||
escaped = strrep(escaped, "'", "\\'", NULL);
|
||||
escaped = strrep(escaped, "'", "''", NULL);
|
||||
|
||||
if (!lfhasflag(lf, F_NOSCORE)) {
|
||||
asprintf(&cmd, "insert into 'hiscores' (score,name,job,killedby) VALUES (%ld, '%s', '%s', '%s')", score, pname, jobname, escaped);
|
||||
|
|
Loading…
Reference in New Issue