1 // Copyright (C) 2002, 2003, 2004, 2005 Ulf Lorenz
2 // Copyright (C) 2003 Michael Bartl
3 // Copyright (C) 2007, 2008, 2009 Ben Asselstine
4 // Copyright (C) 2007, 2008 Ole Laursen
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU Library General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28 #include "real_player.h"
34 //! A simple artificial intelligence Player suitable to be the neutral Player.
36 * This class is a dummy AI used for the neutral player. It just does, well,
40 class AI_Dummy : public RealPlayer
44 * Make a new AI_Dummy player.
46 * @param name The name of the player.
47 * @param armyset The Id of the player's Armyset.
48 * @param color The player's colour.
49 * @param width The width of the player's FogMap.
50 * @param height The height of the player's FogMap.
51 * @param player_no The Id of the player. If this value is -1,
52 * the next free Id it used.
54 //! Default constructor.
55 AI_Dummy (std::string name, guint32 armyset, Gdk::Color color,
56 int width, int height, int player_no = -1);
59 AI_Dummy(const Player& player);
60 //! Loading constructor. See XML_Helper.
61 AI_Dummy(XML_Helper* helper);
65 virtual bool isComputer() const {return true;};
66 virtual void abortTurn();
67 virtual bool startTurn();
68 virtual void invadeCity(City* c);
69 virtual bool chooseHero(HeroProto *hero, City* c, int gold);
70 virtual Reward *chooseReward(Ruin *ruin, Sage *sage, Stack *stack);
71 virtual void heroGainsLevel(Hero * a);
72 virtual bool chooseTreachery (Stack *stack, Player *player, Vector <int> pos);
73 virtual Army::Stat chooseStat(Hero *hero);
74 virtual bool chooseQuest(Hero *hero);
76 void setDefensiveProduction(City *city);