Editing Module:StreetBrawlAbilitiesGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 105: | Line 105: | ||
-- {{#invoke:StreetBrawlAbilities|change|ABILITY|PROP}} describes how far a property moved | -- {{#invoke:StreetBrawlAbilities|change|ABILITY|PROP}} describes how far a property moved | ||
-- in Street Brawl, as "reduced by 45%" or "increased by | -- in Street Brawl, as "reduced by 45%" or "increased by 44%". | ||
function p.change(frame) | function p.change(frame) | ||
local ability = mw.text.trim(frame.args[1] or "") | local ability = mw.text.trim(frame.args[1] or "") | ||
| Line 125: | Line 125: | ||
local direction = sb > base and "increased" or "reduced" | local direction = sb > base and "increased" or "reduced" | ||
local percent = math.abs(sb - base) / math.abs(base) * 100 | local percent = math.abs(sb - base) / math.abs(base) * 100 | ||
return direction .. " by " .. string.format("%.0f", percent) .. "%" | |||
return direction .. " by " | |||
end | end | ||