Calculator for magic item creation in RPG
I see a few problems with this, most notably, you have a plethora of magic numbers.


let baseDC casterLevel =
    5 + casterLevel

let rush dc =
    dc + 5

let ignoreRequirements requirements dc =
    dc + (5 * requirements)

let getBuildPrice basePrice =
    basePrice * 0.5

let getTime basePrice =
    floor (8.0 * basePrice / 1000.0)

let getMinBonusForNoCursed dc =
    dc - 6

let buildDaysWhileAdventuring isRushed buildTime =
    let adventuringBuildTime = buildTime / 4.0
    floor (if isRushed then adventuringBuildTime else adventuringBuildTime * 2.0)



In order, I see:


5 + casterLevel: what is 5?
dc + 5: what is 5? Is it the same as #1?
5 * requirements: what is 5? Is it the same as #1 or #2?
basePrice * 0.5: what is 0.5? Is it 1 / 2 or something different?
8.0 * basePrice: what is 8.0?
#5 / 1000.0: what is 1000.0?
dc - 6: what is 6?
buildTime / 4.0: what is 4.0?
adventuringBuildTime * 2.0: what is 2.0, is it 4.0 / 2, is it the 4.0 from #8 / 2?




For a functional program, it's not too bad. I don't like how many times you use if (I always prefer match), but when dealing with boolean types it does quite fine.