- generate error if main screen is not at least 80x25
- showlfstats() - implement text wrap and scrolling on Effects screen - If a monster slips and IQ >= animal, tiptoe next turn.
This commit is contained in:
parent
3fb91ba6e1
commit
c30a1c4b94
2
defs.h
2
defs.h
|
@ -3578,6 +3578,8 @@ enum FLAG {
|
||||||
// v0 = max time allowed to rest before checkout
|
// v0 = max time allowed to rest before checkout
|
||||||
// v1 = total time rested
|
// v1 = total time rested
|
||||||
// text = obid of hotel
|
// text = obid of hotel
|
||||||
|
F_SLIPPEDLASTTURN, // this monster slipped the previous turn, and will try to tiptoe
|
||||||
|
// on its next move.
|
||||||
F_SWARM, // this lf is a swarm, its maxattacks are reduced
|
F_SWARM, // this lf is a swarm, its maxattacks are reduced
|
||||||
// based on its remaining hp pct.
|
// based on its remaining hp pct.
|
||||||
F_SWIMEVASION, // +v0 evasion if swimming
|
F_SWIMEVASION, // +v0 evasion if swimming
|
||||||
|
|
3
io.h
3
io.h
|
@ -105,6 +105,7 @@ void dumpcols(void);
|
||||||
void dumpskills(void);
|
void dumpskills(void);
|
||||||
void dumpspells(void);
|
void dumpspells(void);
|
||||||
void dumpweps(void);
|
void dumpweps(void);
|
||||||
|
int effectline(int *stopnow, int *count, int offset, int *nextoffset, int headinglines, WINDOW *win, int *y, int *x, int newlineindent, char *format, ... );
|
||||||
void forceredraw(void);
|
void forceredraw(void);
|
||||||
enum COLOUR getattrcolour(enum ATTRBRACKET brack);
|
enum COLOUR getattrcolour(enum ATTRBRACKET brack);
|
||||||
char getchoice(prompt_t *prompt);
|
char getchoice(prompt_t *prompt);
|
||||||
|
@ -164,3 +165,5 @@ int warnabout(char *what);
|
||||||
int real_warnabout(char *what, int lifetime, int doquestion);
|
int real_warnabout(char *what, int lifetime, int doquestion);
|
||||||
void wingame(void);
|
void wingame(void);
|
||||||
char wrapprint(WINDOW *win, int *y, int *x, int newlineindent, char *format, ... );
|
char wrapprint(WINDOW *win, int *y, int *x, int newlineindent, char *format, ... );
|
||||||
|
char wrapprint_nomore(WINDOW *win, int *y, int *x, int newlineindent, char *format, ... );
|
||||||
|
char real_wrapprint(WINDOW *win, int *y, int *x, int pager, int newlineindent, char *format, ... );
|
||||||
|
|
7
lf.c
7
lf.c
|
@ -22908,6 +22908,13 @@ int slipon(lifeform_t *lf, object_t *o) {
|
||||||
|
|
||||||
if (isplayer(lf)) {
|
if (isplayer(lf)) {
|
||||||
real_warnabout("(use 'm-tiptoe' to walk carefully)", PERMENANT, B_FALSE);
|
real_warnabout("(use 'm-tiptoe' to walk carefully)", PERMENANT, B_FALSE);
|
||||||
|
} else {
|
||||||
|
// most monsters who slipped will tiptoe next turn, if it is still slippery here.
|
||||||
|
if (getattrbracket(getattr(lf, A_IQ), A_IQ, NULL) >= IQ_ANIMAL) {
|
||||||
|
if (getslipperyness(lf->cell, NULL)) {
|
||||||
|
addflag(lf->flags, F_SLIPPEDLASTTURN, B_TRUE, NA, NA, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o) {
|
if (o) {
|
||||||
|
|
14
move.c
14
move.c
|
@ -2017,7 +2017,19 @@ int movetowards(lifeform_t *lf, cell_t *dst, int dirtype, int strafe) {
|
||||||
if (db) {
|
if (db) {
|
||||||
dblog(".oO { dir from %d,%d -> %d,%d is %s }", lf->cell->x, lf->cell->y, dst->x, dst->y, getdirname(dir));
|
dblog(".oO { dir from %d,%d -> %d,%d is %s }", lf->cell->x, lf->cell->y, dst->x, dst->y, getdirname(dir));
|
||||||
}
|
}
|
||||||
rv = trymove(lf, dir, B_TRUE, strafe);
|
|
||||||
|
if (isplayer(lf)) {
|
||||||
|
rv = trymove(lf, dir, B_TRUE, strafe);
|
||||||
|
} else {
|
||||||
|
flag_t *f;
|
||||||
|
f = lfhasflag(lf, F_SLIPPEDLASTTURN);
|
||||||
|
if (f) {
|
||||||
|
killflag(f);
|
||||||
|
rv = trysneak(lf, dir);
|
||||||
|
} else {
|
||||||
|
rv = trymove(lf, dir, B_TRUE, strafe);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (db) dblog(".oO { dir from %d,%d -> %d,%d is DT_NONE ! }", lf->cell->x, lf->cell->y, dst->x, dst->y);
|
if (db) dblog(".oO { dir from %d,%d -> %d,%d is DT_NONE ! }", lf->cell->x, lf->cell->y, dst->x, dst->y);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue