changeset 269:445f746449fa

Tweak sapper fox path weighting
author Neil Muller <drnlmuller@gmail.com>
date Sat, 05 Sep 2009 14:06:53 +0000
parents 47c411d20b00
children 31f5033eac70
files gamelib/animal.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/animal.py	Sat Sep 05 14:02:25 2009 +0000
+++ b/gamelib/animal.py	Sat Sep 05 14:06:53 2009 +0000
@@ -465,6 +465,10 @@
     DIG_ANIMATION = animations.FenceExplosion
     IMAGE_FILE = 'sprites/sapper_fox.png'
 
+    def __init__(self, pos):
+        Fox.__init__(self, pos)
+        self.costs['fence'] = 2 # We don't worry about fences
+
     def _dig(self, gameboard, dig_pos):
         """Setup dig parameters, to be overridden if needed"""
         self.tick = 0 # Costs us nothing to go through a fence.