From: Laszlo T. <ave...@us...> - 2007-02-06 22:20:40
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/tob In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6634/GUIScripts/tob Modified Files: GUISTORE.py Log Message: implemented stealing from shops (at least took a huge step in that direction) added StealFailed trigger implemented guiscript with skill check Index: GUISTORE.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/tob/GUISTORE.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** GUISTORE.py 4 Feb 2007 21:35:23 -0000 1.34 --- GUISTORE.py 6 Feb 2007 22:20:38 -0000 1.35 *************** *** 31,34 **** --- 31,35 ---- from ie_stats import * from ie_slots import * + from GUICommon import CheckStat100 StoreWindow = None *************** *** 858,868 **** LeftIndex = GemRB.GetVar ("LeftIndex") pc = GemRB.GameGetSelectedPCSingle () ! #skill check, if fails ! failure = 0 ! if failure: ! GemRB.StealFailed () ! else: GemRB.ChangeStoreItem (pc, LeftIndex, SHOP_STEAL) ! UpdateStoreStealWindow () --- 859,871 ---- LeftIndex = GemRB.GetVar ("LeftIndex") pc = GemRB.GameGetSelectedPCSingle () ! #percentage skill check, if fails, trigger StealFailed ! if CheckStat100 (pc, IE_PICKPOCKET, Store['StealFailure']): ! print "success!" GemRB.ChangeStoreItem (pc, LeftIndex, SHOP_STEAL) ! UpdateStoreStealWindow () ! else: ! print "failure!" ! GemRB.StealFailed () ! CloseStoreWindow () |