示例#1
0
bool defense_game::init(game *g)
{
 g->turn = HOURS(12); // Start at noon
 g->temperature = 65;
 if (!g->u.create(g, PLTYPE_CUSTOM))
  return false;
 g->u.str_cur = g->u.str_max;
 g->u.per_cur = g->u.per_max;
 g->u.int_cur = g->u.int_max;
 g->u.dex_cur = g->u.dex_max;
 init_itypes(g);
 init_mtypes(g);
 init_constructions(g);
 init_recipes(g);
 current_wave = 0;
 hunger = false;
 thirst = false;
 sleep  = false;
 zombies = false;
 specials = false;
 spiders = false;
 triffids = false;
 robots = false;
 subspace = false;
 mercenaries = false;
 init_to_style(DEFENSE_EASY);
 setup();
 g->u.cash = initial_cash;
 popup_nowait("Please wait as the map generates [ 0%]");
 // TODO: support multiple defence games? clean up old defence game
 g->cur_om = &overmap_buffer.get(g, 0, 0);
 init_map(g);
 caravan(g);
 return true;
}
示例#2
0
void defense_game::init(game *g)
{
 g->turn = HOURS(12); // Start at noon
 g->temperature = 65;
 g->u.create(g, PLTYPE_CUSTOM);
 g->u.str_cur = g->u.str_max;
 g->u.per_cur = g->u.per_max;
 g->u.int_cur = g->u.int_max;
 g->u.dex_cur = g->u.dex_max;
 init_itypes(g);
 init_mtypes(g);
 init_constructions(g);
 init_recipes(g);
 current_wave = 0;
 hunger = false;
 thirst = false;
 sleep  = false;
 zombies = false;
 specials = false;
 spiders = false;
 triffids = false;
 robots = false;
 subspace = false;
 mercenaries = false;
 init_to_style(DEFENSE_EASY);
 setup();
 g->u.cash = initial_cash;
 popup_nowait("Please wait as the map generates [ 0%]");
 init_map(g);
 caravan(g);
}