Refactor how remote resistance works. We now check the resistance ID directly from the effect, and fall back to the remoteResistanceID attribute. See #1139

This commit is contained in:
blitzmann
2017-05-02 22:19:58 -04:00
parent 50965244c0
commit 622efb624d
17 changed files with 79 additions and 58 deletions

View File

@@ -1141,11 +1141,13 @@ class ItemAffectedBy(wx.Panel):
if projected:
displayStr += " (projected)"
if attrModifier == "s*":
attrModifier = "*"
penalized = "(penalized)"
else:
penalized = ""
penalized = ""
if '*' in attrModifier:
if 's' in attrModifier:
penalized += "(penalized)"
if 'r' in attrModifier:
penalized += "(resisted)"
attrModifier = "*"
# this is the Module node, the attribute will be attached to this
display = "%s %s %.2f %s" % (displayStr, attrModifier, attrAmount, penalized)
@@ -1271,11 +1273,13 @@ class ItemAffectedBy(wx.Panel):
else:
attrIcon = self.imageList.Add(BitmapLoader.getBitmap("7_15", "icons"))
if attrModifier == "s*":
attrModifier = "*"
penalized = "(penalized)"
else:
penalized = ""
penalized = ""
if '*' in attrModifier:
if 's' in attrModifier:
penalized += "(penalized)"
if 'r' in attrModifier:
penalized += "(resisted)"
attrModifier = "*"
attributes.append((attrName, (displayName if displayName != "" else attrName), attrModifier,
attrAmount, penalized, attrIcon))