tfv: make battleground match climate

This commit is contained in:
Vince Weaver 2018-07-09 16:47:59 -04:00
parent 03a7a03462
commit 00c9c49edc
3 changed files with 6 additions and 8 deletions

View File

@ -1283,7 +1283,7 @@ void menu_keypress(int ch) {
}
int do_battle(void) {
int do_battle(int ground_color) {
int i,ch;
@ -1302,9 +1302,6 @@ int do_battle(void) {
// random, with weight toward proper terrain
// 50% completely random, 50% terrain based?
enemy_type=random_8()%0x7;
/* Setup Enemy HP */
enemy_hp=enemies[enemy_type].hp_base+
(rand()&enemies[enemy_type].hp_mask);
@ -1325,12 +1322,13 @@ int do_battle(void) {
}
/* Draw ground */
/* FIXME: base on map location */
color_equals(COLOR_LIGHTGREEN);
color_equals(ground_color);
for(i=10;i<40;i++) {
hlin_double(ram[DRAW_PAGE],0,39,i);
}
/* Draw some background images for variety? */
ram[DRAW_PAGE]=saved_drawpage;
draw_battle_bottom(enemy_type);

View File

@ -25,7 +25,7 @@ void print_help(void);
int name_screen(void);
int do_battle(void);
int do_battle(int background);
int world_map(void);

View File

@ -219,7 +219,7 @@ int world_map(void) {
if (ch=='h') print_help();
if (ch=='b') {
do_battle();
do_battle(map_info[map_location].ground_color);
refresh=1;
}
if (ch=='i') print_info();