12 int probability_sum = 0;
16 probability_sum += probability[i];
20 int probability_randomized =
Math.
RandomInt(0,probability_sum);
27 tmp += probability[i];
29 if( tmp > probability_randomized )
101 bloodTypeName =
"0-";
107 bloodTypeName =
"A+";
113 bloodTypeName =
"A-";
119 bloodTypeName =
"B+";
125 bloodTypeName =
"B-";
131 bloodTypeName =
"AB+";
137 bloodTypeName =
"AB-";
147 return bloodTypeName;
static bool MatchBloodCompatibility(int bloodtypetarget, int bloodtype)
static string GetBloodTypeName(int bloodtype, out string type, out bool positive)
static int GenerateBloodType()
static const int NUM_OF_BLOOD_TYPES
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
const int LIQUID_BLOOD_AB_P
const int LIQUID_BLOOD_0_P
const int LIQUID_BLOOD_B_P
const int LIQUID_BLOOD_A_N
const int LIQUID_BLOOD_0_N
const int LIQUID_BLOOD_B_N
const int LIQUID_BLOOD_A_P
const int LIQUID_BLOOD_AB_N
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].