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

Method increase

eos/modifiedAttributeDict.py:496–518  ·  view source on GitHub ↗

Increase value of given attribute by given number

(self, attributeName, increase, position="pre", skill=None, **kwargs)

Source from the content-addressed store, hash-verified

494 self.__afflict(attributeName, Operator.PREASSIGN, None, value, value, value != self.getOriginal(attributeName))
495
496 def increase(self, attributeName, increase, position="pre", skill=None, **kwargs):
497 """Increase value of given attribute by given number"""
498 if skill:
499 increase *= self.__handleSkill(skill)
500
501 if 'effect' in kwargs:
502 increase *= ModifiedAttributeDict.getResistance(self.fit, kwargs['effect']) or 1
503
504 # Increases applied before multiplications and after them are
505 # written in separate maps
506 if position == "pre":
507 operator = Operator.PREINCREASE
508 tbl = self.__preIncreases
509 elif position == "post":
510 operator = Operator.POSTINCREASE
511 tbl = self.__postIncreases
512 else:
513 raise ValueError("position should be either pre or post")
514 if attributeName not in tbl:
515 tbl[attributeName] = 0
516 tbl[attributeName] += increase
517 self.__placehold(attributeName)
518 self.__afflict(attributeName, operator, None, increase, increase, increase != 0)
519
520 def multiply(self, attributeName, multiplier, stackingPenalties=False, penaltyGroup="default", skill=None, **kwargs):
521 """Multiply value of given attribute by given factor"""

Callers 13

increaseItemAttrMethod · 0.80
increaseChargeAttrMethod · 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 4

__handleSkillMethod · 0.95
__placeholdMethod · 0.95
__afflictMethod · 0.95
getResistanceMethod · 0.80

Tested by

no test coverage detected