1
// Copyright (C) 2001, 2003 Michael Bartl
2
// Copyright (C) 2002, 2003, 2004, 2005, 2006 Ulf Lorenz
3
// Copyright (C) 2006 Andrea Paternesi
4
// Copyright (C) 2007, 2008 Ben Asselstine
1
6
// This program is free software; you can redistribute it and/or modify
2
7
// it under the terms of the GNU General Public License as published by
3
8
// the Free Software Foundation; either version 2 of the License, or
11
16
// You should have received a copy of the GNU General Public License
12
17
// along with this program; if not, write to the Free Software
13
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24
#define DEFAULT_TEMPLE_NAME "Shrine"
27
#include "NamedLocation.h"
24
/** A temple is the place where heroes can get quests or have their armies
25
* blessed. It doesn't extend the Location class very much...
28
class Temple : public Location
32
//! A temple on the game map.
34
* A temple is the place where heroes can get quests or have their armies
37
class Temple : public NamedLocation
31
/** Default constructor
33
* @param pos the location of the temple
34
* @param name the name of the temple (AFAIR unused)
36
Temple(Vector<int> pos, std::string name = "Shrine", int type=0);
38
//! Loading constructor. See XML_Helper
40
//! Default constructor.
42
* @param pos The location of the temple on the game map.
43
* @param name The name of the temple.
44
* @param type The type of the temple. This should always
47
Temple(Vector<int> pos, std::string name = DEFAULT_TEMPLE_NAME,
50
Temple(const Temple&);
51
//! Loading constructor.
53
* @param helper The opened saved-game file to load the temple from.
39
55
Temple(XML_Helper* helper);
40
Temple(const Temple&);
43
//! Returns the type of the temple
59
//! Returns the type of the temple.
44
60
int getType() {return d_type;};
46
//! Returns the type of the temple
62
//! Returns the type of the temple.
47
63
void setType(int type) {d_type=type;};
49
//! Dummy function. May be extended in the future.
50
bool searchable(){return true;}
65
//! Returns whether or not the temple can be searched.
67
* @note Temples can always be searched in this game.
69
bool searchable() {return true;}
52
//! Save the temple data.
71
//! Save the temple to the opened saved-game file.
53
72
bool save(XML_Helper* helper) const;
76
//! The type of the temple.
78
* The temple always has a type of 0, because there is only one kind
79
* of temple in the game.