tfv: update boss battle

This commit is contained in:
Vince Weaver 2018-07-18 00:53:38 -04:00
parent 950ed72e82
commit 73e3998e7c
2 changed files with 79 additions and 5 deletions

View File

@ -71,7 +71,7 @@ List hits
*/
static int battle_bar=0;
static int susie_out=0;
/* Background depend on map location? */
/* Room for guinea pig in party? */
@ -92,7 +92,7 @@ struct enemy_type {
unsigned char *sprite;
};
static struct enemy_type enemies[8]={
static struct enemy_type enemies[9]={
[0]= {
.name="Killer Crab",
.hp_base=50,
@ -165,6 +165,15 @@ static struct enemy_type enemies[8]={
.resist=MAGIC_ICE,
.sprite=evil_penguin,
},
[8]= {
.name="Act.Principl",
.hp_base=10,
.hp_mask=0x1f,
.attack_name="BIRDIE",
.weakness=MAGIC_NONE,
.resist=MAGIC_ICE|MAGIC_FIRE,
.sprite=roboknee1,
},
};
static int gr_put_num(int xx,int yy,int number) {
@ -252,8 +261,15 @@ static int draw_battle_bottom(int enemy_type) {
// print("DEATER");
print(nameo);
vtab(23);
htab(15);
move_cursor();
print("SUSIE");
if (menu_state==MENU_NONE) {
/* TFV Stats */
vtab(21);
htab(25);
move_cursor();
@ -307,6 +323,37 @@ static int draw_battle_bottom(int enemy_type) {
ram[COLOR]=0x20;
if (limit) hlin_double(ram[DRAW_PAGE],35,35+limit,42);
/* Susie Stats */
if (susie_out) {
vtab(23);
htab(24);
move_cursor();
print_byte(255);
vtab(23);
htab(27);
move_cursor();
print_byte(0);
#if 0
/* Draw Time bargraph */
ram[COLOR]=0xa0;
hlin_double(ram[DRAW_PAGE],30,34,42);
ram[COLOR]=0x20;
if (battle_bar) {
hlin_double(ram[DRAW_PAGE],30,30+(battle_bar-1),42);
}
/* Draw Limit break bargraph */
ram[COLOR]=0xa0;
hlin_double(ram[DRAW_PAGE],35,39,42);
ram[COLOR]=0x20;
if (limit) hlin_double(ram[DRAW_PAGE],35,35+limit,42);
#endif
}
}
if (menu_state==MENU_MAIN) {
@ -1473,10 +1520,16 @@ int boss_battle(void) {
int enemy_count=30;
int old;
susie_out=1;
rotate_intro();
battle_count=20;
enemy_type=8;
enemy_hp=255;
saved_drawpage=ram[DRAW_PAGE];
@ -1492,8 +1545,8 @@ int boss_battle(void) {
}
/* Draw horizon */
color_equals(COLOR_GREY);
hlin_double(ram[DRAW_PAGE],0,39,10);
// color_equals(COLOR_GREY);
// hlin_double(ram[DRAW_PAGE],0,39,10);
ram[DRAW_PAGE]=saved_drawpage;
@ -1519,7 +1572,12 @@ int boss_battle(void) {
grsim_put_sprite(tfv_led_sword,ax-5,20);
}
grsim_put_sprite(enemies[enemy_type].sprite,enemy_x,20);
if ((enemy_count&0xf)<4) {
grsim_put_sprite(roboknee1,enemy_x,16);
}
else {
grsim_put_sprite(roboknee2,enemy_x,16);
}
draw_battle_bottom(enemy_type);
@ -1568,6 +1626,7 @@ int boss_battle(void) {
if (enemy_hp==0) {
// FIXME?
victory_dance();
break;
}

View File

@ -386,6 +386,21 @@ unsigned char roboknee1[]={
0x88,0x88,0x88,0x88,0x00,0x00,0x00,0x00,0x00,
};
unsigned char roboknee2[]={
0x9,0xb,
0x55,0x55,0xb5,0x00,0x00,0x50,0xd5,0x05,0x50,
0x55,0xbb,0xbb,0x0b,0x00,0x55,0xd0,0x0d,0x55,
0x05,0xb5,0x0b,0x00,0x00,0x50,0x05,0x05,0x00,
0x88,0x88,0x88,0x80,0xb0,0x05,0x00,0x00,0x00,
0x88,0x88,0x88,0x08,0x0b,0x00,0x00,0x00,0x00,
0x88,0x88,0x88,0x00,0x00,0x00,0x00,0x00,0x00,
0x58,0x78,0x78,0x00,0x00,0x00,0x00,0x00,0x00,
0x55,0xe1,0x17,0xe0,0x00,0x00,0x00,0x00,0x00,
0x55,0x7e,0x0e,0x7e,0x2e,0x00,0x00,0x00,0x00,
0xf5,0x07,0x00,0x87,0x87,0x00,0x00,0x00,0x00,
0x88,0x88,0x00,0x08,0x08,0x00,0x00,0x00,0x00,
};