comparison orpg/dieroller/base.py @ 239:56c1f2729413 beta

Traipse Beta 'OpenRPG' {100811-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary (Closing/Closed) New Features: New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order New to Server GUI, can now clear log New Earthdawn Dieroller Updates: Update to Warhammer PC Sheet. Rollers set as macros. Should work with little maintanence. Update to Browser Server window. Display rooms with ' " & cleaner Update to Server. Handles ' " & cleaner. Update to Dieroller. Cleaner, more effecient expression system. Fixes: Fix to InterParse that was causing an Infernal Loop with Namespace Internal Fix to XML data, removed old Minidom and switched to Element Tree Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread Fix to metaservers.xml file not being created Fix to Single and Double quotes in Whiteboard text Fix to Background images not showing when using the Image Server Fix to Duplicate chat names appearing Fix to Server GUI's logging output Fix to FNB.COLORFUL_TABS bug Fix to Gametree for XSLT Sheets Fix to Gametree for locating gametree files
author sirebral
date Wed, 11 Aug 2010 13:52:30 -0500
parents 13054be69834
children
comparison
equal deleted inserted replaced
238:b44dad398833 239:56c1f2729413
124 # methods overloaded above. 124 # methods overloaded above.
125 if type(other) == type(3) or type(other) == type(3.0): return cmp(self.sum(), other) 125 if type(other) == type(3) or type(other) == type(3.0): return cmp(self.sum(), other)
126 elif hasattr(other,"sum"): return cmp(self.sum(), other.sum()) 126 elif hasattr(other,"sum"): return cmp(self.sum(), other.sum())
127 else: return UserList.UserList.__cmp__(self,other) 127 else: return UserList.UserList.__cmp__(self,other)
128 128
129
129 def __rcmp__(self,other): 130 def __rcmp__(self,other):
130 return self.__cmp__(other) 131 return self.__cmp__(other)
131 132
132 def __add__(self,other): 133 def __add__(self,other):
133 mycopy = copy.deepcopy(self) 134 mycopy = copy.deepcopy(self)
227 return result 228 return result
228 229
229 ### di class to handle actual dice 230 ### di class to handle actual dice
230 231
231 class di: 232 class di:
232 def __init__(self, sides, min=1): 233 def __init__(self,sides,min=1):
233 self.sides = sides 234 self.sides = sides
234 self.history = None 235 self.history = None
235 self.value = None 236 self.value = None
236 self.target = None 237 self.target = None
237 self.roll(min) 238 self.roll(min)
260 if len(self.history) > 1: return str(self.history) 261 if len(self.history) > 1: return str(self.history)
261 else: return str(self.value) 262 else: return str(self.value)
262 263
263 def __int__(self): 264 def __int__(self):
264 return self.value 265 return self.value
266
265 267
266 def __lt__(self,other): 268 def __lt__(self,other):
267 if type(other) == type(3) or type(other) == type(3.0): return self.value < other 269 if type(other) == type(3) or type(other) == type(3.0): return self.value < other
268 elif hasattr(other,"value"): return self.value < other.value 270 elif hasattr(other,"value"): return self.value < other.value
269 else: return self < other 271 else: return self < other