Mercurial > traipse_dev
diff orpg/dieroller/rollers/d20.py @ 195:b633f4c64aae alpha
Traipse Alpha 'OpenRPG' {100219-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 (Patch-2)
New Features:
New Namespace method with two new syntaxes
Fixes:
Fix to Server GUI startup errors
Fix to Server GUI Rooms tab updating
Fix to Chat and Settings if non existant die roller is picked
Fix to Dieroller and .open() used with .vs(). Successes are correctly calculated
Fix to Alias Lib's Export to Tree, Open, Save features
Fix to alias node, now works properly
Fix to Splitter node, minor GUI cleanup
author | sirebral |
---|---|
date | Sat, 24 Apr 2010 08:37:20 -0500 |
parents | 5c9a118476b2 |
children | 24769389a7ba |
line wrap: on
line diff
--- a/orpg/dieroller/rollers/d20.py Fri Jan 15 22:45:51 2010 -0600 +++ b/orpg/dieroller/rollers/d20.py Sat Apr 24 08:37:20 2010 -0500 @@ -14,10 +14,10 @@ # Author: OpenRPG Dev Team # Maintainer: # Version: -# $Id: d20.py,v 1.9 2006/11/04 21:24:19 digitalxero Exp $ +# $Id: d20.py,v Traipse 'Ornery-Orc' prof.ebral Exp $ # # Description: d20 die roller -__version__ = "$Id: d20.py,v 1.9 2006/11/04 21:24:19 digitalxero Exp $" +__version__ = "$Id: d20.py,v Traipse 'Ornery-Orc' prof.ebral Exp $" # d20 stands for "d20 system" not 20 sided die :) @@ -30,8 +30,6 @@ def __init__(self,source=[]): std.__init__(self,source) -# these methods return new die objects for specific options - def attack(self,AC,mod,critical): return d20attack(self,AC,mod,critical) @@ -56,14 +54,9 @@ myStr += "," myStr += str(a) myStr += "] = (" + str(self.sum()) + ")" - myStr += " vs DC " + str(self.DC) - - if self.is_success(): - myStr += " Success!" - else: - myStr += " Failure!" - + if self.is_success(): myStr += " Success!" + else: myStr += " Failure!" return myStr @@ -86,8 +79,7 @@ self.critical_roll = 0 if self.data[0] >= self.critical and self.is_hit(): self.critical_roll = die_base(20) + self.mod - if self.critical_roll.sum() >= self.AC: - self.critical_result = 1 + if self.critical_roll.sum() >= self.AC: self.critical_result = 1 def is_critical(self): return self.critical_result @@ -101,15 +93,9 @@ myStr += "," myStr += str(a) myStr += "] = (" + str(self.sum()) + ")" - myStr += " vs AC " + str(self.AC) - - if self.is_critical(): - myStr += " Critical" + if self.is_critical(): myStr += " Critical" + if self.is_hit(): myStr += " Hit!" + else: myStr += " Miss!" + return myStr - if self.is_hit(): - myStr += " Hit!" - else: - myStr += " Miss!" - - return myStr