Skip to content

Commit

Permalink
Different fix for #397 and fix #458
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzmann committed Dec 4, 2015
1 parent 04c6fad commit 4325cca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eos/modifiedAttributeDict.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ def increase(self, attributeName, increase, position="pre", skill=None):

def multiply(self, attributeName, multiplier, stackingPenalties=False, penaltyGroup="default", skill=None):
"""Multiply value of given attribute by given factor"""
if multiplier is None: # See GH issue 397
return

if skill:
multiplier *= self.__handleSkill(skill)

Expand All @@ -308,7 +311,7 @@ def multiply(self, attributeName, multiplier, stackingPenalties=False, penaltyGr
else:
if not attributeName in self.__multipliers:
self.__multipliers[attributeName] = 1
self.__multipliers[attributeName] *= multiplier if multiplier is not None else 1
self.__multipliers[attributeName] *= multiplier
self.__placehold(attributeName)
self.__afflict(attributeName, "%s*" % ("s" if stackingPenalties else ""), multiplier, multiplier != 1)

Expand Down

0 comments on commit 4325cca

Please sign in to comment.