本文整理汇总了Python中eos.modifiedAttributeDict.ModifiedAttributeDict.getResistance方法的典型用法代码示例。如果您正苦于以下问题:Python ModifiedAttributeDict.getResistance方法的具体用法?Python ModifiedAttributeDict.getResistance怎么用?Python ModifiedAttributeDict.getResistance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eos.modifiedAttributeDict.ModifiedAttributeDict
的用法示例。
在下文中一共展示了ModifiedAttributeDict.getResistance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handler
# 需要导入模块: from eos.modifiedAttributeDict import ModifiedAttributeDict [as 别名]
# 或者: from eos.modifiedAttributeDict.ModifiedAttributeDict import getResistance [as 别名]
def handler(fit, module, context, **kwargs):
if "projected" in context:
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
strModifier = 1 - module.getModifiedItemAttr("scan{0}StrengthBonus".format(fit.scanType)) / fit.scanStrength
if 'effect' in kwargs:
strModifier *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
fit.ecmProjectedStr *= strModifier
示例2: handler
# 需要导入模块: from eos.modifiedAttributeDict import ModifiedAttributeDict [as 别名]
# 或者: from eos.modifiedAttributeDict.ModifiedAttributeDict import getResistance [as 别名]
def handler(fit, src, context, **kwargs):
if "projected" in context:
amount = src.getModifiedItemAttr("powerTransferAmount")
duration = src.getModifiedItemAttr("duration")
if 'effect' in kwargs:
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
fit.addDrain(src, duration, -amount, 0)
示例3: handler
# 需要导入模块: from eos.modifiedAttributeDict import ModifiedAttributeDict [as 别名]
# 或者: from eos.modifiedAttributeDict.ModifiedAttributeDict import getResistance [as 别名]
def handler(fit, src, context, **kwargs):
if "projected" in context:
amount = src.getModifiedItemAttr("{}Amount".format(prefix)) * src.amountActive
time = src.getModifiedItemAttr("{}Duration".format(prefix))
if 'effect' in kwargs:
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
fit.addDrain(src, time, amount, 0)
示例4: handler
# 需要导入模块: from eos.modifiedAttributeDict import ModifiedAttributeDict [as 别名]
# 或者: from eos.modifiedAttributeDict.ModifiedAttributeDict import getResistance [as 别名]
def handler(fit, module, context, **kwargs):
if "projected" not in context:
return
# jam formula: 1 - (1- (jammer str/ship str))^(# of jam mods with same str))
strModifier = 1 - (module.getModifiedItemAttr("{}Strength{}".format(prefix, fit.scanType)) * module.amountActive) / fit.scanStrength
if 'effect' in kwargs:
strModifier *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
fit.ecmProjectedStr *= strModifier
示例5: handler
# 需要导入模块: from eos.modifiedAttributeDict import ModifiedAttributeDict [as 别名]
# 或者: from eos.modifiedAttributeDict.ModifiedAttributeDict import getResistance [as 别名]
def handler(fit, src, context, **kwargs):
if "projected" in context and ((hasattr(src, "state") and src.state >= State.ACTIVE) or
hasattr(src, "amountActive")):
amount = src.getModifiedItemAttr("energyNeutralizerAmount")
time = src.getModifiedItemAttr("energyNeutralizerDuration")
if 'effect' in kwargs:
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
fit.addDrain(src, time, amount, 0)
示例6: handler
# 需要导入模块: from eos.modifiedAttributeDict import ModifiedAttributeDict [as 别名]
# 或者: from eos.modifiedAttributeDict.ModifiedAttributeDict import getResistance [as 别名]
def handler(fit, src, context, **kwargs):
amount = src.getModifiedItemAttr("powerTransferAmount")
time = src.getModifiedItemAttr("duration")
if 'effect' in kwargs:
amount *= ModifiedAttributeDict.getResistance(fit, kwargs['effect'])
if "projected" in context:
fit.addDrain(src, time, amount, 0)
elif "module" in context:
src.itemModifiedAttributes.force("capacitorNeed", -amount)