Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. (*
  2. C = character power;
  3. L = level;
  4. pL = pet level;
  5. B = idle bonus;
  6. I = inca bonus;
  7. P = pet power;
  8. *)
  9.  
  10. (*
  11. necro idle bonus: C, L^2;
  12. idle bonus: B (duh);
  13. DSoH: B^0.48, I;
  14. RG: B^(0.20625 + pL*0.0082), P^0.6;
  15. *)
  16.  
  17. (*
  18. L = 135;
  19. pL = 120;
  20. *)
  21.  
  22. (*
  23. total B = C influence: B^(1 + 0.48 + 0.20625 + pL*0.0082) = B^2.67025;
  24. total I influence = I^5 (5 incas);
  25. total P influence = P^0.6;
  26. *)
  27.  
  28.  
  29. Eff[Pf_, Evo_, Idl_, Ch_, Inc_, Pet_] := Module[{total},
  30. total =
  31. 1 * (1 + Pf) * (1 +
  32. Evo) * (1 + Idl)^2.67025 * (1 + Ch)^2.67025 * (1 +
  33. Inc)^5 * (1 + Pet)^0.6;
  34. Return[total];
  35. ];
  36.  
  37. ReplaceMissing[val_, replaceVal_] :=
  38. If[MissingQ[val], replaceVal, val];
  39.  
  40. Eff[dict_] := Module[{args},
  41. args = {
  42. dict["Profit"],
  43. dict["Evo"],
  44. dict["Idle"],
  45. dict["Char"],
  46. dict["Inca"],
  47. dict["Pet"]
  48. };
  49. args = ReplaceMissing[#, 0] & /@ args;
  50. Return[Eff @@ args];
  51. ];
  52.  
  53. PrintEff[itemData_] := Module[{itemName, dom, effString, domString},
  54. itemName = itemData["Name"];
  55. dom = ReplaceMissing[itemData["Dom"], 0];
  56. effString = itemName <> ": " <> ToString[Eff[itemData]];
  57. domString =
  58. ", dominance penalty: " <> ToString[(1 + 0.014)^dom] <>
  59. ", final: " <> ToString[Eff[itemData]/((1 + 0.014)^dom)];
  60. If[dom == 0,
  61. Print[effString],
  62. Print[effString <> domString]
  63. ];
  64. ];
  65.  
  66. EvaluateItemEff[itemsData_] := Module[{currentType, newType},
  67. currentType = "";
  68. For[i = 1, i <= Length[itemsData], i++,
  69. newType = itemsData[[i]]["Type"];
  70. If[newType != currentType,
  71. currentType = newType;
  72. Print["\n" <> currentType <> ": "];
  73. ];
  74. PrintEff[itemsData[[i]]];
  75. ];
  76. ];
  77.  
  78.  
  79. data = {
  80. <|"Type" -> "Boots", "Name" -> "Eastern", "Inca" -> 0.3|>,
  81. <|"Type" -> "Boots", "Name" -> "Journey", "Char" -> 2, "Dom" -> 15|>,
  82.  
  83. <|"Type" -> "Chest", "Name" -> "Thornmail", "Char" -> 1,
  84. "Pet" -> 1, "Dom" -> 10|>,
  85. <|"Type" -> "Chest", "Name" -> "Chestguard", "Inca" -> 0.5|>,
  86. <|"Type" -> "Chest", "Name" -> "Ribcage", "Profit" -> 2,
  87. "Idle" -> 0.5|>,
  88. <|"Type" -> "Chest", "Name" -> "Darklight", "Char" -> 2|>,
  89.  
  90. <|"Type" -> "Gloves", "Name" -> "FalcGloves", "Pet" -> 1.75,
  91. "Profit" -> 0.35, "Dom" -> 15|>,
  92. <|"Type" -> "Gloves", "Name" -> "Fiery", "Evo" -> 2, "Inca" -> 0.5|>,
  93. <|"Type" -> "Gloves", "Name" -> "GotG", "Idle" -> 1.5|>,
  94. <|"Type" -> "Gloves", "Name" -> "Talented", "Profit" -> 2,
  95. "Char" -> 0.5|>,
  96.  
  97. <|"Type" -> "Head", "Name" -> "Casque", "Char" -> 2|>,
  98. <|"Type" -> "Head", "Name" -> "Ragecrown", "Char" -> 1,
  99. "Pet" -> 1, "Evo" -> 1|>,
  100. <|"Type" -> "Head", "Name" -> "Headguard", "Evo" -> 2|>,
  101.  
  102. <|"Type" -> "Amulet", "Name" -> "Lucky", "Profit" -> 1,
  103. "Idle" -> 1, "Inca" -> 0.25|>,
  104.  
  105.  
  106. <|"Type" -> "Ring", "Name" -> "Companionship", "Pet" -> 2,
  107. "Dom" -> 25|>,
  108. <|"Type" -> "Ring", "Name" -> "Fiery", "Inca" -> 0.25, "Evo" -> 2|>,
  109. <|"Type" -> "Ring", "Name" -> "Frost", "Inca" -> 0.25, "Evo" -> 2|>,
  110. <|"Type" -> "Ring", "Name" -> "Morbid", "Profit" -> 1,
  111. "Idle" -> 1, "Char" -> 0.5|>,
  112. <|"Type" -> "Ring", "Name" -> "Bond", "Char" -> 1|>,
  113.  
  114. <|"Type" -> "Shoulder", "Name" -> "Razor", "Char" -> 0.75,
  115. "Pet" -> 0.75, "Inca" -> 0.2|>,
  116. <|"Type" -> "Shoulder", "Name" -> "Shoulderguard", "Profit" -> 1.5|>,
  117. <|"Type" -> "Shoulder", "Name" -> "FalcWraps", "Pet" -> 1|>,
  118. <|"Type" -> "Shoulder", "Name" -> "Strange",
  119. "Idle" -> (1 + 0.03)^25 - 1|>
  120. };
  121.  
  122. EvaluateItemEff[data]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement