ElEditors, Interface administrators, Administrators
70,866
edits
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 340: | Line 340: | ||
so we skip those situations, as impossible in-game. | so we skip those situations, as impossible in-game. | ||
--]] | --]] | ||
if trait.key == 'useful' and string.find(damage_key, 'useful') | if trait.value or (trait.key == 'useful' and string.find(damage_key, 'useful')) then | ||
WITH_TRAITS[mode][damage_key .. ((trait.key == 'useful' or trait.key == '') and "" or ('_' .. trait.key))] = | |||
damage_value * (string.find(damage_key, 'useful') and trait.value or 1) | |||
WITH_TRAITS[mode][damage_key .. ((trait.key == '') and "" or ('_' .. trait.key))] = | |||
damage_value * trait.value | |||
end | end | ||
end | end |