- [+] reduce F_WALKDAM on fire objects to 1d4,2d4,3d4
- [+] bug: getvaulttype causes infinite loop if none found. - [+] flameburst from klikirak offer shouldn't incrase piety further. - [+] fireball / flame pillar spell: mark that the player created the fire - [+] ... so that when it damages otehr objects, damge caomes form the playerh - [+] make shieldbash stun effect last longer
This commit is contained in:
parent
d97c0c9421
commit
b1abb5ad76
9
data.c
9
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, "!");
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
4
god.c
4
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;
|
||||
|
|
17
io.c
17
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, ")");
|
||||
|
||||
|
|
3
lf.c
3
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;
|
||||
|
|
24
objects.c
24
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);
|
||||
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,9 +12796,7 @@ 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]);
|
||||
creator = getobcreatedby(o);
|
||||
if (!creator || !haslos(creator, location)) {
|
||||
willvanish = B_TRUE;
|
||||
}
|
||||
|
@ -12807,7 +12816,6 @@ void timeeffectsob(object_t *o) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check each flag for this object...
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
2
shops.c
2
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)) {
|
||||
|
|
6
spell.c
6
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,6 +5897,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
}
|
||||
}
|
||||
}
|
||||
if ((spellid = OT_S_METEOR) || (power > 5)) {
|
||||
for (dir = D_N; dir <= D_W; dir++) {
|
||||
cell_t *c;
|
||||
c = getcellindir(targcell, dir);
|
||||
|
@ -5920,6 +5921,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
redrawresume();
|
||||
|
||||
|
|
Loading…
Reference in New Issue