Module:Damage: Difference between revisions

no edit summary
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') then
                     if trait.value or (trait.key == 'useful' and string.find(damage_key, 'useful')) then
                        WITH_TRAITS[mode][damage_key] = damage_value * trait.value
                         WITH_TRAITS[mode][damage_key .. ((trait.key == 'useful' or trait.key == '') and "" or ('_' .. trait.key))] =
                    elseif trait.value then
                             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