diff -r 9646f7e37c31 -r be51ea0adc29 src/ai/api/ai_base.hpp --- a/src/ai/api/ai_base.hpp Tue Mar 25 12:09:42 2008 +0000 +++ b/src/ai/api/ai_base.hpp Tue Mar 25 12:12:45 2008 +0000 @@ -32,6 +32,13 @@ static uint32 Rand(); /** + * Get a random value. + * @param unused_param This param is not used, but is needed to work with lists. + * @return a random value between 0 and MAX(uint32). + */ + static uint32 RandItem(int unused_param); + + /** * Get a random value in a range. * @param max the maximum value it will return. * @return a random value between 0 .. max. @@ -39,11 +46,27 @@ static uint RandRange(uint max); /** + * Get a random value in a range. + * @param unused_param This param is not used, but is needed to work with lists. + * @param max the maximum value it will return. + * @return a random value between 0 .. max. + */ + static uint RandRangeItem(int unused_param, uint max); + + /** * Returns approximatelly 'out' times true when called 'max' times. * After all, it is a random function. * @return true if the chance worked out. */ static bool Chance(uint out, uint max); + + /** + * Returns approximatelly 'out' times true when called 'max' times. + * After all, it is a random function. + * @param unused_param This param is not used, but is needed to work with lists. + * @return true if the chance worked out. + */ + static bool ChanceItem(int unused_param, uint out, uint max); }; #endif /* AI_BASE_HPP */