[wpdev-commits] xmlscripts/scripts/skills lumberjacking.py,1.22,1.23
Brought to you by:
rip,
thiagocorrea
From: Richard M. <dr...@us...> - 2004-10-23 18:06:33
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10571/scripts/skills Modified Files: lumberjacking.py Log Message: Fix for a skill check bug Pharao pointed out in IRC. Index: lumberjacking.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/lumberjacking.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** lumberjacking.py 13 Oct 2004 19:41:03 -0000 1.22 --- lumberjacking.py 23 Oct 2004 18:06:23 -0000 1.23 *************** *** 19,23 **** COLORID = 2 RESOURCENAME = 3 ! # resname, reqSkill, maxSkill, color woodtable = \ { --- 19,23 ---- COLORID = 2 RESOURCENAME = 3 ! # resname: [ reqSkill, maxSkill, color ] woodtable = \ { *************** *** 164,170 **** if not wolfpack.utilities.tobackpack( item, char ): item.update() ! # Resend weight ! char.socket.resendstatus() # Let him hack --- 164,170 ---- if not wolfpack.utilities.tobackpack( item, char ): item.update() ! # Resend weight ! char.socket.resendstatus() # Let him hack *************** *** 197,201 **** reqskill = woodtable[ resname ][ REQSKILL ] ! chance = int( ( char.skill[ LUMBERJACKING ] - woodtable[ resname ][ MINSKILL ] ) / 10 ) if char.skill[ LUMBERJACKING ] < reqskill: --- 197,201 ---- reqskill = woodtable[ resname ][ REQSKILL ] ! chance = max(0, char.skill[LUMBERJACKING] - woodtable[ resname ][ MINSKILL ]) / 1000.0 if char.skill[ LUMBERJACKING ] < reqskill: *************** *** 204,209 **** else: # Skill Check against LUMBERJACKING ! if not char.checkskill( LUMBERJACKING, reqskill, 1200 ): ! char.socket.clilocmessage( 500495 ) # You hack at the tree for a while but fail to produce... success = 0 return False --- 204,209 ---- else: # Skill Check against LUMBERJACKING ! if not skills.checkskill(char, LUMBERJACKING, chance): ! socket.clilocmessage(500495) success = 0 return False *************** *** 238,242 **** if not wolfpack.utilities.tobackpack( resourceitem, char ): resourceitem.update() ! # Resend weight char.socket.resendstatus() --- 238,242 ---- if not wolfpack.utilities.tobackpack( resourceitem, char ): resourceitem.update() ! # Resend weight char.socket.resendstatus() |