Fix cclibinfo for rogue
This commit is contained in:
@@ -143,7 +143,7 @@ stomach(struct rogue_state *rs,int arg)
|
||||
if (food_left <= 0)
|
||||
{
|
||||
if (food_left-- < -STARVETIME)
|
||||
death('s');
|
||||
death(rs,'s');
|
||||
/*
|
||||
* the hero is fainting
|
||||
*/
|
||||
|
||||
@@ -175,7 +175,7 @@ attack(struct rogue_state *rs,THING *mp)
|
||||
endmsg(rs);
|
||||
has_hit = FALSE;
|
||||
if (pstats.s_hpt <= 0)
|
||||
death(mp->t_type); /* Bye bye life ... */
|
||||
death(rs,mp->t_type); /* Bye bye life ... */
|
||||
else if (!kamikaze)
|
||||
{
|
||||
oldhp -= pstats.s_hpt;
|
||||
@@ -206,7 +206,7 @@ attack(struct rogue_state *rs,THING *mp)
|
||||
}
|
||||
no_command += rnd(2) + 2;
|
||||
if (no_command > BORE_LEVEL)
|
||||
death('h');
|
||||
death(rs,'h');
|
||||
when 'R':
|
||||
/*
|
||||
* Rattlesnakes have poisonous bites
|
||||
@@ -242,7 +242,7 @@ attack(struct rogue_state *rs,THING *mp)
|
||||
if (mp->t_type == 'W')
|
||||
{
|
||||
if (pstats.s_exp == 0)
|
||||
death('W'); /* All levels gone */
|
||||
death(rs,'W'); /* All levels gone */
|
||||
if (--pstats.s_lvl == 0)
|
||||
{
|
||||
pstats.s_exp = 0;
|
||||
@@ -259,7 +259,7 @@ attack(struct rogue_state *rs,THING *mp)
|
||||
if (pstats.s_hpt <= 0)
|
||||
pstats.s_hpt = 1;
|
||||
if (max_hp <= 0)
|
||||
death(mp->t_type);
|
||||
death(rs,mp->t_type);
|
||||
msg(rs,"you suddenly feel weaker");
|
||||
}
|
||||
when 'F':
|
||||
@@ -269,7 +269,7 @@ attack(struct rogue_state *rs,THING *mp)
|
||||
player.t_flags |= ISHELD;
|
||||
sprintf(monsters['F'-'A'].m_stats.s_dmg,"%dx1", ++vf_hit);
|
||||
if (--pstats.s_hpt <= 0)
|
||||
death('F');
|
||||
death(rs,'F');
|
||||
when 'L':
|
||||
{
|
||||
/*
|
||||
@@ -327,7 +327,7 @@ attack(struct rogue_state *rs,THING *mp)
|
||||
{
|
||||
pstats.s_hpt -= vf_hit;
|
||||
if (pstats.s_hpt <= 0)
|
||||
death(mp->t_type); /* Bye bye life ... */
|
||||
death(rs,mp->t_type); /* Bye bye life ... */
|
||||
}
|
||||
miss(rs,mname, (char *) NULL, FALSE);
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ be_trapped(struct rogue_state *rs,coord *tc)
|
||||
if (pstats.s_hpt <= 0)
|
||||
{
|
||||
msg(rs,"an arrow killed you");
|
||||
death('a');
|
||||
death(rs,'a');
|
||||
}
|
||||
else
|
||||
msg(rs,"oh no! An arrow shot you");
|
||||
@@ -340,7 +340,7 @@ be_trapped(struct rogue_state *rs,coord *tc)
|
||||
if (pstats.s_hpt <= 0)
|
||||
{
|
||||
msg(rs,"a poisoned dart killed you");
|
||||
death('d');
|
||||
death(rs,'d');
|
||||
}
|
||||
if (!ISWEARING(R_SUSTSTR) && !save(VS_POISON))
|
||||
chg_str(-1);
|
||||
|
||||
@@ -227,13 +227,18 @@ score(int amount, int flags, char monst)
|
||||
*/
|
||||
|
||||
void
|
||||
death(char monst)
|
||||
death(struct rogue_state *rs,char monst)
|
||||
{
|
||||
char **dp, *killer;
|
||||
struct tm *lt;
|
||||
static time_t date;
|
||||
//struct tm *localtime(const time_t *);
|
||||
|
||||
if ( rs->guiflag == 0 )
|
||||
{
|
||||
fprintf(stderr,"death during replay\n");
|
||||
rs->replaydone = (uint32_t)time(NULL);
|
||||
return;
|
||||
}
|
||||
signal(SIGINT, SIG_IGN);
|
||||
purse -= purse / 10;
|
||||
signal(SIGINT, leave);
|
||||
|
||||
@@ -388,7 +388,7 @@ int rogue(int argc, char **argv, char **envp)
|
||||
level = rnd(100) + 1;
|
||||
initscr();
|
||||
getltchars();
|
||||
death(death_monst());
|
||||
death(rs,death_monst());
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ void create_obj(struct rogue_state *rs);
|
||||
|
||||
void current(struct rogue_state *rs,THING *cur, char *how, char *where);
|
||||
void d_level(struct rogue_state *rs);
|
||||
void death(char monst);
|
||||
void death(struct rogue_state *rs,char monst);
|
||||
char death_monst(void);
|
||||
void dig(int y, int x);
|
||||
void discard(THING *item);
|
||||
|
||||
@@ -391,9 +391,9 @@ def:
|
||||
if ((pstats.s_hpt -= roll(6, 6)) <= 0)
|
||||
{
|
||||
if (start == &hero)
|
||||
death('b');
|
||||
death(rs,'b');
|
||||
else
|
||||
death(moat(start->y, start->x)->t_type);
|
||||
death(rs,moat(start->y, start->x)->t_type);
|
||||
}
|
||||
used = TRUE;
|
||||
if (terse)
|
||||
|
||||
Reference in New Issue
Block a user