Exemple #1
0
def get_combat_score(life, group_id, potential=False):
	_group = get_group(life, group_id)
	_score = 0
	
	for member in [LIFE[l] for l in _group['members']]:
		if combat.get_best_weapon(member):
			if not potential and not combat.weapon_equipped_and_ready(member):
				continue
			
			_score += 1
	
	return _score
Exemple #2
0
def get_combat_score(life, group_id, potential=False):
    _group = get_group(life, group_id)
    _score = 0

    for member in [LIFE[l] for l in _group['members']]:
        if combat.get_best_weapon(member):
            if not potential and not combat.weapon_equipped_and_ready(member):
                continue

            _score += 1

    return _score
Exemple #3
0
def tick(life, alife_seen, alife_not_seen, targets_seen, targets_not_seen, source_map):
	_threat = judgement.get_nearest_threat(life)
	
	if not 'hiding' in life['state_flags']:
		movement.hide(life, _threat)
		life['state_flags']['hiding'] = True
		return True
	
	_weapon = combat.get_best_weapon(life)
	
	if _weapon:
		if not combat.weapon_equipped_and_ready(life):
			combat._equip_weapon(life, _weapon['weapon']['uid'], _weapon['feed']['uid'])
Exemple #4
0
def tick(life, alife_seen, alife_not_seen, targets_seen, targets_not_seen,
         source_map):
    _threat = judgement.get_nearest_threat(life)

    if not 'hiding' in life['state_flags']:
        movement.hide(life, _threat)
        life['state_flags']['hiding'] = True
        return True

    _weapon = combat.get_best_weapon(life)

    if _weapon:
        if not combat.weapon_equipped_and_ready(life):
            combat._equip_weapon(life, _weapon['weapon']['uid'],
                                 _weapon['feed']['uid'])