ketura

Untitled

Aug 28th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. public class EVStat : ULongStat
  2. {
  3. public static readonly int DefaultGrowthAmount = 1000;
  4.  
  5. public int GrowthAmount { get; }
  6.  
  7. public override ulong Value
  8. {
  9. get
  10. {
  11. var oldValue = Value;
  12. Value += ExcerciseAmount;
  13. return oldValue;
  14. }
  15. protected set { Value = value; }
  16. }
  17.  
  18. public EVStat Copy()
  19. {
  20. return new EVStat(Name, Value, GrowthAmount, MinLimit, MaxLimit, Description, Notes);
  21. }
  22.  
  23. public EVStat() : this("UnnamedStat", 0, DefaultGrowthAmount, ulong.MinValue, ulong.MaxValue, null, null) { }
  24. public EVStat(string name) : this(name, 0, DefaultGrowthAmount, ulong.MinValue, ulong.MaxValue, null, null) { }
  25. public EVStat(string name, ulong value) : this(name, value, DefaultGrowthAmount, ulong.MinValue, ulong.MaxValue, null, null) { }
  26. public EVStat(string name, ulong value, int growth) : this(name, value, growth, ulong.MinValue, ulong.MaxValue, null, null) { }
  27. public EVStat(string name, ulong value, int growth, ulong min, ulong max) : this(name, value, growth, min, max, null, null) { }
  28. public EVStat(string name, ulong value, int growth, ulong min, ulong max, string desc, string notes)
  29. : base(name, value, (ulong)(Math.Max(min, ulong.MinValue)), (ulong)(Math.Min(max, ulong.MaxValue)), desc, notes)
  30. {
  31. GrowthAmount = growth;
  32. }
  33. }
  34.  
  35. public interface StatContainer<T>
  36. {
  37. T
  38. }
  39.  
  40. public delegate T CompositeStatCombine<T>(Dictionary<string, T> stats)
  41.  
  42. public class CompositeStat<T>
  43. where T: NumericStat
  44. {
  45. protected Dictionary<string, T> Stats { get; set; }
  46.  
  47. protected List<long> AdditionFactors { get; set; }
  48. protected List<float> MultiplicationFactors { get; set; }
  49.  
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment