src/ai/ai.h
branchgamebalance
changeset 9910 0b2aebc8283e
parent 9895 7bd07f43b0e3
child 9913 e79cd19772dd
equal deleted inserted replaced
9909:dce9a6923bb7 9910:0b2aebc8283e
    75 	}
    75 	}
    76 
    76 
    77 	return true;
    77 	return true;
    78 }
    78 }
    79 
    79 
    80 #define AI_CHANCE16(a,b)    ((uint16)     AI_Random()  <= (uint16)((65536 * a) / b))
    80 #define AI_CHANCE16(a, b)    ((uint16)     AI_Random()  <= (uint16)((65536 * a) / b))
    81 #define AI_CHANCE16R(a,b,r) ((uint16)(r = AI_Random()) <= (uint16)((65536 * a) / b))
    81 #define AI_CHANCE16R(a, b, r) ((uint16)(r = AI_Random()) <= (uint16)((65536 * a) / b))
    82 
    82 
    83 /**
    83 /**
    84  * The random-function that should be used by ALL AIs.
    84  * The random-function that should be used by ALL AIs.
    85  */
    85  */
    86 static inline uint AI_RandomRange(uint max)
    86 static inline uint AI_RandomRange(uint max)