Update of /cvsroot/wpdev/xmlscripts/scripts/skills
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27358/skills
Modified Files:
__init__.py lumberjacking.py
Log Message:
lumberjacking fix
Index: __init__.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/__init__.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** __init__.py 13 Oct 2004 19:41:03 -0000 1.19
--- __init__.py 25 Oct 2004 16:27:50 -0000 1.20
***************
*** 91,98 ****
# Normalize
chance = min(1.0, max(0.02, chance))
minskill = (1.0 - chance) * 1200
maxskill = 1200
char.checkskill(skill, minskill, maxskill)
! return chance >= random.random()
def totalstats( char ):
--- 91,100 ----
# Normalize
chance = min(1.0, max(0.02, chance))
+
minskill = (1.0 - chance) * 1200
maxskill = 1200
char.checkskill(skill, minskill, maxskill)
! result = chance >= random.random()
! return result
def totalstats( char ):
Index: lumberjacking.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/lumberjacking.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** lumberjacking.py 23 Oct 2004 18:06:23 -0000 1.23
--- lumberjacking.py 25 Oct 2004 16:27:50 -0000 1.24
***************
*** 208,212 ****
success = 0
return False
! elif chance >= randint(1, 100):
char.socket.clilocmessage( 500498 ) # You put some logs into your backpack
if tool.gettag( 'remaining_uses' ) > 1:
--- 208,212 ----
success = 0
return False
! else:
char.socket.clilocmessage( 500498 ) # You put some logs into your backpack
if tool.gettag( 'remaining_uses' ) > 1:
***************
*** 219,226 ****
char.socket.deltag( 'is_lumberjacking' )
success = 1
- else:
- char.socket.clilocmessage( 500495 ) # You hack at the tree for a while but fail to produce...
- success = 0
- return False
if success == 1:
--- 219,222 ----
|