tfv: die when hit points go to zero

This commit is contained in:
Vince Weaver 2018-07-13 23:36:01 -04:00
parent af2418ebcb
commit f8adb65075
6 changed files with 19 additions and 7 deletions

View File

@ -5,10 +5,10 @@ Soon:
--> Fix weird glitch on damage printing
--> Sound effects
--> enemy uses magic
--> Enemy more likely to spawn on appropriate territory
--> green background on anti-damage printing
--> pick up vortex cannon from someone
--> Balance the battles
--> Keep menu cursor from going out of bounds
+ Game over screen
--> Pause 2 seconds

View File

@ -1399,7 +1399,10 @@ int do_battle(int ground_color) {
gr_copy_to_current(0xc00);
if (running) {
if (hp==0) {
grsim_put_sprite(tfv_defeat,ax-2,24);
}
else if (running) {
if (battle_count%2) {
grsim_put_sprite(tfv_stand_right,ax,20);
}
@ -1418,6 +1421,11 @@ int do_battle(int ground_color) {
page_flip();
if (hp==0) {
for(i=0;i<15;i++) usleep(100000);
break;
}
usleep(100000);
ch=grsim_input();
@ -1460,9 +1468,6 @@ int do_battle(int ground_color) {
break;
}
// if (hp==0) {
// game_over();
// }
}

View File

@ -90,8 +90,11 @@ struct dialog_type dialog[100]={
[DIALOG_PETE] = {
.statement[0].words="Your journey takes you toward Bel Air.",
.statement[0].next=1,
.statement[1].words="PLOT!",
.statement[1].words="Hari Seldon predicted this!",
.statement[1].next=1,
.statement[2].words="PLOT!",
.statement[2].next=1,
},
[DIALOG_KENJESU] = {
.statement[0].words="Have you found your lost guinea pig?",

View File

@ -52,7 +52,7 @@ unsigned char tfv_victory[]={
unsigned char tfv_defeat[]={
0x7,0x3,
0x00,0x00,0x00,0x2b,0x00,0x00,0x00,
0x88,0x00,0x00,0x22,0xb0,0xb0,0x0d,
0x88,0x00,0x00,0x22,0xb0,0xb0,0xd0,
0x88,0x22,0x22,0x22,0xdd,0xdb,0xdd,
};

View File

@ -3,6 +3,7 @@ extern unsigned char tfv_walk_right[];
extern unsigned char tfv_stand_left[];
extern unsigned char tfv_walk_left[];
extern unsigned char tfv_victory[];
extern unsigned char tfv_defeat[];
extern unsigned char tfv_led_sword[];
extern unsigned char tfg_stand_right[];
@ -10,6 +11,7 @@ extern unsigned char tfg_walk_right[];
extern unsigned char tfg_stand_left[];
extern unsigned char tfg_walk_left[];
extern unsigned char tfg_victory[];
extern unsigned char tfg_defeat[];
extern unsigned char bird_rider_stand_right[];
extern unsigned char bird_rider_walk_right[];

View File

@ -163,6 +163,8 @@ int world_map(void) {
ch=grsim_input();
if (hp==0) break;
if ((ch=='q') || (ch==27)) break;
if ((ch=='t')) {