- [+] weapon/armour shop:
- [+] pay to repair. 3 gold per hp. then modify total by speech. - [+] "splash of water" shouldn't stop you from running. at the moment when your boots are wet you can never run because you keep dropping water! - [+] make delvers vuln to light - [+] reduce potion of growth rarity - [+] make resist poison skillcheck difficulty harder. - [+] make holycircle/pentagram detect cursed/blessed items too - [+] "your %s feels warm/cold" - [+] spear shoudl have f_rodshaped - [+] light not blinding creatures for long enough - [+] The area is lit by a magical light! The skeleton is blinded! The skeleton turns to flee from you! The skeleton can see again.
This commit is contained in:
parent
4f8f478139
commit
499ef0c0e1
2
attack.c
2
attack.c
|
@ -2398,7 +2398,7 @@ void wepeffects(flagpile_t *fp, cell_t *where, flag_t *damflag, int dam) {
|
|||
if (f->val[1] != NA) {
|
||||
int scdiff;
|
||||
if (f->val[2] == NA) {
|
||||
scdiff = 20; // default
|
||||
scdiff = 30; // default
|
||||
} else {
|
||||
scdiff = f->val[2];
|
||||
}
|
||||
|
|
16
data.c
16
data.c
|
@ -962,7 +962,7 @@ void initobjects(void) {
|
|||
addobmod(OM_SHODDY,"shoddy");
|
||||
addflag_real(lastobmod->flags, F_SHODDY, B_TRUE, NA, NA, NULL, PERMENANT, B_KNOWN, -1);
|
||||
addobmod(OM_POISONED,"poisoned");
|
||||
addflag_real(lastobmod->flags, F_HITCONFER, F_POISONED, SC_POISON, 25, "15-30", PERMENANT, B_KNOWN, -1);
|
||||
addflag_real(lastobmod->flags, F_HITCONFER, F_POISONED, SC_POISON, 30, "15-30", PERMENANT, B_KNOWN, -1);
|
||||
addflag_real(lastobmod->flags, F_HITCONFERVALS, P_VENOM, 1, NA, NULL, PERMENANT, B_KNOWN, -1);
|
||||
addobmod(OM_WET1,"damp");
|
||||
addflag_real(lastobmod->flags, F_WET, W_DAMP, NA, NA, NULL, PERMENANT, B_KNOWN, -1);
|
||||
|
@ -1471,8 +1471,9 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_CONTAINER, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SHOPMENU, 0, MA_GOTOMENU, SM_PURCHASEITEMS, "a:buy something");
|
||||
addflag(lastot->flags, F_SHOPMENU, 1, MA_GOTOMENU, SM_DONATE, "d:donate something");
|
||||
addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, SM_RESIZE, "r:resize equipment");
|
||||
addflag(lastot->flags, F_SHOPMENU, 3, MA_QUIT, NA, "q:leave");
|
||||
addflag(lastot->flags, F_SHOPMENU, 2, MA_GOTOMENU, SM_REPAIR, "r:repair equipment");
|
||||
addflag(lastot->flags, F_SHOPMENU, 3, MA_GOTOMENU, SM_RESIZE, "s:resize equipment");
|
||||
addflag(lastot->flags, F_SHOPMENU, 4, MA_QUIT, NA, "q:leave");
|
||||
for (i = 0; i < 10; i++) {
|
||||
addflag(lastot->flags, F_STARTOBCLASS, 100, OC_ARMOUR, RANDOM, NULL);
|
||||
}
|
||||
|
@ -1571,7 +1572,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
|
||||
addflag(lastot->flags, F_REPELBLESSED, B_CURSED, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPELBLESSED, B_CURSED, B_BLESSED, NA, NULL);
|
||||
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_PENTAGRAM, "pentagram", "A area imbued with evil.", MT_NOTHING, 0, OC_DFEATURE, SZ_LARGE);
|
||||
|
@ -1580,7 +1581,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, ".");
|
||||
addflag(lastot->flags, F_REPELBLESSED, B_BLESSED, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPELBLESSED, B_BLESSED, B_CURSED, NA, NULL);
|
||||
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
|
||||
|
||||
|
||||
|
@ -2214,7 +2215,7 @@ void initobjects(void) {
|
|||
addot(OT_POT_CANINETRACKING, "potion of canine tracking", "Mimics the effects of a 'canine tracking' spell.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
|
||||
addot(OT_POT_GROWTH, "potion of growth", "A magical liquid which causes the imbiber's body to instantly undergo rapid growth.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_COMMON, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 50, NA, NA, NULL);
|
||||
|
||||
addot(OT_POT_HEALINGMIN, "potion of minor healing", "Restores 1-10 health to whoever drinks it.", MT_GLASS, 1, OC_POTION, SZ_TINY);
|
||||
|
@ -4766,6 +4767,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_DTVULN, DT_FIRE, NA, NA, "0d1+100");
|
||||
addflag(lastot->flags, F_LINKOB, OT_POT_WATER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_COSMETIC, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_MUDPOOL, "pool of mud", "A large puddle of wet mud.", MT_WATER, 60, OC_MISC, SZ_MEDIUM);
|
||||
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -6517,6 +6519,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_USESSKILL, SK_POLEARMS, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTREQ, A_AGI, 50, 5, NULL);
|
||||
addflag(lastot->flags, F_CRITCHANCE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_RODSHAPED, B_TRUE, NA, NA, NULL);
|
||||
addot(OT_TRIDENT, "trident", "A three-pronged stabbing weapon.", MT_METAL, 5, OC_WEAPON, SZ_HUMAN);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 75, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 75, NA, NULL);
|
||||
|
@ -7268,6 +7271,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTSKILL, SK_METALWORK, PR_NOVICE, NA, NULL);
|
||||
// penalties
|
||||
addflag(lastrace->flags, F_MPMOD, -3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTVULN, DT_LIGHT, NA, NA, "1d6");
|
||||
addflag(lastrace->flags, F_TAMABLE, 35, NA, NA, NULL);
|
||||
|
||||
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
3
defs.h
3
defs.h
|
@ -2033,6 +2033,7 @@ enum FLAG {
|
|||
F_STARTBLESSED, // v0 = b_blessed or b_cursed
|
||||
F_REPELBLESSED, // v0 = b_blessed or b_cursed. repels other obejcts
|
||||
// of this blesstype.
|
||||
// if v1 == b_blessed or b_cursed, will ID these blessings/curses
|
||||
F_TRAIL, // this object denotes the trail left by a lf.
|
||||
// v0 = raceid of lf who left it
|
||||
// v1 = direction the lf moved out of this cell
|
||||
|
@ -2067,6 +2068,7 @@ enum FLAG {
|
|||
// v0 is either NA (white) or colourid (C_xxx).
|
||||
F_NOGLYPH, // this object doesn't appear normally
|
||||
F_COSMETIC, // this object is mostly cosmetic, don't say 'you see xx'
|
||||
// also don't stop the player running past it.
|
||||
F_INVISOB, // this object cannot be seen
|
||||
F_NOPICKUP, // cannot pick this up
|
||||
F_ATTACKABLE, // can attack this with 'A'
|
||||
|
@ -3937,6 +3939,7 @@ enum SHOPMENU {
|
|||
SM_REST = -7,
|
||||
// weapon/armour shops
|
||||
SM_RESIZE = -8,
|
||||
SM_REPAIR = -9,
|
||||
};
|
||||
|
||||
enum SHOPRETURN {
|
||||
|
|
2
lf.c
2
lf.c
|
@ -12620,7 +12620,7 @@ int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *froml
|
|||
}
|
||||
} else if (damtype == DT_POISONGAS) {
|
||||
if (amt > 0) {
|
||||
if (!skillcheck(lf, SC_POISON, 25, 0)) {
|
||||
if (!skillcheck(lf, SC_POISON, 35, 0)) { // HARD.
|
||||
poison(lf, rnd(5,10), P_GAS, 2, "poison gas");
|
||||
}
|
||||
}
|
||||
|
|
6
map.c
6
map.c
|
@ -6697,8 +6697,10 @@ void makelitradius(cell_t *c, int radius, enum LIGHTLEV how, int howlong) {
|
|||
if (gamemode == GM_GAMESTARTED) {
|
||||
lifeform_t *lf;
|
||||
for (lf = c->map->lf ; lf ; lf = lf->next) {
|
||||
//if (haslos(lf, c) || haslosdark(lf, c)) {
|
||||
if (distfunc(lf->cell,c) <= (radius + MAXVISRANGE)) {
|
||||
//OLD: if (haslos(lf, c) || haslosdark(lf, c)) {
|
||||
// need to verify lf->cell because it might be NULL if we're
|
||||
// swapping places with someone else.
|
||||
if (lf->cell && (distfunc(lf->cell,c) <= (radius + MAXVISRANGE))) {
|
||||
setlosdirty(lf);
|
||||
}
|
||||
}
|
||||
|
|
14
objects.c
14
objects.c
|
@ -5061,7 +5061,7 @@ char *real_getobname(object_t *o, char *buf, int count, int wantpremods, int wan
|
|||
case OT_RING_STR:
|
||||
f = hasflag(o->flags, F_EQUIPCONFER);
|
||||
if (f) {
|
||||
snprintf(buf2, BUFLENSMALL, "%s%d ",(f->val[2] < 0) ? "-" : "+", abs(f->val[2]));
|
||||
snprintf(buf2, BUFLENSMALL, "%s%d ",(f->val[2] < 0) ? "-" : "+", abs(f->val[2])/5);
|
||||
strcat(localbuf, buf2);
|
||||
}
|
||||
break;
|
||||
|
@ -12408,7 +12408,7 @@ void timeeffectsob(object_t *o) {
|
|||
}
|
||||
}
|
||||
|
||||
// sacred ground?
|
||||
// sacred ground object repel
|
||||
sg = hasobwithflagval(location->obpile, F_REPELBLESSED, o->blessed, NA, NA, NULL);
|
||||
if (sg) {
|
||||
char sgname[BUFLEN];
|
||||
|
@ -12454,6 +12454,16 @@ void timeeffectsob(object_t *o) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (isplayer(o->pile->owner)) {
|
||||
// sacred ground bless/curse detect
|
||||
sg = hasobwithflagval(location->obpile, F_REPELBLESSED, NA, o->blessed, NA, NULL);
|
||||
if (sg && !o->blessknown) {
|
||||
// announce
|
||||
msg("Your %s feels very %s!", noprefix(obname), (o->blessed == B_BLESSED) ? "warm" : "cold");
|
||||
// player now knows that this is blessed/cursed
|
||||
o->blessknown = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasflag(o->flags, F_TANGLEMISSILE)) {
|
||||
if (!location || !location->lf) {
|
||||
|
|
72
shops.c
72
shops.c
|
@ -22,6 +22,7 @@
|
|||
#define DEF_BLESSCOST 50
|
||||
#define DEF_SURCHARGE 15
|
||||
#define DEF_RESIZECOST 80
|
||||
#define DEF_REPAIRCOSTPERHP 5
|
||||
|
||||
extern enum GAMEMODE gamemode;
|
||||
extern prompt_t prompt;
|
||||
|
@ -162,6 +163,9 @@ void shop(lifeform_t *lf, object_t *vm) {
|
|||
} else if (curmenu == SM_RESIZE) {
|
||||
shopfunc = shopresize;
|
||||
shoparg = &ndonated;
|
||||
} else if (curmenu == SM_REPAIR) {
|
||||
shopfunc = shoprepair;
|
||||
shoparg = &ndonated;
|
||||
}
|
||||
|
||||
if (shopfunc) {
|
||||
|
@ -789,6 +793,74 @@ enum SHOPRETURN shoppurchase(lifeform_t *lf, object_t *vm, int starty, char *top
|
|||
return SR_CONTINUE;
|
||||
}
|
||||
|
||||
enum SHOPRETURN shoprepair(lifeform_t *lf, object_t *vm, int starty, char *toptext, int *ndonated) {
|
||||
object_t *o;
|
||||
char ch,buf[BUFLEN];
|
||||
int y,hpcost;
|
||||
char obname[BUFLEN];
|
||||
flag_t *f;
|
||||
y = starty;
|
||||
|
||||
hpcost = DEF_REPAIRCOSTPERHP;
|
||||
|
||||
|
||||
// get list of objects to repair
|
||||
sprintf(buf, "Repair which object (you have $%d)?", countmoney(lf->pack));
|
||||
initprompt(&prompt, buf);
|
||||
for (o = player->pack->first ; o ; o = o->next) {
|
||||
if (isarmour(o) && isdamaged(o)) {
|
||||
char desc[BUFLEN];
|
||||
int thiscost;
|
||||
|
||||
// determine cost...
|
||||
f = hasflag(o->flags, F_OBHP);
|
||||
thiscost = applyshoppricemod((f->val[1] - f->val[0]) * hpcost, lf);
|
||||
// add to prompt
|
||||
getobname(o, obname, o->amt);
|
||||
sprintf(desc, "%s ($%d)", obname,thiscost);
|
||||
addchoice(&prompt, o->letter, desc, desc, o, NULL);
|
||||
}
|
||||
}
|
||||
addchoice(&prompt, '-', "(nothing)", NULL, NULL, NULL);
|
||||
|
||||
|
||||
mvwprintw(mainwin, y, 0, "We offer repair services for most kinds armour."); y+=2;
|
||||
if (prompt.nchoices == 1) {
|
||||
mvwprintw(mainwin, y, 0, "You have no armour in need of repair."); y += 2;
|
||||
mvwprintw(mainwin, y, 0, "[Press any key]");
|
||||
} else {
|
||||
mvwprintw(mainwin, y, 0, "Pay to repair your armour (you have $%d) [yn]? ", countmoney(lf->pack));
|
||||
}
|
||||
|
||||
ch = getch();
|
||||
if ((prompt.nchoices == 1) || (ch != 'y')) {
|
||||
return SR_BACK;
|
||||
}
|
||||
|
||||
|
||||
// ask which object
|
||||
ch = getchoice(&prompt);
|
||||
|
||||
o = (object_t *)prompt.result;
|
||||
if (o) {
|
||||
int thiscost;
|
||||
// determine cost...
|
||||
f = hasflag(o->flags, F_OBHP);
|
||||
thiscost = applyshoppricemod((f->val[1] - f->val[0]) * hpcost, lf);
|
||||
if (thiscost > countmoney(player->pack)) {
|
||||
msg("You can't afford to repair that item!"); more();
|
||||
return SR_CONTINUE;
|
||||
}
|
||||
msg("You hand over $%d.", thiscost); more();
|
||||
givemoney(player, NULL, thiscost);
|
||||
f->val[0] = f->val[1];
|
||||
getobname(o, obname, o->amt);
|
||||
msg("Your %s %s completely repaired.", obname, (o->amt == 1) ? "is" : "are"); more();
|
||||
}
|
||||
|
||||
return SR_CONTINUE;
|
||||
}
|
||||
|
||||
enum SHOPRETURN shopresize(lifeform_t *lf, object_t *vm, int starty, char *toptext, int *ndonated) {
|
||||
object_t *o;
|
||||
char ch,buf[BUFLEN];
|
||||
|
|
1
shops.h
1
shops.h
|
@ -9,6 +9,7 @@ enum SHOPRETURN shopdonate(lifeform_t *lf, object_t *vm, int starty, char *topte
|
|||
enum SHOPRETURN shopdetectcurse(lifeform_t *lf, object_t *vm, int starty, char *toptext, int *npurchased);
|
||||
enum SHOPRETURN shopmiracle(lifeform_t *lf, object_t *vm, int starty, char *toptext, int *npurchased);
|
||||
enum SHOPRETURN shoppurchase(lifeform_t *lf, object_t *vm, int starty, char *toptext, int *npurchased);
|
||||
enum SHOPRETURN shoprepair(lifeform_t *lf, object_t *vm, int starty, char *toptext, int *npurchased);
|
||||
enum SHOPRETURN shopresize(lifeform_t *lf, object_t *vm, int starty, char *toptext, int *npurchased);
|
||||
enum SHOPRETURN shoprest(lifeform_t *lf, object_t *vm, int starty, char *toptext, int *npurchased);
|
||||
|
||||
|
|
6
spell.c
6
spell.c
|
@ -1905,7 +1905,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef
|
|||
|
||||
// announce
|
||||
if (cansee(player, target)) {
|
||||
msg("%s suck%s blood from %s!", username, isplayer(user) ? "" : "s", targetname);
|
||||
msg("^%c%s suck%s blood from %s!", getlfcol(target, CC_BAD), username, isplayer(user) ? "" : "s", targetname);
|
||||
}
|
||||
|
||||
// fixed damage?
|
||||
|
@ -7710,11 +7710,11 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
// if you don't have eyes, your'e safe!
|
||||
if (!lfhasflagval(l, F_NOBODYPART, BP_EYES, NA, NA, NULL)) {
|
||||
// blind for 1-3 turns
|
||||
addtempflag(l->flags, F_BLIND, B_TRUE, NA, NA, NULL, rnd(1,3));
|
||||
addtempflag(l->flags, F_BLIND, B_TRUE, NA, NA, NULL, rnd(3,5));
|
||||
}
|
||||
}
|
||||
// undead will flee from light
|
||||
if (isundead(l)) {
|
||||
if (isundead(l) && !skillcheck(l, SC_WILL, 20, 0)) {
|
||||
// runs away from caster
|
||||
addtempflag(l->flags, F_FLEEFROM, caster->id, NA, NA, NULL, 20);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue