diff --git a/data.c b/data.c index 0349a78..a14aa9b 100644 --- a/data.c +++ b/data.c @@ -2331,7 +2331,7 @@ void initobjects(void) { addot(OT_POT_EXPERIENCE, "potion of experience", "Instantly grants the imbiber the next experience level.", MT_GLASS, 1, OC_POTION, SZ_TINY); addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_RARE, NULL); addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, 40, NA, NULL); - addflag(lastot->flags, F_VALUE, 210, NA, NA, NULL); + addflag(lastot->flags, F_VALUE, 410, NA, NA, NULL); addot(OT_POT_BLOODC, "potion of cockatrice blood", "A small quantity of cockatrice blood.", MT_GLASS, 1, OC_POTION, SZ_TINY); addflag(lastot->flags, F_RARITY, H_ALL, 100, NA, NULL); @@ -2926,6 +2926,7 @@ void initobjects(void) { addflag(lastot->flags, F_AICASTTOATTACK, ST_ADJSELF, NA, NA, NULL); addot(OT_S_FIREBALL, "fireball", "Creates a huge ball of fire, dealing up to ^bpower^nd3 damage.", MT_NOTHING, 0, OC_SPELL, SZ_TINY); addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The damage is lower for enemies further away from the ball's centre."); + addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "At power level 5, the size of the fireball is slightly increased."); addflag(lastot->flags, F_SPELLSCHOOL, SS_FIRE, NA, NA, NULL); addflag(lastot->flags, F_SPELLLEVEL, 3, NA, NA, NULL); addflag(lastot->flags, F_RANGE, 6, NA, NA, NULL); @@ -5179,7 +5180,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 3, 3, NA, NULL); addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL); addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_WALKDAM,DT_FIRE, NA, NA, "6d4"); + addflag(lastot->flags, F_WALKDAM,DT_FIRE, NA, NA, "3d4"); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_PRODUCESLIGHT, 10, NA, NA, NULL); addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!"); @@ -5190,7 +5191,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 3, 3, NA, NULL); addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL); addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_WALKDAM, DT_FIRE, NA, NA, "4d4"); + addflag(lastot->flags, F_WALKDAM, DT_FIRE, NA, NA, "2d4"); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_PRODUCESLIGHT, 7, NA, NA, NULL); addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!"); @@ -5200,7 +5201,7 @@ void initobjects(void) { addflag(lastot->flags, F_OBHP, 3, 3, NA, NULL); addflag(lastot->flags, F_OBHPDRAIN, 1, NA, NA, NULL); addflag(lastot->flags, F_NOOBDAMTEXT, B_TRUE, NA, NA, NULL); - addflag(lastot->flags, F_WALKDAM, DT_FIRE, NA, NA, "2d4"); + addflag(lastot->flags, F_WALKDAM, DT_FIRE, NA, NA, "1d4"); addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_PRODUCESLIGHT, 5, NA, NA, NULL); addflag(lastot->flags, F_THEREISHERE, B_TRUE, NA, NA, "!"); diff --git a/data/hiscores.db b/data/hiscores.db index 19eb638..c144704 100644 Binary files a/data/hiscores.db and b/data/hiscores.db differ diff --git a/god.c b/god.c index 869ba39..487c34d 100644 --- a/god.c +++ b/god.c @@ -760,13 +760,15 @@ int godblocked(enum RACE rid) { int godgiftmaybe(enum RACE rid, int fromtemple) { lifeform_t *god; int piety,gotgift = B_FALSE; + enum PIETYLEV plev; int chance; god = findgod(rid); piety = getpiety(rid); + plev = getpietylev(rid, NULL, NULL); if (fromtemple) { chance = 100; - } else if (piety >= 200) { + } else if (plev >= PL_PLEASED) { // ie. >= 200 // ie. 200 -> 4% // ie. 500 -> 10% chance = piety / 50; diff --git a/io.c b/io.c index e099891..832294b 100644 --- a/io.c +++ b/io.c @@ -4856,7 +4856,7 @@ char *makedesc_god(lifeform_t *god, char *retbuf) { strncat(retbuf, thisline, HUGEBUFLEN); // note: we manually handle SACRIFICEOBWITHFLAG - getflags(god->flags, retflag, &nretflags, F_SACRIFICEOB, F_SACRIFICEOBCLASS, F_SACRIFICEOBBLESSED, F_NONE); + getflags(god->flags, retflag, &nretflags, F_SACRIFICEOB, F_SACRIFICEOBCLASS, F_SACRIFICEOBBLESSED, F_SACRIFICEOBWITHFLAG,F_NONE); if (nretflags == 0) { sprintf(thisline, "%s does not accept sacrifices.\n", godname); strncat(retbuf, thisline, HUGEBUFLEN); @@ -4922,12 +4922,15 @@ char *makedesc_god(lifeform_t *god, char *retbuf) { } strcpy(thisline, ""); switch (retflag[i]->val[0]) { - case F_GEM: - sprintf(thisline, "- gems\n"); - break; case F_BATTLESPOILS: sprintf(thisline, "- untouched battle spoils\n"); break; + case F_FLAMMABLE: + sprintf(thisline, "- flammable objects\n"); + break; + case F_GEM: + sprintf(thisline, "- gems\n"); + break; default: break; } @@ -12210,11 +12213,7 @@ void showlfstats(lifeform_t *lf, int showall) { real_getlfname(god, godname, B_FALSE, B_FALSE); f = lfhasflag(god, F_GODOF); - if (f->val[0] == B_FEMALE) { - strcat(godname, " (Goddess of "); - } else { - strcat(godname, " (God of "); - } + strcat(godname, " ("); strcat(godname, f->text); strcat(godname, ")"); diff --git a/lf.c b/lf.c index d79f959..f3f6425 100644 --- a/lf.c +++ b/lf.c @@ -18434,6 +18434,9 @@ int useability(lifeform_t *lf, enum OBTYPE aid, lifeform_t *who, cell_t *where) case E_NOSTAM: msg("You are too tired to do that."); break; + case E_PRONE: + msg("You can't use abilities while prone."); + break; case E_STUNNED: msg("You can't use abilities while stunned."); break; diff --git a/objects.c b/objects.c index 93bc129..63001c9 100644 --- a/objects.c +++ b/objects.c @@ -2974,12 +2974,13 @@ void damageallobs(object_t *srcob, obpile_t *op, int howmuch, int damtype, lifef continue; } - if ((o != srcob) && !hasflag(o->flags, F_DEAD)) { - takedamage(o, howmuch, damtype); - nhurt++; + if ((o != srcob) && !hasflag(o->flags, F_TRAIL) && !hasflag(o->flags, F_DEAD)) { + if (takedamage(o, howmuch, damtype)) { + nhurt++; + } } } - if (srclf) { + if (srclf && nhurt) { if (isplayer(srclf)) { if (basedamagetype(damtype) == DT_FIRE) { pleasegodmaybe(R_GODFIRE, nhurt*2); @@ -3713,6 +3714,16 @@ int getobbonus(object_t *o, int onlyknown) { return bonus; } +lifeform_t *getobcreatedby(object_t *o) { + flag_t *f; + lifeform_t *creator = NULL; + f = hasflag(o->flags, F_CREATEDBY); + if (f) { + creator = findlf(NULL, f->val[0]); + } + return creator; +} + int getobpoints(object_t *o) { if (hasflag(o->flags, F_NOPOINTS)) { return 0; @@ -12785,26 +12796,23 @@ void timeeffectsob(object_t *o) { int willvanish = B_FALSE; // creator no longer has los? - f = hasflag(o->flags, F_CREATEDBY); - if (f) { - creator = findlf(NULL, f->val[0]); - if (!creator || !haslos(creator, location)) { - willvanish = B_TRUE; - } + creator = getobcreatedby(o); + if (!creator || !haslos(creator, location)) { + willvanish = B_TRUE; + } - // noone there? - if (!location->lf) { - willvanish = B_TRUE; - } + // noone there? + if (!location->lf) { + willvanish = B_TRUE; + } - if (willvanish) { - // vanish. - if (haslos(player, location)) { - msg("%s vanish%s.", obname, OB1(o,"es","")); - } - removeob(o, o->amt); - return; + if (willvanish) { + // vanish. + if (haslos(player, location)) { + msg("%s vanish%s.", obname, OB1(o,"es","")); } + removeob(o, o->amt); + return; } } } @@ -12996,7 +13004,7 @@ void timeeffectsob(object_t *o) { if (f->id == F_WALKDAM) { // everything here takes damage //damageallobs(o, o->pile, f->val[0] * timespent, f->val[1]); - damageallobs(o, o->pile, roll(f->text), f->val[0], NULL); + damageallobs(o, o->pile, roll(f->text), f->val[0], getobcreatedby(o)); //if (hasflag(o->flags, F_DEAD)) return; } diff --git a/objects.h b/objects.h index 723d20a..fd7ba05 100644 --- a/objects.h +++ b/objects.h @@ -83,6 +83,7 @@ enum MATSTATE getmaterialstate(enum MATERIAL mat); int getmissileaccuracy(lifeform_t *thrower, cell_t *where, object_t *missile, object_t *firearm, flag_t *tkthrow); int getobaccuracy(object_t *wep, lifeform_t *weilder); int getobbonus(object_t *o, int onlyknown); +lifeform_t *getobcreatedby(object_t *o); int getobpoints(object_t *o); skill_t *getobskill(flagpile_t *fp); enum LFSIZE getobsize(object_t *o); diff --git a/shops.c b/shops.c index 1a8fad7..21ede5a 100644 --- a/shops.c +++ b/shops.c @@ -698,7 +698,7 @@ enum SHOPRETURN shoppurchase(lifeform_t *lf, object_t *vm, int starty, char *top enum SKILLLEVEL slev; slev = getskill(lf, SK_SPEECH); // determine payment method - sprintf(ques, "How will you pay for %s?", obname); + sprintf(ques, "How will you pay for %s ($%d)?", obname, value); initprompt(&prompt, ques); for (oo = player->pack->first ; oo ; oo = oo->next) { if ((oo->type->id == OT_GOLD) || (oo->type->id == OT_CREDITCARD) || hasflag(oo->flags, F_GEM)) { diff --git a/spell.c b/spell.c index 3141a10..16410e9 100644 --- a/spell.c +++ b/spell.c @@ -1698,7 +1698,7 @@ int abilityeffects(lifeform_t *user, enum OBTYPE abilid, cell_t *targcell, lifef modifyforsize(&mod, user, target, 5, M_VAL); if (mod > 0) mod = 0; if (skillcheck(user, SC_SHIELDBLOCK, 5 + getevasion(target), mod)) { - stun(target, 2); + stun(target, 3); } } @@ -5851,7 +5851,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ anim(caster->cell, targcell, '^', C_RED); redrawpause(); - // add fires as follows (3 = medium, 2 = medium, 1 = smell) + // add fires as follows (3 = medium, 2 = medium, 1 = small) // // 1 // 232 @@ -5897,25 +5897,27 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ } } } - for (dir = D_N; dir <= D_W; dir++) { - cell_t *c; - c = getcellindir(targcell, dir); - if (c) { - c = getcellindir(c, dir); - if (c && (!c->type->solid || hasflag(c->type->material->flags, F_FLAMMABLE)) ) { - o = addobfast(c->obpile, fire3); - if (o) { - setobcreatedby(o, caster); - } - if (c->lf) { - int ndice; - ndice = power / 2; if (ndice < 1) ndice = 1; - if (spellid == OT_S_FIREBALL) { - losehp(c->lf, rolldie(ndice,2), DT_FIRE, caster, "a fireball"); - } else { - losehp(c->lf, 7+rolldie(ndice,4), DT_FIRE, caster, "a meteorite"); + if ((spellid = OT_S_METEOR) || (power > 5)) { + for (dir = D_N; dir <= D_W; dir++) { + cell_t *c; + c = getcellindir(targcell, dir); + if (c) { + c = getcellindir(c, dir); + if (c && (!c->type->solid || hasflag(c->type->material->flags, F_FLAMMABLE)) ) { + o = addobfast(c->obpile, fire3); + if (o) { + setobcreatedby(o, caster); } + if (c->lf) { + int ndice; + ndice = power / 2; if (ndice < 1) ndice = 1; + if (spellid == OT_S_FIREBALL) { + losehp(c->lf, rolldie(ndice,2), DT_FIRE, caster, "a fireball"); + } else { + losehp(c->lf, 7+rolldie(ndice,4), DT_FIRE, caster, "a meteorite"); + } + } } } } diff --git a/vault.c b/vault.c index 1caa1a3..2c9bd31 100644 --- a/vault.c +++ b/vault.c @@ -775,6 +775,7 @@ vault_t *getvaulttype(map_t *m) { // if we have no possibilities, lower rarity and try again if (rr == RR_COMMON) { // give up. + break; } else { rr--; }