[wpdev-commits] xmlscripts/scripts/skills poisoning.py,1.3,1.4 tasteid.py,1.9,1.10
Brought to you by:
rip,
thiagocorrea
From: Jorge P. <ke...@us...> - 2004-08-24 18:10:45
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28093/skills Modified Files: poisoning.py tasteid.py Log Message: - Replaced access to .events with the calls hasevent/addevent/removeevent in all relevant places. Notice that addevent() is expected to add the event to the head of the list. I recognized no situation (of those changed) where it would make a difference adding the event to the end of the list, so in those cases used addevent aswell. - Fixed a copy&paste error in trap.py on removing the tags (pointed out by Incannus). note: .events can now be made read only, bearing in mind that in doing so there is no way to make a distinction between adding an event at the top or at the end of the event list. Index: poisoning.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/poisoning.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** poisoning.py 16 Jul 2004 07:09:27 -0000 1.3 --- poisoning.py 24 Aug 2004 18:10:29 -0000 1.4 *************** *** 62,66 **** char.socket.clilocmessage( 502145 ) return ! if not ( 'food' in target.item.events or 'blades' in target.item.events ): char.socket.clilocmessage( 502145 ) return --- 62,66 ---- char.socket.clilocmessage( 502145 ) return ! if not ( target.item.hasevent( 'food' ) or target.item.hasevent( 'blades' ) ): char.socket.clilocmessage( 502145 ) return *************** *** 122,126 **** # weapon : poison chance when hit % = char.skill[ POISONING ] / 4 # number of uses before the poison wears off ! if 'blades' in item.events: item.settag( 'poisoning_uses', 20 - strength * 2 ) return 1 --- 122,126 ---- # weapon : poison chance when hit % = char.skill[ POISONING ] / 4 # number of uses before the poison wears off ! if item.hasevent( 'blades' ): item.settag( 'poisoning_uses', 20 - strength * 2 ) return 1 Index: tasteid.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/tasteid.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tasteid.py 16 Jul 2004 07:09:27 -0000 1.9 --- tasteid.py 24 Aug 2004 18:10:29 -0000 1.10 *************** *** 38,42 **** return ! if not 'food' in target.item.events: socket.clilocmessage(502820) else: --- 38,42 ---- return ! if not target.item.hasevent( 'food' ): socket.clilocmessage(502820) else: |