1 // Copyright (C) 2008, 2009 Ben Asselstine
3 // This program is free software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation; either version 3 of the License, or
6 // (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU Library General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 #ifndef CREATE_SCENARIO_RANDOMIZE_H
19 #define CREATE_SCENARIO_RANDOMIZE_H
25 #include "game-parameters.h"
34 class CreateScenarioRandomize
37 CreateScenarioRandomize();
38 virtual ~CreateScenarioRandomize();
40 /** take a random city name
42 std::string popRandomCityName();
44 /* give a random city name
46 void pushRandomCityName(std::string name);
47 std::string popRandomRuinName();
48 void pushRandomRuinName(std::string name);
49 std::string popRandomTempleName();
50 void pushRandomTempleName(std::string name);
51 std::string popRandomSignpost();
52 void pushRandomSignpost(std::string name);
53 guint32 getRandomCityIncome(bool capital = false);
54 bool randomSignpostsEmpty() {return d_signposts->empty();}
55 std::string getDynamicSignpost(Signpost *signpost);
56 int getNumSignposts() {return d_signposts->size();}
57 Army * getRandomRuinKeeper(Player *p);
58 Reward *getNewRandomReward(bool hidden_ruins);
61 //! Based on the difficulty, get how much gold each player should
63 void getBaseGold (int difficulty, int *base_gold);
65 int adjustBaseGold (int base_gold);
67 //! Get the default player name for the given shield colour.
68 std::string getPlayerName(Shield::Colour id);
72 std::string popRandomListName(std::vector<std::string>& list);
74 bool loadNames(std::vector<std::string>& list, std::ifstream& file);
77 NameList *d_citynames;
78 NameList *d_signposts;
79 NameList *d_templenames;
80 NameList *d_ruinnames;
83 #endif //CREATE_SCENARIO_RANDOMIZE_H