Fixed a bunch of compile warnings
This commit is contained in:
parent
17461f9c24
commit
ec6a86a0b2
140
god.c
140
god.c
|
@ -103,15 +103,15 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
case R_GODMAGIC: sprintf(buf, "One does not comprehend the danger of One's find!"); break;
|
||||
default: break;
|
||||
}
|
||||
godsay(rid, B_TRUE, buf);
|
||||
godsay(rid, B_TRUE, buf);
|
||||
break;
|
||||
case GA_HERESY:
|
||||
if (rid == R_GODFIRE) {
|
||||
godsay(rid, B_TRUE, "HERESY!");
|
||||
godsay(rid, B_TRUE, "HERESY!");
|
||||
} else if (rid == R_GODMAGIC) {
|
||||
godsay(rid, B_TRUE, "One's mundanity is offensive!");
|
||||
godsay(rid, B_TRUE, "One's mundanity is offensive!");
|
||||
} else {
|
||||
godsay(rid, B_TRUE, "Heresy!");
|
||||
godsay(rid, B_TRUE, "Heresy!");
|
||||
}
|
||||
break;
|
||||
case GA_MERCY:
|
||||
|
@ -208,7 +208,7 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
case R_GODBATTLE:
|
||||
// rust your armour
|
||||
for (o = player->pack->first ; o ; o = o->next) {
|
||||
if (isarmour(o) && (o->type->material->id == MT_METAL)) {
|
||||
if (isarmour(o) && (o->type->material->id == MT_METAL)) {
|
||||
poss[nposs++] = o;
|
||||
}
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
// remove blessings
|
||||
nposs = 0;
|
||||
for (o = player->pack->first ; o ; o = o->next) {
|
||||
if (isblessed(o)) {
|
||||
if (isblessed(o)) {
|
||||
poss[nposs++] = o;
|
||||
}
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
msg("\"Allow me to lighten your load a little...\"");
|
||||
if (o) { // take player's weapon
|
||||
castspell(god, OT_S_CONFISCATE, player, o, player->cell, NULL, NULL);
|
||||
} else { // take 3 objects
|
||||
} else { // take 3 objects
|
||||
int i;
|
||||
for (i = 0; i < 3; i++) {
|
||||
castspell(god, OT_S_CONFISCATE, player, NULL, player->cell, NULL, NULL);
|
||||
|
@ -411,7 +411,7 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
while (rollagain) {
|
||||
flag_t *retflag[MAXCANDIDATES];
|
||||
int nretflags;
|
||||
rollagain = B_FALSE;
|
||||
rollagain = B_FALSE;
|
||||
switch (rnd(1,3)) {
|
||||
case 1: // lose all spells
|
||||
msg("\"I forbid you my gifts!\"");
|
||||
|
@ -472,7 +472,7 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
msg("\"Time for a lesson in materialism!\"");
|
||||
nposs = 0;
|
||||
for (o = player->pack->first ; o ; o = o->next) {
|
||||
if (hasflag(o->flags, F_DAMAGABLE) && !hasflag(o->flags, F_DEAD)) {
|
||||
if (hasflag(o->flags, F_DAMAGABLE) && !hasflag(o->flags, F_DEAD)) {
|
||||
poss[nposs++] = o;
|
||||
}
|
||||
}
|
||||
|
@ -484,10 +484,10 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
// damage it
|
||||
getobname(o, obname, o->amt);
|
||||
msg("Your %s %s struck by divine force!", OB1(o, "is", "are"), noprefix(obname));
|
||||
takedamage(o, rnd(10,40), DT_DIRECT, NULL);
|
||||
takedamage(o, rnd(10,40), DT_DIRECT, NULL);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 2:
|
||||
// summon holy creautes
|
||||
msg("\"Destroy him, my pets!\"");
|
||||
summonlfs(god, player->cell, R_NONE, RC_ANY, SZ_ANY, AL_GOOD, 3, PERMENANT, B_FALSE);
|
||||
|
@ -659,7 +659,7 @@ void dooffer(void) {
|
|||
validcorpse = B_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (validcorpse) {
|
||||
ok = B_TRUE;
|
||||
thispiety = f->val[2];
|
||||
|
@ -694,7 +694,7 @@ void dooffer(void) {
|
|||
ok = B_FALSE;
|
||||
thispiety = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
char *p;
|
||||
|
@ -712,7 +712,7 @@ void dooffer(void) {
|
|||
// }
|
||||
}
|
||||
|
||||
// special effect sacrificing flora to ekrub makes it turn into a
|
||||
// special effect sacrificing flora to ekrub makes it turn into a
|
||||
// butterfly
|
||||
if ((god->race->id == R_GODNATURE) && (o->type->obclass->id == OC_FLORA)) {
|
||||
newcell = getrandomadjcell(player->cell, &ccwalkable, B_NOEXPAND);
|
||||
|
@ -720,7 +720,7 @@ void dooffer(void) {
|
|||
|
||||
if (haslos(player, player->cell)) {
|
||||
getobname(o, obname, ALL);
|
||||
if ((god->race->id == R_GODNATURE) &&
|
||||
if ((god->race->id == R_GODNATURE) &&
|
||||
(o->type->obclass->id == OC_FLORA) &&
|
||||
!newcell) {
|
||||
// couldn't create a butterfly
|
||||
|
@ -736,12 +736,12 @@ void dooffer(void) {
|
|||
strrep(&p, "IS", "are", NULL);
|
||||
strrep(&p, "#S", "", NULL);
|
||||
}
|
||||
|
||||
|
||||
msg("%s", p);
|
||||
free(p);
|
||||
}
|
||||
|
||||
if ((god->race->id == R_GODNATURE) &&
|
||||
if ((god->race->id == R_GODNATURE) &&
|
||||
(o->type->obclass->id == OC_FLORA) &&
|
||||
newcell) {
|
||||
addmonster(newcell, R_BUTTERFLY, NULL, B_FALSE, 1, B_FALSE, B_NOEXTRA, NULL);
|
||||
|
@ -919,7 +919,7 @@ int getprayedgods(lifeform_t **retgod, int *nretgods) {
|
|||
retgod[*nretgods] = godlf[i];
|
||||
(*nretgods)++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return *nretgods;
|
||||
}
|
||||
|
||||
|
@ -954,13 +954,13 @@ enum OBTYPE getrelatedgodstone(enum RACE rid) {
|
|||
void givegodbonus(enum RACE rid, flag_t *bf, int announce) {
|
||||
flag_t *f;
|
||||
lifeform_t *god;
|
||||
int targ[3], arg = NA;
|
||||
int targ[3], arg = NA;
|
||||
enum PIETYLEV bonuslev;
|
||||
enum GODBONUS bonusid;
|
||||
|
||||
god = findgod(rid);
|
||||
if (!god) return;
|
||||
|
||||
|
||||
// god announcement.
|
||||
if (announce) {
|
||||
godsay(rid, B_TRUE, getflagtext(god->flags, F_GODBONUSTEXT));
|
||||
|
@ -1036,14 +1036,14 @@ int prayedtoany(void) {
|
|||
}
|
||||
|
||||
void removegodbonus(enum RACE rid, flag_t *bf, int announce) {
|
||||
int targ[3], arg = NA;
|
||||
int targ[3], arg = NA;
|
||||
enum PIETYLEV bonuslev;
|
||||
enum GODBONUS bonusid;
|
||||
lifeform_t *god;
|
||||
|
||||
god = findgod(rid);
|
||||
if (!god) return;
|
||||
|
||||
|
||||
// god announcement.
|
||||
if (announce) {
|
||||
godsay(rid, B_TRUE, getflagtext(god->flags, F_GODNOBONUSTEXT));
|
||||
|
@ -1129,7 +1129,7 @@ lifeform_t *godappears(enum RACE rid, cell_t *where) {
|
|||
if (haslos(player, where) && strlen(killedname)) {
|
||||
msg("%s transforms into %s!", killedname, godname);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
teleportto(god, where, B_TRUE);
|
||||
// visual effect for some gods
|
||||
|
@ -1148,7 +1148,7 @@ lifeform_t *godappears(enum RACE rid, cell_t *where) {
|
|||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return god;
|
||||
}
|
||||
|
||||
|
@ -1214,7 +1214,7 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) {
|
|||
if (timerflag && (timerflag->val[0] > 0)) {
|
||||
timerflag->val[0]--;
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (pctchance(chance)) { // if this is true, you get a gift.
|
||||
char obtogive[BUFLEN];
|
||||
|
@ -1303,7 +1303,7 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) {
|
|||
|
||||
// change the race.
|
||||
setrace(player, R_VAMPIRE, B_FALSE); // ie. don't set origrace!
|
||||
|
||||
|
||||
// restore stats
|
||||
player->maxhp = orighp;
|
||||
player->hp = orighp;
|
||||
|
@ -1334,7 +1334,7 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) {
|
|||
if (wep) {
|
||||
if (!hasobmod(wep, findobmod(OM_FLAMING))) {
|
||||
applyobmod(wep, findobmod(OM_FLAMING));
|
||||
} else if (!hasflag(wep->flags, F_HASBRAND)) {
|
||||
} else if (!hasflag(wep->flags, F_HASBRAND)) {
|
||||
char obname[BUFLEN];
|
||||
// already burning. gains pyromania
|
||||
addflag(wep->flags, F_FLAMESTRIKE, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1342,7 +1342,7 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) {
|
|||
msg("Your %s glows with a brilliant heat!", noprefix(obname));
|
||||
} else { // already has pyromania.
|
||||
rollagain = B_TRUE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rollagain = B_TRUE;
|
||||
}
|
||||
|
@ -1374,17 +1374,17 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) {
|
|||
rollagain = B_TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case 4: // grant immolation power
|
||||
if (lfhasflagval(player, F_CANWILL, OT_S_IMMOLATE, NA, NA, NULL)) {
|
||||
rollagain = B_TRUE;
|
||||
} else {
|
||||
flag_t *f;
|
||||
f = addflag(player->flags, F_CANWILL, OT_S_IMMOLATE, 20, 20,
|
||||
f = addflag(player->flags, F_CANWILL, OT_S_IMMOLATE, 20, 20,
|
||||
"pw:10;");
|
||||
f->obfrom = god->race->id;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1423,7 +1423,7 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) {
|
|||
rollagain = B_TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case 4: // increase max hp
|
||||
player->maxhp += rollhitdice(player, B_TRUE);
|
||||
statdirty = B_TRUE;
|
||||
|
@ -1602,7 +1602,7 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) {
|
|||
object_t *wep;
|
||||
rollagain = B_FALSE;
|
||||
wep = getweapon(player);
|
||||
if (wep && !hasflag(wep->flags, F_HASBRAND)) {
|
||||
if (wep && !hasflag(wep->flags, F_HASBRAND)) {
|
||||
char obname[BUFLEN];
|
||||
brand_t *br;
|
||||
flag_t *f;
|
||||
|
@ -1634,16 +1634,16 @@ int godgiftmaybe(enum RACE rid, int fromtemple, int announce) {
|
|||
case 3:
|
||||
snprintf(obtogive, BUFLEN, "safebox");
|
||||
break;
|
||||
case 4:
|
||||
case 4:
|
||||
snprintf(obtogive, BUFLEN, "wand of opening");
|
||||
break;
|
||||
case 5:
|
||||
case 5:
|
||||
snprintf(obtogive, BUFLEN, "wand of invisibility");
|
||||
break;
|
||||
case 6:
|
||||
case 6:
|
||||
snprintf(obtogive, BUFLEN, "3-6 potions of invisibility");
|
||||
break;
|
||||
case 7:
|
||||
case 7:
|
||||
snprintf(obtogive, BUFLEN, "leather boots of stealth");
|
||||
break;
|
||||
}
|
||||
|
@ -1872,7 +1872,7 @@ void godstone_pickup_effects(lifeform_t *god, lifeform_t *opposegod, object_t *o
|
|||
wprintw(mainwin, "forgiven.\"\n");
|
||||
break;
|
||||
case R_GODNATURE:
|
||||
wprintw(mainwin, "\"%s! You hold the Godstone of Rage!\n\n", toupper(player->race->name[0]), (player->race->name + 1));
|
||||
wprintw(mainwin, "\"%c%s! You hold the Godstone of Rage!\n\n", toupper(player->race->name[0]), (player->race->name + 1));
|
||||
wprintw(mainwin, "Long have I sought this ancient artifact - it is from this stone that the\n");
|
||||
wprintw(mainwin, "insane God of Fire draws his destructive power.\n");
|
||||
wprintw(mainwin, "If you can just deliver this stone to me, Klikirak's reign could be ended!\n\n");
|
||||
|
@ -1927,7 +1927,7 @@ void godstone_pickup_effects(lifeform_t *god, lifeform_t *opposegod, object_t *o
|
|||
if (!godprayedto(god->race->id)) {
|
||||
addflag(god->flags, F_PRAYEDTO, B_TRUE, NA, NA, NULL);
|
||||
}
|
||||
// related god screams and gets furios/enraged at you.
|
||||
// related god screams and gets furios/enraged at you.
|
||||
// (you lose prayedto if you have it?)
|
||||
if (getpietylev(god->race->id, NULL, NULL) == PL_FURIOUS) {
|
||||
// becomes enraged
|
||||
|
@ -1983,7 +1983,7 @@ void pleasegod(enum RACE rid, int amt) {
|
|||
// don't please/anger gods while enraged.
|
||||
if (lfhasflag(player, F_RAGE)) return;
|
||||
|
||||
// if you haven't praeyd to anyone yet, piety
|
||||
// if you haven't praeyd to anyone yet, piety
|
||||
// gain is boosted heaps.
|
||||
/*
|
||||
if (!prayedtoany()) {
|
||||
|
@ -2076,9 +2076,9 @@ void pleasegodmaybe(enum RACE rid, int amt) {
|
|||
// the angrier or more happy the god gets, the harder it
|
||||
// is to please them.
|
||||
// ie. INDIFFERENT = 1 in 1 (always)
|
||||
// ie. PLEASED/TOLERATED = 1 in 2
|
||||
// ie. DELIGHTED/ANGRY = 1 in 3
|
||||
// ie. ECSTATIC/FURIOUS = 1 in 4
|
||||
// ie. PLEASED/TOLERATED = 1 in 2
|
||||
// ie. DELIGHTED/ANGRY = 1 in 3
|
||||
// ie. ECSTATIC/FURIOUS = 1 in 4
|
||||
// ie. ENRAGED = 1 in 5
|
||||
chance = modplev + 1;
|
||||
if (hasequippedobid(player->pack, OT_AMU_PIETY)) {
|
||||
|
@ -2120,7 +2120,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
// get even more angry
|
||||
angergod(god->race->id, PIETYPRAYLOSS, GA_PRAY);
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (piety <= 99) {
|
||||
// piety between 0 and 99 = ignored
|
||||
|
@ -2129,9 +2129,9 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
angergod(god->race->id, 0, GA_PRAY);
|
||||
modpiety(god->race->id, -30);
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// if we get here, piety is >= 100.
|
||||
// if we get here, piety is >= 100.
|
||||
// you get some help...
|
||||
plev = getpietylev(god->race->id, NULL, NULL);
|
||||
|
||||
|
@ -2241,7 +2241,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
|
||||
|
||||
|
||||
// at this point, remember that we have now prayed to
|
||||
// at this point, remember that we have now prayed to
|
||||
// this god. ie. player is expected to follow the god's rules.
|
||||
if (!hasflag(god->flags, F_PRAYEDTO)) {
|
||||
addflag(god->flags, F_PRAYEDTO, B_TRUE, NA, NA, NULL);
|
||||
|
@ -2297,11 +2297,11 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
abilityeffects(player, OT_A_RAGE, player->cell, player, NULL);
|
||||
}
|
||||
break;
|
||||
case 3: //
|
||||
case 3: //
|
||||
msg("\"I will guide your blade!\"");
|
||||
dospelleffects(god, OT_S_TRUESTRIKE, 10, lf, NULL, lf->cell, B_UNCURSED, NULL, B_TRUE, NULL);
|
||||
break;
|
||||
case 4: //
|
||||
case 4: //
|
||||
msg("\"Your blows will be as lightning!\"");
|
||||
dospelleffects(god, OT_S_HASTE, 10, lf, NULL, lf->cell, B_UNCURSED, NULL, B_TRUE, NULL);
|
||||
break;
|
||||
|
@ -2315,7 +2315,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
|
||||
if (uncurse_one_equipped(lf, "\"Be free of your curse!\"")){
|
||||
done = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!done) {
|
||||
// try to repair armour or undull weapons
|
||||
|
@ -2362,7 +2362,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
if (c) {
|
||||
dospelleffects(god, OT_S_LIGHT, 10, NULL, NULL, c, B_BLESSED, NULL, B_TRUE, NULL);
|
||||
}
|
||||
// uncurse ALL equipped obs
|
||||
// uncurse ALL equipped obs
|
||||
for (o = lf->pack->first ; o ; o = o->next) {
|
||||
if (iscursed(o) && isequipped(o)) {
|
||||
blessob(o);
|
||||
|
@ -2393,9 +2393,9 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// remove all temporary bad status effects
|
||||
}
|
||||
|
||||
// remove all temporary bad status effects
|
||||
getflags(player->flags, retflag, &nretflags, F_BLIND, F_CONFUSED, F_DEAF, F_CAFFEINATED, F_DRUNK, F_FROZEN,
|
||||
F_GRABBEDBY, F_NAUSEATED, F_PAIN, F_POISONED, F_SLOWACT, F_SLOWMOVE, F_SLOWACTMOVE, F_NONE);
|
||||
for (i = 0; i < nretflags; i++) {
|
||||
|
@ -2431,15 +2431,15 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
if (!dospelleffects(god, OT_S_PURIFYFOOD, 10, lf, NULL, lf->cell, B_UNCURSED, NULL, B_TRUE, NULL)) {
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// bless your weapon
|
||||
if (!donesomething) {
|
||||
wep = getweapon(player);
|
||||
if (wep && !isblessed(wep)) {
|
||||
blessob(wep);
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// bless 1-3 random obs
|
||||
|
@ -2537,13 +2537,13 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
c = getcellat(player->cell->map, x, y);
|
||||
if (c && cellhaslos(c, player->cell)) {
|
||||
if (c->lf && (c->lf != player)) {
|
||||
dospelleffects(NULL, OT_S_FLAMEPILLAR, 10, NULL, NULL,
|
||||
dospelleffects(NULL, OT_S_FLAMEPILLAR, 10, NULL, NULL,
|
||||
c, B_BLESSED, NULL, B_TRUE, NULL);
|
||||
} else if (countnoncosmeticobs(c->obpile, B_FALSE, B_FALSE)) {
|
||||
addobfast(c->obpile, OT_FIRESMALL);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2568,13 +2568,13 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
castspell(god, OT_S_HEALINGMAJ, player, NULL, player->cell, NULL, NULL);
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
if (lf->hp < lf->maxhp) {
|
||||
if (lf->hp < lf->maxhp) {
|
||||
gainhp(lf, lf->maxhp);
|
||||
donesomething = B_TRUE;
|
||||
statdirty = B_TRUE;
|
||||
}
|
||||
if (isinbattle(lf, B_INCLUDEDISTANT, B_FALSE)) {
|
||||
// turn undead
|
||||
// turn undead
|
||||
castspell(god, OT_S_TURNUNDEAD, lf, NULL, NULL, NULL, NULL);
|
||||
|
||||
if (plev >= PL_INDIFFERENT) {
|
||||
|
@ -2706,9 +2706,9 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
getobname(o,oldname,o->amt);
|
||||
identify(o);
|
||||
getobname(o,newname,o->amt);
|
||||
msg("\"%s %s you are carrying %s %s!\"",
|
||||
msg("\"%s %s you are carrying %s %s!\"",
|
||||
(o->amt == 1) ? "That" : "Those",
|
||||
noprefix(oldname),
|
||||
noprefix(oldname),
|
||||
(o->amt == 1) ? "is" : "are",
|
||||
newname);
|
||||
} else {
|
||||
|
@ -2773,7 +2773,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
int donesomething = B_FALSE;
|
||||
int preventstoning = B_FALSE;
|
||||
int preventparalysis = B_FALSE;
|
||||
|
||||
|
||||
// if something nearby could stone/petrify you, confer temporary immunity.
|
||||
for (l = lf->cell->map->lf ; l ; l = l->next) {
|
||||
if ((l != lf) && areenemies(l, lf) && cansee(l, lf)) {
|
||||
|
@ -2784,7 +2784,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
int lastweaponidx;
|
||||
if (l->race->id == R_COCKATRICE) {
|
||||
preventstoning = B_TRUE;
|
||||
}
|
||||
}
|
||||
getweapons(l, B_MELEEONLY, wep, damflag, &lastweaponidx, &op, &nweps);
|
||||
for (i = 0; i < nweps; i++) {
|
||||
if (hasflagval(wep[i]->flags, F_HITCONFER, F_PARALYZED, NA, NA, NULL)) {
|
||||
|
@ -2827,7 +2827,7 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
donesomething = B_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// uncurse one equipped ob
|
||||
uncurse_one_equipped(lf, "\"Let thy curse be ended!\"");
|
||||
break;
|
||||
|
@ -2869,14 +2869,14 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
godappears(god->race->id, NULL);
|
||||
aiattack(god, lf->los[i]->lf, PERMENANT);
|
||||
donesomething = B_TRUE;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {// not in battle
|
||||
int donesomething = B_FALSE;
|
||||
flag_t *f;
|
||||
|
||||
// fix any poison potions
|
||||
// fix any poison potions
|
||||
dospelleffects(god, OT_S_PURIFYFOOD, 10, lf, NULL, lf->cell, B_UNCURSED, NULL, B_TRUE, NULL);
|
||||
|
||||
if (ispoisoned(lf)) {
|
||||
|
@ -2976,13 +2976,13 @@ int prayto(lifeform_t *lf, lifeform_t *god) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// if (!godgiftmaybe(god->race->id, B_FALSE)) {
|
||||
// if you didn't get a gift, lower piety for this god
|
||||
modpiety(god->race->id, -PIETYPRAYLOSS);
|
||||
// }
|
||||
|
||||
// lower piety for other related gods
|
||||
// lower piety for other related gods
|
||||
for (i = 0; i < ngodlfs; i++) {
|
||||
if (godlf[i] != god) {
|
||||
modpiety(godlf[i]->race->id, -25);
|
||||
|
|
28
io.c
28
io.c
|
@ -587,7 +587,7 @@ char askchar(char *prompt, char *validchars, char *def, int showchars, int mayca
|
|||
}
|
||||
strcat(buf, "? ");
|
||||
|
||||
mvwprintw(msgwin, 0, 0, buf);
|
||||
mvwprintw(msgwin, 0, 0, "%s", buf);
|
||||
_wr(msgwin);
|
||||
|
||||
cset(1);
|
||||
|
@ -1301,7 +1301,7 @@ char *askstring(char *prompt, char punc, char *retbuf, int retbuflen, char *def)
|
|||
asprintf(&ending, "%c ",punc);
|
||||
strcat(buf, ending);
|
||||
free(ending);
|
||||
mvwprintw(msgwin, 0, 0, buf);
|
||||
mvwprintw(msgwin, 0, 0, "%s", buf);
|
||||
_wr(msgwin);
|
||||
echo();
|
||||
wgetnstr(msgwin, retbuf, retbuflen);
|
||||
|
@ -4328,7 +4328,7 @@ void describegod(lifeform_t *god) {
|
|||
// title
|
||||
snprintf(buf, BUFLEN, "God::%s %s",godname, goddesc);
|
||||
wattron(mainwin, A_BOLD);
|
||||
mvwprintw(mainwin, 0, 0, buf);
|
||||
mvwprintw(mainwin, 0, 0, "%s", buf);
|
||||
wattroff(mainwin, A_BOLD);
|
||||
|
||||
wmove(mainwin, 2, 0);
|
||||
|
@ -4357,7 +4357,7 @@ void describejob(enum JOB jid) {
|
|||
// title
|
||||
snprintf(buf, BUFLEN, "%s",j->name);
|
||||
capitalise(buf);
|
||||
mvwprintw(mainwin, 0, 0, buf);
|
||||
mvwprintw(mainwin, 0, 0, "%s", buf);
|
||||
|
||||
wmove(mainwin, 2, 0);
|
||||
|
||||
|
@ -4387,7 +4387,7 @@ void describeob(object_t *o) {
|
|||
getobname(o, buf,o->amt);
|
||||
}
|
||||
wattron(mainwin, A_BOLD);
|
||||
mvwprintw(mainwin, 0, 0, buf);
|
||||
mvwprintw(mainwin, 0, 0, "%s", buf);
|
||||
wattroff(mainwin, A_BOLD);
|
||||
|
||||
wmove(mainwin, 2, 0);
|
||||
|
@ -4486,7 +4486,7 @@ void describespell(objecttype_t *ot) {
|
|||
// title
|
||||
snprintf(buf, BUFLEN, "%s",ot->name);
|
||||
capitalise(buf);
|
||||
mvwprintw(mainwin, 0, 0, buf);
|
||||
mvwprintw(mainwin, 0, 0, "%s", buf);
|
||||
|
||||
wmove(mainwin, 2, 0);
|
||||
|
||||
|
@ -10139,7 +10139,7 @@ void doheading(WINDOW *win, int *y, int x, char *what) {
|
|||
wmove(win, *y, x);
|
||||
textwithcol(win, what); (*y)++;
|
||||
setcol(win, C_WHITE);
|
||||
mvwprintw(win, *y, x, underline); (*y)++;
|
||||
mvwprintw(win, *y, x, "%s", underline); (*y)++;
|
||||
unsetcol(win, C_WHITE);
|
||||
free(underline);
|
||||
}
|
||||
|
@ -11881,7 +11881,7 @@ void drawstatus(void) {
|
|||
|
||||
wattron(statwin, A_BOLD); wprintw(statwin, "AR:"); wattroff(statwin, A_BOLD);
|
||||
snprintf(buf, BUFLEN, "%d ", getarmourrating(player, NULL, NULL, NULL, NULL));
|
||||
wprintw(statwin, buf);
|
||||
wprintw(statwin, "%s", buf);
|
||||
|
||||
wattron(statwin, A_BOLD); wprintw(statwin, "EV:"); wattroff(statwin, A_BOLD);
|
||||
wprintw(statwin, "%d ", getevasion(player));
|
||||
|
@ -11889,16 +11889,16 @@ void drawstatus(void) {
|
|||
|
||||
wattron(statwin, A_BOLD); wprintw(statwin, "$:"); wattroff(statwin, A_BOLD);
|
||||
snprintf(buf, BUFLEN, "%d ", countmoney(player->pack));
|
||||
wprintw(statwin, buf);
|
||||
wprintw(statwin, "%s", buf);
|
||||
|
||||
wattron(statwin, A_BOLD); wprintw(statwin, "Xp:"); wattroff(statwin, A_BOLD);
|
||||
snprintf(buf, BUFLEN, "%d", player->level);
|
||||
wprintw(statwin, buf);
|
||||
wprintw(statwin, "%s", buf);
|
||||
|
||||
if (lfhasflag(player, F_HASNEWLEVEL)) {
|
||||
wattron(statwin, A_BOLD); wprintw(statwin, "/"); wattroff(statwin, A_BOLD);
|
||||
setcol(statwin, C_LIGHTGREEN);
|
||||
wprintw(statwin, "LevUp",xpleft);
|
||||
wprintw(statwin, "LevUp");
|
||||
unsetcol(statwin, C_LIGHTGREEN);
|
||||
} else {
|
||||
wattron(statwin, A_BOLD); wprintw(statwin, "/"); wattroff(statwin, A_BOLD);
|
||||
|
@ -13666,11 +13666,11 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
}
|
||||
setcol(mainwin, C_GREEN);
|
||||
snprintf(buf, BUFLEN, "%-12s", ot->name);
|
||||
mvwprintw(mainwin, y, 0, buf);
|
||||
mvwprintw(mainwin, y, 0, "%s", buf);
|
||||
unsetcol(mainwin, C_GREEN);
|
||||
|
||||
snprintf(buf, BUFLEN, "%s%s", ot->desc, eb2);
|
||||
wprintw(mainwin, buf);
|
||||
wprintw(mainwin, "%s", buf);
|
||||
|
||||
if (downline(&y, h, headinglines, &nextoffset)) {
|
||||
nextoffset += offset;
|
||||
|
@ -15050,7 +15050,7 @@ void showlfstats(lifeform_t *lf, int showall) {
|
|||
getflagsourcetext(f,source);
|
||||
effectline(&stopnow, &count, offset, &nextoffset, headinglines, mainwin, &y, &x, 0, "%s %s protected from missiles by a cyclonic shield", you(lf), is(lf));
|
||||
if (isplayer(lf)) {
|
||||
wprintw(mainwin, " (power %d).%s",roman(f->val[0]),source);
|
||||
wprintw(mainwin, " (power %s).%s",roman(f->val[0]),source);
|
||||
} else {
|
||||
wprintw(mainwin, ".%s",source);
|
||||
}
|
||||
|
|
18
shops.c
18
shops.c
|
@ -228,7 +228,7 @@ void shop(lifeform_t *lf, object_t *vm) {
|
|||
|
||||
|
||||
cls();
|
||||
mvwprintw(mainwin, 0, 0, toptext);
|
||||
mvwprintw(mainwin, 0, 0, "%s", toptext);
|
||||
y = 2;
|
||||
centre(mainwin,C_WHITE, y, noprefix(shopname));
|
||||
y += 2;
|
||||
|
@ -435,11 +435,11 @@ enum SHOPRETURN shopdetectcurse(lifeform_t *lf, object_t *vm, int starty, char *
|
|||
if (cost) {
|
||||
mvwprintw(mainwin, y, 0, "It will cost $%d to perform an divination on your items.", cost);
|
||||
} else {
|
||||
mvwprintw(mainwin, y, 0, "For a fellow worshipper, we will perform divinations on your items for free.", cost);
|
||||
mvwprintw(mainwin, y, 0, "%s", "For a fellow worshipper, we will perform divinations on your items for free.");
|
||||
}
|
||||
y += 2;
|
||||
if (countmoney(lf->pack) < cost) {
|
||||
mvwprintw(mainwin, y, 0, "Unfortunately, you cannot afford this.", cost);
|
||||
mvwprintw(mainwin, y, 0, "%s", "Unfortunately, you cannot afford this.");
|
||||
y += 2;
|
||||
possible = B_FALSE;
|
||||
}
|
||||
|
@ -655,7 +655,7 @@ enum SHOPRETURN shopbless(lifeform_t *lf, object_t *vm, int starty, char *toptex
|
|||
|
||||
mvwprintw(mainwin, y, 0, "So long as their aura is known, we can bestow a blessing on most items."); y += 2;
|
||||
if (remcursecost == 0) {
|
||||
mvwprintw(mainwin, y, 0, "Curse removal - FREE",remcursecost); y++;
|
||||
mvwprintw(mainwin, y, 0, "Curse removal - FREE"); y++;
|
||||
} else {
|
||||
mvwprintw(mainwin, y, 0, "Curse removal - $%d each",remcursecost); y++;
|
||||
}
|
||||
|
@ -737,11 +737,11 @@ enum SHOPRETURN shopid(lifeform_t *lf, object_t *vm, int starty, char *toptext,
|
|||
|
||||
*nid = 0;
|
||||
|
||||
mvwprintw(mainwin, y, 0, "We can help inspect your items for a small fee."); y += 2;
|
||||
mvwprintw(mainwin, y, 0, "%s", "We can help inspect your items for a small fee."); y += 2;
|
||||
mvwprintw(mainwin, y, 0, "For just $%d per item we can reveal their general purpose,", cost); y++;
|
||||
mvwprintw(mainwin, y, 0, "however please note that we are unable to detect magical"); y++;
|
||||
mvwprintw(mainwin, y, 0, "enchantments or blessings.", cost); y += 2;
|
||||
mvwprintw(mainwin, y, 0, "Identify items [y/n]? ", countmoney(lf->pack));
|
||||
mvwprintw(mainwin, y, 0, "%s", "however please note that we are unable to detect magical"); y++;
|
||||
mvwprintw(mainwin, y, 0, "%s", "enchantments or blessings."); y += 2;
|
||||
mvwprintw(mainwin, y, 0, "%s", "Identify items [y/n]? ");
|
||||
|
||||
ch = getch();
|
||||
if (ch != 'y') {
|
||||
|
@ -1334,7 +1334,7 @@ enum SHOPRETURN shopsell(lifeform_t *lf, object_t *vm, int starty, char *toptext
|
|||
*nsold = 0;
|
||||
|
||||
mvwprintw(mainwin, y, 0, "We offer good prices for quality items."); y += 2;
|
||||
mvwprintw(mainwin, y, 0, "Sell items [y/n]? ", countmoney(lf->pack));
|
||||
mvwprintw(mainwin, y, 0, "Sell items [y/n]? ");
|
||||
|
||||
ch = getch();
|
||||
if (ch != 'y') {
|
||||
|
|
Loading…
Reference in New Issue