From: Digital X. <dig...@us...> - 2007-05-06 16:43:26
|
Update of /cvsroot/openrpg/openrpg1/orpg/dieroller In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32600/orpg/dieroller Modified Files: gurps.py savage.py sr4.py wod.py wodex.py Log Message: Reconvert every file to unix line ending. This is the 3rd time I have done this, and no clue why they get switched back Index: wodex.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/dieroller/wodex.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wodex.py 13 Mar 2007 17:53:42 -0000 1.8 --- wodex.py 6 May 2007 16:42:55 -0000 1.9 *************** *** 284,286 **** myStr += str(succ) + " Successes" ! return myStr \ No newline at end of file --- 284,286 ---- myStr += str(succ) + " Successes" ! return myStr Index: wod.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/dieroller/wod.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wod.py 4 Nov 2006 21:24:19 -0000 1.12 --- wod.py 6 May 2007 16:42:55 -0000 1.13 *************** *** 1,87 **** ! ## a vs die roller as used by WOD games ! #!/usr/bin/env python ! # Copyright (C) 2000-2001 The OpenRPG Project ! # ! # ope...@li... ! # ! # This program is free software; you can redistribute it and/or modify ! # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2 of the License, or ! # (at your option) any later version. ! # ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! # ! # You should have received a copy of the GNU General Public License ! # along with this program; if not, write to the Free Software ! # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! # -- ! # ! # File: wod.py ! # Author: OpenRPG Dev Team ! # Maintainer: ! # Version: ! # $Id$ ! # ! # Description: WOD die roller ! # ! # Targetthr is the Threshhold target ! # for compatibility with Mage die rolls. ! # Threshhold addition by robert t childers ! from die import * ! ! __version__ = "$Id$" ! ! ! class wod(std): ! def __init__(self,source=[],target=0,targetthr=0): ! std.__init__(self,source) ! self.target = target ! self.targetthr = targetthr ! ! def vs(self,target): ! self.target = target ! return self ! ! def thr(self,targetthr): ! self.targetthr = targetthr ! return self ! ! def sum(self): ! rolls = [] ! s = 0 ! s1 = self.targetthr ! botch = 0 ! for a in self.data: ! rolls.extend(a.gethistory()) ! for r in rolls: ! if r >= self.target or r == 10: ! s += 1 ! if s1 >0: ! s1 -= 1 ! s -= 1 ! else: ! botch = 1 ! elif r == 1: ! s -= 1 ! if botch == 1 and s < 0: ! s = 0 ! return s ! ! def __str__(self): ! if len(self.data) > 0: ! myStr = "[" + str(self.data[0]) ! for a in self.data[1:]: ! myStr += "," ! myStr += str(a) ! if self.sum() < 0: ! myStr += "] vs " +str(self.target)+" result of a botch" ! elif self.sum() == 0: ! myStr += "] vs " +str(self.target)+" result of a failure" ! else: ! myStr += "] vs " +str(self.target)+" result of (" + str(self.sum()) + ")" ! ! ! return myStr --- 1 ---- ! __all__ = ['dice', 'rollers', 'die', 'd20', 'std', 'hackmaster', 'hero', 'shadowrun', 'sr4', 'srex', 'utils', 'wod', 'wodex', 'utils'] Index: savage.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/dieroller/savage.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** savage.py 18 Apr 2007 21:49:50 -0000 1.1 --- savage.py 6 May 2007 16:42:55 -0000 1.2 *************** *** 37,50 **** def fright(self,fearmod=0): return fright(self,fearmod=0) ! def kob(self,wnd,loc): return kob(self,wnd=1,loc="rnd") ! def ooc(self): return ooc(self) ! def ract(self,chmod=0): return ract(self,chmod=0) ! def vcrit(self): return vcrit(self) --- 37,50 ---- def fright(self,fearmod=0): return fright(self,fearmod=0) ! def kob(self,wnd,loc): return kob(self,wnd=1,loc="rnd") ! def ooc(self): return ooc(self) ! def ract(self,chmod=0): return ract(self,chmod=0) ! def vcrit(self): return vcrit(self) *************** *** 52,64 **** def fortune(self): return fortune(self) ! def freak(self): return freak(self) ! def swdhelps(self): return swdhelps(self) - ! class fright(std): #-----------------The Fright Table # Rolls on the Fright - which is a 1d20 roll modified by the fear level of a monster. This function automatically generates --- 52,64 ---- def fortune(self): return fortune(self) ! def freak(self): return freak(self) ! def swdhelps(self): return swdhelps(self) ! ! class fright(std): #-----------------The Fright Table # Rolls on the Fright - which is a 1d20 roll modified by the fear level of a monster. This function automatically generates *************** *** 74,78 **** #def sum(self): ! def __str__(self): global fear --- 74,78 ---- #def sum(self): ! def __str__(self): global fear *************** *** 103,111 **** return myStr ! class kob(std): #-------------------The Knockout Blow Table ! # This table used when a character has sustained more than 3 wounds. The number wounds taken that sends a character to the # Knockout Blow Table is what gets sent with the kob command - not the total number of wounds the character currently has. ! # For example - a character has 2 wounds and is hit takes 2 more wounds, this will result in a total of 4 wounds, but the # number that gets sent to the kob roll is 2, because that is the number of wounds sustained that sent the character to the kob # table. --- 103,111 ---- return myStr ! class kob(std): #-------------------The Knockout Blow Table ! # This table used when a character has sustained more than 3 wounds. The number wounds taken that sends a character to the # Knockout Blow Table is what gets sent with the kob command - not the total number of wounds the character currently has. ! # For example - a character has 2 wounds and is hit takes 2 more wounds, this will result in a total of 4 wounds, but the # number that gets sent to the kob roll is 2, because that is the number of wounds sustained that sent the character to the kob # table. *************** *** 151,155 **** wdescription = "Your hero has suffered a life-threatening wound and will not recover without aid. He is Incapacitated and must roll on the Injury Table. He must also make a Vigor roll at the start of each round. If the roll is failed, he passes on. A Healing roll stabilizes the victim but leaves him Incapacitated." itbl = "yes" ! if itbl == "yes": #Determine if a Hit location was specified already --- 151,155 ---- wdescription = "Your hero has suffered a life-threatening wound and will not recover without aid. He is Incapacitated and must roll on the Injury Table. He must also make a Vigor roll at the start of each round. If the roll is failed, he passes on. A Healing roll stabilizes the victim but leaves him Incapacitated." itbl = "yes" ! if itbl == "yes": #Determine if a Hit location was specified already *************** *** 222,231 **** if loca != "h" and loca != "g" and loca != "c" and loca != "rl" and loca != "ll" and loca != "ra" and loca != "la": idescription +="<br><br><b>***If the attack that caused the Injury was directed at a specific body part, use that location instead of rolling randomly.***</b>" ! myStr = "[" + wtype + "] ==>" + wdescription + "<br><br><b>Injury Table Result ("+ str(iroll) +"): </b> [" + iloc + "] ==> " + idescription else: myStr = "[" + wtype + "] ==>" + wdescription return myStr ! class ract(std): #----------------------The Reaction Table # This is used to randomly determine the general mood of NPCs toward the player characters. This simulates a 2d6 roll --- 222,231 ---- if loca != "h" and loca != "g" and loca != "c" and loca != "rl" and loca != "ll" and loca != "ra" and loca != "la": idescription +="<br><br><b>***If the attack that caused the Injury was directed at a specific body part, use that location instead of rolling randomly.***</b>" ! myStr = "[" + wtype + "] ==>" + wdescription + "<br><br><b>Injury Table Result ("+ str(iroll) +"): </b> [" + iloc + "] ==> " + idescription else: myStr = "[" + wtype + "] ==>" + wdescription return myStr ! class ract(std): #----------------------The Reaction Table # This is used to randomly determine the general mood of NPCs toward the player characters. This simulates a 2d6 roll *************** *** 263,268 **** myStr = "["+str(r1roll)+"+"+str(charisma)+"(charisma modifier)="+str(rroll)+"] ==> "+reaction+": "+rdescription return myStr ! ! class ooc(std): #--------------------The Out of Control Vehicle Table # This table is used when a vehicle is injured during combat and must determine what happens to the vehicle. This is a 2d6 --- 263,268 ---- myStr = "["+str(r1roll)+"+"+str(charisma)+"(charisma modifier)="+str(rroll)+"] ==> "+reaction+": "+rdescription return myStr ! ! class ooc(std): #--------------------The Out of Control Vehicle Table # This table is used when a vehicle is injured during combat and must determine what happens to the vehicle. This is a 2d6 *************** *** 272,276 **** def __init__(self): std.__init__(self) ! def __str__(self): ooroll = randint(2,12) --- 272,276 ---- def __init__(self): std.__init__(self) ! def __str__(self): ooroll = randint(2,12) *************** *** 309,313 **** sroll = randint(1,4) oodescription += "Move the vehicle "+str(sroll)+"\" left or right (in the direction of a failed maneuver, or away from a damaging attack)." ! oodescription += "<br><br>For flying vehicles conducting combat in the air, the vehicle" altchange = randint(2,12) --- 309,313 ---- sroll = randint(1,4) oodescription += "Move the vehicle "+str(sroll)+"\" left or right (in the direction of a failed maneuver, or away from a damaging attack)." ! oodescription += "<br><br>For flying vehicles conducting combat in the air, the vehicle" altchange = randint(2,12) *************** *** 326,330 **** return myStr ! class vcrit(std): #----------------The Critical Hit Vehicle Table # This table generates a 2d6 roll to determine the Critical Hit results every time a vehicle takes a wound. There are no --- 326,330 ---- return myStr ! class vcrit(std): #----------------The Critical Hit Vehicle Table # This table generates a 2d6 roll to determine the Critical Hit results every time a vehicle takes a wound. There are no *************** *** 334,338 **** def __init__(self): std.__init__(self) ! def __str__(self): chitroll = randint(2,12) --- 334,338 ---- def __init__(self): std.__init__(self) ! def __str__(self): chitroll = randint(2,12) *************** *** 368,380 **** myStr = "["+cheffect+" ("+str(chitroll)+")] ==> "+chdescription return myStr ! def ooc(self): return vcritooc(self) ! ! class swdhelps(std): #Display help information for this die roller - it will list all the available commands, and how to use them def __init__(self): std.__init__(self) ! def __str__(self): myStr = "<table border='1' valign='top'>\ --- 368,380 ---- myStr = "["+cheffect+" ("+str(chitroll)+")] ==> "+chdescription return myStr ! def ooc(self): return vcritooc(self) ! ! class swdhelps(std): #Display help information for this die roller - it will list all the available commands, and how to use them def __init__(self): std.__init__(self) ! def __str__(self): myStr = "<table border='1' valign='top'>\ *************** *** 420,428 **** </table>" return myStr ! class fortune(std): def __init___(self): std.__init__(self) ! def __str__(self): forroll = randint(2,12) --- 420,428 ---- </table>" return myStr ! class fortune(std): def __init___(self): std.__init__(self) ! def __str__(self): forroll = randint(2,12) *************** *** 453,464 **** myStr = "["+fortune+" ("+str(forroll)+")] ==>"+fdescription return myStr ! def freak(self): return fortunefreak(self) ! class freak(std): def __init__(self): std.__init__(self) ! def __str__(self): feroll = randint(1,10) --- 453,464 ---- myStr = "["+fortune+" ("+str(forroll)+")] ==>"+fdescription return myStr ! def freak(self): return fortunefreak(self) ! class freak(std): def __init__(self): std.__init__(self) ! def __str__(self): feroll = randint(1,10) *************** *** 505,507 **** def __str__(self): ! return myStr \ No newline at end of file --- 505,507 ---- def __str__(self): ! return myStr Index: gurps.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/dieroller/gurps.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gurps.py 4 Apr 2007 16:34:13 -0000 1.4 --- gurps.py 6 May 2007 16:42:55 -0000 1.5 *************** *** 195,199 **** else: myStr += " or less <font color='#ff0000'><b>Failure!</b> by " + str(Diff) +"</font>" ! myStr += strRule return myStr --- 195,199 ---- else: myStr += " or less <font color='#ff0000'><b>Failure!</b> by " + str(Diff) +"</font>" ! myStr += strRule return myStr Index: sr4.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/dieroller/sr4.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sr4.py 18 Oct 2006 21:50:11 -0000 1.5 --- sr4.py 6 May 2007 16:42:55 -0000 1.6 *************** *** 1,7 **** ! ## a vs die roller as used by WOD games #!/usr/bin/env python # Copyright (C) 2000-2001 The OpenRPG Project # ! # ope...@li... # # This program is free software; you can redistribute it and/or modify --- 1,7 ---- ! ## a vs die roller as used by WOD games #!/usr/bin/env python # Copyright (C) 2000-2001 The OpenRPG Project # ! # ope...@li... # # This program is free software; you can redistribute it and/or modify |