コード例 #1
0
ファイル: stats.py プロジェクト: penny64/Reactor-3
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
コード例 #2
0
ファイル: stats.py プロジェクト: athros/Reactor-3
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
コード例 #3
0
ファイル: stats.py プロジェクト: penny64/Reactor-3
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
コード例 #4
0
ファイル: stats.py プロジェクト: athros/Reactor-3
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