Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tdps.lic - Corrected tdp cost calculation method #6710

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions tdps.lic
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ def cost(current, modifier)
cost = 0
start = 10 - 2 * modifier
for i in start..current - 1 do
mult = i < 100 ? 3 : 15
mod = (modifier.to_f * i / 2).truncate
cost += (i * mult) + mod
cost += i * (i < 100 ? 3 : 15) + modifier * (i / 2).floor(0)
end
return cost
end
Expand Down Expand Up @@ -52,7 +50,7 @@ else
end

# Calcuate total TDPs spent for each stat
costs = []
costs = Array.new(8)
for i in 0..7
costs[i] = cost(stats[i], mods[i])
end
Expand Down