Example #1
0
def make_paste_effect():
    paste_effect = EffectFactory.make(
        effect_id=EosEffectId.ancillary_paste_armor_rep_boost,
        category_id=EffectCategoryId.passive,
        is_offensive=False,
        is_assistance=False,
        build_status=EffectBuildStatus.custom,
        modifiers=(AncillaryRepAmountModifier(),))
    return paste_effect
Example #2
0
 def mkeffect(self, effect_id=None, customize=True, **kwargs):
     # Allocate & verify ID
     if effect_id is None:
         effect_id = self.allocate_effect_id()
     if effect_id in self.__effect_data:
         raise KeyError(effect_id)
     # Create, store and return effect
     if customize:
         effect = EffectFactory.make(effect_id=effect_id, **kwargs)
     else:
         effect = Effect(effect_id=effect_id, **kwargs)
     self.__effect_data[effect.id] = effect
     return effect
Example #3
0
 def mkeffect(self, effect_id=None, customize=True, **kwargs):
     # Allocate & verify ID
     if effect_id is None:
         effect_id = self.allocate_effect_id()
     if effect_id in self.__effect_data:
         raise KeyError(effect_id)
     # Create, store and return effect
     if customize:
         effect = EffectFactory.make(effect_id=effect_id, **kwargs)
     else:
         effect = Effect(effect_id=effect_id, **kwargs)
     self.__effect_data[effect.id] = effect
     return effect
Example #4
0
 def __effect_decompress(self, effect_data):
     """Reconstruct effect from python primitives."""
     return EffectFactory.make(effect_id=effect_data[0],
                               category_id=effect_data[1],
                               is_offensive=effect_data[2],
                               is_assistance=effect_data[3],
                               duration_attr_id=effect_data[4],
                               discharge_attr_id=effect_data[5],
                               range_attr_id=effect_data[6],
                               falloff_attr_id=effect_data[7],
                               tracking_speed_attr_id=effect_data[8],
                               fitting_usage_chance_attr_id=effect_data[9],
                               resist_attr_id=effect_data[10],
                               build_status=effect_data[11],
                               modifiers=tuple(
                                   self.__modifier_decompress(md)
                                   for md in effect_data[12]))
Example #5
0
def make_missile_dmg_effect():
    modifiers = []
    for dmg_attr_id in (AttrId.em_dmg, AttrId.therm_dmg, AttrId.kin_dmg,
                        AttrId.expl_dmg):
        modifiers.append(
            DogmaModifier(
                affectee_filter=ModAffecteeFilter.owner_skillrq,
                affectee_domain=ModDomain.character,
                affectee_filter_extra_arg=TypeId.missile_launcher_operation,
                affectee_attr_id=dmg_attr_id,
                operator=ModOperator.post_mul_immune,
                aggregate_mode=ModAggregateMode.stack,
                affector_attr_id=AttrId.missile_dmg_mult))
    missile_dmg_effect = EffectFactory.make(
        effect_id=EosEffectId.char_missile_dmg,
        category_id=EffectCategoryId.passive,
        is_offensive=False,
        is_assistance=False,
        build_status=EffectBuildStatus.custom,
        modifiers=tuple(modifiers))
    return missile_dmg_effect
Example #6
0
def make_missile_dmg_effect():
    modifiers = []
    for dmg_attr_id in (
        AttrId.em_dmg,
        AttrId.therm_dmg,
        AttrId.kin_dmg,
        AttrId.expl_dmg
    ):
        modifiers.append(DogmaModifier(
            affectee_filter=ModAffecteeFilter.owner_skillrq,
            affectee_domain=ModDomain.character,
            affectee_filter_extra_arg=TypeId.missile_launcher_operation,
            affectee_attr_id=dmg_attr_id,
            operator=ModOperator.post_mul_immune,
            aggregate_mode=ModAggregateMode.stack,
            affector_attr_id=AttrId.missile_dmg_mult))
    missile_dmg_effect = EffectFactory.make(
        effect_id=EosEffectId.char_missile_dmg,
        category_id=EffectCategoryId.passive,
        is_offensive=False,
        is_assistance=False,
        build_status=EffectBuildStatus.custom,
        modifiers=tuple(modifiers))
    return missile_dmg_effect
