Ejemplo n.º 1
0
def physical_damage_mod_calc(loadout: mods.loadout) -> None:
    ''' Calculates the enhancements of physical damage bonus
     mods. '''

    relevant_mod_list = get_relevant_mod_list(loadout, 4)
    loadout_array = loadout.loadout_array
    for mod in relevant_mod_list:
        mod_array = mod.get_modarray()
        loadout_array[:3] = numpy.multiply(loadout_array[:3], mod_array[:3])

    loadout.loadout_array = loadout_array
Ejemplo n.º 2
0
def base_damage_mod_calc(loadout: mods.loadout) -> None:
    ''' Calculates the enhancements of base damage mods that
    equally effects puncture, impact, and slash damages. '''

    relevant_mod_list = get_relevant_mod_list(loadout, 1)
    loadout_array = loadout.loadout_array
    mod_array = numpy.zeros(20)
    for mod in relevant_mod_list:
        mod_array = numpy.add(mod_array, mod.get_modarray() - 1)
    loadout_array[:3] = (numpy.multiply(loadout_array[:3], mod_array[:3]))

    loadout.loadout_array = loadout_array
Ejemplo n.º 3
0
def non_damage_mod_calc(loadout: mods.loadout) -> None:
    ''' Calculates the enhancements of non-damage type mods such as
    fire rate, accuracy, critical chance, ... , etc. '''
    import copy

    relevant_mod_list = get_relevant_mod_list(loadout, 0)
    loadout_array = copy.deepcopy(loadout.weapon.weapon_array)
    mod_array = numpy.zeros(20)
    for mod in relevant_mod_list:
        mod_array = numpy.add(mod_array, mod.get_modarray() - 1)
    loadout_array[13:] = numpy.multiply(loadout_array[13:], mod_array[13:])

    loadout.loadout_array = loadout_array
Ejemplo n.º 4
0
def faction_damage_mod_calc(loadout: mods.loadout,
                            target: enemies.Enemy) -> None:  # noqa
    '''Calculates the enhancements of faction damage mods. '''

    relevant_mod_list = get_relevant_mod_list(loadout, 7)
    loadout_array = loadout.loadout_array
    mod_array = numpy.ones(22)
    for mod in relevant_mod_list:
        mod_array = numpy.add(mod_array,
                              mod.get_modarray(characteristic=target))

    loadout_array[:13] = numpy.multiply(loadout_array[:13], mod_array[:13])

    loadout.loadout_array = loadout_array
Ejemplo n.º 5
0
def first_elemental_mod_calc(loadout: mods.loadout) -> None:
    ''' Calculates the enhancements of first level elemental damage
    mods. '''

    relevant_mod_list = get_relevant_mod_list(loadout, 2)
    loadout_array = loadout.loadout_array
    for mod in relevant_mod_list:
        mod_array = mod.get_modarray()
        non_secondary_damage_sum = sum(loadout_array[:7])

        non_zero_element = numpy.nonzero(mod_array[:13])[0]
        loadout_array[non_zero_element] = (
            mod_array[non_zero_element] * non_secondary_damage_sum +
            loadout_array[non_zero_element])

    loadout.loadout_array = loadout_array
Ejemplo n.º 6
0
def first_elemental_mod_calc(loadout: mods.loadout) -> None:
    ''' Calculates the enhancements of first level elemental damage
    mods. '''

    relevant_mod_list = get_relevant_mod_list(loadout, 2)
    loadout_array = loadout.loadout_array
    for mod in relevant_mod_list:
        mod_array = mod.get_modarray()
        sum_of_physical_damage = (loadout_array[0] + loadout_array[1] +
                                  loadout_array[2])

        non_zero_element = numpy.nonzero(mod_array[:13] - 1)[0]
        loadout_array[non_zero_element] = (
            mod_array[non_zero_element] * sum_of_physical_damage +
            loadout_array[non_zero_element])

    loadout.loadout_array = loadout_array