src/ai/ai.h
branchcpp_gui
changeset 6308 646711c5feaa
parent 6298 c30fe89622df
child 9913 e79cd19772dd
equal deleted inserted replaced
6307:f40e88cff863 6308:646711c5feaa
    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)