(key, fallback=None)
| 35 | |
| 36 | |
| 37 | def getAttrDefault(key, fallback=None): |
| 38 | try: |
| 39 | default = defaultValuesCache[key] |
| 40 | except KeyError: |
| 41 | attrInfo = getAttributeInfo(key) |
| 42 | if attrInfo is None: |
| 43 | default = defaultValuesCache[key] = None |
| 44 | else: |
| 45 | default = defaultValuesCache[key] = attrInfo.defaultValue |
| 46 | if default is None: |
| 47 | default = fallback |
| 48 | return default |
| 49 | |
| 50 | |
| 51 | def getResistanceAttrID(modifyingItem, effect): |
no test coverage detected