Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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]))
Beispiel #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
Beispiel #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