Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.47 KB | None | 0 0
  1.  List<Action> actions = new List<Action>();
  2.  
  3.             actions.Add(() => S.Demolish());
  4.             actions.Add(() => S.Basic());
  5.  
  6.  
  7.             foreach (var action in actions)
  8.  
  9.                 action.Invoke(S.Critical);
  10.  
  11.  
  12. // S.Critical nedan
  13.  
  14.               public static double Critical(double spell)
  15.         {
  16.             if (RandomNumberBetween(0.00, 1.00) > 1 - critChance)
  17.             {
  18.  
  19.                 return spell;
  20.             }
  21.             else
  22.                 Console.WriteLine("Critical for {0}", spell * (critPower + 1));
  23.                 return spell * (critPower + 1);
  24.         }
  25.  
  26.  
  27.  
  28.         public static double Demolish()
  29.         {
  30.             if (Rage >= 50 & Energy >= 5)
  31.             {
  32.                 Rage -= 50;
  33.                 Energy -= 5;
  34.                 Console.WriteLine("Demolish hit for {0}  ", (combatPower * 9.8));
  35.                 return (combatPower * 9.8);
  36.             }
  37.  
  38.             if (Rage <= 49 & Energy >= 5)
  39.             {
  40.                 Rage += 25;
  41.                 Energy += -5;
  42.                 Console.WriteLine("Demolish hit for {0}  ", (combatPower * 4));
  43.                 return (combatPower * 4);
  44.             }
  45.             else
  46.             {
  47.                 return Basic();
  48.             }
  49.         }
  50.         public static double Basic()
  51.         {
  52.             Energy += 1;
  53.             Rage += 5;          
  54.             Console.WriteLine("Basic hit for {0} ", builder);
  55.             return builder;
  56.         }
  57.  
  58.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement