# HG changeset patch # User sirebral # Date 1264240016 21600 # Node ID 24d59375aac9e9a79d415b249b0c3bd85707a88a # Parent 477b646a39f43733553e3406472b7a8895ea6ddf Traipse Beta 'OpenRPG' {100123-01} 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 (Beta) New Features: Added Bookmarks Added 'boot' command to remote admin Added confirmation window for sent nodes Minor changes to allow for portability to an OpenSUSE linux OS Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Zoom Mouse plugin added Images added to Plugin UI Switching to Element Tree Map efficiency, from FlexiRPG Added Status Bar to Update Manager New TrueDebug Class in orpg_log (See documentation for usage) Portable Mercurial Tip of the Day added, from Core and community New Reference Syntax added for custom PC sheets New Child Reference for gametree New Parent Reference for gametree New Gametree Recursion method, mapping, context sensitivity, and effeciency.. New Features node with bonus nodes and Node Referencing help added Dieroller structure from Core New DieRoller portability for odd Dice Added 7th Sea die roller; ie [7k3] = [7d10.takeHighest(3).open(10)] New 'Mythos' System die roller added Added new vs. die roller method for WoD; ie [3v3] = [3d10.vs(3)]. Included for Mythos roller also New Warhammer FRPG Die Roller (Special thanks to Puu-san for the support) New EZ_Tree Reference system. Push a button, Traipse the tree, get a reference (Beta!) Fixes: Fix to Text based Server Fix to Remote Admin Commands Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Fix to Map from gametree not showing to all clients Fix to gametree about menus Fix to Password Manager check on startup Fix to PC Sheets from tool nodes. They now use the tabber_panel Fix to Whiteboard ID to prevent random line or text deleting. Fixes to Server, Remote Server, and Server GUI Fix to Update Manager; cleaner clode for saved repositories Fixes made to Settings Panel and now reactive settings when Ok is pressed Fixes to Alternity roller's attack roll. Uses a simple Tuple instead of a Splice Fix to Use panel of Forms and Tabbers. Now longer enters design mode Fix made Image Fetching. New fetching image and new failed image Modified ID's to prevent non updated clients from ruining the fix. default_manifest.xml renamed to default_upmana.xml diff -r 477b646a39f4 -r 24d59375aac9 orpg/dieroller/rollers/alternity.py --- a/orpg/dieroller/rollers/alternity.py Sat Jan 23 01:46:26 2010 -0600 +++ b/orpg/dieroller/rollers/alternity.py Sat Jan 23 03:46:56 2010 -0600 @@ -18,19 +18,47 @@ # # Changelog: # -# v.1 original release JEC -# -# Traipse Release: -# The changes made in the Traipe release are intended to create a more direct connection -# between the source and the intrepretor. IF, ELIF statements have been replaced with dictionaries, +# v.1 original release JEC +# +# Traipse Release: +# The changes made in the Traipe release are intended to create a more direct connection +# between the source and the intrepretor. IF, ELIF statements have been replaced with dictionaries, # unused objects have been replace with re-usable objects, and the code has been condensed. +# +# SEG: JAN 21 2010 - v.1.2 O'Flux Release: +# Edits & Additions: fixed a few minor bugs; Damage roll & Display Issues. +# Added Secondary Damage Calculation and Display. Fix all errors. +# Tested for Traipse on Win 7 +# +# Skill Check Example: +# [1d20.sk(12,-2)] +# OUTPUT Example: +# => [6,-3] = (3) AMAZING Success +# +# Pistol, Laser; 0 step -- Attack Example: +# [1d20.at(12,0,(1d4+1,"w"),(1d6+1,"w"),(1d4,"m"))] +# OUTPUT Example: +# => [1,0] = (1) CRITICAL SUCCESS AMAZING HIT +# ===> Damage [4] = (4) mortal ======> Secondary Damage (2) stun / (2) wound +# +# Action Check Example: +# [1d20.ac(14,-1)] +# OUTPUT Example: +# => ACTION CHECK : [18,-3] = (15) Marginal failure +# -1 Step make up bonus next Action Check +# +# import re + from std import std from time import time, clock from orpg.dieroller.base import di, die_base, die_rollers -__version__ = "$Id: alternity.py,v Traipse 'Ornery-Orc' prof.ebral Exp $" +## from orpg.tools.orpg_log import debug + + +__version__ = "$Id: alternity.py,v 0.1 2003/01/02 12:00:00 cchriss Exp $" # Alternity stands for "Alternity system" 20 sided die plus mods @@ -40,12 +68,16 @@ def __init__(self,source=[]): std.__init__(self,source) + # these methods return new die objects for specific options def sk(self,score,mod): return sk(self,score,mod) def at(self,score,mod,dmgo,dmgg,dmga): return at(self,score,mod,dmgo,dmgg,dmga) + def ac(self,score,mod): + return ac(self,score,mod) + die_rollers.register(alternity) class sk(std): @@ -56,17 +88,17 @@ self.mod = mod def getMod(self,mod=0): - m=0 - mods = { -4: -di(12), -3: -di(8), -2: -di(6), -1: -di(4), 1: -di(4), - 2: di(6), 3: di(8), 4: di(12), 5: di(20)} - if mod in mods.keys(): m = mods[mod].value + m=0 + mods = { -4: -di(12), -3: -di(8), -2: -di(6), -1: -di(4), 1: di(4), + 2: di(6), 3: di(8), 4: di(12), 5: di(20)} # SEG fix 1: di(4) # + if mod in mods.keys(): m = mods[mod].value elif mod <= -5: m=-di(20).value elif mod == 6: m=di(20).value + di(20).value elif mod >= 7: m=di(20).value + di(20).value + di(20).value return m def getRolLStr(self): - myStr = "[" + str(self.data[0]) + myStr = "[" + str(self.data[0]) self.d20 = self.sum() amod = self.getMod(self.mod) self.dieRoll = self.d20 + amod @@ -74,7 +106,7 @@ myStr += "," myStr += str(a) myStr += "," + str(amod) + "] = (" + str(self.dieRoll) + ")" - if ( self.d20 == 1 ): self.success = 'CS' +## if ( self.d20 == 1 ): self.success = 'CS' # seg - removed - unneeded ** # if ( self.dieRoll <= self.score / 4 ): self.success = 'A' elif ( self.dieRoll <= self.score / 2 ): self.success = 'G' elif ( self.dieRoll <= self.score ): self.success = 'O' @@ -83,51 +115,107 @@ return myStr def __str__(self): - myStr = self.getRolLStr() - successes = {'CS': " CRITICAL SUCCESS", - 'CF': " CRITICAL FAILURE", - 'A': " AMAZING Success", - 'G': " Good Success", - 'O': " Ordinary Success", - 'F': " failure"} + myStr = self.getRolLStr() + successes = {'CS': " CRITICAL SUCCESS", + 'CF': " CRITICAL FAILURE", + 'A': " AMAZING Success", + 'G': " Good Success", + 'O': " Ordinary Success", + 'F': " failure"} + if ( self.d20 == 1 ): myStr += successes['CS'] # SEG Dec 19 2009 myStr += successes[self.success] return myStr -class at(sk): - ## Traipse Usage: The source I received had the damage rolls like this 1d6s, with the damage type a - ## letter that could be sliced from the roll. However, the roll is parsed before the letter can be - ## sliced from it, and with the letter attached it created an error. - ## - ## The Traipse method puts the damage type and the damage roll into a Tuple, ie (1d6, 's'). - ## When uing this method you must include single or double quoutes around the damage type or the +class at(sk): + ## Traipse Usage: The source I received had the damage rolls like this 1d6s, with the damage type a + ## letter that could be sliced from the roll. However, the roll is parsed before the letter can be + ## sliced from it, and with the letter attached it created an error. + ## + ## The Traipse method puts the damage type and the damage roll into a Tuple, ie (1d6, 's'). + ## When using this method you must include single or double quoutes around the damage type or the ## software will treat it as an object. + def __init__(self,source=[],sc=10, mod=0, dmgo="(1d6, 's')",dmgg="(1d6, 'w')",dmga="(1d6, 'm')"): sk.__init__(self,source,sc,mod) self.dmgo = dmgo self.dmgg = dmgg self.dmga = dmga - def getdmg(self,dmgroll): - astr = "===> Damage " + def getdmg(self,dmgroll): + astr = "===> Damage " droll = str(dmgroll[0]) + xyz = droll.split('(') + secD = (int(xyz[1][:-1])/2) ## SEG* Calculate Secondary Damage +## debug(secD) ## seg added debug output dtype = dmgroll[1] astr += droll - if dtype=="s": astr += " stun" - elif dtype=="w": astr += " wound" - elif dtype=="m":astr += " mortal" + if dtype=="s": astr += " stun
" + elif dtype=="w": + astr += " wound"+" ======> Secondary Damage ("+str(secD) \ + +") stun
" # SEG* Display Secondary Damage + elif dtype=="m": + astr += " mortal"+" ======> Secondary Damage ("+str(secD) \ + +") stun"+" / ("+str(secD)+") wound
" # SEG* Display Secondary Damage return astr def __str__(self): - myStr = self.getRolLStr() - successes = {'CS': " CRITICAL SUCCESS", - 'CF': " CRITICAL FAILURE", - 'A': " AMAZING HIT ", - 'G': " Good HIT ", - 'O': " Ordinary HIT ", - 'F': " miss"} - myStr += successes[self.success] - if self.success == 'A': myStr += self.getdmg(self.dmga) - elif self.success == 'G': myStr += self.getdmg(self.dmgg) - elif self.success == 'O': myStr += self.getdmg(self.dmgo) + myStr = self.getRolLStr() + successes = {'CS': " CRITICAL SUCCESS", + 'CF': " CRITICAL FAILURE", + 'A': " AMAZING HIT
", + 'G': " Good HIT
", + 'O': " Ordinary HIT
", + 'F': " miss"} + if ( self.d20 == 1 ): myStr += successes['CS'] # SEG Dec 19 2009 + myStr += successes[self.success] + if self.success == 'A': myStr += self.getdmg(self.dmga) + elif self.success == 'G': myStr += self.getdmg(self.dmgg) + elif self.success == 'O': myStr += self.getdmg(self.dmgo) return myStr - + +class ac(sk): + def __init__(self,source=[],sc=10,mod=0): + sk.__init__(self,source,sc,mod) + + def GetRoLLStr(self): + myStr = "[" + str(self.data[0]) + self.d20 = self.sum() + amod = self.getMod(self.mod) + self.dieRoll = self.d20 + amod + for a in self.data[1:]: + myStr += "," + myStr += str(a) + myStr += "," + str(amod) + "] = (" + str(self.dieRoll) + ")" + if ( self.dieRoll <= self.score / 4 ): self.success = 'A' + elif ( self.dieRoll <= self.score / 2 ): self.success = 'G' + elif ( self.dieRoll <= self.score ): self.success = 'O' + else: self.success = 'F' + if ( self.d20 == 20 ): self.success = 'CF' + return myStr + + def __str__(self): + myStr = self.GetRoLLStr() + myStr = " ACTION CHECK : "+myStr + successes = {'CS': " CRITICAL SUCCESS", + 'CF': " CRITICAL FAILURE
-2 Step make up bonus next Action Check", + 'A': " AMAZING Success", + 'G': " Good Success", + 'O': " Ordinary Success", + 'F': " Marginal failure
-1 Step make up bonus next Action Check"} + if ( self.d20 == 1 ): myStr += successes['CS'] # SEG Dec 19 2009 + myStr += successes[self.success] + return myStr + + + + + + + + + + + + + + diff -r 477b646a39f4 -r 24d59375aac9 orpg/orpg_version.py --- a/orpg/orpg_version.py Sat Jan 23 01:46:26 2010 -0600 +++ b/orpg/orpg_version.py Sat Jan 23 03:46:56 2010 -0600 @@ -4,7 +4,7 @@ #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed) DISTRO = "Traipse Beta" DIS_VER = "Ornery Orc" -BUILD = "100123-00" +BUILD = "100123-01" # This version is for network capability. PROTOCOL_VERSION = "1.2" diff -r 477b646a39f4 -r 24d59375aac9 plugins/xxgsc.py --- a/plugins/xxgsc.py Sat Jan 23 01:46:26 2010 -0600 +++ b/plugins/xxgsc.py Sat Jan 23 03:46:56 2010 -0600 @@ -15,7 +15,7 @@ orpg.pluginhandler.PluginHandler.__init__(self, plugindb, parent) self.name = 'Game Status Controller' - self.author = 'Woody, updated by mDuo13' + self.author = 'Woody, updated by mDuo13 and Calchexas' self.help = 'This plugin lets you quickly and easily manage a status that includes \n' self.help += 'your HP and AC for AD&D 2nd Edition. Type /gsc to open up the manager\n' self.help += 'window, and from there just change the values as necessary and the changes\n' @@ -26,7 +26,7 @@ def plugin_enabled(self): self.plugin_addcommand('/gsc', self.on_gsc, '- The GSC command') - self.frame = RollerFrame(None, -1, "Game Status Ctrl (GSC)", self) + self.frame = RollerFrame(None, -1, "Game Status Controller (GSC)", self) self.frame.Hide() item = wx.MenuItem(self.menu, wx.ID_ANY, "GSC Window", "GSC Window", wx.ITEM_CHECK) @@ -61,13 +61,15 @@ class RollerFrame(wx.Frame): def __init__(self, parent, ID, title, plugin): wx.Frame.__init__(self, parent, ID, title, - wx.DefaultPosition, wx.Size(200, 70)) + wx.DefaultPosition, wx.Size(250, 110)) self.settings = plugin.settings self.session = plugin.session self.plugin = plugin self.panel = wx.Panel(self,-1) + sizer = wx.GridBagSizer(1, 2) + self.panel.SetSizer(sizer) menu = wx.Menu() menu.AppendSeparator() menu.Append(wx.ID_EXIT, "&Close", "Close this window") @@ -77,18 +79,42 @@ self.old_idle = self.settings.get_setting('IdleStatusAlias') - wx.StaticText(self.panel, -1, "AC:", wx.Point(0, 5)) - self.ac = wx.SpinCtrl(self.panel, ID_ROLL, "", wx.Point(18, 0), wx.Size(45, -1), min = -100, max = 100, initial = 10) + ac_text = wx.StaticText(self.panel, -1, "AC:", wx.Point(0, 5)) + self.ac = wx.SpinCtrl(self.panel, ID_ROLL, "", + wx.Point(18, 0), wx.Size(45, -1), min = -100, max = 100, initial = 10) self.ac.SetValue(10) - wx.StaticText(self.panel, -1, "/", wx.Point(136, 5)) - self.max_hp = wx.SpinCtrl(self.panel, ID_ROLL, "", wx.Point(144, 0), wx.Size(48, -1), min = -999, max = 999, initial = 10) + touch_text = wx.StaticText(self.panel, -1, "Touch:", wx.Point(0, 25)) + self.touch = wx.SpinCtrl(self.panel, ID_ROLL, "", + wx.Point(60, 25), wx.Size(45, -1), min = -100, max = 100, initial = 10) + self.touch.SetValue(10) + + ff_text = wx.StaticText(self.panel, -1, "FF:", wx.Point(115, 25)) + self.ff = wx.SpinCtrl(self.panel, ID_ROLL, "", + wx.Point(165, 25), wx.Size(45, -1), min = -100, max = 100, initial = 10) + self.ff.SetValue(10) + + max_hp_text = wx.StaticText(self.panel, -1, "/", wx.Point(150, 5)) + self.max_hp = wx.SpinCtrl(self.panel, ID_ROLL, "", + wx.Point(158, 0), wx.Size(48, -1), min = -999, max = 999, initial = 10) self.max_hp.SetValue(10) - wx.StaticText(self.panel, -1, "HP:", wx.Point(65, 5)) - self.hp = wx.SpinCtrl(self.panel, ID_ROLL, "", wx.Point(83, 0), wx.Size(48, -1), min = -999, max = 999, initial = 10) + hp_text = wx.StaticText(self.panel, -1, "HP:", wx.Point(80, 5)) + self.hp = wx.SpinCtrl(self.panel, ID_ROLL, "", + wx.Point(98, 0), wx.Size(48, -1), min = -999, max = 999, initial = 10) self.hp.SetValue(10) + sizer.Add(ac_text, (1,0), span=(1,1)) + sizer.Add(self.ac, (1,1), span=(1,1)) + sizer.Add(touch_text, (1,2), span=(1,1)) + sizer.Add(self.touch, (1,3), span=(1,1)) + sizer.Add(ff_text, (1,4), span=(1,1)) + sizer.Add(self.ff, (1,5), span=(1,1)) + sizer.Add(hp_text, (0,0), span=(1,1)) + sizer.Add(self.hp, (0,1), span=(1,1)) + sizer.Add(max_hp_text, (0,2), span=(1,1)) + sizer.Add(self.max_hp, (0,3), span=(1,1)) + self.SetMinSize((350,100)) self.Bind(wx.EVT_SPINCTRL, self.SetStatus, id=ID_ROLL) self.Bind(wx.EVT_TEXT, self.SetStatus, id=ID_ROLL) self.Bind(wx.EVT_MENU, self.TimeToQuit, id=wx.ID_EXIT) @@ -96,7 +122,7 @@ self.SetStatus(None) def SetStatus(self, evt): - new_status = "AC: " + str(self.ac.GetValue()) + " HP: " + str(self.hp.GetValue()) + "/" + str(self.max_hp.GetValue()) + new_status = "AC: " + str(self.ac.GetValue()) + " (Touch: " + str(self.touch.GetValue()) + " FF: " + str(self.ff.GetValue()) + ")" + " HP: " + str(self.hp.GetValue()) + "/" + str(self.max_hp.GetValue()) self.settings.set_setting('IdleStatusAlias',new_status) self.session.set_text_status(new_status)