comparison orpg/dieroller/base.py @ 36:d02e9197c066 ornery-orc

Traipse 'OpenRPG' {101220-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 (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 New IronClaw roller, sheet, and image New ShapeShifter PC Sheet 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 Update to Hidden Die plugin, allows for non standard dice rolls Update to location.py, allows for more portable references when starting Traipse Update to the Features node 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 Server, removing wxPython dependencies where not needed 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 Fix to Send to Chat from Gametree Fix to Gametree, renaming and remapping operates correctly Fix to aliaslib, prevents error caused when SafeHTML is sent None
author sirebral
date Sun, 19 Dec 2010 22:44:36 -0600
parents fc48380f0c9f
children
comparison
equal deleted inserted replaced
35:ee890f424e16 36:d02e9197c066
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