MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / getResistance

Method getResistance

eos/modifiedAttributeDict.py:579–593  ·  view source on GitHub ↗
(fit, effect)

Source from the content-addressed store, hash-verified

577
578 @staticmethod
579 def getResistance(fit, effect):
580 # Resistances are applicable only to projected effects
581 if isinstance(effect.type, (tuple, list)):
582 effectType = effect.type
583 else:
584 effectType = (effect.type,)
585 if 'projected' not in effectType:
586 return 1
587 remoteResistID = getResistanceAttrID(modifyingItem=fit.getModifier(), effect=effect)
588 if not remoteResistID:
589 return 1
590 attrInfo = getAttributeInfo(remoteResistID)
591 # Get the attribute of the resist
592 resist = fit.ship.itemModifiedAttributes[attrInfo.attributeName] or None
593 return resist or 1
594
595
596class Affliction:

Callers 15

handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80
handlerMethod · 0.80

Calls 3

getAttributeInfoFunction · 0.90
getResistanceAttrIDFunction · 0.85
getModifierMethod · 0.80

Tested by

no test coverage detected