Mercurial > traipse_dev
comparison orpg/gametree/nodehandlers/dnd35.py @ 243:3bbfd84619c0 beta
Traipse Beta 'OpenRPG' {101018-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
New IronClaw roller, sheet, and image
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
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
Fix to Send to Chat from Gametree
Fix to Gametree, renaming and remapping operates correctly
author | sirebral |
---|---|
date | Mon, 18 Oct 2010 23:48:49 -0500 |
parents | 3b6888bb53b5 |
children | 682032381be8 |
comparison
equal
deleted
inserted
replaced
242:72e0cce81a47 | 243:3bbfd84619c0 |
---|---|
2 from containers import * | 2 from containers import * |
3 from string import * #a 1.6003 | 3 from string import * #a 1.6003 |
4 from inspect import * #a 1.9001 | 4 from inspect import * #a 1.9001 |
5 from orpg.dirpath import dir_struct | 5 from orpg.dirpath import dir_struct |
6 from xml.etree.ElementTree import parse | 6 from xml.etree.ElementTree import parse |
7 from orpg.tools.InterParse import Parse | |
7 dnd35_EXPORT = wx.NewId() | 8 dnd35_EXPORT = wx.NewId() |
8 | 9 |
9 ############Global Stuff############## | 10 ############Global Stuff############## |
10 | 11 |
11 HP_CUR = wx.NewId() | 12 HP_CUR = wx.NewId() |
394 mod = self.get_mod( name ) | 395 mod = self.get_mod( name ) |
395 if mod >= 0: mod1 = "+" | 396 if mod >= 0: mod1 = "+" |
396 else: mod1 = "" | 397 else: mod1 = "" |
397 chat = self.chat | 398 chat = self.chat |
398 txt = '%s check: [1d20%s%s]' % ( name, mod1, mod ) | 399 txt = '%s check: [1d20%s%s]' % ( name, mod1, mod ) |
399 chat.ParsePost( txt, True, True ) | 400 Parse.Post( txt, self.chat, True, True ) |
400 | 401 |
401 def get_mod(self,abbr): | 402 def get_mod(self,abbr): |
402 score = int(self.abilities[abbr].get('base')) | 403 score = int(self.abilities[abbr].get('base')) |
403 mod = (score - 10) / 2 | 404 mod = (score - 10) / 2 |
404 mod = int(mod) | 405 mod = int(mod) |
667 mod = self.get_mod(name) | 668 mod = self.get_mod(name) |
668 if mod >= 0: mod1 = "+" | 669 if mod >= 0: mod1 = "+" |
669 else: mod1 = "" | 670 else: mod1 = "" |
670 chat = self.chat | 671 chat = self.chat |
671 txt = '%s save: [1d20%s%s]' % (name, mod1, mod) | 672 txt = '%s save: [1d20%s%s]' % (name, mod1, mod) |
672 chat.ParsePost( txt, True, True ) | 673 Parse.Post( txt, self.chat, True, True ) |
673 | 674 |
674 def get_design_panel(self,parent): | 675 def get_design_panel(self,parent): |
675 wnd = outline_panel(parent,self,save_grid,"Saves") | 676 wnd = outline_panel(parent,self,save_grid,"Saves") |
676 wnd.title = "Saves" | 677 wnd.title = "Saves" |
677 return wnd | 678 return wnd |
922 if mod >= 0: mod1 = "+" | 923 if mod >= 0: mod1 = "+" |
923 else: mod1 = "" | 924 else: mod1 = "" |
924 chat = self.chat | 925 chat = self.chat |
925 txt = '%s Skill Check: [1d20%s%s%s] %s' % ( | 926 txt = '%s Skill Check: [1d20%s%s%s] %s' % ( |
926 name, mod1, mod, acCp, armor) | 927 name, mod1, mod, acCp, armor) |
927 chat.ParsePost(txt,True,True) | 928 Parse.Post(txt, self.chat, True, True) |
928 | 929 |
929 def get_design_panel(self,parent): | 930 def get_design_panel(self,parent): |
930 wnd = outline_panel(parent,self,skill_grid,"Skills") | 931 wnd = outline_panel(parent,self,skill_grid,"Skills") |
931 wnd.title = "Skills (edit)" | 932 wnd.title = "Skills (edit)" |
932 return wnd | 933 return wnd |
1238 | 1239 |
1239 def on_rclick( self, evt ): | 1240 def on_rclick( self, evt ): |
1240 chp = self.xml.get('current') | 1241 chp = self.xml.get('current') |
1241 mhp = self.xml.get('max') | 1242 mhp = self.xml.get('max') |
1242 txt = '((HP: %s / %s))' % ( chp, mhp ) | 1243 txt = '((HP: %s / %s))' % ( chp, mhp ) |
1243 self.chat.ParsePost( txt, True, True ) | 1244 Parse.Post( txt, self.chat, True, True ) |
1244 | 1245 |
1245 def tohtml(self): | 1246 def tohtml(self): |
1246 html_str = "<table width=100% border=1 >" | 1247 html_str = "<table width=100% border=1 >" |
1247 html_str += "<tr BGCOLOR=#E9E9E9 ><th colspan=4>Hit Points</th></tr>" | 1248 html_str += "<tr BGCOLOR=#E9E9E9 ><th colspan=4>Hit Points</th></tr>" |
1248 html_str += "<tr><th>Max:</th>" | 1249 html_str += "<tr><th>Max:</th>" |
1440 monkLvl = self.root.classes.get_class_lvl('Monk') # a 1.5002 | 1441 monkLvl = self.root.classes.get_class_lvl('Monk') # a 1.5002 |
1441 if find(dmg, "Monk Med") > -1: | 1442 if find(dmg, "Monk Med") > -1: |
1442 if monkLvl == None: #a 1.5009 | 1443 if monkLvl == None: #a 1.5009 |
1443 txt = 'Attempting to use monk attack, but has no monk ' | 1444 txt = 'Attempting to use monk attack, but has no monk ' |
1444 txt += 'levels, please choose a different attack.' | 1445 txt += 'levels, please choose a different attack.' |
1445 chat.ParsePost( txt, True, True ) #a 1.5009 | 1446 Parse.Post( txt, self.chat, True, True ) #a 1.5009 |
1446 return #a 1.5009 | 1447 return #a 1.5009 |
1447 else: #a 1.5009 | 1448 else: #a 1.5009 |
1448 lvl=int(monkLvl) | 1449 lvl=int(monkLvl) |
1449 if lvl <= 3: dmg = dmg.replace("Monk Med", "1d6") | 1450 if lvl <= 3: dmg = dmg.replace("Monk Med", "1d6") |
1450 elif lvl <= 7: dmg = dmg.replace("Monk Med", "1d8") | 1451 elif lvl <= 7: dmg = dmg.replace("Monk Med", "1d8") |
1454 elif lvl <= 20: dmg = dmg.replace("Monk Med", "2d10") | 1455 elif lvl <= 20: dmg = dmg.replace("Monk Med", "2d10") |
1455 if find(dmg, "Monk Small") > -1: | 1456 if find(dmg, "Monk Small") > -1: |
1456 if monkLvl == None: #a 1.5009 | 1457 if monkLvl == None: #a 1.5009 |
1457 txt = 'Attempting to use monk attack, but has no monk ' | 1458 txt = 'Attempting to use monk attack, but has no monk ' |
1458 txt += 'levels, please choose a different attack.' | 1459 txt += 'levels, please choose a different attack.' |
1459 chat.ParsePost( txt, True, True ) #a 1.5009 | 1460 Parse.Post( txt, self.chat, True, True ) #a 1.5009 |
1460 return #a 1.5009 | 1461 return #a 1.5009 |
1461 else: #a 1.5009 | 1462 else: #a 1.5009 |
1462 lvl=int(monkLvl) | 1463 lvl=int(monkLvl) |
1463 if lvl <= 3: dmg = dmg.replace("Monk Small", "1d4") | 1464 if lvl <= 3: dmg = dmg.replace("Monk Small", "1d4") |
1464 elif lvl <= 7: dmg = dmg.replace("Monk Small", "1d6") | 1465 elif lvl <= 7: dmg = dmg.replace("Monk Small", "1d6") |
1468 elif lvl <= 20: dmg = dmg.replace("Monk Small", "2d8") | 1469 elif lvl <= 20: dmg = dmg.replace("Monk Small", "2d8") |
1469 if find(dmg, "Monk Large") > -1: | 1470 if find(dmg, "Monk Large") > -1: |
1470 if monkLvl == None: #a 1.5009 | 1471 if monkLvl == None: #a 1.5009 |
1471 txt = 'Attempting to use monk attack, but has no monk ' | 1472 txt = 'Attempting to use monk attack, but has no monk ' |
1472 txt += 'levels, please choose a different attack.' | 1473 txt += 'levels, please choose a different attack.' |
1473 chat.ParsePost( txt, True, True ) #a 1.5009 | 1474 Parse.Post( txt, self.chat, True, True ) #a 1.5009 |
1474 return #a 1.5009 | 1475 return #a 1.5009 |
1475 else: #a 1.5009 | 1476 else: #a 1.5009 |
1476 lvl=int(monkLvl) | 1477 lvl=int(monkLvl) |
1477 if lvl <= 3: dmg = dmg.replace("Monk Large", "1d8") | 1478 if lvl <= 3: dmg = dmg.replace("Monk Large", "1d8") |
1478 elif lvl <= 7: dmg = dmg.replace("Monk Large", "2d6") | 1479 elif lvl <= 7: dmg = dmg.replace("Monk Large", "2d6") |
1513 self.sendRoll(base6, stat_mod, misc, wepMod, name, '', dmg, aStrengthMod) | 1514 self.sendRoll(base6, stat_mod, misc, wepMod, name, '', dmg, aStrengthMod) |
1514 else: | 1515 else: |
1515 if monkLvl == None: | 1516 if monkLvl == None: |
1516 txt = 'Attempting to use monk attack, but has no monk ' | 1517 txt = 'Attempting to use monk attack, but has no monk ' |
1517 txt += 'levels, please choose a different attack.' | 1518 txt += 'levels, please choose a different attack.' |
1518 chat.ParsePost( txt, True, True ) #a 1.5009 | 1519 Parse.Post( txt, self.chat, True, True ) #a 1.5009 |
1519 return | 1520 return |
1520 else: | 1521 else: |
1521 lvl = int(monkLvl) | 1522 lvl = int(monkLvl) |
1522 if lvl <= 4: | 1523 if lvl <= 4: |
1523 flu = '-2' | 1524 flu = '-2' |
1546 base = base + int(stat_mod) + misc + wepMod #m 1.5008 | 1547 base = base + int(stat_mod) + misc + wepMod #m 1.5008 |
1547 if base >= 0: mod1 = "+" | 1548 if base >= 0: mod1 = "+" |
1548 else: mod1 = "" | 1549 else: mod1 = "" |
1549 txt = ' %s Attack Roll: <b>[1d20%s%s%s]</b>' % (name, mod1, base, flu) | 1550 txt = ' %s Attack Roll: <b>[1d20%s%s%s]</b>' % (name, mod1, base, flu) |
1550 txt += ' ===> Damage: <b>[%s%s]</b>' % (dmg, aStrengthMod) | 1551 txt += ' ===> Damage: <b>[%s%s]</b>' % (dmg, aStrengthMod) |
1551 self.chat.ParsePost( txt, True, True ) | 1552 Parse.Post( txt, self.chat, True, True ) |
1552 | 1553 |
1553 def get_design_panel(self,parent): | 1554 def get_design_panel(self,parent): |
1554 wnd = outline_panel(parent,self,attack_panel,"Attacks") | 1555 wnd = outline_panel(parent,self,attack_panel,"Attacks") |
1555 wnd.title = "Attacks" | 1556 wnd.title = "Attacks" |
1556 return wnd | 1557 return wnd |
1916 def on_rclick( self, evt ): | 1917 def on_rclick( self, evt ): |
1917 ac = self.get_armor_class() | 1918 ac = self.get_armor_class() |
1918 fac = (int(ac)-(self.root.abilities.get_mod('Dex'))) | 1919 fac = (int(ac)-(self.root.abilities.get_mod('Dex'))) |
1919 | 1920 |
1920 txt = '((AC: %s Normal, %s Flatfoot))' % ( ac, fac ) #a 1.5002 | 1921 txt = '((AC: %s Normal, %s Flatfoot))' % ( ac, fac ) #a 1.5002 |
1921 self.chat.ParsePost( txt, True, True ) | 1922 Parse.Post( txt, self.chat, True, True ) #a 1.5009 |
1922 | 1923 |
1923 def tohtml(self): | 1924 def tohtml(self): |
1924 html_str = """<table width=100% border=1 ><tr BGCOLOR=#E9E9E9 > | 1925 html_str = """<table width=100% border=1 ><tr BGCOLOR=#E9E9E9 > |
1925 <th>AC</th><th>Check Penalty</th><th >Spell Failure</th> | 1926 <th>AC</th><th>Check Penalty</th><th >Spell Failure</th> |
1926 <th>Max Dex</th><th>Total Weight</th></tr>""" | 1927 <th>Max Dex</th><th>Total Weight</th></tr>""" |