Guest User

Untitled

a guest
Nov 6th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function chorEffect ([int]$lvl)
  2. {
  3.     if ($lvl -gt 0)
  4.     {
  5.         Write-Output (0.05 / ([Math]::Floor(($lvl - 1) / 10) + 1))
  6.     }
  7.     else
  8.     {
  9.         Write-Output 1
  10.     }
  11. }
  12.  
  13. function ponyEffect ([int]$lvl)
  14. {
  15.     $lvl++
  16.     if ($lvl -gt 0)
  17.     {
  18.         Write-Output (((1 + $lvl) / $lvl) - 1)
  19.     }
  20.     else
  21.     {
  22.         Write-Output 1
  23.     }
  24. }
  25.  
  26. $outsiders = [System.Collections.ArrayList]@()
  27. $chorLvl = 0
  28. $ponyLvl = 0
  29.  
  30. $outsiderObject = [PSCustomObject]@{
  31.     ponyLvl = 0
  32.     chorLvl = 0
  33.     ponyEffect = 0
  34.     chorEffect = 0
  35. }
  36.  
  37. While ($chorLvl -lt 150)
  38. {
  39.     $outsider = $outsiderObject.PSObject.Copy()
  40.  
  41.     if ((ponyEffect $ponyLvl) -ge (chorEffect $chorLvl))
  42.     {
  43.         $ponyLvl++
  44.     }
  45.     else
  46.     {
  47.         $chorLvl++
  48.     }
  49.  
  50.     $outsider.ponyLvl = $ponyLvl
  51.     $outsider.chorLvl = $chorLvl
  52.     $outsider.ponyEffect = ponyEffect $ponyLvl
  53.     $outsider.chorEffect = (0.05 / (chorCost $chorLvl) )
  54.  
  55.     $null = $outsiders.Add($outsider)
  56. }
  57.  
  58. $outsiders | sort chorLvl -Unique | ft
Add Comment
Please, Sign In to add comment