Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1477
Modified Files:
food.py
Log Message:
Fixes, added a hunger script.
Index: food.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/food.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** food.py 11 Jul 2004 23:56:58 -0000 1.7
--- food.py 12 Jul 2004 00:48:53 -0000 1.8
***************
*** 7,11 ****
farm_food = [ 'c7c', 'c70', 'c7b', 'c78', 'c71', 'c64', 'c65' ]
! farm_eaters = [ 'rabbit' ]
#
# Feed the food
--- 7,13 ----
farm_food = [ 'c7c', 'c70', 'c7b', 'c78', 'c71', 'c64', 'c65' ]
! farm_eaters = [ 'rabbit', 'goat', 'hind', 'pack_horse', 'pack_llama', 'cow', 'bull',
! 'sheep_unsheered', 'sheep_sheered', 'llama', 'horse', 'great_hart',
! 'ostard_desert', 'ostard_forest', 'ostard_frinzied' ]
#
# Feed the food
***************
*** 66,70 ****
# Fidget animation and munch munch sound
! player.soundeffect(random.choice([0x03a, 0x03b, 0x03c]))
player.action(ANIM_FIDGET3)
--- 68,72 ----
# Fidget animation and munch munch sound
! player.soundeffect( random.choice([0x03a, 0x03b, 0x03c]), 1 )
player.action(ANIM_FIDGET3)
***************
*** 89,94 ****
if 'food' in char.events:
return True
! if char.baseid in farm_food:
char.events = ['food'] + char.events
return True
else:
--- 91,99 ----
if 'food' in char.events:
return True
! if char.baseid in farm_eaters:
char.events = ['food'] + char.events
+ char.say( "*nibbles*" )
+ item.magic = 3
+ item.update()
return True
else:
***************
*** 106,110 ****
if food:
food.delete()
! char.sound( random.choice( [ 0x03a, 0x03b, 0x03c ] ) )
char.say( "*munch*" )
if char.hitpoints < char.maxhitpoints:
--- 111,115 ----
if food:
food.delete()
! char.soundeffect( random.choice( [ 0x03a, 0x03b, 0x03c ] ), 1 )
char.say( "*munch*" )
if char.hitpoints < char.maxhitpoints:
***************
*** 116,117 ****
--- 121,128 ----
char.events = events
return True
+ else:
+ events = char.events
+ while 'food' in events:
+ events.remove('food')
+ char.events = events
+ return True
|