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 ########################################################
22 """ The name of the status. (i.e. "poison") """
25 """ List of Transaction's to execute on entry into this Status. (i.e. hp -5%) """
28 """ List of Transaction's to execute each turn of the afflicted Fighter. """
31 """ List of Transaction's to execute each game loop iteration. """
34 """ List of Transaction's to execute on the exit of a Status. """
39 def __init__(self
,n
,e
,pT
,pI
,x
,pToM
):
40 """Simple Constructor."""
44 self
.__perIteration
= pI
46 self
.__perTurnOnMove
= pToM
49 """Get name of status."""
53 """Set name of status."""
56 def getEntrance(self
):
57 """Get entrance transactions."""
58 return self
.__entrance
60 def setEntrance(self
,e
):
61 """Set entrance transactions."""
65 """Get per-turn transactions."""
68 def setPerTurn(self
,pT
):
69 """Set per-turn transactions."""
72 def getIteration(self
):
73 """Get per-iteration transactions."""
74 return self
.__perIteration
76 def setIteration(self
, pI
):
77 """Set per-iteration transactions."""
78 self
.__perIteration
= pI
81 """Get exit transactions."""
85 """Set exit transactions."""
88 def getPerTurnOnMove(self
):
89 """Get per-turn on move transactions."""
90 return self
.__perTurnOnMove
92 def setPerTurnOnMove(self
,pT
):
93 """Set per-turn on move transactions."""
94 self
.__perTurnOnMove
= pT
96 def genEntrance(self
):
97 """Generate entrance transactions."""
98 for e
in self
.__entrance
:
101 def genPerTurn(self
):
102 """Generate per-turn transactions."""
103 for t
in self
.__perTurn
:
106 def genIteration(self
):
107 """Generate per-iteration transactions."""
108 for i
in self
.__perIteration
:
112 """Generate exit transactions."""
113 for x
in self
.__exit
:
116 def genPerTurnOnMove(self
):
117 """Generate per-turn when a fighter moves transactions."""
118 for t
in self
.__perTurnOnMove
: