[wpdev-commits] xmlscripts/scripts/magic __init__.py,1.14,1.15 spell.py,1.18,1.19
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-09-03 01:31:18
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11791/magic Modified Files: __init__.py spell.py Log Message: fix for bug #0000263 Index: spell.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/spell.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** spell.py 29 Aug 2004 13:00:34 -0000 1.18 --- spell.py 3 Sep 2004 01:31:05 -0000 1.19 *************** *** 6,10 **** from magic.utilities import * from wolfpack.consts import MAGICRESISTANCE, EVALUATINGINTEL, INSCRIPTION, \ ! MAGERY, ANIM_CASTDIRECTED, SPELLDAMAGEBONUS, LOG_WARNING # Recursive Function for counting reagents --- 6,10 ---- from magic.utilities import * from wolfpack.consts import MAGICRESISTANCE, EVALUATINGINTEL, INSCRIPTION, \ ! MAGERY, ANIM_CASTDIRECTED, SPELLDAMAGEBONUS, LOG_WARNING, SPELLCHANNELING # Recursive Function for counting reagents *************** *** 165,168 **** --- 165,183 ---- def calcdelay(self): return self.casttime + + def checkweapon(self, char): + weapon = char.itemonlayer(LAYER_RIGHTHAND) + + if not weapon or not properties.itemcheck(weapon, ITEM_WEAPON): + weapon = char.itemonlayer(LAYER_LEFTHAND) + + if not weapon: + return True + + # Check if the spellchanneling property is true for this item + if properties.fromitem(weapon, SPELLCHANNELING) == 0: + return False + else: + return True def checkrequirements(self, char, mode, args=[], target=None, item=None): *************** *** 171,174 **** --- 186,193 ---- if mode == MODE_BOOK: + if not self.checkweapon(char): + char.message(502626) + return 0 + # Check for Mana if char.mana < self.mana: *************** *** 186,189 **** --- 205,212 ---- elif mode == MODE_SCROLL: + if not self.checkweapon(char): + char.message(502626) + return 0 + # Check if the scroll is allright if not item or item.getoutmostchar() != char: Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/__init__.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** __init__.py 31 Aug 2004 20:27:42 -0000 1.14 --- __init__.py 3 Sep 2004 01:31:05 -0000 1.15 *************** *** 1,10 **** - #===============================================================# - # ) (\_ | WOLFPACK 13.0.0 Scripts # - # (( _/{ "-; | Created by: Correa # - # )).-' {{ ;'` | Revised by: # - # ( ( ;._ \\ ctr | Last Modification: Created # - #===============================================================# - # Main Magic Script # - #===============================================================# import wolfpack --- 1,2 ---- |