MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / calculateModifiedAttributes

Method calculateModifiedAttributes

eos/saveddata/fighter.py:398–424  ·  view source on GitHub ↗
(self, fit, runTime, forceProjected=False, forcedProjRange=DEFAULT)

Source from the content-addressed store, hash-verified

396 return True
397
398 def calculateModifiedAttributes(self, fit, runTime, forceProjected=False, forcedProjRange=DEFAULT):
399 if not self.active:
400 return
401
402 if self.projected or forceProjected:
403 context = "projected", "fighter"
404 projected = True
405 else:
406 context = ("fighter",)
407 projected = False
408
409 projectionRange = self.projectionRange if forcedProjRange is DEFAULT else forcedProjRange
410
411 for ability in self.abilities:
412 if not ability.active:
413 continue
414
415 effect = ability.effect
416 if effect.runTime == runTime and effect.activeByDefault and \
417 ((projected and effect.isType("projected")) or not projected):
418 if ability.grouped:
419 effect.handler(fit, self, context, projectionRange, effect=effect)
420 else:
421 i = 0
422 while i != self.amount:
423 effect.handler(fit, self, context, projectionRange, effect=effect)
424 i += 1
425
426 def __deepcopy__(self, memo):
427 copy = Fighter(self.item)

Callers

nothing calls this directly

Calls 2

isTypeMethod · 0.45
handlerMethod · 0.45

Tested by

no test coverage detected