Example #7
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .direct_dmg import DoomsdayDirect


EffectFactory.register_class_by_id(
    DoomsdayDirect,
    EffectId.super_weapon_amarr)
EffectFactory.register_class_by_id(
    DoomsdayDirect,
    EffectId.super_weapon_caldari)
EffectFactory.register_class_by_id(
    DoomsdayDirect,
    EffectId.super_weapon_gallente)
EffectFactory.register_class_by_id(
    DoomsdayDirect,
    EffectId.super_weapon_minmatar)
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import RemoteArmorRepairEffect


class NpcEntityRemoteArmorRepairer(RemoteArmorRepairEffect):

    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.armor_dmg_amount, 0)


EffectFactory.register_class_by_id(
    NpcEntityRemoteArmorRepairer,
    EffectId.npc_entity_remote_armor_repairer)
Example #9
0
from eos.const.eos import EffectBuildStatus
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .modifier import make_hardpoint_modifiers
from .modifier import make_slot_modifiers

logger = getLogger(__name__)


def add_hardpoint_modifiers(effect):
    if effect.modifiers:
        msg = 'hardpoint amount bonus effect has modifiers, overwriting them'
        logger.warning(msg)
    effect.modifiers = make_hardpoint_modifiers()
    effect.build_status = EffectBuildStatus.custom


def add_slot_modifiers(effect):
    if effect.modifiers:
        msg = 'slot amount bonus effect has modifiers, overwriting them'
        logger.warning(msg)
    effect.modifiers = make_slot_modifiers()
    effect.build_status = EffectBuildStatus.custom


EffectFactory.register_instance_by_id(add_hardpoint_modifiers,
                                      EffectId.hardpoint_modifier_effect)
EffectFactory.register_instance_by_id(add_slot_modifiers,
                                      EffectId.slot_modifier)
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import RemoteArmorRepairEffect


class ShipModuleRemoteArmorMutadaptiveRepairer(RemoteArmorRepairEffect):

    def get_rep_amount(self, item):
        rep_amount = item.attrs.get(AttrId.armor_dmg_amount, 0)
        try:
            spoolup_mult = 1 + item.attrs[AttrId.repair_mult_bonus_max]
        except KeyError:
            spoolup_mult = 1
        return rep_amount * spoolup_mult


EffectFactory.register_class_by_id(
    ShipModuleRemoteArmorMutadaptiveRepairer,
    EffectId.ship_module_remote_armor_mutadaptive_repairer)
Example #11
0
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .attack_m import FighterAbilityAttackM
from .kamikaze import FighterAbilityKamikaze
from .launch_bomb import FighterAbilityLaunchBomb
from .missiles import FighterAbilityMissiles


EffectFactory.register_class_by_id(
    FighterAbilityAttackM,
    EffectId.fighter_ability_attack_m)
EffectFactory.register_class_by_id(
    FighterAbilityKamikaze,
    EffectId.fighter_ability_kamikaze)
EffectFactory.register_class_by_id(
    FighterAbilityLaunchBomb,
    EffectId.fighter_ability_launch_bomb)
EffectFactory.register_class_by_id(
    FighterAbilityMissiles,
    EffectId.fighter_ability_missiles)
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import BaseNeutEffect


class EnergyNeutralizerFalloff(BaseNeutEffect):

    def get_neut_amount(self, item):
        return item.attrs.get(AttrId.energy_neutralizer_amount, 0)


EffectFactory.register_class_by_id(
    EnergyNeutralizerFalloff,
    EffectId.energy_neutralizer_falloff)
Example #13
0
from eos.const.eos import EffectBuildStatus
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .modifier import make_ab_modifiers
from .modifier import make_mwd_modifiers

logger = getLogger(__name__)


def add_ab_modifiers(effect):
    if effect.modifiers:
        msg = 'afterburner effect has modifiers, overwriting them'
        logger.info(msg)
    effect.modifiers = make_ab_modifiers()
    effect.build_status = EffectBuildStatus.custom


def add_mwd_modifiers(effect):
    if effect.modifiers:
        msg = 'microwarpdrive effect has modifiers, overwriting them'
        logger.info(msg)
    effect.modifiers = make_mwd_modifiers()
    effect.build_status = EffectBuildStatus.custom


EffectFactory.register_instance_by_id(add_ab_modifiers,
                                      EffectId.module_bonus_afterburner)
EffectFactory.register_instance_by_id(add_mwd_modifiers,
                                      EffectId.module_bonus_microwarpdrive)
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import BaseCapTransmitEffect


class ShipModuleRemoteCapacitorTransmitter(BaseCapTransmitEffect):

    def get_cap_transmit_amount(self, item):
        return item.attrs.get(AttrId.power_transfer_amount, 0)


EffectFactory.register_class_by_id(
    ShipModuleRemoteCapacitorTransmitter,
    EffectId.ship_module_remote_capacitor_transmitter)
Example #15
0
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from eos.stats_container import DmgStats
from .base import DmgDealerEffect


class EmpWave(DmgDealerEffect):
    def get_volley(self, item):
        em = item.attrs.get(AttrId.em_dmg, 0)
        therm = item.attrs.get(AttrId.therm_dmg, 0)
        kin = item.attrs.get(AttrId.kin_dmg, 0)
        expl = item.attrs.get(AttrId.expl_dmg, 0)
        return DmgStats(em, therm, kin, expl)

    def get_applied_volley(self, item, tgt_data):
        raise NotImplementedError


EffectFactory.reg_cust_class_by_id(EmpWave, EffectId.emp_wave)
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import RemoteShieldRepairEffect


class NpcEntityRemoteShieldBooster(RemoteShieldRepairEffect):

    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.shield_bonus, 0)


EffectFactory.register_class_by_id(
    NpcEntityRemoteShieldBooster,
    EffectId.npc_entity_remote_shield_booster)
Example #17
0

def add_missile_dmg_modifiers_expl(effect):
    _add_missile_dmg_modifiers(effect, AttrId.expl_dmg)


def add_drone_dmg_modifiers(effect):
    if effect.modifiers:
        msg = 'drone self skillreq dmg effect has modifiers, overwriting them'
        logger.warning(msg)
    effect.modifiers = make_drone_dmg_modifiers()
    effect.build_status = EffectBuildStatus.custom


EffectFactory.register_instance_by_id(
    add_missile_rof_modifiers,
    EffectId.self_rof)
EffectFactory.register_instance_by_id(
    add_missile_dmg_modifiers_em,
    EffectId.missile_em_dmg_bonus)
EffectFactory.register_instance_by_id(
    add_missile_dmg_modifiers_therm,
    EffectId.missile_therm_dmg_bonus)
EffectFactory.register_instance_by_id(
    add_missile_dmg_modifiers_kin,
    EffectId.missile_kin_dmg_bonus2)
EffectFactory.register_instance_by_id(
    add_missile_dmg_modifiers_expl,
    EffectId.missile_expl_dmg_bonus)
EffectFactory.register_instance_by_id(
    add_drone_dmg_modifiers,
Example #18
0
# ==============================================================================


"""
In CCP dogma code, 'online' effect has custom processing. Actual effect has
'active' effect category, which lets all item types with it to be in active
state according to eos' effect handling. We do not want any special processing,
thus just fix it here.
"""


from logging import getLogger

from eos.const.eve import EffectCategoryId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory


logger = getLogger(__name__)


def fix_online_category(effect):
    if effect.category_id == EffectCategoryId.online:
        msg = 'online effect category does not need to be adjusted'
        logger.info(msg)
    else:
        effect.category_id = EffectCategoryId.online


EffectFactory.register_instance_by_id(fix_online_category, EffectId.online)
Example #19
0
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import WarfareBuffEffect


class ModuleBonusWarfareLinkSkirmish(WarfareBuffEffect):

        friendly_only = True


EffectFactory.register_class_by_id(
    ModuleBonusWarfareLinkSkirmish,
    EffectId.module_bonus_warfare_link_skirmish)
Example #20
0
# Copyright (C) 2011 Diego Duclos
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .direct_dmg import DoomsdayDirect

EffectFactory.reg_cust_class_by_id(DoomsdayDirect, EffectId.super_weapon_amarr)
EffectFactory.reg_cust_class_by_id(DoomsdayDirect,
                                   EffectId.super_weapon_caldari)
EffectFactory.reg_cust_class_by_id(DoomsdayDirect,
                                   EffectId.super_weapon_gallente)
EffectFactory.reg_cust_class_by_id(DoomsdayDirect,
                                   EffectId.super_weapon_minmatar)
Example #21
0
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from eos.eve_obj.effect.helper_func import get_cycles_until_reload_generic
from .base import LocalArmorRepairEffect


class FueledArmorRepair(LocalArmorRepairEffect):
    def get_cycles_until_reload(self, item):
        return get_cycles_until_reload_generic(item)

    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.armor_dmg_amount, 0)


