1 ########################################################
2 #Copyright (c) 2006 Russ Adams, Sean Eubanks, Asgard Contributors
3 #This file is part of Asgard.
5 #Asgard is free software; you can redistribute it and/or modify
6 #it under the terms of the GNU General Public License as published by
7 #the Free Software Foundation; either version 2 of the License, or
8 #(at your option) any later version.
10 #Asgard is distributed in the hope that it will be useful,
11 #but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 #GNU General Public License for more details.
15 #You should have received a copy of the GNU General Public License
16 #along with Asgard; if not, write to the Free Software
17 #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 ########################################################
20 """ Represents a statistic associated with a Fighter object, along with
21 a number of statistic meta data. """
24 """ Name of statistic. (i.e. "hp") """
27 """ Current value. (i.e. 350 points) """
30 """ Maximum value. (i.e. 500 points) If < 0, this statistic is deleted
31 from Fighter after the battle is over. """
34 """ Whether the statistic retains its "current" value after battle. """
37 """ How much this stat goes up (maximally), on level up. """
40 """ The chances that it will go up on level up. """
43 """ Some things do not grow at a constant rate, i.e HP. This determines
44 how fast a stat grows with reference to it's previous value. For
45 example, HP = HP + (HP * growthRate). """
48 def __init__(self
,name
,current
,max,afterBattle
,plus
,chance
,growthRate
):
49 """Simple Constructor."""
51 self
.__current
= current
53 self
.__afterBattle
= afterBattle
55 self
.__chance
= chance
56 self
.__growthRate
= growthRate
67 def setCurrent(self
,c
):
76 def getAfterBattle(self
):
77 return self
.__afterBattle
79 def setAfterBattle(self
,a
):
80 self
.__afterBattle
= a
85 def setChance(self
,c
):
94 def getGrowthRate(self
):
95 return self
.__growthRate
97 def setGrowthRate(self
,g
):