comparison gamelib/buildings.py @ 199:696936621a93

Buildings can affect visual acuity.
author Jeremy Thurgood <firxen@gmail.com>
date Fri, 04 Sep 2009 19:49:30 +0000
parents 355eaae40b1f
children 636c3fafa32d
comparison
equal deleted inserted replaced
198:355eaae40b1f 199:696936621a93
212 FLOORS = 1 212 FLOORS = 1
213 213
214 MODIFY_GUN_RANGE = lambda s, x: (3*x)/2 214 MODIFY_GUN_RANGE = lambda s, x: (3*x)/2
215 MODIFY_GUN_BASE_HIT = lambda s, x: x-5 215 MODIFY_GUN_BASE_HIT = lambda s, x: x-5
216 MODIFY_GUN_RANGE_PENALTY = lambda s, x: x-1 216 MODIFY_GUN_RANGE_PENALTY = lambda s, x: x-1
217 MODIFY_VISION_BONUS = lambda s, x: x+10
218 MODIFY_VISION_RANGE_PENALTY = lambda s, x: x-2
217 219
218 def is_building(obj): 220 def is_building(obj):
219 """Return true if obj is a build class.""" 221 """Return true if obj is a build class."""
220 return getattr(obj, "IS_BUILDING", False) and hasattr(obj, "NAME") 222 return getattr(obj, "IS_BUILDING", False) and hasattr(obj, "NAME")
221 223