Esempio n. 1
0
def _spend_skills_on_level_up(player, race, amount):
    """
    Callback for the race_level_up event to handle menu sending,
    bot auto-upgrades and level up effects.
    """
    if (race.level > sum(skill.max_level for skill in race.skills)
            or race.level > race.max_level):
        return

    spend_skills_menu.send(player.index)

    if player.steamid == 'BOT':
        while race.unused_points > 0:
            skill = find_upgradable_skill(race)
            if skill:
                skill.level_up(1)

    levelup_sound.origin = player.origin
    levelup_sound.play(player.index)
    pointer = player.give_named_item('env_smokestack', 0, None, False)
    entity = Entity(index_from_pointer(pointer))

    for output in ('basespread 10', 'spreadspeed 60', 'initial 0', 'speed 105',
                   'rate 50', 'startsize 7', 'endsize 2', 'twist 0',
                   'jetlength 100', 'angles 0 0 0', 'rendermode 18',
                   'renderamt 100', 'rendercolor 255 255 3',
                   'SmokeMaterial effects/yellowflare.vmt'):
        entity.add_output(output)

    entity.turn_on()
    attach_entity_to_player(player, entity)
    entity.delay(0.5, entity.turn_off)
Esempio n. 2
0
def _on_level_change(hero):
    player = hero.owner
    spend_skills.send(player)
    pointer = player.give_named_item('env_smokestack', 0, None, False)
    entity = Entity(index_from_pointer(pointer))

    Model('effects/yellowflare.vmt')
    for output in ('basespread 10', 'spreadspeed 60', 'initial 0', 'speed 105',
        'rate 50', 'startsize 7', 'endsize 2', 'twist 0', 'jetlength 100',
        'angles 0 0 0', 'rendermode 18', 'renderamt 100',
        'rendercolor 255 255 3', 'SmokeMaterial effects/yellowflare.vmt'):
        entity.add_output(output)

    entity.turn_on()
    entity.set_parent(player.pointer, -1)
    entity.delay(0.5, entity.turn_off, cancel_on_level_end=True)
Esempio n. 3
0
def _on_level_change(hero):
    player = hero.owner
    spend_skills.send(player)
    pointer = player.give_named_item('env_smokestack')
    entity = Entity(index_from_pointer(pointer))

    Model('effects/yellowflare.vmt')
    for output in ('basespread 10', 'spreadspeed 60', 'initial 0', 'speed 105',
        'rate 50', 'startsize 7', 'endsize 2', 'twist 0', 'jetlength 100',
        'angles 0 0 0', 'rendermode 18', 'renderamt 100',
        'rendercolor 255 255 3', 'SmokeMaterial effects/yellowflare.vmt'):
        entity.add_output(output)

    entity.turn_on()
    entity.set_parent(player.pointer, -1)
    entity.delay(0.5, entity.turn_off, cancel_on_level_end=True)