Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void lvlUpdate(int l, int sr)
- {
- health = 3 * h;
- attack = h;
- deffens = h;
- int d = (l + sr) / 2 + (l + sr) % 2;
- if (r.Next() % 3 == 0)
- {
- if (r.Next() % 3 == 0)
- {
- d -= r.Next(1, 3);
- }
- else
- {
- d += r.Next(1, 3);
- }
- }
- if (d < 0) d = 0;
- lvl = h + d;
- for (int i = 0; i < d; i++)
- {
- switch (r.Next(1, 3))
- {
- case 1:
- attack++;
- break;
- case 2:
- deffens++;
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement