File: newgame-def.h

package info (click to toggle)
crawl 2%3A0.23.0-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 55,948 kB
  • sloc: cpp: 303,973; ansic: 28,797; python: 4,074; perl: 3,247; makefile: 1,632; java: 792; sh: 327; objc: 250; xml: 32; cs: 15; sed: 9; lisp: 3
file content (43 lines) | stat: -rw-r--r-- 1,061 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once

#include "game-type.h"
#include "item-prop-enum.h"
#include "job-type.h"
#include "species-type.h"

// Either a character definition, with real species, job, and
// weapon, book, wand as appropriate.
// Or a character choice, with possibly random/viable entries.
struct newgame_def
{
    string name;
    game_type type;
    string filename;
    uint64_t seed;
    bool pregenerate;

    // map name for sprint (or others in the future)
    // XXX: "random" means a random eligible map
    string map;

    string arena_teams;

    vector<string> allowed_combos;
    vector<species_type> allowed_species;
    vector<job_type> allowed_jobs;
    vector<weapon_type> allowed_weapons;

    species_type species;
    job_type job;

    weapon_type weapon;

    // Only relevant for character choice, where the entire
    // character was randomly picked in one step.
    // If this is true, the species field encodes whether
    // the choice was for a viable character or not.
    bool fully_random;

    newgame_def();
    void clear_character();
};