Beispiel #1
0
 //damage gets passed for later use (maybe)
 public static bool blocks(int damage, DamageType d, byte[] blockchances)
 {
     if (d.isBlockable())
     {
         return blockRand.Next(101) <= blockchances[(int)Math.Log((uint)d, 2)];
     }
     return false;
 }