EffectFactory.register_class_by_id(FueledArmorRepair,
                                   EffectId.fueled_armor_repair)
Example #22
0
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import WarfareBuffEffect


class ModuleBonusWarfareLinkArmor(WarfareBuffEffect):

    friendly_only = True


EffectFactory.register_class_by_id(ModuleBonusWarfareLinkArmor,
                                   EffectId.module_bonus_warfare_link_armor)
Example #23
0

class UseMissiles(DmgDealerEffect):
    def get_cycles_until_reload(self, item):
        return get_cycles_until_reload_generic(item)

    def get_volley(self, item):
        if not self.get_cycles_until_reload(item):
            return DmgStats(0, 0, 0, 0)
        # If module can cycle until reload, it means we can assume that there's
        # a charge loaded
        charge = self.get_charge(item)
        charge_defeff_id = charge._type_default_effect_id
        if (charge_defeff_id is None
                or charge_defeff_id not in charge._running_effect_ids
                or charge_defeff_id not in (EffectId.missile_launching,
                                            EffectId.fof_missile_launching,
                                            EffectId.bomb_launching)):
            return DmgStats(0, 0, 0, 0)
        em = charge.attrs.get(AttrId.em_dmg, 0)
        therm = charge.attrs.get(AttrId.therm_dmg, 0)
        kin = charge.attrs.get(AttrId.kin_dmg, 0)
        expl = charge.attrs.get(AttrId.expl_dmg, 0)
        return DmgStats(em, therm, kin, expl)

    def get_applied_volley(self, item, tgt_data):
        raise NotImplementedError


EffectFactory.reg_cust_class_by_id(UseMissiles, EffectId.use_missiles)
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import BaseNeutEffect


class EntityEnergyNeutralizerFalloff(BaseNeutEffect):
    def get_neut_amount(self, item):
        return item.attrs.get(AttrId.energy_neutralizer_amount, 0)


EffectFactory.register_class_by_id(EntityEnergyNeutralizerFalloff,
                                   EffectId.entity_energy_neutralizer_falloff)
Example #25
0
# ==============================================================================
# Copyright (C) 2011 Diego Duclos
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .projectile_fired import ProjectileFired
from .target_abc_attack import TargetABCAttack
from .target_attack import TargetAttack

EffectFactory.register_class_by_id(ProjectileFired, EffectId.projectile_fired)
EffectFactory.register_class_by_id(TargetABCAttack, EffectId.target_abc_attack)
EffectFactory.register_class_by_id(TargetAttack, EffectId.target_attack)
Example #26
0
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import BaseNeutEffect


class EnergyNosferatuFalloff(BaseNeutEffect):
    def get_neut_amount(self, item):
        if item.attrs.get(AttrId.nos_override, 0):
            return item.attrs.get(AttrId.power_transfer_amount, 0)
        return 0


EffectFactory.register_class_by_id(EnergyNosferatuFalloff,
                                   EffectId.energy_nosferatu_falloff)
Example #27
0
        Effect.__init__(self, *args, **kwargs)
        max_range_modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.domain_skillrq,
            affectee_domain=ModDomain.target,
            affectee_filter_extra_arg=TypeId.gunnery,
            affectee_attr_id=AttrId.max_range,
            operator=ModOperator.post_percent,
            affector_attr_id=AttrId.max_range_bonus)
        falloff_modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.domain_skillrq,
            affectee_domain=ModDomain.target,
            affectee_filter_extra_arg=TypeId.gunnery,
            affectee_attr_id=AttrId.falloff,
            operator=ModOperator.post_percent,
            affector_attr_id=AttrId.falloff_bonus)
        tracking_speed_modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.domain_skillrq,
            affectee_domain=ModDomain.target,
            affectee_filter_extra_arg=TypeId.gunnery,
            affectee_attr_id=AttrId.tracking_speed,
            operator=ModOperator.post_percent,
            affector_attr_id=AttrId.tracking_speed_bonus)
        self.modifiers = (
            *self.modifiers, max_range_modifier,
            falloff_modifier, tracking_speed_modifier)


EffectFactory.reg_cust_class_by_id(
    ShipModuleTrackingDisruptor,
    EffectId.ship_module_tracking_disruptor)
Example #28
0
File: web.py Project: DarkFenX/eos
from eos.const.eos import ModAffecteeFilter
from eos.const.eos import ModAggregateMode
from eos.const.eos import ModDomain
from eos.const.eos import ModOperator
from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import Effect
from eos.eve_obj.effect import EffectFactory
from eos.eve_obj.modifier import DogmaModifier


class RemoteWebifierFalloff(Effect):

    def __init__(self, *args, resist_attr_id=None, **kwargs):
        Effect.__init__(
            self, *args, resist_attr_id=AttrId.stasis_webifier_resist,
            **kwargs)
        modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.item,
            affectee_domain=ModDomain.target,
            affectee_attr_id=AttrId.max_velocity,
            operator=ModOperator.post_percent,
            aggregate_mode=ModAggregateMode.stack,
            affector_attr_id=AttrId.speed_factor)
        self.modifiers = (*self.modifiers, modifier)


EffectFactory.register_class_by_id(
    RemoteWebifierFalloff,
    EffectId.remote_webifier_falloff)
Example #29
0
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from eos.stats_container import DmgStats
from .base import DmgDealerEffect


class EmpWave(DmgDealerEffect):

    def get_volley(self, item):
        em = item.attrs.get(AttrId.em_dmg, 0)
        therm = item.attrs.get(AttrId.therm_dmg, 0)
        kin = item.attrs.get(AttrId.kin_dmg, 0)
        expl = item.attrs.get(AttrId.expl_dmg, 0)
        return DmgStats(em, therm, kin, expl)

    def get_applied_volley(self, item, tgt_data):
        raise NotImplementedError


EffectFactory.register_class_by_id(
    EmpWave,
    EffectId.emp_wave)
Example #30
0
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import WarfareBuffEffect


class ModuleBonusWarfareLinkMining(WarfareBuffEffect):

    friendly_only = True


EffectFactory.register_class_by_id(ModuleBonusWarfareLinkMining,
                                   EffectId.module_bonus_warfare_link_mining)
Example #31
0
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import LocalArmorRepairEffect


class ArmorRepair(LocalArmorRepairEffect):

    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.armor_dmg_amount, 0)


EffectFactory.register_class_by_id(
    ArmorRepair,
    EffectId.armor_repair)
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import RemoteShieldRepairEffect


class NpcEntityRemoteShieldBooster(RemoteShieldRepairEffect):
    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.shield_bonus, 0)


EffectFactory.register_class_by_id(NpcEntityRemoteShieldBooster,
                                   EffectId.npc_entity_remote_shield_booster)
Example #33
0
    def get_volley(self, item):
        if not self.get_cycles_until_reload(item):
            return DmgStats(0, 0, 0, 0)
        # If module can cycle until reload, it means we can assume that there's
        # a charge loaded
        charge = self.get_charge(item)
        charge_defeff_id = charge._type_default_effect_id
        if (
            charge_defeff_id is None or
            charge_defeff_id not in charge._running_effect_ids or
            charge_defeff_id not in (
                EffectId.missile_launching,
                EffectId.fof_missile_launching,
                EffectId.bomb_launching)
        ):
            return DmgStats(0, 0, 0, 0)
        em = charge.attrs.get(AttrId.em_dmg, 0)
        therm = charge.attrs.get(AttrId.therm_dmg, 0)
        kin = charge.attrs.get(AttrId.kin_dmg, 0)
        expl = charge.attrs.get(AttrId.expl_dmg, 0)
        return DmgStats(em, therm, kin, expl)

    def get_applied_volley(self, item, tgt_data):
        raise NotImplementedError


EffectFactory.register_class_by_id(
    UseMissiles,
    EffectId.use_missiles)
Example #34
0
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from eos.stats_container import DmgStats
from .base import DmgDealerEffect


class EmpWave(DmgDealerEffect):
    def get_volley(self, item):
        em = item.attrs.get(AttrId.em_dmg, 0)
        therm = item.attrs.get(AttrId.therm_dmg, 0)
        kin = item.attrs.get(AttrId.kin_dmg, 0)
        expl = item.attrs.get(AttrId.expl_dmg, 0)
        return DmgStats(em, therm, kin, expl)

    def get_applied_volley(self, item, tgt_data):
        raise NotImplementedError


EffectFactory.register_class_by_id(EmpWave, EffectId.emp_wave)
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import RemoteArmorRepairEffect


class ShipModuleRemoteArmorRepairer(RemoteArmorRepairEffect):

    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.armor_dmg_amount, 0)


EffectFactory.register_class_by_id(
    ShipModuleRemoteArmorRepairer,
    EffectId.ship_module_remote_armor_repairer)
Example #36
0
File: damp.py Project: pyfa-org/eos
from eos.const.eos import ModAffecteeFilter
from eos.const.eos import ModAggregateMode
from eos.const.eos import ModDomain
from eos.const.eos import ModOperator
from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import Effect
from eos.eve_obj.effect import EffectFactory
from eos.eve_obj.modifier import DogmaModifier


class RemoteSensorDampFalloff(Effect):

    def __init__(self, *args, resist_attr_id=None, **kwargs):
        Effect.__init__(
            self, *args, resist_attr_id=AttrId.sensor_dampener_resist,
            **kwargs)
        modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.item,
            affectee_domain=ModDomain.target,
            affectee_attr_id=AttrId.max_target_range,
            operator=ModOperator.post_percent,
            aggregate_mode=ModAggregateMode.stack,
            affector_attr_id=AttrId.max_target_range_bonus)
        self.modifiers = (*self.modifiers, modifier)


EffectFactory.register_class_by_id(
    RemoteSensorDampFalloff,
    EffectId.remote_sensor_damp_falloff)
Example #37
0
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .projectile_fired import ProjectileFired
from .target_abc_attack import TargetABCAttack
from .target_attack import TargetAttack


EffectFactory.register_class_by_id(
    ProjectileFired,
    EffectId.projectile_fired)
EffectFactory.register_class_by_id(
    TargetABCAttack,
    EffectId.target_abc_attack)
EffectFactory.register_class_by_id(
    TargetAttack,
    EffectId.target_attack)
Example #38
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import BaseNeutEffect


class EnergyNosferatuFalloff(BaseNeutEffect):

    def get_neut_amount(self, item):
        if item.attrs.get(AttrId.nos_override, 0):
            return item.attrs.get(AttrId.power_transfer_amount, 0)
        return 0


EffectFactory.register_class_by_id(
    EnergyNosferatuFalloff,
    EffectId.energy_nosferatu_falloff)
Example #39
0
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import WarfareBuffEffect


class ModuleBonusWarfareLinkShield(WarfareBuffEffect):

    friendly_only = True


EffectFactory.register_class_by_id(ModuleBonusWarfareLinkShield,
                                   EffectId.module_bonus_warfare_link_shield)
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


import math

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from eos.eve_obj.effect.helper_func import get_cycles_until_reload_generic
from .base import RemoteShieldRepairEffect


class ShipModuleAncillaryRemoteShieldBooster(RemoteShieldRepairEffect):

    def get_cycles_until_reload(self, item):
        return get_cycles_until_reload_generic(item, default=math.inf)

    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.shield_bonus, 0)


EffectFactory.register_class_by_id(
    ShipModuleAncillaryRemoteShieldBooster,
    EffectId.ship_module_ancillary_remote_shield_booster)
Example #41
0
from eos.eve_obj.effect import EffectFactory
from .modifier import make_ab_modifiers
from .modifier import make_mwd_modifiers


logger = getLogger(__name__)


def add_ab_modifiers(effect):
    if effect.modifiers:
        msg = 'afterburner effect has modifiers, overwriting them'
        logger.info(msg)
    effect.modifiers = make_ab_modifiers()
    effect.build_status = EffectBuildStatus.custom


def add_mwd_modifiers(effect):
    if effect.modifiers:
        msg = 'microwarpdrive effect has modifiers, overwriting them'
        logger.info(msg)
    effect.modifiers = make_mwd_modifiers()
    effect.build_status = EffectBuildStatus.custom


EffectFactory.register_instance_by_id(
    add_ab_modifiers,
    EffectId.module_bonus_afterburner)
EffectFactory.register_instance_by_id(
    add_mwd_modifiers,
    EffectId.module_bonus_microwarpdrive)
Example #42
0
from eos.eve_obj.effect import EffectFactory
from .modifier import make_hardpoint_modifiers
from .modifier import make_slot_modifiers


logger = getLogger(__name__)


def add_hardpoint_modifiers(effect):
    if effect.modifiers:
        msg = 'hardpoint amount bonus effect has modifiers, overwriting them'
        logger.warning(msg)
    effect.modifiers = make_hardpoint_modifiers()
    effect.build_status = EffectBuildStatus.custom


def add_slot_modifiers(effect):
    if effect.modifiers:
        msg = 'slot amount bonus effect has modifiers, overwriting them'
        logger.warning(msg)
    effect.modifiers = make_slot_modifiers()
    effect.build_status = EffectBuildStatus.custom


EffectFactory.register_instance_by_id(
    add_hardpoint_modifiers,
    EffectId.hardpoint_modifier_effect)
EffectFactory.register_instance_by_id(
    add_slot_modifiers,
    EffectId.slot_modifier)
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import BaseCapTransmitEffect


class ShipModuleRemoteCapacitorTransmitter(BaseCapTransmitEffect):
    def get_cap_transmit_amount(self, item):
        return item.attrs.get(AttrId.power_transfer_amount, 0)


EffectFactory.register_class_by_id(
    ShipModuleRemoteCapacitorTransmitter,
    EffectId.ship_module_remote_capacitor_transmitter)
Example #44
0
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

import math

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from eos.eve_obj.effect.helper_func import get_cycles_until_reload_generic
from .base import LocalShieldRepairEffect


class FueledShieldBoosting(LocalShieldRepairEffect):
    def get_cycles_until_reload(self, item):
        return get_cycles_until_reload_generic(item, default=math.inf)

    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.shield_bonus, 0)


EffectFactory.register_class_by_id(FueledShieldBoosting,
                                   EffectId.fueled_shield_boosting)
Example #45
0
            affectee_domain=ModDomain.target,
            affectee_filter_extra_arg=TypeId.gunnery,
            affectee_attr_id=AttrId.max_range,
            operator=ModOperator.post_percent,
            aggregate_mode=ModAggregateMode.stack,
            affector_attr_id=AttrId.max_range_bonus)
        falloff_modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.domain_skillrq,
            affectee_domain=ModDomain.target,
            affectee_filter_extra_arg=TypeId.gunnery,
            affectee_attr_id=AttrId.falloff,
            operator=ModOperator.post_percent,
            aggregate_mode=ModAggregateMode.stack,
            affector_attr_id=AttrId.falloff_bonus)
        tracking_speed_modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.domain_skillrq,
            affectee_domain=ModDomain.target,
            affectee_filter_extra_arg=TypeId.gunnery,
            affectee_attr_id=AttrId.tracking_speed,
            operator=ModOperator.post_percent,
            aggregate_mode=ModAggregateMode.stack,
            affector_attr_id=AttrId.tracking_speed_bonus)
        self.modifiers = (
            *self.modifiers, max_range_modifier,
            falloff_modifier, tracking_speed_modifier)


EffectFactory.register_class_by_id(
    ShipModuleTrackingDisruptor,
    EffectId.ship_module_tracking_disruptor)
Example #46
0
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================
"""
In CCP dogma code, 'online' effect has custom processing. Actual effect has
'active' effect category, which lets all item types with it to be in active
state according to eos' effect handling. We do not want any special processing,
thus just fix it here.
"""

from logging import getLogger

from eos.const.eve import EffectCategoryId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory

logger = getLogger(__name__)


def fix_online_category(effect):
    if effect.category_id == EffectCategoryId.online:
        msg = 'online effect category does not need to be adjusted'
        logger.info(msg)
    else:
        effect.category_id = EffectCategoryId.online


EffectFactory.register_instance_by_id(fix_online_category, EffectId.online)
Example #47
0
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import WarfareBuffEffect


class ModuleBonusWarfareLinkInfo(WarfareBuffEffect):

    friendly_only = True


EffectFactory.register_class_by_id(ModuleBonusWarfareLinkInfo,
                                   EffectId.module_bonus_warfare_link_info)
Example #48
0
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from eos.eve_obj.effect.helper_func import get_cycles_until_reload_generic
from .base import RemoteArmorRepairEffect


class ShipModuleAncillaryRemoteArmorRepairer(RemoteArmorRepairEffect):
    def get_cycles_until_reload(self, item):
        return get_cycles_until_reload_generic(item)

    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.armor_dmg_amount, 0)


EffectFactory.register_class_by_id(
    ShipModuleAncillaryRemoteArmorRepairer,
    EffectId.ship_module_ancillary_remote_armor_repairer)
Example #49
0
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from logging import getLogger

from eos.const.eos import EffectBuildStatus
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .modifier import make_rah_modifiers

logger = getLogger(__name__)


def add_rah_modifiers(effect):
    if effect.modifiers:
        msg = 'reactive armor hardener effect has modifiers, overwriting them'
        logger.warning(msg)
    effect.modifiers = make_rah_modifiers()
    effect.build_status = EffectBuildStatus.custom


EffectFactory.reg_cust_instance_by_id(add_rah_modifiers,
                                      EffectId.adaptive_armor_hardener)
Example #50
0
        aoe_velocity_modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.owner_skillrq,
            affectee_domain=ModDomain.target,
            affectee_filter_extra_arg=TypeId.missile_launcher_operation,
            affectee_attr_id=AttrId.aoe_velocity,
            operator=ModOperator.post_percent,
            affector_attr_id=AttrId.aoe_velocity_bonus)
        max_velocity_modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.owner_skillrq,
            affectee_domain=ModDomain.target,
            affectee_filter_extra_arg=TypeId.missile_launcher_operation,
            affectee_attr_id=AttrId.max_velocity,
            operator=ModOperator.post_percent,
            affector_attr_id=AttrId.missile_velocity_bonus)
        explosion_delay_modifier = DogmaModifier(
            affectee_filter=ModAffecteeFilter.owner_skillrq,
            affectee_domain=ModDomain.target,
            affectee_filter_extra_arg=TypeId.missile_launcher_operation,
            affectee_attr_id=AttrId.explosion_delay,
            operator=ModOperator.post_percent,
            affector_attr_id=AttrId.explosion_delay_bonus)
        self.modifiers = (
            *self.modifiers, aoe_cloud_size_modifier,
            aoe_velocity_modifier, max_velocity_modifier,
            explosion_delay_modifier)


EffectFactory.reg_cust_class_by_id(
    ShipModuleGundanceDisruptor,
    EffectId.ship_module_guidance_disruptor)
Example #51
0
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================


from eos.const.eve import AttrId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .base import LocalShieldRepairEffect


class ShieldBoosting(LocalShieldRepairEffect):

    def get_rep_amount(self, item):
        return item.attrs.get(AttrId.shield_bonus, 0)


EffectFactory.register_class_by_id(
    ShieldBoosting,
    EffectId.shield_boosting)