def can_bite(life): _melee_limbs = lfe.get_melee_limbs(life) if not _melee_limbs: return False for limb in _melee_limbs: if 'CAN_BITE' in lfe.get_limb(life, limb)['flags']: return limb return None
def can_scratch(life): _melee_limbs = lfe.get_melee_limbs(life) if not _melee_limbs: print life['name'], 'no melee limbs' return False for limb in _melee_limbs: if 'SHARP' in lfe.get_limb(life, limb)['flags']: return limb print life['name'], 'cant scratch' return None
def can_scratch(life): _melee_limbs = lfe.get_melee_limbs(life) if not _melee_limbs: print life['name'],'no melee limbs' return False for limb in _melee_limbs: if 'SHARP' in lfe.get_limb(life, limb)['flags']: return limb print life['name'],'cant scratch' return None